Typo-Robust Representation Learning for Dense Retrieval
Abstract Dense retrieval (DR) models are highly effective for information retrieval but suffer from significant performance degradation when faced with query typos. This paper introduces Dual Self-Teaching (DST), a novel framework designed to enhance typo-robustness without sacrificing performance on clean queries. DST leverages query augmentation and a bidirectional learning objective to ensure that misspelled queries are both aligned with their clean counterparts and effectively contrasted against irrelevant documents. Experimental results on MS MARCO and DL-typo benchmarks demonstrate that DST significantly outperforms existing state-of-the-art methods, providing a robust solution for real-world search applications.
Introduction
Dense Retrieval (DR) has become a cornerstone of modern search engines, mapping queries and documents into a shared vector space to determine relevance. However, these models are notoriously sensitive to character-level noise. A single typo can shift a query's embedding into a "semantic wasteland," leading to retrieval failure. While previous approaches focused on aligning misspelled query embeddings with clean ones, they often neglected the contrastive property—the ability to distinguish between semantically distinct queries. This lack of contrast can lead to "blurry" representations and reduced precision.
Methodology
The Dual Self-Teaching (DST) framework addresses these challenges through a three-stage pipeline:
1. Query Augmentation
For each clean query, 40 variations are generated using diverse typo generators (e.g., character insertion, deletion, swapping). This creates a comprehensive neighborhood of potential errors for the model to learn from.
2. Similarity Score Calculation
DST calculates similarity in two directions: passage retrieval (query-to-passage) and query retrieval (passage-to-query). This bidirectional approach is crucial for maintaining contrast, as it forces the model to learn which specific query a passage belongs to, even among similar-looking misspelled versions.
3. Dual Self-Teaching Loss
The core innovation is a loss function combining Dual Cross-Entropy ($L_{DCE}$) and Dual KL-Divergence ($L_{DKL}$):
- $L_{DCE}$ enforces both alignment (matching queries to passages) and contrast (distinguishing between different queries).
- $L_{DKL}$ ensures the score distribution of misspelled queries matches that of their clean versions, treating the clean query as a "teacher."
Key Insights
- Contrast is the Missing Link: Bidirectional training (passage-to-query) provides the necessary "push" to keep typo embeddings away from irrelevant passages, preventing representation collapse.
- Stability via Stop-Gradient: Applying a stop-gradient to clean query distributions allows them to act as a stable teacher, forcing misspelled "student" queries to adapt without degrading the clean query's performance.
- Optimal Augmentation: Performance gains from typo variations plateau around $K=40$, balancing robustness with training efficiency.
Experimental Results
DST was evaluated on MS MARCO (with synthetic typos) and DL-typo (real-world typos) using BERT and CharacterBERT architectures.
- MS MARCO: DST achieved an MRR@10 of 0.260, a significant improvement over the DPR baseline (0.143) and previous best methods like Self-Teaching (0.237).
- DL-typo: When paired with CharacterBERT, DST reached an nDCG@10 of 0.529, nearly doubling the baseline performance (0.268) on real-world misspelled queries.
- No "Typo Tax": Notably, DST maintains or even slightly improves retrieval performance on correctly spelled queries, avoiding the performance trade-offs common in other robust models.
Conclusion
Dual Self-Teaching provides a powerful framework for building typo-robust dense retrieval systems. By integrating bidirectional contrastive learning with self-teaching, it achieves superior robustness on noisy inputs while preserving high precision on clean data. Future work includes extending these techniques to non-English scripts and exploring robustness to other forms of linguistic noise like grammatical errors or colloquialisms.
Summary updated