renormalization-group
A Rust library applying the renormalization group (RG) from statistical physics to multi-scale fleet analysis.
Agents are coarse-grained into block variables at increasing scale; the library tracks how constraint parameters flow under this transformation. Fixed points correspond to self-similar fleet configurations; relevant/irrelevant operators classify which perturbations destabilize the fleet at large scales.
Why RG for Fleet Analysis?
A fleet of autonomous agents has structure at every scale: individual agents form local clusters, clusters form divisions, divisions form the whole fleet. The renormalization group provides the mathematical machinery to systematically integrate out short-scale degrees of freedom and understand which parameters control large-scale behavior.
Key insights from RG thinking:
- Fixed points = self-similar fleet configurations that look the same at every scale
- Relevant operators = perturbations that grow under coarse-graining and dominate large-scale behavior (things you must get right)
- Irrelevant operators = perturbations that wash out at large scales (details that don't matter in the aggregate)
- Universality = different microscopic fleet topologies can produce identical large-scale behavior, meaning the details of individual agent interactions may matter less than you think
Modules
block_spin — Coarse-Graining Transformations
Group nearby agents into blocks and compute block properties (mean belief, aggregate constraint). This is the fundamental RG operation: integrating out short-scale degrees of freedom.
use *;
let agents: =
.map
.collect;
let bt = new;
let blocks = bt.transform;
assert_eq!; // 64/4 = 16 blocks
Three blocking strategies are supported:
- Sequential: agents 0..b, b..2b, etc.
- SpatialNearest: sort by position, then block
- MajorityRule: block spin = sign of mean belief (±1)
flow — RG Flow Equations
Track how coupling parameters evolve under repeated coarse-graining.
use *;
// 1D Ising decimation flow
let flow_eq = new;
let mut flow = new; // K=0.5, h=0
let trajectory = flow.evolve;
// K flows toward 0 (high-temperature fixed point for 1D)
Built-in flow equations:
Ising1DFlow: 1D Ising decimation — K' = atanh(tanh²(K))GaussianFlow: Gaussian (free) theory — r' = b²r, u' = b^(4-d)uWilsonFisherFlow: Wilson-Fisher ε-expansion near d=4
fixed_point — Fixed-Point Detection & Stability
Linearize the RG flow around fixed points. Eigenvalues of the linearized flow determine relevant vs irrelevant directions.
use *;
let flow_eq = new;
let fp = analyze_stability;
// Eigenvalues: b²=4 (relevant), b^(4-3)=2 (relevant in d=3)
assert_eq!;
critical_surface — Phase Boundaries
Identify critical manifolds separating fleet phases (ordered/disordered/critical).
use *;
let flow_eq = new;
let result = determine_phase;
assert_eq!;
universality — Universality Classes
Classify universality classes of fleet behavior. Different fleet topologies with the same RG fixed point exhibit the same large-scale behavior.
Pre-built universality classes with verified critical exponents:
- Mean Field (d ≥ 4)
- 2D Ising (exact Onsager solution)
- 3D Ising (numerical)
- 3D XY (superfluid transition)
- 3D Heisenberg (n=3)
Scaling relations verified:
- Rushbrooke: α + 2β + γ = 2
- Widom: γ = β(δ − 1)
- Fisher: γ = ν(2 − η)
- Josephson: 2 − α = dν
scaling — Finite-Size Scaling
Critical exponents, scaling collapse, and finite-size corrections for bounded fleets.
use *;
// Scaling collapse for susceptibility data
let result = scaling_collapse;
// Binder cumulant crossing to locate Tc
let tc = find_tc_from_crossing;
Core Types
Linear Algebra
All matrix operations (Gaussian elimination, Jacobi eigenvalue algorithm, numerical Jacobians) are implemented from scratch with no external math dependencies. Only serde is required for serialization.
Installation
[]
= "0.1"
Testing
61 tests covering:
- Block transformation reduces agent count by expected factor
- Flow converges to known fixed points for simple systems
- Relevant operators grow under RG flow
- Irrelevant operators shrink under RG flow
- Uniform fleet → trivial fixed point
- 1D nearest-neighbor fleet → solvable (like 1D Ising)
- Critical exponents match analytical predictions for known models
- Scaling relations (Rushbrooke, Widom, Fisher, Josephson)
- Universality: two different microscopic models with same fixed point
- Conservation laws preserved under coarse-graining
- Scaling collapse for finite-size data
- Binder cumulant crossing for Tc extraction
License
MIT