Coreference Resolution › Scoring Mentions and Antecedents

Michael BrenndoerferNovember 17, 20265 min read
Language AI HandbookAll chapters
Part 9 of 67Coreference, Discourse, Pragmatics, and Dialogue
Chapter 56Coreference Resolution › Scoring Mentions and Antecedents
Reading section 5 of 14 · Scoring Mentions and Antecedents · 5 minSection 5 of 14 · 5 min

Section 5 of 14 · 5 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

This section follows the span-ranking formulation, because it makes the moving parts explicit.

The model has two kinds of decisions. The mention score decides which spans are worth considering. The pairwise score decides which earlier span, if any, is the antecedent of a given mention. Both are learned, and both are trained through the same final objective. That shared objective is what makes the model end-to-end, and it is also what makes the mention score hard to interpret in isolation.

The Mention Score

Each span mm gets a vector representation gm\mathbf{g}_m built from the encoder states at its boundaries, the attention-weighted representation of its head word, and a small set of hand features (width, whether it is a pronoun, and so on). For a simplified linear scorer, the mention score is

sm=wm⊤gm.s_m = \mathbf{w}_m^\top \mathbf{g}_m.

The raw score sms_m ranks spans for pruning. The downstream clustering loss trains it without a separate mention-detection target.

In the original Lee et al. (2017) model, a feed-forward network computes the mention score. Its attention over words in the span supplies a weighted representation of the span's head. The linear formula above illustrates how a vector can be turned into a single ranking score. Boundary states contribute contextual information from the span's first and last positions. The head representation captures what the span is about. Hand features capture properties that are cheap to compute and expensive to learn, such as whether the span is a pronoun or how wide it is. The linear score then combines these signals into a single ranking value.

The Pairwise Score

For a mention mm and a candidate antecedent aa, the score combines both spans and their interaction:

s(m,a)=wa⊤[gm;ga;gm∘ga],s(m, a) = \mathbf{w}_a^\top [\mathbf{g}_m; \mathbf{g}_a; \mathbf{g}_m \circ \mathbf{g}_a],

where ∘\circ is elementwise multiplication and [;][;] is concatenation. The elementwise term in this simplified compatibility score can express agreement: "same head word" or "both singular" are conjunctions of features from the two spans.

Without the elementwise term, the model could learn that certain spans are good antecedents and certain spans are good mentions, but it could not easily learn that a particular combination is good. A product term gives the scorer explicit pair interactions. In Lee et al. (2017), the pair network uses the two spans, their elementwise product, and pair features. The complete non-null link score adds the earlier and later spans' two mention scores to that compatibility score.

The Null Antecedent

A mention may have no antecedent, and the model needs a way to say so. The standard trick is to define a special candidate ϵ\epsilon with score

s(m,ϵ)=0,s(m, \epsilon) = 0,

which costs no parameters and acts as the reference point. Then

P(a∣m)=exp⁡s(m,a)exp⁡s(m,ϵ)+∑a′∈A(m)exp⁡s(m,a′),P(a \mid m) = \frac{\exp s(m, a)}{\exp s(m, \epsilon) + \sum_{a' \in \mathcal{A}(m)} \exp s(m, a')},

where A(m)\mathcal{A}(m) is the set of antecedents that survived pruning. Two things follow immediately:

  • Retained choices. A normalized probability of 0.7 gives 70 percent of the model's mass to that choice within the retained candidate set plus null. The unnormalized score s(m,a)s(m,a) is a logit.
  • The fixed null logit contributes one to a positive normalizer when the other logits are finite. If there are no non-null candidates, as for the first mention, P(ϵ∣m)=1P(\epsilon \mid m)=1.

The null logit sets a reference level. A candidate with positive logit receives more probability than null in that softmax row. Score differences set probability ratios, so rescaling the logits can change confidence.

Marginal Likelihood over Retained Gold Antecedents

Training does not require the model to pick a specific gold antecedent. Any mention in the same gold cluster that precedes mm and survived pruning is acceptable. So the loss marginalizes over the gold set:

J=−∑i=1Nlog⁡∑a^∈G+(i)P(a^∣mi),J = -\sum_{i=1}^{N} \log \sum_{\hat{a} \in \mathcal{G}^+(i)} P(\hat{a} \mid m_i),

When earlier gold antecedents survive, G+(i)\mathcal{G}^+(i) contains those antecedents. Under the null-target policy of Lee et al. (2017), it is {ϵ}\{\epsilon\} when none survive or the span has no earlier gold partner to begin with. This also lets the model use null for a proposed span that is not a gold mention.

Either earlier mention from the correct cluster is a valid target for the local decision. Summing their probabilities gives credit to both choices. Other links still determine whether the final partition matches the gold clusters.

When No Gold Antecedent Survives

A mention can genuinely lack an earlier gold antecedent. A different case occurs when earlier gold antecedents exist but pruning removes all of them. With null fallback the latter case uses P(ϵ∣mi)P(\epsilon \mid m_i) in the loss and supplies no positive gradient for a gold link.

There are three policies, and they are not equivalent:

  • Skip the mention. Exclude mim_i from the loss. This is clean but changes the effective training set and silently drops exactly the hard, long-distance cases you care about.
  • Use the null target. The inner sum is P(ϵ∣mi)P(\epsilon\mid m_i). When its logit is fixed, only the available non-null logits receive direct gradients from this term. This treatment depends on the pruning policy.
  • Force-keep one gold antecedent. Guarantee at least one gold antecedent survives pruning, for example by always retaining the nearest gold antecedent. This keeps the gradient meaningful at the cost of a slightly different candidate distribution at train and test time.

Published implementations pick one of these and document it, and reimplementations sometimes pick a different one without noticing. When two papers report the same architecture with different numbers, this is one of the places to look. Read the code, not the diagram.

Skipping changes which mentions contribute to training. Null fallback lowers the remaining nongold logits relative to the fixed reference. Force-keeping a gold antecedent can create training candidate sets that inference cannot construct.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy