A Very Good Loaded Die

November 22, 2026

Picture a dice game, and you’re pretty sure the other guy’s die is loaded. You don’t get to pick it up and look. All you’ve got is what you’ve seen: roll it all night and it averages 4.5, not the 3.5 a fair die gives. So it’s cooked toward the high numbers. The question is, how is it loaded? What probability would you put on each of the six faces?

Harder than it sounds, because a lot of dice fit that one fact. Put all the weight on 3 and 6, you get 4.5. Put it all on 4 and 5, also 4.5. But those aren’t really loaded dice, they’re degenerate trick answers. A real one still has some spread to it, some randomness, just tilted. So which tilt do you actually believe?

Here’s the move I like, and it’s basically the whole post: build the die that stays as close to fair as it can while still landing that 4.5. Don’t add one assumption you can’t back up. Minimum bias, maximum randomness, subject to the one thing you know. And the part that got me, the reason I spent way too long on this, is that “don’t assume more than you have to” sounds like a vibe, a rule of thumb, taste. It isn’t. It’s a theorem, one answer you can compute to as many decimals as you want. The loose intuition turns out to be exact. That’s the feeling I chase, and once you see it, it’s everywhere.

Quick thing before we start. I don’t really trust a derivation I can’t rebuild from scratch, so I forced this one from the ground up, refusing every step I couldn’t justify. There’s a line people like to pin on Heisenberg that stuck with me: the first gulp from the glass of natural science makes you an atheist, but at the bottom of the glass God is waiting for you. That’s the feeling, the part where a formula stops being something you memorize and becomes the only thing it could have been. What follows is that version.

Want the idea, not the algebra? Read straight through and skip the block marked The rigor. Nothing after it depends on it.


BLUF: assume the least

You likely already believe some version of this. Occam’s razor, don’t multiply assumptions, the simplest explanation is usually right, don’t add structure you can’t justify. In machine learning the same instinct shows up as not baking in inductive bias you can’t justify.

That whole family, assume as little as possible beyond what you’re told, is what we’re about to pin down exactly.

Here it is. Out of all the distributions (a distribution is just a list of outcomes with a probability on each) that fit what you were told, pick the one that assumes the least beyond the data. You can add structure, but then own it. If you actually know more, measure it. Don’t dress a guess up as knowledge you don’t have.

Now make assume the least exact. What’s the mathematical opposite of quietly assuming structure you can’t justify? It’s spread: a distribution as flat as it can be while still respecting what you know. That spread has a name, entropy. A sharp, confident distribution (all the weight on face 6) has low entropy. A perfectly flat one (every face equally likely) has the most entropy there is.

So assume the least becomes maximize the entropy, subject to what you were told. That’s the principle of maximum entropy, Occam’s razor with the fuzziness scrubbed out: believe the most spread-out distribution, the flattest one, that still fits the facts.

When I first came across this, my only question was “what’s the actual use case?” Turns out this is physics’s whole life. In statistical mechanics you want to understand something like a gas, but there are way too many particles to watch directly, something like 102310^{23} of them bouncing around the room you’re in. So you don’t track them one by one, you reason about their distribution through aggregate rollups, averages and the like, temperature and pressure. Then you ask the same thing we asked about the die: given only those averages, what’s the most honest guess for how the energy is spread? Physics’s answer is the Boltzmann distribution, and it’s exactly maximum entropy subject to those measured averages. The die and the gas are the same math.


What the answer looks like, before any math

Start from knowing nothing. If I’d told you nothing about the die, max entropy just says spread the weight evenly, 1/6 on every face. The fair die. That’s your “I refuse to assume anything” distribution, the baseline everything else departs from. (Its average works out to (1+2+3+4+5+6)/6=3.5(1+2+3+4+5+6)/6 = 3.5.)

Now add the one fact. 4.5 is above what the fair die gives, so you have to shift weight onto the higher faces to get there. Here’s the discipline: measure every move from the fair die, and make the total move as small as you can. Shift just enough to land the average at 4.5, not a hair more. Any extra departure from fair is structure you can’t justify.

What you get is a die that leans, more weight on 5 and 6, less on 1 and 2, but leans as gently as it possibly can. As close to the fair die as the one fact allows.

The fair die versus the maximum-entropy die for an average of 4.5. The lean toward the high faces is real, but gentle.

That phrase, “as uniform as possible subject to whatever mean you ask for,” is the whole method. You start flat and bend only as much as the fact forces you to. And there’s a single knob that controls the bend.


The dial

Call it λ\lambda. One number that sets how hard the distribution tilts.

Picture a hill. Plot the best entropy you can achieve against the average you demand. It’s a smooth hump, peaked right at the fair-die average of 3.5, where you assume nothing and entropy is maxed out, and it slopes down on both sides as you drag the required average away in either direction. The dial λ\lambda is the slope of that hill wherever you happen to be standing:

  • At the top (average 3.5), the slope is zero. λ=0\lambda = 0, no tilt, the fair die. The “do nothing” setting.
  • Walk right, toward a higher average. The hill slopes down, λ\lambda goes negative, and the die leans toward the high faces. For an average of 4.5 the dial sits at about λ≈−0.37\lambda \approx -0.37.
  • Walk left, toward a lower average. The slope flips sign, λ\lambda goes positive, and the die leans low.

Best entropy achievable versus the required average: a concave hill peaked at the fair-die average of 3.5, where the dial λ is its slope.

Because λ\lambda is a slope, it isn’t just some tuning parameter, it’s a price: the entropy you give up per unit you drag the average. That’s why it earns the word price and not just parameter.

Here’s the everyday version. Fence a rectangular field with a fixed amount of fencing, a river running along the fourth side so that edge is free, and ask for the most area you can enclose. The multiplier on the fencing tells you how much extra field one more foot of fence would buy you. That’s all a price ever is, the worth of one more unit of whatever you’re rationed on. Here you’re rationed on the average and you pay in entropy, so λ\lambda is the entropy you spend for one more notch of forced average. Near the top of the hill that price is cheap, far from 3.5 it gets steep. Any time you run into a problem later with a “multiplier,” or a “temperature,” or a “Lagrange term” hanging off it, that thing is this same object, the price of a constraint, measured as a slope. Read multipliers as prices and a lot of applied math starts to look like economics.

So the whole picture, no formulas needed: start fair, tilt by the minimum the fact demands, and pay for the tilt in entropy. When you actually write the formula down, the tilt turns out to be the gentlest kind there is, a clean exponential, each face a fixed multiple more likely than the face one value lower (face 4 against face 3, and so on down the line).

I’ll tell you how I knew the shape was exponential before deriving anything. I’d computed the six probabilities numerically: 0.054, 0.079, 0.114, 0.165, 0.240, 0.347. Each one is almost exactly 1.45 times the one before it. A constant ratio, the whole way up. And a constant ratio is an exponential, there’s nothing else it can be. (That 1.45 turns out to be e−λe^{-\lambda}, but I knew the shape from the ratios first.)


The rigor: deriving the exact shape

(Skippable. If you just want the payoff, jump to “The punchline.” But this is where the picture becomes a mechanism, and where the forcing actually happens.)

We want to maximize entropy H(p)=−∑ipiln⁡piH(p) = -\sum_i p_i \ln p_i subject to two constraints (facts the answer is forced to respect): the average ∑ipiEi=μ\sum_i p_i E_i = \mu (here EiE_i are the face values 1,…,61,\dots,6 and μ=4.5\mu = 4.5), and normalization ∑ipi=1\sum_i p_i = 1.

The geometry, which is the part worth forcing. At the peak of a constrained maximum, something specific happens, and it’s the fact everything else sits on top of. The gradient of entropy, the direction of steepest increase, the way straight uphill, does not vanish. It points entirely in the forbidden directions. Every scrap of “uphill” that’s left would need you to break a constraint. You’re stuck at the top not because the ground went flat, but because all the climb that remains points straight out of the region you’re allowed to move in. Said precisely: at the optimum, ∇H\nabla H is a combination of the constraint gradients, with no component along any feasible move. That’s the whole theorem. Everything after it is turning a crank.

Here’s the picture I keep in my head. You’re hiking a mountain where altitude is entropy, how honest and spread-out your guess is, and you’re roped to a trail: the feasible set, every die that still matches the one number you were told and is still a legal die (positive, summing to 1). You walk that trail to its highest point. Right there it goes flat: step either way along it and you gain nothing, so every scrap of the mountain’s steepness that’s left has to point straight off the trail, in the one direction the constraint fences you out of. That’s why the leftover uphill lines up with the constraint’s own gradient. The contour the trail runs tangent to is the highest one it ever touches, and that tangent point is p⋆p^\star.

The constrained summit. At p★ the feasible trail runs tangent to an entropy contour, so the leftover uphill ∇H points straight off the trail, along the constraint normal u = ∇g. With just the mean constraint drawn here it's ∇H = λu; the full problem adds normalization, giving ∇H = λu₁ + νu₂, the uphill built from both normals.

The device. The Lagrangian turns that geometric fact into a crank. It isn’t a formula to memorize, it’s reverse-engineered. You want a single function whose gradient is exactly ”∇H\nabla H minus a combination of constraint gradients,” because setting that to zero is the condition we just proved. So you read it straight off:

L(p,λ,ν)=−∑ipiln⁡pi−λ ⁣(∑ipiEi−μ)−ν ⁣(∑ipi−1).L(p,\lambda,\nu) = -\sum_i p_i \ln p_i - \lambda\!\left(\sum_i p_i E_i - \mu\right) - \nu\!\left(\sum_i p_i - 1\right).

In words, that’s entropy minus a penalty for each constraint you haven’t met yet, every penalty scaled by its own price. Each penalty vanishes exactly when its constraint is satisfied, so at the max-entropy point LL collapses back to plain entropy.

Set every partial derivative of LL to zero and you get the whole problem back at once. The derivative in pp gives the geometric optimality condition, the derivative in λ\lambda hands back the average constraint, the derivative in ν\nu hands back normalization. You’ve traded a constrained maximization over some awkward slice for plain unconstrained stationarity of one function. No more “subject to.” That trade is the entire reason the method exists.

Turn the crank. Differentiate LL with respect to a single pip_i and set it to zero:

−ln⁡pi−1−λEi−ν=0⟹pi=e−λEi e−(1+ν).-\ln p_i - 1 - \lambda E_i - \nu = 0 \quad\Longrightarrow\quad p_i = e^{-\lambda E_i}\, e^{-(1+\nu)}.

Now spend ν\nu, using the one equation we haven’t touched yet, ∑ipi=1\sum_i p_i = 1. That constant e−(1+ν)e^{-(1+\nu)} is the same for every face, so it factors right out of the sum:

e−(1+ν)∑ie−λEi=1⟹e−(1+ν)=1∑ie−λEi.e^{-(1+\nu)}\sum_i e^{-\lambda E_i} = 1 \quad\Longrightarrow\quad e^{-(1+\nu)} = \frac{1}{\sum_i e^{-\lambda E_i}}.

The thing normalization squeezes out gets its own name, the partition function Z(λ)=∑ie−λEiZ(\lambda) = \sum_i e^{-\lambda E_i}. The multiplier ν\nu is spent: you solved for it and it’s gone, folded into ZZ. What’s left is the exact shape of the most honest die:

 pi=e−λEiZ(λ),Z(λ)=∑je−λEj. \boxed{\,p_i = \frac{e^{-\lambda E_i}}{Z(\lambda)}, \qquad Z(\lambda) = \sum_j e^{-\lambda E_j}.\,}

In words: each face gets a weight that falls off exponentially in its value, and then you divide by ZZ so the six weights add up to 1. That’s the entire shape.

Plug in λ≈−0.37\lambda \approx -0.37 and out come the numbers I was staring at: p⋆≈(0.054, 0.079, 0.114, 0.165, 0.240, 0.347)p^\star \approx (0.054,\, 0.079,\, 0.114,\, 0.165,\, 0.240,\, 0.347). They sum to 1, they average 4.5, and each one is e−λ≈1.45e^{-\lambda} \approx 1.45 times the one below, which is the constant ratio I spotted before any of this.

And the geometry threw in a free check. The optimality condition forces that gradient to read λEi+ν\lambda E_i + \nu at every face, which means the six numbers all have to sit on a single straight line, slope λ\lambda and intercept ν\nu. But a line has only two degrees of freedom, so I needed just two of the six faces to pin λ\lambda and ν\nu down. The other four were redundant, and the fact that they agreed, that all six actually landed on the line, was the check. One arithmetic slip anywhere and the points wouldn’t have been collinear, and I’d have caught it on the spot.


You’ve seen this shape before

Here’s the shape the machinery spat out, with EiE_i standing for nothing fancier than the face’s number, 1 through 6:

pi=e−λEi∑je−λEj.p_i = \frac{e^{-\lambda E_i}}{\sum_j e^{-\lambda E_j}}.

That is the softmax function. The exact operation sitting at the very end of almost every modern classifier, the step that turns a list of raw scores into probabilities. It’s the last thing a language model does to pick its next word: it scores every possible next token, and it runs this formula to turn those scores into the odds it rolls. Every word ChatGPT writes is drawn from the distribution this formula produces.

And it’s the same object, not a loose analogy. Among all distributions over the options, softmax is the one with the most entropy for a given expected score, the scores sitting where −λEi-\lambda E_i sat in the die and ZZ the same normalizer (the bottom sum that makes the weights add to 1). It doesn’t resemble a max-entropy distribution, it is one. That “assume the least” isn’t bolted on, it’s the shape of the last layer.

Back to the gas. The die’s faces were 11 through 66; a gas molecule’s faces are its possible energy levels, and the one number you measure is the average energy, which plays the exact role μ\mu did for the die. The Boltzmann distribution makes a level’s probability proportional to e−E/kTe^{-E/kT}, then divides by the same kind of normalizer ZZ. Set λ=1/kT\lambda = 1/kT and it’s character-for-character the die formula. The gas, the die, and the softmax in a neural net are the same three lines of algebra in three different costumes.

It goes one level deeper if you know how LLMs are actually trained. The alignment methods behind them, RLHF and DPO and the rest of the stuff that makes a raw model actually helpful, are built on the same skeleton. The objective is: make the model better (higher reward) while staying close to a reference model (don’t drift off into nonsense). Write that down as a constrained optimization, turn the same crank, and the optimal policy falls out as

π(y)∝πref(y) ereward(y)/β.\pi(y) \propto \pi_{\text{ref}}(y)\, e^{\text{reward}(y)/\beta}.

Same exponential tilt, same partition-function normalizer. And here’s the honest generalization I glossed over: maximizing entropy was only ever the special case of staying as close as you can to a uniform baseline. The real principle is to stay closest to whatever baseline you started from, where “close” means how far your distribution drifts from it (that drift has a name, the KL divergence). RLHF’s baseline isn’t uniform, it’s the reference model πref\pi_{\text{ref}}, the whole pretrained distribution. So the fair die’s role is played by πref\pi_{\text{ref}}, the face values by the reward, and the dial by β\beta, the temperature everyone argues about when they tune these systems. (One honest footnote: λ\lambda here is an inverse temperature and β\beta is a temperature, so the two knobs run in opposite directions, but it’s the same single knob doing the same single job.) It really is the same machine. A loaded die and a trillion-parameter language model, running the identical piece of mathematics.


The actually-useful part: the shape is everywhere

On its own, “dice and chatbots share a formula” is a factoid. It’s worth more than that because max entropy is one case of a pattern: something to optimize, some constraints, and a price on each constraint. The pattern has a name, convex duality, and it’s the part of all this I actually reach for.

Quick tour of the same shape wearing different clothes:

  • Statistical mechanics. The gas we keep coming back to. You measure temperature and pressure, you can’t see the particles, and max entropy hands you the Boltzmann distribution over microstates. This is where the whole idea came from, Jaynes made the connection explicit in the 50s, and it’s still the cleanest place to feel it: physics as the art of guessing honestly when you can’t see everything.
  • Support vector machines. Maximize the margin between two classes subject to classifying the points right. The constraint prices turn out to be nonzero only for the handful of points touching the margin, the “support vectors,” and everything else drops out. Same machine, and the question “which constraints are actually binding” becomes a geometric picture.
  • Rate–distortion and the information bottleneck. Compress a signal while keeping its error under a set cap (a fidelity constraint, a limit on how much quality you’ll give up). The price β\beta trades bits against accuracy, and the solution is, again, an exponential tilt. This is the honest mathematical version of “keep the useful part, throw the rest away,” which, when you squint, is also what learning is.
  • Portfolios. Maximize expected return subject to a risk budget. The efficient frontier is the hill, and the multiplier is the price of taking on more risk. If you’ve ever heard someone say “risk-adjusted,” this is literally the adjustment.

Different fields, totally different vocabularies, one skeleton underneath: an objective, some constraints, a price per constraint, and an exponential-family answer. The reason the answer is always exponential-family is one clean theorem: maximize entropy subject to fixing the expected value of some feature, and you always get a distribution exponential in that feature. The die’s feature is the face value, the gas’s is energy, the classifier’s is the score. One theorem, three features. The deepest version of the connection: the entropy as a function of the mean and ln⁡Z\ln Z as a function of λ\lambda are Legendre transforms of each other, with μ\mu and λ\lambda the conjugate pair, the slope of each the variable of the other. It’s the same duality that turns any convex function into its “price” description. But you don’t need that machinery to get the payoff. The payoff is a reflex: when you hit a new optimize-under-constraints problem, the first thing you ask is what the prices are and what they mean. (Not every price says something. The normalization one only enforces a definition, that probabilities sum to 1, so it gets absorbed and never earns a reading; it’s the real constraints whose prices carry meaning.)


Why I care

I spend a lot of breath on the philosophy of inference. Assume the simplest thing. Don’t commit to more than the evidence gives you. It usually lives in the land of taste, of good judgment, of things wise people say at dinner. Maximum entropy takes all of that and makes it a theorem: “assume the least” stops being a preference and becomes a derivation with one answer you can compute. And then the same answer turns out to be the last layer of a classifier, the policy of an aligned model, a gas at equilibrium. The part that gets me is that it’s the same rule underneath all of them, which is also where this stops being about dice.


Shower Thoughts

I’ve been telling you the fair die is the “assume nothing” baseline, and I want to come clean, because it isn’t quite true, and the gap is where this gets interesting.

Assuming every face is equally likely is itself an assumption. “Assume the least” really means “assume the least beyond some baseline of indifference,” and that baseline, flat over these six faces, is a choice. For a die the faces are such an obvious unit that it feels like nothing, but pick a different notion of what counts as “equally likely to start with” and max entropy hands you a different answer. There’s no view from nowhere. You always begin from some prior sense of the know-nothing state and minimize assumptions relative to that.

And here’s the interesting part. The whole point of our die is that it’s loaded. Mean 4.5, we know it’s not fair, it’s a cheating die, and every nudge toward the high faces made the cheating more obvious. The max-ent distribution isn’t honest in some absolute sense, it’s the most honest guess you can make given the constraints it was handed.

Now think about a language model. If it just argmax’d, if it just fetched the single most common continuation of everything it had ever seen, you’d clock it as fake in about two sentences. A very loaded die, obviously cheating. The reason it feels alive is that it spreads: it samples from a distribution instead of fetching a sequence, and the knob that controls the spread is temperature, which is our dial, which is the entropy price all over again. Max entropy is literally the thing that turns retrieve the past into synthesize something new.

But is that novelty, or just a well-hidden cheating die? The model is loaded by its training data the way our die is loaded by its mean. It’s producing the most honest distribution consistent with everything it absorbed, and that can look an awful lot like comprehension while, underneath, being the same move as the die: constraint-satisfaction dressed up as understanding. Anyone who ever crammed for an exam knows the difference between learning something and memorizing the formula to parrot it back. The model is very, very good at the second one.

And this isn’t just my metaphor. Treating language as maximum entropy with a Lagrange multiplier per constraint is a real lineage, the paradigm NLP ran on for years (Berger et al.) and the one modern alignment quietly reinvented (Korbak et al., Khalifa et al.). People have been formalizing this for thirty years.

Which turns the question back on us, and I don’t have an answer. All speech might just be maximum entropy over words, subject to an idea. You’ve got a thought, that’s the constraint, and you reach into your own stock of words for the ones that fit. Emphasis on your own, everyone reaches a little differently. You know the feeling of a word on the tip of your tongue, where you can feel the exact shape of what you want to say but can’t land the word, and then someone else says it for you, nails it, and you go yeah, that one? That’s two people’s word-distributions lining up on the same idea. So how personal is any of it, really?

You could take that and wonder how much of being a person is just a very good loaded die. But I don’t think it’s bleak, and I don’t think it goes all the way down. Someone handing you your own word is a connection, not a theft. The pieces were never the unique part, and even the bridges have patterns, there are aggregate ways a whole culture wires things together. But the aggregate isn’t the person. Each of us is still our own distribution, a sample nobody else is, and that interplay is maybe the whole thing it is to be human. Everyone gets the same six faces. The way you’re loaded is yours.

Here’s a different thread the same die pulled loose: the idea of a verifier. A constraint like the mean is 4.5 only shapes the distribution, nothing makes one roll right and another wrong. A verifier is a different animal. It doesn’t check the distribution, it checks a single output against ground truth. For a die there’s no such thing, a 5 isn’t correct. But ask a model for code and you can run it: this program compiles and passes the tests, that one doesn’t. Now plausible and correct come apart, and you can keep the samples that actually work and throw out the ones that only looked right. That’s why AI for coding and math works as well as it does, the domain ships with its own judge, and it’s the whole idea behind training these models on verifiable tasks: reward the samples that pass the checker.

The verifier isn’t always clean, though, and that’s where the softer stuff lives. In my own work, determining whether an agent’s output is safe, the verifier is a moving target. It drifts, adversaries adapt to it, and a frozen test set goes stale the day you ship it. The real job isn’t to write down a list of examples, it’s to build an engine that keeps deciding correctly as the world moves. And then you hit taste, and meaning, and originality, where it feels like there’s no verifier at all. But I don’t think that’s right. We do have verifiers for taste. They’re just soft, distributed, and slow: social norms, consensus, the sense a community builds up over time about what’s good. We just haven’t compiled them into anything as crisp as a compiler.

And maybe we can’t, for a reason math settled a century ago. Gödel showed that any system rich enough to be interesting can’t be both complete and consistent, so math took the deal: accept that some questions are formally undecidable, and stay consistent about the rest. (To be clear, Gödel’s theorems are about formal systems that can do arithmetic, not about cultures or taste, so this is a borrowed metaphor, not a proof.) A compiler inherits that bargain, crisp and consistent on its own turf, silent past the edge. Our verifiers for taste made the opposite trade without ever admitting it. We want a verdict on everything, complete, and so we end up inconsistent, the taste-checker ruling one way this decade and the reverse the next. The honest move might be the mathematician’s: own how much is genuinely undecidable, and just try to stay consistent about the rest.

So what do I actually take from all this? I want to be careful, because the whole dice-to-human thing is itself a model, and every model is wrong but some are useful. A person is not a reference policy with a reward bolted on. That flattens the lived experience, the lossiness, the plain indifference of things, everything that makes it complicated. So take even this with a grain of salt. Don’t over-prescribe to it.

But here’s the useful part I keep. There’s real fun in trying to find the reason under everything, the hidden structure, the theorem behind the vibe. And at the same time, sometimes things are just meaningless, and that’s okay. Holding both is most of it.

The rest is simpler than the math makes it sound. Audit the voices in your life. Notice the perspectives that aren’t there. Challenge your own opinions on purpose. Because what’s around you, who you pay attention to, what you subscribe to, it genuinely shapes where your brain goes and what you end up doing. And the goal isn’t to optimize yourself into some mold, it’s the opposite: to stay authentic to your own distribution, whatever it actually is, instead of quietly fitting someone else’s. You can’t verify your way to a good life from the inside. But you can be honest about your data, and keep your eyes open.


If you take nothing else:

  1. Occam’s razor is computable. “Assume the least” isn’t a vibe, it’s “maximize entropy subject to what you know,” and it has exactly one answer.
  2. A multiplier is a price. Temperature, Lagrange term, the β\beta in RLHF, they’re all the slope of a hill, the cost of a constraint.
  3. Softmax isn’t arbitrary. It’s the uniquely honest way to turn scores into probabilities. The “assume the least” is in the architecture, not glued on afterward.

This came out of rebuilding the max-entropy, Lagrangian duality, and DPO arc from first principles, every step forced, nothing taken on faith. If you want the gory geometric detail behind “the gradient lands in the constraint span,” I wrote it all out: the full forced derivation. Here I just wanted to show you the die.