When Does Label-Free Deconfounding of Document Embeddings Work?

Anna Kiepura, Yingqiang Gao, Elliott Ash, Yu FanarXiv 2026

TL;DR

This paper explores how to remove "nuisance" attributes (like language or source provenance) from document embeddings without using any labels. The authors find that simple geometric methods like PCA and $k$-means clustering can often match the performance of metadata-supervised techniques, significantly improving semantic search and retrieval even when some "noise" remains recoverable.

What Problem Does This Paper Address?

Modern document embeddings (like those from E5 or MiniLM) are powerful tools for semantic search. However, they don't just encode meaning; they also pick up "spurious attributes" or confounders—things like the document's language, its source (e.g., Wikipedia vs. a legal brief), or the author's writing style.

In a heterogeneous corpus, these confounders can distort results. For example, a search engine might group two documents together simply because they are both from the same news outlet, rather than because they discuss the same topic. While we can use "concept erasure" (like the LEACE algorithm) to scrub this info if we have metadata labels, those labels are frequently missing, incomplete, or unreliable. This paper asks: Can we discover and suppress these nuisance structures using only the embeddings themselves?

Methods

The researchers systematically compare three label-free approaches against a "Raw" (unprocessed) baseline and a "Metadata-LEACE" (supervised) reference:

  1. PCA-r Removal: A simple geometric baseline that removes the top $r$ principal components of the embedding space, assuming the "noise" accounts for the most variance.
  2. $k$-means LEACE: The authors cluster the embeddings using $k$-means and treat the cluster assignments as "pseudo-labels" to feed into the LEACE (Linear Erasure) algorithm.
  3. SAE-LEACE: This is the most complex approach. It uses Sparse Autoencoders (SAEs) to learn a dictionary of features. They then select specific "confounder-like" features (using mutual information with clusters) and erase them.

The study is unique because it disentangles discovery (finding the confounder) from intervention (the act of removing it), allowing the authors to pinpoint exactly why a method succeeds or fails.

Datasets

The study evaluates these methods across six diverse corpora with different types of confounders:

  • Language-based: SemEval (4 languages), SwiLTra (3 languages), and Fedlex (3 languages).
  • Source-based: SCOTUS (Oyez/Lexis/Wiki), CAP (Bills/Orders/News), and Bills-Tweets.
  • Transfer Evaluation: To test if the "cleaned" embeddings still work in the real world, they evaluated them on five MTEB legal retrieval tasks and the STSBenchmark.

Key Insights and Ideas

  • Discovery $\neq$ Intervention: Just because you can "find" a confounder in the geometry doesn't mean your method for removing it will work. Conversely, you can improve semantic utility even if you don't perfectly erase the confounder.
  • The "Aha" of Geometric Alignment: PCA works surprisingly well, but only if the confounder is aligned with the directions of highest variance. On some models (like E5), the language signal is massive and easy to find with PCA; on others (like MiniLM), it’s "hidden" in lower-variance directions, making PCA fail where $k$-means or SAEs might succeed.
  • Linear vs. Nonlinear Leakage: This is a crucial warning. Even when a linear tool (like LEACE) makes a confounder invisible to linear probes (ROC-AUC $\approx$ 0.5), a nonlinear model (like a multi-layer perceptron) can often still "see" the noise. Linear erasure is not a total cure.
  • Utility vs. Suppression: You don't need to reach "zero leakage" to see a massive jump in retrieval performance. In many cases, $k$-means LEACE matched the supervised version's retrieval accuracy despite leaving more residual noise behind.

Key Results

  • Label-free works: All three methods improved mean semantic utility over raw embeddings across the board.
  • $k$-means is a "Best Buy": On the trilingual SwiLTra dataset, $k$-means LEACE matched the supervised reference perfectly (Retrieval R@10 of 0.969).
  • SAE Power: SAE-LEACE often achieved the strongest noise reduction in challenging settings (like the CAP dataset), though this didn't always translate to the highest semantic utility.
  • Model Dependency: Success is highly dependent on the embedding model's geometry. For example, PCA-1 reduced linear noise on SCOTUS from 1.00 to 0.88 for E5-small, but did absolutely nothing for MiniLM.

Limitations and Future Work

  • Scope of Confounders: The study focused on language and source. It remains to be seen if these methods work for more subtle confounders like sentiment, gender bias, or specific author identities.
  • Linearity: The interventions were restricted to affine (linear) transformations. The authors note that substantial nonlinear information remains, suggesting a need for nonlinear deconfounding techniques.
  • The "Selection" Problem: While the erasure is label-free, the authors still used labels post-hoc to evaluate which rank or budget was best. Developing a truly label-free way to select the optimal "strength" of erasure remains an open challenge.

Summary updated

Abstract

Document embeddings encode spurious attributes that can distort semantic comparisons; yet supervised erasure requires metadata that is often unavailable. We systematically investigate label-free deconfounding across corpora and embedding models. Our results show that label-free methods improve semantic utility over unprocessed embeddings, while simple geometric approaches recover much of the supervised benefit, sometimes matching metadata-supervised erasure in linear confounder recoverability and semantic utility. We identify two distinct causes of ineffective erasure: poor proxy-confounder alignment and insufficient intervention coverage. Crucially, confounder recoverability and semantic utility are distinct dimensions of deconfounding success: utility can improve despite residual confounder information, while stronger suppression does not necessarily improve utility. Moreover, reduced linear recoverability can coexist with substantial nonlinear recoverability. Together, these findings distinguish confounder discovery from intervention effectiveness and highlight the importance of evaluating nuisance suppression alongside semantic preservation.
BibTeX
@misc{kiepura2026when,
  author = {Anna Kiepura and Yingqiang Gao and Elliott Ash and Yu Fan},
  title = {{When Does Label-Free Deconfounding of Document Embeddings Work?}},
  year = {2026},
  eprint = {2611.19350},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.19350},
}
Figure