Manuscript Offprint

arXiv:2609.39767

How Does Local Landscape Geometry Evolve in Language Model Pre-Training?

Zhanpeng Zhou, Yuhan Sun, Bingrui Li, Jinbo Wang, Huaijin Wu, Lei Wu, Junchi Yan

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

The scale and expense of pre-training language models make efficient hyperparameter tuning essential, yet a principled guidance is still missing. In this work, we analyze language model pre-training dynamics from a local landscape geometry perspective. Our study reveals two distinct phases. In Phase I, sharpness of the local landscape is initially high, leading to instability and loss plateaus under large learning rates (LRs). The landscape shifts from sharp to flatter regions early in training. This dynamic explains the necessity of LR warmup and further suggests that larger peak LRs require proportionally longer warmup periods. In Phase II, the local landscape is governed by the gradient noise scale. Our theory identifies a depth flatness trade-off: high noise from smaller batches widens the loss basin, whereas reduced noise from larger batches deepens it. This theory motivates a dynamic batch-size (BS) scheduler that begins with a small BS and increases it late in training. Together, we provide a unified view of loss landscape evolution, which translates into actionable tuning strategies for large-scale pre-training.

1 INTRODUCTION

Training language models efficiently requires carefully tuned hyperparameters, yet a principled guidance for tuning remains unclear. While practitioners often rely on grid search, these approaches are costly and unreliable at scale. Recent research (Foret et al., 2021; Cohen et al., 2021; Gilmer et al., 2022) has highlighted that the geometry of the local loss landscape offers fundamental insights into optimization, revealing how factors such as sharpness 1^{1} (Keskar et al., 2017; Zhang et al., 2017; Jiang et al., 2020) shape training dynamics. Leveraging insights from the local loss landscape presents a promising path toward principled hyperparameter tuning for language model pre-training.

Several pioneering works have already attempted to study language models from the local loss landscape perspective. Zhang et al. (2024a); Wang et al. (2025) identified blockwise sharpness patterns in language models through Hessian-based analyses. Wen et al. (2024) introduced the “river-valley” landscape to explain the effectiveness of Warmup-Stable-Decay (WSD) schedules (Hu et al., 2024). Peng et al. (2024); Chen et al. (2025) further visualized the loss landscapes of finetuned language models, offering geometric insights into the safety alignment.

To this end, we pose the central questions of this paper:

  1. How does the local landscape geometry evolve in language model pre-training?

  2. What implications does this evolution have for principled hyperparameter tuning?

Our contributions. In this work, we present the systematic study of the evolution of local landscape geometry during language model pre-training. As illustrated in Figure 1, our analysis reveals two distinct phases, each with implications for hyperparameter tuning.

• Phase I: From Sharp to Flat Landscapes. In Phase I, we observe that the model shifts from sharper regions of the loss landscape toward flatter ones, contrary to the progressive sharpening phenomenon in prior works (Cohen et al., 2021; Song & Yun, 2023; Cohen et al., 2025). Lyapunov stability

*Equal contribution. Correspondence to Zhanpeng Zhou (zzp1012@sjtu.edu.cn).

1^{1}To avoid misunderstanding, we clarify the terminology in Table 1.

Local Landscapes across Iterates (0.49M)

Figure

Local Landscapes across Iterates (7.8M)

Figure 1: The evolution of local loss landscape throughout pre-training. We train LLaMA-2 models with 170M parameters using different BSs (0.49M and 7.8M), and visualize the one-dimensional loss landscape at iterate θt\theta_t along a random direction δ\delta, i.e., plot L(θt+αδ)L(\theta_t + \alpha\delta) vs. the perturbation coefficient α\alpha. The landscapes are shown across different training iterations tt. Phase I. The landscapes gradually widen for both training runs. Phase II. Training with smaller BS produces wider landscapes than training with larger BS.

analysis in Section 4 shows that the maximum stable learning rate (LR) is inversely proportional to sharpness. Since sharpness is extremely high early in pre-training, using large peak LRs without sufficient warmup leads to instabilities, such as loss spikes and plateaus (see Figure 2).

Implications. The sharp-to-flat transition explains the necessity of LR warmup: LR should remain small until sharpness has sufficiently decayed, preventing training instabilities. This further provides a tuning recipe: within a reasonable range, larger peak LRs require proportionally longer warmup, to safely navigate the sharpest stage of training.

• Phase II: Basin Selection Governed by Noise Scale. In Phase II, the local loss landscape is largely governed by the noise scale during training, with batch size (BS) serving as its primary controller. Our analysis shows that smaller BS widens the loss basin, while larger BS deepens it. Theoretically, we analyze a continuous setup of preconditioned SGD, which uncovers a depth flatness trade-off: reduced gradient noise tends to minimize the loss, leading to deeper minima; whereas increased noise tends to regularize the sharpness of landscape, moving toward wider ones.

Implications. The trade-off, together with the ramping-time experiment in Figure 6, motivates a BS scheduling strategy: begins with a small BS and ramps it until the late phase of training. Our scheduling ensures steady loss reduction with few token consumption. Moreover, since the noise scale is proportional to η/B\eta/B in our theory, we predict that BS ramping and LR decay reduce the noise scale in similar ways and thus yield comparable performance (see Figure 8).

In summary, our work provides a two-phase picture of pre-training: an early sharp-to-flat transition that necessitates LR warmup, and a late noise-driven regime that motivates BS scheduling. This unified view advances our understanding of pre-training dynamics.

References (61)