Abstract
Modern Transformers predominantly adopt the Pre-Norm paradigm for its optimization stability, foregoing the superior potential of the unstable Post-Norm architecture. Prior attempts to combine their strengths typically lead to a stability-performance trade-off. We attribute this phenomenon to a structural incompatibility within a single-stream design: Any application of the Post-Norm operation inevitably obstructs the clean identity gradient preserved by Pre-Norm. To fundamentally reconcile these paradigms, we propose SiameseNorm, a two-stream architecture that couples Pre-Norm-like and Post-Norm-like streams with shared parameters. This design decouples the optimization dynamics of the two streams, retaining the distinct characteristics of both Pre-Norm and Post-Norm by enabling all residual blocks to receive combined gradients inherited from both paradigms, where one stream secures stability while the other enhances expressivity. Extensive pre-training experiments on 1.3B-parameter models demonstrate that SiameseNorm exhibits exceptional optimization robustness and consistently outperforms strong baselines.
Introduction
In the development of Transformer architectures, the placement of Layer Normalization (LN) has become a critical design choice. The industry standard, Pre-Norm, places LN before the residual block. This configuration is favored for its stability, as it maintains a "clean identity path" that facilitates gradient flow in deep networks. However, Pre-Norm suffers from signal dilution: as depth increases, the magnitude of the main hidden state grows, making the relative contribution of deeper layers negligible and limiting the model's effective depth.
Conversely, Post-Norm places LN after the residual addition. While this offers superior representational power and prevents signal dilution, it is notoriously unstable. The repeated normalization steps distort gradient geometry, often leading to vanishing or exploding gradients during large-scale training. Previous attempts to hybridize these two approaches have generally resulted in a stability-performance trade-off, failing to capture the best of both worlds.
Architecture and Methodology
SiameseNorm addresses this structural incompatibility by moving away from a single-stream design. Instead of forcing a single data path to be simultaneously unnormalized (for gradient health) and strictly normalized (for representation scale), SiameseNorm utilizes a two-stream architecture.
The Two-Stream Design
Each layer in SiameseNorm maintains two parallel hidden states:
- The Y-stream (Pre-Norm-like): This stream remains unnormalized to preserve the identity gradient path, ensuring optimization stability.
- The X-stream (Post-Norm-like): This stream applies normalization after each update, keeping the representation scale bounded and maintaining high expressivity.
Crucially, these two streams share the same parameters for the Attention and MLP blocks. This ensures that the parameter count remains nearly identical to a standard Transformer while allowing the model to benefit from dual optimization dynamics. To maintain stability, an additional LN is applied to the aggregated representation before it enters a residual block. Furthermore, to prevent the growing Y-stream from overpowering the bounded X-stream in deeper layers, the architecture employs depth-wise scaling, adjusting residual updates for the Post-Norm stream by a factor of $1/\sqrt{l+1}$, where $l$ is the layer index.
Experimental Results
The researchers evaluated SiameseNorm using 1.3B-parameter models pre-trained on the FineWeb-Edu dataset (up to 350B tokens). The architecture was benchmarked against standard Pre-Norm and other stable variants like DeepNorm across common sense reasoning and knowledge tasks.
Training Stability and Efficiency
SiameseNorm demonstrated exceptional robustness, particularly in "aggressive" training regimes. While standard Post-Norm variants often diverge at high learning rates (e.g., $2 \times 10^{-3}$), SiameseNorm remained stable. This stability translates directly into better convergence.
As shown in the training loss curves, SiameseNorm consistently achieves lower perplexity than its counterparts. On 1.3B models, it reached a training perplexity (PPL) of 10.43, a 0.3 reduction over the strongest baselines.
Reasoning and Effective Depth
The most significant performance gains were observed in sequential reasoning tasks. On arithmetic benchmarks, SiameseNorm improved accuracy from 28.1% (Pre-Norm) to 39.6%—a 40.9% relative increase. This suggests that the architecture successfully restores the "effective depth" that is often lost in standard Pre-Norm designs. Analysis using the "Logit Lens" further confirmed that the model's final predictions are predominantly driven by the Post-Norm-like stream (42.6% of the time), validating its role in capturing more complex logic.
Conclusion
SiameseNorm represents a fundamental shift in Transformer design by decoupling optimization stability from representational scale through a two-stream approach. By reconciling the strengths of Pre-Norm and Post-Norm, it enables the training of deeper, more expressive models without sacrificing robustness. While future work will address the emergence of outlier features common in large models, SiameseNorm provides a clear path forward for scaling Transformers more effectively.
Summary updated