6.5.9 · D3Research Frontiers & Practice

Worked examples — Neuro-symbolic AI

3,434 words16 min readBack to topic

Before we compute anything, we must be sure every symbol is earned. Several live here.

Now the machine. A handful of continuous operators do all the work; we define them on the light-slider .


The scenario matrix

Every worked example below is tagged with the matrix cell it fills. The matrix is organised by the sign / magnitude of the violation the rule produces, plus the special inputs a logic engine can hit.

Cell What makes it special Where it bites Example
A Violation rule broken, gradient nonzero constraint pushes network Ex 1
B Violation (satisfied) floor active, gradient dies why training goes quiet Ex 2
C Violation (over-satisfied) , floor masks the slack subtle no-op case Ex 2
D Chained soft-AND, many terms products shrink toward vanishing-confidence trap Ex 3
E Mutual-exclusivity (two-sided) both classes fight for mass one-hot enforcement Ex 4
F Degenerate fact premise unknown/false inference produces nothing Ex 5
G Certain fact premise fully true rule fires cleanly Ex 5
H Fixed-point / limiting behaviour forward chaining converges when to stop iterating Ex 6
I Real-world word problem end-to-end pipeline loan-approval story Ex 7
J Exam twist sign trap + weighting the "gotcha" Ex 8

Prerequisites this page leans on: 6.1.03-Neural-Network-Architectures (what and backprop are), 6.2.04-Knowledge-Graphs (predicates like ), and 6.4.02-Explainable-AI (why interpretable outputs matter). Related frontiers: 6.5.10-Causal-Inference, 6.5.01-Few-Shot-Learning.


Worked examples

Figure — Neuro-symbolic AI

The figure above shows Ex 1 geometrically: the two sliders (pneumonia) and (opacity) on a bar. The blue gap between them is the violation; the arrows show backprop pulling down and up until the bars meet and the gap closes.

Figure — Neuro-symbolic AI

The figure above is the whole story of Cells A–C: the floor against the gap . Look at the pink flat floor on the left — that is where Cells B and C live (gradient dead). The blue rising ramp on the right is Cell A (gradient before weighting, rule actively corrected). The kink at is where a rule flips from "shouting" to "silent".

Figure — Neuro-symbolic AI

The figure above plots how fast decays as the chain length grows: even strong-but-uncertain premises collapse toward , contrasted with the flat line that ignores chain length.

Figure — Neuro-symbolic AI

The figure above shows the two stacked probability bars overshooting the ceiling by (pink excess), then the equal trims that bring the stack exactly to the line.

Figure — Neuro-symbolic AI

The figure above traces the loan pipeline left-to-right: raw features → neural scorer → two probabilities → symbolic rule box → floored violation → weighted penalty → human-readable reject reason.


Recall Self-test — cover the answers

Ex 1 penalty at , gap ? ::: , and is pushed down / up; slope is . The two zeros in Ex 2 — same value, different meaning? ::: Yes: Cell B sits on the boundary, Cell C hides a slack; both give gradient . Soft-AND of ? ::: (vs ). Exclusivity violation for ? ::: , push both down by (least-norm split). The floor vs the merge — same thing? ::: No: is a one-sided penalty floor (one input is ); is the two-input best-evidence OR over truth degrees. Is different from ? ::: No — identical slider; names a classifier output, names a logic truth degree. Grandparent link with a premise? ::: — nothing inferred (Cell F). Forward-chaining rounds for a 3-person chain? ::: (last round confirms fixed point). Loan penalty at ? ::: . Ex 8 total symbolic loss? ::: — the big- rule was satisfied, so contributed .

Related deep dives to visit next: 4.3.05-Attention-Mechanisms (how NMN modules route attention), 6.5.07-Reinforcement-Learning-Advanced (symbolic reward shaping), 6.5.10-Causal-Inference (rules as interventions). Back to the parent topic.