Physics of Language Models: Part 4.1, Architecture Design and the Magic of Canon Layers

51 Pages Posted: 7 May 2025 Last revised: 19 May 2025

See all articles by Zeyuan Allen-Zhu

Zeyuan Allen-Zhu

Meta Platforms Inc; Allen-Zhu Research

Date Written: May 02, 2025

Abstract

Understanding architectural differences in language models is challenging, especially at academic-scale pretraining (e.g., 1.3B parameters, 100B tokens), where results are often dominated by noise and randomness. To overcome this, we introduce controlled synthetic pretraining tasks that isolate and evaluate core model capabilities. Within this framework, we discover Canon layers: lightweight architectural components—named after the musical term "canon"—that promote horizontal information flow across neighboring tokens. Canon layers compute weighted sums of nearby token representations and integrate seamlessly into Transformers, linear attention, state-space models, or any sequence architecture.

We present 12 key results. This includes how Canon layers enhance reasoning depth (e.g., by 2x), reasoning breadth, knowledge manipulation, etc. They lift weak architectures like NoPE to match RoPE, and linear attention to rival state-space models like Mamba2—validated both through synthetic tasks and real-world academic-scale pretraining. This synthetic playground offers an economical, principled path to isolate core model capabilities often obscured at academic scales. Equipped with infinite high-quality data, it may even predict how future architectures will behave as training pipelines improve—e.g., through better data curation or RL-based post-training—unlocking deeper reasoning and hierarchical inference.

Suggested Citation

Allen-Zhu, Zeyuan,
Physics of Language Models: Part 4.1, Architecture Design and the Magic of Canon Layers
(May 02, 2025). Available at SSRN: https://ssrn.com/abstract=5240330 or http://dx.doi.org/10.2139/ssrn.5240330

Zeyuan Allen-Zhu (Contact Author)

Meta Platforms Inc ( email )

Menlo Park, CA
United States

Allen-Zhu Research

WA
United States

HOME PAGE: http://zeyuan.allen-zhu.com

Do you have a job opening that you would like to promote on SSRN?

Paper statistics

Downloads
2,390
Abstract Views
6,316
Rank
13,576
PlumX Metrics