> For the complete documentation index, see [llms.txt](https://neurosymbolicai.gitbook.io/neuro-symbolic-ai-in-practice/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://neurosymbolicai.gitbook.io/neuro-symbolic-ai-in-practice/part-v-decision-guide/chapter-6-decision-guide.md).

# Chapter 6: Which NeSy Architecture for My Problem?

A practitioner's decision guide for selecting the right neuro-symbolic pattern.

***

## Decision Guide

Answer these four questions in order. Each question has two paths; follow the arrow that matches your situation until you reach a recommendation.

> **Note on §4.4 patterns:** The decision tree below covers §4.1–4.3. Two additional specializations — §4.4.1 (Differentiable Abstract Interpretation) and §4.4.2 (JEPA World Models) — are not reachable from the main tree because they require specific technical preconditions: DAI requires that the problem has a formal lattice constraint structure and solution verification is available; JEPA requires physical perception tasks with unlabeled video data and no reward signal. Consult the "At a Glance" table and Chapter 4.4 directly if your problem fits those profiles.

| Step  | Question                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | **YES →**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | **NO →**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **1** | **Do you need provably correct outputs?** Your system is safety-critical, regulated (medical, legal, aerospace), or must pass formal verification. A wrong output has irreversible consequences.                                                                                                                                                                                                                                                                                        | Continue to Step 2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Continue to Step 3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **2** | **Is your primary bottleneck the symbolic component?** Your planner, theorem prover, or constraint solver produces *correct* results but is too slow for your throughput or latency needs.                                                                                                                                                                                                                                                                                              | <p><strong>→ §4.2 Neural Helps Symbolic</strong><br><br>Use neural networks to accelerate the symbolic bottleneck — learning heuristics, guiding search, warm-starting solvers.<br><br><strong>§4.2 covers three distinct subcategories with different correctness properties:</strong><br><em>(a) Neural search acceleration</em> — HGN, Neural MCTS, AlphaProof, NeuroSAT, GFlowNets: the symbolic engine retains full correctness guarantees; a bad neural approximation only costs speed.<br><em>(b) LLM-to-solver translation</em> — LOGIC-LM, SatLM, LINC: an LLM formalizes the problem for a symbolic solver; end-to-end correctness additionally requires that the LLM formalization is accurate.<br><em>(c) Probabilistic NeSy inference</em> — DeepProbLog, Scallop, A-NeSI: neural predicates provide soft probabilistic evidence to probabilistic logic programs; outputs are calibrated probability distributions, not hard guarantees; trained end-to-end by differentiating through logical inference.<br><br><em>Key systems: HGN (Shen et al., IJCAI 2020), Neural MCTS, AlphaProof, NeuroSAT, NeuroBack, GFlowNets; LOGIC-LM/SatLM/LINC (LLM-to-solver); DeepProbLog/Scallop/A-NeSI (probabilistic NeSy); NAR/CLRS (neural algorithmic reasoning); PAL/PoT (interpreter as oracle); Pointer Networks/Attention Model (neural combinatorial optimization); AI Feynman/PySR (symbolic regression); Autoformalization/Llemma (formal proof translation)</em></p> | Continue to Step 4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **3** | **Is your input primarily unstructured?** Your system processes raw images, natural language, audio, or sensor streams that symbolic engines cannot directly ingest.                                                                                                                                                                                                                                                                                                                    | <p><strong>→ Consider Pure Neural</strong> first. A symbolic layer may add complexity without proportional benefit. Profile your failure modes carefully — if the model violates domain constraints in practice, revisit §4.1.<br><br><strong>Exception — Probabilistic NeSy:</strong> If your downstream task requires <em>structured probabilistic reasoning</em> over the unstructured input — relational classification with calibrated uncertainty, semantic parsing with logical inference, multi-hop relational QA — consider §4.2 probabilistic NeSy systems (DeepProbLog, Scallop, A-NeSI). These add a probabilistic logic program on top of neural perception and train end-to-end.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | **→ Consider lightweight rule-based or constraint-optimization approaches first.** Rule engines (Drools, decision tables), constraint optimization (OR-Tools, CP-SAT), or structured ML (gradient boosting on tabular features) may be entirely sufficient. You do **not** necessarily need a formal planner — those provide provably correct outputs, which Step 1 established is not your requirement. Add a neural component only when structured rules cannot cover the required generalization breadth. |
| **4** | **Can your symbolic knowledge be expressed as constraints on neural behavior (outputs, training loss, or runtime policy)?** Your domain rules — physical laws, logical invariants, ontology constraints, regulatory rules — can be written as differentiable loss terms (PINNs, Semantic Loss), projection layers on model outputs (PICARD, CBF), symbolic reward signals shaping training (RLHF, STaR), or runtime policy specifications enforced at inference time (NeMo-Guardrails). | <p><strong>→ §4.1 Symbolic Helps Neural</strong><br><br>Add symbolic constraints as loss regularization (Semantic Loss) or hard projection layers on top of your existing neural model. Minimal architectural changes required — typically a modified loss function or output projection layer. The neural component remains the primary predictor; symbolic knowledge provides the guardrail.<br><br><em>Key systems: PINNs, Semantic Loss, NS-CL, NS-VQA, CombOptNet, SPO+, AlphaFold 2, RLHF, Constitutional AI, CBMs (interpretable medical AI), CBF/STL (safe robot control), REINVENT (drug design), PICARD (constrained decoding), STaR/RLEF (self-improvement), NN Formal Verification (Marabou / α,β-CROWN), NeMo-Guardrails</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | <p><strong>→ §4.3 Hybrid / Co-Processing</strong><br><br>Both neural perception and symbolic reasoning are essential and must operate as co-equals in a bidirectional loop. The neural component cannot produce useful outputs without the symbolic component, and vice versa. Interface design is the critical engineering challenge.<br><br><em>Key systems: AlphaGeometry, GraphRAG, GreaseLM, PLOI, PDDLStream, Voyager</em></p>                                                                         |

***

## At a Glance — Seven Possible Outcomes

| Outcome                                           | Trigger Condition                                                                                                            | Chapter            | Complexity |
| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------ | ---------- |
| **Pure Neural**                                   | No correctness requirement + unstructured input                                                                              | —                  | Low        |
| **Lightweight Structured**                        | No correctness requirement + structured input — rule engines, constraint optimization, decision tables                       | Ch. 3 (background) | Low–Medium |
| **§4.1 Symbolic Helps Neural**                    | Correctness needed + NOT bottlenecked by symbolic + knowledge is constraints                                                 | Ch. 4.1            | Low        |
| **§4.2 Neural Helps Symbolic**                    | Correctness needed + symbolic component is the bottleneck                                                                    | Ch. 4.2            | Medium     |
| **§4.3 Hybrid / Co-Processing**                   | Correctness needed + NOT bottlenecked by symbolic + knowledge cannot be expressed as pure constraints                        | Ch. 4.3            | High       |
| **§4.4.1 Differentiable Abstract Interpretation** | Correctness needed + problem has formal lattice constraint structure + solution verification available                       | Ch. 4.4.1          | Very High  |
| **§4.4.2 JEPA World Models**                      | Physical perception required + reward annotation unavailable or impractical + training data is unlabeled visual observations | Ch. 4.4.2          | High       |

***

## Comparison Table

| Criterion                     | 4.1 Symbolic Helps Neural                                                                        | 4.2 Neural Helps Symbolic                                                                                                                     | 4.3 Hybrid Co-Processing                    | 4.4.1 DAI                                                         | 4.4.2 JEPA-WM                                         |
| ----------------------------- | ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------- |
| **Primary component**         | Neural                                                                                           | Symbolic                                                                                                                                      | Both co-equal                               | Neural (abstract-domain representation)                           | Neural (learned latent world model)                   |
| **Symbolic role**             | Constraint / verifier                                                                            | Correctness oracle                                                                                                                            | Reasoning engine                            | Abstract domain = neural representation space                     | None                                                  |
| **Neural role**               | Core predictor                                                                                   | Efficiency accelerator                                                                                                                        | Perception + generation                     | Deduction operator approximation                                  | Encoder + world model + planner                       |
| **Guarantees**                | Hard constraint satisfaction (projection layers); soft regularization only (Semantic Loss, RLHF) | Full symbolic correctness (heuristic-acceleration subcategory); formalization-dependent for LLM-to-solver subcategory (LOGIC-LM, SatLM, LINC) | Interface-dependent                         | Empirically sound (correct or abstain)                            | None — empirical performance only                     |
| **Data requirements**         | Low (constraints provide inductive bias)                                                         | Medium (training for neural subroutine)                                                                                                       | Medium-high                                 | Low (only solution verifier needed, no domain model)              | High (unlabeled video + action sequences)             |
| **Latency**                   | Low (neural inference + constraint projection)                                                   | Medium (symbolic search + neural guidance)                                                                                                    | High (bidirectional loops)                  | Medium (iterative solve loop)                                     | Medium (CEM/MPPI optimization at inference)           |
| **Implementation difficulty** | Low (drop-in constraint layers)                                                                  | Medium (integration with solver)                                                                                                              | High (interface design critical)            | Very High (lattice architecture design)                           | High (representation learning + world model training) |
| **Interpretability**          | Partial (neural opaque, constraints readable)                                                    | Full for symbolic-search subcategory (complete trace available); partial for LLM-to-solver subcategory (LLM formalization step is opaque)     | Partial (neural steps opaque)               | Partial (lattice state interpretable, transformer weights opaque) | Low (continuous latent space)                         |
| **Failure mode**              | Constraint violations if domain knowledge incomplete                                             | Slower solving if neural guidance degrades                                                                                                    | Interface errors, representation mismatches | Abstains rather than outputting incorrect answers                 | Silent failures; no formal fallback                   |
| **Safety-critical?**          | Yes (with hard constraints)                                                                      | Yes for heuristic-acceleration (oracle uncompromised); conditional for LLM-to-solver (requires correct problem formalization)                 | Yes (if verified interface)                 | Yes (empirically sound)                                           | No — requires separate verification layer             |

> **§4.2 subcategory note:** The "Primary component: Symbolic / Neural role: Efficiency accelerator" description above applies to the heuristic-acceleration subcategory (Neural MCTS, HGN, NeuroSAT). For the **probabilistic NeSy subcategory** (DeepProbLog, Scallop, A-NeSI), both neural and symbolic components are co-equal: neural predicates supply perceptual evidence; the probabilistic logic program defines the inference model. Neither component is the "accelerator" of the other — they solve complementary sub-problems jointly. For the **LLM-to-solver subcategory** (LOGIC-LM, SatLM, LINC), the neural component plays a formalization role; the symbolic solver does the reasoning.

***

## Pattern Selection by Domain

| Domain                                                                        | Recommended Pattern                 | Key System                                    | Notes                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ----------------------------------------------------------------------------- | ----------------------------------- | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Robot manipulation**                                                        | 4.1 or 4.3                          | SayCan, PLOI                                  | 4.1 for constraint enforcement; 4.3 for full perception-planning loop                                                                                                                                                                                                                                                                                                                                                                                 |
| **Formal theorem proving**                                                    | 4.2                                 | AlphaProof (AlphaZero RL + Lean 4)            | Lean 4 as correctness oracle; neural LM generates proof steps                                                                                                                                                                                                                                                                                                                                                                                         |
| **Medical diagnosis support**                                                 | 4.3                                 | KG + LLM hybrid                               | Requires both perception (clinical notes) and formal reasoning (ontology)                                                                                                                                                                                                                                                                                                                                                                             |
| **Logistics scheduling**                                                      | 4.2 or 4.3                          | LLM+P, MAPGEN                                 | 4.2 if domain is pre-specified; 4.3 if domain must be induced from NL                                                                                                                                                                                                                                                                                                                                                                                 |
| **Physics simulation**                                                        | 4.1                                 | PINNs                                         | PDEs provide exact symbolic constraint                                                                                                                                                                                                                                                                                                                                                                                                                |
| **Competitive programming**                                                   | 4.3                                 | AlphaCode                                     | Generate-and-filter; test execution as oracle                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Knowledge-intensive QA**                                                    | 4.3                                 | GraphRAG, GreaseLM                            | KG provides structured factual grounding                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Autonomous driving**                                                        | 4.3                                 | Scene graph + planner                         | Perception neural; traffic rule enforcement symbolic                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Drug discovery**                                                            | 4.1 or 4.3                          | KG-augmented models                           | Symbolic ontology enforces chemical validity; neural generates candidates                                                                                                                                                                                                                                                                                                                                                                             |
| **Game playing**                                                              | 4.2                                 | Neural MCTS                                   | Perfect simulator as oracle; neural for policy/value                                                                                                                                                                                                                                                                                                                                                                                                  |
| **HTN task planning**                                                         | 4.2 or 4.3                          | SHOP3 + LLM                                   | 4.2 if method library exists; 4.3 if LLM must generate methods. (SHOP3: Goldman & Kuter, *ELS 2019*, successor to SHOP2; code: github.com/shop-planner/shop3)                                                                                                                                                                                                                                                                                         |
| **SAT/constraint solving**                                                    | 4.2                                 | NeuroSAT, NeuroBack                           | Neural warm-starts/guides CDCL solver (NeuroSAT: satisfiability prediction; NeuroBack: neural backbone-variable selection for Kissat)                                                                                                                                                                                                                                                                                                                 |
| **Constraint satisfaction (Sudoku, exact-cover, CSP with lattice structure)** | 4.4                                 | LDT                                           | Lattice deduction: correct or abstain; 800K params beats frontier LLMs at 0%. For industrial SAT solving see §4.2 (NeuroSAT).                                                                                                                                                                                                                                                                                                                         |
| **Software engineering (bug fixing, feature implementation)**                 | 4.3                                 | SWE-agent                                     | Test suite as symbolic oracle; iterative generate-execute-repair loop.                                                                                                                                                                                                                                                                                                                                                                                |
| **Safe robot control (safety-critical continuous control)**                   | 4.1                                 | CBF / STL monitors                            | Control Barrier Functions provide formal invariance guarantees at inference time; STL monitors for temporal safety specifications.                                                                                                                                                                                                                                                                                                                    |
| **Scientific discovery (equation discovery, symbolic regression)**            | 4.2                                 | AI Feynman, PySR                              | Neural-guided search over expression trees; exact evaluator as fitness oracle. See also FunSearch (§4.3.6) for program-level discovery.                                                                                                                                                                                                                                                                                                               |
| **Interpretable medical AI (regulated classification)**                       | 4.1                                 | CBMs (Concept Bottleneck)                     | Symbolic concept bottleneck enforces interpretable intermediate representations; supports expert test-time intervention.                                                                                                                                                                                                                                                                                                                              |
| **Structured output generation** (SQL, JSON, code)                            | 4.1 (Constrained Decoding / PICARD) | PICARD                                        | Symbolic grammar masks invalid tokens at each decoding step; enforces output lies within the formal language as a hard constraint.                                                                                                                                                                                                                                                                                                                    |
| **Causal discovery & counterfactual reasoning**                               | 4.3 (DECI / CITRIS)                 | DECI, CITRIS                                  | Symbolic DAG encodes causal structure; neural components learn mechanism parameters; enables do-calculus interventional queries.                                                                                                                                                                                                                                                                                                                      |
| **Mathematical reasoning with step verification**                             | 4.1 / 4.3 (PRM + STaR)              | PRM, STaR                                     | Symbolic step oracle (PRM) guides beam search; STaR bootstraps reasoning chains via answer-correctness oracle filtering.                                                                                                                                                                                                                                                                                                                              |
| **Vision-to-planning from raw images**                                        | 4.3 (Latplan)                       | Latplan                                       | Neural propositionalizer discretizes pixel observations into symbolic state; classical planner solves in symbolic space.                                                                                                                                                                                                                                                                                                                              |
| **Logic puzzle / formal deductive reasoning**                                 | 4.2 (LOGIC-LM / SatLM / LINC)       | LOGIC-LM, SatLM, LINC                         | Neural LM generates FOL/SAT/first-order logic encoding; symbolic solver (Z3, Prover9) certifies or refutes; symbolic output is guaranteed correct.                                                                                                                                                                                                                                                                                                    |
| **Protein structure prediction & design**                                     | 4.1                                 | AlphaFold 2, RFdiffusion                      | AlphaFold 2: SE(3)-equivariant geometry with stereochemical hard constraints (bond lengths, angles, Ramachandran boundaries) enforced post-prediction; RFdiffusion: diffusion conditioned on functional specifications (binding site, symmetry) as symbolic structural priors. Together they form a predict → verify → generate pipeline. *Distinct from drug discovery (ligand binding); this row covers folding and de novo backbone design.*       |
| **Euclidean geometry theorem proving**                                        | 4.3                                 | AlphaGeometry                                 | Neural LM proposes auxiliary constructions (points, lines, circles); symbolic DDAR engine derives algebraic consequences via angle/ratio chasing. Neither component succeeds alone. Solved 25/30 IMO geometry problems — gold-medal-level performance on geometry (Trinh et al., *Nature* 2024).                                                                                                                                                      |
| **Probabilistic NeSy (uncertainty-aware structured prediction)**              | 4.2                                 | DeepProbLog, Scallop, A-NeSI                  | Neural predicates provide soft probabilistic evidence to probabilistic logic programs; trained end-to-end by differentiating through exact or approximate probabilistic inference. Outputs are calibrated probability distributions, not hard decisions. Use when your symbolic knowledge is a probabilistic model (distributional semantics, relational uncertainty) rather than a hard constraint.                                                  |
| **RL reward design (dexterous manipulation, complex control)**                | 4.3                                 | Eureka                                        | LLM (GPT-4) generates Python reward functions; RL training provides symbolic task-metric feedback; iterative refinement loop terminates when reward exceeds human-designed baseline. Achieved expert-level performance on 83% of 29 RL environments, outperforming human-authored rewards on pen spinning and other dexterous tasks (Ma et al., arXiv:2310.12931, 2023).                                                                              |
| **Neural combinatorial optimization (routing, scheduling, packing)**          | 4.2                                 | Pointer Networks, Attention Model (AM)        | Learned pointer/attention policy constructs solutions token-by-token; symbolic feasibility checker (constraint propagation or penalty) ensures valid combinatorial solutions at each step. Applicable to TSP, VRP, job-shop scheduling without an explicit solver; performance degrades on instances far from the training distribution.                                                                                                              |
| **LLM alignment & safety**                                                    | 4.1                                 | RLHF, Constitutional AI, DPO, NeMo-Guardrails | *Training-time:* human preference rankings or constitutional principles (symbolic preference signal) shape neural weights via PPO/RLAIF or direct preference optimization. *Inference-time:* symbolic dialogue policy (Colang DSL in NeMo-Guardrails) enforces runtime constraints as a state machine, blocking policy-violating outputs regardless of generation probability. Both are §4.1 — the symbolic component constrains the neural behavior. |

***

## Warning Signs: When Neuro-Symbolic Is NOT the Right Choice

Neuro-symbolic systems add engineering complexity. Before committing to this approach, check:

**Skip neuro-symbolic if:**

* The task has no structured domain knowledge (pure signal processing, raw text generation with no correctness criterion).
* Your training data is large and rich enough that the symbolic constraints you would add are already encoded in the data distribution — a transformer with the right training objective may match or exceed NeSy performance with far less engineering overhead (cf. ablation studies in Scallop; Yang et al., PLDI 2023; Dreyer et al., EMNLP 2023).
* Your latency requirements are incompatible with symbolic reasoning overhead (sub-millisecond response with complex formal verification).
* The symbolic component's domain model is unavailable and prohibitively expensive to acquire.
* The failure modes of pure neural approaches are acceptable in your deployment context.

**The 80/20 rule:** In most production settings, 80% of reliability improvement can be achieved with simple constraint layers (Semantic Loss, projection layers) — the easiest form of neuro-symbolic integration. Start there before committing to a full hybrid architecture.

***

## Quick-Start Decision Checklist

Use this checklist before architectural commitment:

* [ ] I have identified which failure modes of my current system require symbolic correction.
* [ ] I have specified the symbolic knowledge I will use (constraints, domain model, KG schema, proof assistant).
* [ ] I have defined the neural-to-symbolic interface (scene graph, PDDL file, KG triple, proof context).
* [ ] I understand the computational overhead of the symbolic component and it is acceptable.
* [ ] I have a plan for keeping the symbolic knowledge current as the domain evolves.
* [ ] I have identified which component provides correctness guarantees and which provides efficiency.
* [ ] I have a fallback plan if the neural component degrades (distribution shift, adversarial inputs).
* [ ] I have defined how I will evaluate the system's formal guarantees in production.
* [ ] I have determined whether my symbolic knowledge is deterministic (hard constraints → §4.1) or probabilistic (distributional rules, relational uncertainty → §4.2 probabilistic NeSy).

***

> The right neuro-symbolic architecture is not the most sophisticated one — it is the simplest one that provides the formal guarantees your deployment context requires. Start with the constraints your system must satisfy, and let those constraints select the paradigm.

*See Chapter 5 (Section 5.4) for detailed starting points for each architectural pattern. See Appendix A for planner comparisons and benchmark resources.*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://neurosymbolicai.gitbook.io/neuro-symbolic-ai-in-practice/part-v-decision-guide/chapter-6-decision-guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
