AI Engineering and Architecture

Maximum Is the New Plus: What Tropical Geometry Reveals About Your Neural Network

A ReLU network is a tropical rational function in disguise. That single fact gives you exact pruning with no training data, puts softmax and ReLU on one dial, and points at chips that add and compare but never multiply.

Guillermo Perry 11 min read
tropical geometry ReLU networks tropical rational function exact pruning TropNNC neural network compression softmax softplus tropical polynomial KNIRV
🌴

🎤 Listen to the episode

Tropical Geometry: When Max Replaces Plus

01The arithmetic inside the network is a choice

Last time we opened with a strange idea: the arithmetic inside a neural network is a choice, not a law of nature. Today we go deeper into the strangest and most useful version of that idea.

Here is the opening question. What if every neural network you have ever trained is secretly doing tropical geometry? Tropical geometry sounds like a vacation, not a branch of mathematics — the name is partly a joke with a long history — but the math is serious. Tropical geometry is what you get when you change the rules of arithmetic.

The whole trick: addition becomes taking the maximum, and multiplication becomes ordinary addition. From that one swap, an entire geometry falls out.

02The swap: when max replaces plus

Slow down for a second. If addition becomes max, then what is two plus three?

Tropical addition ⊕ = max
2 ⊕ 3 = max(2, 3) = 3
Tropical multiplication ⊗ = +
2 ⊗ 3 = 2 + 3 = 5

Two plus three becomes three, because the maximum of two and three is three. And two times three becomes five, because multiplication in this world is ordinary addition. It sounds like a parlor trick — until you notice that a ReLU, the most common activation function in deep learning, is just max(0, x). It is already a tropical operation, and that is not a coincidence.

So you are saying the network is tropical already, and we just never noticed? Exactly. The most ordinary object in AI has been speaking tropical arithmetic the whole time.

03The theorem: a ReLU network is a tropical rational function

In 2018, Liwen Zhang, Gregory Naitzat, and Lek-Heng Lim proved something precise. With whole-number (integer) weights, a feedforward ReLU network is exactly a tropical rational function (Zhang, Naitzat & Lim, Tropical Geometry of Deep Neural Networks, ICML 2018, arXiv:1805.07091).

Unpack the words. A tropical polynomial is just the maximum of a bunch of straight lines: p(x) = max_i(a_i·x + b_i). A tropical rational function is the difference of two tropical polynomials. So the whole network is one maximum of lines minus another maximum of lines. That is all a ReLU network ever computes.

“A ReLU network is a maximum of lines minus another maximum of lines. That is all it computes.”

This is a big claim, so it is worth being precise about the caveat: the equivalence is exact when the weights are integers. Real-valued weights require an approximation step to move between the two worlds, and we come back to that gap later.

04Three things that get exact: boundaries and depth

Why should an engineer care that a network is a tropical rational function? Because once you see the network that way, three things that were fuzzy become exact.

The decision boundary is a tropical hypersurface

In tropical geometry, the place where two pieces of a tropical polynomial tie for the maximum is called a tropical hypersurface. The decision boundary of a ReLU network is one of those. And the flat pieces of the network — the linear regions — correspond to the corners of a polytope, a higher-dimensional shape built from the network’s weights. The network’s behavior is geometry, literally.

Depth is why deep beats shallow

The tropical view gives a clean reason deep networks beat shallow ones. Each layer takes a maximum of maxima, and the number of pieces multiplies. The result is that a deeper network is exponentially more expressive than a shallow one with the same number of neurons — one of the conclusions of the 2018 paper, and it falls out of the tropical algebra almost for free.

05Exact pruning: delete the pieces that never win

Now the most practical idea in the episode: exact pruning. Think of a tropical polynomial as a maximum over many linear pieces. Some of those pieces never win — for every input you could ever feed in, some other piece is always at least as large. So that piece contributes nothing to the output, ever. You can delete it and the function does not change at all. Not approximately. Exactly.

Normal pruning is a bet. Tropical pruning is arithmetic. Normal pruning guesses which weights matter, then retrains and hopes. Tropical pruning finds the pieces that never win the maximum and throws them away with a proof.

This is not just theory anymore. Two papers turned it into algorithms.

The geometry itself tells you what is redundant. Redundancy is a property of the function, not of the data. If a neuron never wins the maximum, it is dead weight in every possible world, not just on your test set.

Why this matters for distributed AI. TropNNC needs only the weights and no training data. That makes it a natural fit for agents running at the edge: an agent could compress its own model locally, without shipping data back to a central trainer, because the redundancy is a property of the weights rather than of any dataset.

06Softmax is tropical too: the one dial

Something that surprised me when I first heard it: softmax — the thing at the end of every classifier and every language model — is tropical too, once you cool it down.

Softmax is built on the log-sum-exp function, a smooth version of the maximum. It takes the exponentials of your numbers, adds them, and takes the log. There is a temperature parameter. As the temperature goes to zero, log-sum-exp becomes exactly the maximum. The smooth function collapses onto the hard one.

Temperature = 1
Softmax → probabilities
Temperature → 0
Softmax → argmax (winner-take-all)

The same pattern shows up in activations. ReLU is the zero-temperature version of softplus, the smooth function log(1 + e^x). Turn the temperature down and the smooth curve sharpens into the corner that is the ReLU. So the whole modern toolkit — softmax, softplus, ReLU — sits on one dial, and tropical geometry is what you get when the dial reads zero.

That reframes a lot. The networks we train in smooth arithmetic are approximating a tropical object, and inference at low temperature is basically tropical already.

07The hardware prize: add and compare, never multiply

The third idea is the hardware one. Tropical arithmetic needs only two operations: addition and comparison. There is no multiplication anywhere — and multiplication is the expensive operation on a chip.

How expensive? On a 45 nanometer process, a 32-bit floating-point multiply costs about 3.7 picojoules while an add costs about 0.9 picojoules. The multiply costs roughly four times as much energy, takes far more silicon area (M. Horowitz, Computing’s Energy Problem (and what we can do about it), IEEE International Solid-State Circuits Conference, 2014, pp. 10–14, DOI 10.1109/ISSCC.2014.6757323, Figure 1.1.9).

Now imagine a chip that never multiplies. Its arithmetic is add and compare. That is the tropical promise for hardware — and it connects directly to the previous episode’s synthesis: residue number system channels doing tropical arithmetic over sparse expander wiring would be a machine with almost no multipliers in it at all. We trace that wiring argument in A Few Good Edges: How Expander Graphs Make Sparse AI Wiring Smarter, and the arithmetic half in The Math AI Ignores: Exact Arithmetic and a Faster Matmul.

08The honest pushback: why isn’t anyone shipping it?

If tropical hardware is so attractive, why is nobody shipping it? That is the right question, and the honest answer has two parts.

  • Training still uses ordinary arithmetic. Gradients need smooth functions, so a tropical chip is an inference story, at least for now. You train in smooth math and run inference in tropical math.
  • The theory is ahead of the tooling. The equivalence between ReLU networks and tropical rational functions is exact when the weights are whole numbers, and real networks have real-valued weights — so there is approximation involved in moving between the two worlds. Researchers are working on that gap, but it is a real gap.

This is not a finished revolution. It is a live research program. TropNNC and the tropical-division algorithm are real and published, but they are early practical steps, not a shipped product.

09The takeaway

The most ordinary object in AI, a ReLU network, is a tropical rational function in disguise. That disguise is not a curiosity. It gives you exact pruning: the pieces that never win the maximum are deleted for free. The softmax connection? Softmax is the warmed-up version of the same idea, and ReLU is softplus cooled to zero — one dial from smooth probabilities down to a hard maximum. And the hardware? It points at machines that add and compare but never multiply, the cheapest arithmetic a chip can do.

The arithmetic inside the network was always a choice. Tropical geometry is what happens when you choose differently.

Next time: the third piece of the puzzle — expander graphs, and why sparse wiring might be the most principled way to connect a network. We will see how you wire a tropical machine.

Until then, remember: maximum is the new plus, and plus is the new times.

Frequently asked questions

What is tropical geometry in plain terms?

It is ordinary algebra with two operations renamed: tropical addition is the maximum, and tropical multiplication is ordinary addition. A tropical polynomial is then the maximum of several linear functions. The surprising result is that a ReLU network computes exactly this kind of function.

Why does integer versus real weights matter?

The proof that a ReLU network is exactly a tropical rational function holds for integer weights. Real-valued weights, which is what real networks use, require an approximation step to relate the network to its tropical form. That approximation is the main gap between the clean theory and practical tooling.

Does tropical pruning actually work on real networks?

Yes, in published work, though the practical methods are mostly approximate. TropNNC (TMLR, June 2026) compresses networks using nothing but the weights, merging similar tropical pieces with a proven error bound, reports results competitive with data-driven baselines on MNIST, CIFAR, and ImageNet, and gives the tightest known theoretical compression bound for this method. It also extends tropical compression to convolutional layers for the first time.

Is tropical hardware real, and why isn’t it shipping?

The arithmetic is real and the energy case is strong: multipliers cost several times more energy and area than adders. But training still needs smooth functions, so tropical arithmetic is currently an inference idea, and the theory-to-tooling gap for real-valued weights is still being closed. It is an active research program rather than a product.

Sources and further reading

By Guillermo Perry · KNIRV
Tropical Geometry ReLU Networks Exact Pruning TropNNC AI Architecture