Sane NER: Why Spans Are Finally Beating BIO Tags
For a long time, we trained NER models by classifying every single token. BIO tagging (Begin, Inside, Outside) became the standard, but it is redundant and often breaks on complex structures. In practice, business logic does not need tags. It needs spans: clear object boundaries. Moving to span-level architectures avoids tag inconsistency problems and handles nested entities better. This is not just a change of terminology but a fundamental shift in how we design information extraction. If your pipeline still stitches tokens together by hand, it is time to rethink the architecture.
AI-processed from Habr AI; edited by Hamidun News
Imagine building a house, but instead of working with bricks or whole walls, you make the workers describe every grain of sand in the mortar. That is roughly what we have been doing in NLP for the last ten years, using BIO tagging for named entity recognition (NER). We got used to the idea that a model must label every token: here an entity begins (B), here it continues (I), and here we have left it behind (O). That was convenient for the math and for good old CRF layers, but it is monstrously inefficient for real systems.
The problem is that an entity in text is not a chain of labels but a whole fragment with physical boundaries. When we force a model to predict tags for every piece of a word, we create enormous redundancy and extra points of failure. Anyone who has trained BERT or its derivatives for NER knows this particular pain.
Modern tokenizers such as WordPiece or BPE split complex words into subtokens. As a result, a simple surname can turn into three or four fragments, and you have to either mask the extra parts or invent crutches to merge them in post-processing. You get a prediction that still needs long, painful decoding just to answer the question: where is the director's name?
Moving to a span-level approach is not just another architectural extravagance. It is an admission that we took the path of least resistance for too long. Instead of classifying each token, modern systems look at text as a set of potential segments (spans).
The model learns to determine boundaries, a start index and an end index, and to assign an entity type to that segment. This solves the problem of inconsistent sequences once and for all. In the BIO world, a model could emit a begin-organization tag and then slap a continue-person tag on the next token.
In a span-level approach, that kind of logical error is technically impossible. The model simply says: from the third to the fifth word, we have a location. And that statement is atomic.
Moreover, the classic BIO approach completely fails on nested entities. Try to annotate the phrase "Moscow State University" properly if your application needs to extract both the city (Moscow) and the university itself as a separate object. In a one-dimensional chain of tokens, this turns into combinatorial hell or requires stacking several models on top of each other.
Spans solve this naturally and elegantly: the same stretch of text, or a subset of it, can belong to different categories at different levels of abstraction. This is critical for legal documents, where a contract is nested in an addendum that is nested in an act, or for medicine, where the name of a symptom can be part of the name of a complex syndrome.
Why does this matter right now? We are rapidly moving from the era of "as long as the model outputs something" to the era of industrial, reliable AI. In real pipelines, data cleanliness, ease of maintenance and predictable results have become more important than squeezing out an extra percentage point of F1 on well-worn academic datasets like CoNLL-2003. Using spans lets you radically simplify code, get rid of hundreds of lines of regular expressions for stitching tokens, and make models more robust to tokenization noise.
If your NER module still spits out an endless sheet of tags that you then try to assemble into meaningful objects, you are stuck in the past. A modern stack requires working directly with the boundaries of meaning. It is not only faster to develop with but also plainly more logical from a linguistic standpoint. After all, we do not read words letter by letter; we perceive phrases and objects as wholes. It is time our models started doing the same.
The takeaway: it is time to stop teaching models to see tokens and start teaching them to see blocks of meaning. The future of NER belongs to architectures that work with object boundaries directly, leaving BIO tags in the history textbooks.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.