{"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/continual-contrastive-self-supervised","title":"Continual Contrastive Learning for Image Classification","arxiv_id":"2107.01776","date":"2021-07-05","proceeding":null,"authors":["Zhiwei Lin","Yongtao Wang","Hongxiang Lin"],"abstract":"Recently, self-supervised representation learning gives further development in multimedia technology. Most existing self-supervised learning methods are applicable to packaged data. However, when it comes to streamed data, they are suffering from a catastrophic forgetting problem, which is not studied extensively. In this paper, we make the first attempt to tackle the catastrophic forgetting problem in the mainstream self-supervised methods, i.e., contrastive learning methods. Specifically, we first develop a rehearsal-based framework combined with a novel sampling strategy and a self-supervised knowledge distillation to transfer information over time efficiently. Then, we propose an extra sample queue to help the network separate the feature representations of old and new data in the embedding space. Experimental results show that compared with the naive self-supervised baseline, which learns tasks one by one without taking any technique, we improve the image classification accuracy by 1.60% on CIFAR-100, 2.86% on ImageNet-Sub, and 1.29% on ImageNet-Full under 10 incremental steps setting. Our code will be available at https://github.com/VDIGPKU/ContinualContrastiveLearning.","url_abs":"https://arxiv.org/abs/2107.01776v4","url_pdf":"https://arxiv.org/pdf/2107.01776v4.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":"continual-contrastive-self-supervised","repo_url":"https://github.com/VDIGPKU/ContinualContrastiveLearning","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"continual-learning","task_name":"Continual Learning"},{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"knowledge-distillation","task_name":"Knowledge Distillation"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"self-supervised-learning","task_name":"Self-Supervised Learning"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[{"method_slug":"knowledge-distillation","method_name":"Knowledge Distillation"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2107.01776","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2107.01776"}},"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/VDIGPKU/ContinualContrastiveLearning","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":2,"unverified":3},"by_repo_kind":{"official":{"samples":5,"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":"131a82fd65128218","entry":"accuracy","repo":"VDIGPKU/ContinualContrastiveLearning","repo_kind":"official","path":"lincls_eval.py","file_url":"https://github.com/VDIGPKU/ContinualContrastiveLearning/blob/HEAD/lincls_eval.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"131a82fd65128218"}},{"code_sha256_prefix":"63ce1d5edf8fb0a0","entry":"validate","repo":"VDIGPKU/ContinualContrastiveLearning","repo_kind":"official","path":"lincls_eval.py","file_url":"https://github.com/VDIGPKU/ContinualContrastiveLearning/blob/HEAD/lincls_eval.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"63ce1d5edf8fb0a0"}},{"code_sha256_prefix":"73cecca9f3575f09","entry":"concat_all_gather","repo":"VDIGPKU/ContinualContrastiveLearning","repo_kind":"official","path":"moco/builder.py","file_url":"https://github.com/VDIGPKU/ContinualContrastiveLearning/blob/HEAD/moco/builder.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":"73cecca9f3575f09"}},{"code_sha256_prefix":"87e30d1df21098b9","entry":"merge_images_labels","repo":"VDIGPKU/ContinualContrastiveLearning","repo_kind":"official","path":"moco/loader.py","file_url":"https://github.com/VDIGPKU/ContinualContrastiveLearning/blob/HEAD/moco/loader.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":"87e30d1df21098b9"}},{"code_sha256_prefix":"1d9a9453edd1b472","entry":"split_images_labels","repo":"VDIGPKU/ContinualContrastiveLearning","repo_kind":"official","path":"moco/loader.py","file_url":"https://github.com/VDIGPKU/ContinualContrastiveLearning/blob/HEAD/moco/loader.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":"1d9a9453edd1b472"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}