Selecting K slots naively would score all M of them for every token, reintroducing a cost that grows with the state size.
Instead, Product Softmax avoids this by composing the large address distribution from a few small ones.
Specifically, Product Softmax factors the slot count as M = dpU, so that each slot index can be written as U digits with dp values each.
The key or query is split into U parts, and a softmax over each part gives a distribution over the dp values of one digit.
The weight of a slot is then the product of the probabilities assigned to its digits.
As a result, U dp scores suffice to address all M slots.
For example, RAM-Net uses M = 1024 = 45 with only 20 scores.
The figure above shows how these digit distributions combine into a distribution over slots, from five equivalent perspectives.
Soft Radix Address
In base dp, each slot index is a sequence of U digits.
Instead of fixing every digit to select a single slot, Product Softmax gives each digit a distribution over its dp values.
Every slot is then weighted by the product of its digit probabilities.
Multilevel Decision Tree
Each digit forms one level of a tree, so every root-to-leaf path corresponds to one slot.
A slot's weight is the product of the branch probabilities along its path.
Since all nodes at a level share the same digit distribution, the most probable slots can be found level by level, at a cost that grows with the depth U rather than the number of leaves M.
Joint Distribution
Each digit corresponds to one axis of a U-dimensional grid, so each slot is a grid point weighted by the product of its probabilities along every axis.
A confident digit confines the weight to a slice of the grid, whereas an uncertain digit spreads it along its axis.
Thus, the highest-weight slots lie where these slices intersect, extending only along the axes of uncertain digits.
The figure illustrates the case U = dp = 4.
Regroupable Address
Since the weight is a product, any set of digits can be merged into a single coarser digit without changing any slot weight.
Splitting the digits into two groups thus arranges the slots as a matrix whose weights form an outer product of two vectors.
The figure shows two such groupings, 64 × 4 and 4 × 64, which trace different patterns over the same weights.
Waveform Modulation
Read along the slot index, each digit's distribution becomes a periodic step waveform.
Low-order digits change at every slot and repeat quickly, whereas high-order digits change slowly and hold each value over long intervals.
The address distribution is the product of these waveforms, with the slow ones setting a coarse envelope and the fast ones modulating it within.
All five views express one property, namely that a slot's weight factorizes into independent per-digit probabilities.
This factorization enables an exact and efficient Top-K search.
Following the tree, RAM-Net fixes the digits one level at a time and keeps only the K most probable partial addresses at each level.
A dropped partial address already trails K others, and since all of them are multiplied by the same remaining digit probabilities, it can never overtake them.
The search thus returns the exact Top-K while evaluating only K dp candidates per level, rather than all M slots.