The Medium Is Not the Message: Deconfounding Document Embeddings via Linear Concept Erasure

Yu Fan, Yang Tian, Shauli Ravfogel, Mrinmaya Sachan, Elliott Ash +1 more
7/1/2025
cs.CL

No official code found. Best implementation: y-fn/deconfounding-embeddings (8 stars, Apache-2.0, last commit 2026-03-19).

Abstract

Embedding-based similarity metrics between text sequences can be influenced not just by the content dimensions we most care about, but can also be biased by spurious attributes like the text's source or language. These document confounders cause problems for many applications, but especially those that need to pool texts from different corpora. This paper shows that a debiasing algorithm that removes information about observed confounders from the encoder representations substantially reduces these biases at a minimal computational cost. Document similarity and clustering metrics improve across every embedding variant and task we evaluate -- often dramatically. Interestingly, performance on out-of-distribution benchmarks is not impacted, indicating that the embeddings are not otherwise degraded.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

[EMNLP] The Medium is Not the Message: Deconfounding Document Embeddings via Linear Concept Erasure

80Python, Jupyter NotebookApr 14, 20257 months agoApache-2.0

Similar Papers

Cite this paper

@article{fan2025medium,
  title  = {The Medium Is Not the Message: Deconfounding Document Embeddings via Linear Concept Erasure},
  author = {Yu Fan and Yang Tian and Shauli Ravfogel and Mrinmaya Sachan and Elliott Ash and Alexander Hoyle},
  year   = {2025},
  eprint = {2507.01234},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.01234v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.01234.svg)](https://codeofpaper.com/paper/2507.01234)

Discussion