Efficient Document Embeddings via Self-Contrastive Bregman Divergence Learning

Daniel Saggau, Mina Rezaei, Bernd Bischl, Ilias Chalkidis

Introduction

Generating high-quality embeddings for long-form documents remains a significant challenge in natural language processing. While Transformer-based models like BERT have revolutionized sentence-level representations, their application to documents spanning thousands of words is hindered by the quadratic complexity of self-attention and the tendency for representations to "collapse" into generic, non-informative vectors. This paper presents a novel framework that combines sparse-attention architectures with a self-contrastive learning objective enhanced by functional Bregman divergence. The resulting model achieves performance levels competitive with full end-to-end fine-tuning while significantly reducing computational overhead.

The Challenge of Long-Form Representation

Standard Transformer models face a "quadratic bottleneck," where memory and computational requirements grow exponentially with sequence length. While "sparse" models like the Longformer mitigate this by using sliding-window attention, they remain expensive to fine-tune for specific downstream tasks.

Beyond computational limits, long documents often contain irrelevant noise or multiple distinct topics. This complexity frequently leads to representation collapse, a phenomenon where the model's mathematical summary of a document becomes too generic to be useful for classification or retrieval. To address this, there is a pressing need for "out-of-the-box" encoders that can produce robust representations without requiring massive compute for every new domain.

Proposed Methodology

The authors introduce a three-part architecture designed for efficiency and feature diversity:

1. Base Architecture

The framework utilizes a Domain-Adapted Longformer as the backbone. This model employs a sliding-window attention mechanism, allowing it to process up to 4,096 tokens—significantly more than the standard 512-token limit of BERT—while maintaining manageable memory usage.

2. Self-Contrastive Learning (SimCSE)

To train the model without extensive labeled data, the researchers employ a self-contrastive approach (SimCSE). The model is tasked with recognizing that two different "views" of the same document—created by varying the internal dropout masking—should result in similar embeddings. Conversely, embeddings from different documents are pushed apart in the vector space.

3. Functional Bregman Divergence

The core innovation lies in the addition of an ensemble of $k$-independent subnetworks optimized using functional Bregman divergence. This mathematical tool measures the "distance" between distributions and is used here to force the different subnetworks to capture diverse, non-redundant features. By penalizing similarity between the subnetworks' outputs, the model is prevented from becoming "lazy" and focusing only on the most obvious patterns, thereby capturing a more holistic view of the document's semantic content.

Experimental Evaluation

Datasets

The study evaluated the model on three demanding long-form domains:

  • ECtHR: 11,000 legal cases from the European Court of Human Rights (Average length: 1,613 words).
  • SCOTUS: 4,700 cases from the US Supreme Court (Average length: 5,853 words).
  • MIMIC: 50,000 medical discharge summaries (Average length: 1,621 words).

These datasets represent documents 10 to 50 times longer than the typical sentences used to train standard encoders.

Performance and Efficiency

The Longformer + SimCSE + Bregman model consistently outperformed standard baselines. On the SCOTUS dataset, the model achieved a Micro-F1 score of 71.4. Remarkably, this performance was within 4 percentage points of the "ceiling" established by full end-to-end fine-tuning, despite the proposed method only training a small "head" comprising 0.5% of the total parameters.

In terms of efficiency, the training process was 2x to 8x faster than traditional fine-tuning. The model also demonstrated superior performance in "few-shot" scenarios, suggesting that the Bregman-enhanced representations are more robust and generalizable when labeled data is scarce.

Discussion and Limitations

While the results are promising, the authors identify several areas for future research. The study focused on small-to-medium models (up to 134M parameters); it is currently unknown if these contrastive techniques will scale effectively to Large Language Models (LLMs) with billions of parameters. Additionally, while the model excels at topic classification, its utility in other complex tasks such as document ranking or information retrieval requires further investigation.

Conclusion

By integrating functional Bregman divergence into a self-contrastive learning framework, the researchers have developed a highly efficient method for generating long-document embeddings. This approach effectively combats representation collapse and offers a parameter-efficient alternative to full fine-tuning, making high-quality document analysis more accessible in resource-constrained environments.

Summary updated

BibTeX
@inproceedings{saggau2023efficient,
  author = {Daniel Saggau and Mina Rezaei and Bernd Bischl and Ilias Chalkidis},
  title = {{Efficient Document Embeddings via Self-Contrastive Bregman Divergence Learning}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.771},
}
Figure