Quaternion-Tucker ZigZag Networks: Halving Transformer Backbone Parameters and Enabling Exact 2D Zero-Loss Continual Scaling
Organizations: Independent Researcher
Abstract
Standard Transformers allocate independent dense weight matrices to every feed-forward network (FFN) layer, coupling parameters linearly with depth (O(L)) and discarding prior compute when scaling capacity. Conversely, weight-tied Looped Transformers decouple depth from parameters (O(1)) but enforce time-homogeneous updates. We formulate the L-layer FFN stack as a 3D Tensor Cuboid and introduce QuatTucker-ZigZagGPT, unifying: (1) 4D Quaternion Hamilton GEMMs in bfloat16 (4x FFN compression), (2) 64x64 Block-Diagonal Tucker SwiGLU Cores for depth-specific rotations over a shared basis, (3) Braided ZigZag Diamond Routing (L0 -> L2 -> L1 -> L3) for zero-FLOP top-down refinement, and (4) Exact 2D Zero-Loss Continual Scaling in both width and depth. We also introduce Annealed Gated Bounce-Back Scaffolding (GatedBounce), which self-distills to 0.0% inference overhead. Across algorithmic tasks (8-bit Parity, 56-seed routing ablations, Mod-53 Grokking) and language modeling (TinyStories, FineWeb-Edu), our model outperforms standard Transformers at 2x-7.6x compression. On A100, QuatTucker-ZigZagGPT-12 (39.0M backbone) beats StandardGPT-12 (85.0M backbone) at 5/5 controlled checkpoints. Continually scaling one lineage across 6.00B tokens via zero-loss width growth (rank 6144 -> 8192), two bit-exact depth expansions (L = 12 -> 16 -> 20, 70.9M backbone, max_diff = 0.000000), and WSD cooldown reaches 3.3582 FineWeb-Edu loss (28.74 PPL) and 44.75% full-split zero-shot accuracy across 16,955 questions (ARC-Easy, HellaSwag, WinoGrande, BoolQ), matching GPT-3 Small (125M, 300B tokens) at 50x fewer tokens.
Figures & tables
| Architecture | Params | Acc (%) | Bounce |
|---|---|---|---|
| CP-CuboidNet ( ) | 1,522 | 92.2 7.6 | – |
| GatedBounce4 ( ) | 4,867 | 90.9 14.3 | 0.0% |
| GatedBounce4 ( ) | 4,867 | 86.2 8.1 | 0.0% |
| ZigZag4 ( ) | 4,834 | 81.6 6.1 | – |
| CuboidNet (Dense 3D) | 4,530 | 75.0 9.8 | – |
| ResNet4 (Baseline) | 4,834 | 70.3 22.4 | – |
| Model | BB (M) | 1000 | 2000 | 3000 | PPL |
|---|---|---|---|---|---|
| StandardGPT-8 | 14.27 | 5.8940 | 5.3269 | 5.2310 | 186.98 |
| CP-ZigZagGPT-8 | 14.30 | 5.7718 | 5.2628 | 5.1687 | 175.68 |
| Tucker-ZigZagGPT-8 | 14.30 | 5.7645 | 5.2657 | 5.1655 | 175.13 |
| QuatTucker-8 | 7.22 | 5.7778 | 5.2653 | 5.1339 | 169.68 |
| Step | Tok | Std-12 (123.6M) | QT-12 (77.6M) | |
|---|---|---|---|---|
| 200 | 3.3M | 6.3976 (600.4) | 6.3936 (598.0) | -0.0040 |
| 400 | 6.6M | 5.9776 (394.5) | 5.8562 (349.4) | -0.1214 |
| 600 | 9.8M | 5.6685 (289.6) | 5.5822 (265.7) | -0.0863 |
| 800 | 13.1M | 5.5484 (256.8) | 5.3887 (218.9) | -0.1597 |
| 1000 | 16.4M | 5.4410 (230.7) | 5.3706 (215.0) | -0.0704 |
| Stage / Checkpoint | Layers / Rank | Total | Backbone | Tokens | Val | PPL | |
| Stage 2 ( best_1B.pt ) | 77.6M | 39.0M | – | 1.05B | 3.5849 | 36.05 | |
| Stage 3 ( best_1.5B_grown.pt ) | 81.1M | 42.5M | 0.0067 | 1.55B | 3.5963 | 36.46 | |
| Stage 4 ( best_2.5B_depth16.pt ) | 95.3M | 56.7M | 0.000000 | 2.55B | 3.4647 | 31.97 | |
| Stage 5 ( best_3.5B_depth16.pt , +Py) | 95.3M | 56.7M | – | 3.55B | 3.4327 | 30.96 | |
| Stage 6 ( best_5B_depth20.pt ) | 109.5M | 70.9M | 0.000000 | 5.00B | 3.4050 | 30.12 | |
| Stage 7 ( best_6B_depth20.pt , WSD) | 109.5M | 70.9M | – | 6.00B | 3.3582 | 28.74 |
| Benchmark ( ) | St.5 | St.6 | St.7 (6B) | GPT-3 Sm.* |
|---|---|---|---|---|
| (3.55B) | (5.00B) | (70.9M bb) | (125M, 300B) | |
| ARC-Easy (2,376) | 40.74% | 42.09% | 42.17% | 43.60% |
| HellaSwag (10,042) | 27.55% | 27.97% | 28.01% | 33.70% |
| WinoGrande (1,267) | 50.43% | 51.14% | 52.09% | 52.00% |
| BoolQ (3,270) | 59.51% | 55.44% | 56.73% | 49.70% |
| 4-Task Avg (16,955) | 44.56% | 44.16% | 44.75% | 44.75% |
| Run | Base | Data | Start | Final |
|---|---|---|---|---|
| Alpaca SFT | 1.0B (L12) | Alpaca | – | 2.2251 |
| SmolTalk SFT | 1.55B (L12) | 40k pairs | 2.3646 | 1.6016 |
| Qwen3.5 Distill | 1.55B (L12) | 10k (val) | 2.4558 | 1.6650 |
| Stage-4 SFT | 2.55B (L16) | 100k (val) | 2.0456 | 1.4975 |
| Stage-5 SFT* | 3.55B (L16) | 100k (asst) | 2.1820 | 1.6123 |
| Variant | Domain | Observed Failure Mode |
|---|---|---|
| ComplexGate4 | Parity | Gradient starvation ( ) |
| ComplexValve4 | Parity | Phase-wrap bimodality ( ) |
| Spectral-ZigZag | L4 LM | Breaks Inductor ( slower) |
| FullTucker-Attn | L4 LM | Val vs. (dense) |
| Tied Emb | L4 LM | Step-1 loss ( val) |
Transformer FFNs
Transformer feed-forward networks (FFNs) are the within-token MLP blocks whose activations, structure, efficiency, and role in model computation are studied.
See all 49 papers