Inferensys

Glossary

BIO Tagging Scheme

A sequence labeling encoding where tokens are tagged as Beginning, Inside, or Outside of a semantic argument, transforming SRL into a token classification problem.
Developer reviewing semantic search engine results on laptop, relevance scores visible, technical search demo.
Sequence Labeling Encoding

What is BIO Tagging Scheme?

The BIO tagging scheme is a token-level encoding format that transforms structured prediction tasks like Semantic Role Labeling into a sequence classification problem by marking tokens as the Beginning, Inside, or Outside of a semantic argument.

The BIO tagging scheme (also known as IOB) is a standard sequence labeling encoding where each token in a sentence receives one of three tags: B (Beginning) marks the first token of a semantic argument span, I (Inside) marks subsequent tokens within that same span, and O (Outside) marks tokens that are not part of any argument. This transforms the structural prediction task of identifying predicate-argument boundaries into a token-level classification problem solvable by sequence models.

In Semantic Role Labeling, the BIO scheme is applied per-predicate, generating a separate tag sequence for each verb in a sentence. For example, in "[ARG0 The committee] [PRED approved] [ARG1 the resolution]," tokens receive tags like B-ARG0, I-ARG0, B-PRED, O, B-ARG1, and I-ARG1. This encoding enables neural architectures like BiLSTMs and Transformers to perform span-based SRL without relying on pre-computed syntactic parse trees, as the model learns to predict BIO tag sequences directly from contextualized token embeddings.

Sequence Encoding

Core Characteristics of BIO Tagging

The BIO tagging scheme transforms semantic role labeling into a token-level classification problem, encoding the boundaries of arguments with a simple, unambiguous prefix system.

01

The B-I-O Prefix System

Every token in a sentence receives exactly one tag that encodes its position relative to a semantic argument:

  • B (Beginning): Marks the first token of an argument span. A new argument always starts with a B tag.
  • I (Inside): Marks any token that continues an argument after the initial B token. Multi-word arguments use consecutive I tags.
  • O (Outside): Marks any token that is not part of any argument for the current predicate.

This scheme ensures that even when two arguments of the same type appear adjacent, the B prefix signals the boundary unambiguously.

02

Tag Composition: Prefix + Role

A complete BIO tag concatenates the positional prefix with the semantic role label:

  • B-ARG0: The first token of the Agent argument
  • I-ARG0: Continuation tokens of the Agent argument
  • B-ARGM-LOC: The first token of a Locative modifier
  • O: Token not participating in the predicate's frame

Example sentence: "[ARG0 John] [V sold] [ARG1 the car] [ARGM-TMP yesterday]"

  • John → B-ARG0
  • sold → O (or B-V for predicate identification)
  • the → B-ARG1
  • car → I-ARG1
  • yesterday → B-ARGM-TMP
03

Why BIO Over Simple IO Tagging

A naive Inside-Outside (IO) scheme without the B prefix fails when two arguments of the same type are adjacent:

Problem case: "[ARG1 the book] [ARG1 the movie]"

  • IO scheme: the/I-ARG1 book/I-ARG1 the/I-ARG1 movie/I-ARG1 — indistinguishable from a single argument
  • BIO scheme: the/B-ARG1 book/I-ARG1 the/B-ARG1 movie/I-ARG1 — two arguments clearly separated

The B prefix acts as a boundary delimiter, making the encoding lossless and enabling the model to learn argument segmentation directly from token labels without relying on external syntactic parsers.

04

Variants: BIOES and BILOU

Extended tagging schemes add finer-grained boundary information:

  • BIOES: Adds E (End) and S (Singleton) tags

    • B-ARG1: beginning of multi-token argument
    • I-ARG1: inside multi-token argument
    • E-ARG1: end of multi-token argument
    • S-ARG1: single-token argument
    • O: outside
  • BILOU: Adds L (Last) and U (Unit) tags with equivalent semantics

These extensions provide explicit boundary signals that can improve span detection accuracy, particularly for longer arguments, at the cost of a larger output label space.

05

Token Classification Architecture

BIO tagging converts SRL into a standard sequence labeling task solvable with token-level classifiers:

  • Input: A sequence of tokens with a marked predicate position
  • Encoder: A Transformer (e.g., BERT) produces contextualized embeddings for each token
  • Classifier: A linear layer + softmax predicts one BIO tag per token from the label vocabulary
  • Decoding: Contiguous B-I sequences are collapsed into argument spans with their role labels

This architecture eliminates the need for span enumeration or syntactic parse features, enabling end-to-end neural SRL that learns both boundaries and roles jointly from annotated data.

06

Label Space and Data Requirements

The BIO tag vocabulary size depends on the role inventory:

  • PropBank roles: ARG0 through ARG5, plus ARGM-* modifiers (LOC, TMP, MNR, CAU, etc.)
  • Typical label count: 50-100 distinct BIO tags per predicate
  • O tag dominance: The O tag accounts for 70-85% of all tokens, creating a severe class imbalance

Training robust BIO taggers requires:

  • Large annotated corpora like OntoNotes (1.7M+ words)
  • Weighted loss functions or focal loss to counteract O-tag dominance
  • Predicate-aware input representations that condition token embeddings on the target predicate
BIO TAGGING SCHEME

Frequently Asked Questions

Clear, concise answers to the most common questions about the Beginning-Inside-Outside tagging scheme and its role in transforming semantic role labeling into a token classification problem.

The BIO tagging scheme (also called IOB or IOB2) is a sequence labeling encoding where each token in a sentence is tagged as B (Beginning), I (Inside), or O (Outside) of a semantic argument. The B- prefix marks the first token of a named entity or argument span, I- marks all subsequent tokens within that same span, and O marks tokens that belong to no argument. For example, in the sentence 'John opened the door,' the token 'John' receives B-ARG0, 'opened' receives B-V (predicate), and 'the' and 'door' receive B-ARG1 and I-ARG1 respectively. This encoding transforms the complex task of identifying variable-length argument spans into a straightforward token-level classification problem that any sequence model can solve.

TOKEN ENCODING COMPARISON

BIO vs. Other Sequence Labeling Schemes

Comparison of encoding strategies for transforming semantic role labeling into a token classification problem

FeatureBIOBIOESIOB2

Tag inventory size

3 tags per role

5 tags per role

3 tags per role

Boundary detection

Implicit (B after O)

Explicit (E tag)

Implicit (B after O)

Single-token entity support

B-role only

S-role tag

B-role only

End of entity marked

Ambiguity in consecutive entities

Model complexity overhead

Low

Moderate

Low

SRL adoption frequency

Most common

Rare

Common in NER

PropBank annotation default

Prasad Kumkar

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.