acceptodds
Under review as a conference paper at ICLR 2027

Auto-Formalizing Neuro-Symbolic Predictors

Abstract

Neuro-Symbolic (NeSy) predictors incorporate prior knowledge into the prediction process of neural networks, ensuring that outputs satisfy specified constraints, making them particularly suitable for high-stakes applications where compliance with domain knowledge is essential. A key bottleneck in this paradigm is the acquisition of symbolic constraints: encoding domain knowledge into logical formulas remains a manual and expert-intensive process. In this work, we investigate the extent to which auto-formalization via LLMs can systematically translate textual knowledge into symbolic knowledge that can be plugged into NeSy predictors. To this end, we introduce auto-nesy-bench, a new benchmark for evaluating constraint formalization and its impact on downstream accuracy of NeSy predictors. Through an extensive evaluation across several domains, we find that LLMs can formalize constraints to a meaningful extent, generating formulas that are often similar to those provided by human experts. Moreover, when the generated formulas are syntactically valid, they can lead to high-quality downstream predictions.

Primary area:
neurosymbolic & hybrid AI systems (physics-informed, logic & formal reasoning, etc.)
Keywords:
Neuro-Symbolic AI, Neuro-Symbolic predictors, Auto-formalization, Large Language Models

Reviews

Among:
Shape:
1234this paper, Top 30%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.67 over 3 reviews, above 70% of the others.
Reviewer_avwCOpenReview ↗
Rating
3
Confidence
3
Informativeness
3
Presentation
3
Soundness
2
Read review
Paper summary

This paper studies whether LLMs can automatically translate natural-language domain knowledge into propositional constraints that can be used by Neuro-Symbolic (NeSy) predictors. The authors introduce auto-nesy-bench, which evaluates the full pipeline from constraint formalization to downstream NeSy prediction. They compare different LLMs, prompting strategies, output formats, and detailed vs. non-detailed task specifications, and then integrate the generated constraints into Semantic Probabilistic Layers (SPL) and Semantic Loss. The results show that strong models can generate constraints close to expert-provided ones under suitable configurations, while different types of formalization errors have substantially different downstream effects, with overly strict constraints generally being more harmful than permissive ones.

Critical strengths
  1. The end-to-end evaluation provides meaningful practical validation. The paper goes beyond standalone natural-language-to-constraint evaluation by actually integrating LLM-generated constraints into SPL and Semantic Loss. This allows the authors to study whether and how formalization errors affect downstream NeSy performance. The finding that strict, permissive, and incomparable errors have different downstream consequences shows that formula-level similarity alone is insufficient to evaluate practical utility, and I view this as the most important contribution beyond existing constraint-generation benchmarks.

  2. The benchmark and evaluation methodology are broad and carefully designed. The paper systematically compares multiple LLMs, prompting strategies, five output formats, and different levels of specification detail. It also evaluates formulas semantically through model counting and introduces metrics such as REL, MC-R, and consistency to characterize different types of errors. Overall, the experimental coverage and reproducibility are strong.

Critical weaknesses
  1. The remaining headroom of auto-nesy-bench on current frontier models is unclear. The paper already shows that, under suitable prompting and output configurations, the strongest evaluated open-weight models achieve nearly saturated performance on auto-nesy-bench (e.g., F1 scores around 0.99). For a benchmark paper, it is therefore important to understand whether stronger current frontier models can already solve most of these tasks almost perfectly. I understand that a full evaluation of expensive frontier models may not be practical, but even a small-scale sanity check on a representative subset would help establish the benchmark’s remaining difficulty, discriminative power, and longer-term value.

  2. The scientific role of RQ2, and in particular which conclusions are LLM-specific, is not fully disentangled. RQ2 is useful for validating the practical utility of auto-formalization, but once a generated constraint is fixed, its downstream effect depends on the constraint itself rather than on whether it was produced by GPT-OSS, Qwen, a human expert, or another process. Thus, findings about strict, permissive, and incomparable constraints are closer to general observations about imperfect constraints in NeSy predictors than direct insights into LLM capability. The paper could more clearly position RQ1 as an LLM capability evaluation and RQ2 as downstream utility validation. If the goal is to characterize different LLMs, it would be useful to analyze whether models systematically differ in the types of errors they produce and the corresponding downstream risks.

Questions for authors

See Weakness

4 comments

We thank the reviewer for the constructive feedback, for recognizing the value of our findings on strict, permissive, and incomparable formulas, for appreciating the careful construction of the benchmark and pipeline, and for acknowledging our experimental effort.

We address the weaknesses and questions below.

The remaining headroom of auto-nesy-bench on current frontier models is unclear.

First, our goal is to evaluate LLMs of different sizes and capabilities, helping practitioners on a budget understand how much they can obtain from small and medium-sized models.

Second, we would like to clarify the current level of saturation. While individual configurations reach very high F1 on some tasks, the best and largest (117B) open-weight model achieves an average F1 of 0.786 on auto-nesy-bench across different configurations (Table 1), showing that auto-formalization per se is not fully solved on these tasks yet. Third, following the reviewer’s suggestion, we are evaluating frontier models. Preliminary results for GPT-6 Astra with detailed descriptions (see our response to Reviewer S2jn) show an average F1 of 0.930, beating the best open weight model. We will add results concerning non-detailed descriptions as soon as we have them. We want to remark that our plan in the future is to extend the benchmark with novel, unseen tasks at multiple levels of description detail.

The paper could more clearly position RQ1 as an LLM capability evaluation and RQ2 as downstream utility validation.

We agree. RQ1 (Section 5.1, Tables 1–3) evaluates formalization capability, isolating the effect of the LLM, prompt, and output format, while RQ2 (Section 5.2, Table 4, Section I.2.3) evaluates the downstream utility of the generated formulas. In the revision, we will state this distinction explicitly in the contributions and in Sections 5.1 and 5.2, and clarify that the RQ2 findings on strict, permissive, and incomparable formulas hold for imperfect constraints regardless of their source.

If the goal is to characterize different LLMs, it would be useful to analyze whether models systematically differ in the types of errors they produce and the corresponding downstream risks.

Models do differ systematically. Syntax error rates range from 3.9% (gemma4-31b) to 62.8% (mistral-nemo) (Section 5.1), with errors characterized by our taxonomy (Appendix C). Figure 13 gives a good overview of the syntactic errors made by the different LLMs. As for semantic errors, recall exceeds precision for all LLMs (Table 1), indicating that wrong formulas tend to be permissive. The downstream effect of permissive formulas is largely benign (Section 5.2, Table 4). Pipeline failures never occur for the best and largest gpt-oss-120b, but affect 6/18 and 7/18 tasks for olmo3-32b-think and qwen3-8b, respectively (Section 5.2, Table 4; details in Table 24).

Qualitatively, as we answered reviewer S2jn, we have observed the following mistakes:

  • qwen3-8b on kand-logic-2 (strict, MC-R ≈ 0.015, detailed). The formula accepts only pairs where objects share both shape and color, ignoring the other valid patterns. E.g., two images with a red and a blue square are valid for the target (same shape pattern) but rejected by the generated formula.

  • olmo3-32b-think on warcraft (permissive, MC-R = 1.75, detailed). The formula encodes the local path constraints (source, target, connected edges) but misses the explicitly stated no-cycle condition, so paths containing a cycle are wrongly accepted.

  • olmo3-32b-think on mn-add-bin (incomparable, MC-R = 2.56, non detailed). The formula correctly models most binary digit additions but oversimplifies the carry rule, triggering only when both digits are ≥\ge 8. E.g., 7 + 9 = 16:

    7 → 0111  (bit3 = 0)
    9 → 1001  (bit3 = 1)
    ------
    16 → 10000  (carry bit = 1)
    

    is not a valid assignment for the predicted formula.

This insight is what is measured by our REL and MC-R metrics. We will report these findings in the manuscript.

As we stated in our latest response to reviewer S2jn, we report here the findings from the evaluation of GPT-5.5 on auto-nesy-bench, as promised.

The results are as follows:

ModelF1 (↑)Precision (↑)Recall (↑)Syntax ER (↓)
GPT-5.50.927 ± 0.0490.926 ± 0.0500.962 ± 0.0270.0% ± 0.0%

Compared with GPT-6 Astra, GPT-5.5 achieves slightly lower overall performance (0.927 vs 0.930 f1 score). However, it produces no syntax errors (0%), making it the most reliable LLM evaluated so far in terms of syntactic correctness.

To complement the quantitative results, we examined some of the generated formulas that are not equivalent to the ground truth:

  • GPT-6-astra on chx (strict, MC-R = 0.94, detailed): In chx, the goal is to assign exactly one severity code per chest X-ray, i.e., healthy, green, yellow, orange, or red. GPT formula correctly encodes all severity codes except for healthy.
  • GPT-6-astra on cebab (permissive, MC-R = 1024, detailed): The task consists in mapping five aspect scores (food, service, ambiance, noise, price) from a restaurant review to an overall sentiment label (one of five classes). GPT formula enforces the one-hot constraint on the output label only, omitting the one-hot constraints on the five aspect scores.
  • GPT-5.5 on mn-mul-bin (incomparable, MC-R = 1.0, detailed): GPT formula has exactly 100 valid assignments (the same count as the ground truth) yet four assignments yield incorrect products. Specifically, the generated formula encodes 3 × 7 = 19 (should be 21), 5 × 8 = 41 (should be 40), 7 × 6 = 41 (should be 42) , and 7 × 7 = 63 (should be 49).

We will report these findings in the manuscript as well.

Dear Reviewer,

Thank you again for your review.

With the discussion period coming to an end in roughly 48 hours, we would be grateful to know whether our response resolves your concerns. If any points remain unclear, we would be happy to address them.

Thank you for your time and your constructive feedback.

Best regards,

Authors

Thank you for your responses and the additional experiments. My main concerns have been addressed, and I will maintain my recommendation.

Reviewer_bWzGOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
1
Read review
Paper summary

The proposed method uses an LLM to transfer the natural language to constraints. Then, they use neural predicates to make deductive inferences. To prove the effectiveness of the model, the authors also proposed benchmarks to support their methods. The authors also conduct several experiments to evaluate whether the LLMs can generate high-quality formulas that perform comparably to manually constructed ones in downstream Nesy Predictors, and their performance depends on the quality of the constraint specification.

Critical strengths

The authors proposed several benchmarks to experimentally evaluate the connector between LLMs and neural predictors. Besides, the authors also evaluate the different LLM models. The authors make great efforts to build the benchmarks and evaluate with LLMs.

Critical weaknesses

As the authors indicate, the performance of the proposed framework is highly dependent on the prompt quality. The method itself is strongly influenced by each component within the framework. Besides, some important notions are not well-defined, such as constraints.

Questions for authors
  1. What are the running time and computational resources required for the proposed method?
  2. Are there any other models that can perform such a reasoning task end-to-end? Adding some experimental comparisons with such models can enhance the contribution of the framework.
  3. Any way to further improve the performance on dcpbench datasets, which include a larger number of clauses to solve the problem?
2 comments

We thank the reviewer for the careful reading and for recognizing our efforts in building the benchmark and evaluating the LLMs.

We address the weaknesses and questions below.

The performance of the proposed framework is highly dependent on the prompt quality.

We would like to clarify the core contribution of our work: our paper does not propose a new method, but a benchmark and an empirical study of how well LLMs can formalize the constraints required by NeSy predictors. Understanding how performance varies across settings is therefore one of our research questions (RQ1), rather than a weakness of a method.

Our goal is to help practitioners obtain the knowledge required by NeSy predictors in a form that can be evaluated and inspected. To this end, we quantify how auto-formalization depends on each factor:

  • LLM choice: F1 ranges from 0.040 (gemma3-27b) to 0.786 (gpt-oss-120b) (Table 1).
  • User expertise: detailed descriptions improve F1 from 0.330 to 0.455 over non-detailed ones (Table 2).
  • Prompting strategy: chain-of-thought improves F1 on all benchmarks (Table 2).
  • Output format: CPMpy achieves the highest F1 on auto-nesy-bench (0.575), while NAT achieves the lowest (0.331) (Table 3).

We also measure how formalization errors propagate downstream, both with SPL (Table 4) and SL (Section I.2.3).

We believe these analyses can help practitioners choose which configuration to adopt and decide how much detail their descriptions need to include.

Important notions are not well-defined, such as constraints.

All constraints are propositional formulas over the output variables of the predictor, expressed in conjunctive normal form (CNF), as is standard in the NeSy literature (Sections 2 and 3.1). E.g., in Fig. 1, K := (green ∧ clear) ⇒ forward, i.e., the clause ¬green ∨ ¬clear ∨ forward. We will add a formal definition at the start of Section 2.

If the reviewer requires any further clarification on this or other matters, we would be happy to provide it.

What are the running time and computational resources required for the proposed method?

The hardware used for each LLM is reported in Appendix A (Table 5), and SPL and SL were trained on one RTX 4090. As noted in our response to Reviewer S2jn, we aim to evaluate LLMs under budget constraints, as we expect practitioners to face the same limitations.

Auto-formalizing auto-nesy-bench with gpt-oss-120b, the largest and best-performing model, took roughly 6 hours with zero-shot prompting and 9.5 hours with chain-of-thought, in total over all five output formats. Training SPL (respectively SL) takes up to about 150 minutes per task (3 minutes per epoch). Inference on the test set takes under 4 minutes for SPL and under 40 seconds for SL. The cost is roughly the same with LLM-generated constraints as with expert-defined constraints. We stress that, although calling an LLM is expensive and auto-formalization is the main computational bottleneck, it is a one-time cost per task, after which the downstream NeSy predictor runs efficiently without any further LLM calls.

Are there any other models that can perform such a reasoning task end-to-end?

Some NeSy methods learn both neural predicates and knowledge jointly, such as DSL [Daniele et al., 2023] and CMR [Debot et al., 2024]. However, these methods have been shown to often learn the wrong rules (and symbols), making them unreliable for high-stakes applications [Bortolotti et al., 2025]. They are also limited in the knowledge they can learn: DSL learns an explicit truth table (2n2^n entries in the number of variables nn), which does not scale to n≥20n \ge 20, while CMR requires supervision on neural predicates, which SPL and SL do not require. Moreover, if the learned concept-knowledge mapping is wrong, DSL and CMR must be retrained from scratch. For this reason, we believe that such methods are orthogonal to ours, as our goal is to build a pipeline where the knowledge can be inspected, evaluated and corrected before training the downstream model.

Any way to further improve the performance on dcp-bench datasets?

We see several promising directions to improve performance on dcpbench: retrieval-augmented or few-shot prompting [Michailidis et al., 2024], LLM fine-tuning [Shi et al., 2025], and additional self-verification rounds with feedback from solvers or from a held-out set of data.

We include dcpbench to broaden the evaluation, as it is an established benchmark for LLM-based constraint modeling [Michailidis et al., 2025a], although originally used in a different setting. We apply the same protocol across all datasets (same prompts, output formats, and self-verification), so that results remain comparable.

Please let us know if you have further questions, we are keen on engaging.

Dear Reviewer,

Thank you again for your review.

With the discussion period coming to an end in roughly 48 hours, we would be grateful to know whether our response resolves your concerns. If any points remain unclear, we would be happy to address them.

Thank you for your time and your constructive feedback.

Best regards,

Authors

Reviewer_S2jnOpenReview ↗
Rating
3
Confidence
4
Informativeness
3
Presentation
3
Soundness
3
Read review
Paper summary

This paper studies end-to-end auto-formalization for NeSy predictors. The idea is to combine two separate strands of past work: 1) auto-formalization of symbolic constraints from NL (natural language) to PL (propositional logic), and 2) their application in NeSy predictors of two kinds: semantic probabilistic layers (SPL) and semantic loss (SL). The authors introduce a new benchmark called auto-nesy-bench for evaluating auto-formalization abilities of open-weight LLMs and the downstream accuracy of the resulting symbolic constraints in NeSy predictors.

Critical strengths
  1. The paper studies an important and timely problem of end-to-end autoformalization of symbolic constraints and their impact on NeSy predictors. It combines two separate strands of past work, autoformalization (NL -> PL) and the incorporation of PL into NeSy predictors.

  2. The benchmark nesy-auto-bench would be valuable for the NeSy community. The authors demonstrate great care in the methodology, by reformulating and consolidating three past benchmark efforts (satbench, dcpbench-open, and rsbench).

Critical weaknesses
  1. The main weakness is that open-weight LLMs are far from accurate in auto-formalizing. The authors, to their credit, study different formats of symbolic constraints and different prompting mechanisms, but I am left without a qualitative sense of the kinds of errors that occur.

  2. I am curious why frontier LLMs are not used; is it because the authors do not expect them to do much better than open-weight LLMs at auto-formalizing, or is it that they score perfectly and thereby render the benchmark less useful? In my opinion, either result would be very useful and strengthen the contributions of this paper.

  3. This is a more general comment about the NeSy sub-area: this work feels a year late, given how advanced modern LLMs and agentic systems are, with respect to the kinds of tasks studied in this work (e.g. see the running example). I am convinced that they still make reasoning mistakes that are even harder to detect than before, which makes NeSy even more relevant. The paper would be significantly strengthened if the tasks considered were more complex and contemporary: complex environments for knowledge work, math proofs, computer tool use, etc. Can the authors identify which tasks in nesy-auto-bench come closest to this?

Questions for authors

Please see the points raised in weaknesses. Regarding 2: I am not expecting comprehensive new results but a systematic evaluation of at least one frontier LLM on the hardest tasks in nesy-auto-bench.

3 comments

We thank the reviewer for their careful reading and constructive feedback, for recognizing that auto-formalizing symbolic constraints is an important problem, and for considering auto-nesy-bench a valuable contribution.

We address the weaknesses and questions below.

I am left without a qualitative sense of the kinds of errors that occur.

Inspecting each clause requires formalization expertise and is impractical at our scale, but since the generated formulas are explicit, experts can still inspect individual cases.

To give an idea of the errors that occur, we analyze three serious autoformalization mistakes:

  • qwen3-8b on kand-logic-2 (strict, MC-R ≈ 0.015, detailed). The formula accepts only pairs where objects share both shape and color, ignoring the other valid patterns. E.g., two images with a red and a blue square are valid for the target (same shape pattern) but rejected by the generated formula.

  • olmo3-32b-think on warcraft (permissive, MC-R = 1.75, detailed). The formula encodes the local path constraints (source, target, connected edges) but misses the explicitly stated no-cycle condition, so paths containing a cycle are wrongly accepted.

  • olmo3-32b-think on mn-add-bin (incomparable, MC-R = 2.56, non detailed). The formula correctly models most binary digit additions but oversimplifies the carry rule, triggering only when both digits are ≥\ge 8. E.g., 7 + 9 = 16:

    7 → 0111  (bit3 = 0)
    9 → 1001  (bit3 = 1)
    ------
    16 → 10000  (carry bit = 1)
    

    is not a valid assignment for the predicted formula.

This insight is what is measured by our REL and MC-R metrics. We will report these findings in the manuscript.

Why frontier LLMs are not used.

We emphasize that our aim is not merely to measure what the “best” LLM can achieve, but also to evaluate the performance of models of different sizes. Our objective is to provide practical insights for practitioners who wish to employ Neuro-Symbolic predictors and may need assistance with constraint formalization under budget constraints, particularly given that closed-source models often require paid subscriptions.

Nevertheless, we are evaluating GPT-6 Astra on auto-nesy-bench with the same 18 tasks, detailed descriptions, two prompting strategies, and five output formats, with tools disabled for a fair comparison. Preliminary results (mean ± std over the ten configurations):

ModelF1 (↑)Precision (↑)Recall (↑)Syntax ER (↓)
GPT-6 Astra0.930 ± 0.0220.931 ± 0.0220.974 ± 0.0271.1% ± 2.2%

GPT-6 Astra improves F1 by 0.144 over the strongest open-weight model, gpt-oss-120b (0.786, Table 1), and has a lower syntax error rate than the best one reported (gemma4-31b, 3.9%), suggesting that frontier models can effectively support auto-formalization when available, but also that Astra cannot fully solve auto-nesy-bench.

We will incorporate these results into the revised paper.

This work feels a year late.

We see our approach as complementary to current agentic AI. There, LLMs are post-trained with a verification oracle, which works for math because rewards are reliable (e.g., whether a Lean proof checks). We target applications where no such oracle exists and must be synthesized by an LLM, or drafted for an expert to refine, yielding a NeSy model with validity guarantees. We view this as a stepping stone towards NeSy auto-formalization in agentic loops, extracting and imposing hard constraints during self-reflection, which today is done only with text.

The paper would be significantly strengthened if the tasks considered were more complex and contemporary.

The scale of the tasks reflects a general limitation of NeSy AI rather than of our benchmark. Exact NeSy predictors such as SPL rely on knowledge compilation, which becomes expensive as constraints grow, since exact inference amounts to weighted model counting [Chavira and Darwiche, 2008]. Scaling to more complex constraints is a well-known open challenge [Huang et al., 2021], which we observed directly when adapting dcpbench, discarding instances whose circuits were too large to compile (Section 4). auto-nesy-bench is built from established benchmarks used by the NeSy community.

If the reviewer has a particular problem/task in mind, we are happy to include it in our experiments.

Can the authors identify which tasks in nesy-auto-bench come closest to this?

The closest are road-r and bdd-oia, high-stakes autonomous driving tasks (road-r has 243 hand-written clauses). kand-logic (129,648 clauses) and sudoku (400 clauses) also encode constraints that can be hard to formalize (Table 4). As NeSy predictors scale and new benchmarks appear, we will integrate them into auto-nesy-bench.

Please let us know if you have further questions, we are keen on engaging.

As promised, we also evaluated GPT-5.5 on auto-nesy-bench. The results are as follows:

ModelF1 (↑)Precision (↑)Recall (↑)Syntax ER (↓)
GPT-5.50.927 ± 0.0490.926 ± 0.0500.962 ± 0.0270.0% ± 0.0%

Compared with GPT-6 Astra, GPT-5.5 achieves slightly lower overall performance (0.927 vs 0.930 f1 score). However, it produces no syntax errors (0%), making it the most reliable LLM evaluated so far in terms of syntactic correctness.

To complement the quantitative results, we examined some of the generated formulas that are not equivalent to the ground truth:

  • GPT-6-astra on chx (strict, MC-R = 0.94, detailed): In chx, the goal is to assign exactly one severity code per chest X-ray, i.e., healthy, green, yellow, orange, or red. GPT formula correctly encodes all severity codes except for healthy.
  • GPT-6-astra on cebab (permissive, MC-R = 1024, detailed): The task consists in mapping five aspect scores (food, service, ambiance, noise, price) from a restaurant review to an overall sentiment label (one of five classes). GPT formula enforces the one-hot constraint on the output label only, omitting the one-hot constraints on the five aspect scores.
  • GPT-5.5 on mn-mul-bin (incomparable, MC-R = 1.0, detailed): GPT formula has exactly 100 valid assignments (the same count as the ground truth) yet four assignments yield incorrect products. Specifically, the generated formula encodes 3 × 7 = 19 (should be 21), 5 × 8 = 41 (should be 40), 7 × 6 = 41 (should be 42) , and 7 × 7 = 63 (should be 49).

We will report these findings in the manuscript as well.

Dear Reviewer,

Thank you again for your review.

With the discussion period coming to an end in roughly 48 hours, we would be grateful to know whether our response resolves your concerns. If any points remain unclear, we would be happy to address them.

Thank you for your time and your constructive feedback.

Best regards,

Authors

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.