Reproducible study of anchored transfer learning under distribution shift. Includes real-data experiments (MNIST→USPS, Adult subgroup shift, Electricity time shift), compatibility metrics, a CLI, and a fully generated LaTeX paper.
- Python 3.9+
- LaTeX + latexmk (TeX Live, MiKTeX, or MacTeX)
git clone https://github.com/noahd0/anchored-transfer.git
cd anchored-transfer
python -m pip install -e ".[dev]"make allOutputs:
results/real.csvpaper/figures/performance_bars.pdfpaper/figures/compatibility_scatter.pdfpaper/tables/summary.texpaper/tables/failure_rates.texpaper/paper.pdf
python scripts/run_real_experiments.py
python scripts/make_figures.py
python scripts/make_tables.py
make -C paperpython -m anchored_transfer.cli --helppython -m anchored_transfer.cli compute-metrics \
--anchor_labels path/to/anchor_labels.npy \
--pred_target path/to/target_predictions.npy \
--pred_transfer path/to/transfer_predictions.npypython -m anchored_transfer.cli run-real \
--output results/real.csvSee python -m anchored_transfer.cli run-real --help for all options.
.
├── code/
│ ├── compute_compatibility.py
│ └── requirements.txt
├── scripts/
│ ├── run_real_experiments.py
│ ├── make_figures.py
│ └── make_tables.py
├── src/
│ └── anchored_transfer/
│ ├── __init__.py
│ ├── cli.py
│ ├── data.py
│ ├── estimators.py
│ ├── experiments.py
│ └── metrics.py
├── tests/
│ ├── conftest.py
│ ├── test_cli.py
│ └── test_metrics.py
├── paper/
│ ├── paper.tex
│ ├── sections/
│ ├── references.bib
│ └── Makefile
├── Makefile
├── pyproject.toml
├── CITATION.cff
└── LICENSE
make test@article{donovan2025anchored,
title={Anchored Transfer with Compatibility Metrics},
author={Donovan, Noah},
journal={arXiv preprint arXiv:XXXX.XXXXX},
year={2025}
}
@software{anchored_transfer2026,
title={Anchored Transfer: Reproducible Research Artifact},
author={Donovan, Noah},
year={2026},
url={https://github.com/noahd0/anchored-transfer}
}MIT License. See LICENSE.
Last Updated: January 2026
Version: 1.0.0