---
title: "Adversarial Transfer Learning for Chinese Named Entity"
description: "A study of how adversarial transfer from word segmentation and self-attention help identify and classify named entities in Chinese text."
canonical: "https://research.elamur.ai/free/en/papers/cao-2018-adversarial-transfer-learning-chinese-named/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/cao-2018-adversarial-transfer-learning-chinese-named/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2018](https://md.research.elamur.ai/free/en/papers/2018/) / Adversarial Transfer Learning for Chinese Named Entity Recognition with Self-Attention Mechanism

# Adversarial Transfer Learning for Chinese Named Entity Recognition with Self-Attention Mechanism

Paper · 2018 · Pengfei Cao, Yubo Chen, Kang Liu et al.

**Authors:** [Pengfei Cao](https://md.research.elamur.ai/free/en/authors/pengfei-cao/), [Yubo Chen](https://md.research.elamur.ai/free/en/authors/yubo-chen/), [Kang Liu](https://md.research.elamur.ai/free/en/authors/kang-liu/), [Jun Zhao](https://md.research.elamur.ai/free/en/authors/jun-zhao/) and [Shengping Liu](https://md.research.elamur.ai/free/en/authors/shengping-liu/) · **Year:** 2018 · **Venue:** Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[**195** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2890459330) · Cited by **32** papers in our library of the 163,136 papers whose bibliographies we read · [Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing](https://aclanthology.org/volumes/D18-1/) · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/D18-1017/)
- [PDF](https://aclanthology.org/D18-1017.pdf)
- [DOI 10.18653/v1/d18-1017](https://doi.org/10.18653/v1/d18-1017)
- [OpenAlex](https://openalex.org/W2890459330)

Citations: OpenAlex, 2026-10-14.

## Summary

A name can span several words, and a word boundary can be exactly the clue that tells two neighboring names apart. The challenge is deciding when to use that clue. This paper studies Chinese [named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/), the task of finding the span of a name and assigning it a category such as person, location, or organization. The authors have relatively little text marked for entities and much more marked for word boundaries. They ask how a recognizer can learn from the larger body of data while keeping the freedom to treat a multiword name as a single entity.

Their system learns Chinese word segmentation and entity recognition together. Each task has a private route for learning features suited to its own labels, and both use a common route. During training, a classifier tries to tell which task supplied a sentence by looking at a pooled summary of its shared representation. The shared encoder receives the classifier’s training signal with its direction reversed, encouraging it to keep features that help sequence labeling while making the source task harder to identify. The authors also add self-attention, which lets a character draw directly on evidence from other positions in its sentence. A task-specific decoder then scores complete sequences of labels, taking account of which labels occur next to each other.

On the original WeiboNER test split, the system reaches 53.08% F1 for named entities, compared with 48.41% for the strongest earlier result in that comparison. Its recall rises while its precision falls relative to that earlier system. On the SighanNER test split, it reaches 90.64% F1, compared with 89.21% for the strongest earlier result, with higher precision and recall. On the updated WeiboNER test data, it reaches 58.70% overall F1, behind the highest listed result of 58.99%. The version of the benchmark and the kind of mention being scored both matter to the comparison.

The authors also compare simplified versions of their own system. Joint training with segmentation improves F1 on both benchmarks used in those comparisons. Adding the adversarial objective to that setup produces a further gain, and adding self-attention to the recognition-only baseline helps on both benchmarks as well. The complete system has the highest F1 among the tested variants. Those comparisons establish a benefit from the training and architectural changes in this setup. How completely the shared representation filters out segmentation-specific information remains an open question.

## Deep dive: Adversarial Transfer Learning for Chinese Named Entity Recognition with Self-Attention Mechanism

A study of how adversarial transfer from word segmentation and self-attention help identify and classify named entities in Chinese text. · about 33 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### A word boundary and an entity boundary answer different questions

Entity recognition asks where a mention begins and ends, and what the mention refers to at the level of the annotation categories. A system must get both decisions right. A character sequence classified as a location can still be an incorrect prediction if it covers only part of the location name. Conversely, a span can have the right extent and still receive the wrong category. The paper treats recognition as a sequence-labeling problem so that both decisions can be recovered from the labels assigned across a sentence.

The authors place the task early in a larger chain of language processing. Their examples of downstream uses include relation extraction, event extraction, and [question answering](https://md.research.elamur.ai/free/en/topics/question-answering/). The relevance of boundaries is especially clear when a later procedure needs to know which textual mention participates in a relation. The paper cites [A Shortest Path Dependency Kernel for Relation Extraction](https://md.research.elamur.ai/free/en/papers/bunescu-2005-shortest-path-dependency-kernel-relation/) in this context. The experiments themselves evaluate recognition, so the result concerns the quality of the entity labels supplied at this stage.

Chinese word segmentation gives the recognizer a potential source of additional supervision. In a corpus with [linguistic annotation](https://md.research.elamur.ai/free/en/concepts/annotation/) for segmentation, the labels indicate how the written characters group into words. The segmentation data available to the authors are more plentiful than the entity data, and some of the distinctions learned from segmentation are also relevant to recognition. When characters on opposite sides of a word boundary belong to different entities, recognizing the break can help the entity tagger avoid taking them as one span. When a name coincides with a word, the two annotation tasks can favor the same extent.

The authors use a sentence about Hilton leaving Houston Airport to make the difference concrete. In their example, the boundaries around the reference to Hilton and around the verb are compatible across the tasks. Houston Airport is different. The segmentation analysis divides Houston from Airport, while the entity annotation groups the full airport name into one span. The segmenter’s internal break is appropriate for its own task. If that break becomes a compulsory entity boundary, it leads the recognizer to return the wrong span.

The example gives the paper a more specific goal than simply supplying a recognizer with extra data. The auxiliary annotations contain both patterns worth sharing and distinctions that matter in their original task. A recognizer that sees only the entity annotations has no access to the extra supervision. A recognizer that inherits the segmenter’s decisions as fixed input features has to learn what to do when they disagree with the entity annotations. Cao and colleagues design their system to learn from both sets of labels and to represent some of what it learns separately for each task.

#### Context can determine the category

The sentence about Hilton also illustrates a different problem. A surface form can be compatible with multiple entity types. In the authors’ example, the action of leaving supplies evidence that Hilton is a person. In a sentence about staying at the Hilton, the paper treats the same name as an organization. A lookup keyed to the characters of the name would have access to the same name in either sentence. It is the surrounding material that supports the different classification.

This problem persists even when the system already uses a recurrent encoder to read context. A bidirectional long short-term memory network, or BiLSTM, can collect information from both directions. Its states at nearby positions pass information along the sequence. The paper’s distinction is about the route through which the evidence travels. In the recurrence, the influence of a distant position reaches a character through intermediate states. In self-attention, the representation at that character can directly assign weight to the representation at the distant position.

The paper consequently brings together two questions about what evidence the recognizer should use. Segmentation can give it evidence about where a span might break. Other positions in the sentence can give it evidence about what kind of span it is looking at. This is a useful way to follow the architectural choices, although the experiments score the final predictions and the components can affect both sets of decisions. Attention may influence a boundary, and information learned during joint training may change a type prediction.

#### What earlier systems supplied

The paper describes an earlier period in which recognizers relied heavily on designed input features. Among the methods it names are support vector machines, hidden Markov approaches, and conditional random fields. It cites [Nymble](https://md.research.elamur.ai/free/en/papers/bikel-1997-nymble-high-performance-learning-name/) as an example of the hidden Markov approach. It also describes earlier work that treats identifying a Chinese entity and categorizing it as a joint problem. That framing is important here because the span and its category are both outputs of the same sequence prediction.

In the subsequent neural approaches discussed by the authors, the sequence encoder learns features that a prediction layer can use. The combination of a BiLSTM encoder and a conditional random field decoder is particularly important to this paper. The encoder supplies contextual features for each position, and the decoder can prefer some successions of labels over others. The authors use that combination as their own recognition-only baseline. They also mention prior work using a character-level recurrent encoder for spelling features and work using gated convolutions for Chinese entity recognition.

Segmentation had already been brought into Chinese recognition in different ways. In a pipeline, a system can obtain word segmentation first and pass information from that stage into the entity tagger. The paper discusses examples that use this strategy, including a system that supplies segmentation as extra sequence-labeling features. An erroneous segmentation can then affect the later recognition decision. Even a correct segmentation, under its own annotation rules, can place an internal break inside a name.

Peng and Dredze had also trained segmentation and recognition jointly and experimented with sharing learned character representations and recurrent states. That work supplies a closer precedent for Cao and colleagues. It makes segmentation supervision part of learning instead of requiring a separate series of word-boundary decisions before recognition. The question Cao and colleagues pursue is how to shape what goes through the common part when the two tasks impose different boundary conventions.

The paper draws on earlier adversarial training for domain adaptation, transfer across languages, multitask learning, and learning from crowd annotations. It also identifies prior work on separating private and shared representations. From this line of research comes the idea of using a classifier to reveal which features allow an encoder’s output to be traced to its source. From earlier self-attention research in [machine translation](https://md.research.elamur.ai/free/en/topics/machine-translation/) and [semantic role labeling](https://md.research.elamur.ai/free/en/topics/semantic-role-labeling/) comes the way of connecting positions directly. The paper combines those ideas around a specific choice of auxiliary task for Chinese recognition.

### The method, step by step

#### From a sentence to two views of its characters

Training starts with a sentence drawn from either the entity corpus or the segmentation corpus. The system knows which corpus supplied it. That identity selects the private encoder and the label decoder and also supplies the target for the adversarial classifier. A training sentence can therefore update the shared encoder even when its annotations exist for only one task. The setup does not require the segmentation corpus to carry entity labels or the entity corpus to carry segmentation labels.

The sentence enters as a sequence of characters. For each one, the system looks up a dense numerical representation, or embedding, in a matrix initialized with pretrained vectors. These vectors supply the inputs on which the recurrent encoders operate. Boundaries are learned from the sequence annotations. A character enters the encoder regardless of whether the word segmenter would group it with a preceding or following character. The role of the embeddings here is analogous to the use of [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/), with characters serving as the lookup units.

The same input for the current task is read by a private BiLSTM and the shared BiLSTM. A recognition sentence takes the recognition-private route, and a segmentation sentence takes the segmentation-private route. The shared route uses the same encoder parameters for both. This arrangement lets the private representation preserve distinctions that are useful under the current annotation scheme. It also gives both tasks a way to improve the common representation through their respective label losses.

Each route applies self-attention to its own recurrent states. The two resulting representations are joined character by character and passed to the decoder for the selected task. In parallel during training, the shared result is pooled across the sentence and sent to the task discriminator. The decoder can benefit from the private features, while the discriminator’s view is restricted to the shared branch. The classification signal therefore puts pressure on the particular representation through which transfer is meant to happen.

How a training sentence supplies labels and shared features The steps in order.

#### Reading the sentence in both directions

A long short-term memory network, or LSTM, is a recurrent unit with a memory cell and gates that regulate the use of information over a sequence. The forward LSTM incorporates the current input into a state carried from the preceding position. The backward LSTM performs the corresponding computation while traversing the sentence in the other direction. The paper writes the recurrent steps and their combination separately. The notation here distinguishes the two directional states with arrows.

```
h⃗ᵢ = LSTM(h⃗ᵢ₋₁, xᵢ)
```

Here `i` is the character position and `xᵢ` is its embedding. `h⃗ᵢ` is the new forward hidden state, and `h⃗ᵢ₋₁` is the state from the previous position in the forward traversal. `LSTM` denotes the gated recurrent update. The notation summarizes that update without expanding the internal gates or writing out the memory cell.

```
h⃖ᵢ = LSTM(h⃖ᵢ₊₁, xᵢ)
```

Here `h⃖ᵢ` is the backward hidden state at position `i`, and `h⃖ᵢ₊₁` is the state from the next character in written order, which has already been visited in the backward traversal. `xᵢ` again supplies the current embedding. `LSTM` now denotes the update in the backward network.

```
hᵢ = h⃗ᵢ ⊕ h⃖ᵢ
```

Here `hᵢ` is the joined hidden state at position `i`. The symbol `⊕` means concatenation, so the entries of the forward state `h⃗ᵢ` and the backward state `h⃖ᵢ` are retained in separate parts of one vector. Each directional state has width `dₕ`, where `dₕ` is the hidden-state size in one direction. The joined state has width `2dₕ`.

For the next steps, `k` indicates the task that supplied the sentence. The paper represents an input sentence by `x`, its characters by `cᵢ`, and its length by `N`. An embedding `xᵢᵏ` is the vector for character `cᵢ` in a sentence from task `k`, and `dₑ` is the width of such a vector. The shared step uses the same parameter set whichever task `k` denotes.

```
sᵢᵏ = BiLSTM(xᵢᵏ, sᵢ₋₁ᵏ; θₛ)
```

Here `sᵢᵏ` is the shared state at character position `i` for task `k`. `xᵢᵏ` is the input embedding, and `sᵢ₋₁ᵏ` is the preceding state in the paper’s compact recurrent notation. `BiLSTM` stands for the bidirectional encoder described by the preceding directional equations. The semicolon sets off `θₛ`, the trainable parameters of the shared encoder. The compact recurrence denotes an encoder that reads in both directions, as specified by the separate forward and backward equations.

```
hᵢᵏ = BiLSTM(xᵢᵏ, hᵢ₋₁ᵏ; θₖ)
```

Here `hᵢᵏ` is the private state at position `i` for task `k`, and `hᵢ₋₁ᵏ` is its preceding state in the same compact notation. `xᵢᵏ` is again the current embedding. The parameter set `θₖ` is specific to the task. Thus the same character input can produce different features in the shared and private sequences, even before attention has mixed evidence across positions.

This split changes who can use each feature and which training examples can shape it. A feature in the shared sequence is available to both decoders when they are active. A feature in the recognition-private sequence can help the recognition decoder and is learned through the recognition task. The separation makes it possible to train a common representation without requiring every useful segmentation feature to be equally useful to the recognizer.

#### Giving a character a direct route to other positions

The attention stage operates on the entire sequence of recurrent states in each branch. Write `H` for the matrix whose rows are the private states and `S` for the corresponding matrix of shared states. Each row already provides a character’s context from the two recurrent directions. Attention builds another representation for that character by deciding how much to draw from each source position in the same sentence. The mechanism belongs to the family described under [Transformer and attention](https://md.research.elamur.ai/free/en/concepts/transformer/).

The authors describe the operation using queries, keys, and values. For a given position, its query is the representation used to ask which other positions have relevant evidence. A key is the representation against which that query is compared. A value is the representation that can be passed on, weighted by the strength of the match. The terms distinguish jobs in the computation. In the private branch, all three start from `H`, and the shared branch uses its own sequence. The separate projections give the same input states different roles in each attention head.

```
Attention(Q, K, V) = softmax(QKᵀ / √d) V
```

Here `Q`, `K`, and `V` are the matrices of queries, keys, and values. `Kᵀ` is the transpose of the key matrix, so `QKᵀ` compares each query row with each key row by a dot product. `d` is the scaling dimension, which the paper identifies in its description of this equation with the full BiLSTM output width `2dₕ`. The square-root symbol `√` gives the denominator. `softmax` turns the scores for each query into weights over the source positions. Multiplying those weights by `V` returns a weighted combination of the value rows at each query position.

The output for a character still occupies a row associated with that character. Attention changes what evidence appears in the row. In the example involving Hilton, a representation at the name can use evidence at the verb’s position through one attention computation. The recurrent encoder still contributes the states on which the comparison is based, so the features being compared can already contain evidence from both sides of their positions.

The paper uses multiple heads so that several sets of comparisons can be learned in parallel. Each head has its own parameters for projecting queries, keys, and values. The projection changes the features that participate in the dot products and the features made available in the weighted combinations. The recurrence and the attention thus perform successive operations. The recurrence encodes the sequence in order, and attention recombines its states according to learned comparisons between positions.

```
headᵢ = Attention(QWᵢ^Q, KWᵢ^K, VWᵢ^V)
```

In this equation `i` indexes an attention head. `headᵢ` is that head’s output across the sentence. `Q`, `K`, and `V` are the inputs in their query, key, and value roles. `Wᵢ^Q`, `Wᵢ^K`, and `Wᵢ^V` are the corresponding learned projection matrices for head `i`, and juxtaposition denotes matrix multiplication. `Attention` is the scaled, normalized weighting operation above, applied to the projected inputs.

```
dₖ = 2dₕ / h
```

Here `dₖ` is the projection width used for a head, `dₕ` is the hidden-state width of one recurrent direction, and `h` is the number of heads. The quantity `2dₕ` is the joined recurrent width. The subscript in `dₖ` is the paper’s notation for the attention width, independent of the task index `k` used in the encoder equations. Each input projection maps from the joined recurrent width to this head width.

```
A = (head₁ ⊕ … ⊕ headₕ)Wᵒ
```

Here `A` denotes the combined attention output. The terms from `head₁` through `headₕ` are the outputs of all the heads, the ellipsis covers the intervening heads, and `⊕` joins their features at each position. `Wᵒ` is a trainable output projection with input and output width `2dₕ`. It mixes features from the concatenated heads into the representation passed on from the attention layer.

The distinction between branch and head is important. The private and shared branches differ in which tasks train their encoders and who can subsequently use their output. The heads within one attention layer differ in their learned projections of the same branch input. A head has no annotation that says it must look for a particular kind of contextual clue. Its projections are shaped through the objectives of the branch in which it operates.

#### From character features to a whole sequence of labels

The tagger has access to both forms of evidence after attention. To keep the recurrent states and the outputs of attention distinct, use `A` for attended features and `U` for the decoder input. For a sentence from either task, the joined input has a row for each character.

```
Uᵏ = Aₚᵏ ⊕ Aₛᵏ
```

Here `Uᵏ` is the final sequence of feature vectors for task `k`. `Aₚᵏ` is the attended private sequence and `Aₛᵏ` is the attended shared sequence. The subscripts `p` and `s` mark private and shared output. `⊕` concatenates the features of matching character positions. Each attended branch contributes width `2dₕ`, and the combined feature width is `4dₕ`, with `dₕ` again denoting the size of a directional recurrent state.

A conditional random field, or CRF, uses the joined features to score candidate label sequences. There is a separate CRF for each task because the available labels and the useful transitions between them depend on the annotation. A first scoring operation supplies evidence for individual tags at individual characters. The sequence score then incorporates the interaction between consecutive tags. This gives the decoder a way to favor a coherent run of labels for an entity even when the local choices are ambiguous.

```
oᵢ = Wₛuᵢ + bₛ
```

Here `uᵢ` is the joined feature vector at position `i`, with the task superscript omitted because one decoder has already been selected. `oᵢ` is a vector of individual label scores for that character. `Wₛ` is the learned scoring matrix, with one row for each possible output label and input width `4dₕ`. `bₛ` is the learned bias vector with one entry per label. The subscript `s` on the matrix and bias belongs to the scoring notation, while the input `uᵢ` contains both branches.

```
s(x, y) = ∑ᵢ₌₁ᴺ (oᵢ,ᵧᵢ + Tᵧᵢ₋₁,ᵧᵢ)
```

Here `x` is the input sentence, `y` is a proposed label sequence, and `s(x, y)` is its score. The sum runs over position `i` from the first character to the sentence length `N`. `yᵢ` is the proposed label at position `i` and `yᵢ₋₁` refers to its predecessor in the transition term. `oᵢ,ᵧᵢ` selects the local score from `oᵢ` for the proposed label `yᵢ`. `T` is the transition-score matrix, and `Tᵧᵢ₋₁,ᵧᵢ` gives the score associated with going from the predecessor label to the current one. The score denoted by `s` here belongs to the CRF.

```
ȳ = argmaxᵧ ∈ Yₓ s(x, y)
```

Here `ȳ` is the predicted label sequence and `Yₓ` is the collection of candidate sequences for sentence `x`. `argmax` returns the sequence `y` that maximizes the score `s(x, y)`. Because the score uses local tag scores and adjacent transitions, the authors can use the Viterbi algorithm to find the best sequence. It retains the best partial paths by ending label and recovers the best complete path.

Training uses the same scoring rule to assign a probability to the annotated sequence. A higher score for that sequence helps only relative to the other sequences available for the sentence. The normalization puts that comparison into the loss, encouraging the decoder to rank the annotated path above alternatives.

```
p(ŷ | x) = exp(s(x, ŷ)) / ∑ỹ ∈ Yₓ exp(s(x, ỹ))
```

Here `p(ŷ | x)` is the conditional probability of the annotated sequence `ŷ` for sentence `x`. The vertical bar reads “given,” and `exp` is the exponential function. The numerator uses the sequence score `s(x, ŷ)` for the annotated path. The denominator sums the exponentiated scores over candidate sequences `ỹ` in `Yₓ`, the set of possible paths for `x`. Each candidate is scored by the same function `s`.

```
Lₜₐₛₖ = −∑ᵢ₌₁ᵀ log p(ŷ⁽ⁱ⁾ | x⁽ⁱ⁾)
```

Here `Lₜₐₛₖ` is the loss for the active labeling task. `T` in the upper limit is the number of training examples in the sum, a separate use of the letter from the transition matrix. `i` now indexes examples. `x⁽ⁱ⁾` is the input of example `i` and `ŷ⁽ⁱ⁾` is its annotated sequence. `p` supplies the probability under the selected CRF, and `log` takes its logarithm. The leading minus sign makes training minimize a loss that decreases as the annotated sequences receive higher probabilities.

#### Teaching the shared route through a task classifier

The discriminator sees a summary of the shared sequence, with the identity of the source task as its training label. The input to the discriminator comes from max pooling. For any feature coordinate of the attended shared sequence, pooling takes the largest value of that coordinate across the positions. Different coordinates can take their maxima from different characters. The result is a vector of a fixed width even when sentences have different lengths.

```
s′ᵏ = Maxpooling(Aₛᵏ)
```

Here `Aₛᵏ` is the attended shared sequence for a sentence from task `k`. `Maxpooling` takes the maximum over the character positions separately for each feature. `s′ᵏ` is the resulting sentence vector, with the same feature width as a row of the shared sequence. The prime distinguishes the pooled vector from the recurrent states at individual characters.

```
D(s′ᵏ; θ_d) = softmax(W_d s′ᵏ + b_d)
```

Here `D` is the discriminator, `s′ᵏ` is the pooled input, and `θ_d` denotes its trainable parameters. `W_d` projects the input to one score per task and `b_d` gives the corresponding biases. Their output dimension is `K`, the number of tasks, and the input dimension of `W_d` is `2dₕ`. `softmax` turns the task scores into a probability distribution. The subscript `d` on these parameters marks their role in discrimination.

The two sides receive opposing instructions about task identity. The discriminator is trained to give the observed task a high probability. The shared encoder is trained to make that same prediction difficult, while still supplying useful features to the CRFs. The paper describes this as a minimax problem. Writing `Dₖ` explicitly makes clear which entry of the discriminator’s probability distribution is taken in the objective.

```
L_Adv = min_{θₛ} max_{θ_d} ∑ₖ₌₁ᴷ ∑ᵢ₌₁ᵀᵏ log Dₖ(Eₛ(xₖ⁽ⁱ⁾); θ_d)
```

Here `L_Adv` denotes the adversarial objective. `θₛ` is the parameter set the paper identifies for the shared BiLSTM and `θ_d` is the discriminator parameter set. `K` is the number of tasks, `k` indexes them, and `Tᵏ` is the number of training examples for task `k`. `xₖ⁽ⁱ⁾` is example `i` from that task. `Eₛ` denotes the shared feature computation that supplies the discriminator with its input. `Dₖ` takes the probability for the observed task, and `log` takes its logarithm. `max` describes the discriminator’s effort to make the observed task probable, and `min` describes the shared encoder’s opposing objective.

The implementation uses a gradient reversal layer on the discriminator path to apply the opposing update directions during back-propagation. The discriminator parameters receive a signal to improve task prediction. The signal traveling back from that objective towards the shared encoder has its sign reversed. In a single update the shared route can therefore receive supervision to help the labeling task and pressure to make the source task hard to recover. The private encoder has a path to its decoder and is outside this adversarial path.

The discriminator observes which dataset a sentence came from through the task label it is assigned. In this setup that can reflect properties of the source corpus as well as distinctions between annotation tasks. The objective gives the shared encoder pressure to suppress whatever makes the source predictable to this classifier. There is no separate boundary-by-boundary instruction telling it exactly which shared features to retain. The labeling losses supply the positive reason to retain evidence useful for the tasks.

#### Selecting the active loss and training the system

The final objective uses a switch based on the origin of the sentence. The recognition loss is active for a recognition example, and the segmentation loss is active for a segmentation example. The adversarial term accompanies either kind of batch.

```
L = L_NER · I(x) + L_CWS · (1 − I(x)) + λL_Adv
```

Here `L` is the combined training objective. `L_NER` is the negative log-likelihood for recognition and `L_CWS` is the corresponding loss for Chinese word segmentation. `I(x)` is the task switch for input `x`, and the factors `I(x)` and `1 − I(x)` activate the appropriate labeling loss. `·` denotes multiplication. `L_Adv` is the adversarial term, and `λ` sets its weight. Gradient reversal supplies the opposing directions associated with that term.

```
I(x) = { 1 if x ∈ D_NER, 0 if x ∈ D_CWS }
```

Here `I` is the switch, `x` is a training input, and `∈` means membership in a corpus. `D_NER` denotes the recognition training corpus and `D_CWS` denotes the segmentation training corpus. The output `1` activates the recognition term, and `0` activates the segmentation term through its complement in the objective. These corpus symbols distinguish collections of examples from the discriminator function `D`.

The authors alternate tasks during training. On an iteration they choose the next task in turn, draw a batch from its training corpus, and update the relevant parameters with Adam. The common path receives updates across the two tasks, while each decoder learns from batches with the corresponding annotations. Since the tasks can progress at different rates, the authors base early stopping on recognition performance. Recognition is the target whose development data determine when the joint training process stops.

The character embeddings have width 100 and the recurrent states in each direction have width 120. The attention layer uses 8 projections. The initial learning rate is 0.001, the adversarial coefficient is 0.06, and the dropout rate is 0.3. The authors report batch sizes of 64 for SighanNER and 20 for WeiboNER. They use Xavier initialization for trainable parameters and pretrained character vectors obtained with word2vec on Baidu Encyclopedia and Weibo corpora. They select hyper-parameters against the Chinese recognition development set and release their source code under the name AT4ChineseNER.

At prediction time for recognition, the sentence supplies character inputs to the shared and recognition-private routes. Their attended features go to the recognition CRF, which returns the best label sequence. The task classifier supplies the pressure used in training. There is no segmentation prediction in the sequence of decisions required to decode entities. This is how the architecture can use evidence from segmentation supervision without requiring a predicted word break to determine the extent of the returned name.

### Experiments and results

#### Datasets and what the scores count

The recognition experiments use WeiboNER and SighanNER, with MSR as the source of segmentation supervision. WeiboNER is drawn from social media. Its annotation distinguishes person, location, organization, and geopolitical entity, and it includes named entities and nominal mentions. The paper reports named entities separately in its comparison on the original benchmark. On the updated benchmark it gives results for named entities, nominal mentions, and an overall F1. Each of those columns answers a different question about what was recovered.

The original WeiboNER setup follows the splits used by Peng and Dredze. The paper lists 1350 training sentences, 270 development sentences, and 270 test sentences. The development sentences support decisions about the training settings, while the test sentences support the reported comparison. The updated annotation is treated as a separate evaluation. An F1 on its named-entity column belongs to that version, and the overall F1 additionally covers the nominal mentions evaluated there.

SighanNER uses simplified Chinese, with person, location, and organization as the annotated entity categories. Since the dataset has no development set of its own in the authors’ setup, they sample 10% of the training data for development. The resulting counts reported in the dataset table are 41,728 training sentences, 4636 development sentences, and 4365 test sentences. The paper’s explicit split counts are the relevant figures for understanding how much data went into fitting the recognizer and how much went into choosing settings.

MSR comes from the SIGHAN2005 segmentation benchmark. The paper lists 86,924 training sentences and 3985 test sentences for it, with no development count in the dataset table. Its role is auxiliary. The recognizer receives the benefit of learning alongside segmentation, and the reported benchmark outcomes concern recognition. The experiments consequently assess whether adding that corpus and the proposed training arrangement helps entity prediction. They do not use a reported MSR segmentation score to decide which recognition system wins.

The paper uses precision, recall, and F1. Precision asks how many of the returned mentions are correct among those the system returns. Recall asks how many of the annotated mentions the system finds. The predictions specify both an extent and a category. F1 combines precision and recall in a single measure, with lower performance on either side affecting the result. The individual scores remain informative because an improvement in F1 can coincide with a change in which kinds of errors the system makes.

#### Original WeiboNER

For the original test data, the paper compares the full system with several results from Peng and Dredze. One set of comparisons starts from a CRF and varies the way words, characters, and character positions are represented. The CRF entry has 35.00% named-entity F1. The entry supplied with word features reaches 36.90%, and the character-based entry reaches 42.86%. The earlier jointly trained character-position system records 44.09%. These results give context for why an approach that learns from character position or word grouping was already a plausible direction on WeiboNER.

The later Peng and Dredze comparisons address transferring segmentation information more directly. The pipeline supplying learned segmentation representations to the entity tagger records 46.20% named-entity F1 on the original WeiboNER test data. Joint training through character embeddings gives 46.75%, and sharing recurrent hidden representations gives 47.92%. Their main joint system, which uses both kinds of representation, reaches 48.41%. That is the highest prior F1 in the paper’s comparison on this original version.

Named-entity F1 on the original WeiboNER test split The complete system leads the earlier joint and pipeline approaches on named-entity F1.

**The numbers**

| System or setting | F1 % |
| --- | --- |
| Earlier joint character-position system | 44.09 |
| Pipeline with segmentation representations | 46.20 |
| Earlier joint character embeddings | 46.75 |
| Earlier joint recurrent states | 47.92 |
| Earlier joint recurrent states and embeddings | 48.41 |
| Adversarial transfer with self-attention (this paper) | 53.08 |

The complete system reports 55.72% precision, 50.68% recall, and 53.08% F1 for named entities on this test split. The earlier joint recurrent and embedding system reports 63.33% precision and 39.18% recall along with its 48.41% F1. The larger share of annotated named entities recovered is central to the result. The full system wins on F1 while returning a smaller share of correct predictions among the mentions it proposes. A reader who cares particularly about reliable individual predictions would need the precision column as well as the F1 ranking.

WeiboNER also allows the authors to discuss a possible transfer across text domains. They regard MSR as news and WeiboNER as social media. Successful transfer in this pairing shows that helpful auxiliary supervision can come from a corpus the authors regard as belonging to a different domain. Because the segmentation task and the corpus source change together, the result does not identify how much of the benefit comes from coping with a domain difference. It establishes that the complete training arrangement can improve original WeiboNER F1 with the chosen auxiliary source.

#### Updated WeiboNER

The updated annotations give a more mixed comparison. The proposed system has 59.51% precision, 50.00% recall, and 54.34% F1 for named entities. Among the comparison systems, the Peng and Dredze joint approach scores 55.28% F1 for named entities, with 66.67% precision and 47.22% recall. The later of the He and Sun systems reaches 54.50% named-entity F1, with 61.68% precision and 48.82% recall. The proposed system has the highest named-entity recall in the table, accompanied by the lowest named-entity precision.

For nominal mentions, the proposed system reports 71.43% precision, 47.90% recall, and 57.35% F1. The Peng and Dredze joint system has 62.97% nominal-mention F1, and the later He and Sun system has 62.17%. The distribution of performance across mention kinds helps explain why strong named-entity recall does not yield the highest overall result. The nominal-mention recall of the proposed system is the lowest of the entries, and its nominal-mention F1 is also the lowest listed.

For overall F1 on the updated test data, the earlier Peng and Dredze system with jointly trained embeddings has 56.05%, and their subsequent joint segmentation and recognition approach has 58.99%. He and Sun’s earlier system reports 54.82%, and their system that draws on out-of-domain and in-domain unlabelled data reports 58.23%. Cao and colleagues report 58.70%. Their comparison in the discussion emphasizes the result against the latter He and Sun entry. The full table places the proposed system below the best listed overall F1 and above the other listed results.

This is a case where identifying the split and the target matters as much as quoting the score correctly. The 53.08% result is the proposed system’s named-entity F1 under the original WeiboNER evaluation. The 54.34% result concerns named entities on the updated benchmark, and the 58.70% result concerns overall performance there. The table of architectural variants corresponds to the original named-entity evaluation. It offers no parallel component-by-component account of the nominal-mention outcome on the updated test data.

#### SighanNER

The SighanNER comparison spans a character-based CRF, a segmentation-to-recognition pipeline, and an approach that adds segmentation as features for the tagger. Chen and colleagues’ character-based CRF has 91.22% precision, 81.71% recall, and 86.20% F1 on the test split. Zhou and colleagues first segment with a character-level CRF and then tag with a word-level CRF. Their reported scores are 88.94% precision, 84.20% recall, and 86.51% F1. The authors use these comparisons to situate the use of segmentation as learned supervision among other ways of bringing word information into recognition.

Luo and Yang train a word segmenter and use its segmentation in the feature input to the tagging procedure. Their approach records 91.30% precision, 87.22% recall, and 89.21% F1, the strongest previous F1 listed for this benchmark. The full system reports 91.73% precision, 89.58% recall, and 90.64% F1. These changes in precision and recall differ from the tradeoff on original WeiboNER. Here the proposed method is ahead of the strongest previous F1 entry on both measures as well as on F1.

Entity recognition F1 on the SighanNER test split Adversarial transfer with self-attention achieves the highest F1 among the reported systems.

**The numbers**

| System or setting | F1 % |
| --- | --- |
| Chen et al. character CRF | 86.20 |
| Zhou et al. segmentation and tagging pipeline | 86.51 |
| Luo and Yang segmentation features | 89.21 |
| Adversarial transfer with self-attention (this paper) | 90.64 |

The authors emphasize that this recognition result is achieved without supplying segmentation output as an extra tagging feature. The distinction is visible in the training procedure. MSR contributes labeled examples during learning, and the common branch carries features to the recognition decoder. The decoder itself uses the input character representations and their learned features when it tags an evaluation sentence. The result therefore compares different ways of using segmentation information, with the component comparisons needed to estimate how much of the advantage comes from the paper’s particular additions.

### What the ablations show

#### Transfer before the adversarial objective

The architectural comparison starts with a BiLSTM and CRF trained only on recognition data. That baseline reaches 89.13% F1 on the SighanNER test split and 51.01% named-entity F1 on the original WeiboNER test split. These are the paper’s internal baselines, so they serve a different purpose from the earlier published scores. They give the authors a sequence tagger to which they can add particular parts of the proposal.

The transfer variant brings segmentation into joint training while leaving out both the discriminator objective and self-attention. It reaches 89.89% F1 on SighanNER and 52.09% named-entity F1 on original WeiboNER. On the latter, precision rises from 58.99% to 60.00%, and recall rises from 44.93% to 46.03%. On SighanNER the transfer variant also improves both measures relative to the recognition-only baseline, recording 90.60% precision and 89.19% recall.

This comparison establishes that transfer can be helpful before there is any explicit pressure against retaining source-task information. The result is for the package introduced by the transfer variant. It adds auxiliary examples, a segmentation objective, and the route through which the tasks share what they learn. The measurements show that this package helps recognition on the tested data. They leave open which boundary patterns the common encoder acquires and how often those patterns change an entity decision.

#### What changes when the task classifier is added

The next variant retains transfer and adds adversarial training while leaving out attention. It reaches 90.04% F1 on SighanNER and 52.45% named-entity F1 on original WeiboNER. These scores exceed the corresponding transfer-only results. The precision and recall changes are different across the benchmarks. On SighanNER the adversarial variant has 90.52% precision and 89.56% recall. Compared with transfer alone, recall improves while precision falls slightly. On original WeiboNER it reaches 61.94% precision and 45.48% recall, so precision improves and recall falls relative to transfer alone.

The authors interpret the F1 gains as evidence that the adversarial signal helps prevent segmentation-specific features from interfering with recognition. The comparison does support the narrower claim that the objective is beneficial when introduced into this joint setup. It does not directly observe what information disappears from the shared states, and the original WeiboNER gain in this particular comparison is associated with precision. The high recall of the final system is a result of the complete configuration.

#### Attention with and without transferred supervision

Adding only self-attention to the recognition baseline reaches 89.71% F1 on SighanNER and 52.25% named-entity F1 on original WeiboNER. This comparison isolates the addition of the attention operation in a recognizer trained without the auxiliary task. On SighanNER the attention-only configuration reports 90.62% precision and 88.81% recall, improving both over the baseline. On original WeiboNER it reaches 57.81% precision and 47.67% recall, improving recall while reducing precision.

The complete configuration is also an informative comparison with the adversarial variant. It adds attention to the joint arrangement that already has the discriminator. On original WeiboNER it reaches 50.68% recall, the highest recall among the variants, alongside 55.72% precision, the lowest precision among them. The SighanNER result is stronger on both columns. It reaches 91.73% precision and 89.58% recall, both the highest in that benchmark’s component comparison.

Architecture variants by named-entity F1 on original WeiboNER Transfer and attention each beat the recognition-only baseline, and the complete system scores highest.

**The numbers**

| System or setting | F1 % |
| --- | --- |
| Recognition-only BiLSTM and CRF | 51.01 |
| Transfer without adversarial training or attention | 52.09 |
| Adversarial transfer without attention | 52.45 |
| Attention without transfer | 52.25 |
| Adversarial transfer with self-attention (this paper) | 53.08 |

The variants establish that attention helps in the recognition-only setting and that adding it to adversarial transfer also helps. A useful missing comparison is joint training with attention and without the adversarial term. Without that configuration, the paper can measure the addition of adversarial training to transfer in the absence of attention, but it cannot make the same isolated comparison with attention held in place. The F1 ranking shows which of the tested combinations works best and leaves that interaction unmeasured.

#### What the examples illustrate

The case analysis describes a WeiboNER test sentence where person entities appear next to one another. The break between the mentions is the important decision. A tagger that treats the characters as one run returns the wrong span even if it has evidence for the person category. The authors show the proposed system labeling the mentions correctly and attribute the boundary decision to the information supplied by learning segmentation. The case illustrates the intended use of word-boundary evidence at a place where category information alone is insufficient.

A second case concerns an expression translated as “the boss.” The authors associate its successful person classification with attention to a word translated as “respect.” This example is about interpreting a candidate mention in context. Through attention the position being labeled has a way to draw directly on the representation of the contextual word. The case shows what that connection can look like in a particular prediction. It provides no estimate of how many improved tags across the test set depend on comparable connections.

Read together, the cases align with the separate motivations for the two parts of the method. One focuses on the extent of adjacent spans, and the other on the category assigned in context. The ablations are the evidence for changes in aggregate behavior. The cases explain the kinds of decisions the authors had in mind when designing the transfer and attention components.

### Limitations

#### Limits identified by the authors

The authors point out that performance on WeiboNER remains relatively low, even where their system improves on previous comparisons. They propose two explanations. The recognition training corpus is small, and the expressions in social media text are frequently informal. The disparity in training data is visible in the reported split sizes. WeiboNER has 1350 training sentences in the split used for comparison, while SighanNER has 41,728 training sentences after the development split is set aside.

These explanations are plausible accounts of the difficulty in the authors’ setup. The experiments do not vary training size systematically while holding the kind of text and annotation fixed. They also do not control the amount of informal language while holding training size fixed. The differences between the corpora provide reasons to care about transfer in the smaller benchmark. They do not measure the contribution of each proposed difficulty to the gap in recognition scores.

The authors also describe error propagation as a weakness of using segmentation predictions as features. Their own test-time procedure removes that particular dependency by learning from segmentation during training. What the comparison establishes is an improvement in the final recognition scores for the reported systems. The paper does not enumerate the errors passed from the earlier segmenter to its tagger, so the benchmark difference cannot all be assigned to avoided segmentation errors.

#### Limits of the evidence

The shared representation is designed to make task identity hard to recover from the pooled vector. The reported experiments do not quantify the discriminator’s success after training. They also do not use a separate classifier to test how much source information remains, or measure directly how well a boundary feature carries across the tasks. Because pooling collapses the position axis, the discriminator tests the kinds of distinctions available to it in that summary. Task-specific information could still be accessible in the sequence of character states or through a different classifier. The improvement in recognition F1 is evidence about recognition under the objective, while the degree of task invariance remains unmeasured.

The corpus pairing limits claims about domains for a related reason. Recognition and segmentation labels come from different datasets, and source identity doubles as task identity for the classifier. News versus social media may affect that identity, as may other properties of the corpora. The gains on original WeiboNER make the pairing a successful example in the tested setup. They do not isolate domain adaptation from transfer of segmentation supervision. The paper does not compare the same labeling tasks with matched and mismatched domain pairs to measure those effects separately.

The updated WeiboNER evaluation qualifies the general claim of outperforming earlier work. The full system leads the comparisons on original WeiboNER named entities and on SighanNER, but 58.70% overall F1 on updated WeiboNER is below the strongest reported comparator’s 58.99%. The proposed system also finishes below the best results in the updated named-entity and nominal-mention F1 columns. The updated table shows that the outcome depends on the annotation version and on which class of mentions is counted.

The article’s reported comparisons are point estimates. The authors describe some of the gains as significant, but the experimental account supplies neither a significance test nor variability across repeated runs. This matters especially when interpreting nearby F1 values in the ablation table. The ordered scores describe the results reported for those settings. They give no estimate of how reliably the same ordering would recur with different initializations or batches.

Finally, the attention analysis illustrates a direct connection in a selected example. The evaluation does not break down results by the distance between a mention and its supporting words, and it does not remove a highlighted contextual word to measure the effect on the prediction. The attention-only ablation gives evidence that adding the mechanism helps sequence labeling on the tested datasets. The specific explanation that it helps by recovering long-distance evidence is supported by the architecture and illustrated by the case, while its prevalence across errors remains unknown.

### What came after

No later citing work is documented for this paper here. Whether later studies reused the shared and private encoders, tested the adversarial objective under different corpus pairings, or independently evaluated its contribution to Chinese entity recognition remains outside the documented record.

## Cite

Cite as Pengfei Cao, Yubo Chen, Kang Liu, Jun Zhao and Shengping Liu. 2018. Adversarial Transfer Learning for Chinese Named Entity Recognition with Self-Attention Mechanism. Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/d18-1017](https://doi.org/10.18653/v1/d18-1017)

```bibtex
@inproceedings{cao2018adversarial,
  title = {{Adversarial Transfer Learning for Chinese Named Entity Recognition with Self-Attention Mechanism}},
  author = {Pengfei Cao, Yubo Chen, Kang Liu, Jun Zhao and Shengping Liu},
  booktitle = {Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing},
  year = {2018},
  doi = {10.18653/v1/d18-1017},
  url = {https://doi.org/10.18653/v1/d18-1017}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
