Spec-CoFrGeNet: Reparametrizing Continued Fraction Networks for Stable and Accurate Training
Organizations: Michigan State University · IBM Research
Abstract
Continued fractions have been shown to be a function class capable of constructing expressive yet parameter-efficient neural networks. These neural networks are not only effective for supervised learning, but also for training LLMs. However, the rational form of this function class introduces poles when the denominator approaches zero, which prior work has avoided by enforcing a small positive (non-smooth) lower bound. We show that performance and training stability can be highly sensitive to the choice of this lower bound. In this work, we introduce a novel transformation of the partial denominators, inspired by its connection to the Green's function in physics, that mitigates the above issue elegantly by constraining the spectra of the constructed tridiagonal Hamiltonian. Our approach further eliminates the need for incremental training used by previous works for stability, thus avoiding involved modifications to standard pre-training procedures. We demonstrate the effectiveness of our reparameterization by replacing FFNs with a previously proposed continued fraction architecture for both language and image generative modeling. Across diverse models, such as GPT-2 XL, (nano) Llama-MoE, and Granite, we show that our proposed method achieves performance comparable to the original (FFN-based) architectures while maintaining ~30%-50% parameter savings as before, and in most cases even outperforms the more complicated incremental training baseline. We further demonstrate, for the first time for continued fraction networks, that their effectiveness also carries over to image generative modeling, that utilize diffusion objectives. On a state-of-the-art Diffusion Transformer, we show that our approach again achieves performance comparable to the original FFN-based models with ~30% parameter savings and significantly outperforms the previous incremental training approach.
Figures & tables
| Model | Size | Layers | ||
|---|---|---|---|---|
| GPT-2 XL | 1.5B | 48 | 1600 | 4 |
| Granite 4.1 | 2.14B | 24 | 2560 | 3.2 |
| Llama-MoE | 403M | 30 | 576 | 2.67 |
| Dataset | Method | Params | PTB | Wikitext2 | Lambada | AgNews | LM1B | Wikitext103 |
| OWT | Standard | 1.5B | 30.12 | 18.30 | 8.66 | 37.13 | 41.20 | 17.50 |
| Standard † | 35.98 | 27.74 | 16.35 | 50.75 | 51.95 | 29.29 | ||
| CoFrGeNet | 985M | 29.89 | 17.12 | 8.12 | 35.72 | 40.14 | 16.14 | |
| Spec-CoFrGeNet | 29.87 | 17.14 | 8.11 | 35.69 | 40.17 | 16.13 | ||
| GW | Standard | 1.5B | 29.07 | 19.12 | 31.78 | 45.62 | 52.36 | 18.93 |
| Standard † | 34.26 | 27.38 | 39.44 | 61.81 | 58.64 | 29.02 |
| Dataset | Model | Params | MNLI | QQP | QNLI | SST2 | COLA | MRPC | RTE | WNLI |
| OWT | Standard | 1.5B | 86.89 | 88.93 | 91.35 | 93.56 | 81.78 | 79.83 | 60.27 | 58.28 |
| Standard † | 81.17 | 81.35 | 83.94 | 87.22 | 75.99 | 74.37 | 56.42 | 58.28 | ||
| CoFrGeNet | 985M | 87.24 | 89.95 | 91.87 | 94.12 | 82.57 | 80.17 | 61.36 | 58.30 | |
| Spec-CoFrGeNet | 87.26 | 89.95 | 91.89 | 94.16 | 82.59 | 80.21 | 61.35 | 58.30 | ||
| GW | Standard | 1.5B | 78.28 | 86.83 | 82.93 | 91.82 | 74.18 | 77.72 | 60.19 | 58.33 |
| Standard † | 74.83 | 84.74 | 77.82 | 83.94 | 68.93 | 71.83 | 57.85 | 58.33 |
| Method | Setting | Params | OpenBookQA | PIQA | ARC-Easy | WinoGrande | HellaSwag | LAMBADA | BoolQ | SciQ |
|---|---|---|---|---|---|---|---|---|---|---|
| Standard | FG | 2.14B | 35.2 | 74.8 | 69.3 | 56.9 | 59.4 | 48.7 | 57.7 | 90.8 |
| CoFrGeNet | 37.2 | 74.4 | 69.9 | 58.1 | 59.1 | 48.6 | 60.9 | 90.2 | ||
| Spec-CoFrGeNet | 37.4 | 74.6 | 70.0 | 58.4 | 59.4 | 49.0 | 61.2 | 90.0 | ||
| Standard | FNG | 1.1B | 34.9 | 72.9 | 63.9 | 55.7 | 52.7 | 44.7 | 57.2 | 86.1 |
| CoFrGeNet | 35.2 | 73.1 | 63.9 | 55.9 | 52.7 | 45.0 | 59.1 | 86.5 | ||
| Spec-CoFrGeNet | 35.4 | 73.1 | 64.1 | 55.8 | 53.2 | 45.0 | 60.2 | 86.7 |
| Model | Params | OpenBookQA | PIQA | ARC-Easy | WinoGrande | HellaSwag | LAMBADA | BoolQ | SciQ |
|---|---|---|---|---|---|---|---|---|---|
| Standard | 403M | 14.2 | 60.0 | 47.2 | 50.1 | 27.5 | 17.8 | 60.8 | 72.6 |
| Standard † | 14.2 | 57.6 | 41.7 | 49.9 | 26.7 | 15.7 | 60.7 | 68.1 | |
| CoFrGeNet | 204M | 15.2 | 61.0 | 51.1 | 49.8 | 28.1 | 21.2 | 53.2 | 77.6 |
| Spec-CoFrGeNet | 15.4 | 61.2 | 51.2 | 50.1 | 28.0 | 21.1 | 53.7 | 78.0 |
| Model | Method | Parallelism Strategy | Throughput | Training Time | FLOPs |
| Standard | 1.15B | 7.9 / 17.2 | 9.1 | ||
| GPT-2 XL | Standard † | DDP | 1.21B | 7.6 / 16.1 | 6.1 |
| Spec-CoFrGeNet | 1.20B | 7.6 / 16.2 | 6.1 | ||
| Granite 4.1 | Standard | FSDP | 162B | 0.77 | 12.7 |
| Standard † | 203B | 0.61 | 6.8 | ||
| Spec-CoFrGeNet | 202B | 0.62 | 6.8 |
| Method | Params | FID | sFID | Inception Score | Precision | Recall |
|---|---|---|---|---|---|---|
| Standard | 678M | 1.447 | 4.345 | 312.594 | 0.631 | 0.801 |
| Standard † | 493M | 1.626 | 4.417 | 287.476 | 0.620 | 0.800 |
| Spec-CoFrGeNet | 493M | 1.606 | 4.406 | 290.835 | 0.621 | 0.799 |
| Method | Throughput | Training Time |
|---|---|---|
| Standard | 64.78 | 54.88 |
| Standard † | 74.79 | 47.54 |
| Spec-CoFrGeNet | 74.57 | 48.41 |
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Example 1 |
|---|
| Prompt: ’Once upon a time, in a small village,’ |
| Greedy: Once upon a time, in a small village, there lived a young girl named Lily. Lily was known for her kind heart and her love for animals. She had a special bond with a small white dog named Max, who was her constant companion. One sunny morning, as Lily was walking through the |
| Sampled: Once upon a time, in a small village, there lived a wise old owl named Boosie. Boosie was known for his wisdom and his unique ability to see into the future. One day, as Boosie was on a stroll through the woods, he came upon a beautiful, |
| Example 2 |
| Prompt: ’The theory of relativity states that’ |
| Dataset | Method | Params | PTB | Wikitext2 | Lambada | AgNews | LM1B | Wikitext103 |
| OWT | Spec-CoFrGeNet | 985M | 29.89 | 17.16 | 8.13 | 35.65 | 40.21 | 16.17 |
| GW | Spec-CoFrGeNet | 985M | 29.72 | 18.09 | 30.59 | 41.63 | 46.86 | 18.07 |
| Method | Setting | Params | OpenBookQA | PIQA | ARC-Easy | WinoGrande | HellaSwag | LAMBADA | BoolQ | SciQ |
| Spec-CoFrGeNet | FG | 2.14B | 36.8 | 73.9 | 69.5 | 57.8 | 59 | 49.2 | 62.7 | 90.7 |
| Spec-CoFrGeNet | FNG | 1.1B | 35.8 | 73 | 65.4 | 55.6 | 53 | 45.3 | 59.6 | 88.3 |
| Model | Params | OpenBookQA | PIQA | ARC-Easy | WinoGrande | HellaSwag | LAMBADA | BoolQ | SciQ |
|---|---|---|---|---|---|---|---|---|---|
| Spec-CoFrGeNet | 204M | 15.2 | 61.2 | 51.2 | 50 | 28.1 | 21 | 53.4 | 77.7 |
| Method | Setting | Params | OpenBookQA | PIQA | ARC-Easy | WinoGrande | HellaSwag | LAMBADA | BoolQ | SciQ |
| Spec-CoFrGeNet | FG | 2.14B | 36.9 | 73.9 | 69.9 | 58.5 | 59.1 | 48.7 | 62.6 | 90.8 |
| Spec-CoFrGeNet | FNG | 1.1B | 35.4 | 72.9 | 63.9 | 55.7 | 53.3 | 45.1 | 59.4 | 86.3 |
| Method | FID | sFID | Inception Score | Precision | Recall | |
|---|---|---|---|---|---|---|
| Spec-CoFrGeNet | 1.606 | 4.406 | 290.835 | 0.621 | 0.799 | |
| 1.612 | 4.475 | 292.564 | 0.621 | 0.799 |
CFNN: Continued Fraction Neural Network
rational inductive bias.'' This enables capturing complex asymptotics and discontinuities with extreme parameter frugality. We provide formal approximation bounds demonstrating exponential convergence and stability guarantees. To address recursive instability, we develop three implementations: CFNN-Boost, CFNN-MoE, and CFNN-Hybrid. Benchmarks show CFNNs consistently outperform MLPs in precision with one to two orders of magnitude fewer parameters, exhibiting up to a 47-fold improvement in noise robustness and physical consistency. By bridging black-box flexibility and white-box transparency, CFNNs establish a reliable grey-box'' paradigm for AI-driven scientific research.