--- license: cc-by-sa-4.0 tags: [interpretability, agop, pythia] --- # agop: AGOP matrices of Pythia-410M and Pythia-1B over pretraining The average gradient outer products (AGOP) of the NeurIPS 2026 paper *Geometrically Disentangling Concept Learning from the Language Modeling Loss* (Wang, Mallinar, Belkin, Warstadt), used for every Optimization Engagement in the paper. Code: https://github.com/YpLarryWang/concept-energy. They are part of the [disentangle-concept-learning](https://huggingface.co/disentangle-concept-learning) release, which also holds one dataset of probes for each of the paper's 12 tasks (`cls-*`, `reg-*`). ## Language models [Pythia-410M](https://huggingface.co/EleutherAI/pythia-410m) (24 layers, hidden size 1024) and [Pythia-1B](https://huggingface.co/EleutherAI/pythia-1b) (16 layers, hidden size 2048), at 19 checkpoints: steps 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1000, 2000, 4000, 8000, 16000, 32000, 64000, 128000 and 143000. Layer L is the output of transformer block L, before the final layer norm. Layers are numbered from 0 (0-23 for Pythia-410M, 0-15 for Pythia-1B); the paper's figures number them from 1, so layer 8 here is layer 9 there. ## Definition For each layer, with \\(\ell_s\\) the next-token cross-entropy at a sampled position \\(s\\) and \\(h_s\\) the layer's output at that position, $$G = \frac{1}{N} \sum_{s=1}^{N} g_s g_s^\top, \qquad g_s = \frac{\partial \ell_s}{\partial h_s}.$$ All \\(N\\) positions have equal weight, and \\(G\\) is symmetrized. ## Data 1,000 lines of WikiText-103 (`wikitext-103-v1`), drawn with `random.Random(42)` from the lines with at least 4 tokens, at least 2 of them with a letter, and no URL. Each line is truncated to 128 tokens, and up to eight positions per line (fewer in lines shorter than 9 tokens) are drawn with `np.random.RandomState(42)`. This gives \\(N = 7765\\) positions, the same for every checkpoint and layer. ## Hyperparameters Lines are processed in batches of 4 (Pythia-1B; Pythia-410M layers 0-22) or 8 (Pythia-410M layer 23; Pythia-410M layers 0-22 at step 128000), with right padding. ## Precision All matrices are stored in float64. In the paper's experiments, they were computed at the following precisions: - Pythia-410M layers 0-22: float32 model, except step 128000 (float16 model, as below); - Pythia-410M layer 23 and Pythia-1B: float16 model, with the cross-entropy on float32 logits, outer products in float32 and the sum in float64. `PROVENANCE.json` lists the precision, batch size and the SHA-256 of the original file of every matrix. The code in the GitHub repository computes the AGOP in float32. ## Files ``` pythia-410m/step.safetensors layer0 ... layer23: float64 [1024, 1024] pythia-1b/step.safetensors layer0 ... layer15: float64 [2048, 2048] PROVENANCE.json SHA256SUMS ``` The metadata of each file gives the format version (`schema`). ## Usage ```python from huggingface_hub import hf_hub_download from safetensors.numpy import load_file agop = load_file(hf_hub_download('disentangle-concept-learning/agop', 'pythia-1b/step143000.safetensors', repo_type='dataset')) G = agop['layer15'] # float64 [2048, 2048] ``` The probe repos of the same organization (`cls-*`, `reg-*`) show how to compute a probe's Optimization Engagement with it. ## License and attribution Computed from [WikiText-103](https://huggingface.co/datasets/Salesforce/wikitext) (text from Wikipedia, CC BY-SA 3.0) with the [Pythia](https://github.com/EleutherAI/pythia) models (Apache-2.0). We release the matrices under CC BY-SA 4.0. Please cite: ```bibtex @inproceedings{wang2026geometrically, title = {Geometrically Disentangling Concept Learning from the Language Modeling Loss}, author = {Wang, Yupei and Mallinar, Neil and Belkin, Mikhail and Warstadt, Alex}, booktitle = {Advances in Neural Information Processing Systems}, year = {2026} } ```