Command Palette
Search for a command to run...
언어 모델은 정렬에 저항한다: 데이터 압축으로부터의 증거
언어 모델은 정렬에 저항한다: 데이터 압축으로부터의 증거
Jiaming Ji Kaile Wang Tianyi Qiu Boyuan Chen Jiayi Zhou Changye Li Hantao Lou Juntao Dai Yunhuai Liu Yaodong Yang
초록
대형 언어 모델(LLM)은 의도하지 않았거나 바람직하지 않은 행동을 보일 수 있습니다. 최근 연구들은 유해한 출력 완화를 위해 LLM을 정렬(aligning)하는 데 집중해 왔습니다. 이러한 노력에도 불구하고, 일부 이상 현상은 의도적이든 우발적이든 잘 수행된 정렬 과정조차 쉽게 우회될 수 있음을 시사합니다. 정렬 미세 조정(fine-tuning)은 모델에 견고한 효과를 미치는가, 아니면 그 영향이 단순히 표면적인가? 본 연구에서는 이론적 및 경험적 관점에서 이 현상에 대한 최초의 탐구를 수행합니다. 경험적으로, 우리는 포스트 정렬(post-alignment) 모델의 탄력성(elasticity), 즉 추가 미세 조정 시 사전 학습 단계에서 형성된 행동 분포로 되돌아가려는 경향을 입증합니다. 압축 이론(compression theory)을 활용하여, 미세 조정이 사전 학습에 비해 정렬을 잠재적으로 몇 자릿수(order of magnitude) 이상 불균형적으로 훼손한다는 것을 공식적으로 추론합니다. 다양한 유형과 규모의 모델에 대한 실험을 통해 탄력성의 존재를 검증합니다. 구체적으로, 모델 성능이 사전 학습 분포로 되돌아가기 전에 급격히 저하되며, 그 이후 저하 속도가 현저히 감소함을 발견했습니다. 또한, 탄력성이 모델 크기의 증가와 사전 학습 데이터의 확장에 따라 양의 상관관계를 보인다는 사실을 추가로 규명했습니다. 우리의 발견은 LLM의 정렬 저항성을 완화하기 위해 LLM의 본질적인 탄력성을 해결해야 할 필요성을 강조합니다.
One-sentence Summary
Researchers from the Institute for Artificial Intelligence, Peking University reveal the elasticity of post-alignment LLMs, demonstrating via compression theory that fine-tuning disproportionately undermines alignment relative to pretraining, and that elasticity correlates positively with model size and pretraining data scale.
Key Contributions
- The paper identifies elasticity in post-alignment LLMs, where further fine-tuning can cause behavior distributions formed during pretraining to reappear. This supports an alignment resistance mechanism that can reverse or diminish alignment.
- Using a compression-theoretic account of training and alignment, the work shows that changes in normalized compression rate under fine-tuning perturbations are inversely related to dataset size, so models tend to retain larger pretraining distributions and forget smaller alignment distributions.
- Experiments on LLMs of varying types and scales show rapid performance decline followed by reversion toward the pretraining distribution, with elasticity strengthening as model size and pre-training data volume increase.
Introduction
Large language models are widely deployed because they can generate fluent, general purpose text, but their ability to stay aligned with human intent and safety requirements is critical for real world use. In practice, models must balance broad utility with robust safety, making reliable alignment a core system design challenge.
Prior work has mainly relied on training based alignment methods such as supervised fine-tuning, reinforcement learning with human feedback, and related variants. Although these approaches reduce harmful behavior, they often appear superficial. Highly aligned models can quickly become unsafe after only light fine-tuning, and even benign task fine-tuning can weaken safety mechanisms. Existing analyses point to fragile alignment, but the underlying mechanism has remained unclear.
The authors identify elasticity as a key mechanism behind alignment fragility. They argue that language models resist changes to distributions learned from large pretraining datasets, while changes induced by smaller datasets can rebound more easily. Using compression theory, they model training and alignment as processes affecting the model’s normalized compression rate, showing that alignment perturbations may be reversed or undone through inverse fine-tuning. Their contribution is a theoretical and empirical account of why alignment is inherently unstable: pretraining distributions persist, stronger alignment can rebound faster, and model changes scale inversely with dataset size, making current alignment methods prone to erosion under small perturbations.
Method
The authors leverage the equivalence between predictive modeling and lossless compression to recast the training, alignment, and perturbation behavior of language models as a compression process over multiple data distributions. The proposed framework does not introduce a new network architecture; instead, it reframes the existing training pipeline as a sequence of compression events in which the language model parameters θ act as a compression protocol. Pretraining establishes a broad base distribution, supervised fine tuning shifts that distribution toward an alignment target, and subsequent perturbations, such as reverse fine tuning, reveal whether the model can be driven back toward an earlier distribution. By measuring how efficiently the model compresses each relevant dataset, the method turns alignment resistance into an information theoretic quantity.
The starting point is the standard training objective for a language model. During pretraining, the model learns to predict tokens in long text sequences. For a prefix x=(x0,…,xN−1) from the pretraining corpus DPT, the loss is
LPT(θ;DPT)=−E(x,xN)∼DPT[logpθ(xN∣x)].For supervised fine tuning, the model is trained on pairs (x,y) drawn from a high quality alignment distribution DSFT, with objective
LSFT(θ;DSFT)=−E(x,y)∼DSFT[logpθ(y∣x)].When the target distribution is fixed, minimizing this negative log likelihood loss is equivalent to minimizing the KL divergence between pθ and the desired SFT distribution. The compression view connects this directly to coding theory. If a model pθ is used inside arithmetic coding, the expected code length of a sequence x=(x0,…,xm−1) is
L=Ex∼D[0≤k≤m∑−log2pθ(xk∣x0,…,k−1)].Thus, minimizing the training loss corresponds to minimizing the expected code length. In this formulation, training a language model and compressing its training distribution are treated as equivalent tasks.
To make the compression process explicit for sequential generation, the authors model each dataset as a token tree. For simplicity, the token vocabulary is assumed to contain only binary tokens, such as 0 and 1, along with an end of sequence marker. Each node in the token tree has two child edges labeled 0 and 1, and a leaf path ending with an EOS node represents one response in the dataset. The weight of a leaf node corresponds to the probability of that response, while the weight of an internal node is the sum of the weights of its descendants. Training the language model can then be interpreted as learning weights over portions of this infinite token tree.
Because a real model has finite parameters, it cannot represent the entire infinite token tree exactly. The method introduces the assumption that the model can perfectly model only a finite depth of the tree, and that this depth increases monotonically with model size. Given a parameterized model pθ, the corresponding compression protocol is defined in two steps. First, the token tree for the relevant dataset is pruned, keeping only the top d layers. Second, Huffman coding is applied to the pruned tree, where each complete root to leaf path is treated as a symbol in the coding alphabet. This yields an optimal and lossless compression procedure for the modeled portion of the data distribution.
The ideal expected code length for a response x compressed by the finite model is written as
E[Lpθ(x)]=⌈d∣x∣⌉−l=1∑dj=1∑2l−1pljlogplj,where d is the effective depth retained by the pruning step, and plj denotes the probability assigned to the jth leaf node at depth l under the compressed protocol. When multiple disjoint datasets are trained on jointly, the authors combine their token tree weights according to dataset size. For datasets D1,…,DN, the combined node probability is
pljD=∑i=1N∣Di∣∑i=1NpljDi∣Di∣,where ∣Di∣ is the size of dataset Di. This construction allows the method to assign a compression rate to each individual dataset under the same trained model. The dataset specific compression rate is
γpθDi=Ex∼Pi[∣x∣LpθDi(x)]=Θ−d∑l=1d∑j=12l−1pljDilogpljD.A normalized compression rate is then introduced to compare datasets of different structure and leaf counts. If Ti′ is the pruned tree for dataset Di and M is the number of its leaf nodes, the normalized rate is
γpθDi/D=γpθDi−logM.Smaller normalized compression rates indicate stronger alignment between the model distribution and the target dataset distribution. This metric becomes the central observable for studying whether alignment is stable after perturbation.
The formal inverse alignment definition uses this metric. Suppose a base model pθ0 is aligned on dataset Da to produce pθ1. If applying a much smaller perturbation dataset Db yields a model pθ0′ such that the behavioral or distributional distance satisfies
ρ(pθ0′,pθ0)≤ϵ,then the transition from pθ1 back toward pθ0′ is called inverse alignment. In the compression framework, ρ is instantiated by the compression rate, so alignment reversal can be analyzed by tracking changes in γpθDi/D rather than relying only on behavioral benchmarks.
The core analytical pipeline separates three data roles: Dp for pretraining, Da for alignment, and Dt for perturbation. The method assumes that alignment and perturbation distributions can be viewed as subsets or reweighted versions of the broader pretraining data distribution. Under a Pareto type mass distribution assumption, the authors derive an inverse proportionality law between changes in normalized compression rate and dataset size. With
l=∣Da∣∣Dt∣≪1,k=∣Da∣∣Dp∣≫1,the result is
dldγpθDa/D=Θ(−kdldγpθDp/D),with
dldγpθDp/D<0,dldγpθDa/D>0.This means that as perturbation data is added, the model becomes more compressible on the larger pretraining distribution and less compressible on the smaller alignment distribution. The method interprets this as a bias toward large data volume: the model behaves as if resources in the compression protocol are preferentially allocated to the larger distribution. This asymmetry explains why alignment can be shallow and why small perturbations can erase it.
The method then maps this behavior onto a physical invariant analogous to Hooke’s law. In a series spring system with spring constants k1 and k2, an external force produces deformations Δl1 and Δl2 such that
F∝k1Δl1=k2Δl2.In the language model setting, dataset size ∣Di∣ plays the role of spring stiffness, while the change in KL divergence
ΔDKL(Ppθ∥PDi)plays the role of deformation. The resulting elastic quantity satisfies
F∝∣Di∣ΔDKL(Ppθ∥PDi).As shown in the figure below:
Under this formulation, pretraining distribution PD1, alignment distribution PD2, and final model distribution Ppθ are all represented through compression rates. The top part expresses the physical analogy, where stiffer components deform less, while the bottom part expresses the model behavior: after perturbation, changes in normalized compression rate are inversely related to dataset volume. The framework therefore represents inverse alignment as the consequence of a distributional preference for large volume data under compression dynamics. Resistance appears when a pretraining distribution remains dominant during alignment, and rebound appears when a fine tuned model shifts back toward that larger original distribution under reverse fine tuning.
Experiment
the paper experimentally evaluate language-model elasticity by comparing forward and inverse alignment on successive SFT slices across several Llama models and datasets, testing rebound after positive-to-negative fine-tuning, and analyzing how rebound varies with model size and pre-training data volume. The results show that inverse alignment is consistently easier than forward alignment, supporting the existence of resistance, while models aligned more strongly on positive data exhibit stronger rebound when exposed to opposing data before stabilizing. Further analyses indicate that rebound becomes more pronounced as model parameter count and pre-training data increase, suggesting greater elasticity in larger, more extensively pre-trained models.
Across the tested base models and datasets, forward alignment consistently produces higher training loss than inverse alignment. This gap appears for all compared stage transitions, indicating that models more easily recover from later-stage responses to earlier-stage responses than the reverse. The pattern suggests that pre-trained models tend to preserve their original distribution and resist alignment updates. Inverse alignment loss is lower than forward alignment loss across Alpaca, TruthfulQA, and safety task settings. The resistance pattern remains consistent across Llama2 and Llama3 models and different slice pair selections.
Experiments compare forward and inverse alignment training losses across multiple Llama2 and Llama3 settings, showing that inverse alignment consistently produces lower loss than forward alignment. This suggests that pre-trained models more easily transition from later-stage responses back to earlier-stage responses than the reverse, reflecting a tendency to preserve their original distribution and resist alignment updates. The pattern remains consistent across Alpaca, TruthfulQA, safety tasks, and different slice pair selections.