Manuscript Offprint

arXiv:2610.11430

BioBigBird: A Sparse Attention Model for Long-Range Dependency Processing in Biomedical Text

Roshan Balaji, Pavan Kumar S, Vasudev Gupta, Sreejith N, Keerthana Sridhar, Nirav Bhatt

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

While domain-specific Large Language Models (LLMs) have encoded vast biomedical knowledge, their limited context windows often hinder a deep understanding of nuanced relationships within and across texts. To address this limitation, we introduce BioBigBird, a bidirectional language model pre-trained on extensive biomedical literature and clinical data, specifically designed to handle long-range dependencies. BioBigBird leverages a sparse attention mechanism to process sequences up to 4096 tokens, and its training incorporates a multi-stage process to mitigate noise from the large-scale pre-training corpus. We further enhance its performance by employing a multitask learning (MTL) framework that jointly optimizes for Named Entity Recognition and Relation Extraction. Comprehensive evaluations on the BLURB benchmark reveal that our MTL-enhanced BioBigBird achieves highly competitive results against state-of-the-art models. Our work contributes an effective methodology for developing powerful, long-context language models for specialized domains, demonstrating the value of extended sequence processing for complex text analysis. Our models are publicly available at https://huggingface.co/collections/bisectgroup/biobigbird.

1 Introduction

The field of biomedicine is characterised by a massive and ever-growing volume of unstructured text, from millions of publications in repositories like PubMed (National Center for Biotechnology Information, 2011) to detailed clinical narratives in electronic health records (Johnson et al., 2016). Effectively harnessing this data requires advanced text-mining tools. Core to this endeavour are the tasks of Biomedical Named Entity Recognition (BioNER) and Relation Extraction (BioRE), which automatically identify key entities (e.g., genes, diseases, drugs) and the relationships between them. These tasks are foundational for building structured knowledge bases, accelerating research, and discovering novel insights from the vast body of literature (Wang et al., 2023).

The advent of the Transformer architecture (Vaswani et al., 2017) and pre-trained language models like BERT (Devlin et al., 2018) has revolutionised Natural Language Processing (NLP). By learning deep bidirectional representations of text, these models achieve state-of-the-art performance on a wide range of tasks after fine-tuning. However, their success comes with a critical limitation: the self-attention mechanism at their core has a computational and memory complexity that is quadratic to the input sequence length ( O(n2)O(n^{2})). The sequence complexity restricts models like BERT to short contexts, typically 512 tokens. Consequently, input must be truncated or segmented when applied to full-text articles or lengthy clinical summaries, leading to a loss of long-range contextual information and suboptimal performance on downstream tasks.

Two key research directions have emerged to address these challenges. First, work by Gu et al. (2021) has demonstrated that pre-training language models from scratch on domain-specific corpora (e.g., biomedical text) significantly outperforms continually training a general-domain model. Their introduction of the BLURB benchmark has been instrumental in tracking progress in biomedical language understanding. Second, models like BigBird (Zaheer et al., 2020) have been proposed to overcome the sequence length limitation. BigBird utilises a sparse attention mechanism that reduces the complexity from quadratic to linear, enabling the processing of sequences up to 4096 tokens or longer, making it possible to analyse entire documents without truncation.

Building on these advances, this paper introduces BioBigBird, a biomedical language model designed to address the challenges of domain-specificity and long-range context holistically. Our approach makes two primary contributions. First, we employ a multi-stage curriculum learning strategy for pre-training. We begin training with shorter sequences (512 tokens) to efficiently learn fundamental linguistic patterns and stabilise the model, before graduating to longer sequences (up to 4096 tokens) to capture complex, long-range dependencies. This staged approach, which preserves optimiser states across stages, is more computationally efficient and effective than training on long sequences from the outset.

Second, to maximise performance on biomedical tasks, we integrate a multi-task learning (MTL) framework for fine-tuning. As different BioNER and BioRE datasets are often annotated for distinct entity and relation types, MTL allows a single model to learn from multiple datasets simultaneously. MTL encourages the model to learn shared, generalisable representations, improving performance and data efficiency, a principle shown to be effective in prior work (Crichton and Pyysalo, 2017; Wang et al., 2018).

In summary, our contributions are:

• The development and public release of Bio-BigBird, 1^{1} a new long-sequence language model pre-trained from scratch on a comprehensive biomedical and clinical text corpus.

• A demonstration of an effective and efficient multi-stage curriculum for pre-training long-context models in a specialised domain.

• The integration of a multi-task learning framework to synergistically improve performance on diverse BioNER and BioRE tasks.

• A comprehensive evaluation on the BLURB benchmark, showing that BioBigBird achieves highly competitive results compared to existing state-of-the-art models.