Abstract
Chain-of-Thought (CoT) reasoning has significantly improved the performance of Large Language Models (LLMs) on complex logical tasks. However, this improvement comes at the cost of increased verbosity, leading to higher inference latency and computational expense. We introduce SPIRIT (Stepwise Perplexity-GuIded Refinement), a novel framework designed to identify and prune redundant reasoning steps. By using perplexity (PPL) as a metric for step importance, SPIRIT optimizes CoT prompts and fine-tuning data, allowing models to maintain high reasoning accuracy while significantly reducing token counts.
Introduction
While CoT reasoning allows LLMs to break down problems into intermediate steps, many of these steps are often redundant or serve as "filler." The challenge lies in the fact that the importance of a reasoning step is model-dependent; a logical bridge necessary for a smaller model might be trivial for a larger one. Existing methods to reduce verbosity, such as simple "be concise" prompting, often result in significant accuracy degradation. SPIRIT addresses this by providing a principled, model-aware approach to reasoning efficiency.
Methodology: The SPIRIT Framework
SPIRIT leverages Perplexity (PPL) to quantify the importance of individual reasoning steps. The core intuition is that if removing a specific step causes a sharp increase in the model's surprise (perplexity), that step likely contains critical logical information.
The framework operates through two primary modes:
- SPIRIT-FS (Few-Shot): Refines demonstration examples in a prompt by iteratively removing steps that result in the lowest average PPL across a calibration set.
- SPIRIT-FT (Fine-Tuning): Refines training datasets by applying thresholds to decide whether a step should be deleted, merged, or retained.
The Merge Mechanism
A critical innovation in SPIRIT is the "Merge" mechanism. Rather than simple deletion, which can break logical coherence, SPIRIT uses a capable LLM to combine wordy or intermediate steps into more concise, logically equivalent expressions.
Experimental Evaluation
The authors evaluated SPIRIT on several reasoning benchmarks, including the DeepMind Mathematics Dataset (AL1 and NBC tasks), GSM8K, and MetaMathQA. Testing was conducted across a diverse set of models, including LLaMA-3/3.1 (8B and 70B), Qwen-2.5-7B, GPT-3.5-Turbo, and GPT-4o-mini.
Performance and Efficiency Gains
SPIRIT demonstrates a superior ability to navigate the Pareto frontier between accuracy and efficiency. In few-shot scenarios on the AL1 task, SPIRIT reduced the reasoning process from seven steps to four. For LLaMA-3.1-70B, this resulted in a 32% reduction in generated tokens while maintaining 99.2% accuracy.
Key Insights
- PPL as a Logic Proxy: There is a strong negative correlation between PPL spikes (upon step removal) and final accuracy, validating PPL as a reliable signal for reasoning importance.
- The Transferability Paradox: Interestingly, using a stronger model (e.g., LLaMA-3.1-70B) to calculate PPL and refine data for a weaker model often yields better results than using the weaker model's own metrics, likely due to the "cleaner" logical signal provided by the larger model.
- Coherence and Merging: The merging strategy is vital. Simply deleting steps often leads to logical "hallucinations" or jumps that confuse the model.
Conclusion and Future Work
SPIRIT provides a robust, automated method for making CoT reasoning more efficient without sacrificing performance. While currently focused on structured mathematical reasoning, future work could extend this perplexity-guided approach to more unstructured domains like legal or ethical reasoning. Additionally, exploring dynamic, "on-the-fly" refinement during the generation process remains a promising avenue for further reducing inference costs.
Summary updated