Text Generation
PyTorch
English
FockAttentionPARFLM
research
semsimula
conservative-language-model
scalar-potential
lagrangian-mechanics
energy-based-model
physics-informed
fock-attention
parflm
parf
multi-channel-xi
direct-exchange
feynman-diagram
damped-riemannian-geometry
riemannian-geometry
riemannian-geodesics
tinystories
non-transformer
Eval Results (legacy)
Rename Fock-Attention to 'Fock Attention (MLP V_theta)', fix stale pre-causal-leak-fix 9.30 PPL comparisons, add V_theta-vs-exchange-mechanism insight
Browse files
README.md
CHANGED
|
@@ -42,11 +42,13 @@ model-index:
|
|
| 42 |
name: Validation Perplexity
|
| 43 |
---
|
| 44 |
|
| 45 |
-
# Fock Attention
|
| 46 |
|
| 47 |
-
The **Fock Attention
|
| 48 |
|
| 49 |
-
This "Route 2" across the Conservative Obstruction is the \\(O(T^2)\\) counterpart to the Fock register pool's \\(O(1)\\) "Route 1". It achieves **9.42 PPL** on TinyStories -
|
|
|
|
|
|
|
| 50 |
|
| 51 |
Part of the [Semantic Simulation](https://doi.org/10.5281/zenodo.19712427) framework.
|
| 52 |
|
|
@@ -146,11 +148,28 @@ Input tokens x_1, ..., x_T
|
|
| 146 |
|
| 147 |
### Key Design Properties
|
| 148 |
|
| 149 |
-
- **Two routes across the obstruction:** This model takes "Route 2" (direct exchange, \\(O(T^2)\\)) while the Fock-PARFLM takes "Route 1" (register-mediated, \\(O(1)\\)). Both achieve comparable PPL.
|
| 150 |
- **Repulsive exchange:** The learned scale is negative, meaning the exchange force *diversifies* token representations rather than collapsing them.
|
| 151 |
- **Minimal overhead:** Only ~131K parameters for the exchange mechanism (Q/K/V projections + scale scalar).
|
| 152 |
- **Otherwise conservative:** The core dynamics \\(V_\theta + V_\phi\\) remain fully conservative; the exchange force is the only non-conservative component.
|
| 153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
## Why Not a Transformer?
|
| 155 |
|
| 156 |
The Fock Attention PARFLM is **not based on the Transformer architecture**. There are no Transformer-style FFN towers. The conservative core is driven by two small scalar-potential MLPs β \\(V_\theta\\) (β3.4M params) and \\(V_\phi\\) (β19K params). The direct exchange force adds only β131K parameters (Q/K/V projections).
|
|
@@ -165,7 +184,7 @@ Key structural differences from Transformers:
|
|
| 165 |
| Total parameters | 124M | 16.7M |
|
| 166 |
| Pairwise token interaction | \\(O(T^2)\\) dense attention | \\(O(T^2)\\) direct exchange + \\(O(Tk)\\) sparse PARF |
|
| 167 |
|
| 168 |
-
**Note:** Because this model uses a direct token-to-token exchange force (the "Route 2" across the Conservative Obstruction), its runtime cost is \\(O(T^2)\\) like attention. For fully \\(O(1)\\) inference
|
| 169 |
|
| 170 |

|
| 171 |
|
|
@@ -305,12 +324,12 @@ model.eval()
|
|
| 305 |
|---|---|---|---|
|
| 306 |
| Matched Attention (baseline) | **7.81** | 19.5M | -- |
|
| 307 |
| [Hybrid SPLM+Attn](https://huggingface.co/dimitarpg13/semsimula-hybrid-splm) | **8.50** | ~19.0M | +0.69 |
|
| 308 |
-
|
|
| 309 |
-
|
|
| 310 |
-
| [Multi-Xi PARFLM](https://huggingface.co/dimitarpg13/semsimula-parflm-multixi) | **12.06** | 17.6M | +4.25 |
|
| 311 |
| [Multi-Xi SPLM](https://huggingface.co/dimitarpg13/semsimula-splm-multixi) | **11.51** | 16.5M | +3.70 |
|
|
|
|
| 312 |
|
| 313 |
-
|
| 314 |
|
| 315 |
## SPLM Family Overview
|
| 316 |
|
|
@@ -327,7 +346,7 @@ This model is part of the **Semantic Simulation SPLM family**:
|
|
| 327 |
| Fock-PARFLM v2.1 (depth-cond. isotropic Gaussian) | Bounded multi-context + pairwise + Fock | TinyStories | 16.33 | [semsimula-fock-parflm-depthcond-vtheta](https://huggingface.co/dimitarpg13/semsimula-fock-parflm-depthcond-vtheta) |
|
| 328 |
| Fock-PARFLM v2.1 (depth-cond. anisotropic Gaussian + fock-reg) | Bounded, ellipsoidal multi-context + pairwise + Fock | TinyStories | 9.04 | [semsimula-fock-parflm-anisogaussian-vtheta](https://huggingface.co/dimitarpg13/semsimula-fock-parflm-anisogaussian-vtheta) |
|
| 329 |
| Fock-PARFLM v2.1 (aniso-Gaussian + fock-reg, first-order/Fock-G1) | Same as above, gradient-flow integrator | TinyStories | 8.95 | [semsimula-fock-parflm-anisogaussian-vtheta-fock-g1](https://huggingface.co/dimitarpg13/semsimula-fock-parflm-anisogaussian-vtheta-fock-g1) |
|
| 330 |
-
| **Fock
|
| 331 |
| Hybrid SPLM+Attn | Attention + SPLM refinement | TinyStories | 8.50 | [semsimula-hybrid-splm](https://huggingface.co/dimitarpg13/semsimula-hybrid-splm) |
|
| 332 |
| Fock-PARFLM v2.1 (aniso-Gaussian + fock-reg, gamma sweep, d=384) | Bounded, ellipsoidal multi-context + pairwise + Fock β 8-way gamma sweep + geodesic analysis | OpenWebText | 278.27 (best of 8, 3K-step sweep) | [semsimula-fock-parflm-anisogaussian-vtheta-owt-d384-gammasweep](https://huggingface.co/dimitarpg13/semsimula-fock-parflm-anisogaussian-vtheta-owt-d384-gammasweep) |
|
| 333 |
| Fock-PARFLM v2.1 (aniso-Gaussian + fock-reg, gamma sweep, d=768) | Bounded, ellipsoidal multi-context + pairwise + Fock β 8-way gamma sweep + geodesic analysis | OpenWebText | 326.97 (best of 8, 3K-step sweep) | [semsimula-fock-parflm-anisogaussian-vtheta-owt-d768-gammasweep](https://huggingface.co/dimitarpg13/semsimula-fock-parflm-anisogaussian-vtheta-owt-d768-gammasweep) |
|
|
|
|
| 42 |
name: Validation Perplexity
|
| 43 |
---
|
| 44 |
|
| 45 |
+
# Fock Attention with MLP V_theta (Direct Token-to-Token Exchange Force Language Model)
|
| 46 |
|
| 47 |
+
The **Fock Attention with MLP \\(V_\theta\\)** model (previously presented on this page simply as "Fock Attention") implements the Section 5.1 Feynman diagram as a literal non-conservative force: each token emits a virtual photon carrying a key and payload, and each token absorbs with a query. The exchange coupling \\(\alpha_{ij} = \text{softmax}_j(q_i \cdot k_j / \sqrt{d_k})\\) and the force \\(F_i = \sum_j \alpha_{ij} \cdot v_j\\). This is the \\(\lambda = 0\\) **(instantaneous exchange) limit** of the Fock mechanism -- no registers, no persistence, no creation/destruction gates.
|
| 48 |
|
| 49 |
+
This "Route 2" across the Conservative Obstruction is the \\(O(T^2)\\) counterpart to the Fock register pool's \\(O(1)\\) "Route 1". It achieves **9.42 PPL** on TinyStories, honest and leak-free. After correcting an earlier comparison that used the leaky-checkpoint Fock-PARFLM v2.1 number (9.30), this model is actually **0.28 PPL better** than the honest, leak-fixed register-based Fock-PARFLM v2.1 (9.70) -- see [Evaluation Results](#evaluation-results) for the full, corrected table.
|
| 50 |
+
|
| 51 |
+
The card name now spells out **"with MLP \\(V_\theta\\)"** on purpose: as the [V_theta vs. Exchange Mechanism](#v_theta-vs-exchange-mechanism-what-actually-drives-ppl-on-tinystories) section below shows, on TinyStories the single-body potential's *shape* -- not the choice between register-mediated and direct-exchange Fock mechanisms -- is the dominant factor separating this model's 9.42 PPL from the family-best 9.04 (depth-conditioned anisotropic-Gaussian \\(V_\theta\\)).
|
| 52 |
|
| 53 |
Part of the [Semantic Simulation](https://doi.org/10.5281/zenodo.19712427) framework.
|
| 54 |
|
|
|
|
| 148 |
|
| 149 |
### Key Design Properties
|
| 150 |
|
| 151 |
+
- **Two routes across the obstruction:** This model takes "Route 2" (direct exchange, \\(O(T^2)\\)) while the Fock-PARFLM takes "Route 1" (register-mediated, \\(O(1)\\)). Both achieve comparable, honest PPL (9.42 vs. 9.70).
|
| 152 |
- **Repulsive exchange:** The learned scale is negative, meaning the exchange force *diversifies* token representations rather than collapsing them.
|
| 153 |
- **Minimal overhead:** Only ~131K parameters for the exchange mechanism (Q/K/V projections + scale scalar).
|
| 154 |
- **Otherwise conservative:** The core dynamics \\(V_\theta + V_\phi\\) remain fully conservative; the exchange force is the only non-conservative component.
|
| 155 |
|
| 156 |
+
### V_theta vs. Exchange Mechanism: What Actually Drives PPL on TinyStories
|
| 157 |
+
|
| 158 |
+
This model's single-body potential \\(V_\theta\\) is a plain 3-layer MLP -- the same unbounded, black-box shape used in the original [Fock-PARFLM](https://huggingface.co/dimitarpg13/semsimula-fock-parflm). Its most visible design feature is the direct exchange force above, so it is tempting to credit that Feynman-diagram mechanism for most of the PPL gain over the no-Fock [Multi-Xi PARFLM](https://huggingface.co/dimitarpg13/semsimula-parflm-multixi) baseline (12.06 -> 9.42). The family's own ablations, holding one factor fixed at a time, point the other way:
|
| 159 |
+
|
| 160 |
+
| \\(V_\theta\\) shape | Exchange / Fock mechanism | Honest PPL |
|
| 161 |
+
|---|---|---|
|
| 162 |
+
| MLP | none ([Multi-Xi PARFLM](https://huggingface.co/dimitarpg13/semsimula-parflm-multixi)) | 12.06 |
|
| 163 |
+
| MLP | register-based Fock v2.1 ([Fock-PARFLM v2.1](https://huggingface.co/dimitarpg13/semsimula-fock-parflm)) | 9.70 |
|
| 164 |
+
| MLP | direct exchange (**this model**) | 9.42 |
|
| 165 |
+
| Isotropic Gaussian | register-based Fock v2.1 ([sibling](https://huggingface.co/dimitarpg13/semsimula-fock-parflm-depthcond-vtheta)) | 16.33 |
|
| 166 |
+
| Anisotropic Gaussian | register-based Fock v2.1 ([sibling](https://huggingface.co/dimitarpg13/semsimula-fock-parflm-anisogaussian-vtheta)) | 9.04 |
|
| 167 |
+
| Anisotropic Gaussian | register-based Fock v2.1 + first-order integrator ([Fock-G1](https://huggingface.co/dimitarpg13/semsimula-fock-parflm-anisogaussian-vtheta-fock-g1)) | 8.95 |
|
| 168 |
+
|
| 169 |
+
Holding the exchange mechanism fixed at "register-based Fock v2.1" and varying only \\(V_\theta\\)'s shape swings PPL by more than 7 points (16.33 down to 8.95). Holding \\(V_\theta\\) fixed at MLP and varying only the exchange mechanism (none -> registers -> direct exchange) swings PPL by about 2.6 points -- but the choice *between* the two Fock-mechanism flavours (registers vs. direct exchange) is worth only \\(\approx\\)0.3 points, and direct exchange (this model) actually wins that comparison.
|
| 170 |
+
|
| 171 |
+
**On TinyStories, \\(V_\theta\\)'s profile is doing most of the work; the specific exchange mechanism is a second-order effect.** Whether the anisotropic-Gaussian-beats-MLP ordering seen here survives at OpenWebText scale is still an open question: only the anisotropic-Gaussian \\(V_\theta\\) has been scaled up to OpenWebText so far (see the [gamma-sweep family](https://huggingface.co/dimitarpg13/semsimula-fock-parflm-anisogaussian-vtheta-owt-d384-gammasweep)), so there is currently no MLP-\\(V_\theta\\) OpenWebText-scale checkpoint to compare against directly.
|
| 172 |
+
|
| 173 |
## Why Not a Transformer?
|
| 174 |
|
| 175 |
The Fock Attention PARFLM is **not based on the Transformer architecture**. There are no Transformer-style FFN towers. The conservative core is driven by two small scalar-potential MLPs β \\(V_\theta\\) (β3.4M params) and \\(V_\phi\\) (β19K params). The direct exchange force adds only β131K parameters (Q/K/V projections).
|
|
|
|
| 184 |
| Total parameters | 124M | 16.7M |
|
| 185 |
| Pairwise token interaction | \\(O(T^2)\\) dense attention | \\(O(T^2)\\) direct exchange + \\(O(Tk)\\) sparse PARF |
|
| 186 |
|
| 187 |
+
**Note:** Because this model uses a direct token-to-token exchange force (the "Route 2" across the Conservative Obstruction), its runtime cost is \\(O(T^2)\\) like attention. For fully \\(O(1)\\) inference, see the register-based [Fock-PARFLM v2.1](https://huggingface.co/dimitarpg13/semsimula-fock-parflm) ("Route 1"), which achieves an honest 9.70 PPL vs. this model's 9.42 PPL -- i.e. \\(O(1)\\) inference here comes at a small PPL cost relative to this model's \\(O(T^2)\\) direct exchange, not the other way around (see the [causal-leak notice](https://huggingface.co/dimitarpg13/semsimula-fock-parflm#readme) on that card for why an earlier version of this comparison had the direction reversed).
|
| 188 |
|
| 189 |

|
| 190 |
|
|
|
|
| 324 |
|---|---|---|---|
|
| 325 |
| Matched Attention (baseline) | **7.81** | 19.5M | -- |
|
| 326 |
| [Hybrid SPLM+Attn](https://huggingface.co/dimitarpg13/semsimula-hybrid-splm) | **8.50** | ~19.0M | +0.69 |
|
| 327 |
+
| **Fock Attention (MLP V_theta)** (this model) | **9.42** | 16.7M | +1.61 |
|
| 328 |
+
| [Fock-PARFLM v2.1](https://huggingface.co/dimitarpg13/semsimula-fock-parflm) | **9.70** | 17.4M | +1.89 |
|
|
|
|
| 329 |
| [Multi-Xi SPLM](https://huggingface.co/dimitarpg13/semsimula-splm-multixi) | **11.51** | 16.5M | +3.70 |
|
| 330 |
+
| [Multi-Xi PARFLM](https://huggingface.co/dimitarpg13/semsimula-parflm-multixi) | **12.06** | 17.6M | +4.25 |
|
| 331 |
|
| 332 |
+
**Corrected comparison:** earlier versions of this card compared against Fock-PARFLM v2.1's leaky-checkpoint PPL of 9.30, concluding that "register persistence provides a small advantage." That checkpoint has since been re-trained with the causal-leak fix; its honest PPL is **9.70**, which means Fock Attention (this model) is actually **0.28 PPL better**, not worse (see the [causal-leak notice](https://huggingface.co/dimitarpg13/semsimula-fock-parflm#readme) on the Fock-PARFLM v2.1 card for the full account). Fock Attention also has the smallest parameter count in the family (16.7M) and the simplest Fock mechanism (no creation/destruction gates, no stack discipline). As the [V_theta vs. Exchange Mechanism](#v_theta-vs-exchange-mechanism-what-actually-drives-ppl-on-tinystories) section above argues, the 0.62 PPL gap between this model and the family-best anisotropic-Gaussian variant (9.04) is better explained by \\(V_\theta\\)'s shape than by the exchange mechanism.
|
| 333 |
|
| 334 |
## SPLM Family Overview
|
| 335 |
|
|
|
|
| 346 |
| Fock-PARFLM v2.1 (depth-cond. isotropic Gaussian) | Bounded multi-context + pairwise + Fock | TinyStories | 16.33 | [semsimula-fock-parflm-depthcond-vtheta](https://huggingface.co/dimitarpg13/semsimula-fock-parflm-depthcond-vtheta) |
|
| 347 |
| Fock-PARFLM v2.1 (depth-cond. anisotropic Gaussian + fock-reg) | Bounded, ellipsoidal multi-context + pairwise + Fock | TinyStories | 9.04 | [semsimula-fock-parflm-anisogaussian-vtheta](https://huggingface.co/dimitarpg13/semsimula-fock-parflm-anisogaussian-vtheta) |
|
| 348 |
| Fock-PARFLM v2.1 (aniso-Gaussian + fock-reg, first-order/Fock-G1) | Same as above, gradient-flow integrator | TinyStories | 8.95 | [semsimula-fock-parflm-anisogaussian-vtheta-fock-g1](https://huggingface.co/dimitarpg13/semsimula-fock-parflm-anisogaussian-vtheta-fock-g1) |
|
| 349 |
+
| **Fock Attention (MLP V_theta)** | **Fock + attention** | **TinyStories** | **9.42** | **this model** |
|
| 350 |
| Hybrid SPLM+Attn | Attention + SPLM refinement | TinyStories | 8.50 | [semsimula-hybrid-splm](https://huggingface.co/dimitarpg13/semsimula-hybrid-splm) |
|
| 351 |
| Fock-PARFLM v2.1 (aniso-Gaussian + fock-reg, gamma sweep, d=384) | Bounded, ellipsoidal multi-context + pairwise + Fock β 8-way gamma sweep + geodesic analysis | OpenWebText | 278.27 (best of 8, 3K-step sweep) | [semsimula-fock-parflm-anisogaussian-vtheta-owt-d384-gammasweep](https://huggingface.co/dimitarpg13/semsimula-fock-parflm-anisogaussian-vtheta-owt-d384-gammasweep) |
|
| 352 |
| Fock-PARFLM v2.1 (aniso-Gaussian + fock-reg, gamma sweep, d=768) | Bounded, ellipsoidal multi-context + pairwise + Fock β 8-way gamma sweep + geodesic analysis | OpenWebText | 326.97 (best of 8, 3K-step sweep) | [semsimula-fock-parflm-anisogaussian-vtheta-owt-d768-gammasweep](https://huggingface.co/dimitarpg13/semsimula-fock-parflm-anisogaussian-vtheta-owt-d768-gammasweep) |
|