--- license: apache-2.0 tags: - training-data-attribution - influence-functions - interpretability --- # Retrain bank: WikiText-2 / GPT-2, random halves, seed 1008 **This repository contains 100 fully retrained language models**, not just scores. Each model is GPT-2 (`gpt2`) fine-tuned on a different random **50% (2,328 documents)** of the 4,656-document WikiText-2 training set from [`EleutherAI/bergson-wikitext-2-4656-chunks`](https://huggingface.co/datasets/EleutherAI/bergson-wikitext-2-4656-chunks), following the recipe of Bae et al. 2024, *Training Data Attribution via Approximate Unrolled Differentiation* (App. B.1). `retrained/base` is trained on the full set with the same seed. Five banks share the same 100 subsets (`subsets.json`) and differ only in training seed: [1004](https://huggingface.co/datasets/EleutherAI/LDS-retrain-bank-adamw-wikitext2-N4656-bs8-seed1004), [1005](https://huggingface.co/datasets/EleutherAI/LDS-retrain-bank-adamw-wikitext2-N4656-bs8-seed1005), [1006](https://huggingface.co/datasets/EleutherAI/LDS-retrain-bank-adamw-wikitext2-N4656-bs8-seed1006), [1007](https://huggingface.co/datasets/EleutherAI/LDS-retrain-bank-adamw-wikitext2-N4656-bs8-seed1007), [1008](https://huggingface.co/datasets/EleutherAI/LDS-retrain-bank-adamw-wikitext2-N4656-bs8-seed1008). Averaging query losses over the five seeds gives the ground truth used in the bergson replication. ## What is here | path | what it is | |---|---| | `retrained/base/` | the model fine-tuned on the full training set | | `retrained/subset_*/` | 100 models, each trained on a different random half | | `validation.csv` | **the ground truth**: per (subset, query) change in loss for the 481 validation queries, plus the EK-FAC influence sum over the removed documents | | `subsets.json` | which document ids each subset removed | | `config.yaml` | the exact training configuration | | `summary*.csv` | per-query EK-FAC LDS | ## Using it ```python from huggingface_hub import snapshot_download import pandas as pd path = snapshot_download("EleutherAI/LDS-retrain-bank-adamw-wikitext2-N4656-bs8-seed1008", repo_type="dataset") # ground truth: what training on each half did to each query's loss truth = pd.read_csv(f"{path}/validation.csv") # score your own method, then correlate its predicted influence against `diff` # LDS = mean over queries of Spearman(predicted subset sums, measured diff) ``` The directory also drops straight into a bergson `validate` step as `retrained_dir`. ## Measured on the five-seed ground truth | method | LDS (mean Spearman over 481 queries, 95% CI) | |---|---| | EK-FAC IF | 0.468 ± 0.015 | | SOURCE | 0.476 ± 0.015 | Scores were computed on the fine-tuning run in [`EleutherAI/bergson-wikitext-2-gpt2`](https://huggingface.co/EleutherAI/bergson-wikitext-2-gpt2). ## Provenance - optimizer `adamw` (β=(0.9, 0.999), ε=1e-8), lr `3e-5` constant, weight decay `0.01`, batch size `8`, `3` epochs, fp32, dropout on, seed `1008` - corpus: WikiText-2, 4,656 training documents; 481 validation queries Produced by [bergson](https://github.com/EleutherAI/bergson) (`examples/replicate_bae_approx_unrolling_source/wikitext_gpt2_retrain.yaml`).