6.5.9 · D1Research Frontiers & Practice

Foundations — Neuro-symbolic AI

3,900 words18 min readBack to topic

Before you can read the parent note, you need to own every squiggle it uses. Below, each symbol is built from nothing: plain words → a picture → why the topic can't live without it. Read top to bottom; each one leans on the one above.


1. The two half-blind machines

Figure s01 — the red bridge. The two boxes are the two machines. The neural box (left) turns a raw photo into a symbol with a confidence, "cat" 0.8. That number rides across the red arrow — the differentiable bridge — into the symbolic box (right), which then reasons with rules to reach a conclusion. Every remaining section of this page builds the machinery that makes that red arrow work: the soft numbers, the soft logic, and the loss that trains it. Keep this picture in mind — it is the whole topic in one diagram.

See how the two are complementary: neural architectures provide the eyes, and structured knowledge like knowledge graphs provides the rulebook.


2. Numbers, sets, and the little index gadgets — and what a "loss" is

Before any formula, a few tiny notations appear everywhere.


3. Predicates and variables — the smallest logical fact

We meet predicates before probability, because the soft truth value in §4 attaches a number to exactly these statements.

A predicate is either true or false once its blanks are filled — that is what §4 will soften into a number. This relational, slot-filling view is exactly the thinking behind knowledge graphs.


4. Probability and the soft truth value

Why does this matter so much? Because a symbolic rule wants a crisp TRUE/FALSE, but a neural network only ever hands you a slider position. The entire trick of the field is: treat that slider position AS a truth value. A truth of means "80% true."

Figure s02 — probability as a slider. The black track runs from (definitely no) on the left to (definitely yes) on the right. The red bar fills the track up to the value , and the red dot marks the position: . Read confidence as "how full the bar is." This one picture is what every and every on this page means.


5. Logic operators — and how they go soft

Classical logic uses connectors that glue predicates together. Learn them as plain English first.

Now the problem the topic solves: those are jumps — true suddenly flips to false. Jumps have no slope, and neural learning needs slope (see §7). So we relax each operator into a smooth version that works on the slider values of §4:

Figure s03 — why we soften. The black line is the hard AND, : notice the sharp kink at (marked with a dot) — a corner where no single slope exists, so a gradient can't be read off it. The red line is the soft AND, : it bends smoothly, so at every point there is a well-defined slope to roll down. That smoothness is the entire reason we replace / with products.


6. Turning a rule into a penalty — building

Here is the recipe the parent note assumes but never spells out: how a fuzzy rule becomes a number you can minimise.

This penalty-from-logic construction is what makes symbolic knowledge learnable, and it is the same soft-constraint idea that powers the interpretability goals of explainable AI and the data-thrift of few-shot learning.


7. Why "differentiable" is the magic word

Everything above bends toward one goal. Here is the chain of reasoning.

Recall Why the product t-norm, and not another?

"Soft AND " is one choice of t-norm (a family of soft-AND functions). Common alternatives: Gödel (AND , OR ) — matches hard logic exactly but has flat regions and kinks, so gradients often vanish or are ambiguous; Łukasiewicz (AND ) — has clean constant gradients where active and models "how much evidence is left over," but saturates to abruptly and loses gradient there. The product t-norm is popular because it is smooth everywhere and its gradient with respect to one input equals the other input (), so each premise gets feedback proportional to how true its partner is. Its weakness is the vanishing-gradient shrink above, which is why log-space computation is the usual companion. There is no universally best norm — it's a design choice trading smoothness, gradient strength, and faithfulness to crisp logic.


The prerequisite map

Numbers and sliders 0 to 1

Probability p

Fuzzy truth mu

Predicates and rules

Forward chaining on F

Sum subscript loss ell

Loss L data

Soft AND OR NOT implication

Symbolic loss

Combined objective

Gradient descent on theta

Neuro-symbolic AI

Read the map bottom-right: the two arms — a differentiable objective and soft forward chaining — both feed the parent topic Neuro-symbolic AI. Every box above is a symbol you now own.


Equipment checklist

Test yourself. Cover the right side and answer each.

What does mean?
The -th item in a numbered list; is just a counter.
What is a label ?
The correct answer (the human-written tag) for training example number .
What is a loss, and what does measure?
A number scoring badness; compares the network's guess to the true label — small means close.
What do and stand for?
is the bundle of all the network's tunable dials; is the network as a function whose output depends on .
What does tell you to do?
Add the thing on its right for every from 1 up to .
What is the difference between and ?
adds numbers; collects things into one set with no repeats.
What is a predicate ?
A fill-in-the-blank fact template whose blanks you fill with real names.
What range must a probability live in, and what do the ends mean?
; = definitely no, = definitely yes.
What is and how does it relate to probability?
The soft truth degree in of the predicate ; a probability used as "how true this fact is."
Give the soft (product t-norm) forms of AND, OR, NOT.
; ; .
Derive the soft OR from soft AND and NOT.
De Morgan: .
Give the soft form of implication .
.
How do and soften, and why is plain a problem?
, ; but they have kinks, so use log-sum-exp / softmax with sharpness for a smooth stand-in.
What is and what does the superscript in mean?
is the current bag of believed facts; is that bag after rounds of rule-firing (a time stamp, not a power).
How do you turn a rule into a penalty, and what is ?
Penalise — zero when satisfied; is the rule's importance weight you choose.
Write over a dataset.
.
Why can't we train with hard logic (min/max jumps)?
Jumps/kinks have no slope, and gradient descent needs a slope to roll downhill.
What is the vanishing-gradient danger of the product t-norm, and one fix?
Multiplying many sub-1 truths shrinks toward 0 with tiny gradients; fix by computing in log-space (sum of logs) or switching t-norm.
What does control in ?
The volume knob balancing rule