Rationally Linearized MLPs
Organizations: Kensho Technologies · Seoul National University · Google Research · Google DeepMind ·
Abstract
We present Rationally Linearized Multilayer Perceptrons(RaLiMPs), a new approach to efficiently linearizing MLPs using low-degree rational approximations of standard activation functions. Inspired by polynomial-based MLP linearization, we show that rational approximations can provide accurate representations at substantially lower degree. RaLiMPs exploit these approximations to construct kernel representations with narrow bottlenecks, enabling efficient composition across MLP layers. We provide theoretical guarantees for the resulting approximation and evaluate RaLiMPs across applications ranging from implicit 3D models to large language models. Our experiments demonstrate favorable accuracy--efficiency tradeoffs, with RaLiMPs achieving competitive or improved accuracy while substantially reducing inference cost.
Figures & tables
| Competition math (avg@16 / pass@16) | Reasoning | ||||||||
| Method | AMC23 | AIME24 | AIME25 | GSM8K | MATH500 | Minerva | Olympiad | GPQA | MMLU |
| (last four FFNs replaced) | |||||||||
| SNNK | 76.2 88.0 | 53.8 68.8 | 47.5 70.8 | 92.6 | 89.9 | 40.4 | 66.3 | 48.2 80.4 | 71.4 |
| EUGen | 79.1 90.6 | 57.2 72.4 | 49.4 72.0 | 93.0 | 90.2 | 43.1 | 65.0 | 49.8 80.8 | 72.0 |
| RaLiMP (ours) | 82.2 96.4 | 61.0 86.0 | 52.3 77.5 | 95.5 | 92.8 | 45.3 | 70.4 | 55.6 85.2 | 72.7 |
| (last eight FFNs replaced) | |||||||||
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | train / eval | epochs | batch | lr / wd | augmentation |
| CIFAR-100 | 50k / 10k | 12–20 | 256 | / | resize, h-flip |
| Places365 | 1.71M / 90k | 15 | 128 | / | random-resized crop, h-flip |
| ImageNet-1k | 1.28M / 50k | 25–35 | 128–256 | / | random-resized crop, h-flip |
| VTAB-1k ( tasks) | 1k / full test | 100 | 64 | / | resize, random-resized crop, h-flip |
| Hyperparameter | Values |
| learning rate | ; up to on the hardest Structured tasks |
| weight decay | , |
| scale multiplier in | |
| cap on | none, , , , , |
| label smoothing / dropout | / |
| Configuration | Value |
| PTv3 backbone | |
| Attention | Serialized softmax attention (FlashAttention) |
| Serialization patterns | Z + TZ + H + TH |
| Patch interaction | Shift Order + Shuffle Order |
| Positional encoding | xCPE |
| Encoder depths | |
| Blocks replaced | 28–35 | 32–35 |
| Linear (random-projection) group dimension | 192 | 192 |
| Quadratic (EUGen squared-dot) group dimension | 192 | 192 |
| Rational quadrature frequencies | 6 | 6 |
| Rational random features per frequency | 48 | 48 |
| Rational group width ( ) | 288 | 288 |
| Benchmark | pre | dist | pre | dist | Base | |
| GSM8K | 1,685 | 94.5 | 95.5 | 92.3 | 95.2 | 93.5 |
| MATH500 | 3,528 | 87.4 | 92.8 | 85.2 | 94.5 | 90.0 |
| Minerva | 4,892 | 35.3 | 45.3 | 28.7 | 43.4 | 45.6 |
| AMC23 | 7,820 | 75.2 | 82.2 | 71.8 | 78.8 | 83.0 |
| OlympiadBench | 8,244 | 65.4 | 70.4 | 63.8 | 69.0 | 69.9 |
| AMC23 | AIME24 | AIME25 | GSM8K | MATH500 | Minerva | GPQA | |
| 74.7 | 48.1 | 41.5 | 92.9 | 87.2 | 37.9 | 44.9 | |
| 75.2 | 51.0 | 43.3 | 94.5 | 87.4 | 35.3 | 41.4 |
| Model | Params removed | % of model | % of FFN | Throughput (tok/s) | Speedup vs. base |
| Uncompressed | — | — | — | 763.3 | — |
| 0.59B | 7.2% | 10.8% | 785.6 | ||
| 1.17B | 14.3% | 21.5% | 809.6 |
| Method | Chair | Drums | Ficus | Hotdog | Lego | Mater. | Mic | Ship | Avg |
| NeRF | 33.70 | 25.46 | 26.40 | 35.81 | 31.31 | 29.00 | 33.11 | 28.79 | 30.45 |
| EUGen | 33.09 | 25.18 | 28.40 | 35.47 | 30.60 | 28.88 | 32.63 | 28.66 | 30.36 |
| SNNK | 30.66 | 24.76 | 28.21 | 35.72 | 30.00 | 28.64 | 30.44 | 28.41 | 29.61 |
| RaLiMP (ours) | 33.19 | 25.26 | 28.89 | 35.73 | 30.95 | 29.02 | 32.86 | 28.95 | 30.61 |
| (layers replaced) | |||||
| Dataset | Method | 4 | 7 | 9 | 11 |
| CIFAR-100 | Low Rank | 86.6 | 78.3 | 74.3 | 69.3 |
| SNNK | 87.3 | 84.0 | 80.3 | 75.9 | |
| EUGen | 88.6 | 86.5 | 81.3 | 74.6 | |
| RaLiMP (ours) | 89.8 | 88.1 | 84.6 | 80.4 | |
| Baseline | 92.0 | ||||
| Task | R | S | E | L | R | S | E | L | R | S | E | L | R | S | E | L | |||
| Natural | |||||||||||||||||||
| CIFAR-100 | 58.2 | 52.9 | 38.2 | 4.8 | 57.5 | 43.3 | 26.7 | 3.3 | 51.0 | 36.0 | 13.8 | 2.5 | 40.3 | 29.1 | 3.6 | 2.8 | |||
| Caltech101 | 85.2 | 82.1 | 74.3 | 25.6 | 84.4 | 79.0 | 63.6 | 4.2 | 76.0 | 75.9 | 49.1 | 9.0 | 69.4 | 69.2 | 7.0 | 3.8 | |||
| DTD | 69.0 | 66.2 | 59.9 | 18.2 | 67.9 | 63.5 | 53.4 | 8.5 | 59.1 | 59.0 | 44.2 | 10.5 | 50.0 | 49.7 | 22.8 | 9.7 | |||
| Flowers102 | 95.6 | 95.4 | 90.3 | 10.2 | 94.3 | 94.0 | 76.9 | 6.0 | 92.3 | 91.8 | 73.6 | 4.3 | 85.2 | 86.1 | 31.2 | 6.7 | |||
| FFN layers replaced ( ) | |||||||
| Method | 2 | 6 | 11 | 18 | 24 | 27 | 30 |
| Low Rank | 16.83 | 17.57 | 18.79 | 19.06 | 20.91 | 22.66 | 25.31 |
| EUGen | 16.03 | 16.08 | 16.37 | 16.66 | 17.06 | 17.74 | 18.42 |
| SNNK | 14.18 | 14.32 | 14.71 | 15.02 | 15.69 | 16.05 | 16.44 |
| RaLiMP (ours) | 14.10 | 14.22 | 14.58 | 14.90 | 15.26 | 15.42 | 15.69 |
| Dense (no replacement) | 14.17 | ||||||
Multilayer Perceptrons
Multilayer perceptrons are layered feedforward neural networks studied for learning, representing, and efficiently computing functions from data.
See all 48 papers