LaRS: Latent Reasoning Skills for Chain-of-Thought Reasoning

Zifan Xu, Haozhu Wang, Dmitriy Bespalov, Xian Wu, Peter Stone, Yanjun Qi

Abstract

LaRS (Latent Reasoning Skills) is an unsupervised framework that automatically discovers the underlying logic required for complex reasoning tasks. By mapping questions and their step-by-step rationales into a latent space, LaRS selects the most effective in-context examples for Chain-of-Thought (CoT) prompting. It outperforms state-of-the-art methods while being significantly faster and cheaper to run.

Introduction: The Challenge of Example Selection

Chain-of-Thought (CoT) prompting has significantly advanced the capabilities of Large Language Models (LLMs) in handling complex tasks by providing few-shot examples with intermediate reasoning steps. However, the effectiveness of CoT is highly dependent on the choice of these examples.

Traditional methods often rely on "Retrieval-Q," which selects examples based on the similarity of the question text. This approach is flawed because questions with similar surface-level descriptions may require entirely different logical operations. For instance, a question about birds on a tree might require addition in one context and subtraction in another. Selecting based on question similarity alone can lead to "skill mismatching," where the LLM is provided with an incorrect logical template.

Figure 1: Comparison between question-similarity-based selection (a) and skill-matching selection (b). Question similarity can lead to incorrect logic (subtraction instead of addition), whereas skill matching identifies the underlying 'addition' skill.

Methodology: Latent Reasoning Skills (LaRS)

To address these limitations, the authors propose LaRS, which treats reasoning skills as latent variables discovered through unsupervised learning. Unlike previous methods that require expensive LLM calls to label skills, LaRS uses a lightweight architecture.

The CVAE Framework

The core of LaRS is a Conditional Variational Auto-Encoder (CVAE) that learns a latent space of reasoning skills:

  1. Encoder: Maps (Question, Rationale) pairs from an example bank into a latent skill vector $z$.
  2. Reasoning Policy: Learns to predict the required skill vector $z$ from the input question alone.
  3. Skill-Based Selection: At inference time, the model predicts the skill needed for a new query and retrieves examples from the bank whose rationales most closely match that predicted skill in the latent space.
Figure 2: The LaRS framework overview. The pre-processing stage uses a CVAE to encode rationales into a latent space, while the selection stage uses a reasoning policy to predict skills for new queries.

Evaluation and Results

LaRS was evaluated across four diverse benchmarks—TabMWP, GSM8K, Spider, and COGS—using five different backbone LLMs, including GPT-4o and Claude 3.

Key Findings

  • Superior Performance: LaRS outperformed the previous state-of-the-art (Skill-KNN) in 18 out of 20 experimental settings.
  • Efficiency and Cost: The framework processed example banks 4x faster than LLM-based labeling methods and significantly reduced costs by eliminating the need for auxiliary LLM inferences during pre-processing.
  • Emergent Alignment: t-SNE visualizations revealed that the unsupervised latent clusters align closely with human-annotated logical categories, such as "rate of change" or "searching minimum/maximum."
  • Robustness: LaRS proved more resilient to "noisy" or sub-optimal rationales in the example bank compared to question-similarity methods.

Conclusion and Future Work

LaRS demonstrates that reasoning skills can be effectively modeled as latent variables without human supervision or expensive LLM labeling. While highly effective, future iterations could improve by accounting for example ordering in prompts and modeling multi-step skills for more complex problems.

Summary updated

BibTeX
@inproceedings{xu2024lars,
  author = {Zifan Xu and Haozhu Wang and Dmitriy Bespalov and Xian Wu and Peter Stone and Yanjun Qi},
  title = {{LaRS: Latent Reasoning Skills for Chain-of-Thought Reasoning}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.206},
}
Figure