Fractal Behavioral Grammar: A Hypothesis for Behavioral Compression in Local Large Language Models
Description
This paper introduces Fractal Behavioral Grammar (FBG), a hypothesis for compressing behavioral interaction patterns in local large language models into compact, reusable rulesets without fine-tuning or cloud infrastructure. We propose that individual interaction patterns with LLMs exhibit fractal self-similarity across sessions — recurring at multiple scales of abstraction — and that these patterns can be extracted, compressed, and reinjected as structured behavioral context.
We present a five-layer compression architecture combining MinHash LSH deduplication, hyperdimensional computing (HDC) encoding at D=10,000 dimensions, HDBSCAN clustering, fractal grammar extraction, and AssociativeMemory storage. Empirical stress testing demonstrates an 82:1 compression ratio versus raw conversation history, with AssociativeMemory footprint remaining flat at 39KB regardless of event count up to n=10,000.
We further present fg-sync, a concrete CLI implementation integrating FBG extraction with Ollama via a thin HTTP proxy, configurable cron-based pipeline execution, and automatic system prompt injection. The full implementation is released as open source under Apache 2.0.
Files
fractal_behavioral_grammar_whitepaper.pdf
Files
(66.8 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:ff3ce88d129979d30fffee8ed7d4c67c
|
66.8 kB | Preview Download |
Additional details
Dates
- Available
-
2026-06-28