---
abstract: 'Relation extraction aims to extract relational facts from sentences. Previous models mainly rely on manually labeled datasets, seed instances or human-crafted patterns, and distant supervision. However, the human annotation is expensive, while human-crafted patterns suffer from semantic drift and distant supervision samples are usually noisy. Domain adaptation methods enable leveraging labeled data from a different but related domain. However, different domains usually have various textual relation descriptions and different label space (the source label space is usually a superset of the target label space). To solve these problems, we propose a novel model of relation-gated adversarial learning for relation extraction, which extends the adversarial based domain adaptation. Experimental results have shown that the proposed approach outperforms previous domain adaptation methods regarding partial domain adaptation and can improve the accuracy of distance supervised relation extraction through fine-tuning.'
author:
- |
    Ningyu Zhang^1,2,3^ Shumin Deng^1,3^ Zhanlin Sun^1,3^ Jiaoyan Chen^4^ **Wei Zhang^2,3^** Huajun Chen^1,3^[^1]\
    1. College of Computer Science and Technology, Zhejiang University\
    2. Alibaba Group\
    3. AZFT[^2] Joint Lab for Knowledge Engine\
    4. Department of Computer Science, Oxford University\
    {3150105645,231sm,huajunsir}@zju.edu.cn\
    jiaoyan.chen@cs.ox.ac.uk,{ningyu.zny,lantu.zw}@alibaba-inc.com
bibliography:
- 'emnlp-ijcnlp-2019.bib'
title: 'Transfer Learning for Relation Extraction via Relation-Gated Adversarial Learning'
---

Introduction
============

Relation extraction (RE) is devoted to extracting relational facts from sentences, which can be applied to many natural language processing (NLP) applications such as knowledge base construction [@wu2010open] and question answering [@dai2016cfo]. Given a sentence with an entity pair ($e_1$,$e_2$), this task aims to identify the relation between $e_1$ and $e_2$.

Typically, existing methods follow the supervised learning paradigm, and they require extensive annotations from domain experts, which are expensive and time-consuming. To alleviate such drawbacks, bootstrap learning has been proposed to build relation extractors with a small set of seed instances or human-crafted patterns, but it suffers from the semantic drift problem [@nakashole2011scalable]. Besides, distant supervision (DS) methods leverage existing relational pairs of Knowledge Graphs (KGs) such as Freebase to automatically generate training data [@mintz2009distant]. However, because of the incompleteness of KGs and a large number of relations among entities, generating sufficient noise-free labels via DS is still prohibitive.

![Knowlege transfer for RE from the general domain (e.g.,Wikipedia) to specific domains.[]{data-label="fig: pic1"}](da_new.pdf){width="48.00000%"}

Domain adaptation (DA) methods [@pan2010survey] enable leveraging labeled data from a different but related domain, which is beneficial to RE. On the one hand, it is beneficial to adapt from a fully labeled source domain to a similar but less labeled target domain. On the other hand, it is beneficial to adapt from a general domain (e.g., Wikipedia) to a specific domain (e.g., financial, medical domain). Moreover, it is beneficial to apply adaptations from a domain with high-quality labels to a domain with noisy labels in the DS settings. However, as shown in Figure \[fig: pic1\], there are at least three challenges when adapting a RE system to a new domain short of labels or with noisy labels.

-   **Linguistic variation.** First, the same semantic relation can be expressed using different surface patterns in different domains. For example, the relation *subsidiary* can be expressed such as “DeepMind is a subsidiary of Alphabet” “Microsoft is holding Mojang.” It is challenging to learn general domain-invariant textual features that can disentangle the factors of linguistic variations underlying domains and close the linguistic gap between domains.

-   **Imbalanced relation distribution.** Second, the marginal distribution of relation types varies from domain to domain. For example, a domain about GEO locations may consist of a large number of relational facts about *located\_in*, whereas a domain about persons may be more focused on *was\_born\_in*. Although the two domains may have the same set of relations, they probably have different marginal distributions on the relations. This can lead to a *negative transfer* phenomenon [@rosenstein2005transfer] where the out-of-domain samples degrade the performance on the target domain.

-   **Partial Adaptation.** Third, existing adaptation models generally assume the same label spaces across the source and target domains. However, it is a common requirement to *partially adapt* from a general domain such as Wikipedia to a small vertical domain such as news or finance that may have a smaller label space. For instance, as shown in Figure \[fig: pic1\], by using Wikidata that consists of more than 4,000 relations as a general source domain and a scientific dataset in a specific domain with a few relations as a target domain, relation type *capital\_of* will trigger the *negative transfer* problem when discriminating the target relation types *subsidiary* and *was\_born\_in*.

To address the aforementioned issues, we propose a general framework called relation-gated adversarial learning (R-Gated), which consists of three modules: (1) Instance encoder, which learns transferable features that can disentangle the explanatory factors of **linguistic variations** cross domains. We implement the instance encoder with a convolutional neural network (CNN) considering both model performance and time efficiency. Other neural architectures such as recurrent neural networks (RNN) can also be used as sentence encoders. (2) Adversarial domain adaptation, which looks for a domain discriminator that can distinguish between samples having different relation distributions. Adversarial learning helps learn a neural network that can map a target sample to a feature space such that the discriminator will no longer distinguish it from a source sample. (3) The relation-gate mechanism, which identifies the unrelated source data and down-weight their importance automatically to tackle the problem of negative transfer introduced either by **imbalanced relation distribution** or **partial transfer**.

![image](arc_final.pdf){width="100.00000%"}

Related Work
============

**Relation Extraction.** RE aims to detect and categorize semantic relations between a pair of entities. To alleviate the annotations given by human experts, weak supervision and distant supervision have been employed to automatically generate annotations based on KGs (or seed patterns/instances) [@zeng2015distant; @lin2016neural; @ji2017distant; @he2018see; @zhang2018capsule; @zeng2018large; @qin2018dsgan; @zhang2019long]. However, all these models merely focus on extracting facts from a single domain, ignoring the rich information in other domains.

Recently, there have been only a few studies on DA for RE [@plank2013embedding; @nguyen2014robust; @nguyen2014employing; @nguyen2015semantic; @fu2017domain]. Of these, [@nguyen2014robust] followed the supervised DA paradigm. In contrast, [@plank2013embedding; @nguyen2014employing] worked on unsupervised DA. [@fu2017domain; @rios2018generalizing] presented adversarial learning algorithms for unsupervised DA tasks. However, their methods suffer from the negative transfer bottleneck when encountered partial DA. To the best of our knowledge, the current approach is the first partial DA work in RE even in NLP.

**Adversarial Domain Adaptation.** Generative adversarial nets (GANs) [@goodfellow2014generative] have become a popular solution to reduce domain discrepancy through an adversarial objective concerning a domain classifier [@ganin2016domain; @tzeng2017adversarial; @shen2018wasserstein]. Recently, only a few DA algorithms [@cao2017partial; @chen2018re] that can handle **imbalanced relation distribution** or **partial adaptation** have been proposed. [@long2018] proposed a method to simultaneously alleviate negative transfer by down-weighting the data of outlier source classes in category level. [@zhang2018importance] proposed an adversarial nets-based partial domain adaptation method to identify the source samples in instance level.

However, most of these studies concentrate on image classification. There is a lack of systematic research on adopting DA for NLP tasks. Different from images, the text is more diverse and nosier. We believe these methods may transfer to the RE setting, but the effect of exact modifications is not apparent. We make the very first attempt to investigate the empirical results of these methods for RE. Moreover, we propose a relation-gate mechanism to explicitly model both coarse-grained and fine-grained knowledge transfer to lower the negative transfer effects from categories and samples.

Methodology
===========

Problem Definition
------------------

Given a source domain $D_s = \{(x_i^s,y_i^s\}_{i=1}^{n_s}$ of $n_s$ labeled samples drawn from distribution $p_s(x)$ associated with $|C_s|$ classes and a target domain $D_t = \{x_i^t\}_{i=1}^{n_t}$ of $n_t$ unlabeled samples drawn from distribution $p_t(x)$ associated with $|C_t|$ classes, where $C_t$ is a subset of $C_s$, we have $|C_s| \ge |C_t|$ in partial DA. We denote classes $ c \in C_s$ but $c \notin  C_t$ as *outlier classes*. The goal of this paper is to design a deep neural network that enables learning of transferable features $f = F_t (x)$ and adaptive classifier $y = C(f)$ for the target domain.

Instance Encoder
----------------

Given a sentence $s = \{w_1, ..., w_L\}$, where $w_i$ is the $i$-th word in the sentence, the input is a matrix consisting of $L$ vectors $X = [x_1, ..., x_L]$, where $x_i$ corresponds to $w_i$ and consists of word embedding and its position embedding [@zeng2014relation]. We apply non-linear transformation to the vector representation of $X$ to derive a feature vector $f = F(X; \theta)$. We choose two convolutional neural architectures, CNN [@zeng2014relation] and PCNN [@zeng2015distant] to encode input embeddings into instance embeddings. Other neural architectures such as RNN [@zhang2015relation] and more sophisticated approaches such as ELMo [@peters2018deep] or BERT [@devlin2018bert] can also be used.

We adopt the unshared feature extractors for both domains since unshared extractors are able to capture more domain specific features [@tzeng2017adversarial]. We train the source discriminative model $C(F_s(x;\theta))$ for the classification task by learning the parameters of the source feature extractor $F_s$ and classifier $C$:

$$\min \limits_{F_s,C} \mathbb{L}_s =\mathbb{E}_{x,y  \sim p_s(x,y)} L(C(F_s(x)),y)$$

where $y$ is the label of the source data $x$, $L$ is the loss function for classification. Afterwards, the parameters of $F_s$ and $C$ are fixed. Notice that, it is easy to obtain a pretrained RE model from the source domain, which is convenient in real scenarios.

Adversarial Domain Adaptation
-----------------------------

To address the issue of **linguistic variations** between domains, we utilize adversarial DA, which is a popular solution in both computer vision [@tzeng2017adversarial] and NLP [@shah2018adversarial]. The general idea of adversarial DA is to learn both class discriminative and domain invariant features, where the loss of the label predictor of the source data is minimized while the loss of the domain classifier is maximized.

Relation-Gate Mechanism
-----------------------

To address the issue of **imbalanced relation distribution** and **partial adaptation**, we introduce a relation-gate mechanism to explicitly model instance and category impact in the source domain.

**Category Weights Learning.** Given that not all classes in the source domain are beneficial and can be adapted to the target domain, it is intuitive to assign different weights to different classes to lower the negative transfer effect of outlier classes in the source domain as the target label space is a subset of the source label space. For example, given that the relation *capital\_of* in the source domain does not exist in the target domain as shown in Figure \[fig: pic1\], it is necessary to lower this relation to mitigate negative transfer.

We average the label predictions on all target data from the source classifier as class weights [@long2018]. Practically, the source classifier $C(F_s(x_i))$ reveals a probability distribution over the source label space $C_s$. This distribution characterizes well the probability of assigning $x_i$ to each of the $|C_s|$ classes. We average the label predictions $\hat y_i = C(F_s(x_i)),\ x_i \in D_t , $ on all target data since it is possible that the source classifier can make a few mistakes on some target data and assign large probabilities to false classes or even to outlier classes. The weights indicating the contribution of each source class to the training can be computed as follows: $$w^{category} = \frac{1}{n_t}\sum_{i=1}^{n_t} \hat y_i \label{category}$$ where $w^{category}$ is a $|C_s|$-dimensional weight vector quantifying the contribution of each source class.

**Instance Weights Learning.** Although the category weights provide a global weights mechanism to de-emphasize the effect of outlier classes, different instances have different impacts, and not all instances are transferable. Considering the relation *educated\_at* as an example, given an instance *“**James Alty** graduated from **Liverpool University**”* from target domain, semantically, a more similar instance of *“**Chris Bohjalian** graduated from **Amherst College**”* will provide more reference while a dissimilar instance *“He was a professor at **Reed College** where he taught **Steve Jobs**”* may have little contributions. It is necessary to learn fine-grained instance weights to lower the effects of samples that are nontransferable.

Given the sentence encoder of the source and target domains, we utilize a pretrained auxiliary domain classifier for instance weights learning. We regard the output of the optimal parameters of the auxiliary domain classifier as instance weights. The concept is that if the activation of the auxiliary domain classifier is large, the sample can be almost correctly discriminated from the target domain by the discriminator, which means that the sample is likely to be nontransferable [@zhang2018importance].

Practically, given the learned $F_s(x)$ from the instance encoder, a domain adversarial loss is used to reduce the shift between domains by optimizing $F_t(x)$ and auxiliary domain classifier $D$: $$\begin{split}
\min \limits_{F_t} \max \limits_{D} \mathbb{L}_d (D,F_s,F_t) =& \mathbb{E}_{x \sim p_s(x)}[logD(F_s(x))]+ \\&
\mathbb{E}_{x \sim p_t(x)}[1-logD(F_t(x))]
\label{eq: firstgan}
\end{split}$$ To avoid a degenerate solution, we initialize $F_t$ using the parameter of $F_s$. The auxiliary domain classifier is given by $D(f) = p(y=1|x)$ where x is the input from the source and the target domains. If $D(f) \equiv 1$, then it is likely that the sample is nontransferable, because it can be almost perfectly discriminated from the target distribution by the domain classifier. The contribution of these samples should be small. Hence, the weight function should be inversely related to $D(f)$, and a natural way to define the weights of the source samples is:

$$w_i^{instance} = \frac{1}{\frac{D(F_s(x))}{D(F_t(x))}+1} = 1-D(f)$$

**Relation-Gate.** Both category and instance weights are helpful. However, it is obvious that the weights of different granularity have different contributions to different target relations. On the one hand, for target relations (e.g., *located\_in*) with relatively less semantically similar source relations, it is advantageous to strengthen the category weights to reduce the negative effects of outlier classes. On the other hand, for target relations (e.g., *educated\_in*) with many semantically similar source relations (e.g., *live\_in*, *was\_born\_in*), it is difficult to differentiate the impact of different source relations, which indicates the necessity of learning fine-grained instance weights.

For an instance in the source domain with label $y_j$, the weight of this instance is: $$w_i^{total}=\alpha w_i^{instance}+(1-\alpha) w_{j}^{category}$$ where $w_{j}^{category}$ is the value in the $j$th-dimension of $w^{category}$. We normalize the weight $w_i^{total} = \frac{n_sw_i^{total}}{\sum_{i=1}^{n_s}w_i^{total}}$. $\alpha$ is the output of relation-gate to explicitly balance the instance and category weights which is computed as below. $$\alpha = \sigma(W_rF_t(x))$$ where $\sigma$ is the activation function, $W_r$ is the weight matrix.

Initialization and Implementation Details
-----------------------------------------

The overall objectives of our approach are $\mathbb{L}_s$, $\mathbb{L}_d$ and: $$\begin{split}
\min \limits_{F_t} \max \limits_{D_a} &  \mathbb{L}_w(C,D_a,F_s,F_t)=\\
& \mathbb{E}_{x \sim p_s(x)}[w^{total}logD_a(F_s(x))]+  \\
&   \mathbb{E}_{x \sim p_t(x)}[1-logD_a(F_t(x))]
\end{split}\label{eq: allpro}$$ where $D_a$ is the domain adversarial. Note that, weights $w^{total}$[^3] are automatically computed and assigned to the source domain data to de-emphasize the outlier classes and nontransferable instances regarding partial DA, which can mitigate negative transfer. The overall training procedure[^4] is shown below.

1.Pre-train $F_s$ and $C$ on the source domain and fix all parameters afterward.

2.Compute category weights by Equation \[category\].

3.Pre-train $F_t$ and $D$ by Equation \[eq: firstgan\] and compute instance weights, then fix parameters of $D$.

4.Train $F_t$ and $D_a$ by Equation \[eq: allpro\], update the parameters of $F_t$ through GRL.

Experiments
===========

Datasets and Evaluation
-----------------------

**ACE05 Dataset.** We use the ACE05[^5] dataset to evaluate our approach by dividing the articles from its six genres into respective domains: broadcast conversation (bc), broadcast news (bn), telephone conversation (cts), newswire (nw), usenet (un) and weblogs (wl). We use the same data split followed by [@fu2017domain], in which bn $\&$ nw are used as the source domain, half of bc, cts, and wl are used as the target domain for training (no label available in the unsupervised setting), and the other half of bc, cts, and wl are used as target domain for test. We split 10% of the training set to form the development set to fine-tune hyper-parameters such as $\alpha$. We conducted two kinds of experiments. The first is normal DA, in which the source and target domain have the same classes. The second is partial DA, in which the target domain has only half of the source domain classes.

**Wiki-NYT Dataset.** For DS setting, we utilize two existing datasets NYT-Wikidata [@zeng2016incorporating], which align Wikidata with New York Times corpus (NYT), and Wikipedia-Wikidata [@sorokin2017context], which align Wikidata with Wikipedia. We filter 60 shared relations to construct a new dataset Wiki-NYT[^6], in which Wikipedia is the source domain and NYT corpus is the target domain. We split the dataset into three sets: 80% training, 10% dev, and 10% test. We conducted partial DA experiments (60 classes $\rightarrow$ 30 classes). We randomly choose half of the classes to sample the target domain data.

Parameter Settings
------------------

To fairly compare the results of our models with those baselines, we set most of the experimental parameters following [@fu2017domain; @lin2016neural]. We train GloVe [@pennington2014glove] word embeddings on the Wikipedia and NYT corpus with 300 dimensions. In both the training and test set, we truncate sentences with more than 120 words into 120 words.

Evaluation Results on ACE05
---------------------------

To evaluate the performance of our proposed approach, we compared our model with various DA models: **CNN+R-Gated** is our approach, **CNN+DANN** is an unsupervised adversarial DA method [@fu2017domain], **Hybrid** is a composition model that combines traditional feature-based method, CNN and RNN [@nguyen2015combining], and **FCM** is a compositional embedding model. From the evaluation results as shown in Table \[normalace\], we observe that (1) our model achieves performance comparable to that of CNN+DANN, which is a state-of-the-art model, in normal DA scenario and significantly outperforms the vanilla models without adversarial learning. This shows that domain adversarial learning is effective for learning domain-invariant features to boost performance. (2) Our model significantly outperforms the plain adversarial DA model, CNN+DANN, in partial DA. This demonstrates the efficacy of our hybrid weights mechanism[^7].

   **Normal DA**      **bc**        **wl**        **cts**       **avg**
  ---------------- ------------- ------------- ------------- -------------
        FCM            61.90          N/A           N/A           N/A
       Hybrid          63.26          N/A           N/A           N/A
      CNN+DANN         65.16         55.55         57.19         59.30
    CNN+R-Gated     **66.15\***   **56.56\***      56.10      **59.60\***
   **Partial DA**     **bc**        **wl**        **cts**       **avg**
      CNN+DANN         63.17         53.55         53.32         56.68
    CNN+R-Gated     **65.32\***   **55.53\***   **54.52\***   **58.92\***

  : F1 score of normal and partial DA on ACE05 dataset. \* indicates $p_{value} < 0.01$ for t-test evaluation. []{data-label="normalace"}

Evaluation Results on Wiki-NYT
------------------------------

For DS setting, we consider the setting of (1) **unsupervised adaptation** in which the target labels are removed, (2) **supervised adaptation** in which the target labels are retained to fine-tune our model.

**Unsupervised Adaptation.** Target labels are unnecessary in unsupervised Adaptation. We report the results of our approach and various baselines: **PCNN+R-Gated** is our unsupervised adaptation approach, **PCNN (No DA)** and **CNN (No DA)** are the methods trained on the source domain by PCNN [@lin2016neural] and CNN [@zeng2014relation] and tested on the target domain. Following [@lin2016neural], we perform both held-out evaluation as the precision-recall curves shown in Figure \[fig: wikinytpr\] and manual evaluation in which we manually check the top-500 prediction results, as shown in Table \[unsupervise\].

We observe that (1) our approach achieves the best performance among all the other unsupervised DA models, including CNN+DANN. This further demonstrates the effectiveness of hybrid weights mechanism. (2) Our unsupervised DA model achieves nearly the same performance even with the supervised approach CNN; however, it does not outperform PCNN. This setting could be advantageous as in many practical applications, the knowledge bases in a vertical target domain may not exist at all or must be built from scratch.

![Unsupervised adaptation results.[]{data-label="fig: wikinytpr"}](pr1.pdf){width="38.00000%"}

![Supervised adaptation results.[]{data-label="fig:pretrain"}](pr2.pdf){width="38.00000%"}

**Supervised Adaptation.** Supervised Adaptation does require labeled target data; however, the target labels might be few or noisy. In this setting, we fine-tune our model with target labels. We report the results of our approach and various baselines: **PCNN+R-Gated+$k\%$** implies fine-tuning our model using $k\%$ of the target domain data, **PCNN** and **CNN** are the methods trained on the target domain by PCNN [@lin2016neural] and CNN [@zeng2014relation], and **Rank+ExATT** is the method trained on the target domain which integrates PCNN with a pairwise ranking framework [@ye2017jointly].

As shown in Figure \[fig:pretrain\] and Table \[unsupervise\], we observe that (1) our fine-tuned model +100% outperforms both CNN and PCNN and achieves results comparable to that of Rank+ExATT. The case study results in Table \[case3\] further shows that our model can correct noisy labels to some extent due to the relatively high quality of source domain data. (2) The extent of improvement from using 0% to 25% of target training data is consistently more significant than others such as using 25% to 50%, and fine-tuned model with only thousands labeled samples (+25%) matches the performance of training from scratch with 10$\times$ more data, clearly demonstrating the benefit of our approach. (3) The top 100 precision of fine-tuned model degrades from 75% to 100%. This indicates that there exits noisy data which contradict with the data from the source domain. We will address this by adopting additional denoising mechanisms like reinforcement learning, which will be part of our future work.

    Precision      Top 100      Top 200      Top 500        Avg.
  -------------- ------------ ------------ ------------ ------------
   CNN (No DA)       0.62         0.60         0.59         0.60
   PCNN (No DA)      0.66         0.63         0.61         0.63
     CNN+DANN        0.80         0.75         0.67         0.74
       CNN           0.85         0.80         0.69         0.78
       PCNN          0.87         0.84         0.74         0.81
    Rank+ExATT       0.89         0.84         0.73         0.82
   PCNN+R-Gated   **0.85\***   **0.83\***   **0.73\***   **0.80\***
       +25%          0.88         0.84         0.75         0.82
       +50%          0.89         0.85         0.76         0.82
       +75%          0.90         0.85         0.77         0.83
      +100%          0.88      **0.86\***   **0.77\***   **0.83\***

  : Precision values of the top 100, 200 and 500 sentences for unsupervised and supervised adaptation. \* indicates $p_{value} < 0.01$ for t-test evaluation. []{data-label="unsupervise"}

Ablation Study
--------------

To better demonstrate the performance of different strategies in our model, we separately remove the category and instance weights. The experimental results on Wiki-NYT dataset are summarized in Table \[tab:ablation\]. **PCNN+R-Gated** is our method; **w/o gate** is the method without relation-gate ($\alpha$ is fixed.); **w/o category** is the method without category weights ($\alpha=1$) ; **w/o instance** is the method without instance weights ($\alpha=0$) ; **w/o both** is the method without both weights. We observe that (1) the performance significantly degrades when we remove “relation-gate.” This is reasonable because the category and instance play different roles for different relations, while **w/o gate** treat weights equally which hurts the performance. (2) the performance degrades when we remove “category weights” or “instance weights.” This is reasonable because different weights have different effects in de-emphasizing those outlier classes or instances.

    Precision      Top 100      Top 200      Top 500        Ave.
  -------------- ------------ ------------ ------------ ------------
   PCNN+R-Gated   **0.85\***   **0.83\***   **0.73\***   **0.80\***
     w/o gate        0.85         0.79         0.70         0.78
   w/o category      0.81         0.76         0.66         0.74
   w/o instance      0.84         0.78         0.69         0.77
     w/o both        0.80         0.75         0.65         0.73

  : Precision values of the top 100, 200 and 500 sentences for ablation study. \* indicates $p_{value} < 0.01$ for t-test evaluation.[]{data-label="tab:ablation"}

Parameter Analysis
------------------

**Relation-Gate.** To further explore the effects of relation-gate, we visualize $\alpha$ for all target relations on Wiki-NYT dataset. From the results shown in Figure \[fig\] (a), we observe the following: (1) the instance and category weights have different influences on performance for different relations. Our relation-gate mechanism is powerful to find that instance weights is more important for those relation (e.g., *educated\_at*, *live\_in* a.k.a., relations with highest $\alpha$ score in Figure \[fig\] (a)) while category weights are more useful for other relations. (2) The category weights have relatively more influence on the performance than instance weights for most of the relations due to the noise and variations in instances; however, the category weights are averaged on all target data and thus less noisy.

**Different Number of Target Classes.** We investigated partial DA by varying the number of target classes in the Wiki-NYT dataset[^8]. Figure \[fig\] (b) shows that when the number of target classes decreases, the performance of CNN+DANN degrades quickly, implying the severe negative transfer. We observe that PCNN+R-Gated outperforms CNN+DANN when the number of target classes decreases. Note that, PCNN+R-Gated performs comparably to CNN+DANN in standard DA when the number of target classes is 60. This means that the weights mechanism will not wrongly filter out classes when there are no outlier classes.

Case Study
----------

We select samples from shared and outlier relations for detail analysis in **Case 1**, **Case 2** and **Case 3** and give examples to show that our model can correct noisy labels in **Case 4**.

**Case 1: Relation-gate.** We give some examples of how our relation-gate balance the weights for classes and instances. In Table \[case12\], we display the $\alpha$ of different relations. For relation *capital\_of*, there are lots of dissimilar relations so category weights are more important, which results in a small $\alpha$. For relation *educated\_in* (*edu\_in*), the instance difference is more important so $\alpha$ is relatively large.

**Case 2: Category Weights.** We give some examples of how our approach assign different weights for classes to mitigate the negative effect of outlier classes. In Table \[case12\], we display the sentences from shared classes and outlier classes. The relation *capital\_of* is an outlier class whereas *director* is a shared class. We observe that our model can automatically find outlier classes and assign lower weights to them.

  Instances                                                                                          Relations     $w^{c}$   $w^{i}$   $\alpha$
  -------------------------------------------------------------------------------------------------- ------------- --------- --------- ----------
  He was born in **Rio\_de\_Janeiro**, **Brazil** to a German father and a Panama nian mother.       capital\_of   0.1       0.2       0.1
  In 2014, he made his Tamil film debut in **Malini\_22\_Palayamkottai** directed by **Sripriya**.   director      0.7       0.8       0.4
  Sandrich was replaced by **George\_Stevens** for the teams 1935 film **The\_Nitwits**.             director      0.7       0.5       0.5
  **Camp** is a 2003 independent musical\_film written and directed by **Todd\_Graff**.              director      0.7       0.3       0.4
  **Chris Bohjalian** graduated from **Amherst College**                                             edu\_in       0.4       0.7       0.9

  : Examples for Case 1, 2 and 3, $w^{c}$ and $w^{i}$ denote category and instance weights, respectively.[]{data-label="case12"}

**Case 3: Instance Weights.** We give some examples of how our approach assign different weights for instances to de-emphasize the nontransferable samples. In Table \[case12\], we observe that (1) our model can automatically assign lower weights to instances in outlier classes. (2) Our model can assign different weights for instances in the same class space to down-weight the negative effect of nontransferable instances. (3) Although our model can identify some nontransferable instances, it still assigns incorrect weights to some instances (The end row in Table \[case12\]) which is semantically similar and transferable. We will address this by adopting additional mechanisms like transferable attention [@wang2019transferable], which will be part of our future work.

  -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  **Instances**                                                                                                                                                                        **DS**   **R-Gated**
  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -------- -------------
  They are trying to create a united front at home in the face of the pressures **Syria** is facing,“ said **Sami Moubayed**, a political analyst and writer here.&p\_of\_birth& NA\            
  Iran injected **Syria** with much confidence: stand up, show defiance,“ said **Sami Moubayed**, a political analyst and writer in Damascus.&p\_of\_birth& NA\                                 
  -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  : Examples for Case 3, $p\_of\_birth$ is $place\_of\_birth$ for short.[]{data-label="case3"}

**Case 4: Noise Reduction.** We give some examples of how our approach takes effect in correcting the noisy labels of the target domain. In Table \[case3\], we display the sentences that are wrongly marked in DS settings and show their labels predicted by our approach. We observe that our model can correct some noisy labels, verifying that our model can be used to adapt from a source domain with high-quality labels to a target domain with noisy distant labels. This is reasonable because Wikidata is partly aligned with the NYT corpus, entity pairs with fewer sentences are more likely to be false positive, which is the major noise factor. However, Wikidata can be relatively better aligned with Wikipedia, which can create more true positive samples.

Conclusion and Future Work
==========================

In this paper, we propose a novel model of relation-gated adversarial learning for RE. Extensive experiments demonstrate that our model achieves results that are comparable with that of state-of-the-art DA baselines and can improve the accuracy of distance supervised RE through fine-tuning. In the future, we intend to improve the DA using only a few supervisions, namely few-shot adversarial DA. It will also be promising to apply our method to other NLP scenarios.

[^1]: Corresponding author.

[^2]: Alibaba-Zhejiang University Frontier Technology Research Center

[^3]: The weights can be updated in an iterative fashion when $F_t$ changes. However, we found no improvement in experiments, so we compute the weights and fix them.

[^4]: Training details and hyper-parameters settings can be found in supplementary materials

[^5]: https://catalog.ldc.upenn.edu/LDC2006T06

[^6]: We will release our dataset.

[^7]: Since adversarial DA method significantly outperforms traditional methods [@fu2017domain], we skip the performance comparison with FCM and Hybrid for partial DA.

[^8]: The target classes are sampled three times randomly, and the results are averaged.
