Diffract: Spectral View of LLM Domain Adaptation
Nikita Borodin, Maria Krylova, Artem Zabolotnyi, Dmitry Aspisov, Egor Shikov, Nikita Tyuplyaev, Oleg Travkin, Roman Alferov, Dmitry Vinichenko
Overview
Continual pre-training (CPT) has established itself as a critical phase in modern large language model (LLM) pipelines, enabling the infusion of specialized domain knowledge into foundational models to create high-performing variants like DeepSeek-Math and specialized Llama checkpoints. However, while supervised fine-tuning (SFT) has benefited from extensive theoretical and empirical study—revealing phenomena such as linear mode connectivity, task arithmetic, and low-rank subspace modifications—the CPT stage remains comparatively opaque. This talk presents a detailed investigation into the CPT stage through a spectral lens, aiming to move beyond purely empirical observations and uncover the underlying mathematical structures governing domain adaptation in LLMs.

Key moments
- 0:00 Introduction and motivation for spectral view of LLM domain adaptation
- 0:45 Introduction of the Diffract open-source analysis tool
- 1:06 Experimental setup using OLMo models across multiple domains
- 1:26 Impact of pre-train token budget on domain adaptation quality
- 1:47 Spectral analysis revealing complex shapes and sharp peaks in attention heads
- 2:20 Head-wise rewinding and domain adaptation compressibility
- 3:07 Emergent domain connectivity and linear interpolation between domains
- 3:46 Future research directions and audience Q&A
Diffract: Spectral View of LLM Domain Adaptation
Speakers: Nikita Borodin; Maria Krylova; Artem Zabolotnyi; Dmitry Aspisov; Egor Shikov; Nikita Tyuplyaev; Oleg Travkin; Roman Alferov; Dmitry Vinichenko
Conference: ICML
YouTube: https://slideslive.com/39083546
Overview
Continual pre-training (CPT) has established itself as a critical phase in modern large language model (LLM) pipelines, enabling the infusion of specialized domain knowledge into foundational models to create high-performing variants like DeepSeek-Math and specialized Llama checkpoints. However, while supervised fine-tuning (SFT) has benefited from extensive theoretical and empirical study—revealing phenomena such as linear mode connectivity, task arithmetic, and low-rank subspace modifications—the CPT stage remains comparatively opaque. This talk presents a detailed investigation into the CPT stage through a spectral lens, aiming to move beyond purely empirical observations and uncover the underlying mathematical structures governing domain adaptation in LLMs.
To facilitate this deep dive, the researchers introduce Diffract, an open-source analysis tool designed to interrogate model weight matrices using spectral techniques. Focusing primarily on OLMo model families ranging from 1 billion up to 32 billion parameters, the work examines how pre-training token budgets, singular value decompositions (SVD), and weight matrix spectra interact during domain adaptation across mathematics, instruction following, coding, and natural text domains. The findings offer fresh perspectives on weight compressibility, head-wise heterogeneity, and a newly identified phenomenon termed domain connectivity.
The insights generated by this spectral framework carry significant weight for ML systems engineers and model builders. By demonstrating that domain adaptation concentrates within specific, highly localized spectral subspaces once foundational pre-training reaches a critical maturity threshold, the research opens the door to more efficient model compression, targeted weight rewinding, and a better understanding of how domain knowledge integrates into neural network weights without destabilizing general capabilities.
Background
▶ Watch: Introduction and motivation for spectral view of LLM domain adaptation (0:00)
In the broader machine learning and systems landscape, understanding the internal dynamics of model updates has become paramount as training cluster costs soar and model scales expand. While the pre-training phase establishes broad linguistic and logical foundations, domain adaptation via continual pre-training bridges the gap to vertical-specific applications. Historically, practitioners have relied on trial-and-error hyperparameter tuning, full-parameter updates, or parameter-efficient fine-tuning (PEFT) methods like LoRA to execute this transition.
However, prior work on SFT and general model weights has increasingly leveraged linear algebra tools, particularly Singular Value Decomposition (SVD), to characterize weight evolution. A prominent body of literature known as heavy-tailed self-regularization tracks how the eigenvalue spectrum of model weight matrices evolves. At initialization, these spectra typically adhere to the Marchenko-Pastur distribution. As training progresses, the spectra develop power-law tails, where the exponent $\alpha$ often correlates directly with downstream model quality.
Other notable prior works have successfully utilized spectral manipulations for tangible gains. For instance, LASER applies truncation to lower singular values of weight matrices to improve overall model quality, while Transformer Squared manipulates singular values to construct domain-specific models. Despite these advances, the specific trajectory of spectra during continual pre-training—and how pre-training token budgets dictate a model's capacity to absorb new domain data—has lacked a rigorous spectral accounting. The authors developed Diffract precisely to bridge this gap, applying advanced matrix analysis to open-source checkpoints to decode the mechanics of CPT.
Key Findings
▶ Watch: Experimental setup using OLMo models across multiple domains (1:06)
The investigation reveals several critical empirical and spectral discoveries regarding how LLMs undergo continual pre-training across scales:
- Pre-Train Token Budget Dependency: Domain adaptation efficiency is heavily gated by the initial pre-training token budget. For a 1 billion parameter model evaluated on the GSM8K benchmark, mathematics capability scales dramatically higher during CPT when the underlying checkpoint has been pre-trained on a larger token budget (e.g., 4 trillion tokens).
- Evolution of Spectral Shapes: While basic metrics like Frobenius norm, spectral norm, stable rank, and effective rank exhibit non-monotonic behaviors (such as a distinct spectral norm peak around 100 billion pre-training tokens), individual attention head singular spectra undergo a profound qualitative shift. Around 100 billion tokens, attention singular spectra transition from standard bulk-plus-tail profiles to complex shapes characterized by sharp, distinct peaks.
- Singular Vector Invariance During CPT: When continual pre-training is initiated from mature checkpoints (post-100B tokens), the bulk of the singular values do not change appreciably. By calculating cosine similarity between left singular vectors before and after CPT, the authors found that domain adaptation concentrates almost entirely within the newly formed sharp spectral peaks.
- Head-Wise Redundancy and Rewinding: Utilizing a reference domain rewind pattern—comparing Frobenius norm differences between target domain (math) and reference domain (text) CPT—the team demonstrated that a substantial fraction of attention heads can be reset ("rewound") to their pre-train stage without degrading model quality. For 1-billion-parameter models, 25% of heads can be rewound with a net 2% quality increase; for 7-billion-parameter models, up to 60% of heads can be rewound, yielding a 4% quality increase.
- Matrix Compressibility and Domain Connectivity: CPT weight deltas ($\Delta W$) admit significant singular value truncation (up to 50% for 1B models and 70% for 13B models). Furthermore, the work identifies domain connectivity: for models with sufficiently large pre-training budgets, linear interpolation between checkpoints trained on disparate domains (e.g., math and text) yields interpolated checkpoints whose performance lies above the linear chord connecting the endpoints.
Technical Deep Dive
▶ Watch: Spectral analysis revealing complex shapes and sharp peaks in attention heads (1:47)
The technical core of the paper relies on dissecting the weight matrices of transformer architectures—specifically focusing on query ($Q$), value ($V$), and fully connected (FC) projection layers—using rigorous linear algebra.
When analyzing the spectral properties of attention heads, the standard Marchenko-Pastur bulk-plus-tail model proves insufficient once training scales past 100 billion tokens. The appearance of sharp peaks in the singular value distribution indicates that the weight matrices develop localized, high-energy directional subspaces. The authors formalize this by evaluating singular vector agreement. For each singular value $\sigma_i$, the corresponding left singular vector $u_i$ before pre-training ($u_i^{\text{pre}}$) is compared against its counterpart after continual pre-training ($u_i^{\text{CPT}}$):
$$\text{Similarity}_i = \cos(u_i^{\text{pre}}, u_i^{\text{CPT}})$$
Visualizing this as a 2D color map reveals that regions corresponding to the emergent sharp peaks exhibit low vector agreement (highlighted in bright yellow and green), signifying that domain adaptation aggressively modifies these specific narrow subspaces. Conversely, the bulk singular vectors remain remarkably stable (red dots), indicating that general linguistic capabilities encoded during pre-training are largely preserved by locking into these orthogonal or semi-orthogonal subspaces.
To test the functional independence of these structures, the team implemented head-wise rewind. Operating in a cumulative greedy fashion, individual attention heads in the CPT checkpoint are systematically reset to their pre-training weights. The reference domain rewind strategy refines this by measuring the Frobenius norm delta ($\|\Delta W_{\text{math}} - \Delta W_{\text{text}}\|_F$) across domains to identify which heads are specialized for the target domain versus general text processing.
However, the degree of compressibility—while high—has operational limits. While 50% to 70% of singular values can be truncated, the approach does not immediately reach the extreme 90% sparsity required for aggressive pruning frameworks like DARE (Drop And REscale). Consequently, standard task arithmetic operations applied directly to CPT deltas fail to yield quality increases in preliminary experiments, pointing to the complex, non-linear interactions of these spectral updates.
Experimental Setup & Results
▶ Watch: Head-wise rewinding and domain adaptation compressibility (2:20)
The experimental methodology centers on the open-source OLMo model suite, chosen specifically because public checkpoints exist across both the pre-training continuum and the continual pre-training boundary.
- Model Scale: Evaluations span models sized at 1 billion, 7 billion, 13 billion, and 32 billion parameters.
- Pre-Training Configurations: For the 1B model, the authors utilize baseline checkpoints provided by the OLMo team alongside custom pre-training runs scaling from 20 billion to 400 billion tokens. Domain adaptation CPT runs are subsequently executed from 10 billion to 50 billion tokens. For the 7B and 13B models, official OLMo checkpoints are utilized, while the 32B model leverages both official pre-train and CPT checkpoints.
- Domains: Continual pre-training is evaluated across four distinct domains: mathematics, instruction following, coding, and natural text.
- Headline Metrics & Results:
- Math Adaptation (GSM8K): Demonstrates a clear positive correlation between pre-training token volume and downstream CPT accuracy. Models trained on 4T tokens achieve significantly higher GSM8K accuracy than those trained on shorter token schedules.
- Head Rewinding Efficiency: For 1B models, 25% of attention heads can be rewound without quality loss, accompanied by a 2% boost in task performance. For 7B models, up to 60% of heads can be rewound, resulting in a substantial 4% quality improvement.
- SVD Truncation Limits: Approximately 50% of singular values can be safely truncated in 1B models, scaling up to 70% in 13B models without catastrophic degradation.
No ablation studies outside of the aforementioned head-wise rewinding patterns, pre-token budget variations, and domain interpolation comparisons were detailed in this analysis.
Practical Implications
▶ Watch: Future research directions and audience Q&A (3:46)
For infrastructure teams, model builders, and deployment engineers, these findings offer actionable insights into how domain-adapted models are structured and how they might be optimized for production:
- Targeted Parameter-Efficient Adaptation: The discovery that domain adaptation concentrates within narrow, emergent spectral peaks suggests that future PEFT methods could be designed to dynamically target these specific high-energy subspaces rather than applying uniform low-rank updates across all layers.
- Model Pruning and Compression: Knowing that 50% to 70% of singular values in CPT weight matrices can be truncated provides a concrete baseline for engineers looking to compress domain-adapted models for edge deployment or memory-constrained inference servers, even if extreme 90% pruning requires more sophisticated compensation techniques.
- Mitigating Catastrophic Forgetting: The stability of bulk singular vectors and the success of head-wise rewinding indicate that general capabilities are protected when updates are orthogonal or localized. Infra teams can leverage reference domain rewind patterns to prune redundant or interfering attention heads, potentially reversing degradation in general text capabilities after heavy domain specialization.
- Limitations: The authors candidly note that direct application of task arithmetic (e.g., combining CPT deltas via arithmetic operations) fails at high truncation thresholds, and the precise interaction between SVD truncation and head-wise rewinding remains an open empirical question requiring further theoretical formalization.
Key Takeaways
- Token Budget Gating: The efficacy of continual pre-training is fundamentally bounded by the maturity of the initial pre-training token budget, with complex spectral structures emerging only after ~100 billion tokens.
- Subspace Concentration: Domain adaptation does not uniformly alter model weights; rather, it concentrates changes within narrow, high-energy singular vector subspaces corresponding to sharp spectral peaks.
- Significant Head Redundancy: Up to 60% of attention heads in larger models (e.g., 7B parameter OLMo) can be rewound to their pre-training state using reference domain patterns without incurring quality loss—often yielding net performance gains.
- Compressibility Limits: CPT weight matrices allow for 50% to 70% singular value truncation depending on model scale, though this falls short of the thresholds required for extreme pruning frameworks like DARE.
- Domain Connectivity: For models with sufficient pre-training, linear interpolation between checkpoints trained on different domains exhibits emergent domain connectivity, with interpolated performance matching or exceeding endpoint performance.
About the Speaker(s)
- Dmitry Vinichenko: Presented work on spectral analysis of LLM domain adaptation, including development of an open-source tool called Diffract for analyzing model weight matrices and their spectral properties during continual pre-training.
Co-authors: Nikita Borodin, Maria Krylova, Artem Zabolotnyi, Dmitry Aspisov, Egor Shikov, Nikita Tyuplyaev, Oleg Travkin, Roman Alferov.
Reviews
→ Top-rated talks at International Conference on Machine Learning 2026
All talks from International Conference on Machine Learning 2026