![](https://csdnimg.cn/release/download_crawler_static/11163276/bg5.jpg)
JOURNAL OF LATEX CLASS FILES, VOL. -, NO. -, MARCH 2019 5
In [99], Wang et al. proposed two instance weighting
schemes for neural machine translation (NMT) domain
adaptation, i.e., sentence weighting and dynamic domain
weighting. Specifically, given the parallel training corpus
D = [D
in
, D
o
] consisting of in-domain data and out-of-
domain data, the sentence weighted NMT objective function
was written as
J
sw
=
X
hx
i
,y
i
i∈D
λ
i
log P(y
i
|x
i
)
(6)
where λ
i
is the weight to score each hx
i
, y
i
i. P(·) is the
conditional probability activated by softmax function. x
and y represent the source sentence and target sentence,
respectively. For domain weighting (dw), a weight λ was
designed for the in-domain data, and the NMT objective
function Eq.(6) can be transformed as [99]
J
dw
= λ
X
hx,yi∈D
in
log P(y|x) +
X
hx
0
,y
0
i∈D
o
log P(y
0
|x
0
)
(7)
A dynamic batch weight tuning scheme was proposed by
monotonically increasing the ratio of in-domain data in the
minibatch, which is supervised by the training cost. Dai et
al. proposed a TrAdaBoost [100] transfer learning method,
which leveraged Boosting algorithm to automatically tune
the weights of the training samples.
In [101], Chen et al. proposed a more intuitive weight-
ing based subspace alignment method by re-weighting the
source samples for generating source subspace that are close
to the target subspace. Let w = [w
1
, ··· , w
m
]
T
∈ R
m
denote
the weighting vector of the source samples. Obviously, the
w
i
w.r.t. the source sample x
i
increases if its distribution is
more close to target data. Therefore, a simple weight assign-
ment strategy was presented for assigning larger weights to
the source samples that are closer to target domain [101].
After obtaining the weight vector w, the weighted source
space can be obtained by performing PCA on the following
covariance matrix C of weighted source data,
C =
1
m
m
X
i=1
(x
i
− µ)
T
w
i
(x
i
− µ)
(8)
where µ is the weighted mean vector. Then the eigenvectors
P
S
can span the source subspace. By performing PCA on
the target data, the eigenvectors P
T
can span the target
subspace. Thereafter, the following unsupervised domain
adaptation model, subspace alignment (SA) [108], with Frobe-
nius norm minimization, was implemented.
min
M
kP
S
M − P
T
k
2
F
(9)
The subspace alignment matrix M can be easily solved with
least-square solution.
3.2 Kernel Mapping Based Weighting
The intuitive weighting based domain adaptation was im-
plemented in the raw data space. In order to infer the
sampling weights by distribution matching across source
and target data in feature space in a non-parametric way,
kernel mapping based weighting was proposed. Briefly, the
distribution difference between source and target data can
be better characterised by re-weighting the source samples
such that the means of the source and target instances in a
reproducing kernel Hilbert space (RKHS) are close [96]. Ker-
nel mapping based weighting consists of two categories of
methods: Distribution Matching [96], [102], [103] and Sample
Selection [104], [105].
(1) Distribution Matching. The intuitive idea of distribu-
tion matching is to match the means between the source and
target data in a reproducing kernel Hilbert space (RKHS)
by resampling the weights of the source data. Two similar
distribution matching criterions, i.e., kernel mean matching
(KMM) [96] and maximum mean discrepancy (MMD) [109],
[110], have been used as non-parametric statistic to measure
the distribution difference. Specifically, Huang et al. [96]
firstly proposed to re-weight the source samples with β,
such that the KMM between the means of target data and
the weighted source data is minimized.
min
β
kE
x
0
∼P
0
r
[Φ(x
0
)] − E
x∼P
r
[β(x)Φ(x)]k
s.t. β(x) ≥ 0, E
x∼P
r
[β(x)] = 1
(10)
where Φ(·) is the nonlinear mapping function into RKHS.
Chu et al. [102] further proposed a selective transfer ma-
chine (STM) by minimizing KMM for distribution matching,
and simultaneously minimizing the empirical risk of the
classifiers learned on the reweighted training samples.
(w, s) = arg min
w,s
R
w
(D
tr
, s) + λΩ
s
(D
tr
, D
te
)
(11)
where R
w
(·) is the empirical risk (loss) on the training set
D
tr
, Ω
s
indicates the distribution mismatch formulated by
KMM, s is the weighting vector of the source samples, and
w is the classifier parameters. From Eq.(11), the KMM based
distribution mismatch plays an important role in model
regularization on the sampling weights.
More recently, Yan et al. [103] proposed a weighted
MMD (WMMD) for domain adaptation, which was imple-
mented with convolutional neural network. WMMD over-
comes the flaw of conventional MMD that ignores the class
weight bias and assumes the same class weights between
source and target domain. WMMD is formulated as [103]
d
2
wmmd
= k
1
Σ
M
i=1
α
y
s
i
M
X
i=1
α
y
s
i
φ(x
s
i
) −
1
N
N
X
j=1
φ(x
t
j
)k
2
H
(12)
where α
y
s
i
is the class weight w.r.t. the class y
s
i
of the i
th
source sample and φ(·) is the nonlinear mapping into RHKS
H. M and N denote the number of samples drawn from
source and target domain, respectively.
(2) Sample Selection is another kind of kernel mapping
based re-weighting method. Zhong et al. [104] proposed
a cluster based sample selection method KMapWeighted
which was established on the assumption that the kernel
mapping can make the marginal distribution across do-
mains similar, but the conditional probabilities between two
domains after kernel mapping are still different. Therefore,
in the RKHS space, they further select those source samples
that are more likely similar to target data via a K-means
based clustering criterion. The data in the same cluster
should be with the same labels and then the source samples
with similar labels to target data were selected.