Abstract
Dense retrieval (DR) models often struggle with generalization when applied to out-of-distribution domains. This paper introduces BERM (Balanced and Extractable Representation for Matching), a training methodology designed to bridge the generalization gap by enforcing fine-grained matching constraints. BERM requires document representations to be semantically balanced across constituent units and ensures that specific matching units are extractable during training. Experimental results on benchmarks like BEIR and OAG-QA demonstrate that BERM significantly enhances zero-shot performance across various base models without increasing inference latency.
Introduction
Modern search systems increasingly rely on dense retrieval (DR) to map queries and documents into a shared vector space for efficient similarity matching. While effective on in-domain data, these dual-encoder models often exhibit a significant "generalization gap" when deployed in specialized fields such as medicine or law. This failure stems from standard training objectives being too "coarse-grained," leading models to overfit to broad domain biases rather than learning universal matching signals. BERM addresses this by incorporating fine-grained matching "wisdom" into the training process of fast dual-encoders.
Methods
BERM introduces a novel training strategy that treats a passage not as a single blob of text, but as a collection of "units" (sentences). It applies two key requirements during the training phase:
- R1: Semantic Unit Balance ($\mathcal{L}_{balance}$): This constraint ensures the final document vector doesn't ignore parts of the text. By using a KL-divergence loss, the model is forced to represent the semantics of every sentence in the passage in a balanced way.
- R2: Essential Matching Unit Extractability ($\mathcal{L}_{extract}$): The authors use an automated annotator to identify which sentence in a passage is the "essential matching unit" for a given query. They then train the model to ensure that a temporary "matching representation" can successfully "point" to that specific sentence.
Crucially, these constraints are only used during training. At inference, the model remains a standard dual-encoder, providing the improved accuracy of a more complex model with the high speed of a simple dot-product search.
Results and Key Insights
The researchers evaluated BERM using the MS-MARCO dataset for training and the BEIR and OAG-QA benchmarks for zero-shot testing.
Consistent Performance Gains
On the BEIR benchmark, BERM improved the average nDCG@10 across all base training methods. For example, it boosted the vanilla DPR method from 0.368 to 0.379. In domain adaptation settings, BERM outperformed high-profile baselines like COCO-DR and GPL on 7 out of 14 BEIR datasets, despite those baselines using more complex procedures.
Domain Invariance and Orthogonality
The "matching signal" (how a query relates to specific evidence) is a domain-invariant feature. By forcing the model to find specific sentences, it learns the logic of matching rather than just memorizing domain-specific vocabulary. Interestingly, BERM makes the embeddings of different sentences within a passage more "orthogonal" (perpendicular), effectively spreading out information in vector space to make it easier for a query vector to pick out relevant parts.
Conclusion
BERM provides a robust, plug-and-play training strategy to improve the generalization of dense retrieval models. By focusing on fine-grained matching signals and semantic balance, it achieves state-of-the-art zero-shot performance. While the method relies on automated annotators, its ability to improve various base models (DPR, ANCE, KD) makes it a versatile tool for building domain-agnostic search systems.
Summary updated