Installs into .claude/skills of the current project.
Are you the author of Neural Structural Reasoner?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hiyenwong-neural-structural-reasoner)
---
name: neural-structural-reasoner
description: Brain-inspired KG reasoning via layered neuron dynamics.
category: ai_collection
---
# Neural Structural Reasoner (NSR) — Reasoning over Structured Knowledge with Coupled Neuronal Populations
Source: arXiv:2609.36620 (Jia, Pan, Ji — Beijing Institute for Brain Research, CAMS & CIBR, 29 Sep 2026).
Use when: knowledge-graph link prediction needs interpretable multi-hop traces; building structured-reasoning substrates that keep relational topology in network connectivity instead of flat embeddings; extracting latent compositional rules (r1∘r2⇒r3) and relational hierarchies from triples; mechanistic alternatives to LLM/GNN reasoning over KGs.
## Core idea
Relational structure lives in the **connectivity and dynamics of four coupled neuron layers** — never collapsed into embedding vectors. Reasoning = a sequence of discrete, human-readable activation steps (path-integration-inspired state transitions in relational space, echoing entorhinal grid-cell models). The activation trajectory IS the computation, so every inference is auditable by inspecting which relation/entity neurons fired.
## Architecture (4 layers, bidirectional hierarchy LE ↔ LZ ↔ LR ↔ LC)
1. **Entity Layer LE**: N neurons {e_i}, one per entity.
2. **Reasoning Layer LZ**: up to N×(2M) neurons z_ik encoding (head entity h_i, relation r_k) associations — the relational state space where path integration happens.
3. **Relation Layer LR**: 2M neurons — first half forward relations, second half inverses r⁻¹ (e.g. father_of ↔ son_of coupled via Hebbian learning).
4. **Composition Layer LC**: sequence-selective neurons c_pq detecting ordered relation chains (functionally analogous to direction-selective motion detectors in visual cortex).
Dynamics: single-step sigmoid updates X(t+1) = σ(W·X(t) + I) with **Heaviside gating H** on intra-LZ/LR/LC projections — activity propagates only on convergent inputs from the associated entity AND relation (conjunction detection, not passive diffusion).
## Triple encoding (bidirectional, Eq. 3)
For each (h_i, r_k, t_j), encode BOTH the triple and its inverse (t_j, r_k⁻¹, h_i):
- W_ZZ(z_ik, z_jk+M) = W_ZZ(z_jk+M, z_ik) = 1
- W_ZR(z_ik, r_k) = 1; W_ZR(z_jk+M, r_k+M) = 1
LE↔LZ couplings for the same entity are fixed at init; all other weights start at 0 and are learned.
## Learning (Hebbian, no backprop)
1. **Relational equivalence** (symmetrized Oja's rule): query all triples sharing a head entity; co-activated inverse-relation neurons (via shared tails t_j = t_w) get coupled:
Δw_ij = δ(r_i ∗ r_j) − µ(r_i² + r_j²)·w_ij
→ semantically analogous relations (e.g. embassy ≈ weightedunvote⁻¹ in Nations) become strongly coupled.
2. **Symmetric/inverse relations**: same dynamics, set r_l = r_l⁻¹ (symmetry) or r_l = r_m⁻¹ (inversion).
3. **Compositional rules via closed-loop detection**: enumerate two-hop chains; if (h_i, r_p, x_p) ∧ (x_p, r_q, x_q) ∧ (x_q, r_k⁻¹, h_i) closes a 3-step loop, then r_p∘r_q ⇒ r_k. Register with LC sequence neuron c_pq (asymmetric-delay coincidence detection: fires only on ordered (r_p, r_q) activation) coupled to c_k by the same Oja-like rule. Decay term controls for baseline occurrence rates.
## Offline acceleration for static KGs (Alg. 3 — key efficiency result)
Per-experience Hebbian updates admit an **exact closed form**: with adjacency matrices A_r̃ ∈ {0,1}^(N×N) per extended relation (forward+inverse), two-hop experiences = sparse product S_ij = A_r̃i·A_r̃j (zero diagonal), and the final weight is the empirical mean
w^CC_(k−ij) = ⟨A_rk, S_ij⟩_F / Σ_(h≠t) S_ij[h,t]
Computed in ONE pass over encoded weights — no dynamics simulation. Returns evidence counts n_ij alongside weights; gates τ_s (min evidence) and τ_c (min weight) act only at query readout. **3 s training on Nations, 0.3 h on YAGO3-10** — orders of magnitude below neural baselines (NCRL 11.9 h, RNNLogic 4.5 h on YAGO).
## Reasoning (5 steps, Eq. 8)
Given query (h_i, r_k, ?) not in training set:
1. Activate r_k in LR; one LR-dynamics iteration → equivalent relations {r_e} above threshold T_thresh; activations = path-support scores S_R.
2. Activate e_i while holding {r_e}; LZ dynamics → candidate tails T̃⁽¹⁾ read out in LE.
3. Re-init; r_k → LC dynamics → top-K equivalent compositions {c_e} with scores S_C.
4. For each c_e: sequential LR chain activation r_p1,…,r_pℓ + e_i → multi-hop LZ traversal; keep grounded paths + terminal entities.
5. Aggregate per candidate tail: Score(t_j) = max or sum of path-support scores over all grounded paths reaching t_j (mode selected on validation; max risks single spurious paths, sum overcounts correlated paths). Scores rank candidates — NOT calibrated probabilities.
## Results (filtered link prediction, PyKEEN benchmarks)
| Benchmark | NSR MRR / H@1 | Best baseline | NSR train time |
|---|---|---|---|
| Nations | 0.8142 / 71.64 | AMIE 0.8559 | 3 s |
| YAGO3-10 | 0.5893 / 52.80 | ConvE 0.6365 | 0.3 h |
| FB15k-237 | 0.3649 / 28.45 | ConvE 0.4095 | 0.6 h |
| Kinship | 0.6515 / 54.21 | ConvE 0.7927 | 11 s |
Honest profile: dataset-dependent strengths (near-top on Nations/YAGO), weaker on Kinship — NOT uniformly superior. The sell is the accuracy/efficiency/interpretability trade-off.
## Emergent latent structures
- **Compositional hierarchy**: chain exportbooks + releconomicaid → embassy gets confidence 0.93 (coherent diplomatic pathway) while embassy∘embassy fails despite high frequency — composition is context-sensitive, not co-occurrence counting.
- **Relational organization of entities**: PCA on W_ZZ connections recovers geopolitical structure (Cold War blocs: Western core UK/USA, Eastern core USSR/China, non-aligned Jordan/Egypt/India/Brazil) — unsupervised, from connectivity alone.
- One-shot deterministic rules: on Kinship1990_EXTENDED, confidence 1 after a single observation when prior logical constraints enter via hyperparameters.
## Limitations (authors' own)
Discrete, symbolically specified triples only — no temporal/hyper-relational/noisy KGs yet; entities and relations must be pre-symbolized (needs coupling to extraction modules); compositional-rule discovery scales combinatorially (needs sparse activation / approximate retrieval / learned proposals for larger graphs and longer chains); robustness to missing/contradictory triples untested.
## Implementation notes
- Datasets via PyKEEN; evaluate filtered MRR + Hits@1/3.
- Thresholds T_thresh, τ_s, τ_c and aggregation mode (max/sum) are validation-selected — the main hyperparameters.
- Gating matters: without Heaviside rectification in LZ, activity diffuses without conjunction semantics.
- For online/continual learning use per-experience updates (Alg. 2); for static graphs always use the closed-form Alg. 3 — same weights, no simulation.
- Interpretability demo: track LR→LZ→LE activation sequence per query; errors are auditable at the step where the trace diverges.
## Related skills
- `hpc-mec-world-model`, `vacoal-hippocampal-memory` — hippocampal-entorhinal scaffolds (TEM/Vector-HaSH lineage that NSR extends to high-dimensional relational domains)
- `spiking-tolman-eichenbaum-machine` — TEM-style path integration, the 2D precursor NSR generalizes
- `mcts-encoding-discovery-qml` — structure-aware search over compositional spaces