Abstract
Multi-Domain Text Classification (MDTC) aims to improve classification performance across multiple domains by leveraging shared knowledge. While existing shared-private adversarial models have shown empirical success, they often lack rigorous theoretical foundations. This paper introduces a new generalization bound for MDTC based on "margin discrepancy," a metric tailored to the decision boundaries of classifiers. Building on this theory, we propose Margin Discrepancy-based Adversarial Training (MDAT). MDAT utilizes a minimax optimization strategy with an auxiliary classifier to align domain distributions toward a central distribution. Experimental results on the Amazon Review and FDU-MTL benchmarks demonstrate that MDAT achieves state-of-the-art performance and generalizes effectively to unseen domains.
Introduction
In traditional supervised learning, a fundamental assumption is that training and test data are drawn from the same underlying distribution. In practice, however, this assumption is frequently violated. In the context of sentiment analysis, for instance, the word "fast" may carry positive connotations for a vehicle ("it runs fast") but negative connotations for a battery ("it runs out fast"). Such distribution shifts across different domains pose a significant challenge for natural language processing models.
Multi-Domain Text Classification (MDTC) addresses this by sharing knowledge across multiple domains (e.g., Books, Electronics, Kitchen) to improve accuracy, particularly for domains with limited labeled data. While adversarial training has become a popular approach for learning domain-invariant features, many existing methods rely on heuristic "tricks" rather than theoretical guarantees. This paper bridges the gap between theory and practice by introducing a framework based on margin discrepancy.
Theoretical Framework: Margin Discrepancy
The authors decompose the MDTC problem into multiple simultaneous domain adaptation tasks. To provide a solid foundation for their approach, they establish a new generalization bound using Rademacher complexity.
Unlike standard distance metrics such as $f$-divergence, which measure the distance between distributions in a general sense, the authors employ Margin Discrepancy. This metric is specifically designed for classifiers; it measures the divergence between domains by analyzing the "margin"—the gap between the probability of the correct class and the next most likely class. Theoretically, the authors demonstrate that the optimal state for MDTC occurs when all domain distributions align with a single "centroid" distribution, minimizing the overall margin discrepancy.
The MDAT Algorithm
Based on this theoretical derivation, the authors propose the Margin Discrepancy-based Adversarial Training (MDAT) architecture. The model consists of three primary components:
- Feature Extractors: The architecture employs a dual-extractor system. A shared extractor identifies domain-invariant features common to all tasks, while domain-specific extractors capture the unique nuances of individual domains.
- Adversarial Setup: The model uses two classifiers: a main classifier ($C$) and an auxiliary classifier ($C'$).
- Minimax Optimization: The training process is structured as a "cat-and-mouse" game. The auxiliary classifier is trained to maximize the margin discrepancy between the source domains and the calculated centroid distribution. Simultaneously, the feature extractors are trained to minimize this discrepancy. This adversarial process forces the model to learn features that are not only similar across domains but also highly discriminative, maintaining a clear margin of confidence regardless of the input domain.
Experimental Evaluation
MDAT was evaluated on two major MDTC benchmarks to test its robustness across different data representations:
- Amazon Review Dataset: A benchmark featuring four domains (Books, DVDs, Electronics, Kitchen) using 5,000-dimensional bag-of-features vectors.
- FDU-MTL Dataset: A more complex dataset comprising 16 domains (e.g., Apparel, IMDB). For this dataset, raw text was used, and Convolutional Neural Networks (CNNs) served as the feature extractors.
Key Results
MDAT consistently outperformed previous state-of-the-art (SOTA) methods, including MAN and DACL:
- Amazon Dataset: MDAT achieved an average accuracy of 87.43%, a notable improvement over the previous best of 86.59%.
- FDU-MTL Dataset: The model reached an average accuracy of 89.6%, outperforming baselines in 13 out of the 16 individual domains.
- Unsupervised Adaptation: The authors also tested the model in a Multi-Source Unsupervised Domain Adaptation (MS-UDA) setting, where the target domain has zero labels during training. MDAT maintained its lead over competitors, demonstrating superior generalization to completely unseen data.
Discussion and Limitations
A critical insight from the study is the importance of the margin parameter, $eta$. Ablation studies revealed that $eta$ is a sensitive hyperparameter: if set too low, the model fails to learn sufficient domain-invariant features; if set too high, classification performance degrades. Finding the optimal "sweet spot" for $eta$ is essential for the model's success.
While MDAT provides a rigorous theoretical foundation and achieves SOTA results on standard benchmarks, the authors note that specialized methods incorporating additional architectural "bells and whistles" (such as MBF or CRAL) may still outperform MDAT in specific niche metrics. However, the strength of MDAT lies in its theory-driven design, where every component of the loss function is derived directly from the mathematical generalization bound.
Conclusion
MDAT represents a significant step forward in Multi-Domain Text Classification by grounding adversarial training in the theory of margin discrepancy. By aligning domain distributions toward a centroid and focusing on decision margins, the model achieves robust performance across diverse text classification tasks. Future work may extend these theoretical insights to more complex scenarios, such as multi-class or multi-label cross-domain problems.
Summary updated