{"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/mim-refiner-a-contrastive-learning-boost-from","title":"MIM-Refiner: A Contrastive Learning Boost from Intermediate Pre-Trained Representations","arxiv_id":"2402.10093","date":"2024-02-15","proceeding":null,"authors":["Benedikt Alkin","Lukas Miklautz","Sepp Hochreiter","Johannes Brandstetter"],"abstract":"We introduce MIM (Masked Image Modeling)-Refiner, a contrastive learning boost for pre-trained MIM models. MIM-Refiner is motivated by the insight that strong representations within MIM models generally reside in intermediate layers. Accordingly, MIM-Refiner leverages multiple contrastive heads that are connected to different intermediate layers. In each head, a modified nearest neighbor objective constructs semantic clusters that capture semantic information which improves performance on downstream tasks, including off-the-shelf and fine-tuning settings. The refinement process is short and simple - yet highly effective. Within a few epochs, we refine the features of MIM models from subpar to state-of-the-art, off-the-shelf features. Refining a ViT-H, pre-trained with data2vec 2.0 on ImageNet-1K, sets a new state-of-the-art in linear probing (84.7%) and low-shot classification among models that are pre-trained on ImageNet-1K. MIM-Refiner efficiently combines the advantages of MIM and ID objectives and compares favorably against previous state-of-the-art SSL models on a variety of benchmarks such as low-shot classification, long-tailed classification, clustering and semantic segmentation.","url_abs":"https://arxiv.org/abs/2402.10093v3","url_pdf":"https://arxiv.org/pdf/2402.10093v3.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":"mim-refiner-a-contrastive-learning-boost-from","repo_url":"https://github.com/ml-jku/MIM-Refiner","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"mim-refiner-a-contrastive-learning-boost-from","repo_url":"https://github.com/BenediktAlkin/vtab1k-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"image-clustering","task_name":"Image Clustering"},{"task_slug":"self-supervised-image-classification","task_name":"Self-Supervised Image Classification"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"},{"method_slug":"mim","method_name":"MIM"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-clustering-on-imagenet","task":"Image Clustering","dataset":"ImageNet","model":"MIM-Refiner (D2V2-ViT-H/14)","rank_in_archive_order":2,"of":12,"metrics":{"ARI":"42.2","Accuracy":"67.3","NMI":"87.2"},"uses_additional_data":false},{"leaderboard":"/sota/image-clustering-on-imagenet","task":"Image Clustering","dataset":"ImageNet","model":"MIM-Refiner (MAE-ViT-H/14)","rank_in_archive_order":4,"of":12,"metrics":{"ARI":"45.5","Accuracy":"64.6","NMI":"85.3"},"uses_additional_data":false},{"leaderboard":"/sota/self-supervised-image-classification-on","task":"Self-Supervised Image Classification","dataset":"ImageNet","model":"MIM-Refiner (D2V2-ViT-H/14)","rank_in_archive_order":5,"of":144,"metrics":{"Number of Params":"632M","Top 1 Accuracy":"84.7%"},"uses_additional_data":false},{"leaderboard":"/sota/self-supervised-image-classification-on","task":"Self-Supervised Image Classification","dataset":"ImageNet","model":"MIM-Refiner (MAE-ViT-2B/14)","rank_in_archive_order":6,"of":144,"metrics":{"Number of Params":"1890M","Top 1 Accuracy":"84.5%"},"uses_additional_data":false},{"leaderboard":"/sota/self-supervised-image-classification-on","task":"Self-Supervised Image Classification","dataset":"ImageNet","model":"MIM-Refiner (MAE-ViT-H/14","rank_in_archive_order":8,"of":144,"metrics":{"Number of Params":"632M","Top 1 Accuracy":"83.7%"},"uses_additional_data":false},{"leaderboard":"/sota/self-supervised-image-classification-on","task":"Self-Supervised Image Classification","dataset":"ImageNet","model":"MIM-Refiner (D2V2-ViT-L/16)","rank_in_archive_order":9,"of":144,"metrics":{"Number of Params":"307M","Top 1 Accuracy":"83.5%"},"uses_additional_data":false},{"leaderboard":"/sota/self-supervised-image-classification-on","task":"Self-Supervised Image Classification","dataset":"ImageNet","model":"MIM-Refiner (MAE-ViT-L/16)","rank_in_archive_order":10,"of":144,"metrics":{"Number of Params":"307M","Top 1 Accuracy":"82.8%"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.10093","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.10093"}},"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/ml-jku/MIM-Refiner","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/BenediktAlkin/vtab1k-pytorch","reach":null}],"summary":{"ran":2,"ran_draft_wrong":1},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"samples":2,"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":"f6c53a7cbc1b6bab","entry":"MIMRefinerModel","repo":"BenediktAlkin/vtab1k-pytorch","repo_kind":"listed","path":"src/vtab/models/mimrefiner_model.py","file_url":"https://github.com/BenediktAlkin/vtab1k-pytorch/blob/HEAD/src/vtab/models/mimrefiner_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f6c53a7cbc1b6bab"}},{"code_sha256_prefix":"4ab6e53ac50164ed","entry":"SplitQKV","repo":"BenediktAlkin/vtab1k-pytorch","repo_kind":"listed","path":"src/vtab/models/mimrefiner_model.py","file_url":"https://github.com/BenediktAlkin/vtab1k-pytorch/blob/HEAD/src/vtab/models/mimrefiner_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4ab6e53ac50164ed"}},{"code_sha256_prefix":"e016ec63c51a6da2","entry":"knn","repo":"ml-jku/MIM-Refiner","repo_kind":"official","path":"eval_knn_torchhub.py","file_url":"https://github.com/ml-jku/MIM-Refiner/blob/HEAD/eval_knn_torchhub.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e016ec63c51a6da2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}