Table of Contents
Fetching ...

Quantifying Positional Biases in Text Embedding Models

Reagan J. Lee, Samarth Goel, Kannan Ramchandran

TL;DR

This work investigates why text embeddings pay disproportionate attention to the beginning of long documents. By applying needle-in-a-haystack insertions, removals, and regression analyses across eight embedding models with APE, RoPE, and ALiBi encodings, the authors reveal a consistent early-content bias that persists even after dataset randomization. They quantify this bias with high $R^2$ from sentence-based reconstructions and show that positional effects correlate with sentence position, suggesting truncation during training as a key cause. The findings have practical implications for information retrieval and long-context processing, motivating design changes to positional encoding and context-extension strategies to improve robustness.

Abstract

Embedding models are crucial for tasks in Information Retrieval (IR) and semantic similarity measurement, yet their handling of longer texts and associated positional biases remains underexplored. In this study, we investigate the impact of content position and input size on text embeddings. Our experiments reveal that embedding models, irrespective of their positional encoding mechanisms, disproportionately prioritize the beginning of an input. Ablation studies demonstrate that insertion of irrelevant text or removal at the start of a document reduces cosine similarity between altered and original embeddings by up to 12.3% more than ablations at the end. Regression analysis further confirms this bias, with sentence importance declining as position moves further from the start, even with with content-agnosticity. We hypothesize that this effect arises from pre-processing strategies and chosen positional encoding techniques. These findings quantify the sensitivity of retrieval systems and suggest a new lens towards embedding model robustness.

Quantifying Positional Biases in Text Embedding Models

TL;DR

This work investigates why text embeddings pay disproportionate attention to the beginning of long documents. By applying needle-in-a-haystack insertions, removals, and regression analyses across eight embedding models with APE, RoPE, and ALiBi encodings, the authors reveal a consistent early-content bias that persists even after dataset randomization. They quantify this bias with high from sentence-based reconstructions and show that positional effects correlate with sentence position, suggesting truncation during training as a key cause. The findings have practical implications for information retrieval and long-context processing, motivating design changes to positional encoding and context-extension strategies to improve robustness.

Abstract

Embedding models are crucial for tasks in Information Retrieval (IR) and semantic similarity measurement, yet their handling of longer texts and associated positional biases remains underexplored. In this study, we investigate the impact of content position and input size on text embeddings. Our experiments reveal that embedding models, irrespective of their positional encoding mechanisms, disproportionately prioritize the beginning of an input. Ablation studies demonstrate that insertion of irrelevant text or removal at the start of a document reduces cosine similarity between altered and original embeddings by up to 12.3% more than ablations at the end. Regression analysis further confirms this bias, with sentence importance declining as position moves further from the start, even with with content-agnosticity. We hypothesize that this effect arises from pre-processing strategies and chosen positional encoding techniques. These findings quantify the sensitivity of retrieval systems and suggest a new lens towards embedding model robustness.

Paper Structure

This paper contains 32 sections, 3 equations, 7 figures, 4 tables.

Figures (7)

  • Figure 1: Cosine similarity vs. needle size and position
  • Figure 2: Regression coefficients vs. sentence position, bucketed by document length
  • Figure :
  • Figure :
  • Figure :
  • ...and 2 more figures