Span pruning is a computational efficiency technique in neural coreference resolution that aggressively filters the vast set of possible text spans before scoring. A mention-ranking model uses a lightweight, learned mention score function to discard spans unlikely to refer to an entity, retaining only the top-k candidates for downstream antecedent linking.
Glossary
Span Pruning

What is Span Pruning?
A preprocessing step that reduces the number of candidate mention spans considered by a coreference model by filtering out spans with low mention likelihood scores.
This step is critical because the number of possible spans in a document grows quadratically with its length, making exhaustive pairwise scoring intractable. By applying a head-finding heuristic or a simple feedforward network to prune candidates, the system maintains high recall while drastically reducing the computational cost of the subsequent biaffine attention or higher-order inference stages.
Key Characteristics of Span Pruning
Span pruning is a critical preprocessing step that drastically reduces the computational complexity of coreference resolution by filtering out unlikely candidate mentions before the expensive pairwise scoring phase.
Mention Score Thresholding
A learned mention scorer assigns a likelihood score $s_m(i)$ to every possible span up to a maximum width $L$. Spans with scores below a fixed threshold are discarded. This reduces the candidate pool from $O(n^2)$ to a manageable subset, typically keeping only the top $\lambda T$ spans where $T$ is the number of tokens and $\lambda$ is a hyperparameter (e.g., 0.4).
Maximum Span Width Constraint
A hard linguistic constraint limits the maximum length of a candidate mention. By capping spans at a fixed number of tokens (commonly 10-30), the system eliminates arbitrarily long, semantically meaningless text segments. This is based on the observation that named entities and noun phrases rarely exceed a certain length in natural language.
Unary Mention Features
Before any pairwise comparison, a feedforward network computes a unary representation for each span using its boundary tokens and an attention-weighted sum of its internal tokens. This representation encodes the span's inherent 'mention-worthiness' independent of any antecedent, enabling rapid, parallelizable filtering.
Computational Complexity Reduction
Without pruning, a document with $n$ tokens generates $O(n^2)$ candidate spans, and pairwise antecedent scoring costs $O(n^3)$. Span pruning reduces this to $O(n)$ candidates, making the subsequent mention-ranking model tractable for long documents. This is the primary enabler for end-to-end neural coreference on real-world text.
Joint Mention Detection
In the canonical e2e-coref architecture, span pruning is not a separate pipeline step but is learned jointly with coreference scoring. The mention scorer is trained end-to-end using the same loss function, allowing the model to learn which spans are useful for coreference chains rather than relying on a static, hand-crafted definition of a 'mention'.
Handling Nested Mentions
A key advantage of the span-ranking approach is that pruning does not enforce non-overlapping boundaries. The system retains multiple overlapping spans (e.g., '[The CEO of [Microsoft]]') and allows the coreference scorer to determine which level of granularity is correct. Pruning only removes spans with low mention likelihood, not overlapping ones.
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.
Frequently Asked Questions
Clear, technical answers to common questions about how span pruning reduces computational complexity and improves precision in neural coreference resolution pipelines.
Span pruning is a preprocessing step in neural coreference resolution that filters out candidate text spans with low mention likelihood scores before they enter the computationally expensive coreference scoring phase. Without pruning, a document of length n generates O(n²) possible spans, making pairwise antecedent scoring intractable for long texts. A learned mention scorer assigns a probability to each span, and only the top k spans (typically 0.4 * n) are retained. This reduces the candidate pool by over 90% while preserving high-recall mention coverage. The technique is essential for scaling end-to-end models like e2e-coref to real-world documents without sacrificing accuracy.
Related Terms
Span pruning is a critical efficiency step in neural coreference pipelines. The following concepts define the architecture, training, and evaluation context in which pruning operates.
Mention Detection
The prerequisite subtask that identifies all possible text spans referring to an entity. Span pruning directly filters the output of mention detection by removing spans with low mention likelihood scores before they enter the computationally expensive coreference scoring phase. A high-recall mention detector is essential, as spans pruned here are permanently lost.
Mention-Ranking Model
A neural architecture that scores all candidate antecedents for a given mention and selects the highest-ranked one. Span pruning is the primary optimization for these models. By reducing the candidate mention set from all possible spans to a manageable subset, the antecedent scoring matrix shrinks dramatically, making end-to-end training feasible on long documents.
Span Representation
A fixed-length vector encoding a contiguous token sequence, typically computed from the hidden states of the span's start and end tokens using SpanBERT. The quality of a span's representation directly determines the accuracy of the pruning scorer. Poor representations lead to the erroneous pruning of valid mentions, introducing a hard ceiling on final coreference performance.
Antecedent Pruning
A complementary efficiency technique that restricts the candidate antecedent search space after mention detection. While span pruning filters which spans are considered valid mentions, antecedent pruning limits how far back the model looks for coreferring antecedents, often using a distance heuristic or syntactic constraints to maintain linear complexity.
Higher-Order Inference
An iterative refinement technique where span representations are updated based on their predicted antecedents, enabling transitive reasoning across chains. Efficient span pruning is a prerequisite for higher-order inference in production, as the iterative updates multiply the computational cost of an already quadratic scoring process.

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