{"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/adapted-deep-embeddings-a-synthesis-of-1","title":"Adapted Deep Embeddings: A Synthesis of Methods for $k$-Shot Inductive Transfer Learning","arxiv_id":"1805.08402","date":"2018-05-22","proceeding":null,"authors":["Tyler R. Scott","Karl Ridgeway","Michael C. Mozer"],"abstract":"The focus in machine learning has branched beyond training classifiers on a\nsingle task to investigating how previously acquired knowledge in a source\ndomain can be leveraged to facilitate learning in a related target domain,\nknown as inductive transfer learning. Three active lines of research have\nindependently explored transfer learning using neural networks. In weight\ntransfer, a model trained on the source domain is used as an initialization\npoint for a network to be trained on the target domain. In deep metric\nlearning, the source domain is used to construct an embedding that captures\nclass structure in both the source and target domains. In few-shot learning,\nthe focus is on generalizing well in the target domain based on a limited\nnumber of labeled examples. We compare state-of-the-art methods from these\nthree paradigms and also explore hybrid adapted-embedding methods that use\nlimited target-domain data to fine tune embeddings constructed from\nsource-domain data. We conduct a systematic comparison of methods in a variety\nof domains, varying the number of labeled instances available in the target\ndomain ($k$), as well as the number of target-domain classes. We reach three\nprincipal conclusions: (1) Deep embeddings are far superior, compared to weight\ntransfer, as a starting point for inter-domain transfer or model re-use (2) Our\nhybrid methods robustly outperform every few-shot learning and every deep\nmetric learning method previously proposed, with a mean error reduction of 34%\nover state-of-the-art. (3) Among loss functions for discovering embeddings, the\nhistogram loss (Ustinova & Lempitsky, 2016) is most robust. We hope our results\nwill motivate a unification of research in weight transfer, deep metric\nlearning, and few-shot learning.","url_abs":"http://arxiv.org/abs/1805.08402v4","url_pdf":"http://arxiv.org/pdf/1805.08402v4.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":"adapted-deep-embeddings-a-synthesis-of-1","repo_url":"https://github.com/tylersco/adapted_deep_embeddings","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"adapted-deep-embeddings-a-synthesis-of-1","repo_url":"https://github.com/garyCC227/thesis","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"few-shot-learning","task_name":"Few-Shot Learning"},{"task_slug":"metric-learning","task_name":"Metric Learning"},{"task_slug":"transfer-learning","task_name":"Transfer Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/1805.08402","atlas_url":"https://app.syntology.ai/?focus=1805.08402","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1805.08402"}},"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/tylersco/adapted_deep_embeddings","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/garyCC227/thesis","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_violates":1,"ran_honours":1,"unverified":13},"by_repo_kind":{"official":{"samples":9,"ran":0,"repositories":1},"listed":{"samples":6,"ran":2,"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":"3b6c6798ddaded17","entry":"find_cos_distances","repo":"garyCC227/thesis","repo_kind":"listed","path":"models/recall_at_kappa.py","file_url":"https://github.com/garyCC227/thesis/blob/HEAD/models/recall_at_kappa.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3b6c6798ddaded17"}},{"code_sha256_prefix":"5ba5211d2daefbb6","entry":"find_l2_distances","repo":"garyCC227/thesis","repo_kind":"listed","path":"models/recall_at_kappa.py","file_url":"https://github.com/garyCC227/thesis/blob/HEAD/models/recall_at_kappa.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5ba5211d2daefbb6"}},{"code_sha256_prefix":"3e5d37390941fbc2","entry":"assign_to_device","repo":"tylersco/adapted_deep_embeddings","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/tylersco/adapted_deep_embeddings/blob/HEAD/models/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3e5d37390941fbc2"}},{"code_sha256_prefix":"17ae2e7840a02242","entry":"classification_batch_evaluation","repo":"tylersco/adapted_deep_embeddings","repo_kind":"official","path":"utils.py","file_url":"https://github.com/tylersco/adapted_deep_embeddings/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"17ae2e7840a02242"}},{"code_sha256_prefix":"398f6908e33d3b75","entry":"create_data","repo":"garyCC227/thesis","repo_kind":"listed","path":"model_train.py","file_url":"https://github.com/garyCC227/thesis/blob/HEAD/model_train.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"398f6908e33d3b75"}},{"code_sha256_prefix":"6c7c29b9b63f64b3","entry":"define_scope","repo":"tylersco/adapted_deep_embeddings","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/tylersco/adapted_deep_embeddings/blob/HEAD/models/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6c7c29b9b63f64b3"}},{"code_sha256_prefix":"4c45b3103c75e41a","entry":"doublewrap","repo":"tylersco/adapted_deep_embeddings","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/tylersco/adapted_deep_embeddings/blob/HEAD/models/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4c45b3103c75e41a"}},{"code_sha256_prefix":"dcfad983fc978ae3","entry":"getDistributionDensity","repo":"tylersco/adapted_deep_embeddings","repo_kind":"official","path":"losses/histogram_loss.py","file_url":"https://github.com/tylersco/adapted_deep_embeddings/blob/HEAD/losses/histogram_loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dcfad983fc978ae3"}},{"code_sha256_prefix":"feb366896425e713","entry":"get_preds","repo":"garyCC227/thesis","repo_kind":"listed","path":"dense.py","file_url":"https://github.com/garyCC227/thesis/blob/HEAD/dense.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"feb366896425e713"}},{"code_sha256_prefix":"76bdb14f43eeef26","entry":"hist_loss","repo":"tylersco/adapted_deep_embeddings","repo_kind":"official","path":"losses/histogram_loss.py","file_url":"https://github.com/tylersco/adapted_deep_embeddings/blob/HEAD/losses/histogram_loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"76bdb14f43eeef26"}},{"code_sha256_prefix":"0047b13081c4581e","entry":"hist_loss_batch_eval","repo":"tylersco/adapted_deep_embeddings","repo_kind":"official","path":"utils.py","file_url":"https://github.com/tylersco/adapted_deep_embeddings/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0047b13081c4581e"}},{"code_sha256_prefix":"312ded6bde8c5d74","entry":"max_distances","repo":"tylersco/adapted_deep_embeddings","repo_kind":"official","path":"models/recall_at_kappa.py","file_url":"https://github.com/tylersco/adapted_deep_embeddings/blob/HEAD/models/recall_at_kappa.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"312ded6bde8c5d74"}},{"code_sha256_prefix":"78d8c17e12da6e5d","entry":"preprocess_image","repo":"garyCC227/thesis","repo_kind":"listed","path":"dense.py","file_url":"https://github.com/garyCC227/thesis/blob/HEAD/dense.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"78d8c17e12da6e5d"}},{"code_sha256_prefix":"ffbbae661197f477","entry":"prototypical_networks_loss","repo":"tylersco/adapted_deep_embeddings","repo_kind":"official","path":"losses/proto_loss.py","file_url":"https://github.com/tylersco/adapted_deep_embeddings/blob/HEAD/losses/proto_loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ffbbae661197f477"}},{"code_sha256_prefix":"3592b07c9571b601","entry":"split_data","repo":"garyCC227/thesis","repo_kind":"listed","path":"model_train.py","file_url":"https://github.com/garyCC227/thesis/blob/HEAD/model_train.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3592b07c9571b601"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}