Code implementation for paper Learning to Learn with Contrastive Meta-Objective (NeurIPS 2025 Oral) (https://arxiv.org/abs/2410.05975)
optimization-based/metric-based:
- install learn2learn (https://learn2learn.net/);
- run "ml/mamlc_miniimagenet.py", "ml/fomamlc_miniimagenet.py", "ml/mamlc_tieredimagenet.py", "ml/protonetc_tieredimagenet.py", "ml/reptilec_miniimagenet.py", "ml/reptilec_miniimagenet.py" following the instructions in "README.md" in https://github.com/learnables/learn2learn/tree/master/examples/vision.
amortization-based:
- get public code "simple-cnaps" (https://github.com/peymanbateni/simple-cnaps);
- copy "ml/runc_simple_cnaps_mt.py" to "simple-cnaps/simple-cnaps-src/", and run following the corresponding instructions in "simple-cnaps".
- get public code "in-context-learning" (https://github.com/dtsip/in-context-learning)
- copy "icl/ctrain.py" and "icl/ceval.py" to "in-context-learning/src/", and copy "icl/ceval.py" to "in-context-learning/src/conf/";
- refer to the corresponding instructions in "in-context-learning" and run
python ctrain.py --config conf/ctoy.yamlfor training ConML-ICL, andpython ceval.pyfor testing.