{"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/improving-transformation-invariance-in-1","title":"Improving Transformation Invariance in Contrastive Representation Learning","arxiv_id":"2010.09515","date":"2020-10-19","proceeding":"ICLR 2021 1","authors":["Adam Foster","Rattana Pukdee","Tom Rainforth"],"abstract":"We propose methods to strengthen the invariance properties of representations obtained by contrastive learning. While existing approaches implicitly induce a degree of invariance as representations are learned, we look to more directly enforce invariance in the encoding process. To this end, we first introduce a training objective for contrastive learning that uses a novel regularizer to control how the representation changes under transformation. We show that representations trained with this objective perform better on downstream tasks and are more robust to the introduction of nuisance transformations at test time. Second, we propose a change to how test time representations are generated by introducing a feature averaging approach that combines encodings from multiple transformations of the original input, finding that this leads to across the board performance gains. Finally, we introduce the novel Spirograph dataset to explore our ideas in the context of a differentiable generative process with multiple downstream tasks, showing that our techniques for learning invariance are highly beneficial.","url_abs":"https://arxiv.org/abs/2010.09515v2","url_pdf":"https://arxiv.org/pdf/2010.09515v2.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":"improving-transformation-invariance-in-1","repo_url":"https://github.com/ae-foster/invclr","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"improving-transformation-invariance-in-1","repo_url":"https://github.com/rattaoup/spirograph","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2010.09515","atlas_url":"https://app.syntology.ai/?focus=2010.09515","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2010.09515"}},"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":"deterministic:regex_extraction","url":"https://github.com/facebookresearch/moco","reach":{"status":"exists_but_no_tree"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/ae-foster/invclr","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/rattaoup/spirograph","reach":{"status":"ok"}}],"summary":{"unverified":4},"by_repo_kind":{"listed":{"samples":4,"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":"3615fd781c0e7e45","entry":"encode_train_set","repo":"ae-foster/invclr","repo_kind":"listed","path":"evaluate/lbfgs.py","file_url":"https://github.com/ae-foster/invclr/blob/HEAD/evaluate/lbfgs.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":"3615fd781c0e7e45"}},{"code_sha256_prefix":"d34f37712dd92487","entry":"encode_train_set_transformed","repo":"ae-foster/invclr","repo_kind":"listed","path":"evaluate/lbfgs.py","file_url":"https://github.com/ae-foster/invclr/blob/HEAD/evaluate/lbfgs.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":"d34f37712dd92487"}},{"code_sha256_prefix":"e85d165d8a854a57","entry":"train","repo":"ae-foster/invclr","repo_kind":"listed","path":"invclr.py","file_url":"https://github.com/ae-foster/invclr/blob/HEAD/invclr.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":"e85d165d8a854a57"}},{"code_sha256_prefix":"d6204b19819b6764","entry":"train_clf","repo":"ae-foster/invclr","repo_kind":"listed","path":"evaluate/lbfgs.py","file_url":"https://github.com/ae-foster/invclr/blob/HEAD/evaluate/lbfgs.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":"d6204b19819b6764"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}