NePTune: A Neuro-Pythonic Framework for Tunable Compositional Reasoning on Vision-Language
Danial Kamali, Parisa Kordjamshidi
TL;DR
NePTune presents a neuro-symbolic framework that unifies Python-based imperative reasoning with soft, differentiable logic to solve visual-language queries under perceptual uncertainty. By generating executable Python programs via an LLM and grounding predicates with a two-tier perceptual module, NePTune decouples perception from reasoning while enabling zero-shot generalization and domain adaptation. Empirical results on CLEVR, CLEVR-Humans, and real-world REG benchmarks demonstrate significant improvements over strong baselines, with robust performance under domain shifts and potential for neuro-symbolic fine-tuning. The work highlights the value of hybrid execution—combining probabilistic grounding with programmable control—for robust compositional reasoning in vision-language tasks.
Abstract
Modern Vision-Language Models (VLMs) have achieved impressive performance in various tasks, yet they often struggle with compositional reasoning, the ability to decompose and recombine concepts to solve novel problems. While neuro-symbolic approaches offer a promising direction, they are typically constrained by crisp logical execution or predefined predicates, which limit flexibility. In this work, we introduce NePTune, a neuro-symbolic framework that overcomes these limitations through a hybrid execution model that integrates the perception capabilities of foundation vision models with the compositional expressiveness of symbolic reasoning. NePTune dynamically translates natural language queries into executable Python programs that blend imperative control flow with soft logic operators capable of reasoning over VLM-generated uncertainty. Operating in a training-free manner, NePTune, with a modular design, decouples perception from reasoning, yet its differentiable operations support fine-tuning. We evaluate NePTune on multiple visual reasoning benchmarks and various domains, utilizing adversarial tests, and demonstrate a significant improvement over strong base models, as well as its effective compositional generalization and adaptation capabilities in novel environments.
