Search⌘ K
AI Features

SpanBERT: Exploring Architecture

Explore the architecture of SpanBERT, focusing on its span-based masking and boundary representation techniques. Understand how SpanBERT combines masked language modeling with span boundary objectives to enhance token prediction accuracy. Learn to apply a fine-tuned SpanBERT model for question-answering using the transformers library pipeline, gaining practical skills for NLP tasks involving text spans.

In SpanBERT, we mask a contiguous span of tokens in the sentence. Let xsx_s and xex_e be the start and end position of the masked tokens, respectively. We feed the tokens to SpanBERT and it returns the representation of all the tokens. The representation of token ii is represented as RiR_i. The representation of the tokens in the span boundary is denoted as Rs1R_{s-1} and Re+1R_{e+1} ...