LLMSR @ XLLM 25: SWRV : Empowering Self-Verification of Small Language Models through Step-wise Reasoning and Verification (2025)

Abstract: Large language models (LLMs) have shown impressive reasoning capabilities through Chain-of-Thought (CoT). However, the reasoning processes remain inexplicable and uncontrollable. In this paper, we tackle the task hosted by (CITATION) by introducing a (SWRV) framework, a two-stage Parser–Verifier one, that decomposes generated reasoning process into discrete inference steps and rigorously validates each one. First, our Parser extracts problem constraints and the sequence of reasoning steps from the LLM’s reasoning process. Then, our Verifier prompts itself or leverages a deterministic symbolic solver to formally check the logical correctness of every step. To ensure robust parsing, we also fine‐tune a compact LM on a small, high‐quality annotation set produced by a more powerful LLM. Experiments on the dataset (CITATION) demonstrate significant gains over baseline approaches, illustrating the effectiveness of our method for step‐wise analysis of LLM chain-of-thought reasoning. The code is publicly available at https://github.com/Teganone/XLLM_LLMSRhttps://github.com/Teganone/XLLM_LLMSR.

## introduction large language models (llms) have propelled significant advances in natural language processing, yet they continue to struggle with tasks that demand precise multi-step logical reasoning-especially those involving multiple constraints, nested subproblems, or domain-specific knowledge. while recent developments in chain-of-thought (cot) prompting have enhanced llm inference and reasoning abilities, the resulting chains of reasoning often lack reliability and interpretability. this can severely hinder downstream performance, as models fail to consistently apply logical rules or verify intermediate steps @xcite . recent work has demonstrated that very large llms (openai, 2024) are capable of self-correcting their outputs through iterative refinement, ushering in a new paradigm for improving model reliability. however, such performance typically depends on massive model sizes and extensive training data, rendering these methods impractical in resource-constrained scenarios. more 1 code is publicly available at https://github.com/teganone/xllm_llmsr . pertinently, @xcite found that, for smaller models, overall reasoning performance is bottlenecked not by the ability to refine answers but by the weakness of the verifier module itself. this insight underscores the pressing need for robust, fine-grained self-verification, particularly in settings where only compact models and small-scale annotated data are available. despite this, most existing approaches focus on validating the entire cot holistically, without systematically analyzing the validity of individual reasoning steps. this drives our exploration of step-level reasoning verification methods for small language models. in this work, we propose swrv, a stronger step-wise self-verification framework as shown in figure 1 for small lms (i.e., llama-3-8b-instruct) using minimal data. in the framework, we perform fine-grained question and cot analysis to verify each individual inference step within the following pipeline. we first prompt llama-3-8b-instruct to produce cots for logiqa @xcite questions, then conduct fine-grained parsing of each question and each cot reasoning step, followed by rigorous verification. for the parser module, we employ rule-based prompting of the small lm and fine-tuning using annotations generated by lm. for verifier, in addition to lm-based inference, we integrate a deterministic symbolic solver z3 by translating the problem and reasoning steps into symbolic formulas and performing formal inference. our method aims to deliver a fine-grained, precise self-verifier that improves the self-correction and reasoning ability of small lms and enables more granular process-level reward modeling. figure 1 : overview of our swrv framework. ## problem formulation of self-verification as illustrated in figure 1 , we equip a language model with fine-grained self-verification by decomposing its reasoning process into two complementary modules: i) step-wise reasoning parsing, in which both the question and its cot are parsed into elementary units; and ii) step-wise reasoning verification, in which each inferred unit is rigorously checked for logical validity. ## methodology as shown in figure 2 , the inputs for our framework consist of a natural language logical reasoning question q, along with the chain-of-thought cot genearted by prompting lm to solve the question q. our goal is to parse q into separate conditions qp and the entire cot into separate reasoning steps, each step composing a statement and evidence r, and verify the correctness v of each step. hence, the final output of each pair of inputs consists of the following elements: to achieve this end-to-end pipeline, our swrv framework is organized into two complementary components. the parser module comprises i) a question parser submodule that ingests q and extracts the individual conditions c i , and ii) a cot parser submodule that partitions the cot into discrete inference steps (s i , e i ). the verifier module then takes these parsed outputs, uses a symbolic formulator to translate both the set of conditions {c i } and each pair (s i , e i ) into formal logical expressions, and employs an smt-based checker (implemented with the z3 solver) to deterministically determine the validity of each inference. by pipelining parsing and verification, our framework delivers a finely grained, formally certified assessment of the entire reasoning trajectory. ## results ## conclusion the paper presents swrv, a two-stage parser-verifier framework specifically designed for small lms and limited data to parse and verify every step in the reasoning process. by decomposing problems in a fine-grained manner and complementing this with a verification mechanism based on symbolic solving, the method significantly enhances the accuracy and robustness of small lms in logical reasoning tasks. future work may explore the expansion of annotated datasets, thereby optimizing the fine-tuning of the parser. besides, further refinement of natural-to-symbolic translation methods, could also be explored to fortify verification module in diverse reasoning scenarios. question:there are seven recruits recruited at a university? f, g, h, i, w, x, and y.one of them is a communications soldier, three are engineering soldiers, and the other three are transport soldiers.the conditions for the assignment of recruits to the army are as follows? h and y must be assigned to the same arm.f and g cannot be assigned to the same arm.if x is assigned as a transport soldier, then w is assigned as an engineering soldier.assign f as an engineering soldier. if x is not assigned as an engineer, which of the following statements may be true? a.w and g are assigned as engineering soldiers b.h and w are assigned as transport soldiers. c.f and y are assigned as engineering soldiers d.h and w are assigned as engineering soldiers" cot: since x is not assigned as an engineer, it must be assigned as a communications soldier or a transport soldier. if x is a transport soldier, then w is an engineering soldier, and h and y must be assigned to the same arm. however, f and g cannot be assigned to the same arm, so f must be an engineering soldier. this means that h and y are assigned to the same arm, which is the transport arm. therefore, h and w are assigned as transport soldiers.