Subtopic-aware View Sampling and Temporal Aggregation for Long-form Document Matching

Youchao Zhou, Heyan Huang, Zhijing Wu, Yuhang Liu, Xinglin Wang · OpenReview

TL;DR

Existing long-form document matching methods often suffer from "homologous bias," where models are misled by superficially similar subtopics while ignoring crucial mismatched context. To solve this, the authors introduce SST (Subtopic-aware view Sampling and Temporal aggregation), a framework that clusters sentences into distinct subtopics, samples diverse document "views," and trains the model by varying these views across epochs. This approach achieves state-of-the-art performance on news duplication and legal case retrieval tasks, outperforming even large language models.

What Problem Does This Paper Address?

Judging whether two long documents are relevant—such as identifying duplicate news stories or finding precedent in legal cases—is a challenging NLP task. Because long documents typically exceed the input limits of standard transformer models (like BERT), researchers usually truncate the text, use hierarchical models, or pre-select the most similar sentences to create a single "local view."

However, long documents naturally contain multiple subtopics. If a model only looks at the most highly aligned sentences, it can easily be tricked. For example, two different news articles might both heavily discuss the "Samsung Galaxy S8" (an aligned main subtopic), but one focuses on corporate business updates while the other leaks technical specifications. A model focusing only on the shared subtopic will incorrectly flag them as duplicates. To make an accurate judgment, the model needs a comprehensive view that includes both the main aligned subtopics and the complementary background subtopics that reveal the true differences.

Figure 1: An example (translated from Chinese) of the news duplication task. The two documents describe different news events (the label is “negative”) but have aligned main subtopics. Existing methods pre-select sentences to form a single extracted summary (document view) and assume a local view that contains the most aligned part is salient and sufficient for the task. Learning such a homologous view with similar sentences may mislead the model. On the con- trary, representative views combined with aligned subtopics and proper complementary subtopics indicate a mismatched relationship.

Methods

The authors propose the SST framework, which shifts away from static content selection toward a dynamic, subtopic-aware training strategy. The pipeline consists of three main phases:

  1. Document Pair Subtopic Discovery: Sentences from both documents are pooled and clustered together to map out shared (aligned) and unique (complementary) subtopics. The paper introduces two ways to do this:
  2. Direct Clustering: Uses traditional Spectral Clustering based on TF-IDF/TextRank sentence similarities.
  3. Adaptive Clustering: Uses a pre-trained language model and a Graph Attention Network (GAT) optimized with custom unsupervised losses ($L_p$ and $L_n$) to make subtopic boundaries more distinct for positive and negative pairs.
  4. View Sampling: Instead of creating one summary, SST samples sentences across the discovered clusters to generate multiple distinct "views" of the document pair. They experiment with Uniform, Hard (focusing on the largest aligned clusters), and Soft sampling (balancing alignment and document-specific subtopic importance).
  5. Temporal Aggregation: Rather than combining all these views simultaneously using standard "spatial" methods like attention—which can introduce redundant noise—SST introduces temporal aggregation. Inspired by Dropout, the model is fed a different sampled view of the document pair at each training epoch. This forces the model to gradually learn from heterogeneous details across the entire document structure over time. During inference, multiple views are sampled, and their scores are aggregated via max-pooling (for classification) or mean-pooling (for ranking).
Figure 2: The comparison of different model architectures.

Datasets

The framework was evaluated across two distinct domains using four established datasets:

  • News Duplication: Evaluated on the CNSE (identifying identical breaking news events) and CNSS (identifying if articles belong to the same broader news series) datasets.
  • Legal Case Retrieval: Evaluated on LeCaRDv2 (a large-scale Chinese legal case retrieval dataset) and COLIEE 2023 (an international competition dataset for legal information extraction).

Key Insights and Ideas

  • The Danger of Homology: Relying solely on the most similar parts of a document pair creates biased modeling. Including lower-similarity, complementary subtopics provides the necessary context to identify subtle mismatches.
  • Spatial vs. Temporal Aggregation: Heterogeneous and noisy text segments are difficult for standard attention mechanisms to process all at once. By treating different document views as dynamic inputs across training epochs (temporal aggregation), the framework acts as an effective regularizer and implicit ensemble mechanism.
  • Soft Sampling Wins: In evaluations, Soft Sampling consistently beat Hard Sampling. This proves that a moderate mix of both highly aligned core topics and diverse background details yields the most robust document representations.

Key Results

SST demonstrated significant performance gains over a wide array of baselines:

  • News Duplication: On the CNSE dataset, BERT + SST achieved an F-1 score of 86.45%, outperforming the previous state-of-the-art content selection model, Match-Ignition (84.55%).
  • Beating LLMs: Supervised fine-tuning of a large model (Baichuan-7B) achieved a 92.22% F-1 on CNSS, but required massive parameters. Meanwhile, the much smaller BERT + SST framework achieved a highly competitive 93.58% F-1. Zero-shot GPT-4 trailed significantly behind at 80.72% due to the domain-specific nature of keyword overlap in negative pairs.
  • Legal Case Retrieval: When applied on top of SAILER (a structure-aware legal language model), SST pushed the NDCG@10 on LeCaRDv2 from 50.87% to 53.19%, showing that subtopic sampling provides orthogonal benefits to specialized domain encoders.

Limitations and Future Work

The authors note that vanilla content selection methods can sometimes disrupt the continuous text flow, which might harm the contextual knowledge captured during a language model's pre-training phase. While temporal aggregation mitigates this by exposing the model to different variations of the text, the framework still relies heavily on the quality of the initial sentence embeddings to form accurate subtopic clusters. Future work could explore tighter end-to-end integration between the clustering head and the document matching model.

Summary updated

BibTeX
@misc{zhou2024subtopic,
  author = {Youchao Zhou and Heyan Huang and Zhijing Wu and Yuhang Liu and Xinglin Wang},
  title = {{Subtopic-aware View Sampling and Temporal Aggregation for Long-form Document Matching}},
  year = {2024},
  eprint = {2412.07573},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.07573},
}
Figure