GeoNorm: Unify Pre-Norm and Post-Norm with Geodesic Optimization
Chuanyang Zheng, Jiankai Sun, Yihang Gao, Chi Wang, Yuehao Wang, Jing Xiong, Liliang Ren, Bo Peng, Qingmei Wang, Xiaoran Shang, Mac Schwager, Anderson Schneider, Yuriy Nevmyvaka, Xiaodong Liu
TL;DR
GeoNorm reframes Transformer normalization as a geodesic optimization problem on the spherical manifold, replacing projection-based normalization with intrinsic updates via the exponential map $\exp_{\mathbf{x}}(\cdot)$. By viewing FFN and Attention outputs as gradient directions and applying layer-wise update decays analogous to learning-rate schedules, GeoNorm unifies Pre-Norm and Post-Norm under a geometric framework. Empirical evaluation across multiple datasets, model sizes, and training lengths shows GeoNorm consistently outperforms existing normalization methods with negligible extra cost, and harmonic decay further enhances performance and stability. This work offers a principled, scalable approach to normalization in large Transformers, with implications for training stability and efficiency at extreme scales.
Abstract
The placement of normalization layers, specifically Pre-Norm and Post-Norm, remains an open question in Transformer architecture design. In this work, we rethink these approaches through the lens of manifold optimization, interpreting the outputs of the Feed-Forward Network (FFN) and attention layers as update directions in optimization. Building on this perspective, we introduce GeoNorm, a novel method that replaces standard normalization with geodesic updates on the manifold. Furthermore, analogous to learning rate schedules, we propose a layer-wise update decay for the FFN and attention components. Comprehensive experiments demonstrate that GeoNorm consistently outperforms existing normalization methods in Transformer models. Crucially, GeoNorm can be seamlessly integrated into standard Transformer architectures, achieving performance improvements with negligible additional computational cost.
