TL;DR
Writing neuro-symbolic programs usually requires mastering complex, domain-specific syntax, creating a steep learning curve for developers. AgenticDomiKnowS (ADS) solves this by using a multi-agent workflow to translate natural language task descriptions into fully executable neuro-symbolic code. By breaking down the generation process into isolated stages with automated self-refinement and optional human intervention, ADS slashes development time from hours to just 10–15 minutes.
What Problem Does This Paper Address?
Neuro-symbolic (NeSy) AI combines the data-driven power of deep learning with the structured, logical consistency of symbolic reasoning. This combination makes models more robust, interpretable, and data-efficient. However, actually building NeSy systems is notoriously difficult. Developers must use specialized libraries like DomiKnowS, which require manually encoding logical rules and mastering highly specific declarative syntax.
To make matters worse, standard Large Language Models (LLMs) struggle to act as coding assistants here. Because domain-specific NeSy libraries are underrepresented in their pre-training data, monolithic code generation attempts usually result in cascading syntax and semantic errors. The authors introduce ADS to bridge this gap, enabling both experts and novices to generate complete NeSy programs from free-form text.
Methods
ADS abandons monolithic code generation in favor of a modular, agentic workflow implemented via LangGraph. The system operates in two primary phases:
- Retrieval-Augmented Generation (RAG): Given a natural language task description, a RAG Selector agent retrieves five similar, human-authored DomiKnowS programs from a reference pool to serve as in-context examples.
- Knowledge Declaration Phase: This phase sets up the conceptual graph and logical constraints. It relies on a tight feedback loop between three specialized agents:
- Graph Design Agent: Proposes the initial graph code.
- Graph Execution Agent: Runs the code and catches syntax errors.
- Graph Reviewer Agent: Evaluates the code semantically to ensure the logical constraints match the user's intent.
Once the agents agree (or hit an attempt limit), the code is passed to a human reviewer for final approval or natural language adjustments.
- Model Declaration Phase: This phase binds data elements and machine learning models to the graph. A key design choice here was simplifying the target library's footprint: ADS minimizes the use of complex DomiKnowS classes, delegating data operations to standard Python code that LLMs are already proficient at writing. It also replaces task-specific learners with a unified Vision-Language Model (
LLMModel) wrapper for immediate, zero-shot inference.
The entire architecture is wrapped in an interactive web interface that outputs a plug-and-play Jupyter Notebook.
Datasets
The framework was evaluated using a test suite of 12 diverse DomiKnowS programs spanning three domains:
- Natural Language Processing: Hierarchical topic classification (20 News), consistency-constrained classification (Spam, IMDB), causal/logical reasoning (WIQA, RuleTaker, BeliefBank), and procedural text tracking (ProPara).
- Computer Vision: Hierarchical image recognition (CIFAR-10, Animals & Flowers) and arithmetic constraint tasks (MNIST-Sum).
- Constraint Satisfaction Problems (CSP): Combinatorial puzzles (Sudoku, Eight Queens).
For human evaluation, the authors introduced three new tasks: Amazon Reviews rating prediction, hierarchical classification of scientific papers (WOS), and sequence labeling with tag constraints (CoNLL).
Key Insights and Ideas
- Divide and Conquer for Niche Code: Monolithic LLM generation fails on low-resource libraries. Isolating the logic (Knowledge Declaration) from the data mapping (Model Declaration) prevents errors in one section from corrupting the other.
- Designing for LLM Strengths: Instead of forcing the LLM to navigate the most complex abstractions of the DomiKnowS library, the authors refactored the underlying framework's interaction patterns. Delegating complex operations to standard Python code drastically improved generation success.
- The Necessity of Semantic Review: Syntax checking (compiling/running code) isn't enough for logical programming. The inclusion of a dedicated Graph Reviewer Agent to double-check the meaning of the constraints was vital for high-level correctness.
Key Results
The authors evaluated several state-of-the-art models within the ADS workflow. Advanced reasoning models achieved remarkable accuracy in generating semantically correct graphs:
While Kimi k2 and DeepSeek R1 achieved the highest accuracy, their high inference latency made them less ideal for a real-time interactive UI. Ultimately, GPT-5 (Low) was selected for the live system as it struck the best balance between speed and accuracy (86.11% total semantic correctness).
In human trials featuring both DomiKnowS experts and complete non-users, participants successfully generated and debugged complex neuro-symbolic programs in 10 to 15 minutes—a process that typically takes hours of manual coding.
Limitations and Future Work
While the Knowledge Declaration phase benefits from a robust, multi-agent iterative repair loop, the Model Declaration phase currently uses a much simpler setup with only a single automatic refinement attempt if a syntax error occurs.
Moving forward, the authors plan to generalize this methodology. Their goal is to build a framework-agnostic system capable of automatically dissecting any low-resource, open-source NeSy library into modular components, paving the way for automated end-to-end synthesis across diverse symbolic formalisms.
Summary updated