{"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/non-linguistic-supervision-for-contrastive","title":"Non-Linguistic Supervision for Contrastive Learning of Sentence Embeddings","arxiv_id":"2209.09433","date":"2022-09-20","proceeding":null,"authors":["Yiren Jian","Chongyang Gao","Soroush Vosoughi"],"abstract":"Semantic representation learning for sentences is an important and well-studied problem in NLP. The current trend for this task involves training a Transformer-based sentence encoder through a contrastive objective with text, i.e., clustering sentences with semantically similar meanings and scattering others. In this work, we find the performance of Transformer models as sentence encoders can be improved by training with multi-modal multi-task losses, using unpaired examples from another modality (e.g., sentences and unrelated image/audio data). In particular, besides learning by the contrastive loss on text, our model clusters examples from a non-linguistic domain (e.g., visual/audio) with a similar contrastive loss at the same time. The reliance of our framework on unpaired non-linguistic data makes it language-agnostic, enabling it to be widely applicable beyond English NLP. Experiments on 7 semantic textual similarity benchmarks reveal that models trained with the additional non-linguistic (images/audio) contrastive objective lead to higher quality sentence embeddings. This indicates that Transformer models are able to generalize better by doing a similar task (i.e., clustering) with unpaired examples from different modalities in a multi-task fashion.","url_abs":"https://arxiv.org/abs/2209.09433v1","url_pdf":"https://arxiv.org/pdf/2209.09433v1.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":"non-linguistic-supervision-for-contrastive","repo_url":"https://github.com/yiren-jian/NonLing-CSE","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"clustering","task_name":"Clustering"},{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"semantic-textual-similarity","task_name":"Semantic Textual Similarity"},{"task_slug":"sentence","task_name":"Sentence"},{"task_slug":"sentence-embeddings","task_name":"Sentence Embeddings"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2209.09433","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2209.09433"}},"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/yiren-jian/NonLing-CSE","reach":null}],"summary":{"ran":3,"ran_draft_wrong":2,"unverified":3},"by_repo_kind":{"official":{"samples":8,"ran":5,"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":8,"samples":[{"code_sha256_prefix":"6dde63220b0a3882","entry":"PatchEmbed","repo":"yiren-jian/NonLing-CSE","repo_kind":"official","path":"AudioCSE/src/models.py","file_url":"https://github.com/yiren-jian/NonLing-CSE/blob/HEAD/AudioCSE/src/models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6dde63220b0a3882"}},{"code_sha256_prefix":"31695b3bea2d46ee","entry":"Pooler","repo":"yiren-jian/NonLing-CSE","repo_kind":"official","path":"AudioCSE/src/models.py","file_url":"https://github.com/yiren-jian/NonLing-CSE/blob/HEAD/AudioCSE/src/models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"31695b3bea2d46ee"}},{"code_sha256_prefix":"4d41003f996241f8","entry":"Similarity","repo":"yiren-jian/NonLing-CSE","repo_kind":"official","path":"AudioCSE/src/models.py","file_url":"https://github.com/yiren-jian/NonLing-CSE/blob/HEAD/AudioCSE/src/models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4d41003f996241f8"}},{"code_sha256_prefix":"4e0ff9c4d9a318ff","entry":"cl_forward","repo":"yiren-jian/NonLing-CSE","repo_kind":"official","path":"AudioCSE/src/models.py","file_url":"https://github.com/yiren-jian/NonLing-CSE/blob/HEAD/AudioCSE/src/models.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4e0ff9c4d9a318ff"}},{"code_sha256_prefix":"cb67cd5ac977480d","entry":"sentemb_forward","repo":"yiren-jian/NonLing-CSE","repo_kind":"official","path":"AudioCSE/src/models.py","file_url":"https://github.com/yiren-jian/NonLing-CSE/blob/HEAD/AudioCSE/src/models.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cb67cd5ac977480d"}},{"code_sha256_prefix":"cac05caf11e54d56","entry":"BertForCL","repo":"yiren-jian/NonLing-CSE","repo_kind":"official","path":"AudioCSE/src/models.py","file_url":"https://github.com/yiren-jian/NonLing-CSE/blob/HEAD/AudioCSE/src/models.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cac05caf11e54d56"}},{"code_sha256_prefix":"7d7789da5378c84b","entry":"MLPLayer","repo":"yiren-jian/NonLing-CSE","repo_kind":"official","path":"AudioCSE/src/models.py","file_url":"https://github.com/yiren-jian/NonLing-CSE/blob/HEAD/AudioCSE/src/models.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7d7789da5378c84b"}},{"code_sha256_prefix":"0e3742a153290ee6","entry":"cl_init","repo":"yiren-jian/NonLing-CSE","repo_kind":"official","path":"AudioCSE/src/models.py","file_url":"https://github.com/yiren-jian/NonLing-CSE/blob/HEAD/AudioCSE/src/models.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0e3742a153290ee6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}