AIAny
Icon for item

Your UnEmbedding Matrix is Secretly a Feature Lens for Text Embeddings

Removes the subspace of frequent, uninformative tokens that LLMs inject into text embeddings via the model's unembedding matrix. EmbedFilter is a lightweight linear transform that refines LLM-derived embeddings to improve zero‑shot semantic retrieval, enable dimensionality reduction, and speed up indexing; code on GitHub.

Introduction

Most LLM-derived embeddings drift toward expressing high-frequency but semantically shallow tokens when projected into vocabulary space — an effect that drowns out fine-grained semantics useful for retrieval. This paper shows that the model's unembedding matrix encodes a latent direction (or subspace) responsible for that effect, and that removing it via a linear filter substantially improves downstream zero-shot embedding performance while enabling compact indices.

Key Findings
  • Empirical discovery: projecting embeddings into vocabulary space reveals dominant components aligned with frequent tokens, not semantics. So what? Those components reduce discriminative power on retrieval and similarity tasks.
  • Mechanism: the unembedding matrix contains the directions that actively "write" frequent tokens into embedding vectors; these directions form a low-dimensional subspace that is identifiable and removable. So what? This gives a clear, model-grounded target for denoising embeddings.
  • EmbedFilter: a simple linear transform that projects embeddings away from the identified subspace. So what? It improves zero-shot downstream metrics across multiple LLM backbones and, as a byproduct, allows reducing embedding dimensionality (smaller indexes) without losing refined quality, yielding faster retrieval.
  • Practical payoff: improved zero-shot semantic retrieval, reduced storage for vector indices, and retrieval speedups — achieved without retraining the base model.
Who it's for and tradeoffs

Great fit if you: need better zero-shot retrieval from an LLM without fine‑tuning; want a light, model-local postprocessing step to shrink indexes; or can access a model's unembedding matrix (e.g., open checkpoints). Look elsewhere if you: only have closed API access with no unembedding exposure, require end-to-end learned embedding objectives for specialized tasks, or expect nonlinear noise that a linear filter cannot remove.

Methodology (brief)

The authors analyze embeddings by projecting them into vocabulary space and identifying dominant directions correlated with token frequency. They compute a low-rank subspace from the model's unembedding matrix that corresponds to these directions, then apply a linear projection to remove that subspace from embeddings (EmbedFilter). Evaluation across multiple LLM backbones shows consistent zero-shot gains and permits reducing embedding dimensionality while retaining or improving performance. Implementation and experiments are available in the project's GitHub repository (linked from the paper).

This work is valuable because it links an observable embedding pathology to a concrete model component (the unembedding matrix) and provides a minimal, effective correction that is cheap to apply and easy to integrate into existing retrieval stacks.

Information

  • Websitearxiv.org
  • AuthorsSonghao Wu, Zhongxin Chen, Yuxuan Liu, Heng Cui, Cong Li, Rui Yan
  • Published date2026/06/05

More Items

Decides when past post-training updates should be reused for autonomous LLM adaptation by introducing Boundary-Calibrated Intervention Transfer (BCIT). BCIT binds effects to source context, checks applicability and hard conflicts, and runs bounded trials to obtain current-state evidence—reducing harmful updates and improving equal-budget final-model quality.

Converts a natural-language function specification into a reusable local neural function by using teacher models to synthesize examples and finetuning a small adapter for a compact interpreter. Achieves higher semantic accuracy (83.6% on FuzzyBench-Hard) at the cost of roughly one minute compile time; produces versionable PAW artifacts for local deployment.

Studies on-policy distillation (OPD) at the data-minimal limit by training on a single query, measuring state coverage and alignment dynamics, and showing OPD is often data-overfed but algorithm-starved.