Skip to main content
QUICK REVIEW

[Paper Review] AutoMix: Automatically Mixing Language Models

Pranjal Aggarwal, Aman Madaan|arXiv (Cornell University)|Oct 19, 2023
Topic ModelingComputer Science5 citations
TL;DR

AutoMix is a black-box, API-based method that dynamically routes queries between small and large language models using few-shot self-verification and a meta-verifier to optimize cost-performance trade-offs. It improves incremental benefit per unit cost by up to 89% on five context-grounded reasoning tasks using LLaMA2-13B and LLaMA2-70B.

ABSTRACT

Large language models (LLMs) are now available from cloud API providers in various sizes and configurations. While this diversity offers a broad spectrum of choices, effectively leveraging the options to optimize computational cost and performance remains challenging. In this work, we present Automix, an approach that strategically routes queries to larger LMs, based on the approximate correctness of outputs from a smaller LM. Central to Automix are two key technical contributions. First, it has a few-shot self-verification mechanism, which estimates the reliability of its own outputs without requiring extensive training. Second, given that self-verification can be noisy, it employs a POMDP based router that can effectively select an appropriately sized model, based on answer confidence. Experiments across five language models and five challenging datasets show that Automix consistently surpasses strong baselines, reducing computational cost by over 50% for comparable performance.

Motivation & Objective

  • Address the challenge of efficiently leveraging diverse, black-box LLM APIs without access to model weights, gradients, or logits.
  • Reduce computational cost by identifying and avoiding routing unsolvable queries to larger models.
  • Improve reliability of self-verification, which can be noisy, through a meta-verifier mechanism.
  • Introduce a novel metric, Incremental Benefit Per Unit Cost (ibc), to quantify efficiency in model mixing.
  • Enable effective model switching in low-data regimes where training specialized verifiers is impractical.

Proposed method

  • Uses few-shot prompting to perform context-grounded entailment as a self-verification mechanism, assessing answer correctness against input context.
  • Employs a POMDP-based meta-verifier to evaluate the reliability of the initial self-verification, reducing noise in routing decisions.
  • Routes queries to a larger language model only when the self-verification is uncertain or negative, based on meta-verifier output.
  • Introduces a three-class routing decision: accept answer (correct), reject and route (incorrect/uncertain), or flag as unsolvable.
  • Operates entirely with black-box API access, requiring no fine-tuning, model weights, or logit access.
  • Leverages context-grounded verification to detect inconsistencies between generated answers and input context without human-annotated data.
Figure 1 : AutoMix : Given a context (like an article) and a question $q$ , an initial answer ( 1890 AD ) is generated with the smaller language model ( SLM ). The answer is self-verified by the SLM , yielding a noisy verification score. The Meta-Verifier subsequently assesses verifier’s results. Ba
Figure 1 : AutoMix : Given a context (like an article) and a question $q$ , an initial answer ( 1890 AD ) is generated with the smaller language model ( SLM ). The answer is self-verified by the SLM , yielding a noisy verification score. The Meta-Verifier subsequently assesses verifier’s results. Ba

Experimental results

Research questions

  • RQ1Can few-shot self-verification using context-grounded entailment reliably assess answer correctness in reasoning tasks without access to model weights?
  • RQ2How effective is a meta-verifier in reducing noise from unreliable self-verification outputs in a black-box LLM setting?
  • RQ3Can AutoMix achieve superior cost-performance trade-offs compared to baselines in low-data and high-computation scenarios?
  • RQ4What is the impact of introducing an 'unsolvable' category on computational efficiency and routing accuracy?
  • RQ5How does AutoMix perform relative to trained verifiers when only limited data (e.g., 200 samples) is available for meta-verifier training?

Key findings

  • AutoMix improves the incremental benefit per unit cost (ibc) by up to 89% compared to established baselines on five context-grounded reasoning datasets.
  • With limited training data (under 2000 samples), AutoMix significantly outperforms FrugalGPT, even though FrugalGPT uses domain-specific training and has zero verifier cost.
  • The meta-verifier enhances routing accuracy by refining noisy self-verification outputs, demonstrating robustness even when the initial verifier is weak.
  • Few-shot self-verification effectively detects answer inconsistencies with context, especially in cases involving factual mismatches (e.g., 'desert animals' in an 'aquatic life' context).
  • AutoMix maintains strong performance in low-data regimes, showing promise for real-world deployment where labeled data is scarce.
  • The inclusion of an 'unsolvable' category prevents unnecessary routing to larger models, reducing computational waste on inherently intractable queries.
Figure 4 : Left: Aggregated performance vs. cost for different methods on the small and large LLaMa2-13/70b . POMDP based meta-verifier is consistenly in the green region, signifying a higher Incremental Benefit per Cost ( ibc ). Right: The accuracy of the meta-verifier for both POMDP and Verifier-S
Figure 4 : Left: Aggregated performance vs. cost for different methods on the small and large LLaMa2-13/70b . POMDP based meta-verifier is consistenly in the green region, signifying a higher Incremental Benefit per Cost ( ibc ). Right: The accuracy of the meta-verifier for both POMDP and Verifier-S

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.