Abstract
Domain divergence plays a significant role in estimating the performance of a model in new domains. While there is a significant literature on divergence measures, researchers find it hard to choose an appropriate divergence for a given NLP application. We address this shortcoming by both surveying the literature and through an empirical study. We develop a taxonomy of divergence measures consisting of three classes — Information-theoretic, Geometric, and Higher-order measures — and identify the relationships between them. Further, to understand the common use-cases of these measures, we recognise three novel applications — 1) Data Selection, 2) Learning Representation, and 3) Decisions in the Wild — and use it to organise our literature. From this, we identify that Information-theoretic measures are prevalent for 1) and 3), and Higher-order measures are more common for 2). To further help researchers choose appropriate measures to predict drop in performance — an important aspect of Decisions in the Wild, we perform correlation analysis spanning 130 domain adaptation scenarios, 3 varied NLP tasks and 12 divergence measures identified from our survey. To calculate these divergences, we consider current contextual word representations (CWR) and contrast them with older distributed representations. We find that traditional measures over word distributions still serve as strong baselines, while higher-order measures with CWR are effective.
Introduction
Machine learning models are notoriously brittle; for instance, a sentiment classifier trained on movie reviews often fails when applied to healthcare data. This phenomenon, known as domain shift, necessitates robust methods for measuring the "distance" between data distributions. While numerous divergence measures exist, practitioners often lack guidance on which to select for specific Natural Language Processing (NLP) tasks. This paper bridges that gap by providing a comprehensive taxonomy and an empirical evaluation of domain divergence measures across 130 adaptation scenarios.
Taxonomy of Divergence Measures
The authors categorize divergence metrics into three primary families based on their mathematical foundations:
- Geometric: Simple vector-based distances such as Cosine similarity or the Euclidean (P-norm) distance.
- Information-Theoretic: Measures rooted in probability theory, including Kullback-Leibler (KL), Jensen-Shannon (JS), and Renyi divergences.
- Higher-Order: Metrics that capture the "shape" of data distributions through moments, such as Maximum Mean Discrepancy (MMD) and Proxy-A-Distance (PAD).
Literature Survey and Applications
To organize the vast literature, the study identifies three primary use-cases for these measures:
- Data Selection: Identifying the most relevant subset of source data to optimize training for a target domain.
- Learning Representations: Utilizing differentiable measures as loss functions to encourage the model to learn domain-invariant features.
- Decisions in the Wild: Predicting the expected performance drop of a model before deployment in a new environment.
The survey reveals that Information-theoretic measures are dominant in Data Selection and Decisions in the Wild, whereas Higher-order measures are preferred for Learning Representations due to their differentiability.
Empirical Analysis
The core of the research involves a large-scale empirical study calculating the correlation between 12 divergence measures and the actual performance drop of a DistilBERT model.
Datasets and Tasks
The analysis spans three diverse NLP tasks:
- Part-of-Speech (POS) Tagging: 8 domains from the Universal Dependencies (UD) corpus.
- Named Entity Recognition (NER): 8 domains including CoNLL-2003 and WNUT.
- Sentiment Analysis (SA): 5 product categories (e.g., Apparel, Books, Camera).
Key Insights
- Dataset Overlap: Silhouette scores and t-SNE visualizations demonstrate that datasets often overlap significantly; a "new" domain may contain many samples similar to the training data.
- Contextual Representations: For complex tasks like NER, higher-order measures (e.g., MMD) are superior as they capture nuanced relationships in high-dimensional embedding spaces.
- Robust Baselines: Traditional information-theoretic measures like JS-Divergence remain surprisingly strong predictors of performance drop, particularly for POS tagging.
Results and Recommendations
The correlation analysis (where higher values indicate better prediction of performance drop) yielded the following task-specific recommendations:
- POS Tagging: Proxy-A-Distance (PAD) (correlation: 0.477) and JS-Divergence are the top performers.
- NER: MMD with a Rational Quadratic kernel (correlation: 0.495) is most effective.
- Sentiment Analysis: Renyi-Divergence (correlation: 0.716) shows the strongest predictive power.
Overall, JS-Divergence is recommended as a versatile "all-rounder" baseline due to its symmetry and computational efficiency.
Conclusion
While this study provides a robust framework for English NLP, future work is needed to address label shift (where label meanings change) and multilingual transfer, where measuring divergence between different languages introduces additional complexity.
Summary updated