arXiv:2609.05388cs.CVSep 2026

Manuscript Offprint

arXiv:2609.05388

Think-Verify-Revise: Neuro-Symbolic Visual Reasoning with Vision-Language Models and Dynamic Logic Tensor Networks

Homayoun Afshari, Pietro Basci, Alessandro Russo, Lia Morra

Homayoun Afshari, Pietro Basci Ⓤ, Alessandro Russo Ⓤ, and Lia Morra Ⓤ

Politecnico di Torino Department of Control and Computer Engineering Turin, Italy {homayoun.afshari}@studenti.polito.it {pietro.basci, alessandro.russo, lia.morra}@polito.it

Abstract. Visual reasoning tasks require a system to jointly perceive visual content and apply formal relational constraints—a combination that neither pure neural nor purely symbolic approaches handle well in isolation. This paper proposes a Neuro-Symbolic (NeSy) framework that closes this gap by tightly coupling a Vision-Language Model (VLM) for automatic First-Order Logic (FOL) rule induction with a Dynamic Logic Tensor Network (D-LTN) for differentiable rule verification, in a closed iterative feedback loop. The VLM receives a small set of labelled visual examples and proposes candidate FOL rules conforming to a strict grammar (Think); the D-LTN is automatically assembled from these rules at runtime and evaluates them grounding on CNN-produced visual embeddings (Verify); and verification failures are fed back to guide the VLM's next hypothesis (Revise). Evaluated on the ViSudo-PC benchmark across four visual domains (MNIST, EMNIST, KMNIST, FMNIST), the system induces valid Sudoku constraint rules using only three training examples as visual context. The proposed method achieves AUC scores matching or outperforming previous methods (NeuPSL, LTN), showing the potential for automatic rule discovery through VLM. Code is available at https://github.com/homayoun-afshari/nesy.

Keywords: Neuro-Symbolic Learning · Visual Reasoning · Logical Rule Induction

1 Introduction

Visual reasoning tasks—such as determining whether a visually encoded Sudoku board is valid, or identifying the abstract rule governing a sequence of images—require a system to jointly perceive visual content and apply formal relational constraints. Pure neural approaches struggle with the latter: even powerful Vision-Language Models (VLMs) that excel at inductive pattern recognition

H. Afshari et al.

Figure

Fig. 1: Conceptual diagram of the proposed feedback-driven neuro-symbolic reasoning framework. Given a few labelled visual examples, the system generates candidate symbolic rules, verifies them against visual evidence, and uses verification outcomes as feedback to iteratively refine its hypotheses. This closed-loop process enables the automatic discovery of valid symbolic constraints from visual data.

fail to reliably chain logical rules or generalise to unseen constraint combinations [6, 17]. Conversely, traditional Neuro-Symbolic (NeSy) systems that embed rules as hard-coded constraints achieve transparency but, with exceptions, they require a human expert to hand-craft the correct logical knowledge for every new task [2, 4, 11]. To achieve systems that are simultaneously flexible, explainable, and based on formal language, a central challenge to tackle is therefore where rules come from: can they be induced automatically from data in a form that is both machine-verifiable and generalisable across visual domains?

This paper proposes a NeSy visual reasoning framework that closes the above gap by tightly coupling a VLM-based rule inducer with a Dynamic Logic Tensor Network (D-LTN) verifier in a closed feedback loop (Figure 1). The key idea is to use the VLM not merely as a static rule writer, but as an abductive reasoner whose hypotheses are continuously evaluated and corrected by a differentiable symbolic verifier. Concretely, a Rule Generator (VLM) receives a textual description of the task and a small set of visual examples (context) and proposes candidate rules in a formally defined FOL grammar. A Rule Verifier (D-LTN) automatically parses the FOL rule, constructs the corresponding LTN computation graph at runtime, grounding the symbolic layers on the embedding computed by a Visual Encoder (CNN). The D-LTN is then trained on the target task and the satisfiability of the extracted rules serves as a feedback signal to the Rule Generator. Owing to the differentiable nature of LTNs, gradients can be propagated through the verifier, enabling end-to-end training of the visual encoder. Our approach, while demonstrated on LTNs, could be easily extended to other NeSy frameworks, e.g., NeuPSL [13], based on comparable logic languages. Finally, the Feedback Loop returns both the verified rule's performance and any parsing or logical errors to the VLM, which uses this information to refine its next hypothesis.

We evaluate the framework on the ViSudo-PC benchmark [1], requiring systems to verify visually encoded 4×4 Sudoku boards under four visual domains (MNIST, EMNIST, KMNIST, FMNIST). Our main contributions are as follows:

– We introduce a closed-loop framework for automatic induction of FOL rules from visual data, combining VLM-based abductive hypothesis generation with D-LTN-based differentiable verification.

  • We propose a grammar-constrained prompting strategy that steers VLM outputs towards syntactically valid and formally parseable FOL rules, reducing hallucinations and ensuring downstream compatibility with the D-LTN verifier.
  • We demonstrate that the proposed framework can successfully induce valid Sudoku constraint rules using only three training examples as context and a limited number of VLM interactions (3–19 iterations).
  • We show that, when evaluated independently of the VLM induction component, the proposed CNN+D-LTN architecture matches or outperforms existing state-of-the-art approaches, including NeuPSL [13] and LTN-IND A/B/C [11], across all four visual domains.