{"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/mixco-mix-up-contrastive-learning-for-visual","title":"MixCo: Mix-up Contrastive Learning for Visual Representation","arxiv_id":"2010.06300","date":"2020-10-13","proceeding":null,"authors":["Sungnyun Kim","Gihun Lee","Sangmin Bae","Se-Young Yun"],"abstract":"Contrastive learning has shown remarkable results in recent self-supervised approaches for visual representation. By learning to contrast positive pairs' representation from the corresponding negatives pairs, one can train good visual representations without human annotations. This paper proposes Mix-up Contrast (MixCo), which extends the contrastive learning concept to semi-positives encoded from the mix-up of positive and negative images. MixCo aims to learn the relative similarity of representations, reflecting how much the mixed images have the original positives. We validate the efficacy of MixCo when applied to the recent self-supervised learning algorithms under the standard linear evaluation protocol on TinyImageNet, CIFAR10, and CIFAR100. In the experiments, MixCo consistently improves test accuracy. Remarkably, the improvement is more significant when the learning capacity (e.g., model size) is limited, suggesting that MixCo might be more useful in real-world scenarios. The code is available at: https://github.com/Lee-Gihun/MixCo-Mixup-Contrast.","url_abs":"https://arxiv.org/abs/2010.06300v2","url_pdf":"https://arxiv.org/pdf/2010.06300v2.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":"mixco-mix-up-contrastive-learning-for-visual","repo_url":"https://github.com/Lee-Gihun/MixCo-Mixup-Contrast","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"linear-evaluation","task_name":"Linear evaluation"},{"task_slug":"self-supervised-learning","task_name":"Self-Supervised Learning"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2010.06300","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2010.06300"}},"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":"deterministic:regex_extraction","url":"https://github.com/Lee-Gihun/MixCo-Mixup-Contrast","reach":null}],"summary":{"ran":2,"unverified":2},"by_repo_kind":{"official":{"samples":4,"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":"d7f83fe28646de2a","entry":"MixcoLoss","repo":"Lee-Gihun/MixCo-Mixup-Contrast","repo_kind":"official","path":"moco/utils/loss_fn.py","file_url":"https://github.com/Lee-Gihun/MixCo-Mixup-Contrast/blob/HEAD/moco/utils/loss_fn.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d7f83fe28646de2a"}},{"code_sha256_prefix":"89a0f365a50aa24b","entry":"SoftCrossEntropy","repo":"Lee-Gihun/MixCo-Mixup-Contrast","repo_kind":"official","path":"moco/utils/loss_fn.py","file_url":"https://github.com/Lee-Gihun/MixCo-Mixup-Contrast/blob/HEAD/moco/utils/loss_fn.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"89a0f365a50aa24b"}},{"code_sha256_prefix":"346148e635559cbb","entry":"train","repo":"Lee-Gihun/MixCo-Mixup-Contrast","repo_kind":"official","path":"moco/pretrain.py","file_url":"https://github.com/Lee-Gihun/MixCo-Mixup-Contrast/blob/HEAD/moco/pretrain.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":"346148e635559cbb"}},{"code_sha256_prefix":"3c800d4ae34c86e7","entry":"validate","repo":"Lee-Gihun/MixCo-Mixup-Contrast","repo_kind":"official","path":"moco/lincls.py","file_url":"https://github.com/Lee-Gihun/MixCo-Mixup-Contrast/blob/HEAD/moco/lincls.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":"3c800d4ae34c86e7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}