MYRA: SR-TRBM with LLM-Guided Refinement and Analysis
Hybrid energy-based RBM with LLM-guided structural refinement
🔧 Usage
Extract the dataset before running experiments:
```bash
7z x stan.7z
```
Alternatively, you can use WinRAR or other compatible tools. The model's entire size is approximately 190 MB.
🔬 Experiment Protocol: Single-Seed Band Uniqueness Criterion
The MYRA experiment protocol does not rely on multi-seed averaging or aggregate statistics across runs. Instead, each seed is evaluated independently through a band uniqueness criterion applied over a local lag sweep. The purpose is to obtain a truth value for the seed level in the execution results. The concept is a new idea in the literature.
For reference outputs, see the following:
artifacts/run.log—example of a successful run with a valid ground truth
artifacts/run_false_example.log—example of a run where the criterion is not satisfied
After training and sampling, the system sweeps lag steps in the range:
SEED EXPERIMENT: SUCCESS → This run successfully satisfies the band consistency criterion. Notably, the valid solution emerges precisely at lag step = 8, indicating a well-aligned entropy balance within the defined band.
The outcome is relatively favorable given the stochastic nature of the process.
At each step, the MCMC Mix Index is compared against the closed entropy interval:
[min(PixelH, SpatialH), max(PixelH, SpatialH)]
A seed experiment is considered successful if and only if all three conditions hold simultaneously:
Global Mix Index ∈ Entropy Band
BandConsistent = True at the characteristic lag step
Exactly one lag step across the full sweep satisfies `BandConsistent = True`.
This implies a unique choice function over the admissible band:
Choice(Mix | Band) : C(x | [y, z]) = x
🎯 Key Criterion: Uniqueness
Condition (iii) is the structurally decisive one.
If multiple lag steps produce band-consistent results, the mixing signal is diffuse—the system has not converged to a sharp, well-localized attractor.
A system that converges everywhere has converged nowhere in particular.
Uniqueness of the band-consistent lag is therefore not a byproduct of the evaluation; it is the criterion itself.
🔥 Interpretation
This design reflects a thermodynamic intuition:
A well-mixed chain should exhibit band consistency precisely at the characteristic autocorrelation scale of its energy landscape:
Not broadly
Not sporadically
The goal is sharp localization, not widespread agreement.
⏱️ Runtime
SR-TRBM training takes approximately 30 minutes per seed (PCD-1).
LLM-based refinement takes about 3 hours for ~120 samples (10% of 1200).
Total runtime: about 3.5–4 hours.
🧠 Core Idea
What did the model actually learn?
MYRA (Model Representation Anatomy) is a hybrid framework for analyzing and refining learned representations in energy-based models, particularly RBMs.
Most models are optimized for output quality. MYRA focuses instead on the internal structure of what is learned. Rather than only evaluating generated samples, MYRA investigates how learned patterns are organized, combined, and expressed during generation.
⚙️ Model Overview
MYRA combines:
a Restricted Boltzmann Machine (RBM) for generation
an LLM-based interpretive layer for structural analysis
an energy-based acceptance mechanism for refinement
The system operates as a loop:
RBM generates samples
LLM analyzes structure and proposes refinements
Changes are accepted or rejected based on energy
The process repeats
This forms a guided generative refinement process.
🔍 LLM Integration
MYRA uses an LLM as an external interpretive layer.
The LLM is not used for generation. It analyzes model behavior, evaluates structure, and suggests refinements during the iterative loop.
⚙️ Quick Start (Default Backend)
The current setup uses the OpenAI API for fast and minimal setup.
You can run the system immediately without modifying the backend.
🔁 Backend Flexibility
The LLM layer is modular.
The default implementation (openaiF) can be replaced or extended to support other providers such as:
Anthropic (Claude)
Google (Gemini)
Meta (Llama / local models)
Mistral, DeepSeek, Qwen
Switching backends typically requires only small changes in: