{"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/deelm-dependency-enhanced-large-language","title":"BeLLM: Backward Dependency Enhanced Large Language Model for Sentence Embeddings","arxiv_id":"2311.05296","date":"2023-11-09","proceeding":null,"authors":["Xianming Li","Jing Li"],"abstract":"Sentence embeddings are crucial in measuring semantic similarity. Most recent studies employed large language models (LLMs) to learn sentence embeddings. Existing LLMs mainly adopted autoregressive architecture without explicit backward dependency modeling. Therefore, we examined the effects of backward dependencies in LLMs for semantic similarity measurements. Concretely, we propose a novel model: backward dependency enhanced large language model (BeLLM). It learns sentence embeddings via transforming specific attention layers from uni- to bi-directional. We extensively experiment across various semantic textual similarity (STS) tasks and downstream applications. BeLLM achieves state-of-the-art performance in varying scenarios. It shows that auto-regressive LLMs benefit from backward dependencies for sentence embeddings.","url_abs":"https://arxiv.org/abs/2311.05296v2","url_pdf":"https://arxiv.org/pdf/2311.05296v2.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":"deelm-dependency-enhanced-large-language","repo_url":"https://github.com/4ai/bellm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"deelm-dependency-enhanced-large-language","repo_url":"https://github.com/SeanLee97/AnglE","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"},{"task_slug":"sts","task_name":"STS"},{"task_slug":"semantic-similarity","task_name":"Semantic Similarity"},{"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":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2311.05296","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2311.05296"}},"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/SeanLee97/AnglE","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/4ai/bellm","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":7},"by_repo_kind":{"listed":{"samples":7,"ran":7,"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":"6ed9f1e379c06231","entry":"angle_loss","repo":"SeanLee97/AnglE","repo_kind":"listed","path":"angle_emb/loss.py","file_url":"https://github.com/SeanLee97/AnglE/blob/HEAD/angle_emb/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6ed9f1e379c06231"}},{"code_sha256_prefix":"4c17f05a6c7ab88d","entry":"categorical_crossentropy_loss","repo":"SeanLee97/AnglE","repo_kind":"listed","path":"angle_emb/loss.py","file_url":"https://github.com/SeanLee97/AnglE/blob/HEAD/angle_emb/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4c17f05a6c7ab88d"}},{"code_sha256_prefix":"0f81bf914723e107","entry":"cosine_loss","repo":"SeanLee97/AnglE","repo_kind":"listed","path":"angle_emb/loss.py","file_url":"https://github.com/SeanLee97/AnglE/blob/HEAD/angle_emb/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0f81bf914723e107"}},{"code_sha256_prefix":"9af44343ac96ad7f","entry":"cosine_similarity","repo":"SeanLee97/AnglE","repo_kind":"listed","path":"angle_emb/utils.py","file_url":"https://github.com/SeanLee97/AnglE/blob/HEAD/angle_emb/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9af44343ac96ad7f"}},{"code_sha256_prefix":"a64391cb1ba6a10e","entry":"detect_dataset_format","repo":"SeanLee97/AnglE","repo_kind":"listed","path":"angle_emb/angle.py","file_url":"https://github.com/SeanLee97/AnglE/blob/HEAD/angle_emb/angle.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a64391cb1ba6a10e"}},{"code_sha256_prefix":"1f7e9b5195bb7b08","entry":"find_all_linear_names","repo":"SeanLee97/AnglE","repo_kind":"listed","path":"angle_emb/utils.py","file_url":"https://github.com/SeanLee97/AnglE/blob/HEAD/angle_emb/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1f7e9b5195bb7b08"}},{"code_sha256_prefix":"05848ee5366200da","entry":"get_pooling","repo":"SeanLee97/AnglE","repo_kind":"listed","path":"angle_emb/utils.py","file_url":"https://github.com/SeanLee97/AnglE/blob/HEAD/angle_emb/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"05848ee5366200da"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}