TL;DR
LaRS (Latent Reasoning Skills) is a new unsupervised method for selecting the best few-shot examples for Chain-of-Thought (CoT) prompting. By using a Conditional Variational Auto-Encoder (CVAE) to discover "latent reasoning skills" within rationales, it outperforms state-of-the-art selection methods while being four times faster and significantly cheaper to run.
What Problem Does This Paper Address?
Chain-of-Thought (CoT) prompting has revolutionized how Large Language Models (LLMs) handle complex reasoning by providing step-by-step "rationales" in few-shot examples. However, the performance of CoT is highly sensitive to which examples you choose.
Most traditional methods select examples based on question similarity—if the input question is about birds, find other questions about birds. The problem? Two questions might look similar but require completely different logic (e.g., one needs addition, the other subtraction).
Existing "skill-based" selection methods try to fix this by labeling the reasoning skills required (like "multi-step addition"). But these methods usually require human experts to write skill descriptions or expensive LLM calls to generate them for every example in a bank. LaRS aims to solve this by discovering these skills automatically and efficiently through unsupervised learning.
Methods
The core of LaRS is the Latent Skill Model, which treats reasoning skills as latent variables ($z$) in a generative process. The authors implement this using a Conditional Variational Auto-Encoder (CVAE).
The process happens in two stages:
- Pre-processing (Training): The model learns three components using a small subset of an example bank:
- Reasoning Skill Encoder: Maps a question-rationale pair to a latent skill $z$.
- Reasoning Policy: Predicts the required skill $z$ given only a question $Q$.
- Decoder: An auxiliary module that reconstructs the rationale to ensure the latent space actually captures meaningful reasoning information.
- Selection (Inference): For a new test question, the Reasoning Policy predicts the "desirable" skill. LaRS then searches the example bank for demonstrations whose rationales most closely match that latent skill using cosine similarity.
Crucially, LaRS operates on embeddings from off-the-shelf models (like DeBERTa), making the CVAE extremely lightweight (just two-layer MLPs) compared to prompting a massive LLM for every selection.
Datasets
The authors evaluated LaRS across four diverse reasoning benchmarks:
- TabMWP: Mathematical reasoning involving both text and tables.
- GSM8K: Grade school math word problems.
- Spider: A complex text-to-SQL dataset.
- COGS: A synthetic benchmark for semantic parsing and compositional generalization.
They tested these against a range of backbone LLMs, including GPT-4o, GPT-3.5-Turbo, Claude 3 (Sonnet and Haiku), and Falcon-40B-Instruct.
Key Insights and Ideas
- Rationales > Questions: The paper proves (both theoretically and empirically) that aligning the logic of examples to the query is far more important than aligning the topic of the question.
- Unsupervised "Aha" Moments: Even without human labels, the latent space learned by the CVAE naturally clusters into human-interpretable skills. As shown in the t-SNE projections, LaRS separates different types of math operations much more cleanly than raw question embeddings.
- Theoretical Optimality: The authors provide a formal proof showing that under ideal conditions, skill-based selection allows an LLM to approximate the optimal conditional distribution for generating correct rationales.
- Robustness to "Noise": LaRS is significantly more robust to sub-optimal example banks. If 30% of your example bank contains incorrect rationales, traditional methods might still pick them based on question similarity. LaRS, by looking at the latent skill of the rationale, is better at filtering out these low-quality demonstrations.
Key Results
- Performance: LaRS outperformed the previous state-of-the-art (Skill-KNN) in 18 out of 20 experimental setups.
- Efficiency: It processed example banks 4x faster than LLM-based methods and reduced the cost per query by over 100% because it eliminates the need for auxiliary LLM inferences during the selection stage.
- Cost Savings: For a standard 1k example bank, LaRS saves roughly $30 in API costs and 1.5 hours of pre-processing time compared to Skill-KNN.
Limitations and Future Work
While powerful, LaRS has a few areas for improvement:
- Example Ordering: The current method selects the best $k$ examples but doesn't consider the order in which they appear in the prompt, which is known to affect LLM performance.
- Single-Skill Assumption: The model currently maps a rationale to a single latent skill. However, complex problems often require a sequence of different skills. The authors suggest that learning skills for individual reasoning steps is a promising future direction.
- Decoder Architecture: The decoder is currently a simple MLP; the authors note that using a prompt-tuning module might align even better with how LLMs actually use these skills.
Summary updated