Add experiments/mnist VPD family (memorization-vs-generalization study)#890
Draft
lee-goodfire wants to merge 2 commits into
Draft
Add experiments/mnist VPD family (memorization-vs-generalization study)#890lee-goodfire wants to merge 2 commits into
lee-goodfire wants to merge 2 commits into
Conversation
…decomposition glue) New reusable experiment family mirroring resid_mlp for the MNIST memorization-vs-generalization study: - models.py: MnistMLP (fc_in/fc_h.*/fc_out, GELU) + train config + run info - data.py: raw MNIST loader, deterministic label-corruption/subsample builder, infinite memorized-set batch iterator - train_mnist.py: pd-mnist-pretrain CLI (label-noise sweep + size ladder) - run.py: pd-mnist CLI, categorical KL recon path (recon_loss_kl) + run_batch_first_element - register UnmaskedReconLoss as a YAML eval metric (generic kl_unmasked check; CEandKLLosses is LM-only) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ay batch-uniform Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a reusable MNIST MLP experiment family for adVersarial Parameter Decomposition (VPD), mirroring
experiments/resid_mlp, used for the memorization-vs-generalization decomposition study (Silico issue 6).What's added
param_decomp_lab/experiments/mnist/models.py—MnistMLP(namedfc_in/fc_h.*/fc_outLinears, GELU) + train config +MnistTargetRunInfodata.py— raw-tensor MNIST loader, deterministic label-corruption/subsample builder, full-batch memorized-set iterator (drops the partial final batch so VPD's per-datapoint persistent-PGD adversary stays batch-uniform)train_mnist.py—pd-mnist-pretrainCLI (label-noise sweep + size ladder)run.py—pd-mnistCLI, categorical KL reconstruction path (recon_loss_kl) +run_batch_first_element,SavedMnistRunpd-mnist-pretrain/pd-mnistentry points inparam_decomp_lab/pyproject.tomlUnmaskedReconLossas a YAML eval metric (gives thekl_unmaskedfaithfulness check on categorical, non-LM targets;CEandKLLossesis LM-only)Result (Silico issue 6)
At matched decomposition faithfulness, a pure memorizer decomposes into ~130x more live components (and ~240x more per input) than a generalizer, but the components are distributed/redundant, not per-example (density, ablation, and specimen evidence).
🤖 Generated with Claude Code