Are Bert Family Good Instruction Followers? A Study on Their Potential And Limitations

yisheng xiao, Juntao Li, Zechen Sun, Zechang Li, Qingrong Xia, Xinyu Duan, Zhefeng Wang, Min Zhang

TL;DR

While the "LLM revolution" has been dominated by decoder-only (GPT-style) and encoder-decoder (T5-style) architectures, this paper proves that the encoder-only BERT family can also be powerful instruction followers. By introducing a novel "Instruct-XMLR" model, the authors demonstrate that these models can achieve performance comparable to mainstream LLMs while offering a 3x speedup in text generation through non-autoregressive decoding.

The Problem: Left Out of the Generative Revolution

In the current landscape of AI, we’ve largely accepted a dichotomy: BERT-style models are for natural language understanding (NLU), and GPT-style models are for natural language generation (NLG). Because BERT is bidirectional—meaning every token can "see" every other token—it doesn't naturally fit the left-to-right flow required for standard text generation.

As a result, the BERT family has been largely left out of the instruction-tuning trend. The authors argue this is a missed opportunity. BERT models are often more efficient and have deep multilingual roots. The challenge is: How do we teach a model designed for filling in the blanks (Masked Language Modeling) to follow complex human instructions and generate coherent, multi-word responses?

Methods: Teaching BERT to Speak

The authors transform XLM-R (a large, multilingual BERT variant) into a generative instruction follower using two primary innovations:

  1. Dynamic Mixed Attention: Standard decoders use cross-attention to look at an input while generating an output. To mimic this in an encoder-only setup without adding new parameters, the authors concatenate the instruction and the (masked) response. They use a specific masking pattern that prevents the instruction tokens from "seeing" the response tokens, while allowing the response tokens to see everything. This allows the model to act as both encoder and decoder simultaneously.
  2. Non-Autoregressive Generation (Mask-Predict): Instead of generating text one word at a time (which is slow), Instruct-XMLR uses a "Mask-Predict" strategy. It starts with a sequence of [MASK] tokens and refines them over several iterations, predicting multiple words in parallel.
  3. Instruction Tuning: They fine-tuned the model on a subset of the xP3 dataset, which contains a massive variety of tasks and languages prompted in natural language.

Key Insights and Results

The base model for this research is XLM-R XL (3.5B parameters), originally trained on the CC100 multilingual corpus. After instruction tuning, the model was evaluated on held-out tasks like XWinograd, XCOPA, XNLI, WMT’14, and XSUM to measure generalization.

Performance and Zero-Shot Generalization

Surprisingly, despite being an "older" architecture style, Instruct-XMLR generalized to new tasks and languages remarkably well. Instruct-XMLR (3.5B) outperformed the decoder-only BLOOMZ-3B on all primary evaluation tasks and achieved comparable results to the encoder-decoder mT0-3.7B.

Performance comparison on zero-shot tasks

The authors also observed a clear "scaling law" effect: as they moved from BERT-Base to XLM-R Large and finally to XLM-R XL, the instruction-following capabilities improved significantly. Furthermore, the model retained strong performance across diverse languages, even those not heavily represented in the instruction-tuning phase.

Efficiency via Parallelism

Because the model predicts multiple tokens at once rather than linearly, it achieves a massive speed advantage. Instruct-XMLR consistently delivered around 3 times the decoding speed of its autoregressive counterparts like mT0. This makes it highly attractive for deployment scenarios where latency is a bottleneck.

Decoding speedup comparison

Limitations and Future Work

While promising, the Instruct-XMLR approach does have distinct limitations:

  • The Length Prediction Problem: Non-autoregressive models must guess the length of the output before they generate it. If Instruct-XMLR guesses the wrong length (e.g., guessing a 1-word answer for a 2-word label), accuracy drops sharply.
  • Long-Form Generation: While great at short tasks (NLI, multiple choice, short translation), the model’s performance degrades on very long sequences compared to standard decoders.
  • The Bidirectional Curse for Few-Shot: The authors found that BERT models struggle with "Few-Shot" (In-Context Learning). In GPT models, the causal mask helps the model "learn" the pattern of examples. In BERT, the bidirectionality seems to "confuse" the model when multiple examples are concatenated, leading to disorganized predictions.

In conclusion, this paper breathes new life into the BERT family, suggesting that with the right "generative plumbing," these models can be fast, efficient, and highly capable members of the modern LLM ecosystem.

Summary updated

BibTeX
@inproceedings{xiao2024are,
  author = {yisheng xiao and Juntao Li and Zechen Sun and Zechang Li and Qingrong Xia and Xinyu Duan and Zhefeng Wang and Min Zhang},
  title = {{Are Bert Family Good Instruction Followers? A Study on Their Potential And Limitations}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=x8VNtpCu1I},
}
Figure