e2e-coref is a canonical neural coreference resolution architecture introduced by Lee et al. that processes raw text directly to produce entity clusters. Unlike prior mention pair models or rule-based sieve approaches, it jointly optimizes mention detection and mention-ranking using a shared span representation computed from bidirectional LSTM hidden states. Each candidate span is scored for mention likelihood, and coreference links are established by ranking all possible antecedents using a learned biaffine attention scoring function.
Glossary
e2e-coref

What is e2e-coref?
The first end-to-end neural model to jointly perform mention detection and coreference scoring using learned span representations, eliminating the need for separate syntactic parsers or hand-engineered features.
The model introduced higher-order inference, where span representations are iteratively refined based on their predicted antecedents, enabling transitive reasoning across coreference chains. It uses aggressive span pruning to maintain computational tractability by filtering low-scoring spans before pairwise scoring. Evaluated on the CoNLL-2012 benchmark, e2e-coref established the foundation for subsequent SpanBERT-based and transformer-driven coreference systems, demonstrating that end-to-end learning could outperform traditional deterministic coreference pipelines.
Key Architectural Features
The canonical end-to-end neural coreference model by Lee et al. (2017) jointly performs mention detection and coreference scoring using learned span representations, eliminating the need for separate syntactic parsers or hand-crafted features.
Joint Mention Detection and Coreference
Unlike traditional pipeline systems that separate mention detection from coreference resolution, e2e-coref performs both tasks simultaneously. The model considers all possible spans up to a maximum width, scores each for mention likelihood, and then scores pairs of spans for coreference. This joint approach allows the model to learn that certain spans are better mentions precisely because they participate in coreference chains, and vice versa.
- Eliminates cascading errors from separate mention detection modules
- Considers all n-grams up to length L as candidate mentions
- Uses a shared span representation for both subtasks
Learned Span Representations
Each candidate span is encoded into a fixed-length vector by concatenating the bidirectional LSTM hidden states of its first and last tokens, along with an attention-weighted sum over all tokens in the span. An additional feature vector encoding the span's width is appended. This representation captures both boundary information and internal content without relying on syntactic parse trees.
- Start token embedding: h_start
- End token embedding: h_end
- Soft head attention: weighted sum over span tokens
- Span width feature: learned embedding of span length
Mention-Ranking with Biaffine Scoring
Coreference decisions are made using a mention-ranking approach rather than pairwise classification. For each mention, the model scores all candidate antecedents using a learned scoring function and selects the highest-scoring one. The scoring function combines a biaffine attention mechanism with a coarse pairwise feature vector that captures speaker and genre metadata.
- Score(m, a) = s_m(m) + s_m(a) + s_pair(m, a)
- s_pair uses a biaffine transformation: span_m^T * W * span_a
- Includes a dummy antecedent for first mentions or non-coreferent spans
- Trained with a marginal log-likelihood objective over correct antecedents
Higher-Order Iterative Refinement
The model applies iterative span representation updates where each span's embedding is recomputed as a weighted average of its original representation and the representations of its top-scoring antecedents from the previous iteration. This enables transitive reasoning: if mention A corefers with B, and B corefers with C, the model can learn that A should also corefer with C.
- N iterations of refinement (typically 2-3)
- Span i at iteration t: f(span_i^(t-1), antecedent_span^(t-1))
- Enables implicit chain-level reasoning without explicit clustering
- Improves resolution of long-distance coreference chains
End-to-End Training Objective
The model is trained to maximize the marginal log-likelihood of all correct antecedents for each mention. The loss function sums over all mentions and considers the set of all spans that are true coreferent antecedents. This objective naturally handles the case where a mention has multiple correct antecedents (e.g., in a chain) and gracefully manages the dummy antecedent for non-coreferent or first mentions.
- Loss: sum over mentions of log(sum over true antecedents of exp(score))
- No explicit negative sampling required
- Jointly optimizes mention detection and coreference accuracy
- Trained on the CoNLL-2012 shared task dataset (OntoNotes 5.0)
Span Pruning for Computational Efficiency
To manage the quadratic explosion of candidate spans, e2e-coref applies aggressive span pruning after mention scoring. Only the top-k spans by mention score are retained for the coreference scoring phase. Additionally, antecedent pruning restricts each mention to consider only the nearest k antecedents, based on the observation that most coreference links are local.
- Top-λ spans retained after mention scoring (λ ≈ 0.4 * tokens)
- Maximum antecedent distance: typically 50-100 mentions back
- Reduces complexity from O(n^4) to approximately O(n^2)
- Pruning decisions are learned, not heuristic
Frequently Asked Questions
Clear, technical answers to the most common questions about the canonical end-to-end neural coreference resolution model by Lee et al., which jointly performs mention detection and coreference scoring.
e2e-coref is the first end-to-end neural coreference resolution model that jointly performs mention detection and coreference scoring in a single, fully differentiable framework. Unlike traditional pipeline systems that rely on separate mention detectors and hand-crafted features, e2e-coref considers all possible text spans up to a maximum length as candidate mentions. For each span, it computes a dense span representation by concatenating the learned hidden states of its start and end tokens from a bidirectional LSTM encoder, along with an attention-weighted sum of the tokens within the span. The model then scores every candidate antecedent for each mention using a learned mention-ranking function. A key innovation is the inclusion of an artificial ε antecedent, which allows the model to classify a span as not having any antecedent, effectively performing mention detection and coreference linking simultaneously. The entire system is trained end-to-end to maximize the marginal log-likelihood of the correct antecedent clusters.
e2e-coref vs. Traditional Coreference Approaches
Comparing the end-to-end neural model by Lee et al. (2017) against the deterministic sieve (Stanford) and mention-pair classifiers that preceded it.
| Feature | e2e-coref (Lee et al.) | Rule-Based Sieve | Mention-Pair Model |
|---|---|---|---|
Mention Detection | Jointly learned with coreference scoring | Separate rule-based step | Separate rule-based step |
Span Representation | Learned from BiLSTM start/end tokens + head attention | Hand-crafted syntactic features | Lexical and syntactic feature vectors |
Scoring Mechanism | Feedforward NN over span pairs | Deterministic rule priority ordering | Binary classifier (SVM or MaxEnt) |
Higher-Order Inference | |||
End-to-End Differentiable | |||
Avg. F1 on CoNLL-2012 | 68.8% | 57.2% | 60.3% |
Error Propagation Risk | Low (joint optimization) | High (cascading sieves) | High (pipeline design) |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Explore the key architectural components, related models, and evaluation benchmarks that define the end-to-end neural coreference resolution paradigm.
Span Representation
The foundational technique for encoding arbitrary text spans into fixed-length vectors, enabling the model to score mentions and antecedents without relying on pre-parsed syntactic trees.
- Endpoint Concatenation: The representation of span i to j is computed by concatenating the hidden states of its start and end tokens from a biLSTM or Transformer.
- Head-Finding Attention: A learned attention mechanism over the tokens within a span, weighted toward the syntactic head word, is often added to the endpoint representation for richer features.
- Feature Enrichment: The final span vector is typically concatenated with hand-crafted features like span length and genre metadata before scoring.
Higher-Order Inference
An iterative refinement technique that allows the model to perform transitive reasoning across coreference chains, moving beyond first-order antecedent decisions.
- Iterative Refinement: Span representations are updated based on the representations of their predicted antecedents from the previous iteration.
- Transitive Closure: If mention A is coreferent with B, and B with C, higher-order inference allows the model to implicitly learn that A and C are also coreferent.
- Implementation: Typically involves running the antecedent scoring step multiple times, using the weighted sum of antecedent representations as the new span representation for the next iteration.
Span Pruning
A critical computational efficiency step that drastically reduces the number of candidate mention spans considered by the model from O(n²) to a manageable constant.
- Mention Scoring: A lightweight feedforward network assigns a 'mention-ness' score to every possible span up to a maximum width.
- Top-K Filtering: Only the top K spans (e.g., 0.4 * document length) by mention score are retained as candidates for the coreference scoring stage.
- Impact: This step is essential for making end-to-end models computationally feasible on long documents without sacrificing recall on the most likely entity mentions.
SpanBERT Pre-training
A pre-training method specifically designed to improve performance on span-level tasks like coreference resolution, serving as a powerful text encoder for the e2e-coref architecture.
- Span Masking: Masks contiguous random spans of tokens rather than individual subword tokens, forcing the model to predict the entire span content.
- Span Boundary Objective (SBO): A novel training objective that requires the model to predict each masked token using only the representations of the tokens at the span's boundary.
- Performance Gain: Replacing the original biLSTM encoder with SpanBERT significantly boosts coreference resolution accuracy, particularly on long-distance dependencies.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us