arXiv:2608.30258cs.CLAug 2026

Manuscript Offprint

arXiv:2608.30258

Stratified Consistency Distillation for Natural Language Formalization

Zhichao Hou, Ferhat Erata, Joe Lilien, MohamadAli Torkamani

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Neurosymbolic reasoning has shown promising success in addressing complex reasoning tasks by combining large language models (LLMs) and symbolic solvers. While this approach shows promise, a fundamental challenge remains: improving the accuracy of translations from natural language to logical formulas. Current methods predominantly rely on prompt engineering, which is difficult to scale across different domains and input formats. Drawing inspiration from the success of fine-tuning in other model adaptation and alignment applications, we propose a fine-tuning-based Stratified Consistency Distillation approach: (1) We generate K logical translations per input using a frontier LLM and cluster them by semantic equivalence (2) Based on the entropy level, we apply majority voting (low entropy), LLM-as-a-Judge (medium entropy), or unification/abstention (high entropy), and (3) fine-tune a smaller model using the selected pseudo-labels. Our experiments show significant and consistent improvements in both Pass@K and our novel Equivalent Logical Similarity metrics, demonstrating the potential of advancing logical translation through consistency distillation.

1 Introduction

Large Language Models (LLMs) have become a cornerstone technology for building customer-facing chatbot systems, enabling natural, context-aware, and highly interactive conversations across diverse application domains. Despite their impressive capabilities, LLMs are inherently prone to hallucinations—the generation of factually incorrect or logically inconsistent outputs—which may directly contradict authoritative source-of-truth documents. Such errors can be catastrophic in high-stakes domains such as compliance, pricing, and regulations, where a single incorrect response may result in financial loss, legal liability, or reputational damage.

A principled way to ensure the logical soundness and policy compliance of chatbot responses is to convert human-written natural language into verifiable formal representations (e.g., SMT-LIB) and to verify their correctness using automated reasoning tools such as the Z3 solver. This leads us to a fundamental research question in the emerging field of LLM reasoning and autoformalization:

Can LLMs accurately understand human-written natural language and translate it into formal logical formulas that can be verified by a symbolic solver?

Recent advances in frontier LLMs (OpenAI & et al., 2024; Anthropic, 2024; Team & et al., 2024)—empowered by few-shot in-context learning and chain-of-thought prompting (Fu et al.,

∗^{*}Corresponding author.

Preprint.

2023; Wei et al., 2023)—have demonstrated remarkable capabilities in such translation tasks. However, prompt-based approaches using frontier LLMs face two major limitations: (1) Frontier models are extremely large, with parameter counts ranging from 70B to over 500B, leading to high inference latency and prohibitive computational cost; and (2) These models are generally closed-source and only available through black-box APIs, preventing fine-tuning and constraining performance improvements beyond prompt engineering.

To address these limitations, we propose a systematic and scalable framework—Stratified Consistency Distillation—for translating policy-governed natural language into formal logic, which distills the reasoning and translation capabilities of a frontier LLM into a smaller, more efficient open-source language model. Our main contributions are summarized as follows:

• Synthetic Dataset Generation from Policy Documents. We design a robust pipeline to automatically extract domain-relevant rules from unstructured policy documents and generate aligned natural language–SMT-LIB training pairs, enabling scalable data creation without manual annotation.

• Stratified Consistency Distillation (SCD). We introduce a novel distillation strategy that leverages semantic equivalence clustering and entropy-based stratification to selectively transfer knowledge from a high-capability frontier LLM into a smaller LM, preserving logical consistency while reducing inference cost.

• Comprehensive Evaluation and Analysis. We conduct extensive experiments across multiple policy-driven reasoning benchmarks. Our method achieves substantial improvements in logical translation accuracy over both prompt-based frontier LLM approaches and fine-tuned baselines, while offering 5×−20×5 \times -20 \times lower inference cost.