Supervised Knowledge Makes Large Language Models Better In-context Learners

Linyi Yang, Shuibai Zhang, Zhuohao Yu, Guangsheng Bao, Yidong Wang, Jindong Wang, Ruochen Xu, Wei Ye, Xing Xie, Weizhu Chen, Yue Zhang

TL;DR

Researchers have introduced SuperContext, a framework that significantly boosts Large Language Model (LLM) performance on out-of-distribution (OOD) tasks and reduces hallucinations. By "plugging in" predictions and confidence scores from smaller, task-specific models directly into the LLM's prompt, they achieve better accuracy than traditional few-shot learning while using 30x less prompt space.

The Challenge: Generalization and Hallucination

While Large Language Models like ChatGPT and Llama 2 are impressive generalists, they have two major Achilles' heels: OOD Generalization and Hallucination.

When an LLM encounters data from a domain it hasn't seen much during training (Out-of-Distribution), its performance often craters. Furthermore, in tasks like classification or question answering, LLMs tend to "hallucinate" answers even when a question is unanswerable.

Conversely, smaller Supervised Language Models (SLMs)—think BERT or ELECTRA—are "specialists." They are cheap to train and highly accurate on specific tasks they were fine-tuned for, but they lack the broad reasoning and "common sense" of their larger cousins. The authors ask: Can we use the specialized knowledge of small models to make the big models more reliable?

Overview of the SuperContext framework

Methods: The SuperContext Framework

The authors propose SuperContext, a simple yet clever prompting strategy that bridges the gap between SLMs and LLMs. The workflow functions as follows:

  1. The Specialist: A small discriminative model (SLM) is fine-tuned on a specific task (e.g., sentiment analysis).
  2. The Receipt: For any new test case, the SLM generates a "receipt" containing its predicted label and its confidence score (e.g., "Prediction: Positive, Confidence: 0.967").
  3. The Augmented Prompt: This receipt is inserted into the LLM's prompt. Instead of just seeing the raw text, the LLM sees the text plus the specialist's opinion.
  4. The Interpreter (Optional): The authors also experimented with an "Interpreter" prompt, asking the LLM to explain how much the SLM's prediction influenced its final judgment and to identify critical features in the text.
Examples of the Auxiliary Information and Interpretation prompt designs

This approach is "plug-and-play"—it requires no retraining of the LLM, making it highly cost-effective.

Datasets

The researchers validated SuperContext across 9 distinct tasks using 16 curated datasets:

  • GLUE-X: A comprehensive benchmark for OOD natural language understanding (NLU), including tasks like Sentiment Analysis (SST-2), Natural Language Inference (MNLI), and Linguistic Acceptability (CoLA).
  • SQuAD 2.0: A popular Question Answering dataset that includes "unanswerable" questions, specifically used here to measure the model's ability to avoid hallucinations.

Key Insights and Ideas

  • The Power of Complementarity: LLMs possess "rich domain knowledge," while SLMs possess "task knowledge." SuperContext bridges this gap, allowing the LLM to act as a high-level judge over the specialist's input.
  • Calibration Laws: The study found a strong positive correlation between SLM confidence and LLM performance. When the small model is very sure of itself, the LLM is much more likely to provide a correct, factual answer.
  • Bypassing the "Lost in the Middle" Problem: LLMs often struggle to process long contexts (few-shot examples), frequently ignoring information in the middle of a prompt. SuperContext provides a concise, high-signal "hint" that bypasses this fatigue.
  • Correction, Not Just Following: Interestingly, the LLM doesn't just blindly follow the small model. In cases where they disagreed, ChatGPT corrected the SLM's error roughly 57.88% of the time.

Key Results

The quantitative improvements were substantial across the board:

  • OOD Generalization: On the GLUE-X benchmark, SuperContext (zero-shot) helped ChatGPT reach an average score of 80.05%, compared to just 66.67% for the vanilla model. It even outperformed standard 16-shot in-context learning (72.28%) while using significantly fewer tokens.
  • Hallucination Minimization: On SQuAD 2.0, the accuracy for "no-answer" questions (detecting when a question can't be answered) jumped from 32.35% (ChatGPT) to 54.65% (SuperContext).
  • Small Model Boost: Llama2-7B-chat saw a massive performance leap, moving from an average of 58.54% with 16-shot learning to 79.08% using SuperContext.

Limitations and Future Work

The authors acknowledge a few areas for further exploration:

  • Model Scope: The study focused on ChatGPT and Llama2-7B. Future work should test this on even larger models like GPT-4 or PaLM.
  • Rationale Reliability: While the "Interpreter" provides rationales for its decisions, these rationales themselves can sometimes contain hallucinations and should be treated with caution.
  • Task Expansion: The current work focuses heavily on NLU and QA. The authors plan to expand SuperContext to more complex text generation tasks and explore how pre-training data influences this "complementary" behavior between small and large models.

Summary updated

BibTeX
@inproceedings{yang2024supervised,
  author = {Linyi Yang and Shuibai Zhang and Zhuohao Yu and Guangsheng Bao and Yidong Wang and Jindong Wang and Ruochen Xu and Wei Ye and Xing Xie and Weizhu Chen and Yue Zhang},
  title = {{Supervised Knowledge Makes Large Language Models Better In-context Learners}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=bAMPOUF227},
}
Figure