Command Palette
Search for a command to run...
암기 프로파일의 인과적 추정
암기 프로파일의 인과적 추정
Pietro Lesci Clara Meister Thomas Hofmann Andreas Vlachos Tiago Pimentel
초록
언어 모델의 암기 현상에 대한 이해는 학습 동역학 연구나 저작권 침해 방지 등 실용적 및 사회적 파급효과를 지닌다. 선행 연구에서는 암기를 특정 인스턴스로의 학습이 해당 인스턴스에 대한 모델의 예측 능력에 미치는 인과 효과로 정의한다. 이 정의는 반사실적(counterfactual) 개념, 즉 모델이 해당 인스턴스를 보지 않았더라면 어떻게 되었을지를 관측할 수 있어야 한다는 전제에 의존한다. 기존 방법들은 이 반사실적 양을 계산적으로 효율적이고 정확하게 추정하는 데 어려움을 겪을 뿐 아니라, 특정 모델 인스턴스가 아닌 모델 구조 전반에 대한 암기를 추정하는 경우가 많았다. 본 논문은 계량경제학의 이중차분 설계에 기반하여 암기를 추정하는 새로우면서 원리적이고 효율적인 방법을 제안함으로써 문헌의 중요한 공백을 채운다. 이 방법을 활용하면 학습 기간 동안 소수의 인스턴스에 대한 모델의 행동만을 관측하여 모델의 암기 프로파일, 즉 학습 전반에 걸친 암기 경향을 특성화할 수 있다. Pythia 모델 군을 대상으로 한 실험에서, (i) 암기는 더 큰 모델에서 더 강하고 지속적이며, (ii) 데이터 순서와 학습률에 의해 결정되고, (iii) 모델 크기 전반에 걸쳐 안정적인 경향을 보여 더 큰 모델의 암기를 작은 모델로부터 예측할 수 있음을 발견하였다.
One-sentence Summary
University of Cambridge and ETH Zürich propose a difference-in-differences method from econometrics that efficiently estimates per-instance memorisation profiles in language models by observing a small set of instances throughout training, with experiments on the Pythia suite revealing that memorisation is stronger in larger models, governed by data order and learning rate, and predictable across model sizes.
Key Contributions
-
An unbiased and computationally efficient estimator for instance-level counterfactual memorisation is developed using a difference-in-differences design from econometrics, estimating how including a training instance changes a specific model's ability to predict that instance.
-
A method for characterising a model's memorisation profile across training is proposed by observing a small set of instances throughout training, separating checkpoint timing, data order, and learning rate effects from architecture-level averages.
-
Experiments with the Pythia model suite show that memorisation is stronger and more persistent in larger models, determined by data order and learning rate, and stable across model sizes, making memorisation in larger models predictable from smaller ones.
Introduction
Large language models are trained on web-scale corpora, yet they can reproduce training sequences verbatim, which matters for copyright, privacy, factual understanding, and training dynamics. Prior work defines memorisation causally, but measuring it is difficult because the counterfactual outcome, a model’s performance without training on an instance, is unobservable. Earlier estimates either require multiple training runs and therefore describe model architectures rather than specific models, or assume the counterfactual is negligible and may conflate memorisation with ordinary predictability. The authors leverage potential outcomes and econometrics to formalise counterfactual memorisation and propose an observational estimator based on training checkpoints and loglikelihood measurements. This yields memorisation profiles across training and shows that larger models memorise more persistently, learning rate and data position matter, and profiles are stable enough to predict memorisation in larger models from smaller ones.
Method
The authors leverage a causal framework to characterize when a language model memorizes training examples. Each example x is treated at a specific timestep g=G(x) when it is first used for training. Let Yc(x;g) denote the model performance on x at checkpoint c under the condition that x was included in training at timestep g. The counterfactual outcome Yc(x;∞) represents the hypothetical performance on the same example if it had never been used for training. Under this framing, counterfactual memorization is defined as the causal effect of having trained on an example at timestep g on its later evaluation at timestep c:
τx,c=Yc(x;g)−Yc(x;∞).Because individual counterfactual outcomes cannot be observed, the method focuses on an average treatment effect over all examples treated at timestep g:
τg,c=xE[Yc(x;g)−Yc(x;∞)∣G(x)=g].The collection of values τg,c across treatment timesteps g and checkpoint timesteps c forms a memorization profile. Each row of this profile represents the memorization path for a batch of examples introduced at timestep g. There is no memorization for checkpoints before exposure, so τg,c=0 when c<g. The effect is called instantaneous memorization when c=g, persistent memorization when c>g, and residual memorization when c=T.
For estimation, the authors first observe the factual outcome for examples in the training batch Bg. They define the batch-average observed performance at checkpoint c as:
Yc(g)=∣Bg∣1x∈Bg∑Yc(x).The first term in the causal estimand can be directly estimated with this quantity. The second term,
xE[Yc(x;∞)∣G(x)=g],is counterfactual because examples in Bg were in fact used for training. To address this issue, the authors derive two estimators that replace the unobserved counterfactual with observable proxy outcomes.
The first is the difference estimator. Under the assumption that training and validation examples are independently and identically distributed and that examples are randomly assigned to batches or validation sets, the expected performance on untreated validation examples approximates the expected counterfactual performance of treated examples. The corresponding estimator is:
τg,cdiff=Yc(g)−Yc(∞),where B∞ denotes a held-out validation set. This estimator uses only observed outcomes at checkpoint c. It compares the average performance of a trained batch with the average performance of untrained validation examples. The method requires strong distributional matching between training and validation sets, and its variance can remain high because the batch mean Yc(g) is restricted to examples in Bg.
The main estimation procedure uses a difference-in-differences design. This approach uses the time dimension to identify the treatment effect by comparing how performance changes over checkpoints for treated examples and untreated examples. It relies on parallel trends and no anticipation. Parallel trends means that, in the absence of training, the expected change in performance across checkpoints would be the same for treated and untreated examples:
xE[Yc(x;∞)−Yc′(x;∞)∣G(x)=g]=xE[Yc(x;∞)−Yc′(x;∞)∣G(x)=∞].No anticipation means that training at timestep g cannot affect performance at any checkpoint c<g:
xE[Yc(x;g)∣G(x)=g]=xE[Yc(x;∞)∣G(x)=g].Under these conditions, the target causal estimand can be rewritten using observable panel outcomes. The difference-in-differences estimand is:
τg,cdid=xE[Yc(x;g)−Yg−1(x;g)∣G(x)=g]−xE[Yc(x;∞)−Yg−1(x;∞)∣G(x)=∞].In practice, the authors evaluate model performance for a subset of training batches and validation examples at the checkpoint immediately before treatment, g−1, and at a later checkpoint c. This creates a panel of observed outcomes, analogous to repeated measurements in causal inference. The difference-in-differences estimator is computed as:
τg,cdid=change for trained batch(Yc(g)−Yg−1(g))−change for validation set(Yc(∞)−Yg−1(∞)).This workflow uses only observed outcomes from a model checkpoint sequence. For each batch Bg, the method measures how much the model’s performance on that batch changes after the batch becomes available for training, while subtracting the background change observed on examples that remain untrained. This difference controls for general improvements that happen over time across the model, rather than improvements caused by exposure to specific training batches.
The authors also describe influence functions as an alternative instance-level approximation for estimating counterfactual memorization at the final checkpoint. Influence functions estimate how parameters would change if an example were removed from the training set, without retraining:
θ−x,T≈θT+N1Hθ−1∇θL(θT,x),where Hθ is the Hessian of the training loss evaluated at θT. The estimated counterfactual performance is obtained by evaluating the example using the adjusted parameters:
Y−x,T(x)=γ(θ−x,T;x).The corresponding influence-function memorization estimate is:
τx,Tinfl=YT(x)−Y−x,T(x).This approach avoids repeated retraining and provides an instance-level estimate, but it depends on convexity, positive definiteness of the Hessian, and convergence assumptions that are generally weak for large language models. It also applies only at the final checkpoint, so it cannot characterize memorization dynamics across intermediate checkpoints.
Experiment
The experiments evaluate memorisation in Pythia language models ranging from 70M to 12B parameters using a subsampled panel of training instances measured across checkpoints with sequence-level log-likelihood. They find that instantaneous memorisation is stronger early in training and increases with model size, while persistent memorisation is weak or absent in small models and tends to plateau after a fixed number of steps. Residual memorisation is often statistically insignificant, though a recency effect appears near the end of training, and overall memorisation patterns across model sizes are broadly predictable.