Acquiring Bidirectionality via Large and Small Language Models
Takumi Goto, Hiroyoshi Nagao, Yuta Koreeda
TL;DR
This work tackles the lack of bidirectionality in large unidirectional language models for token-level classification. It introduces a lightweight backward LM trained separately and concatenates its token representations with a forward LM, producing pseudo bidirectional token features without modifying the large forward model. Across chunking, POS, and NER tasks, especially CoNLL2003-NER and rare-domain/few-shot settings, the approach yields significant performance gains (up to 10+ F1 points) and demonstrates practical utility for leveraging large UniLMs as bidirectional encoders. The method is simple, reusable across different backbones, and accompanied by open-source training code, offering a scalable path to improve token-level NLP with existing models while highlighting computation considerations and scope limitations.
Abstract
Using token representation from bidirectional language models (LMs) such as BERT is still a widely used approach for token-classification tasks. Even though there exist much larger unidirectional LMs such as Llama-2, they are rarely used to replace the token representation of bidirectional LMs. In this work, we hypothesize that their lack of bidirectionality is keeping them behind. To that end, we propose to newly train a small backward LM and concatenate its representations to those of existing LM for downstream tasks. Through experiments in named entity recognition, we demonstrate that introducing backward model improves the benchmark performance more than 10 points. Furthermore, we show that the proposed method is especially effective for rare domains and in few-shot learning settings.
