{"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/hyper-cl-conditioning-sentence","title":"Hyper-CL: Conditioning Sentence Representations with Hypernetworks","arxiv_id":"2403.09490","date":"2024-03-14","proceeding":null,"authors":["Young Hyun Yoo","Jii Cha","Changhyeon Kim","Taeuk Kim"],"abstract":"While the introduction of contrastive learning frameworks in sentence representation learning has significantly contributed to advancements in the field, it still remains unclear whether state-of-the-art sentence embeddings can capture the fine-grained semantics of sentences, particularly when conditioned on specific perspectives. In this paper, we introduce Hyper-CL, an efficient methodology that integrates hypernetworks with contrastive learning to compute conditioned sentence representations. In our proposed approach, the hypernetwork is responsible for transforming pre-computed condition embeddings into corresponding projection layers. This enables the same sentence embeddings to be projected differently according to various conditions. Evaluation on two representative conditioning benchmarks, namely conditional semantic text similarity and knowledge graph completion, demonstrates that Hyper-CL is effective in flexibly conditioning sentence representations, showcasing its computational efficiency at the same time. We also provide a comprehensive analysis of the inner workings of our approach, leading to a better interpretation of its mechanisms.","url_abs":"https://arxiv.org/abs/2403.09490v2","url_pdf":"https://arxiv.org/pdf/2403.09490v2.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":"hyper-cl-conditioning-sentence","repo_url":"https://github.com/hyu-nlp/hyper-cl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"knowledge-graph-completion","task_name":"Knowledge Graph Completion"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"sentence","task_name":"Sentence"},{"task_slug":"sentence-embeddings","task_name":"Sentence Embeddings"},{"task_slug":"text-similarity","task_name":"text similarity"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"},{"method_slug":"hypernetwork","method_name":"HyperNetwork"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.09490","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.09490"}},"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/HYU-NLP/Hyper-CL","reach":null}],"summary":{"ran":4,"unverified":1},"by_repo_kind":{"official":{"samples":5,"ran":4,"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":5,"samples":[{"code_sha256_prefix":"2165a34b804423b0","entry":"InfoNCE","repo":"HYU-NLP/Hyper-CL","repo_kind":"official","path":"sim-kgc/models_tri_encoder.py","file_url":"https://github.com/HYU-NLP/Hyper-CL/blob/HEAD/sim-kgc/models_tri_encoder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2165a34b804423b0"}},{"code_sha256_prefix":"645ed0ea53345924","entry":"Pooler","repo":"HYU-NLP/Hyper-CL","repo_kind":"official","path":"sim-kgc/models_tri_encoder.py","file_url":"https://github.com/HYU-NLP/Hyper-CL/blob/HEAD/sim-kgc/models_tri_encoder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"645ed0ea53345924"}},{"code_sha256_prefix":"4effe840a8f0196e","entry":"Similarity","repo":"HYU-NLP/Hyper-CL","repo_kind":"official","path":"sim-kgc/models_tri_encoder.py","file_url":"https://github.com/HYU-NLP/Hyper-CL/blob/HEAD/sim-kgc/models_tri_encoder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4effe840a8f0196e"}},{"code_sha256_prefix":"c378afbb1094c37c","entry":"TriMLP","repo":"HYU-NLP/Hyper-CL","repo_kind":"official","path":"sim-kgc/models_tri_encoder.py","file_url":"https://github.com/HYU-NLP/Hyper-CL/blob/HEAD/sim-kgc/models_tri_encoder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c378afbb1094c37c"}},{"code_sha256_prefix":"daf5bf117a177a01","entry":"TriEncoderForClassification","repo":"HYU-NLP/Hyper-CL","repo_kind":"official","path":"sim-kgc/models_tri_encoder.py","file_url":"https://github.com/HYU-NLP/Hyper-CL/blob/HEAD/sim-kgc/models_tri_encoder.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":"daf5bf117a177a01"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}