{"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/predicting-the-accuracy-of-a-few-shot","title":"Predicting the Accuracy of a Few-Shot Classifier","arxiv_id":"2007.04238","date":"2020-07-08","proceeding":null,"authors":["Myriam Bontonou","Louis Béthune","Vincent Gripon"],"abstract":"In the context of few-shot learning, one cannot measure the generalization ability of a trained classifier using validation sets, due to the small number of labeled samples. In this paper, we are interested in finding alternatives to answer the question: is my classifier generalizing well to previously unseen data? We first analyze the reasons for the variability of generalization performances. We then investigate the case of using transfer-based solutions, and consider three settings: i) supervised where we only have access to a few labeled samples, ii) semi-supervised where we have access to both a few labeled samples and a set of unlabeled samples and iii) unsupervised where we only have access to unlabeled samples. For each setting, we propose reasonable measures that we empirically demonstrate to be correlated with the generalization ability of considered classifiers. We also show that these simple measures can be used to predict generalization up to a certain confidence. We conduct our experiments on standard few-shot vision datasets.","url_abs":"https://arxiv.org/abs/2007.04238v1","url_pdf":"https://arxiv.org/pdf/2007.04238v1.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":"predicting-the-accuracy-of-a-few-shot","repo_url":"https://github.com/mbonto/fewshot_generalization","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"few-shot-learning","task_name":"Few-Shot Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2007.04238","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2007.04238"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/mbonto/fewshot_generalization","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":24},"by_repo_kind":{"official":{"samples":24,"ran":0,"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":"abe1181c3d58647d","entry":"LR_classifier","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"toolbox/classifier.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/toolbox/classifier.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":"abe1181c3d58647d"}},{"code_sha256_prefix":"cfa9d0d8c2a753e6","entry":"compute_dot","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"dot_correlation.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/dot_correlation.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":"cfa9d0d8c2a753e6"}},{"code_sha256_prefix":"76f9783a1b61d46b","entry":"connect_parts_labels","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"case_study_toolbox/monitoring.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/case_study_toolbox/monitoring.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":"76f9783a1b61d46b"}},{"code_sha256_prefix":"57cb3daace2b4a07","entry":"cosine_loss","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"case_study_toolbox/diffusion_graph.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/case_study_toolbox/diffusion_graph.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":"57cb3daace2b4a07"}},{"code_sha256_prefix":"19edf953403955ef","entry":"data_subset","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"case_study_toolbox/loaders.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/case_study_toolbox/loaders.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":"19edf953403955ef"}},{"code_sha256_prefix":"74f0e34092be4477","entry":"degree","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"toolbox/gsp.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/toolbox/gsp.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":"74f0e34092be4477"}},{"code_sha256_prefix":"7938ba61451c14fc","entry":"get_edges","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"dot_correlation.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/dot_correlation.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":"7938ba61451c14fc"}},{"code_sha256_prefix":"c83faab26be75af5","entry":"get_grid_search_params","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"case_study_toolbox/parse_grid.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/case_study_toolbox/parse_grid.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":"c83faab26be75af5"}},{"code_sha256_prefix":"43da13fb5c9762a9","entry":"get_item","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"case_study_toolbox/diffusion_graph.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/case_study_toolbox/diffusion_graph.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":"43da13fb5c9762a9"}},{"code_sha256_prefix":"c2d2c9f53982f213","entry":"get_labels_stats","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"case_study_toolbox/loaders.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/case_study_toolbox/loaders.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":"c2d2c9f53982f213"}},{"code_sha256_prefix":"ebc8551f6c060c8b","entry":"get_num_tests","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"main_smooth.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/main_smooth.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":"ebc8551f6c060c8b"}},{"code_sha256_prefix":"fbfb2b6c73aab0f3","entry":"get_optimizer_myriam","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"case_study_toolbox/classifiers.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/case_study_toolbox/classifiers.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":"fbfb2b6c73aab0f3"}},{"code_sha256_prefix":"0bda046cfba112f7","entry":"get_optimizer_xuqing","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"case_study_toolbox/classifiers.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/case_study_toolbox/classifiers.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":"0bda046cfba112f7"}},{"code_sha256_prefix":"75e942b8c2514117","entry":"gft","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"toolbox/gsp.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/toolbox/gsp.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":"75e942b8c2514117"}},{"code_sha256_prefix":"f25da1f56ee17efe","entry":"l2_norm","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"toolbox/load_data.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/toolbox/load_data.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":"f25da1f56ee17efe"}},{"code_sha256_prefix":"d45ef2e493387bc4","entry":"min_cut_volume","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"case_study_toolbox/monitoring.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/case_study_toolbox/monitoring.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":"d45ef2e493387bc4"}},{"code_sha256_prefix":"0372e4fb3bb09d78","entry":"parse_args","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"case_study_toolbox/parse_grid.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/case_study_toolbox/parse_grid.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":"0372e4fb3bb09d78"}},{"code_sha256_prefix":"52d2c48eaa7da391","entry":"sample_case","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"toolbox/load_data.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/toolbox/load_data.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":"52d2c48eaa7da391"}},{"code_sha256_prefix":"8cfe5c8977d8ff8b","entry":"similarity","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"toolbox/gsp.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/toolbox/gsp.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":"8cfe5c8977d8ff8b"}},{"code_sha256_prefix":"b8616787a1c2279e","entry":"split_train_test","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"case_study_toolbox/loaders.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/case_study_toolbox/loaders.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":"b8616787a1c2279e"}},{"code_sha256_prefix":"05c87e1dea719839","entry":"stoer_wagner_volume","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"case_study_toolbox/monitoring.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/case_study_toolbox/monitoring.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":"05c87e1dea719839"}},{"code_sha256_prefix":"28375cac1a41f128","entry":"symmetrize_edges","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"case_study_toolbox/diffusion_graph.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/case_study_toolbox/diffusion_graph.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":"28375cac1a41f128"}},{"code_sha256_prefix":"121dd5f5678761d4","entry":"train_logistic_regression","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"case_study_toolbox/classifiers.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/case_study_toolbox/classifiers.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":"121dd5f5678761d4"}},{"code_sha256_prefix":"2a63cbfbc83dff58","entry":"train_logistic_regression","repo":"mbonto/fewshot_generalization","repo_kind":"official","path":"toolbox/classifier.py","file_url":"https://github.com/mbonto/fewshot_generalization/blob/HEAD/toolbox/classifier.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":"2a63cbfbc83dff58"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}