Analysis of Representations for Domain Adaptation

Shai Ben-DavidJohn BlitzerKoby CrammerFernando Pereira

article2006NeurIPS2,598 citations

Establishes a theoretical generalization bound for domain adaptation based on the A-distance between distributions, formalizing the fundamental trade-off between minimizing source classification error and learning aligned feature representations across domains.

Listen

Domain adaptation arises when a classifier trained on labeled data from a source domain must perform well on a target domain whose data distribution differs, as occurs frequently in natural language processing tasks such as part-of-speech tagging across financial news and biomedical abstracts. The core challenge is that standard learning theory assumes identical training and test distributions, yet real applications routinely violate this assumption while still sharing the same underlying task.

The article develops a theoretical bound on target-domain error for a classifier trained only on source labels and evaluates how different feature representations affect that bound. It combines finite-sample generalization results with a divergence measure (the A-distance) between the source and target distributions induced by a representation, under the assumption that a single hypothesis performs well on both domains.

The analysis shows that effective representations must simultaneously keep source training error low and reduce the A-distance between domains. Experiments on adapting a part-of-speech tagger from Wall Street Journal text to MEDLINE abstracts confirm that structural correspondence learning achieves both goals and yields the lowest target error, whereas identity features produce low source error but large domain divergence and random projections produce small divergence but high source error.

These results indicate that representation design for domain adaptation involves an explicit, quantifiable tradeoff rather than purely heuristic choices. They also justify existing successful heuristics and suggest that directly optimizing the bound terms could yield improved algorithms.

Further work should therefore focus on learning parametric representations that minimize a combination of source error and A-distance, together with empirical checks on the accuracy of the approximate divergence measure. The main limitations are that the divergence approximation does not supply a rigorous upper bound and that the experiments cover only one task and data pair, so the quantitative magnitudes observed may not generalize without additional validation.

Ben-David et al (2006).pdf
Cover for Analysis of Representations for Domain Adaptation

Abstract

Discriminative learning methods for classification perform well when training and test data are drawn from the same distribution. In many situations, though, we have labeled training data for a source domain, and we wish to learn a classifier which performs well on a target domain with a different distribution. Under what conditions can we adapt a classifier trained on the source domain for use in the target domain? Intuitively, a good feature representation is a crucial factor in the success of domain adaptation. We formalize this intuition theoretically with a generalization bound for domain adaption. Our theory illustrates the tradeoffs inherent in designing a representation for domain adaptation and gives a new justification for a recently proposed model. It also points toward a promising new model for domain adaptation: one which explicitly minimizes the difference between the source and target domains, while at the same time maximizing the margin of the training set.

Table of Contents

  • 1 Introduction
  • 2 Background and Problem Setup
  • 2.1 Domain Adaptation
  • 3 Generalization Bounds for Domain Adaptation
  • 3.1 The A -distance and labeling function complexity
  • 3.2 Bound on the target domain error
  • 4 Computing the A -distance for Signed Linear Classifiers
  • 5 Natural Language Experiments
  • 5.1 Random Projections
  • 5.2 Structural Correspondence Learning
  • 5.3 Results
  • 6 Discussion and Future Work
  • 7 Conclusions
  • References

Knowls

  1. Knowl 1 — Finite-Sample Target Generalization Bound for Domain Adaptation

    theoretical result

    Let X\mathcal{X} be the instance space, Z\mathcal{Z} be the feature space, and R:XZ\mathcal{R}: \mathcal{X} \to \mathcal{Z} be a fixed feature representation mapping. Let H{g:Z{0,1}}\mathcal{H} \subseteq \{g: \mathcal{Z} \to \{0,1\}\} be a hypothesis class of VC-dimension dd. Let DS\mathcal{D}_S and DT\mathcal{D}_T be the source and target instance distributions, and let D~S\tilde{\mathcal{D}}_S and D~T\tilde{\mathcal{D}}_T be the induced marginal distributions over Z\mathcal{Z} under R\mathcal{R}. Let f:X[0,1]f: \mathcal{X} \to [0, 1] be the labeling rule common to both domains with induced target function f~(z)=ED[f(x)R(x)=z]\tilde{f}(z) = \mathbb{E}_{\mathcal{D}}[f(x) \mid \mathcal{R}(x) = z], and suppose f~\tilde{f} is λ\lambda-close to H\mathcal{H}, meaning infhH[ϵS(h)+ϵT(h)]λ\inf_{h \in \mathcal{H}} [\epsilon_S(h) + \epsilon_T(h)] \le \lambda, where ϵS(h)=EzD~S[f~(z)h(z)]\epsilon_S(h) = \mathbb{E}_{z \sim \tilde{\mathcal{D}}_S} [|\tilde{f}(z) - h(z)|] and ϵT(h)=EzD~T[f~(z)h(z)]\epsilon_T(h) = \mathbb{E}_{z \sim \tilde{\mathcal{D}}_T} [|\tilde{f}(z) - h(z)|].

    If a labeled source sample of size mm is generated by applying R\mathcal{R} to a DS\mathcal{D}_S-i.i.d. sample labeled by ff, yielding empirical source error ϵ^S(h)\hat{\epsilon}_S(h), and U~S,U~T\tilde{U}_S, \tilde{U}_T are unlabeled samples of size mm' drawn i.i.d. from D~S\tilde{\mathcal{D}}_S and D~T\tilde{\mathcal{D}}_T respectively, then with probability at least 1δ1 - \delta over the choice of samples, for every hypothesis hHh \in \mathcal{H}:

    ϵT(h)ϵ^S(h)+4m(dlog2emd+log4δ)+λ+dH(U~S,U~T)+4dlog(2m)+log(4/δ)m\epsilon_T(h) \le \hat{\epsilon}_S(h) + \sqrt{\frac{4}{m} \left(d \log \frac{2em}{d} + \log \frac{4}{\delta}\right)} + \lambda + d_{\mathcal{H}}(\tilde{U}_S, \tilde{U}_T) + 4\sqrt{\frac{d \log(2m') + \log(4/\delta)}{m'}}

    where ee is the base of the natural logarithm and dH(U~S,U~T)d_{\mathcal{H}}(\tilde{U}_S, \tilde{U}_T) is the empirical A\mathcal{A}-distance over subsets induced by H\mathcal{H} on the unlabeled samples.

  2. Knowl 2 — Population Generalization Bound on Target Error

    theoretical result

    Let R:XZ\mathcal{R}: \mathcal{X} \to \mathcal{Z} be a fixed representation function from instance space X\mathcal{X} to feature space Z\mathcal{Z}, and let H{g:Z{0,1}}\mathcal{H} \subseteq \{g: \mathcal{Z} \to \{0,1\}\} be a hypothesis class of VC-dimension dd. Let DS\mathcal{D}_S and DT\mathcal{D}_T denote the source and target instance distributions, inducing feature distributions D~S\tilde{\mathcal{D}}_S and D~T\tilde{\mathcal{D}}_T under R\mathcal{R}. Let the labeling function f:X[0,1]f: \mathcal{X} \to [0, 1] induce f~(z)=ED[f(x)R(x)=z]\tilde{f}(z) = \mathbb{E}_{\mathcal{D}}[f(x) \mid \mathcal{R}(x)=z], with λ=infhH[ϵS(h)+ϵT(h)]\lambda = \inf_{h \in \mathcal{H}} [\epsilon_S(h) + \epsilon_T(h)]. If a labeled sample of size mm is drawn i.i.d. from DS\mathcal{D}_S, then with probability at least 1δ1 - \delta, every hHh \in \mathcal{H} satisfies:

    ϵT(h)ϵ^S(h)+4m(dlog2emd+log4δ)+dH(D~S,D~T)+λ\epsilon_T(h) \le \hat{\epsilon}_S(h) + \sqrt{\frac{4}{m} \left(d \log \frac{2em}{d} + \log \frac{4}{\delta}\right)} + d_{\mathcal{H}}(\tilde{\mathcal{D}}_S, \tilde{\mathcal{D}}_T) + \lambda

    where ϵ^S(h)\hat{\epsilon}_S(h) is the empirical training error on the source sample, ee is the base of the natural logarithm, and dH(D~S,D~T)d_{\mathcal{H}}(\tilde{\mathcal{D}}_S, \tilde{\mathcal{D}}_T) is the H\mathcal{H}-divergence between the induced source and target marginal distributions.

  3. Knowl 3 — A-Distance and H-Distance Between Probability Distributions

    definition

    Given a domain X\mathcal{X} and a collection A\mathcal{A} of measurable subsets of X\mathcal{X}, the A\mathcal{A}-distance between two probability distributions D\mathcal{D} and D\mathcal{D}' over X\mathcal{X} is defined as:

    dA(D,D)=2supAAPrD[A]PrD[A]d_{\mathcal{A}}(\mathcal{D}, \mathcal{D}') = 2 \sup_{A \in \mathcal{A}} |\Pr_{\mathcal{D}}[A] - \Pr_{\mathcal{D}'}[A]|

    When A\mathcal{A} is the family of characteristic subsets corresponding to a binary hypothesis class H\mathcal{H}, defined by {Zg={zZ:g(z)=1}:gH}\{Z_g = \{z \in \mathcal{Z} : g(z) = 1\} : g \in \mathcal{H}\}, the distance is denoted dH(D,D)d_{\mathcal{H}}(\mathcal{D}, \mathcal{D}').

  4. Knowl 4 — Equivalence of Empirical A-Distance to Domain Discrimination Error

    theoretical result

    Given two unlabeled finite samples U~S\tilde{U}_S and U~T\tilde{U}_T, each of size mm' drawn from induced distributions D~S\tilde{\mathcal{D}}_S and D~T\tilde{\mathcal{D}}_T over Z\mathcal{Z}, the task of discriminating whether a point originates from U~S\tilde{U}_S or U~T\tilde{U}_T using a classifier hHh \in \mathcal{H} has error:

    err(h)=12mi=12mh(zi)IziU~S\text{err}(h) = \frac{1}{2m'} \sum_{i=1}^{2m'} |h(z_i) - I_{z_i \in \tilde{U}_S}|

    where IziU~SI_{z_i \in \tilde{U}_S} is the indicator function for membership in the source sample U~S\tilde{U}_S. The empirical A\mathcal{A}-distance between the two samples over the hypothesis class H\mathcal{H} is directly related to the minimal discrimination error by:

    dA(U~S,U~T)=2(12minhHerr(h))d_{\mathcal{A}}(\tilde{U}_S, \tilde{U}_T) = 2 \left(1 - 2 \min_{h' \in \mathcal{H}} \text{err}(h')\right)

    Consequently, finding the subset in H\mathcal{H} that maximizes the distribution discrepancy is mathematically identical to finding a classifier in H\mathcal{H} that minimizes the binary classification error distinguishing the two domains.

  5. Knowl 5 — Lambda-Closeness of Target Labeling Function to Hypothesis Class

    assumption

    An induced labeling function f~:Z[0,1]\tilde{f}: \mathcal{Z} \to [0, 1] is defined to be λ\lambda-close to a hypothesis class H\mathcal{H} with respect to induced distributions D~S\tilde{\mathcal{D}}_S and D~T\tilde{\mathcal{D}}_T if:

    infhH[ϵS(h)+ϵT(h)]λ\inf_{h \in \mathcal{H}} [\epsilon_S(h) + \epsilon_T(h)] \le \lambda

    where ϵS(h)=EzD~S[f~(z)h(z)]\epsilon_S(h) = \mathbb{E}_{z \sim \tilde{\mathcal{D}}_S} [|\tilde{f}(z) - h(z)|] and ϵT(h)=EzD~T[f~(z)h(z)]\epsilon_T(h) = \mathbb{E}_{z \sim \tilde{\mathcal{D}}_T} [|\tilde{f}(z) - h(z)|]. This assumption formalizes domain adaptability: there must exist a single hypothesis hHh^* \in \mathcal{H} that achieves low error on both the source and target domains under the chosen feature representation.

  6. Knowl 6 — Approximation of A-Distance via Convex Surrogate Loss

    model/method

    Because finding the optimal hyperplane classifier minimizing 0-1 classification error between two distributions is NP-hard, the empirical A\mathcal{A}-distance dA(U~S,U~T)=2(12minhHerr(h))d_{\mathcal{A}}(\tilde{U}_S, \tilde{U}_T) = 2 (1 - 2 \min_{h' \in \mathcal{H}} \text{err}(h')) is approximated in practice by training a linear classifier to discriminate source from target instances using a convex upper bound on the error. Specifically, a linear discriminator is trained by minimizing modified Huber loss via stochastic gradient descent on the source vs. target discrimination task.

  7. Knowl 7 — Tradeoff Principle in Domain Adaptation Representation Design

    model/method

    The domain adaptation generalization bounds establish that an effective representation mapping R:XZ\mathcal{R}: \mathcal{X} \to \mathcal{Z} must simultaneously optimize two competing quantities:

    1. Low source empirical risk ϵ^S(h)\hat{\epsilon}_S(h) (or small classification loss) so the task remains learnable.
    2. Low domain discrepancy dH(D~S,D~T)d_{\mathcal{H}}(\tilde{\mathcal{D}}_S, \tilde{\mathcal{D}}_T) so the source-trained classifier generalizes to the target domain.

    Representations that optimize only one side of the tradeoff fail: preserving original distinct features yields low source error but maximal domain divergence, while unguided projections (e.g. random projections) reduce domain divergence but destroy task-discriminative information, leading to high source error.

  8. Knowl 8 — Experimental Comparison of Feature Representations for Domain Adaptation on POS Tagging

    data/table

    A part-of-speech (PoS) tagger was adapted from the Wall Street Journal (WSJ, financial news source domain) to MEDLINE (biomedical abstracts target domain) using linear projections into Rd\mathbb{R}^d (d=200d=200). Labeled training used 100 WSJ sentences (~2,500 words), and domain A\mathcal{A}-distance was estimated using 500,000 unlabeled words from each domain (1,000,000 words total) via modified Huber loss.

    Representation Huber loss A\mathcal{A}-distance Error
    Identity 0.003 1.796 0.253
    Random Proj 0.254 0.223 0.561
    SCL 0.070 0.211 0.216

    Identity representation achieves minimal training Huber loss (0.003) but near-maximal domain divergence (1.796) due to domain-specific vocabulary. Random projections yield low A\mathcal{A}-distance (0.223) but destroy discriminative task structure (Huber loss 0.254, target error 0.561). Structural Correspondence Learning (SCL) achieves both low Huber loss (0.070) and low A\mathcal{A}-distance (0.211), yielding the lowest target domain tagging error (0.216).

  9. Knowl 9 — Cross-Domain Part-of-Speech Tagging Adaptation Setup

    experimental setup

    The domain adaptation evaluation uses a part-of-speech (PoS) tagging task adapting from Wall Street Journal (WSJ) financial news (source domain with labeled data) to MEDLINE biomedical abstracts (target domain with no labeled training data). The original input representation consists of 3 million high-dimensional, sparse binary feature vectors. Representations are constructed by projecting these instances into Rd\mathbb{R}^d (d=200d=200) before training linear classifiers. The source training set consists of 100 sentences (~2,500 words) from WSJ. The unlabeled dataset for estimating domain A\mathcal{A}-distance consists of 500,000 words from WSJ and 500,000 words from MEDLINE (1,000,000 words total).

Coverage note — None was omitted; all key theoretical definitions, generalization bounds, algorithmic reductions, and empirical results are included.

References

  1. 1.R. Arriaga and S. Vempala. An algorithmic theory of learning robust concepts and random projection. In FOCS, volume 40, 1999.
  2. 2.T. Batu, L. Fortnow, R. Rubinfeld, W. Smith, and P. White. Testing that distributions are close. In FOCS, volume 41, pages 259–269, 2000.
  3. 3.J. Baxter. Learning internal representations. In COLT ’95: Proceedings of the eighth annual conference on Computational learning theory, pages 311–320, New York, NY, USA, 1995.
  4. 4.S. Ben-David, N. Eiron, and P. Long. On the difficulty of approximately maximizing agreements. Journal of Computer and System Sciences, 66:496–514, 2003.
  5. 5.S. Ben-David and R. Schuller. Exploiting task relatedness for multiple task learning. In COLT 2003: Proceedings of the sixteenth annual conference on Computational learning theory, 2003.
  6. 6.J. Blitzer, R. McDonald, and F. Pereira. Domain adaption with structural correspondence learning. In EMNLP, 2006.
  7. 7.K. Crammer, M. Kearns, and J. Wortman. Learning from data of variable quality. In Neural Information Processing Systems (NIPS), Vancouver, Canada, 2005.
  8. 8.W. Johnson and J. Lindenstrauss. Extension of lipschitz mappings to hilbert space. Contemporary Mathematics, 26:189–206, 1984.
  9. 9.D. Kifer, S. Ben-David, and J. Gehrke. Detecting change in data streams. In Very Large Databases (VLDB), 2004.
  10. 10.C. Manning. Foundations of Statistical Natural Language Processing. MIT Press, Boston, 1999.
  11. 11.D. McClosky, E. Charniak, and M. Johnson. Reranking and self-training for parser adaptation. In ACL, 2006.
  12. 12.M. Sugiyama and K. Mueller. Generalization error estimation under covariate shift. In Workshop on Information-Based Induction Sciences, 2005.
  13. 13.Y. W. Teh, M. I. Jordan, M. J. Beal, and D. M. Blei. Sharing clusters among related groups: Hierarchical Dirichlet processes. In Advances in Neural Information Processing Systems, volume 17, 2005.
  14. 14.V. Vapnik. Statistical Learning Theory. John Wiley, New York, 1998.
  15. 15.T. Zhang. Solving large-scale linear prediction problems with stochastic gradient descent. In ICML, 2004.

Citation

MLA
Ben-David, S., et al. “Analysis of Representations for Domain Adaptation”. Advances in Neural Information Processing Systems, vol. 19, 2006, https://proceedings.neurips.cc/paper_files/paper/2006/file/b1b0432ceafb0ce714426e9114852ac7-Paper.pdf.
APA
Ben-David, S., Blitzer, J., Crammer, K., & Pereira, F. (2006). Analysis of Representations for Domain Adaptation. Advances in Neural Information Processing Systems, 19. https://proceedings.neurips.cc/paper_files/paper/2006/file/b1b0432ceafb0ce714426e9114852ac7-Paper.pdf
Chicago
Ben-David, S., J. Blitzer, K. Crammer, and F. Pereira. 2006. “Analysis of Representations for Domain Adaptation”. Advances in Neural Information Processing Systems 19. https://proceedings.neurips.cc/paper_files/paper/2006/file/b1b0432ceafb0ce714426e9114852ac7-Paper.pdf.
Harvard
Ben-David, S. et al. (2006) “Analysis of Representations for Domain Adaptation”, Advances in Neural Information Processing Systems. Curran Associates, Inc. Available at: https://proceedings.neurips.cc/paper_files/paper/2006/file/b1b0432ceafb0ce714426e9114852ac7-Paper.pdf.
Vancouver
1. Ben-David S, Blitzer J, Crammer K, Pereira F (2006) Analysis of Representations for Domain Adaptation. Advances in Neural Information Processing Systems 19:

BibTeX

@inproceedings{bendavid2006analysis,
  title = {Analysis of Representations for Domain Adaptation},
  author = {Ben-David, Shai and Blitzer, John and Crammer, Koby and Pereira, Fernando},
  year = {2006},
  booktitle = {Advances in Neural Information Processing Systems},
  publisher = {Curran Associates, Inc.},
  volume = {19},
  url = {https://proceedings.neurips.cc/paper_files/paper/2006/file/b1b0432ceafb0ce714426e9114852ac7-Paper.pdf}
}
Metadata:DOI registry

Access the Paper

This paper is available from its original source. Click below to access the PDF.

Open PDF

License: Authors