[Paper Review] RAVEN: In-Context Learning with Retrieval-Augmented Encoder-Decoder Language Models
This paper proposes Raven, a retrieval-augmented encoder-decoder language model that enhances in-context learning through retrieval-augmented masked language modeling and prefix language modeling, addressing pretraining-testing mismatch and limited context length. It introduces Fusion-in-Context Learning (FiCL) to leverage more in-context examples without retraining, achieving performance comparable to much larger models despite having 180× fewer parameters.
In this paper, we investigate the in-context learning ability of retrieval-augmented encoder-decoder language models. We first conduct a comprehensive analysis of existing models and identify their limitations in in-context learning, primarily due to a mismatch between pretraining and inference, as well as a restricted context length. To address these issues, we propose RAVEN, a model that combines retrieval-augmented masked language modeling and prefix language modeling. We further introduce Fusion-in-Context Learning to enhance the few-shot performance by enabling the model to leverage more in-context examples without requiring additional training. Through extensive experiments, we demonstrate that our simple yet effective design significantly improves performance, achieving results comparable to the most advanced language models in certain scenarios, despite having substantially fewer parameters. Our work underscores the potential of retrieval-augmented encoder-decoder language models for in-context learning and encourages further research in this direction.
Motivation & Objective
- To investigate and improve the in-context learning capability of retrieval-augmented encoder-decoder models, particularly the state-of-the-art Atlas model.
- To address the pretraining-testing distribution mismatch and limited context length that hinder Atlas’s few-shot performance.
- To develop a method that enables effective utilization of more in-context examples without model fine-tuning or architectural changes.
- To explore the role of in-context example retrieval in boosting few-shot performance.
- To demonstrate that smaller, retrieval-augmented encoder-decoder models can achieve performance competitive with much larger decoder-only models.
Proposed method
- Raven combines retrieval-augmented masked language modeling and prefix language modeling to align pretraining and inference distributions, reducing the pretraining-testing mismatch.
- Fusion-in-Context Learning (FiCL) enables the model to attend to and integrate information from a larger number of in-context examples by dynamically fusing them during decoding.
- The model uses its internal retriever to retrieve relevant in-context examples during inference, enhancing few-shot performance.
- The architecture leverages a bidirectional encoder and a fusion-in-decoder mechanism to effectively integrate retrieved passages with input context.
- The method avoids retraining or model modification by relying on retrieval and dynamic fusion at inference time.
- The approach is evaluated on zero-shot and few-shot benchmarks including MMLU and NQ, with ablation studies on retrieval and context length.

Experimental results
Research questions
- RQ1Can retrieval-augmented encoder-decoder models like Atlas effectively perform in-context learning, and what are their key limitations?
- RQ2How does the pretraining-testing distribution mismatch affect in-context learning performance in encoder-decoder models?
- RQ3Can Fusion-in-Context Learning enable better few-shot performance without additional training or model changes?
- RQ4Does retrieving relevant in-context examples during inference further improve few-shot performance?
- RQ5Can a smaller, retrieval-augmented encoder-decoder model achieve performance comparable to much larger decoder-only models?
Key findings
- Raven significantly outperforms Atlas on both zero-shot and few-shot settings, with a 4.9-point improvement on MMLU (11B version) when using FiCL.
- On the MMLU benchmark, Raven-11B achieves 50.5% accuracy in 5-shot learning with FiCL, surpassing the zero-shot performance of GPT-3 175B (43.9%) and approaching PaLM 62B (69.3%).
- With In-Context Example Retrieval, Raven achieves a 9.8% absolute improvement on NQ in 1-shot learning (11B model), demonstrating the value of relevant example retrieval.
- Despite having 180× fewer parameters than GPT-3 175B, Raven-11B achieves comparable few-shot performance on MMLU, highlighting its efficiency.
- The zero-shot performance of Raven-3B (45.7%) exceeds the few-shot performance of GPT-3 175B (26.0%), indicating strong generalization without fine-tuning.
- FiCL enables the 11B model to achieve better few-shot performance than zero-shot, reversing the typical degradation seen in standard in-context learning.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.