CEREBRUM is a training-free knowledge graph question answering (KGQA) framework that performs multi-hop reasoning via deterministic beam-search traversal guided by a 10-parameter Community-Structured Attention (CSA) formula.
Unlike supervised KGQA systems (EmbedKGQA, UniKGQA, NSM), CEREBRUM requires no labeled question-answer pairs, no gradient steps, and no dataset-specific configuration. Load any knowledge graph formatted as (head, relation, tail) triples and query it immediately.
Every answer includes the complete hop-by-hop reasoning path, every edge traversed, every score assigned, making the full reasoning process auditable, reproducible, and provable. The accuracy numbers (60.6% H@1 on MetaQA 3-hop, 87.9% H@10, 100% on Hetionet disease_associates_gene) are evidence for the above properties, not the headline.
What matters depends on who you are.
The claim
The evidence
Researchers
Your result is falsifiable. Every one.
Full hop-by-hop path, CSA weight per edge, community votes, pruned candidates — every answer is a complete reasoning record. Deterministic: same query, same graph → same path every time.
Scientists
You can't cite a hallucination. We don't make them.
Structural impossibility: answers can only be entities reachable via real graph edges. On Hetionet: 100% H@1 on disease_associates_gene, 95.3% 1-hop average, full provenance per answer.
Engineers
Load a CSV. Query immediately. Zero configuration.
ParameterInitializer derives all 9 scoring parameters from graph statistics in one O(E) pass. Adapters for CSV, Neo4j, RDF/SPARQL, NetworkX.
Students
$0.001 per 1K queries. No API key. No GPU.
Compute only. Runs on a laptop. Zero-config baseline: 56.8% H@1 on MetaQA 3-hop with no tuning. AGPL-3.0 — free for academic use.
Key Properties
Property
Value
Training required
None
Hallucination risk
0% (deterministic graph traversal)
Reasoning transparency
Full hop-by-hop trace
Knowledge graph formats
CSV, Neo4j, RDF/SPARQL, NetworkX
Cost per 1K queries
~$0.001 (compute only)
GPU required
Optional (CPU-capable, GPU-accelerated)
Benchmark Results
MetaQA, 3-hop (14,274 test questions)
System
3-hop H@1
3-hop H@10
MRR
Training
CEREBRUM v2.88.0 (full pipeline)
60.6%
87.9%
0.703
None
CEREBRUM (search only)
12.5%
50.3%
—
None
UniKGQA (Jiang et al., 2023) †
99.1%
—
—
Supervised
EmbedKGQA (Saxena et al., 2020) †
~94%
—
—
Supervised
MINERVA (Das et al., 2018) †
—
45.6%
—
RL-trained
GraftNet (Sun et al., 2018) †
22.8%
—
—
Supervised
† Black-box model: no auditable reasoning path; can produce confident wrong answers.
Note on the H@1 gap: The gap to supervised H@1 (99% vs 60.6%) is a ranking challenge, not a retrieval failure. CEREBRUM places the correct answer in its top-10 candidates 87.9% of the time, matching supervised recall, while requiring zero training data and returning a full reasoning trace.
Test split: 14,274 3-hop questions (full evaluation)
Graph regime: hub_homogeneous (all seeds are movie entities)
Hetionet, Biomedical KG (998 QA pairs, 6 templates)
Hetionet is a biomedical knowledge graph with 47,031 entities, 2,250,197 edges, and 24 relation types. Phase 209 full canonical validation (200q/template, sentence-transformers).
Hop
H@1
Notes
1-hop
95.3%
disease→gene, gene→pathway, compound→disease
2-hop
53.0%
disease→gene→pathway (+10pp vs random with sentence embeddings)
WebQSP is the standard benchmark for 2-hop open-world KGQA. The graph contains 3.79M entity-name triples from Freebase, 989 distinct relation types, typed-heterogeneous regime.
Why WebQSP is hard for training-free systems: Freebase uses CVT (compound-value-type) mediator nodes with opaque MID identifiers that break semantic attention on indirect 2-hop paths. The hop-reachability diagnostic showed 43.5% of beam misses are direct 1-hop neighbors pruned at beam_width — G1P targets this entire population.
CEREBRUM reasons over a knowledge graph in three stages:
1. Graph Profiling, At build time, GraphProfiler analyzes the loaded graph: degree distribution, hub score, community modularity Q, and relation fan-out statistics. This auto-configures traversal strategy (hub_homogeneous, typed_heterogeneous, or mixed).
2. Community-Structured Attention, During traversal, each candidate edge is scored by the 10-parameter CSA formula, a sigmoid over a weighted sum of graph-structural features:
Feature
Role
Semantic similarity
Cosine distance between query and candidate entity
Community score
Structural membership in the traversal's target community
Edge-type weight
Per-relation importance derived from graph schema
Distance penalty
Penalizes edges that move away from the target
Hop decay
Reduces score as depth increases
PageRank
Global node importance prior
Temporal decay
Recency of the edge in time-stamped graphs
Node recency
How recently the node was visited in the beam
Synthesis-density penalty
Discounts over-reliance on synthesized edges
Grounding confidence
Provenance confidence of the underlying triple
3. Beam Traversal + Answer Extraction, Beam search (default width 10) follows the highest-scoring paths up to max_hop steps. The Schema-Derived Relation Boost (SDRB) dynamically upweights relations with high fan-out based on graph statistics, without any dataset-specific tuning.
Novel Contributions
CEREBRUM introduces six original algorithmic contributions:
Community-Structured Attention (CSA), 10-parameter training-free attention formula using graph community topology as discrete attention heads.
Principled Hyperparameter Initialization (ParameterInitializer), Maps all 9 scoring parameters to measurable graph statistics via Bayesian evidence combination (branch_bonus ≈ 0.17), IDF theory (idf_weight = cv_d × 0.01), and Newman-Girvan modularity (vote_weight = 0.72 + 0.15·Q).
Experience-Dependent Graph Plasticity (Bridge Twins + STDP), Relay nodes form automatically on frequently-traversed inter-community paths, mimicking synaptic potentiation without training.
fANOVA Variance Decomposition Finding, Systematic fANOVA analysis of 200 tuner trials reveals branch_bonus accounts for 46.2% of scoring variance vs. 1.2% for beam width, 39× more influential. Per-relation tuning was masking this signal entirely.
PathSchemaIndex, Training-Free Pre-Traversal Schema Prediction (Phase 236), The first predictive reasoning signal in CEREBRUM. All prior signals steer or re-rank after beam traversal. PathSchemaIndex predicts the most likely (r1, r2) 2-hop relation path before any traversal begins, by encoding all graph schemas as natural-language embeddings and finding the closest match to the question embedding. Predicted schemas execute as targeted 2-hop traversals in parallel with the beam, adding high-precision candidates the beam may have pruned. The seed-filter (only schemas whose r1 is actually present on the seed entity) eliminates structurally inapplicable matches. On WebQSP: +3.5pp H@1 (6.0% → 9.5%), +4.0pp H@10.
BeamCheckpoint, Parameter-Free Structural Expansion Cache (Phase 241), Inspired by Behrouz et al. (2026) Memory Caching (arXiv:2602.24281), which proposes caching RNN hidden-state checkpoints so that recurrent models gain growing memory without re-processing the full input sequence. BeamCheckpoint applies the dual principle to graph traversal: the raw neighbor expansion at each hop is parameter-free (graph structure is fixed), so it is cached per entity and reused across any re-traversals with different CSA parameters. The scoring pass is then applied on the cached structural expansion, cleanly separating structure (what nodes are reachable) from attention (which ones to select). This eliminates redundant graph I/O for repeated seeds across tuner trials. The companion Sparse Selective Engram Consolidation (EngramConsolidator.sparse_consolidate()) applies the same sparsity principle to the Engram cache: instead of promoting all relation sequences above a count threshold, patterns are ranked by usage × confidence and only the top-k are materialized as canonical engrams.
Installation
bash
1# Core engine with API and embeddings2pip install cerebrum-kg-core[api,embeddings]34# Full install including Studio UI5pip install cerebrum-kg-core[all]6pip install cerebrum-kg-studio
1from core.cerebrum_graph import CerebrumGraph
23# Load any knowledge graph4graph = CerebrumGraph.build("my_graph.csv")56# Query with full trace7results = graph.query("What compound treats Diabetes?", max_hop=3)89for r in results:10print(f"Answer: {r.entity} Score: {r.score:.3f}")11for hop in r.path:12print(f" → {hop.relation} → {hop.entity}")
Supported Knowledge Graph Formats
Format
Adapter
Notes
CSV (head, relation, tail)
CSVAdapter
Default; zero config
Neo4j
Neo4jAdapter
Bolt protocol
RDF / SPARQL
SPARQLAdapter
Any SPARQL endpoint
NetworkX
NetworkXAdapter
In-memory graphs
Hetionet (biomedical)
CSVAdapter
Validated: 47,031 nodes, 24 relation types
Use Cases
Healthcare / Pharma, Drug-disease reasoning over biomedical KGs (Hetionet). Every conclusion citable to a specific graph edge.
Legal, Case law and regulatory graphs. Full audit trail built-in.
Financial, Entity relationship graphs for compliance. Reproducible reasoning.
Scientific Research, Autonomous hypothesis generation with literature validation.
Any domain, Load your own (head, relation, tail) CSV and query immediately.
Behrouz, A., Li, Z., Deng, Y., Zhong, P., Razaviyayn, M., & Mirrokni, V. (2026). Memory Caching: RNNs with Growing Memory. arXiv preprint arXiv:2602.24281. https://doi.org/10.48550/arXiv.2602.24281
Das, R., Dhuliawala, S., Zaheer, M., Vilnis, L., Durugkar, I., Krishnamurthy, A., Smola, A., & McCallum, A. (2018). Go for a walk and arrive at the answer. ICLR 2018. https://openreview.net/forum?id=Syg-YfWCW
Himmelstein, D. S., et al. (2017). Systematic integration of biomedical knowledge prioritizes drugs for repurposing. eLife, 6, e26726. https://doi.org/10.7554/eLife.26726
Newman, M. E. J., & Girvan, M. (2004). Finding and evaluating community structure in networks. Physical Review E, 69(2), 026113. https://doi.org/10.1103/PhysRevE.69.026113
Organizations that cannot comply with the AGPL's source-disclosure obligations (e.g., proprietary SaaS deployments) may obtain a commercial exception license. Inquiries: bryan.buchorn@gmail.com