TLDR: A new framework called Text-JEPA, inspired by human dual-process thinking, efficiently converts natural language into formal logic. Paired with the Z3 solver for robust reasoning, this lightweight system improves question-answering in specialized fields by providing accurate answers with transparent, explainable logic, outperforming larger AI models in conversion quality and generalization.
Recent advancements in large language models (LLMs) have significantly boosted their ability to answer questions, especially in broad, open-ended topics. However, in specialized fields like education, healthcare, or law, users need more than just accurate answers; they demand clear reasoning and transparent decision-making processes. Traditional LLMs often struggle to provide this level of explainability, which is crucial in high-stakes environments.
This challenge aligns with the dual-process theory of human cognition, which suggests we have two systems for thinking: System 1, which is fast, intuitive, and heuristic, and System 2, which is slow, analytical, and logical. Effective AI systems, particularly in critical domains, need reasoning capabilities similar to System 2.
To address this, researchers have turned to Neural-Symbolic (NeSy) approaches, which combine the flexibility of deep learning with the rigor of symbolic reasoning. These methods typically involve converting natural language into formal logic representations, such as First-Order Logic (FOL), which can then be processed by theorem provers or constraint solvers. While promising, existing NeSy systems often rely on large, resource-intensive models and face difficulties in efficiently translating natural language into precise formal logic.
Introducing Text-JEPA: Bridging Language and Logic
A new research paper, titled “Speaking in Words, Thinking in Logic: A Dual-Process Framework in QA Systems,” introduces Text-JEPA (Text-based Joint-Embedding Predictive Architecture). This innovative framework is designed to be lightweight yet highly effective at converting natural language into First-Order Logic (NL2FOL). Text-JEPA draws inspiration from the dual-system cognitive theory, emulating System 1 by efficiently generating logic representations.
For the analytical and logical reasoning part, the framework integrates the Z3 solver, a high-performance satisfiability modulo theories (SMT) engine. The Z3 solver operates as System 2, enabling robust logical inference and making it suitable for complex domains like law and education where precise validation is essential.
The overall architecture of this QA system involves two main stages: a Conversion Phase, where Text-JEPA transforms natural language inputs (rules, facts, and queries) into FOL expressions, and a Reasoning Phase, where these FOL representations are translated into Z3-compatible syntax and processed to derive logical outcomes.
Evaluating the NL2FOL-to-Reasoning Pipeline
To rigorously assess the quality of this NL2FOL-to-reasoning pipeline, the researchers proposed a comprehensive evaluation framework with three custom metrics:
- Conversion Score: This metric quantifies the quality of the NL2FOL conversion, considering syntactic correctness, semantic alignment of predicates, and logical equivalence between the generated and ground-truth FOL.
- Reasoning Score: This measures the accuracy of the automated inference using the converted FOL, assigning scores based on correctness, partial credit for logically valid but incorrect predictions, and zero credit for syntactic failures.
- Spearman Rho Score: This correlation coefficient evaluates the relationship between the conversion quality and the downstream reasoning performance, indicating how closely the structural and semantic quality of the generated FOL impacts the effectiveness of logical reasoning.
Also Read:
- Neuro-Symbolic AI Learns to Simplify Complex Formulas with Enhanced Efficiency
- A New Framework for Personalized AI: Dialogical Large Language Models
Experimental Insights and Future Directions
Empirical results on domain-specific datasets, including MALL and FOLIO, demonstrate that Text-JEPA achieves competitive performance with significantly lower computational overhead compared to larger LLM-based systems like Gemini. Text-JEPA showed superior generalization, especially on out-of-domain datasets, and maintained high stability across different prompting strategies.
When Text-JEPA is combined with the Z3 symbolic reasoner, the system delivers competitive entailment performance, validating the benefits of explicit intermediate representations. The findings highlight the potential of structured, interpretable reasoning frameworks for building efficient and explainable QA systems in specialized domains.
However, the research also points out limitations. Strong sentence-level conversion performance doesn’t always translate to effective paragraph-level reasoning, as the model converts NL to FOL at the sentence level, while reasoning often requires coherence across multiple sentences. This suggests a need for future work to assess conversion quality at the paragraph level and develop evaluation protocols that better reflect real-world deployment scenarios where semantic coherence and structural consistency are crucial.
This work underscores the value of combining the flexibility of neural models with the rigor of symbolic inference to create QA systems that are not only accurate but also transparent and explainable. For more details, you can read the full research paper: Speaking in Words, Thinking in Logic: A Dual-Process Framework in QA Systems.


