Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence (AAAI-17)

Unsupervised Domain Adaptation
with a Relaxed Covariate Shift Assumption
Tameem Adel

Han ZhaoAlexander Wong

University of Manchester, UK
tameem.hesham@gmail.com

Carnegie Mellon University, USA
han.zhao@cs.cmu.edu

University of Waterloo, Canada
a28wong@uwaterloo.ca

but the default setting is one source and one target domain.
Regarding target data, several frameworks have access to atarget sample containing labeled data instances, and a larger
target unlabeled sample , e.g. Blitzer et al.; Oquab et al.
(2008; 2014). In other frameworks, like Huang et al. (2006),
referred to as unsupervised domain adaptation, the target data
is fully unlabeled. The proposed model is an unsupervised
domain adaptation framework, although it can incorporate
target labeled data, if available, in a forthright manner.
The manner by which source labeled data are utilized
in learning the target distribution and consequently the allimportant target labels heavily depends on the relationship between the source and target domains. Such relationship is depicted by the learner’s assumptions about
the similarities/differences between source and target domains. In this regard, covariate shift represents one of themost widely used domain adaptation assumptions (Sugiyama
and Mueller 2005), on which much of the domain adaptation research is based. Covariate shift states that the conditional labeling distributions of both the source and target
domains are the same, while their respective marginal data
distributions can be different (Storkey and Sugiyama 2006;
Ben-David and Urner 2012; 2014). Covariate shift is a valid
assumption in some problems, but it can as well be quite
unrealistic for many other domain adaptation tasks where theconditional label distributions are not (or, more precisely, notguaranteed to be) identical. The simpliﬁcation resulting fromassuming identical labeling distributions facilitates the quest
for a tractable learning algorithm, albeit possibly at the costof reducing the expressiveness power of the representation,and consequently the accuracy of the resulting hypothesis.
We propose a probabilistic relaxation of the covariate shift
assumption where the more uncertain a learner is about thesource labeling of an instance, the more uncertain it is thatits target conditional labeling probability has a value similar
to the corresponding source conditional labeling probability (the more uncertain it is that the label remains the sameacross domains), and vice versa. We formalize this notion
in a generative model that learns a representation from boththe target unlabeled data and a probabilistic prospect of thechange in their labels across domains, and we use such representation to learn the target labels. The proposed model
incorporates a tractable inference procedure for a broad
range of problems by exploiting the recent advances in vari-

Abstract
Domain adaptation addresses learning tasks where training is
performed on data from one domain whereas testing is performed on data belonging to a different but related domain.
Assumptions about the relationship between the source andtarget domains should lead to tractable solutions on the one
hand, and be realistic on the other hand. Here we propose
a generative domain adaptation model that allows for modelling different assumptions about this relationship, among
which is a newly introduced assumption that replaces covariate
shift with a possibly more realistic assumption without losing
tractability due to the efﬁcient variational inference proceduredeveloped. In addition to the ability to model less restrictive
relationships between source and target, modelling can be performed without any target labeled data (unsupervised domain
adaptation). We also provide a Rademacher complexity boundof the proposed algorithm. We evaluate the model on the Amazon reviews and the CVC pedestrian detection datasets.

Introduction
Domain adaptation focuses on modelling problems where thetraining and test distributions are different but related. The
training and test domains are commonly referred to in thedomain adaptation literature as the source and target domains,respectively. Domain diversity can emerge as a result of the
scarcity of available labeled data from the target domain. It
can as well be innate in the problem itself due to, for example, an ongoing change occurring to the source domain likein cases where the original source domain keeps changing
over time. Domain adaptation aims at ﬁnding solutions forthis kind of problem, where the training (source) data are
generated from a distribution different from that of the test
(target) data, by leveraging the available labeled data fromthe similar source domain (Ben-David et al. 2007).
More details about seminal works in the domain adaptation
literature can be found in Section 1 in the supplementary.
The principal metric of a domain adaptation algorithm isthe performance of the target learning hypothesis, which as amatter of fact depends on the labeled source data, (primarily
unlabeled) target data and the relationship between the source
and target domains. There can be multiple source domains
to learn from (Mansour, Mohri, and Rostamizadeh 2009b),c 2017, Association for the Advancement of Artiﬁcial
Copyright Intelligence (www.aaai.org). All rights reserved.

1691

x be a data instance. Input to the domain adaptation learneris composed of a source sample, S, consisting of n labeledinstances, (xi , yi ), i ∈ {1, 2, · · · , n}, and a target sample
T of m unlabeled instances, xj , j ∈ {1, 2, · · · , m}. Deﬁnethe loss function of two labeling hypotheses, h1 and h2 , byL(h1 (x), h2 (x)) : y × y → R, and the expected loss overa distribution, P , as LP (h1 , h2 ) = Ex∈P (L(h1 (x), h2 (x))).
Referring to the Bayes Optimal target labeling function as
hopt
T (x), the main goal is to develop a learning hypothesis of the target domain, hT , with a maximized classiﬁcation accuracy, i.e. with a minimized expected target loss,
LPT (hT , hoptT ) . We refer to the proposed model as GenDA.
We begin by describing our relaxed covariate shift-basedmodel for unsupervised domain adaptation. We assume one
source and one target domain. We refer to the marginal data
distributions in source and target domains as PS (x) andPT (x), respectively. The joint data and label distributionsof the two domains are denoted by PS (x, y) and PT (x, y).
Denote by lS (x) the probability of the assigned sourcelabel to x, i.e. the probability PS (ymax |x), with ymax =argmaxy∈Y PS (y|x). After learning the source hypothesis,
we learn the latent feature space, z, which is assumed to generate both the unlabeled target instances, x ∈ T , and theircorresponding source labels along with the relationship between source and target domains (modelled in our algorithm
by the relaxed covariate shift assumption). We then learn thetarget labels, y = argmaxy∈Y PT (y|x), of the target sample,x ∈ T , by inferring PT (y|z). Learning target labels throughPT (y|z) is more informative than through PT (y|x) since z
conveys information about both the unlabeled target data,
x and the corresponding source labels (source labels of thetarget data) mapped onto the target via the relaxed covariate
shift assumption, or more generally via the assumption(s) on
the relationship between source and target labels.

ational inference (Rezende, Mohamed, and Wierstra 2014;
Stuhlmuller, Taylor, and Goodman 2013). We focus on promoting the proposed domain adaptation model for the introduced assumption, but the model is generic enough to substantiate other adaptation assumptions, and to be considereda generalization of some other adaptation frameworks. The
proposed algorithm can be seen as a Bayesian, more genericand more scalable extension of Adel and Wong (2015).
Our main contributions are as follows:• We propose a generalized generative modelling framework
for unsupervised domain adaptation, which does not require any target labeled data.
• We develop a scalable learning algorithm that broadens
the range of solution tractability with less restrictive andpossibly more realistic domain adaptation assumptions
than covariate shift.
• We propose a relaxed probabilistic version of covariate
shift and exploit the proposed model in substantiating thisassumption.
• Scalability and tractability of the model are achieved bydeveloping a variational inference procedure tailored todomain adaptation, which is based on recent advances invariational Bayesian procedures, namely approximating
the posterior via a recognition model (Rezende, Mohamed,
and Wierstra 2014; Stuhlmuller, Taylor, and Goodman
2013; Kingma and Welling 2014; Kingma et al. 2014). We
provide a lower bound on the marginal likelihood. To thebest of our knowledge, this is the ﬁrst variational inference
procedure for domain adaptation.
• Our generalized domain adaptation model yields a rather
ﬂexible association between the adaptation assumptions
and the learning solution so that conceptual modelling
details and their implementations can each be scrutinized
more easily and rather separately.
• A Rademacher complexity bound is derived for the proposed algorithm.
• The model is applied to benchmark domain adaptation
datasets where its performance is demonstrated by comparison with the achieved state-of-the-art results. There aremainly two experiments: A sentiment analysis task on the
Amazon reviews dataset and a pedestrian detection task on
the CVC-02 and CVC-04 datasets.
The rest of the paper is organized as follows: The proposed
relaxed covariate shift assumption is introduced in Section ,followed by an illustration of the proposed unsupervised domain adaptation model. Section describes the developed
variational inference procedure. A Rademacher generalization bound is introduced in Section , and ﬁnally the two
experiments are presented in Section . The related work, theproof of the Rademacher complexity bound, among otherdetails, can be found in the supplementary.

Relaxed Covariate Shift
We do not assume covariate shift, i.e. lS (x) and lT (x) do nothave to be equal for each x. Instead, we construct a model
where learning the target hypothesis is based on a nonlinear
interaction of two respects: The topology of the unlabeled
target data and their source labels along with the introduced
probabilistic domain adaptation assumption. In the proposedmodel, we introduce and employ an assumption that is arelaxation of covariate shift. Even though we focus on thisintroduced assumption, the proposed model is not exclusively
tailored for a solitary particular assumption. On the contrary,other assumptions on the relationship between source andtarget domains can be modelled, as we brieﬂy show in Section
2 in the supplementary.
Rather than rigidly assuming the standard covariate shift,
the relaxed covariate shift assumption states that the uncertainty in the source label assigned to a data instance, x, manifested in the source conditional labeling probability, is proportionate to the value of the loss function L between its
source and target labeling functions, L(hS (x), hT (x)). In
other words, the more uncertain the source hypothesis abouta labeling decision of an instance, the higher the probability
its source and target labels are not identical. Assuming a 0-1

Generative Model for Domain Adaptation
Notation Let Y be a label set. We address classiﬁcation
problems; ∀y ∈ Y, y ∈ Z, at the source and target domains. Denote the number of labels by k, |Y | = k. Let

1692

loss, L(hS (x), hT (x)), the relaxed covariate shift assumption is formulated as follows:
For x ∈ T, PS (x) = 0, let L(hS (x), hT (x)) ∼Bin(1, p(x)), a binomial distribution with a parameter p(x)referring to the probability of success, i.e. the probability that
L(hS (x), hT (x)) = 1 (the probability that the source andtarget labels of x are not identical). The value of p(x) follows
a monotonically decreasing function of |lS (x) − 1/k|, forwhich we choose the exponential decay function:(1)p(x) = f (|lS (x) − 1/k|)k−1]= e−λ(|lS (x)−1/k|) , |lS (x) − 1/k| ∈ [0,kwhere |lS (x) − 1/k| signiﬁes the uncertainty manifested
in the source labeling decision, since lS (x) = 1/k is theminimum possible value for lS (x). Think of the binaryclassiﬁcation case as an example, where the closer lS (x)to 1/k = 0.5, the more uncertain the source labeling decision. The extremes in the spectrum of this uncertainty
are: i), lS (x) = 1 then |lS (x) − 1/k| = k−1
k , which denotes total certainty (minimum uncertainty), and ii) lS (x) =1/k leading to |lS (x) − 1/k| = 0, denoting maximum uncertainty. Moving on through this spectrum from case ii) tocase i), the value of p(x) keeps diminishing, corresponding to a decline in the probability of having a 1 (rather
than 0) loss between the source and target hypotheses forx, L(hS (x), hT (x)). The relaxed covariate shift is a generalization of the standard covariate shift assumption, sincesetting the probability of a 1 loss, L(hS (x), hT (x)) = 1, tobe always zero, p(x) = 0, for all values of |lS (x) − 1/k|
results in the standard covariate shift deﬁnition.
The measure of uncertainty developed in (1) is chosenbecause it is sound and also because it well captures therelationships between source and target domains in some
applications (demonstrated by the experiments). However,other measures  of uncertainty, such as the conditional entropy, - x y PS (x)PS (y|x) log PS (y|x), can be used instead. The relationship between the loss, L(hS (x), hT (x)),
and the uncertainty manifested by the source hypothesis,|lS (x) − 1/k| for k = 2, is illustrated in Figure 1 in the
supplementary.
After learning parameters of the source hypothesis, the target sample, x ∈ T , is given as input to the source hypothesis
resulting in lS (x) and the corresponding values of p(x) from(1). Afterwards one learns the latent representation, z, that isassumed to generate both x ∈ T , and p(x), where x conveys
information about the topology of the target sample, and p(x)conveys information about the corresponding source labels
along with probabilistic labeling information according to
the relaxed probabilistic covariate shift assumption. Basedon the latent representation, a grouping followed by a labelalignment technique is pursued to extract the target labels.
Extending the proposed form of the covariate shift assumption to other relationships between source and target domains,
as well as to other loss functions, is not arduous.

PS (x) and PT (x)), and y (whose conditional distributions
in both domains are PS (y|x) = PPSS(y,x)(x) and PT (y|x) aredisplayed twice in a slight abuse of notation.
To learn the parameter set, α, of the source discriminative classiﬁer (hypothesis), the source training data, (x, y) ∈S, |S| = n, is used to learn a discriminative classiﬁer on thesource domain (the upper plate of Figure 2 in the supplementary). A probabilistic output for each y|x is obtained via thelearnt source discriminative classiﬁer so that lS (x) can becomputed, followed by the computation of corresponding
values of p(x) by (1).
Now we have learnt the parameters, α, of the source hypothesis. The intuition behind the target hypothesis is that wehave an unlabeled target sample, and we base the learning on
two aspects: i) topology of the unlabeled target data instances,and ii) the corresponding source labels of the target sample,
which belong to a related (source) domain. The relationshipbetween these two aspects as well as their impact on thesought target label is modelled by the latent variable, z. The
latent feature space, z, is a representation that allows for a
non-linear transformation of: i) the observed target data, andof ii) the probabilistic labeling information through the corresponding source labels and the relaxed probabilistic covariate
shift assumption. The latent feature space, z, represents suchcomponents in a more robust and lower-dimensional (than theoriginal space of x and p(x)) space, which potentially makes
the target data more easily separable into their labels. The
latent variable z models the relationship between each x ∈ T
and their corresponding values of p(x) expressing probabilistic information about the 0-1 loss, L(hS (x), hT (x)).
Instances of the target sample, x ∈ T , are given as input to the established source hypothesis (with parametersα) resulting in lS (x) for each x ∈ T . Based on lS (x), values of p(x) are indicated by (1). For each x ∈ T , p(x) determines the probability of the target label being different
from the corresponding source label, i.e. the probability ofL(hS (x), hT (x)) = 1. There is one z per each x ∈ T . The
generative model utilized to learn the variable z corresponding to each data point x, x ∈ T , is as follows (note that θrefers to the generative parameters):Pθ (z) = N (0, I): standard Gaussian (μ = 0, σ 2 = 1) (2)Pθ (x, p(x)|z) = f (x, p(x); z, θ) = N (μθ (z), σθ (z)) (3)The function f (x, p(x); z, θ) is a non-linear transformation of z, modelled by a neural network. The nonlinear
relationship between z and (x, p(x)) renders the exact
posterior computation intractable. Since the exact posterior, Pθ (z|x, p(x)), is intractable, the variational posterior,qφ (z|x, p(x)) is computed via which approximate samplesof z are used in the subsequent generative process includingz and y U . The latter is a variable that groups the z variables, where each z is a representation of x, x ∈ T , and thecorresponding p(x). Regarding the variational posterior, arecognition model (Rezende, Mohamed, and Wierstra 2014;
Stuhlmuller, Taylor, and Goodman 2013) qφ (z|x, p(x)) is developed for modelling z. Note that φ refers to the variationalparameters. More details about the variational inference procedure are given in Section . The Gaussian chosen in (2) is

Learning
The graphical model depicting the proposed model is displayed in Figure 2 in the supplementary. For clarity of presentation, the variable x (whose marginals in both domains are1693

Algorithm 1 Generative Domain Adaptation Algorithm(GenDA)not a limitation of the domain adaptation model; assuming a
Gaussian Pθ (z) facilitates the inference procedure as will beshown in (4).
The grouping operation (with parameters β in Figure 2
in the supplementary is applied to z, resulting in k groups,
where each group is expressed by a different value ofthe grouping variable, y U , using Expectation-Maximization(EM). By casting the resulting clusters into target labels, thefollowing label alignment method is pursued: i) We constructa confusion matrix whose columns are the source labels ofdata points x, x ∈ T , (identiﬁed via lS (x)), and rows are theclusters, y U . ii) Out of values of each column, the row (cluster) with the largest number of members is considered therepresentative cluster of the respective column (class label),i.e. the cluster whose members are the target members of thesource label at the column. The intuition behind this methodcounts on the validity of the relaxed covariate shift assumption, which considers the label change across domains to beunlikely in case lS (x) is large, i.e. lS (x) → 1. Its intuition
also counts on the general consensus of domain adaptationthat there should still be some similarity between source andtarget domains so that an overall change would not span alldata points. Both source and target domains should still besimilar enough to allow for the idea of adaptation acrossdomains to be brought in, in the ﬁrst place. Therefore, assuming that a majority of the data points in each class do
not change labels across different domains is quite realistic (and still much more ﬂexible than the assumption thatno label change at all can take place across domains). Notethat the term “grouping” is performed only w.r.t. z, which
already has labeling information from p(x), and in turn from
L(hS (x), hT (x)), and for that it is not grouping (not fully
unsupervised) w.r.t. the observed data, x ∈ T . The primarysteps of the algorithm, referred to as GenDA, are shown in
Algorithm 1.
Section 2 of the supplementary explains how some of theother domain adaptation models can be seen as special casesof the proposed model.

Input: source (x, y) ∈ S, size n + target x ∈ T , size m,where (xi , yi ) is a data instance-label pair.
output: target label, y, of x ∈ T .
Source learning: Learn PS (y|x) from (x, y) ∈ S, byestablishing hS ; a source hypothesis.
Source labels of x ∈ T :- For x ∈ T , learn source labels using hS (x).
- Using the resulting lS (x), compute:p(x) = P (L(hS (x), hT (x)) = 1) by (1).
- Initialize θ and φ (generative & variational param.)
repeatPerform minibatch stochastic gradient ascent on
L(x, p(x)) to learn θ and φ:- zi ∼ qφ (zi |xi , p(xi )), ∀xi ∈ B, B is a random
minibatch.
|B|- L = i=1 L(xi , p(x)).
- Take derivatives of L w.r.t. θ and φ.
- Update θ and φ accordingly
until θ, φ do not change- Learn P (y U |z) for x ∈ T by the EM algorithm.
- Learn target labels, y of x ∈ T from y U by the labelalignment procedure.


log
z

Pθ (x, p(x), z) dz = log Eqφ (z|x,p(x))

Pθ (z)Pθ (x, p(x)|z)≥qφ (z|x, p(x))

Eqφ (z|x,p(x)) [log Pθ (z) + log Pθ (x, p(x)|z)−log qφ (z|x, p(x))] =Eqφ (z|x,p(x)) [log Pθ (x, p(x)|z)] − DKL (qφ (z|x, p(x))Pθ (z)) =− L(x, p(x))(4)

which yields the objective function used in optimizing thegenerative and variational parameters, θ and φ, respectively.
For the recognition model of the latent variable, z, we assume
a variational Gaussian qφ (z|x, p(x)):
qφ (z|x, p(x)) = N (μφ (x, p(x)), σφ (x, p(x)))

Variational Inference(5)

where μφ (x, p(x)) and σφ (x, p(x)) are modelled as neural networks. The neural networks used in the generativeand variational inference models are multilayer perceptrons(MLPs) with the softplus activation function, log(1 + ex ).
Two hidden layers are used.
Back to (4), for the optimization of the objective function, we should differentiate L(x, p(x)) w.r.t. generativeand variational parameters, θ and φ, respectively. An analytical computation of the second term in the third lineof (4), DKL (qφ (z|x, p(x))Pθ (z)), is possible since both
distributions of the KL-divergence, Pθ (z) and qφ (z|x, p(x))(from (2) and (5)) are Gaussians. Regarding the ﬁrst termof (4), Eqφ (z|x,p(x)) [log Pθ (x, p(x)|z)], the workaround forthe tricky step of taking gradients w.r.t. φ is to reparameterize the latent variable z = gφ (x, p(x), u) (Rezende, Mohamed, and Wierstra 2014), where gφ (x, p(x), u) is a deterministic function and all the randomness comes throughu. Since z|x, p(x) is assumed to be Gaussian, we can apply a location-scale transformation, z = gφ (x, p(x), u) =Evidence Lower Bound (ELBO)
Due to the non-linear dependencies between the model components, exact computation of the posterior Pθ (z|x, p(x))
is intractable. A scalable variational inference technique isdeveloped and optimized here. It is based on a variational
inference approach recently introduced in Rezende, Mohamed, and Wierstra; Hoffman et al. (2014; 2013), whichtakes into account producing a high-ﬁdelity as well as computationally efﬁcient variational approach to estimate posteriors. The pursued variational inference approach is referred to as a recognition model (Rezende, Mohamed, andWierstra 2014; Stuhlmuller, Taylor, and Goodman 2013;
Kingma and Welling 2014). We derive a lower bound on
the marginal likelihood of the proposed generative domain
adaptation model and utilize it in establishing the objectivefunction used in computing a high-ﬁdelity variational posterior, qφ (z|x, p(x)). For a data instance x ∈ T , and its
corresponding p(x), the variational bound, L(x, p(x)) is:1694μφ (x, p(x)) + σφ (x, p(x)) × u, u ∈ N (0, I). The ﬁrst termin (4) can then be reformulated as:
Eqφ (z|x,p(x)) [log Pθ (x, p(x)|z)] =used at the source domain and to setting the parameters of
GenDA, the reverse cross-validation method used, and ﬁnallyexample images related to the CVC data, are all left, due tospace limitation, to Section 6 in the supplementary.

(6)

Eu∼N (0,I) [log Pθ (x, p(x)|μφ (x, p(x))+σφ (x, p(x)) ×u)]

Sentiment Analysis

Gradients of (6) are:Experiments

The dataset used in this experiment is the Amazon reviews
dataset (Blitzer, Dredze, and Pereira 2007), which represents
one of the benchmark domain adaptation datasets. Its intact version contains more than 340,000 reviews describing
22 product types. Since its original form is immensely unbalanced, the version of the Amazon reviews data used indomain adaptation, which was ﬁrst introduced by Blitzer,
Dredze, and Pereira (2007), consists of 4 product types where
each product types refers to a domain. The four domains are:i) books (BK), ii) DVDs (DV), iii) electronics (EL), andiv) kitchen appliances (KA). Each Amazon review originally had a rating from 0 to 5 stars. For comparability, theconvention followed in domain adaptation is to change thereview ratings into either positive (higher than 3 stars) or
negative (less than or equal to 3 stars) (Chen et al. 2012;
Glorot, Bordes, and Bengio 2011). Features are pre-processedwith standard tf-idf (Salton and Buckley 1988). The selectedfeature set is composed of 5,000 features of unigrams andbigrams. All these settings are done in order to compare oncommon grounds with state-of-the-art.
There are 2,000 labeled reviews per each of the 4 domains.
Number of unlabeled reviews ranges between 3,586 KA reviews and 5,945 DV reviews. The two classes of the data
are balanced in each of the 4 domains, i.e. ratio of positive
ratings is 50%. We perform 12 adaptation tasks, moving fromone domain to another, e.g. EL → BK. Training on the source
domain is performed on 2,000 labeled source data instances(reviews), i.e. the sample S. The target learner is given a
set of 2,000 unlabeled target instances. The unlabeled target
learning set is used as the sample, T , that is given as input
to the source learner so that corresponding values of p(x)can be computed according to (1), and then the non-linear
transformation between the unlabeled sample, T along with
p(x) and the latent feature space, z, is learnt. Afterwards,
Expectation-Maximization (EM) followed by the label alignment method are used to learn the target labels of the sample
T , as illustrated in Section .
Results of the experiments performed on the 12 Amazon
reviews adaptation tasks are displayed in Table 1. Comparisons with state-of-the-art results on the Amazon reviews data
by Ganin et al. (2015) are based on classiﬁcation accuracy.
For each adaptation task, we compare to the best classiﬁcation accuracy obtained by Ganin et al. (2015). A paired t-test
with p = 0.05 is used to identify signiﬁcance. The proposed
algorithm GenDA outperforms the best result by Ganin et al.
(2015) in 10 out of the 12 adaptation tasks (signiﬁcantly so in
8 tasks). Concerning the source classiﬁers, the SVM classiﬁer
is clearly superior to the other two classiﬁers, and the logistic
regression (LR) comes second in most of the tasks.

We evaluate the proposed GenDA algorithm on the Amazon
reviews dataset, and on the CVC-02 and CVC-04 pedestrian
detection datasets. We start with the note that descriptionsof some issues related to the three discriminative learners

The task of pedestrian detection (Dollar et al. 2012; Enzweiler
and Gavrila 2009) in images is challenging both due to difﬁ-θ,φ Eqφ (z|x,p(x)) [log Pθ (x, p(x)|z)] =(7)

Eu∼N (0,I) [θ,φ (log Pθ (x, p(x)|μφ (x, p(x))+σφ (x, p(x))×u))]

And they can be computed via Monte Carlo estimates ofthe expectation (Kingma and Welling 2014). Gradients arecomputed here by stochastic gradient descent (SGD) (Bottou2010) and AdaGrad (Duchi, Hazan, and Singer 2010).

A Generalization Bound
Several generalization bounds for domain adaptation havebeen introduced into the literature. Some of them are basedon speciﬁc notions of distance between domains like the Adistance deﬁned in Kifer, Ben-David, and Gehrke (2004) andused, most notably, in Ben-David et al. (2007), and like thediscrepancy distance-based Rademacher complexity boundintroduced in Mansour, Mohri, and Rostamizadeh (2009a).
We derive a Rademacher complexity bound based on the
introduced relaxed covariate shift assumption.
Deﬁne the discrepancy distance between the source andtarget domains as:|LPS (h, h ) − LPT (h, h )|dsc-dist(S, T ) = maxh,h ∈H(8)

Theorem 1. Let h•S ∈ H be the best hypothesis in H at thesource domain, i.e. h•S ∈ argminh∈H LPS (h, hopt
S ), whereopt
hS is the Bayes Optimal, and similarly deﬁne h•T over thetarget domain. For any target hypothesis, h ∈ H:
opt•
LPT (h, hoptT ) − LPT (hT , hT ) ≤1−e−λ( k−1)k(9)[(λ(k − 1)/k) + 1]
+ dsc-dist(S, T ) + LPS (h•S , h).
λ2

Proof. The proof of Theorem 1 can be found in Section 5 ofthe supplementary.
Also, we can see from Theorem 1 that larger values of λlead to a tighter generalization bound. As such, Theorem 1
supports the conclusions of (1) and Figure 1 in the supplementary that a larger λ leads to a smaller probability ofL(h•S (x), h•T (x)) = 1, which signiﬁes that the source andtarget domains are more similar to each other with larger λvalues than cases with smaller λ:Larger λ → More similar domains → Tighter bound.
In a way, that can be seen as if the true value of λ between
a source and a target domain provides a rough estimate of a
distance between the two domains.

Pedestrian Detection

1695

Table 1: Classiﬁcation Accuracy of GenDA using 3 different source classiﬁers vs. state-of-the-art by taking the best
available classiﬁcation accuracy from Ganin et al. (2015),
on the Amazon reviews dataset. Bold denotes the best result
signiﬁcantly outperforms all the competitors for such task.
Source-Target
BK-DV
BK-EL
BK-KA
DV-BK
DV-EL
DV-KA
EL-BK
EL-DV
EL-KA
KA-BK
KA-DV
KA-EL

SVM GenDA
81.2%
77.1%
84%
77.1%
78.9%
85.1%
74.5%
77.3%
80.4%
81%
74.4%
85.1%

NN GenDA
72.4%
75.1%
74.7%
70.2%
73.9%
71.4%
65.5%
76.1%
78.1%
71.4%
70.1%
79%

LR GenDA
78.8%
75.9%
81.5%
75.4%
77.8%
84.5%
69.7%
71.2%
81%
74.1%
73.9%
83.7%

(Vazquez, Lopez, and Ponsa 2013). We use a set of 600 CVC02 cropped images, evenly divided between the two classes,
as the unlabeled target sample, T .
We compare our results to state-of-the-art unsupervised
domain adaptation results on CVC datasets represented by
Vazquez, Lopez, and Ponsa; Vazquez, Lopez, and Ponsa(2012; 2013), which are based on transductive SVM. We
compare results based on the same metric used in Vazquez,
Lopez, and Ponsa; Vazquez, Lopez, and Ponsa (2012; 2013),
which is detection error tradeoff (DET) curve (Martin etal. 1997) showing the FPPI (false positive per image) rate
vs. false negative (or missed detections) rate, for different thresholds. The smaller the area under the curve, themore accurate the algorithm. We implemented the algorithm in Vazquez, Lopez, and Ponsa (2012) with the helpof coding excerpts taken from SVMlight (Joachims 1999a;
1999b). In Figure 1, UDA refers to the unsupervised domain
adaptation algorithm by Vazquez, Lopez, and Ponsa; Vazquez,
Lopez, and Ponsa (2012; 2013). Results displayed in Figure 1
demonstrate an improvement induced by GenDA over UDA,
which we believe is mainly due to two reasons: Flexibilityof the introduced relaxed covariate shift assumption, and thepower of the latent feature representation, Z. Note that westick to the DET curve, shown in Figure 1, as a metric so that
we can compare on common grounds with state-of-the-art.
Two examples from the CVC-02 dataset are displayed in
Section 7 of the supplementary.

Ganin
79.9%
79.2%
81.6%
75.5%
78.6%
82.2%
72.7%
76.5%
85.4%
72%
74%
84.3%

culties inherent in the task itself, like diversities in scene contents, poses, occlusions, etc, and due to the high risk arisingfrom some related applications like driver assistance systems.
For the core subtask of pedestrian classiﬁcation (primarily
used to decide whether or not a given image window contains
a pedestrian), we apply our unsupervised domain adaptation
algorithm, GenDA, to two pedestrian detection datasets, referred to as the CVC-02 and CVC-04 datasets. Input to apedestrian detection task consists of images manually labeledwhere bounding boxes provide information about the locationof pedestrians in pedestrian images, i.e. images containing
pedestrians. The manual intervention required for such task
is very exhaustive (Vazquez, Lopez, and Ponsa 2012). By
having a virtual input, where pedestrian and pedestrian-free
cropped images1 come from virtual images, e.g. video games,
unsupervised domain adaptation can be used by considering
the labeled virtual images to be the source domain and byconsidering unlabeled real images to be the target domain.
More details about the settings of this experiment is given in
Section 7 of the supplementary.
As such, the pedestrian classiﬁer is a binary classiﬁer withlabels: Pedestrian images, and pedestrian-free images. An
image window is labeled as a pedestrian cropped image if
the classiﬁcation score is larger than a threshold, and is labeled as a pedestrian-free cropped image otherwise. Valueof the threshold as well as parameters of the pyramidal sliding window (8 × 8 pixels), are set equivalent to their values
in Vazquez, Lopez, and Ponsa (2012). The principal taskof GenDA is to classify cropped target images into either apedestrian or a pedestrian-free cropped image.
As source labeled data, we use the CVC-04 virtual-world
pedestrian dataset (Vazquez et al. 2014), which consists of1208 virtual pedestrians and 1220 (a subset of the available
6828) pedestrian-free cropped images. As target unlabeled
data, where the labels are used only to assess accuracy atthe end but never in learning, we use the CVC-02 real-world
dataset (Geronimo et al. 2010). The dataset, CVC-02 wasrecorded using a camera based on 640×480 pixels resolution

Figure 1: A DET curve showing FPPI vs. missed detections
rate resulting from applying GenDA vs. its competitor UDA(Vazquez, Lopez, and Ponsa 2012; 2013) to 2 CVC pedestrian
detection datasets. FPPI rate refers to false positive per image
rate. The smaller the area under the curve, the more accurate
the algorithm. Average area under the curve is 33.2 for UDA,
and is 28.6 for GenDA.

Conclusion
We introduced a probabilistic relaxation of the covariate shift
assumption, and utilized it as a part of a proposed unsupervised domain adaptation model. On the one hand, theassumption is ﬂexible enough to depict several forms of relationships between the source and target domains. On theother hand, the proposed model is efﬁcient due to the powerof the induced latent representation and due to its inference
procedure. The proposed domain adaptation model can also
be used to model other domain adaptation assumptions, andthat represents an imminent direction for future work.

1

we use the term “cropped image” to refer to a part of an image
on which pedestrian detection has already been applied. It is thesame term used in the CVC data descriptions.

1696

References

Kingma, D.; Rezende, D.; Mohamed, S.; and Welling, M.
2014. Semi-supervised learning with deep generative models.
NIPS 28:3581–3589.
Mansour, Y.; Mohri, M.; and Rostamizadeh, A. 2009a. Domain adaptation: Learning bounds and algorithms. COLT.
Mansour, Y.; Mohri, M.; and Rostamizadeh, A. 2009b. Learning from multiple sources. NIPS 23:1041–1048.
Martin, A.; Doddington, G.; Kamm, T.; Ordowski, M.; andPrzybocki, M. 1997. The DET curve in assessment of detection task performance. National Inst. of Standards andTechnology Gathersburg.
Oquab, M.; Bottou, L.; Laptev, I.; and Sivic, J. 2014. Learning and transferring mid-level image representations using
convolutional neural networks.
Rezende, D.; Mohamed, S.; and Wierstra, D. 2014. Stochastic
backpropagation and approximate inference in deep generative models. ICML.
Salton, G., and Buckley, C. 1988. Term-weighting approaches in automatic text retrieval. Information processing& management 24(5):513–523.
Storkey, A., and Sugiyama, M. 2006. Mixture regression forcovariate shift. NIPS.
Stuhlmuller, A.; Taylor, J.; and Goodman, N. 2013. Learning
stochastic inverses. NIPS 27:3048–3056.
Sugiyama, M., and Mueller, K. 2005. Generalization error
estimation under covariate shift. Workshop on InformationBased Induction Sciences.
Vazquez, D.; Lopez, A.; Marin, J.; Ponsa, D.; and Gomez,
D. 2014. Virtual and real world adaptation for pedestrian
detection. TPAMI 36(4):797–809.
Vazquez, D.; Lopez, A.; and Ponsa, D. 2012. Unsupervised
domain adaptation of virtual and real worlds for pedestrian
detection. ICPR.
Vazquez, D.; Lopez, A.; and Ponsa, D. 2013. Domain adaptation of virtual and real worlds for pedestrian detection. Ph.D.
Dissertation, Universitat autonoma de Barceolona.

Adel, T., and Wong, A. 2015. A probabilistic covariate shift
assumption for domain adaptation. AAAI.
Ben-David, S., and Urner, R. 2012. On the hardness of
domain adaptation and the utility of unlabeled target samples.
ALT 139–153.
Ben-David, S., and Urner, R. 2014. Domain adaptation – canquantity compensate for quality? Annals of Mathematics andArtiﬁcial Intelligence 70:185–202.
Ben-David, S.; Blitzer, J.; Crammer, K.; and Pereira, F. 2007.
Analysis of representations for domain adaptation. NIPS.
Blitzer, J.; Crammer, K.; Kulesza, A.; Pereira, F.; and Wortman, J. 2008. Learning bounds for domain adaptation. NIPS.
Blitzer, J.; Dredze, M.; and Pereira, F. 2007. Biographies,
bollywood, boom-boxes and blenders: Domain adaptation
for sentiment classiﬁcation. Association for Computational
Linguistics (ACL).
Bottou, L. 2010. Large-scale machine learning with stochastic gradient descent. COMPSTAT 177–186.
Chen, M.; Xu, Z.; Weinberger, K.; and Sha, F. 2012.
Marginalized denoising autoencoders for domain adaptation.
ICML.
Dollar, P.; Wojek, C.; Schiele, B.; and Perona, P. 2012. Pedestrian detection: An evaluation of the state of the art. TPAMI
34:743–761.
Duchi, J.; Hazan, E.; and Singer, Y. 2010. Adaptive subgradient methods for online learning and stochastic optimization.
JMLR 12:2121–2159.
Enzweiler, M., and Gavrila, D. 2009. Monocular pedestrian
detection: Survey and experiments. TPAMI 31:2179–2195.
Ganin, Y.; Ustinova, E.; Ajakan, H.; Germain, P.; Larochelle,
H.; Laviolette, F.; Marchand, M.; and Lempitsky, V. 2015.
Domain-adversarial training of neural networks. arXiv(1505.07818).
Geronimo, D.; Sappa, A.; Ponsa, D.; and Lopez, A. 2010.
2d-3d based on-board pedestrian detection system. Computer
Vision and Image Understanding (Special Issue on Intelligent
Vision Systems).
Glorot, X.; Bordes, A.; and Bengio, Y. 2011. Domain adaptation for large-scale sentiment classiﬁcation: A deep learning
approach. ICML.
Hoffman, M.; Blei, D.; Wang, C.; and Paisley, J. 2013.
Stochastic variational inference. JMLR 14:1303–1347.
Huang, J.; Gretton, A.; Borgwardt, K.; Schoelkopf, B.; andSmola, A. 2006. Correcting sample selection bias by unlabeled data. NIPS.
Joachims, T. 1999a. Making large-scale SVM learning
practical. MIT Press.
Joachims, T. 1999b. Transductive inference for text classiﬁcation using support vector machines. ICML.
Kifer, D.; Ben-David, S.; and Gehrke, J. 2004. Detectingchange in data streams. VLDB 180–191.
Kingma, D., and Welling, M. 2014. Auto-encoding variational Bayes. ICLR.

1697