geDIG $\mathcal{F} = \Delta EPC - \lambda(\Delta H + \gamma \Delta \beta_1)$

A structural fitness score for knowledge graphs —
can one equation decide when to restructure? Three independent structures: $\Delta EPC \approx$ "metric (distance)", $\Delta H \approx$ "measure (probability)", $\Delta \beta_1 \approx$ "topology (loops)" $\mathcal{F} < 0$ means information gain exceeds structural cost — the system should commit the change. Maze: 60% → 98% goal-reach (15×15). Transformer: F tracks model quality across 8 models.

$\Delta EPC$ (Metric) $\Delta H$ (Measure) $\Delta \beta_1$ (Topology) Helmholtz F = E − TS

Visual Intuition

Why does F need three terms? Same edit cost. Completely different outcomes.

Case A — Insight
EPC1
$\Delta\beta_1$+1
$\Delta H$+0.4
F −0.4
F < 0 → Commit
Case B — Routine
EPC1
$\Delta\beta_1$0
$\Delta H$+0.3
F +0.7
F > 0 → Reject
Case C — Collapse
EPC1
$\Delta\beta_1$−1
$\Delta H$−0.2
F +2.2
F > 0 → Reject

All three cases have EPC = 1, yet $\Delta\beta_1$ diverges to +1, 0, −1. KL divergence sees only $\Delta H$ and cannot distinguish Case A from B. F sees all three.

(λ = 1, γ = 1)

Interactive Graph Demo — see F in real-time as a graph grows

Visualizing "The Pulse"

Real-time simulation of the gauge $\mathcal{F}$ as the graph grows.
Click anywhere in the graph to inject a new query node and see if it triggers an Insight (DG) or Ambiguity (AG).
AG (Ambiguity Gauge): 0-hop error (High Cost).
DG (Discovery Gauge): Multi-hop shortcut (Insight Found).

Observation Guide:
  • Click near a cluster: $\Delta EPC$ is low, but $\Delta IG$ is also low. $\mathcal{F}$ stays high (Reject).
  • Click between clusters: If a shortcut is found, $\Delta SP$ spikes (negative cost), driving $\mathcal{F} < \theta$ (Insight!).
IDLE
Click to Add Node
Base Node
Query
1-hop (Ego)
2-hop+ (Insight)

Gauge Telemetry

Structural Cost ($\Delta EPC$) --
wiring cost (normalized)
Information Gain ($\Delta IG$) --
Entropy ($\Delta H$) --
Shortcuts ($\Delta SP$) --
Total Gauge ($\mathcal{F}$) --
Threshold: < 0.30 IDLE
Manual Override

Use Cases

Where can a single thermodynamic gauge make a difference?

Multi-Hop QA (RAG)

F acts as an accept/reject gate for retrieved information. AG detects novelty; DG validates structural integration. Tested on HotPotQA with real LLM inference.

Result (GPT-4o-mini, dev-500)
EM 38.0%
F1 53.7%
Status: Archived experiment

Autonomous Graph Navigation

A partial-observation maze agent builds a persistent knowledge graph. F decides when to explore (AG) vs. exploit (DG). Wake-Sleep-Wake cycle with three-layer search.

Result (15×15 maze, 12 seeds)
Goal-reach 98%
Baseline ~60%
Experiment code →
Status: Active & reproducible

Transformer F-Trajectory

Layer-by-layer $\mathcal{F}$ decomposition across hidden states. Tests whether F tracks model quality as a structural signature.

Result (8 models)
GPT series shows monotonic improvement in $\Delta R^2_{\text{struct}}$ with model scale.
Experiment code →
Status: Preliminary

The Mechanism

Two gates govern intelligent processing. One equation drives both.

AG/DG Gating

AG

Attention Gate

"Is this surprising?" — 0-hop novelty detection. When prediction diverges from input, AG fires and triggers processing.

Computational analogy: noradrenaline

DG

Decision Gate

"Does $\mathcal{F}$ decrease?" — Multi-hop structural validation. If restructuring reduces F, the system commits the change.

Computational analogy: dopamine

*The neurotransmitter correspondence is a computational analogy, not a physiological claim.

Theoretical Backbone

FEP-MDL Bridge

0-hop (AG) Ambiguity / Error → FEP
Multi-hop (DG) Compression / Insight → MDL
"Operational Correspondence"

geDIG provides an operational correspondence between the Free Energy Principle (minimizing surprise) and Minimum Description Length (maximizing compression).

*This is an operational analogy, not a formal proof of equivalence.

Experiments & Results

Empirical tests of F across different domains.

Experiment Scale Key Result Status
Maze 15×15 12 seeds, 250 steps 98% goal-reach (baseline ~60%) Reproducible
Maze 25×25 Active Graph-persistent DG + 10D vector extension In progress
HotPotQA dev-500, GPT-4o-mini EM=38.0%, F1=53.7% Archived
Transformer F-decomp 8 models GPT series: $\Delta R^2_{\text{struct}}$ improves with scale Preliminary

Reproduce (Maze 15×15)

Requires .venv with networkx, numpy, etc.

.venv/bin/python3 experiments/maze/run_experiment_query.py \
  --maze-size 15 --max-steps 250 --seeds 12 \
  --search-mode threelayer --vector-mode extended

See experiments/maze/README.md for full CLI reference.

Resources

Papers, code, and open questions.

Paper

Research Paper

"geDIG: Gauge what Knowledge Graph needs"

v6.0 Draft
Code

Source Code

miyauchikazuyoshi/InsightSpike-AI

Research framework for the thermodynamics of intelligence

View Repository Browse Experiments

Quick Start

Install: pip install -e .

Test: make test

Open Research Questions

We welcome collaboration on these specific questions:

  • F-trajectory reproduction:
    Does F show structured layer-wise behavior on untested models?
  • β₁ vs SP as structural term:
    When does topological Δβ₁ outperform metric ΔSP? TDA expertise welcome.
  • Scaling to 70B+ models:
    We hypothesize (λ, γ) converge at sufficient scale. GPU resources needed.

How to engage: open an Issue, PR, or DM on X: @kazuyoshim5436.

Citation (BibTeX)

@article{miyauchi2025gedig,
  title={geDIG: Gauge what Knowledge Graph needs},
  author={Miyauchi, Kazuyoshi},
  year={2025},
  journal={GitHub repository},
  url={https://github.com/miyauchikazuyoshi/InsightSpike-AI}
}

See also: geDIG spec, Matchstick Figure.