Skip to content

Releases: RicPini/fgrf

FGRF Version 3.0 — Validated Structural Probe

Choose a tag to compare

@RicPini RicPini released this 12 Sep 12:49

Fractal Graph Rewriting Framework (FGRF) v3.0.0

Version 3 transitions FGRF from a proposed diagnostic to a validated one. Version 2 reframed the framework from an optimizer into a structural probe for weight matrices. Version 3 tests that reframing empirically.

Key improvements:

  • De-saturated estimators. The topological complexity C, the interdependence exponent I, and the Hausdorff dimension D no longer sit at their clip floors. The scale k is now derived from each matrix's own singular-value spectrum, and the finite-difference windows used to estimate C and I adapt to real transitions in the spectral counting function.
  • Trained-vs-untrained experiment. Across five random seeds and three architectures (Qwen2.5-0.5B, SmolLM2-360M, GPT-2-medium), the probe shows a reproducible signature: key and value projections of trained models have systematically lower C and higher D than the same matrices in an untrained model of the same architecture.
  • Ablation invariance. The probe table under full is byte-identical to the one under no_thermo, and no_fractal and plain_gd produce identical flat tables. The probe reads the matrix before any update; the update has no effect on the measurement.
  • Thermodynamic gate as a second readout. The gate is silent on the heavily optimized Qwen2.5-0.5B, fires once on SmolLM2-360M, and fires nine times on GPT-2-medium — on matrices that the geometric probe independently flags as structurally ordered.

Full details: see the Version 3 paper (paper/fgrf_v3_paper.pdf) and the README.
DOI: 10.6084/m9.figshare.33440932

FGRF Version 2.0 - Structural Integrity Probe

Choose a tag to compare

@RicPini RicPini released this 10 Sep 08:24

FGRF Version 2.0

Version 2 represents a major evolution from the original proof-of-concept. It reframes FGRF from a direct optimizer into a structural integrity probe for neural networks.

What's New

  • Numerical Stability: Hybrid ODE integrator (explicit with adaptive damping + implicit midpoint fallback)
  • High-Fidelity Math: Finite-difference topological complexity and participation-ratio Hausdorff dimension estimator
  • Rigorous Evaluation: Held-out evaluation with full ablation suite (full, plain_gd, no_thermo, no_fractal, random)
  • Diagnostic Utility: Near-zero updates on highly optimized models like Qwen2.5-0.5B

New Files

  • fgrf_multi_model_v2.py, fgrf_multi_input_v2.py — V2 core scripts
  • examples/run_*_v2.py — V2 example scripts for GPT-2 and Qwen2.5
  • paper/fgrf_v2_paper.pdf — V2 research paper
  • results/V2/ — V2 evaluation results

Quick Start

pip install -r requirements.txt
python examples/run_qwen_single_v2.py

FGRF Initial Release - LLM Optimization Framework

Choose a tag to compare

@RicPini RicPini released this 06 Sep 11:47

Fractal Graph Rewriting Framework (FGRF) v1.0

This is the initial public release of the FGRF framework for optimizing LLMs without retraining.

Key Features:

Single-pass weight transformation for LLMs
Works on CPU with 8-14GB RAM
Tested on models up to 1.1B parameters

Results:

Qwen2.5-0.5B: 99.08 → 12.57 PPL (−87.3%)
TinyLlama-1.1B: 64.72 → 28.07 PPL (−56.6%)
GPT-2: 141.65 → 132.99 PPL (−6.1%)

For more details, see the paper in the paper/ folder.