
Reproduction code for a controlled study of membership-inference attacks on OLMo 2, covering document insertion, mid-training, post-training, scoring and analysis.
This repository contains the code for the paper
From Training Exposure to Membership Evidence: A Controlled Study of OLMo 2
Ali Banaei, Muhammad Shahab Shahzad, Gerald Q. Maguire Jr., Marco Chiesa, Dejan Kostić
KTH Royal Institute of Technology. arXiv preprint (to appear).
We re-ran the official 50-billion-token mid-training stage of OLMo 2 1B with a set of documents inserted into the training stream, chosen at random from matched pairs. AI2's released run of the same stage serves as the control. The two runs read the same training data in the same order, except at the positions where we inserted documents. Both models were then put through AI2's post-training recipe. Every document was scored under both models at every stage, so we can measure how much training on one document changes the model, and how much of that change membership-inference attacks can detect.
Membership inference asks whether a given document was part of a model's training data. This matters for copyright and data provenance, for training-data transparency and for benchmark contamination. Most evaluations of membership-inference attacks on language models collect members and non-members after the fact, for example documents published before and after a training cutoff. The two groups then differ in topic, style and date as well as in membership. An attack can succeed by detecting this distribution shift. When an attack fails, that does not show that training left no trace.
To separate these explanations, we need a setting in which membership is known, is assigned independently of every document property, and leaves the rest of training unchanged. The paper asks: when a real document is included once in an established training recipe, how much does the model change, and how much of that change can existing attacks use?
AI2's released stage-1 checkpoint (4T tokens)
|
+--------------------------+---------------------------+
| |
AI2's released seed-42 run our re-run of the same stage:
of the 50B-token stage same start, data and order;
(23,852 updates) 24,081 of 12,212,224 chunks replaced
| by copies of inserted documents
v v
control treated model
| |
v v
SFT -> DPO -> RLVR stage 1 -> RLVR stage 2 (same data, order and seeds for both)
Unless stated otherwise, the numbers below are for the 4,832 pairs of documents verified unseen and inserted once, measured against the control. The paper gives confidence intervals and further caveats.