{"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/arxiv-2606-07502","title":"Your UnEmbedding Matrix is Secretly a Feature Lens for Text Embeddings","arxiv_id":"2606.07502","date":"2026-06-05","proceeding":null,"authors":["Songhao Wu","Zhongxin Chen","Yuxuan Liu","Heng Cui","Cong Li","Rui Yan"],"abstract":"Large language models exhibit impressive zero-shot capabilities across a wide range of downstream tasks. However, they struggle to function as off-the-shelf embedding models, leading to suboptimal performance on massive text embedding benchmarks. In this paper, we identify a potential cause underlying this deficiency. Our motivation stems from an unexpected observation: text embeddings tend to align with frequent but uninformative tokens when projected onto the vocabulary space. We argue that this excessive expression of high-frequency tokens suppresses the model's ability to capture nuanced semantics. To address this, we introduce EmbedFilter, a simple linear transformation designed to refine text embeddings derived from LLMs directly. Specifically, we uncover that the unembedding matrix within LLMs encodes a latent space that is actively writing these frequent tokens into embedding space. By filtering out this subspace, EmbedFilter suppress the influence of high-frequency tokens, thereby enhancing semantic representations. As a compelling byproduct, this enables an inherent dimensionality reduction, lowering index storage and speedup retrieval while fully preserving the refined embedding quality. Our experiments across multiple LLM backbones demonstrate that LLMs equipped with EmbedFilter achieve superior zero-shot downstream performance even with significantly reduced embedding dimensions. We hope our findings provide deeper insights into the mechanisms of LLM-based representations and inspire more principled designs to improve text embeddings training. Our code is available at https://github.com/CentreChen/EmbFilter.","url_abs":"https://arxiv.org/abs/2606.07502","url_pdf":"https://arxiv.org/pdf/2606.07502","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":null,"mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2606.07502"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/CentreChen/EmbFilter","reach":null}],"summary":{"ran_fixture":2,"ran_draft_wrong":4,"ran":4},"by_repo_kind":{"found_in_text":{"samples":10,"ran":10,"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":"30d7eec482ebf6b1","entry":"repeat_kv","repo":"CentreChen/EmbFilter","repo_kind":"found_in_text","path":"models/modeling_llama_lr.py","file_url":"https://github.com/CentreChen/EmbFilter/blob/HEAD/models/modeling_llama_lr.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":2,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"30d7eec482ebf6b1"}},{"code_sha256_prefix":"3c76e52815c5401d","entry":"repeat_kv","repo":"CentreChen/EmbFilter","repo_kind":"found_in_text","path":"models/modeling_mistral_lr.py","file_url":"https://github.com/CentreChen/EmbFilter/blob/HEAD/models/modeling_mistral_lr.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":2,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3c76e52815c5401d"}},{"code_sha256_prefix":"bac65c3dafaec040","entry":"apply_rotary_pos_emb","repo":"CentreChen/EmbFilter","repo_kind":"found_in_text","path":"models/modeling_llama_lr.py","file_url":"https://github.com/CentreChen/EmbFilter/blob/HEAD/models/modeling_llama_lr.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bac65c3dafaec040"}},{"code_sha256_prefix":"583539efd6fd01fb","entry":"apply_rotary_pos_emb","repo":"CentreChen/EmbFilter","repo_kind":"found_in_text","path":"models/modeling_mistral_lr.py","file_url":"https://github.com/CentreChen/EmbFilter/blob/HEAD/models/modeling_mistral_lr.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"583539efd6fd01fb"}},{"code_sha256_prefix":"5d60a98d819c120d","entry":"get_task_def_by_task_name_and_type","repo":"CentreChen/EmbFilter","repo_kind":"found_in_text","path":"utils/utils.py","file_url":"https://github.com/CentreChen/EmbFilter/blob/HEAD/utils/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":"5d60a98d819c120d"}},{"code_sha256_prefix":"4e0d14c07c0802cb","entry":"move_to_cuda","repo":"CentreChen/EmbFilter","repo_kind":"found_in_text","path":"utils/utils.py","file_url":"https://github.com/CentreChen/EmbFilter/blob/HEAD/utils/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":"4e0d14c07c0802cb"}},{"code_sha256_prefix":"b99eea6376d1e212","entry":"rotate_half","repo":"CentreChen/EmbFilter","repo_kind":"found_in_text","path":"models/modeling_llama_lr.py","file_url":"https://github.com/CentreChen/EmbFilter/blob/HEAD/models/modeling_llama_lr.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b99eea6376d1e212"}},{"code_sha256_prefix":"e03d53ba9d4f9ae5","entry":"rotate_half","repo":"CentreChen/EmbFilter","repo_kind":"found_in_text","path":"models/modeling_mistral_lr.py","file_url":"https://github.com/CentreChen/EmbFilter/blob/HEAD/models/modeling_mistral_lr.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e03d53ba9d4f9ae5"}},{"code_sha256_prefix":"f57bbd7c84eda2f6","entry":"transform_func","repo":"CentreChen/EmbFilter","repo_kind":"found_in_text","path":"run4llama_echo.py","file_url":"https://github.com/CentreChen/EmbFilter/blob/HEAD/run4llama_echo.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":"f57bbd7c84eda2f6"}},{"code_sha256_prefix":"e5cb9efc5c41632a","entry":"transform_func","repo":"CentreChen/EmbFilter","repo_kind":"found_in_text","path":"run4llama_prompteol.py","file_url":"https://github.com/CentreChen/EmbFilter/blob/HEAD/run4llama_prompteol.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":"e5cb9efc5c41632a"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CL","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}