arXiv:2611.03641cs.AINov 2026

Manuscript Offprint

arXiv:2611.03641

From Natural Language to Exact Cover: A Neuro-Symbolic Approach to Zebra Puzzles

Paulius Skaisgiris, Thomas Pammer, Veronika Semmelrock, Mykyta Ielanskyi, Maximilian Heisinger, Erich Kobler

Paulius Skaisgiris*

Institute of Logic and Computation, TU Wien, Austria

PAULIUS.SKAISGIRIS@TUWIEN.AC.AT

Thomas Pammer*

Institute for Application-Oriented Knowledge Processing, JKU Linz, Austria

TPAMMER@FAW.JKU.AT

Veronika Semmelrock

Department of Artificial Intelligence and Cybersecurity, University of Klagenfurt, Austria

VERONIKA.SEMMELROCK@AAU.AT

Mykyta Ielanskyi

Institute for Machine Learning, JKU Linz, Austria

IELANSKYI@ML.JKU.AT

Maximilian Heisinger†

Institute for Symbolic Artificial Intelligence, JKU Linz, Austria

MAXIMILIAN.HEISINGER@JKU.AT

Erich Kobler†

Institute for Machine Learning, LIT AI Lab, Department of Virtual Morphology, Clinical Research Institute Medical AI, JKU Linz, Austria

ERICH.KOBLER@JKU.AT

Editors: Alessandra Mileo, Andrea Passerini and Cogan Shimizu

Abstract

Chain-of-Thought (CoT) generation has substantially improved the performance of Large Language Models (LLMs) on complex reasoning tasks, including code generation, data analysis, and exam-style question answering. Despite these advances, purely neural LLMs continue to struggle with elementary logical reasoning problems and lack the determinism, soundness, and reliability characteristic of symbolic reasoning systems. Conversely, classical symbolic methods such as SAT solving and exact cover guarantee correctness and completeness, but require problems to be expressed in highly specialized formal encodings, limiting their applicability to natural language inputs. In this work, we present a synergistic neuro-symbolic framework that bridges this gap by combining neural semantic parsing with deterministic exact cover reasoning. Given a Zebra-style logic puzzle in natural language, an LLM translates entities and constraints into structured tool calls that construct an exact cover instance. A symbolic solver then computes the solution and provides feedback to iteratively refine invalid, under- or overconstrained encodings, exploiting the uniqueness property of Zebra puzzles. We conduct a comprehensive empirical evaluation across multiple parameter scales, post-training paradigms, and LLM families. The results demonstrate that our hybrid approach consistently outperforms strong plain neural baselines, including CoT prompting, as well as recent neuro-symbolic methods.¹

  • Equal contribution

† Equal supervision

  1. Code is available at https://codeberg.org/bilai-ss25-booleguru-llm/zebrallm.

© 2026 P. Skaisgiris, T. Pammer, V. Semmelrock, M. Ielanskyi, M. Heisinger & E. Kobler.

1. Introduction

Constraint Satisfaction Problems (CSPs) lie at the core of many real-world decision-making tasks, including scheduling, planning, resource allocation, and configuration, making them a fundamental abstraction in AI research (Russell and Norvig, 1995; Mackworth, 1977; Nadel, 1989; Knuth, 2016, 2020, 2025). While symbolic methods such as SAT and constraint solvers can guarantee correctness and completeness, their practical deployment critically depends on constructing effective formal encodings – a process that remains difficult even for domain experts (Heisinger et al., 2024). Translating informal problem descriptions into a structured encoding requires substantial modeling expertise as small representational choices can dramatically impact solver performance and tractability. As a result, research often studies simplified yet representative proxy domains such as logic puzzles (e.g. Sudoku or Zebra Puzzles), which capture essential combinatorial and relational reasoning challenges while providing clean semantics, controllable complexity, and objectively verifiable solutions (Dechter and Pearl, 1987; Prosser, 1993; Lin et al., 2025; White et al., 2025).

This reliance on structured benchmark domains aligns naturally with recent advances in Large Language Models (LLMs), which are increasingly applied to tasks requiring the construction of structured symbolic solutions from unstructured inputs. Such domains include mathematical reasoning (Hendrycks et al., 2021b), programming (Hendrycks et al., 2021a), planning (Zhang et al., 2026), and logic puzzle solving (Lin et al., 2025; Chollet et al., 2025). A shared characteristic of these problems is that, although discovering solutions is challenging, their correctness can be verified algorithmically. Reinforcement learning with verifiable rewards post-training has therefore emerged as a standard approach for optimizing models directly against symbolic verifiers (Guo et al., 2025). The resulting thinking LLMs produce Chain-of-Thought (CoT) reasoning traces enabling inference-time scaling.

Zebra Puzzles are among recent benchmarks to test the reasoning capabilities of LLMs (Lin et al., 2025; White et al., 2025). They consist of lists of entities, properties, and attributes as well as clues; the goal is to infer the relations of attributes and entities from the given information. Lin et al. (2025) find that scaling the model size does not help beyond a certain level of complexity which is defined by the puzzles' solution space. This manifests in generalist LLMs faring extremely well on simple Zebra Puzzles while struggling with more complex ones. Longer reasoning traces appear to be more helpful with these problems than larger models. However, these longer traces present additional challenges such as high frequency noise (Radler et al., 2025) and increased chance of hallucination (Mei et al., 2025).

To address the reasoning limitations of purely neural models, recent neuro-symbolic approaches increasingly combine LLM-based semantic parsing with symbolic solvers to enforce logical consistency (Dinu et al., 2024). Prior work explores both agentic formulations that iteratively generate solver-compatible programs and solver-centric pipelines that translate natural language inputs into formal constraint specifications solved using SAT, SMT, CSP, or ASP techniques (Szeider, 2025; Pan et al., 2023; Ye et al., 2023; Eiter et al., 2025). Notably, Logic.py (Kesseli et al., 2025) translates natural language into a domain-specific representation solved by an exact constraint solver, incorporating iterative error feedback to the LLM. This coupling of semantic parsing and symbolic solving consistently outperforms LLMs on Zebra Puzzle-style benchmarks.

Figure

Figure 1: Visualization of NEURALEXACTCOVER. A puzzle instance is combined with our prompt template and processed by an LLM that harmonizes attributes, extracts entities and clues, and translates clues into an exact cover encoding. The symbolic MINIEXACT solver then solves the encoding and provides iterative feedback on failures to refine the generated tool calls. This loop continues until a unique solution is found or the retry limit is reached, after which the solution is converted into plain text.

In this work, we present an integrated neuro-symbolic framework called NEURALEXACT-COVER that combines LLM-based semantic parsing with deterministic exact cover solving for reliable logical reasoning over plain text Zebra-style puzzles. Our main contributions are as follows:

  • We introduce and adapt an exact cover encoding for efficient symbolic solving of Zebra-style logic puzzles.
  • We introduce a neuro-symbolic framework that leverages LLMs as a translation layer for an exact cover solver and re-applies symbolic results as feedback to the LLM.
  • We introduce the ZebraExtreme dataset, extending ZebraLogic (Lin et al., 2025) with even more challenging problems of size up to 8×108 \times 10 entities and properties.

References (31)