{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/tadam-task-dependent-adaptive-metric-for","title":"TADAM: Task dependent adaptive metric for improved few-shot learning","arxiv_id":"1805.10123","date":"2018-05-23","proceeding":"NeurIPS 2018 12","authors":["Boris N. Oreshkin","Pau Rodriguez","Alexandre Lacoste"],"abstract":"Few-shot learning has become essential for producing models that generalize\nfrom few examples. In this work, we identify that metric scaling and metric\ntask conditioning are important to improve the performance of few-shot\nalgorithms. Our analysis reveals that simple metric scaling completely changes\nthe nature of few-shot algorithm parameter updates. Metric scaling provides\nimprovements up to 14% in accuracy for certain metrics on the mini-Imagenet\n5-way 5-shot classification task. We further propose a simple and effective way\nof conditioning a learner on the task sample set, resulting in learning a\ntask-dependent metric space. Moreover, we propose and empirically test a\npractical end-to-end optimization procedure based on auxiliary task co-training\nto learn a task-dependent metric space. The resulting few-shot learning model\nbased on the task-dependent scaled metric achieves state of the art on\nmini-Imagenet. We confirm these results on another few-shot dataset that we\nintroduce in this paper based on CIFAR100. Our code is publicly available at\nhttps://github.com/ElementAI/TADAM.","url_abs":"http://arxiv.org/abs/1805.10123v4","url_pdf":"http://arxiv.org/pdf/1805.10123v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"tadam-task-dependent-adaptive-metric-for","repo_url":"https://github.com/ElementAI/TADAM","is_official":0,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"tf","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"tadam-task-dependent-adaptive-metric-for","repo_url":"https://github.com/keonlee9420/Daft-Exprt","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"tadam-task-dependent-adaptive-metric-for","repo_url":"https://github.com/yaoyao-liu/mini-imagenet-tools","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"few-shot-image-classification","task_name":"Few-Shot Image Classification"},{"task_slug":"few-shot-learning","task_name":"Few-Shot Learning"}],"methods":[],"datasets_introduced":[{"slug":"fc100","name":"FC100","full_name":"Fewshot-CIFAR100"}],"methods_introduced":[],"results":[{"leaderboard":"/sota/few-shot-image-classification-on-fc100-5-way","task":"Few-Shot Image Classification","dataset":"FC100 5-way (1-shot)","model":"TADAM","rank_in_archive_order":22,"of":22,"metrics":{"Accuracy":"40.1"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-fc100-5-way-1","task":"Few-Shot Image Classification","dataset":"FC100 5-way (5-shot)","model":"TADAM","rank_in_archive_order":22,"of":22,"metrics":{"Accuracy":"56.1"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-mini-2","task":"Few-Shot Image Classification","dataset":"Mini-Imagenet 5-way (1-shot)","model":"TADAM","rank_in_archive_order":78,"of":105,"metrics":{"Accuracy":"58.5"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-mini-4","task":"Few-Shot Image Classification","dataset":"Mini-Imagenet 5-way (10-shot)","model":"TADAM","rank_in_archive_order":3,"of":5,"metrics":{"Accuracy":"80.8"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-mini-3","task":"Few-Shot Image Classification","dataset":"Mini-Imagenet 5-way (5-shot)","model":"TADAM","rank_in_archive_order":65,"of":95,"metrics":{"Accuracy":"76.7"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/1805.10123","atlas_url":"https://app.syntology.ai/?focus=1805.10123","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1805.10123"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ElementAI/TADAM","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/keonlee9420/Daft-Exprt","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yaoyao-liu/mini-imagenet-tools","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":5,"unverified":4},"by_repo_kind":{"named_in_paper":{"samples":9,"ran":5,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"cbbf64827d3199c5","entry":"find_variables","repo":"ElementAI/TADAM","repo_kind":"named_in_paper","path":"common/gen_experiments.py","file_url":"https://github.com/ElementAI/TADAM/blob/HEAD/common/gen_experiments.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cbbf64827d3199c5"}},{"code_sha256_prefix":"e6d118defb0d5895","entry":"load_and_save_params","repo":"ElementAI/TADAM","repo_kind":"named_in_paper","path":"common/gen_experiments.py","file_url":"https://github.com/ElementAI/TADAM/blob/HEAD/common/gen_experiments.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e6d118defb0d5895"}},{"code_sha256_prefix":"fbc88036d44ff13c","entry":"make_experiment_name","repo":"ElementAI/TADAM","repo_kind":"named_in_paper","path":"common/gen_experiments.py","file_url":"https://github.com/ElementAI/TADAM/blob/HEAD/common/gen_experiments.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fbc88036d44ff13c"}},{"code_sha256_prefix":"d98246181e886b12","entry":"make_task","repo":"ElementAI/TADAM","repo_kind":"named_in_paper","path":"datasets/data.py","file_url":"https://github.com/ElementAI/TADAM/blob/HEAD/datasets/data.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d98246181e886b12"}},{"code_sha256_prefix":"48280b7cf494bec4","entry":"variables_by_name","repo":"ElementAI/TADAM","repo_kind":"named_in_paper","path":"common/util.py","file_url":"https://github.com/ElementAI/TADAM/blob/HEAD/common/util.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"48280b7cf494bec4"}},{"code_sha256_prefix":"4109ef235133a0b8","entry":"get_image_size","repo":"ElementAI/TADAM","repo_kind":"named_in_paper","path":"model/tadam.py","file_url":"https://github.com/ElementAI/TADAM/blob/HEAD/model/tadam.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4109ef235133a0b8"}},{"code_sha256_prefix":"c6ffd4890568d5b5","entry":"get_logdir_name","repo":"ElementAI/TADAM","repo_kind":"named_in_paper","path":"model/tadam.py","file_url":"https://github.com/ElementAI/TADAM/blob/HEAD/model/tadam.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c6ffd4890568d5b5"}},{"code_sha256_prefix":"1618d44f2e0a214e","entry":"unique_variable_by_name","repo":"ElementAI/TADAM","repo_kind":"named_in_paper","path":"common/util.py","file_url":"https://github.com/ElementAI/TADAM/blob/HEAD/common/util.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1618d44f2e0a214e"}},{"code_sha256_prefix":"7d1301d4ad8cb6c4","entry":"variable_report","repo":"ElementAI/TADAM","repo_kind":"named_in_paper","path":"common/util.py","file_url":"https://github.com/ElementAI/TADAM/blob/HEAD/common/util.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7d1301d4ad8cb6c4"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}