SeDR: Segment Representation Learning for Long Documents Dense Retrieval

Junying Chen, Qingcai Chen, Dongfang Li, Yutao Huang

TL;DR

This paper introduces SeDR, a novel approach for dense retrieval of long documents. SeDR tackles the limitations of current methods by proposing a "Segment-Interaction Transformer" to better represent long documents and a "Late-Cache Negative" strategy to overcome GPU memory constraints during training, leading to improved retrieval performance.

What Problem Does This Paper Address?

Information retrieval (IR) is crucial for tasks like web search and question answering. Dense Retrieval (DR) models, which use learned embeddings for semantic search, have shown great promise. However, they struggle with long documents due to Transformer models' quadratic complexity with input length and the limited capacity of a single embedding to capture diverse information. Existing solutions like truncating or splitting documents into segments and pooling results lead to information loss or ignore segment relationships. Furthermore, training DR models, especially for long documents, requires many negative examples, which are constrained by GPU memory, leading to insufficient training data.

Methods

SeDR addresses these challenges with two main innovations:

  • Segment-Interaction Transformer: This component encodes long documents by first splitting them into segments. Crucially, it then allows these segments to interact with each other through a modified self-attention mechanism. This "Segment-Interaction" allows segments to learn from each other's context, creating "document-aware segment representations" that retain more information than simple splitting and pooling. This approach maintains the Transformer's power while reducing complexity to linear with segment length.
  • Late-Cache Negative: To combat the issue of insufficient negative examples during training (especially for long documents which require more memory and thus smaller batch sizes), SeDR introduces "Late-Cache Negative." This strategy stores representations of queries and documents from previous training steps in a cache. These cached representations can be used as additional negatives without requiring gradients, thus bypassing GPU memory limitations and providing a cost-free way to increase the number of training negatives.

Datasets

The paper evaluates SeDR on two standard datasets for long document retrieval:

  • MS MARCO-Document: A large-scale dataset containing over 3 million documents, 367,000 training queries, and development sets.
  • TREC Deep Learning Track (TREC DL): Specifically, the 2019 and 2020 versions of the track, which provide queries with multiple relevant documents.

Key Insights and Ideas

  • Segment Interaction is Key: The core idea that segments within a long document are not independent and can benefit from interacting with each other is a significant insight. This contrasts with simpler methods that treat segments in isolation.
  • Balancing Representation and Efficiency: SeDR demonstrates that it's possible to achieve powerful document representations for long documents without resorting to computationally expensive global attention mechanisms or simply truncating information.
  • Negative Sampling is Crucial for Long Docs: The paper highlights that the limited number of negatives due to memory constraints is a bottleneck for training effective long document retrieval models. The Late-Cache Negative strategy directly addresses this.
  • T-SNE Visualizations Reveal Structure: The t-SNE plots showing segment embeddings are particularly insightful. They visually demonstrate how SeDR's segment embeddings are more spread out and document-aware compared to models with global attention, which tend to collapse, and SeDR-MaxP, which are arbitrarily diffused.

Key Results

  • Superior Performance: SeDR significantly outperforms existing dense retrieval models on both MS MARCO-Document and TREC DL datasets, achieving state-of-the-art results. For instance, on TREC 20' DL, SeDR achieves an MRR of 0.421, Recall@100 of 0.933, and NDCG@10 of 0.645.
  • Efficiency: SeDR achieves this performance with comparable or even better efficiency than other long-document models, particularly in terms of training time and index size.
  • Ablation Studies Confirm Contributions: Experiments show that both the Segment-Interaction Transformer and Late-Cache Negative components are crucial for SeDR's success. Removing either component leads to a performance drop.
  • Impact of Negative Sampling: The paper shows that the effectiveness of Late-Cache Negative is sensitive to cache size, with a sweet spot around C=50, and that the hardness of hard negatives also plays a role in balancing MRR and Recall.

Limitations and Future Work

  • Computational Cost of Long Documents: While SeDR is more efficient than some alternatives, encoding very long documents still presents computational challenges. The paper mentions that models using global attention or Longformer have higher training times and latency.
  • Hyperparameter Tuning: The performance of Late-Cache Negative is shown to be dependent on hyperparameters like cache size (C) and hardness (K). Further exploration into optimal settings for various tasks might be beneficial.
  • Generalization to Other Tasks: While SeDR excels at document retrieval, its effectiveness on other downstream IR tasks (e.g., passage retrieval, question answering) could be explored.
  • Further Exploration of Segment Interaction: The paper suggests that the Segment-Interaction Transformer is a promising direction. Future work could explore more sophisticated interaction mechanisms or different ways to represent segments.

Summary updated

Abstract

Recently, Dense Retrieval (DR) has become a promising solution to document retrieval, where document representations are used to perform effective and efficient semantic search. However, DR remains challenging on long documents, due to the quadratic complexity of its Transformer-based encoder and the finite capacity of a low-dimension embedding. Current DR models use suboptimal strategies such as truncating or splitting-and-pooling to long documents leading to poor utilization of whole document information. In this work, to tackle this problem, we propose Segment representation learning for long documents Dense Retrieval (SeDR). In SeDR, Segment-Interaction Transformer is proposed to encode long documents into document-aware and segment-sensitive representations, while it holds the complexity of splitting-and-pooling and outperforms other segment-interaction patterns on DR. Since GPU memory requirements for long document encoding causes insufficient negatives for DR training, Late-Cache Negative is further proposed to provide additional cache negatives for optimizing representation learning. Experiments on MS MARCO and TREC-DL datasets show that SeDR achieves superior performance among DR models, and confirm the effectiveness of SeDR on long document retrieval.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
MS MARCO · MARCO DevSeDR-MaxPMRR@1000.403Document Retrieval · split: val · params=125M · index-size=21G
Source quote
L168: SeDR-MaxP │ 0.403 │ 0.917 │ 0.611 │ 0.312 │ 0.594 │ 0.511 │ 15.8 │ 20.6 │ 125M │ 2.7
MS MARCO · MARCO DevSeDRMRR@1000.409Document Retrieval · split: val · params=125M · index-size=21G
Source quote
L172: SeDR │ 0.409 │ 0.921 │ 0.632 │ 0.343 │ 0.607 │ 0.527 │ 15.8 │ 20.7 │ 125M │ 2.7
TREC DL 2019 · TREC 19' DLSeDR-MaxPNDCG@100.611Document Retrieval · split: test · params=125M · index-size=21G
Source quote
L168: SeDR-MaxP │ 0.403 │ 0.917 │ 0.611 │ 0.312 │ 0.594 │ 0.511 │ 15.8 │ 20.6 │ 125M │ 2.7
TREC DL 2019 · TREC 19' DLSeDRNDCG@100.632Document Retrieval · split: test · params=125M · index-size=21G
Source quote
L172: SeDR │ 0.409 │ 0.921 │ 0.632 │ 0.343 │ 0.607 │ 0.527 │ 15.8 │ 20.7 │ 125M │ 2.7
TREC DL 2020 · TREC 20' DLSeDR-MaxPNDCG@100.594Document Retrieval · split: test · params=125M · index-size=21G
Source quote
L168: SeDR-MaxP │ 0.403 │ 0.917 │ 0.611 │ 0.312 │ 0.594 │ 0.511 │ 15.8 │ 20.6 │ 125M │ 2.7
TREC DL 2020 · TREC 20' DLSeDRNDCG@100.607Document Retrieval · split: test · params=125M · index-size=21G
Source quote
L172: SeDR │ 0.409 │ 0.921 │ 0.632 │ 0.343 │ 0.607 │ 0.527 │ 15.8 │ 20.7 │ 125M │ 2.7
BibTeX
@misc{chen2022sedr,
  author = {Junying Chen and Qingcai Chen and Dongfang Li and Yutao Huang},
  title = {{SeDR: Segment Representation Learning for Long Documents Dense Retrieval}},
  year = {2022},
  eprint = {2211.10841},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.10841},
}
Figure