Uncovering Symmetry Transfer in Large Language Models via Layer-Peeled Optimization
Zhehang Du, Hangfeng He, Weijie Su
原文摘要
Large language models (LLMs) are pretrained by minimizing the cross-entropy loss for next-token prediction. In this paper, we study whether this objective can induce geometric structure in the model weights and context embeddings. We analyze a constrained layer-peeled program, a mathematically tractable surrogate for LLMs that treats the output projection matrix and last-layer context embeddings as optimization variables. We show that symmetries in the target next-token distributions are transferred to the global minimizers of the layer-peeled model in a precise group-theoretic sense. Specifically, we prove that when the target distributions are invariant under cyclic shifts of the tokens (such as the seven days of the week or the twelve months of the year), the optimal logit matrix is exactly circulant, and the Gram matrices of both the output projections and the context embeddings are circulant as well. Next, for exchangeable target distributions invariant under the symmetric group and, more generally, under 2-transitive group actions, we show that the rows of the globally optimal output projection matrix form a simplex equiangular tight frame, while the optimal logit matrix and context embeddings inherit the permutation symmetries of the targets. A key technical step is to reduce the constrained nonconvex factorized problem to a convex logit-level program, whose unique solution inherits the target symmetries, together with an explicit description of all optimal factorizations. Finally, we observe that open-weight LLMs approximately exhibit symmetries consistent with our theoretical predictions, although they are trained without any explicit regularization that encourages such geometric structure.
math.OC · cs.AI · stat.ML