{"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/beclr-batch-enhanced-contrastive-few-shot","title":"BECLR: Batch Enhanced Contrastive Few-Shot Learning","arxiv_id":"2402.02444","date":"2024-02-04","proceeding":"ICLR 2024 1","authors":["Stylianos Poulakakis-Daktylidis","Hadi Jamali-Rad"],"abstract":"Learning quickly from very few labeled samples is a fundamental attribute that separates machines and humans in the era of deep representation learning. Unsupervised few-shot learning (U-FSL) aspires to bridge this gap by discarding the reliance on annotations at training time. Intrigued by the success of contrastive learning approaches in the realm of U-FSL, we structurally approach their shortcomings in both pretraining and downstream inference stages. We propose a novel Dynamic Clustered mEmory (DyCE) module to promote a highly separable latent representation space for enhancing positive sampling at the pretraining phase and infusing implicit class-level insights into unsupervised contrastive learning. We then tackle the, somehow overlooked yet critical, issue of sample bias at the few-shot inference stage. We propose an iterative Optimal Transport-based distribution Alignment (OpTA) strategy and demonstrate that it efficiently addresses the problem, especially in low-shot scenarios where FSL approaches suffer the most from sample bias. We later on discuss that DyCE and OpTA are two intertwined pieces of a novel end-to-end approach (we coin as BECLR), constructively magnifying each other's impact. We then present a suite of extensive quantitative and qualitative experimentation to corroborate that BECLR sets a new state-of-the-art across ALL existing U-FSL benchmarks (to the best of our knowledge), and significantly outperforms the best of the current baselines (codebase available at: https://github.com/stypoumic/BECLR).","url_abs":"https://arxiv.org/abs/2402.02444v1","url_pdf":"https://arxiv.org/pdf/2402.02444v1.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":"beclr-batch-enhanced-contrastive-few-shot","repo_url":"https://github.com/stypoumic/beclr","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"few-shot-image-classification","task_name":"Few-Shot Image Classification"},{"task_slug":"few-shot-learning","task_name":"Few-Shot Learning"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"unsupervised-few-shot-image-classification","task_name":"Unsupervised Few-Shot Image Classification"},{"task_slug":"unsupervised-few-shot-learning","task_name":"Unsupervised Few-Shot Learning"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/unsupervised-few-shot-image-classification-on","task":"Unsupervised Few-Shot Image Classification","dataset":"Mini-Imagenet 5-way (1-shot)","model":"BECLR","rank_in_archive_order":1,"of":28,"metrics":{"Accuracy":"80.57"},"uses_additional_data":false},{"leaderboard":"/sota/unsupervised-few-shot-image-classification-on-1","task":"Unsupervised Few-Shot Image Classification","dataset":"Mini-Imagenet 5-way (5-shot)","model":"BECLR","rank_in_archive_order":1,"of":28,"metrics":{"Accuracy":"87.82"},"uses_additional_data":false},{"leaderboard":"/sota/unsupervised-few-shot-image-classification-on-2","task":"Unsupervised Few-Shot Image Classification","dataset":"Tiered ImageNet 5-way (1-shot)","model":"BECLR","rank_in_archive_order":1,"of":12,"metrics":{"Accuracy":"81.69"},"uses_additional_data":false},{"leaderboard":"/sota/unsupervised-few-shot-image-classification-on-3","task":"Unsupervised Few-Shot Image Classification","dataset":"Tiered ImageNet 5-way (5-shot)","model":"BECLR","rank_in_archive_order":1,"of":12,"metrics":{"Accuracy":"87.86"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2402.02444","atlas_url":"https://app.syntology.ai/?focus=2402.02444","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.02444"}},"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/stypoumic/beclr","reach":null}],"summary":{"ran_draft_wrong":1},"by_repo_kind":{"official":{"samples":1,"ran":1,"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":"f3239e1544c62cf3","entry":"groupedAvg","repo":"stypoumic/beclr","repo_kind":"official","path":"evaluate.py","file_url":"https://github.com/stypoumic/beclr/blob/HEAD/evaluate.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f3239e1544c62cf3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}