Abstract
This paper introduces a hybrid Visual Question Answering (VQA) framework that replaces traditional "black-box" neural reasoning with explicit formal logic. By converting images into structured scene graphs and questions into first-order logic clauses via a Transformer-based semantic parser, the system leverages a Prolog inference engine for transparent reasoning. The approach achieves near-perfect accuracy (99.6%) on the CLEVR dataset and demonstrates remarkable data efficiency, requiring only 10% of training data to outperform existing models while remaining highly interpretable.
Introduction
Visual Question Answering (VQA) is a complex multi-modal task where traditional deep learning models often struggle with interpretability, dataset bias, and high data requirements. These models typically learn statistical shortcuts rather than genuine logical reasoning. To address these limitations, this research proposes a symbolic approach that disentangles visual perception from logical inference, using neural networks primarily for translation into a formal language solvable by classical logic engines.
Methodology
The proposed pipeline consists of three distinct stages designed to separate perception from logical inference:
- Image to Background Facts: Visual scenes are represented as scene graphs and then converted into logical predicates. For example, an object's properties are stored as facts like
attribute(id, color, green). - Question to Logic Clause: A BART Transformer-based semantic parser translates natural language questions into first-order logic rules.
- Logic Inference Engine: A Prolog engine performs reasoning by checking the satisfiability of the generated rules against the background facts.
This separation ensures that the reasoning process is entirely transparent and mathematically sound, allowing for precise debugging of either the perception or the parsing components.
Experimental Evaluation
The framework was evaluated on three key benchmarks:
- CLEVR: A synthetic dataset for testing multi-step reasoning over object attributes.
- CLEVR-CoGenT: A variant used to test generalization to unseen attribute combinations.
- GQA: A real-world dataset involving complex questions based on natural scene graphs.
Results and Discussion
The symbolic approach yielded several key insights:
- Performance and Robustness: The model achieved 99.6% accuracy on CLEVR and maintained 99.5% on CLEVR-CoGenT Split B, indicating it does not rely on dataset biases.
- Extreme Data Efficiency: By hard-coding the logic of reasoning, the model reached 99.1% accuracy on CLEVR using only 10% of the training data.
- Interpretability: Unlike end-to-end neural models, the generated logic clauses provide a clear trace of the model's "thought process," facilitating human-in-the-loop troubleshooting.
Conclusion
While the current implementation assumes the availability of high-quality scene graphs, it demonstrates the power of combining neural perception with symbolic reasoning. Future work aims to improve the robustness of automated scene graph generation and extend formal logic to handle the complexities of open-domain natural images.
Summary updated