Active Learning for Neurosymbolic Program Synthesis

Celeste Barnaby, Qiaochu Chen, Ramya Ramalingam, Osbert Bastani, Işıl Dillig

TL;DR

This paper introduces a novel active learning framework, SMARTLABEL, for neurosymbolic program synthesis. It tackles the challenge of neural network mispredictions by employing "constrained conformal evaluation" (CCE), enabling it to identify the correct program with 98% accuracy and requiring only ~5 user interactions on average, significantly outperforming prior methods.

What Problem Does This Paper Address?

Synthesizing programs that combine symbolic logic with neural networks (neurosymbolic programs) is a growing trend, offering interpretability and data efficiency. However, a key challenge is ensuring the synthesized program is the intended one, especially when neural components can make errors. Traditional active learning techniques, designed for purely symbolic programs, fail here because they might incorrectly discard the true program due to neural mispredictions. This paper addresses the problem of efficiently and reliably synthesizing neurosymbolic programs by developing an active learning approach that can robustly handle these neural inaccuracies.

Methods

The core innovation is Constrained Conformal Evaluation (CCE). Instead of relying on a single output from a neural network, CCE uses conformal prediction to generate a set of plausible outputs, guaranteeing that the true output is included with high probability. This allows programs to remain candidates even if a neural component makes a mistake. CCE then refines these output sets by incorporating user feedback and using bidirectional abstract interpretation. This technique efficiently prunes the hypothesis space of possible programs.

For question selection, the paper proposes an algorithm that aims to maximize "pruning power" – the fraction of programs eliminated from the hypothesis space by the worst possible user answer. To make this efficient, it uses Bounded Conformal Evaluation (BCE) to over-approximate pruning power, avoiding costly full evaluations.

Datasets

The authors evaluated SMARTLABEL on 112 benchmarks across three domains:

  • IMAGEEDIT: Batch image processing tasks.
  • IMAGESEARCH: Image search and visual concept discovery.
  • VISARITH: Visual arithmetic tasks (e.g., operating on handwritten digits).

These benchmarks are based on existing work, but the evaluation setting differs by not assuming access to an external oracle for ground truth verification, relying instead on the synthesized program's observational equivalence.

Key Insights and Ideas

  • Neural mispredictions are a fundamental challenge for active learning in neurosymbolic synthesis: Prior methods fail because they can't distinguish between a program being wrong and a neural component being wrong.
  • Conformal prediction is key to robustness: By outputting sets of possibilities, conformal prediction keeps the correct program in play despite neural errors.
  • Bidirectional abstract interpretation makes CCE practical: This technique efficiently prunes the hypothesis space by reasoning both forward and backward from user feedback and neural predictions.
  • Worst-case pruning power is a better question selection heuristic than expected pruning power: While counter-intuitive, focusing on the worst-case answer leads to more efficient user interaction in practice, likely because neural networks can be confidently wrong.

Key Results

  • SMARTLABEL successfully identifies the ground truth program for 98% of benchmarks, a significant improvement over baselines (65% and 58%).
  • It requires an average of only 4.9 rounds of user interaction to converge, drastically reducing user effort compared to random question selection (93.9 rounds).
  • The key algorithmic optimizations (bidirectional abstract interpretation and BCE) significantly improve runtime and scalability, preventing exponential blowup with prediction set size.
  • The runtime is dominated by question selection (69.5%), followed by hypothesis space refinement (26.4%), with distinguishability checks being very fast in practice.

Limitations and Future Work

  • Scalability to more expressive languages: While the core CCE approach is general, applying it to more complex, general-purpose languages might require leveraging large language models (LLMs) for initial candidate generation and exploring more compact hypothesis space representations.
  • Broader applicability of conformal evaluation: The problem of uncertain neural predictions extends beyond tightly integrated neurosymbolic systems to more loosely coupled architectures like agent-based systems that use LLMs to orchestrate tools. Extending the conformal evaluation and querying strategy to these systems could improve their reliability.
  • Hyperparameter tuning: The performance of BCE depends on hyperparameters like k and k', which are chosen based on validation sets.

Summary updated

BibTeX
@misc{barnaby2025active,
  author = {Celeste Barnaby and Qiaochu Chen and Ramya Ramalingam and Osbert Bastani and Işıl Dillig},
  title = {{Active Learning for Neurosymbolic Program Synthesis}},
  year = {2025},
  eprint = {2508.15750},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.15750},
}
Figure