---
title: "Knowledge as A Bridge — paper by Deng et al. (2018)"
description: "The Knowledge-aware Attentive Network uses Freebase entity information to help rank answers when moving from one question-answering…"
canonical: "https://research.elamur.ai/free/en/papers/deng-2018-knowledge-as-bridge-improving-cross/"
---
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/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/deng-2018-knowledge-as-bridge-improving-cross/)

[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/) / Knowledge as A Bridge: Improving Cross-domain Answer Selection with External Knowledge

# Knowledge as A Bridge: Improving Cross-domain Answer Selection with External Knowledge

Paper · 2018 · Yang Deng, Ying Shen, Min Yang et al.

**Authors:** [Yang Deng](https://md.research.elamur.ai/free/en/authors/yang-deng/), [Ying Shen](https://md.research.elamur.ai/free/en/authors/ying-shen/), [Min Yang](https://md.research.elamur.ai/free/en/authors/min-yang/), [Yaliang Li](https://md.research.elamur.ai/free/en/authors/yaliang-li/), [Nan Du](https://md.research.elamur.ai/free/en/authors/nan-du/), [Wei Fan](https://md.research.elamur.ai/free/en/authors/wei-fan/) and Kai Lei · **Year:** 2018 · **Venue:** Proceedings of the 27th International Conference on Computational Linguistics · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Cited by **9** papers in our library of more than 163,000 papers whose bibliographies we read · Proceedings of the 27th International Conference on Computational Linguistics · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/C18-1279/)
- [PDF](https://aclanthology.org/C18-1279.pdf)

## Summary

A system that can rank answers to questions about Wikipedia articles may struggle when asked to rank answers to questions about insurance. The vocabulary changes, the questions ask for different kinds of information, and good answers can take a different form. Collecting enough labeled examples for every new setting is expensive. Deng and colleagues study whether a system can learn from a large collection of labeled questions and answers, then adapt to another collection with the help of background information available to both. The task is answer selection, the part of [question answering](https://md.research.elamur.ai/free/en/topics/question-answering/) in which the answers are already supplied as candidates and the system decides which ones to put first.

Their Knowledge-aware Attentive Network, or KAN, represents each question and candidate answer in complementary ways. A text encoder learns from the wording of the pair. A separate component looks for names and phrases that could refer to entries in Freebase, a [knowledge graph](https://md.research.elamur.ai/free/en/concepts/knowledge-graph/) that records entities and their relationships. When a name is ambiguous, the component uses the surrounding sentence to give more weight to plausible entries. It summarizes this entity information and combines it with the text representation to score the pair. The authors train the system first on SQuAD-T, a collection of factoid questions with candidate sentences drawn from Wikipedia paragraphs, and then adapt it separately to Yahoo QA, TREC QA, and InsuranceQA.

With the same underlying text encoder, adapted KAN reaches a Yahoo QA Precision@1 of 74.4 and a TREC QA mean average precision of 79.7 in the reported target evaluations. On InsuranceQA, it reaches a top-answer accuracy of 75.6 on TEST1. The corresponding scores for the text-only system after adaptation are 72.4, 76.9, and 73.3. Which part benefited most from further training depended on the dataset. On Yahoo QA and TREC QA, the best results came from retaining the knowledge component learned on SQuAD-T while adapting the text encoder. On InsuranceQA, adapting the knowledge component gave the highest score on each test split, although the two splits favored different settings.

The comparisons also show why target examples matter. Adding the knowledge component improved many matched comparisons, but it lowered InsuranceQA scores when the system trained on SQuAD-T was applied directly. With some labeled insurance data, adaptation recovered much of the lost performance. The paper therefore finds value in both the source training and the shared entity information, under a procedure that gives the system a chance to learn what counts as a good answer in the new setting.

## Deep dive: Knowledge as A Bridge: Improving Cross-domain Answer Selection with External Knowledge

The Knowledge-aware Attentive Network uses Freebase entity information to help rank answers when moving from one question-answering dataset to another. · about 36 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

#### What makes an answer worth ranking first

Answer selection starts after candidate answers have been supplied. For each question, the system receives a set of alternatives and scores them so that relevant answers rise to the top. An answer can contain many of the words in a question and still fail to provide the requested information. Conversely, an answer that uses different words can supply exactly the fact the question asks for. The paper treats this distinction as central to the scoring problem. It matters in both factoid settings, where a question seeks a specific piece of information, and community settings, where an answer can address a broader practical concern.

The paper illustrates the distinction with a question about the actor who played Dumbledore in the Harry Potter films. One candidate describes Dumbledore as a character in the series. It repeats the names a reader would recognize from the question, but it gives no actor. Another names Michael Gambon and says that he portrayed the character in the remaining films after Harris died. That candidate supplies an actor even though it refers to the films in a less direct way. The authors point to relations in the knowledge base linking Gambon to Dumbledore and to the films. Such links make it possible to represent what connects the people and works mentioned across the pair, beyond the words the two texts have in common.

The example motivates the use of background information. It also exposes a separate problem. A sentence may say more about an entity than a scorer needs, and a matching name can refer to several different entities. A knowledge base is helpful only if the scorer can learn which entries matter for the sentence it is reading. In the example, facts about a fictional character and facts about a performer can both be relevant, but their relevance depends on what the question asks and what each candidate actually says. This is why the paper adds a way to interpret entity mentions in context before using their representations in a ranking decision.

#### Why changing datasets changes the task

A target dataset can differ from a source dataset in what its questions ask, where candidates come from, and how a correct answer tends to be expressed. A ranker trained on questions with short factual answers may have learned to favor sentences of a certain kind. That preference could be useful when the new collection also asks for facts. It may be less useful when the new collection contains questions from people seeking advice or an explanation. The paper gives the contrast between SQuAD-T and InsuranceQA particular prominence. SQuAD-T starts from questions about Wikipedia passages. InsuranceQA is restricted to insurance and includes non-factoid questions.

The obstacle is partly the cost of supervision. A ranking system learns from examples in which candidates have been labeled for relevance. A new domain can have too few such examples to train a reliable system from the beginning. An existing labeled collection is attractive because it can teach the system how to compare questions and candidate answers before target data are introduced. The difficulty is that patterns learned from the source can reflect how its examples were constructed. A ranking rule that works well within that collection can lose its value when the candidates and questions change together.

The authors use *transfer learning* for the approach of training with a source collection and carrying what was learned into a target collection. Their proposal is that a common knowledge base can give this transfer a more stable starting point. When text in both places refers to a known entity, the same knowledge representation is available even if the surrounding sentences differ. This is a reason to try sharing an entity-based component across domains. It remains an empirical question how much of what this component learns on source examples will be useful in a particular target.

There are two different kinds of sharing in that proposal. Freebase itself gives both datasets access to the same entity inventory and pretrained entity vectors. Source supervision can also teach the ranker how to use those vectors, for example by giving some contextually plausible candidates more weight. The first is a common input resource. The second consists of parameter values learned from labeled examples. KAN makes the distinction experimentally useful by allowing the authors to adapt either the text encoder or the learned knowledge component while leaving the other at its source values.

#### The approaches the paper builds on

The paper describes earlier neural answer selection as a process of turning texts into vectors and measuring how well the resulting representations match. Convolutional approaches learn patterns within local spans. Recurrent approaches such as long short-term memory networks build representations from sequences of words. A scoring layer then uses the question and answer representations to estimate relevance. The paper also discusses earlier methods that let question and answer influence one another while the representations are being constructed. An answer encoder, for instance, can give more attention to the parts of a candidate that are relevant to the question. These interactions improve the use of information inside the pair and give the authors several plausible text encoders on which to build.

The paper situates its training procedure alongside work that learns representations that can be shared across datasets. It points to supervised approaches that train first on a large labeled collection, including work on question answering by Min and colleagues and by Wiese and colleagues. It also discusses studies by Yuan and colleagues and by Yu and colleagues that considered transfer with little labeled target data or with unlabeled data. Deng and colleagues work in the supervised setting. They start with labeled source examples and give the system labeled target examples during adaptation. Their architectural question is what role external entity information can play in that process. The paper cites a broader study of when neural representations transfer across language tasks. [How Transferable are Neural Networks in NLP Applications?](https://md.research.elamur.ai/free/en/papers/mou-2016-how-transferable-are-neural-networks/)

Knowledge-base information already had uses in neighboring tasks. The authors cite work that enriches representations for machine reading, assigns more specific types to entities, and extracts relationships between entities. They also point to event detection as an application that makes use of information beyond ordinary sentence representations. For their own task, they bring entity information into the representation of both members of a question–answer pair. This puts the information where it can affect the final relevance score and where its use can be learned first on one dataset, then carried into another. [Exploiting Argument Information to Improve Event Detection via Supervised Attention Mechanisms](https://md.research.elamur.ai/free/en/papers/liu-2017-exploiting-argument-information-improve-event/)

### The method, step by step

#### From candidate sentences to a ranking

KAN scores a question together with one candidate answer at a time. Think of one pair moving through the system. The question and answer first receive text representations. In parallel, each sentence is checked for phrases that could name entities in Freebase. The text representation helps the entity component decide how much weight to give the possible meanings of each matched phrase. The component then combines evidence across nearby positions and summarizes it for the sentence. Finally, the scorer sees the text and entity representations for both sentences, along with features describing how the pair matches. Repeating this process gives the scores used to order the candidates.

During source training, examples with relevant and irrelevant candidate answers teach the scorer how to use these inputs. The learned weights can then initialize a run on labeled target examples. KAN's text and knowledge components offer different places to make updates. A change to the text encoder can help it represent the wording or answer style of the target dataset. A change to the knowledge component can alter how it uses sentence context to weigh entity candidates and how it assembles those candidates into a sentence representation. The same pretrained word and entity vectors are available throughout.

How KAN scores question and answer pairs The steps in order.

#### The text encoder

The input words are mapped to pretrained [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/), vectors that serve as the numerical input to the encoder. The question and answer each emerge with a sentence-level vector. The paper denotes these vectors by Q with a word-based subscript for the question and A with the same subscript for the answer. It uses H with that subscript when it means the contextual vector for whichever sentence the entity component is currently processing. Even though the system ultimately represents each sentence as a vector, the choice of encoder determines whether information from the other member of the pair can influence that vector.

The main experiments use AP-LSTM. Its attentive pooling lets information from both members of the pair influence their representations. The other encoders let the authors change how the same knowledge component receives textual context. Bi-LSTM reads sequences in both directions. Att-LSTM uses the question to direct attention over the answer. Conv-RNN combines convolution with recurrence and introduces attention at the input to the recurrent component. In the version used here, the recurrent component is a bidirectional LSTM. These variations belong to the text side of KAN. The entity side uses the representation each encoder supplies, so an experiment can change the text encoder while retaining the rest of the design.

The contextual vector does two jobs. It gives the final scorer a representation of the wording, and it helps interpret an ambiguous name before the entity component summarizes it. For Att-LSTM and AP-LSTM, pairwise interaction can thus influence the entity representation indirectly through the text vector. The entity equations still act on the candidate entities for the sentence being processed. There is no separate step that enumerates possible entity-to-entity relations between every word in the question and every word in the answer.

#### Finding entities and weighing their possible meanings

The system matches [n-grams](https://md.research.elamur.ai/free/en/concepts/n-gram/), or consecutive spans of words, to entity mentions. The use of spans allows a phrase to suggest a candidate entity as well as a single word. Each matched mention brings back a shortlist of possible Freebase entries. The authors use Santiago to illustrate the ambiguity this creates. It can name a city or a person, so a surface match alone does not determine which vector should represent it. For each position with entity candidates, KAN uses the difference between the sentence context and the candidate entries to learn how much weight to give each entry.

The candidate vectors come from TransE, the knowledge embedding method the authors cite. In KAN, the external facts are available through these entity embeddings. The answer selection equations operate on the vectors rather than assembling a proof from a series of Freebase facts. This distinction matters for reading the Dumbledore example. The example explains why relationships encoded in a knowledge base could help to rank that pair. The implemented scorer receives numerical entity representations and learns what to do with them using labeled examples. [Translating Embeddings for Modeling Multi-relational Data](https://md.research.elamur.ai/free/en/papers/bordes-2013-translating-embeddings-modeling-multi-relational/)

```
e⁽ᵗ⁾ = {eₜ₁, eₜ₂, …, eₜₖ, …, eₜK} ∈ ℝ^(K×dₑ)
```

Here `t` is a word position in the sentence. The collection `e⁽ᵗ⁾` contains the candidate entity vectors associated with that position, and `eₜₖ` is the vector for candidate `k`. `K` is the size of the candidate list and `dₑ` is the dimension of an entity embedding. The real-valued array notation `ℝ^(K×dₑ)` describes the candidate vectors when stacked together, and `∈` means that the array has that type. The braces collect candidates and the ellipses stand for the intervening entries. The paper defines the shortlist using `K` without specifying its experimental value.

KAN first prepares a contextual vector for each candidate. The paper presents this operation for the entire candidate collection at position `t`. Written candidate by candidate, the same operation makes it easier to see where the sentence comes in.

```
mₜᵢ = tanh(Wₑₘ eₜᵢ + Wₕₘ Hᵥ)
```

`mₜᵢ` is the intermediate vector for candidate `i` at position `t`. `eₜᵢ` is that candidate's pretrained entity vector. `Hᵥ` denotes the text representation of the current sentence, written with a `w` subscript in the paper. `Wₑₘ` and `Wₕₘ` are learned transformations of the entity and text vectors, respectively. Their outputs have compatible dimensions and are added. The function `tanh` applies the hyperbolic tangent to each component. The entity input changes from one candidate to the next, while the text input is shared across candidates for that sentence. Because the sum goes through the nonlinearity before scoring, the effect of the shared context can depend on the candidate it is combined with.

The intermediate vectors determine an attention distribution. Attention here is a learned weighting of alternative entities for a mention. It gives the ranker a way to use the available candidates without treating the name match as a definitive identification.

```
αₜᵢ = exp(wₘᵀ mₜᵢ) / ∑ⱼ exp(wₘᵀ mₜⱼ)
```

`αₜᵢ` is the weight on candidate `i` at position `t`. The learned scoring vector is `wₘ`, and `ᵀ` transposes it for the inner product with an intermediate vector. `mₜᵢ` is the vector being scored and `mₜⱼ` denotes the vector for a candidate indexed by `j`. `exp` exponentiates each score. The sum `∑ⱼ` runs over the candidates at position `t`, so the denominator normalizes their weights together. A candidate with a larger score receives a larger share of the weight at that position. The normalization is local to the shortlist. It does not allocate attention across the entire sentence.

```
ẽₜ = ∑ᵢ αₜᵢ eₜᵢ
```

`ẽₜ` is the final entity vector for position `t`. The sum runs over the candidates `i` in `e⁽ᵗ⁾`. Each term is the original entity embedding `eₜᵢ` multiplied by its contextual weight `αₜᵢ`. The intermediate vectors determine the weights, but the values being mixed are the entity embeddings themselves. Consequently, the output occupies the same embedding space as the candidates. A dominant weight makes the output closer to the associated candidate vector, while several substantial weights preserve contributions from several candidates. This is what the paper means by *soft entity linking*.

The ranking labels provide the supervision for this mechanism. There is no separate entity-disambiguation objective in the training equations. A useful weighting is one that helps the whole ranker distinguish a relevant answer from an irrelevant one. That gives the attention component a reason to respond to context, while leaving its weights different in meaning from independently validated probabilities that a given mention refers to a particular person or place.

#### From entity positions to a sentence representation

The entity vectors form a sequence in sentence order. A convolution slides a learned filter along that sequence. Each application of the filter sees a neighborhood of positions, which can be useful when a mention spans a phrase or nearby words provide related entity cues. The same filter is applied at successive positions, so it can register a pattern wherever it occurs in the sentence. The authors use filters of different widths to give the component access to different local spans.

The paper describes a local window centered around the current position. The role of the window can be stated independently of how the boundaries are handled. For a filter that sees `n` positions, let the offsets below specify the positions it reads in order.

```
xᵢ = [ẽᵢ₊δ₁, …, ẽᵢ₊δₙ]
```

`xᵢ` is the vector given to the convolution at sentence position `i`. `n` is the filter width, `δ₁` through `δₙ` are the offsets of the window positions relative to `i`, and `ẽ` with a position subscript is the context-weighted entity vector at that position. The brackets concatenate the vectors in order, and the ellipsis stands for the intervening positions. This expresses the paper's window operation without assuming a padding convention or a rule for centering an even-width filter.

```
hᵢ = tanh(W xᵢ + b)
```

`hᵢ` is the response vector at position `i`. `W` is the learned convolution kernel for the filter and `b` is its learned bias. The kernel transforms the window vector `xᵢ`, and `tanh` applies the nonlinearity to the result after adding the bias. Here `W` belongs to the convolution. The paper reuses the letter for a different matrix when it describes the final similarity score.

The convolution produces a response at each processed window position. Max pooling turns those responses into a sentence-level vector by retaining the strongest response for each feature separately.

```
yⱼ = maxᵢ hᵢⱼ
```

`yⱼ` is component `j` of the pooled output `y`. `hᵢⱼ` is component `j` of the convolution response `hᵢ`, and `maxᵢ` takes the largest such value across the evaluated positions `i`. Different components can therefore preserve evidence from different parts of the sentence. The pooled vector preserves the strengths of the strongest local responses. Its components do not carry the locations of those responses forward.

Pooling is performed on outcomes from several filters. The paper gives the question's and answer's knowledge representations as concatenations of their respective pooled vectors.

```
Qₑ = [yq⁽¹⁾, yq⁽²⁾, …, yq⁽ⁿ⁾]
```

`Qₑ` is the question's knowledge representation. The `q` attached to each `y` indicates that the pooled output was computed on the question. A superscript indexes the filter output, and `n` here counts the outputs being joined, taking a different role from `n` in the description of a single window. The brackets concatenate them and the ellipsis stands for any intervening filter outputs.

```
Aₑ = [ya⁽¹⁾, ya⁽²⁾, …, ya⁽ⁿ⁾]
```

`Aₑ` is the answer's knowledge representation. The `a` attached to each `y` indicates that the pooling was performed on the candidate answer. The superscripts again index the filter outputs, `n` is their count, and the vector is their concatenation in filter order. The paper also describes a fully connected stage after pooling. The displayed expressions identify `Qₑ` and `Aₑ` by the pooled features they join, leaving the dimensions and exact placement of that stage less clear than the account of attention and pooling.

#### Combining the evidence for a score

The scorer receives both the text vector and the entity vector for each sentence. Concatenation places their components side by side. It allows the subsequent scoring layers to learn which information to use when the text already supplies a strong signal and when the entity component adds something useful.

```
r_q = [Q_w : Qₑ]
```

`r_q` is the final representation of the question `q`. `Q_w` is the question vector from the text encoder and `Qₑ` is the question vector from the knowledge component. The colon inside the brackets denotes concatenation.

```
r_a = [A_w : Aₑ]
```

`r_a` is the final representation of the candidate answer `a`. `A_w` is its text vector and `Aₑ` is its knowledge vector. As with the question representation, the brackets and colon denote concatenation.

The scorer also uses a learned comparison between the final question and answer vectors. A bilinear comparison can learn which components of the question and answer representations should contribute together to a match. This gives it a richer interaction than a score that compares only corresponding components.

```
s(r_q, r_a) = r_qᵀ W r_a
```

`s` is the scalar similarity function, and `r_q` and `r_a` are the final vectors for the question and candidate. `ᵀ` turns the question vector into a row for multiplication, and `W` is the learned similarity matrix. The matrix relates components of one representation to components of the other. The result is a single value for the pair, which enters the final decision alongside the underlying representations.

```
x = [r_q, s(r_q, r_a), r_a, x_extra]
```

`x` is the combined feature vector for the question–answer pair. Its entries are the question representation `r_q`, the similarity value `s(r_q, r_a)`, the answer representation `r_a`, and `x_extra`, the additional word-overlap feature vector. The paper gives `x_extra` a dimension of 4 and adopts those features from earlier ranking work. The brackets join the ingredients into one input. Word overlap thus remains available even when the contextual and entity representations give the scorer other ways to assess a match.

```
y(q, a) = softmax(Wₛ x + bₛ)
```

`y(q, a)` is the output for question `q` and candidate `a`. In this equation `y` refers to classification output, a different use of the letter from the pooled convolution vector. `x` is the pair feature vector, and `Wₛ` and `bₛ` are the learned classification weights and bias. According to the paper, the final classification is preceded by a hidden layer with full connectivity. The displayed equation expresses the affine scoring and normalization of the pair features. `softmax` turns the resulting class scores into probabilities for the binary relevance decision. The relevant-class probability is the score available for ranking candidates. Its normalization is over the classes for this pair, so scores for different candidates are compared after each pair has been evaluated.

#### What gets trained and what gets carried across

The authors train the relevance scorer with cross-entropy, which penalizes low predicted probability on the observed label. Each example in this objective is a labeled question–answer pair. A positive example encourages the ranker to give the relevant class a high probability. A negative example encourages the opposite. Although the evaluation looks at candidate order, the training equation works on the relevance labels of individual pairs.

```
ℒ = −∑ᵢ₌₁ᴺ [yᵢ log pᵢ + (1 − yᵢ) log(1 − pᵢ)] + λ‖θ‖₂²
```

`ℒ` is the training objective. The sum runs over labeled pairs indexed by `i`, from `1` through `N`, where `N` is the number of examples in the sum. `yᵢ` is the binary relevance label for pair `i`, and `pᵢ` is the output probability of the positive class for that pair. `log` takes the logarithm. When `yᵢ` is `1`, the first term measures the probability assigned to the observed positive label. When it is `0`, the term involving `1 − pᵢ` measures the probability assigned to the observed negative label. The minus sign makes lower probability on the observed class more costly. `θ` denotes the ranker's parameters, `‖θ‖₂²` is their squared Euclidean norm, and `λ` controls the strength of the penalty on large weights.

The source training uses SQuAD-T to initialize these parameters. For a target run, the authors load the learned values and continue training with the target's labeled pairs. This continuation is [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/). In the full fine-tuning condition, parameters that are ordinarily trainable remain available for updates. In the selective conditions, one of the two representation components is fixed at its source-trained values. The other can learn from target examples. The results call the setting that fixes the base text encoder `Fine-Tune (1)` and the one that fixes the knowledge component `Fine-Tune (2)`. The results describe `Fine-Tune (1)` as allowing updates outside the fixed text encoder. The clearest distinction between the two selective settings is which representation component is held fixed.

The pretrained word embeddings and pretrained entity embeddings stay fixed during both stages. This matters when interpreting what it means to adapt the knowledge component. The system can change how it weights the existing entity vectors and which combinations of those vectors it finds useful. It leaves the vectors supplied by the knowledge embedding procedure in place. Likewise, freezing the knowledge component preserves its learned attention and convolution parameters, but its output can still respond to a changed text vector. The word-based sentence representation appears directly in the attention equation. A change in that input can change candidate weights even though the learned attention transformations themselves are fixed.

### Experiments and results

#### What the rankers trained on

SQuAD-T supplies the source supervision. It is adapted from [SQuAD](https://md.research.elamur.ai/free/en/papers/rajpurkar-2016-squad-100-000-questions-machine/), in which questions are written for Wikipedia paragraphs and the answer is a span of text. SQuAD-T splits those paragraphs into sentences. The resulting task is to determine whether a candidate sentence contains the answer. A label therefore concerns the entire sentence even though the original answer may occupy only a small portion of it. The dataset statistics give 87.1K training questions and 708K training pairs, with 10.5K development questions and 53.6K development pairs. The paper reports source training for transfer and lists no SQuAD-T test split in its dataset table.

TREC QA is the target that most closely resembles the factoid side of the source task. Its questions are generally short and seek particular facts, and the system ranks the available candidate answers for each question. The reported counts are 1229 questions and 53,417 pairs for training, 82 questions and 1148 pairs for development, and 100 questions and 1517 pairs for testing. The use of candidate answers from a separate collection gives the authors a test of transfer even though the source and target both emphasize factual questions. The paper traces the benchmark to work on TREC question answering. [What is the Jeopardy Model?](https://md.research.elamur.ai/free/en/papers/wang-2007-what-is-jeopardy-model-quasi/)

Yahoo QA is an open-domain community collection. The paper uses the cleaned setting from Tay and colleagues, with questions and answers restricted to a length range of 5 - 50 tokens. For each question, 4 negative examples are sampled from the top 1000 hits. The candidate construction consequently asks the system to separate its labeled answer from alternatives obtained through a search process. The paper describes almost all the Yahoo questions in this setting as non-factoid. It lists 50.1K questions for training and 6.2K each for development and testing. The corresponding pair counts are 253K for training and 31.7K for each of the development and test splits.

InsuranceQA is a community question collection restricted to insurance. The development and test evaluations each give the system a pool of 500 candidates per question. That pool includes a correct answer and alternatives randomly drawn from the collection of distinct answers. The training split has 12,887 questions and 37.1K question–answer pairs. The development split has 1000 questions and 500K pairs. The paper records the test totals in the form 1800x2 questions and 900Kx2 pairs, reflecting the separate TEST1 and TEST2 evaluations. This is a different ranking problem from Yahoo QA in candidate construction as well as subject matter. The chance to retrieve a correct answer from a large pool is fixed by the benchmark, but the relevance scorer still determines where that answer lands.

These datasets give the transfer procedure several ways to encounter a change. TREC QA retains a focus on facts. Yahoo QA retains open-domain coverage while changing the usual type of question. InsuranceQA changes both the topic and the usual type of question, and gives candidates under its own pool construction. Thus the experiment compares transfers to distinct kinds of target. It does not isolate a single variable, such as topic, by holding all other data properties constant.

#### How the rankings were measured

For TREC QA, the authors report mean average precision, or MAP, and mean reciprocal rank, or MRR. Average precision rewards placing relevant answers early and accounts for the locations of all relevant answers in the candidate order. MAP averages this measure over questions. Reciprocal rank uses only the position of the first relevant answer, taking the inverse of that position before the mean is taken. A change lower in a ranking can improve MAP while leaving MRR unchanged. This distinction is useful when comparing a system that helps surface the first good answer with one that rearranges several relevant answers.

Yahoo QA also uses MRR, alongside Precision@1. Precision@1 credits a question when the first candidate is relevant. MRR additionally distinguishes degrees of near success when a relevant candidate appears below the first position. InsuranceQA reports top-1 accuracy, the proportion of questions for which the first candidate is a correct answer. The authors give it separately for DEV, TEST1, and TEST2. These scores depend on the candidate pools supplied for each dataset. A higher raw number on one benchmark than another does not by itself indicate that a transfer was more successful, because the rankings answer different evaluation questions.

#### Settings and comparison groups

The text input uses pretrained [GloVe](https://md.research.elamur.ai/free/en/concepts/glove/) vectors with 300 dimensions. For the knowledge input, the authors use FB5M, a Freebase subset containing 4,904,397 entities, 7,523 relations, and 22,441,880 facts. The knowledge-side convolution uses widths of 2 and 3. The text reports 200 for the number of convolutional feature maps and 200 for the attention size. The final hidden layer has size 200. The authors initialize the remaining parameters randomly in the interval [-0.1, 0.1], use an L2 regularization strength of 0.0001, and set the learning and dropout rates to 0.0005 and 0.5, respectively. The maximum sentence length is 40, and training uses batches of 64. The paper generally follows the settings of the original text encoders while specifying its change to the recurrent component of Conv-RNN.

For the main comparison, the authors use AP-LSTM both on its own and as the text encoder in KAN. Each architecture can train only on the target set, train only on SQuAD-T, or train on a mixture of source and target examples. Each can also learn from the source first and then adapt all of its trainable components on the target. KAN adds the selective update conditions because its knowledge and text representation components can be held fixed separately. These comparisons ask whether source and target examples are most useful when pooled or when used in sequence, and whether the effect depends on access to entity information.

The authors also report strong results from prior publications on each target dataset. These rows give a benchmark comparison with existing approaches. The paper presents them as ranked results, and the order need not be the same across every metric and split. The AP-LSTM experiments give the more direct comparison for what changes when the entity component is added. In those rows the underlying text encoder and training regime can be matched, while the published comparison rows provide context about the level of performance already reported for the task.

#### Yahoo QA and TREC QA

On the Yahoo QA target evaluation, training only on target labels gives AP-LSTM a Precision@1 of 60.8 and an MRR of 76.1. With the entity component and the same target-only procedure, KAN reaches 67.2 and 80.3. AP-LSTM itself benefits from sequential training, reaching 72.4 Precision@1 and 81.9 MRR after source training and full target adaptation. Under full adaptation KAN reaches 74.2 and 83.4. The selective setting that freezes the knowledge component gives the best Yahoo QA results in the paper, with 74.4 Precision@1 and 84.0 MRR. The result shows improvement from source training even for the plain encoder and a further improvement with the knowledge-aware architecture.

Training settings on the Yahoo QA target evaluation by Precision@1 The highest score comes from adapting KAN's text encoder while keeping its source-trained knowledge component fixed.

**The numbers**

| System or setting | Precision@1 |
| --- | --- |
| AP-LSTM target only | 60.8 |
| KAN target only | 67.2 |
| AP-LSTM full fine-tuning | 72.4 |
| KAN full fine-tuning | 74.2 |
| KAN with knowledge component fixed (this paper) | 74.4 |

The Yahoo QA comparison gives 60.1 Precision@1 and 75.5 MRR in its first-ranked prior-results row. KAN's target-only run already exceeds those entries. Its adapted run gives a further gain, so the gap to earlier published scores combines improvements associated with the architecture and with the training procedure. The very low scores from applying SQuAD-T training directly are also part of this picture. The source data provide a valuable initialization for Yahoo QA even though the unadapted ranking is poor.

On the TREC QA target evaluation, AP-LSTM gives 75.9 MAP and 81.0 MRR with target-only training. Full source-to-target training takes it to 76.9 MAP and 82.4 MRR. Target-only KAN reaches 78.1 MAP and 83.1 MRR, while fully fine-tuned KAN reaches 78.8 MAP and 84.1 MRR. Keeping the knowledge component fixed gives the best pair of reported scores, 79.7 MAP and 85.0 MRR. The prior comparison rows include 78.0 MAP and 83.8 MRR. Those entries occur in different rows, which matters if a reader wants to compare individual prior systems on both metrics.

Training settings on the TREC QA target evaluation by mean average precision The strongest ordering of relevant answers comes from KAN with its knowledge component held fixed during adaptation.

**The numbers**

| System or setting | MAP |
| --- | --- |
| AP-LSTM target only | 75.9 |
| AP-LSTM full fine-tuning | 76.9 |
| KAN target only | 78.1 |
| KAN full fine-tuning | 78.8 |
| KAN with knowledge component fixed (this paper) | 79.7 |

TREC QA gives a different picture of direct transfer from Yahoo QA. Source-only KAN obtains 76.7 MAP and 81.8 MRR on TREC QA, while its target-only run obtains 78.1 and 83.1. The two training sources already yield closer scores here. Fine-tuning still improves both measures. TREC QA therefore shows that the method can improve rankings even when the source-trained system already works reasonably well on the new collection.

#### InsuranceQA

The InsuranceQA test splits reward somewhat different choices. With target-only training, AP-LSTM obtains top-answer accuracy of 69.8 on TEST1 and 67.0 on TEST2. Target-only KAN reaches 71.5 on TEST1 and 68.8 on TEST2. Full fine-tuning lifts the plain encoder to 73.3 on TEST1 and 70.4 on TEST2. KAN with full fine-tuning reaches 75.3 on TEST1 and 72.1 on TEST2. Both splits therefore show benefit from the entity component in the matched target-only and full-adaptation comparisons.

Freezing the text encoder and adapting the knowledge component gives KAN 75.6 on TEST1 and 72.6 on TEST2. Freezing the knowledge component instead gives 75.2 and 72.5. The most favorable TEST1 and TEST2 scores are both in the condition that fixes the text encoder. DEV favors full adaptation, which gives 74.6, compared with 74.4 for either selective setting. The top entries among the published comparison rows are 71.7 on TEST1 and 68.3 on TEST2. Taken together, the development and test results support the general value of adaptation here more clearly than they establish a single best policy across every split.

Training settings on InsuranceQA TEST1 by top-answer accuracy The best TEST1 score comes from adapting the knowledge component while keeping the text encoder fixed.

**The numbers**

| System or setting | top-1 accuracy |
| --- | --- |
| AP-LSTM target only | 69.8 |
| KAN source only | 59.4 |
| KAN target only | 71.5 |
| AP-LSTM full fine-tuning | 73.3 |
| KAN full fine-tuning | 75.3 |
| KAN with text encoder fixed (this paper) | 75.6 |

#### Changing the text encoder

The authors also test the architecture on TREC QA with Conv-RNN, Bi-LSTM, and Att-LSTM in place of AP-LSTM. This comparison checks whether the improvement depends on how AP-LSTM pools question and answer information. With full adaptation, Conv-RNN reaches 78.3 MAP and 83.2 MRR without the knowledge component, and 79.4 MAP and 84.8 MRR with it. For Bi-LSTM the corresponding TREC QA scores are 76.8 MAP and 82.3 MRR without the component and 78.2 MAP and 83.6 MRR with it. For Att-LSTM they are 75.3 MAP and 79.8 MRR without it and 77.1 MAP and 81.3 MRR with it.

The condition that fixes the knowledge component during target training is strong for these encoders as well. Conv-RNN with KAN reaches 79.7 MAP and 84.8 MRR. Bi-LSTM with KAN gives 78.5 MAP and 83.7 MRR, while Att-LSTM with KAN gives 77.9 MAP and 81.9 MRR. Each comparison is within TREC QA. The results show that different ways of encoding the text can supply the contextual input the knowledge component needs, while the size of the benefit and the best update choice remain properties of the reported runs.

### What the ablations show

#### Removing the knowledge component

The closest architectural comparison in the paper is between AP-LSTM and KAN with AP-LSTM as its text encoder. The authors use the same training choices on each side so that the findings can be attributed to adding the knowledge component as a package. On Yahoo QA and TREC QA, the package improves both reported measures under target-only, source-only, mixed, and fully adapted training. On InsuranceQA, it improves the reported scores under target-only, mixed, and fully adapted training. Such comparisons show that the extra path is helpful across several training conditions. Higher scores even with target-only training also show that part of its usefulness comes from what it supplies during ordinary supervised ranking, independently of any source training.

InsuranceQA under source-only training is the decisive exception. AP-LSTM gets 61.1 on DEV, 62.1 on TEST1, and 58.8 on TEST2. KAN gets 58.1, 59.4, and 56.1, respectively. With no insurance examples during training, access to the common entity resource and to source-learned entity processing coincides with worse rankings. The same component becomes helpful when target examples are available. The authors interpret this as an effect of the distance between the source and insurance domains. The comparison establishes how the component behaved under that shift, while leaving open which aspect of the shift mattered most.

The TREC QA architecture comparisons repeat the removal experiment with different text encoders. They find gains from including the knowledge component across the displayed matched settings. This is informative because a gain under AP-LSTM alone could have depended on that encoder's particular way of making a pair interact. The results with a plain bidirectional encoder and with other attention arrangements show that the connection to the knowledge component works with several kinds of contextual vector. The experiment removes the component as a whole. The paper leaves open how much each factor contributed to the improvement: the specific entity attention rule, the pretrained entity vectors, the convolution, and the extra trainable capacity.

#### Separating source training from target training

The source-only and target-only runs ask how much can be learned from each labeled collection by itself. On Yahoo QA, source-only KAN yields a Precision@1 of 15.9 and an MRR of 37.4. Target-only KAN yields 67.2 and 80.3. For TREC QA, the same change in training source gives the much closer comparison of 76.7 and 78.1 MAP, with 81.8 and 83.1 MRR. These results are consistent with the authors' view that TREC QA resembles SQuAD-T more closely. The scores reflect both the degree of resemblance and the quirks of each ranking benchmark, so the contrast tells us more about practical transfer in these runs than about a general numerical measure of distance between domains.

The mixed condition asks whether source and target examples can simply be pooled. On Yahoo QA, mixed KAN has 62.4 Precision@1 and 76.8 MRR, falling below the target-only values of 67.2 and 80.3. On TREC QA, mixed KAN has 76.7 MAP and 81.6 MRR, below target-only KAN at 78.1 MAP and 83.1 MRR. On InsuranceQA, the mixed KAN run is also below target-only KAN on DEV, TEST1, and TEST2. The authors suggest the pooled training can fit the source examples too strongly. The reported comparison supports a narrower observation about these configurations. Giving the system a stage devoted to the target was more effective than the reported simple mixture.

The mixed condition is not uniformly worse than target-only across the experiment. Plain AP-LSTM on InsuranceQA reaches 70.2 on TEST1 and 67.3 on TEST2 with mixed training, compared with 69.8 and 67.0 using target-only training. Similarly, a mixed training setting can change MAP and MRR in different ways for an encoder. These exceptions matter because the point of the experiment is to compare practical options under known data conditions. Full or selective fine-tuning gives the strongest comparison in this study, without showing that every possible way of jointly weighting source and target examples would fail.

#### Holding different components fixed

The selective adaptation experiments ask where target supervision should change the ranker. On Yahoo QA and TREC QA, keeping the knowledge component fixed and adapting the text encoder gives the strongest main results. This is consistent with the authors' interpretation that entity-processing parameters learned on SQuAD-T can remain useful, while the text encoder gains from exposure to target phrasing and answer style. Freezing the component still allows the updated text encoder to influence its attention. The success of the setting thus shows that the knowledge component's weights can be carried across, even while the inputs to those weights change.

InsuranceQA gives more reason to adapt the knowledge component. With the text encoder fixed, the ranker can learn how to use the same Freebase entity vectors differently for insurance questions and answers. That yields the highest reported score on each of the insurance test splits. Full adaptation gives the best DEV score, and the selective setting that fixes the knowledge component stays close on TEST2. The result supports trying different update policies when the domain changes substantially, but the differences between the adaptation settings are small enough that the tables alone cannot establish how stable their ordering is.

The authors suggest that full adaptation can fit too closely to the target training examples. Freezing one component limits the parameters the limited target labels can change, which offers a plausible account of why a selective run sometimes scores better. The reported study compares the resulting leaderboard of settings. It does not track overfitting directly through training and validation curves or otherwise isolate that explanation. The empirical result is that preserving source-trained parameters can be beneficial even when target labels are available.

#### Reducing the amount of target supervision

The authors then vary the amount of labeled target training data for TREC QA and InsuranceQA. They keep AP-LSTM as the text encoder inside KAN and fix the source-trained knowledge component during adaptation. The 0% condition applies the source-trained ranker without target fine-tuning. The 100% condition uses the entire target training set under that same selective policy. Intermediate settings show what happens when the procedure is given only a fraction of the available target labels. The test metrics therefore trace the effect of adding target supervision under a fixed architecture and update policy.

On TREC QA, moving from 0% to 20% changes MAP from 76.7 to 78.1 and MRR from 81.8 to 83.4. At 100%, the scores are 79.7 MAP and 85.0 MRR. The largest reported increase for each TREC QA metric comes with the initial introduction of target labels. Progress continues through the intermediate settings. This is useful evidence for a setting in which source training has already produced a reasonably capable ranker and even a limited sample of target data makes the ordering more relevant to the new questions.

For InsuranceQA, TEST1 rises from 59.4 at 0% to 72.8 at 20%, and reaches 75.2 at 100%. TEST2 rises from 56.1 at 0% to 69.5 at 20%, and reaches 72.5 at 100%. DEV moves from 58.1 at 0% to 72.0 at 20%, and to 74.4 with the full training set. The change with the first portion of target labels is particularly large here. The result complements the source-only exception. The SQuAD-T initialization starts from a weak directly transferred ranker for insurance, yet a limited amount of insurance supervision gives that initialization a route to much better rankings. The experiment uses the policy of freezing the knowledge component throughout. It does not compare the label-efficiency curves of the other fine-tuning policies.

#### Removing knowledge from Freebase

A separate experiment tests sensitivity to how much information is available in the knowledge base. The authors randomly drop knowledge at rates spanning 20%-80% and evaluate on TREC QA and InsuranceQA. They again run KAN with AP-LSTM and keep the knowledge component fixed during target adaptation. This asks whether performance depends on having all the facts available in FB5M under the authors' removal scheme. It is a different intervention from removing KAN's knowledge component entirely, because the ranker still has an entity representation path and some external information to use.

The paper reports better overall performance as the knowledge base becomes more complete, while describing performance under the incomplete variants as robust. That pattern supports the claim that the amount of usable external information matters. It also shows that the tested ranker can continue operating under randomized loss of knowledge. Random removal leaves open what would happen if the missing facts were concentrated on the entities most important to a particular target, or if many mentions in the target could never be linked to usable entities in the first place.

### Limitations

#### Limits identified by the authors

The authors identify the source-only failure on InsuranceQA as an exception to the general benefit of adding the knowledge component. Open-domain factoid questions give that component one kind of supervision. Insurance questions can make very different demands on the relevance scorer. The authors argue that the resulting mismatch can make the extra knowledge features harmful until the ranker sees insurance data. Their approach is therefore demonstrated for supervised adaptation, including adaptation with a reduced target training set. The source-only runs provide a direct check on what happens without that supervision.

They also identify a limit to full fine-tuning. Updating all the trainable components does not give the strongest results everywhere, and the authors suggest that fitting the entire ranker to a small target set can overfit. Their interpretation of the selective results depends on the target. They see the source-trained knowledge component as reusable in the strongest Yahoo QA and TREC QA configurations. On InsuranceQA they emphasize the benefits of letting that component adapt. Together these findings qualify the idea of a shared representation. The structure of the system can transfer while the most useful settings for its components can depend on the target.

The knowledge completeness study further qualifies the role of the common resource. The authors observe a benefit from using a more complete Freebase subset. Reduced coverage is therefore a real condition on how much the knowledge path can contribute, even though the tested ranker remains usable after random removal. The paper's own experiments describe that sensitivity for its chosen resource, architecture, and targets.

#### Limits visible in the experimental setup

All the transfer experiments use SQuAD-T as their source. The target datasets extend from open-domain factoid selection to open-domain community questions and a specialized insurance collection. This variety is useful for showing that the method is applicable beyond a single source–target pair. It leaves unanswered how the same targets would respond to a different source, how sensitive the results are to source size, and whether transfer in the opposite direction would behave similarly. The experiments with alternative text encoders broaden the architectural evidence, with the most direct comparison restricted to TREC QA.

Differences among the datasets are bundled together. Some questions ask for facts and others seek more open-ended answers. Some candidates come from the source paragraph for a question, while others are sampled through search or drawn from a large answer pool. Topic coverage and the sizes of training collections also differ. A weak source-only score is a practical sign that substantial adaptation is needed under that benchmark's conditions. The experimental design does not establish whether topic, question form, candidate construction, or another difference accounts for most of the decline. The sensitivity of all the results to the supplied candidate lists also limits their relevance to retrieval from an unrestricted collection or to generating answers.

The component comparisons support the value of the knowledge path as implemented. Adding it also adds learned attention, convolution, and associated representation capacity. The paper reports no matched comparison that supplies arbitrary entity vectors, replaces the context-guided weights with uniform weights, or keeps the same trainable component while withholding graph information from its input. The random removal experiment gives supporting evidence that knowledge availability plays a role, but the full contribution of each design choice remains unresolved. In particular, the Dumbledore example illustrates what background facts might offer. It is not a trace showing that KAN used those specific relations when ranking that pair.

Likewise, the final ranking metrics measure answer relevance rather than the accuracy of the soft entity links. Several different weightings of an ambiguous name could have similar effects on a final score. The experiments do not give independent entity labels against which the attention mechanism can be checked. They establish the effectiveness of the relevance scorer under the stated conditions, while leaving open how frequently it identified the intended sense of a mention and whether that identification drove the decision on an individual example.

Several implementation details limit exact reconstruction of the system from its account. The candidate list is described as top `K`, but the reported settings do not give its size or fully explain candidate ordering and overlapping mention handling. The convolution prose gives the sliding-window operation and experimental filter widths without settling padding at sentence boundaries. The training section and results section also describe selective updates at slightly different levels of detail. They identify which representation component is fixed, while the treatment of every parameter outside those components is less explicit. The architecture and compared conditions are clear at the level needed to understand the experimental questions, though an exact reproduction would depend on resolving those choices.

Finally, the tables report scores for the selected settings without variation across runs or uncertainty estimates for the comparisons. The broader patterns, such as the improvement from introducing target labels on InsuranceQA, are visible across measures and splits. Small differences between fine-tuning policies are less informative about which policy would prevail on a new sample. The study also does not give the cost of candidate lookup or the added scoring component, so the results address ranking quality under the tested conditions rather than the operational tradeoff between that quality and serving cost.

### What came after

No documented follow-up is available to establish which later studies adopted KAN's entity attention, reused its selective fine-tuning procedure, or tested the same transfer idea with a different knowledge base. The paper's comparisons establish how those choices worked in its own experiments.

## Cite

Cite as Yang Deng, Ying Shen, Min Yang, Yaliang Li, Nan Du, Wei Fan and Kai Lei. 2018. Knowledge as A Bridge: Improving Cross-domain Answer Selection with External Knowledge. Proceedings of the 27th International Conference on Computational Linguistics.

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{deng2018knowledge,
  title = {{Knowledge as A Bridge: Improving Cross-domain Answer Selection with External Knowledge}},
  author = {Yang Deng, Ying Shen, Min Yang, Yaliang Li, Nan Du, Wei Fan and Kai Lei},
  booktitle = {Proceedings of the 27th International Conference on Computational Linguistics},
  year = {2018},
  url = {https://aclanthology.org/C18-1279/}
}
```

> 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)
