A General Regularization Framework for Domain Adaptation

Wei Lu, Hai Leong Chieu, Jonathan LöfgrenEMNLP 2016

Domain adaptation—the art of training a model on one set of data (like news articles) and making it work on another (like Twitter posts)—has long relied on clever "hacks." One of the most famous is the "Frustratingly Easy Domain Adaptation" (FEDA) trick, which involves duplicating features into "general" and "domain-specific" versions.

In this paper, Wei Lu and colleagues move beyond the "tricks" to provide a rigorous mathematical foundation. They propose a general regularization framework that not only explains why FEDA works but also offers a more flexible way to control how knowledge is shared between domains.

TL;DR

The authors propose a novel regularization framework for domain adaptation that mathematically generalizes popular techniques like FEDA and multi-task learning. By treating domain adaptation as a problem of constraining model parameters to stay "close" to one another, they provide a flexible system that allows practitioners to encourage transfer between similar domains while preventing "negative transfer" between distant ones.

What Problem Does This Paper Address?

In machine learning, we often have data from multiple related but distinct sources (domains). A model trained on "Books" might struggle on "Electronics" because the vocabulary and sentiment cues differ.

The challenge is Domain Adaptation (DA): how do we leverage data from all domains to improve performance on each?

  1. FEDA (Frustratingly Easy DA): A popular baseline that uses feature augmentation. It’s effective but rigid; it treats all domains as equally related to a "general" domain.
  2. Negative Transfer: This happens when a model learns something from a very different domain that actually hurts its performance on the target domain.

The authors identified a gap: there was no unified framework that allowed practitioners to precisely tune the "strength" of the relationship between specific pairs of domains.

Methods

The core of the paper is a new objective function. Instead of just minimizing loss on each domain, they add two types of regularization terms:

  1. Within-domain regularization ($\eta_{0,i}$): Keeps the parameters for a specific domain from exploding (standard $L_2$ regularization).
  2. Between-domain regularization ($\eta_{j,k}$): Penalizes the squared distance between the parameter vectors of domain $j$ and domain $k$ ($||w_j - w_k||^2$).

The "Aha!" Moment: The authors provide a formal proof (Theorem 2.3) showing that the "feature augmentation" trick used in FEDA is actually a special case of this regularization framework. Specifically, FEDA is equivalent to setting the between-domain weights ($\eta$) to a specific function of the underlying regularization constants ($\lambda$).

By moving to this regularization perspective, the authors "unlock" the parameters. While FEDA forces a specific mathematical relationship between how domains interact, this framework allows you to set $\eta_{j,k}$ manually or via hyper-parameter tuning, providing much finer control.

Datasets

The authors evaluated their framework on two classic NLP tasks:

  • Named-Entity Recognition (NER): Using the ACE-2005 dataset, which contains 6 domains: broadcast conversations (bc), broadcast news (bn), conversational telephone speech (cts), newswire (nw), usenet (un), and weblog (wl).
  • Sentiment Classification: Using the Amazon review data, covering 4 domains: books, dvds, electronics, and kitchen appliances.

Key Insights and Ideas

  • FEDA is Regularization in Disguise: The most significant insight is the mathematical unification. FEDA isn't just a data-preprocessing trick; it's a specific way of forcing weight vectors to be similar.
  • Unreachable Configurations: The authors point out that FEDA has "unreachable" states. Because FEDA's implicit $\eta$ values are tied to each other, you can't use FEDA to say "Domain A is very similar to B, but B is totally different from C" without contradictions. The new framework removes these constraints.
  • Controlling Transfer: By tuning the $\eta_{j,k}$ parameters, you can explicitly prevent negative transfer. If you know the "Weblog" domain is noisy and unlike "News," you can set their mutual regularization weight to be very low.

Key Results

The authors compared their Regularization Framework (RF) against three baselines: TGT (training only on target data), ALL (pooling all data), and AUG (the FEDA approach).

  • NER Task: Using a Conditional Random Field (CRF), the RF approach achieved a macro-average F-score of 76.33, outperforming FEDA (75.92).
  • Sentiment Task: Using an SVM, the RF approach achieved an average accuracy of 84.63%, compared to FEDA's 84.25%.
  • Consistency: While the numerical gains over FEDA were sometimes modest (around 0.4–0.5%), the RF approach consistently outperformed the baselines across different models (CRF, Logistic Regression, SVM) and almost all individual domains.

Limitations and Future Work

  • Hyper-parameter Complexity: The primary downside is the number of parameters. With $N$ domains, there are $O(N^2)$ possible $\eta_{j,k}$ values to tune. For 6 domains, that's 21 parameters. The authors used random search to manage this, as an exhaustive grid search would be computationally impossible.
  • Optimization: The proof of equivalence is straightforward for convex loss functions. While the authors suggest it works for non-convex models (like deep learning), the behavior in those spaces is less theoretically certain.
  • Future Direction: The authors suggest looking for ways to automatically learn the optimal $\eta_{j,k}$ values from the data itself, rather than relying on manual tuning or random search.

Summary updated

BibTeX
@inproceedings{lu2016general,
  author = {Wei Lu and Hai Leong Chieu and Jonathan Löfgren},
  title = {{A General Regularization Framework for Domain Adaptation}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2016},
  url = {https://openreview.net/forum?id=SyZ6MzfOWB},
}
Figure