cs.CLOct 1, 2026

The Asymptotics of Language Model Alignment with Memory

Authors: Haricharan Balasundaram, V. Arvind Rameshwar

Organizations: School of Electrical and Computer Engineering, Georgia Institute of Technology, Atlanta, GA · IIT Madras · Department of Electrical Engineering, IIT Madras, Chennai, India

Abstract

Language model (LM) alignment broadly aims to perturb a given LM QQ into an aligned LM qq such that i) the outputs produced by qq and QQ are 'close' in probability, ii) qq has a higher expected reward than QQ. Two common techniques for LM alignment are: KL-constrained RL, which requires knowledge of the LM distribution and is computationally expensive, and the best-of-nn algorithm, which requires only sampling from the LM. The work of Yang et al. established asymptotic closeness between the distributions produced by the two alignment methods for an mm--length i.i.d. token sequence output by the LM, in the limit as mm increases to infinity. However, the i.i.d. assumption is not representative of practical LMs, whose output sequences often have memory. In this paper, we extend the asymptotic closeness result to the case when the mm--length token sequence outputted by the LM is Markovian. Further, for finite-length output sequences -- particularly, when m=1m=1 -- we provide a complete characterization of LM distributions and reward functions for which the KL-divergence between the distributions produced by the two alignment methods is zero -- a question first posed in Yang et al.

Figures & tables

Explore similar work

May 8, 2026cs.LG

Theoretical Limits of Language Model Alignment

Language model (LM) alignment improves model outputs to reflect human preferences while preserving the capabilities of the base model. The most common alignment approaches are (i) reinforcement learning, which maximizes the expected reward under a KL-divergence constraint, and (ii) best-of-NN alignment, which selects the highest-reward output among NN independent samples. Despite their widespread use, the fundamental limits of reward improvement under a KL budget remain poorly understood. We characterize the information-theoretic limits of KL-regularized alignment by deriving the maximum achievable expected reward gain for a fixed KL-divergence budget. Our first result provides a closed-form expression for the optimal reward improvement, governed by a Jeffreys divergence term rather than the KL\sqrt{\texttt{KL}} used in prior analyses. We further reformulate this expression as a covariance under the base model, yielding a practical estimator that predicts achievable alignment gains from base model samples alone. We extend our analysis to the proxy reward setting, showing that the gap between ideal and proxy alignment (reward hacking) grows with the magnitude of reward error and when the KL penalty factor decreases. We then prove that reward ensembling mitigates reward hacking, providing a theoretical justification for this technique used in practice. Empirically, we compute the KL-reward Pareto frontier for two tasks for LMs, safety and summarization, and show that best-of-NN closely approaches the theoretical limit, while PPO and GRPO remain substantially suboptimal. Our theoretical results shed light on several empirically observed phenomena in the alignment literature and suggest that algorithmic improvements are needed to achieve optimal alignment without high inference costs.
Jan 13, 2026cs.LG

Asymptotic Universal Alignment: A New Alignment Framework via Test-Time Scaling

Aligning large language models (LLMs) to serve users with heterogeneous and potentially conflicting preferences is a central challenge for personalized and trustworthy AI. We formalize an ideal notion of universal alignment through test-time scaling: for each prompt, the model produces k≥1k\ge 1 candidate responses and a user selects their preferred one. We introduce (k,f(k))(k,f(k))-robust alignment, which requires the kk-output model to have win rate f(k)f(k) against any other single-output model, and asymptotic universal alignment (U-alignment), which requires f(k)→1f(k)\to 1 as k→∞k\to\infty. Our main result characterizes the optimal convergence rate: there exists a family of single-output policies whose kk-sample product policies achieve U-alignment at rate f(k)=kk+1f(k)=\frac{k}{k+1}, and no method can achieve a faster rate in general. We show that popular post-training methods, including Nash learning from human feedback (NLHF), can fundamentally underutilize the benefits of test-time scaling. Even though NLHF is optimal for k=1k=1, sampling from the resulting (often deterministic) policy cannot guarantee win rates above 12\tfrac{1}{2} except for an arbitrarily small slack. This stems from a lack of output diversity: existing alignment methods can collapse to a single majority-preferred response, making additional samples redundant. In contrast, our approach preserves output diversity and achieves the optimal test-time scaling rate. In particular, we propose a family of symmetric multi-player alignment games and prove that any symmetric Nash equilibrium policy of the (k+1)(k+1)-player alignment game achieves the optimal (k,kk+1)(k,\frac{k}{k+1})-robust alignment. Finally, we provide theoretical convergence guarantees for self-play learning dynamics in these games and extend the framework to opponents that also generate multiple responses.
Sep 28, 2026cs.LG

Don't Forget! Decomposing the Training Dynamics of Memorization in Language Models

Memorization has been proposed as a mechanism to explain how language models fit the tail of their training distributions, but its training dynamics are not understood well. In this work, we take a fine-grained look at memorization by decomposing the loss trajectory of memorized sequences over training and model parameters. Across the Pythia family, we study memorization of duplicated training sequences (recitation) and rare ones (recollection). We find that memorization in both cases is characterized by sequence-level gradient alignment, though recitation suffers from misalignment with other training influences which causes forgetting, explaining the necessity for higher duplication of these examples. We further show that the lower model layers are the most involved in memorization and forgetting. Predicting memorization, our decomposition improves over a cross-entropy baseline, especially in larger models and early in training. Intervening on a small set of highly influential parameters we are able to ablate memorization in the final model. Together, these findings advance our understanding of how memorization develops during training and offer insights for predicting and intervening on it.