{"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/virtual-augmentation-supported-contrastive","title":"Virtual Augmentation Supported Contrastive Learning of Sentence Representations","arxiv_id":"2110.08552","date":"2021-10-16","proceeding":"Findings (ACL) 2022 5","authors":["Dejiao Zhang","Wei Xiao","Henghui Zhu","Xiaofei Ma","Andrew O. Arnold"],"abstract":"Despite profound successes, contrastive representation learning relies on carefully designed data augmentations using domain specific knowledge. This challenge is magnified in natural language processing where no general rules exist for data augmentation due to the discrete nature of natural language. We tackle this challenge by presenting a Virtual augmentation Supported Contrastive Learning of sentence representations (VaSCL). Originating from the interpretation that data augmentation essentially constructs the neighborhoods of each training instance, we in turn utilize the neighborhood to generate effective data augmentations. Leveraging the large training batch size of contrastive learning, we approximate the neighborhood of an instance via its K-nearest in-batch neighbors in the representation space. We then define an instance discrimination task regarding this neighborhood and generate the virtual augmentation in an adversarial training manner. We access the performance of VaSCL on a wide range of downstream tasks, and set a new state-of-the-art for unsupervised sentence representation learning.","url_abs":"https://arxiv.org/abs/2110.08552v2","url_pdf":"https://arxiv.org/pdf/2110.08552v2.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":"virtual-augmentation-supported-contrastive","repo_url":"https://github.com/amazon-research/sentence-representations","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"virtual-augmentation-supported-contrastive","repo_url":"https://github.com/amazon-science/sentence-representations","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"sentence","task_name":"Sentence"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2110.08552","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.08552"}},"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/amazon-science/sentence-representations","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/amazon-research/sentence-representations","reach":null}],"summary":{"unverified":8},"by_repo_kind":{"listed":{"samples":8,"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":"4faa67ba46a4ff24","entry":"cluster_acc","repo":"amazon-science/sentence-representations","repo_kind":"listed","path":"DownstreamEval/clustering/metric.py","file_url":"https://github.com/amazon-science/sentence-representations/blob/HEAD/DownstreamEval/clustering/metric.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4faa67ba46a4ff24"}},{"code_sha256_prefix":"88f2b6bd78c2881a","entry":"cluster_acc_purity","repo":"amazon-science/sentence-representations","repo_kind":"listed","path":"DownstreamEval/clustering/metric.py","file_url":"https://github.com/amazon-science/sentence-representations/blob/HEAD/DownstreamEval/clustering/metric.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"88f2b6bd78c2881a"}},{"code_sha256_prefix":"4747601818307a49","entry":"cluster_data_loader","repo":"amazon-science/sentence-representations","repo_kind":"listed","path":"DownstreamEval/clustering/dataloader.py","file_url":"https://github.com/amazon-science/sentence-representations/blob/HEAD/DownstreamEval/clustering/dataloader.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4747601818307a49"}},{"code_sha256_prefix":"ec7ebe20ecf2579f","entry":"clustering_single_trial","repo":"amazon-science/sentence-representations","repo_kind":"listed","path":"DownstreamEval/clustering/clustering_eval.py","file_url":"https://github.com/amazon-science/sentence-representations/blob/HEAD/DownstreamEval/clustering/clustering_eval.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ec7ebe20ecf2579f"}},{"code_sha256_prefix":"7758f15f5fb8c76a","entry":"get_args","repo":"amazon-science/sentence-representations","repo_kind":"listed","path":"DownstreamEval/configs/configure.py","file_url":"https://github.com/amazon-science/sentence-representations/blob/HEAD/DownstreamEval/configs/configure.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7758f15f5fb8c76a"}},{"code_sha256_prefix":"610528af9a82cff9","entry":"get_bert","repo":"amazon-science/sentence-representations","repo_kind":"listed","path":"DownstreamEval/configs/configure.py","file_url":"https://github.com/amazon-science/sentence-representations/blob/HEAD/DownstreamEval/configs/configure.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"610528af9a82cff9"}},{"code_sha256_prefix":"13e3886c6d762ec6","entry":"get_embeddings","repo":"amazon-science/sentence-representations","repo_kind":"listed","path":"DownstreamEval/clustering/clustering_eval.py","file_url":"https://github.com/amazon-science/sentence-representations/blob/HEAD/DownstreamEval/clustering/clustering_eval.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"13e3886c6d762ec6"}},{"code_sha256_prefix":"38311fd78ec01a2b","entry":"parse_results","repo":"amazon-science/sentence-representations","repo_kind":"listed","path":"DownstreamEval/eval_sts.py","file_url":"https://github.com/amazon-science/sentence-representations/blob/HEAD/DownstreamEval/eval_sts.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"38311fd78ec01a2b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}