Home/Rulers Before Models/Rulers Before Models

Chapter 9 · EVALUATION AND COMPLETENESS

The loss you optimize is already the strategy

Loss card / KKT: frontier as legal proposals, not $1.80. Optimization language in finance names a loss, not a unique truth. Freeze it on a card, then make cheating expensive.

Ch 9 · Loss cards KKT Shortcut gate

I keep watching teams debate architectures while leaving the training objective unnamed, as if the loss were a neutral scoreboard instead of the strategy itself.

They argue architecture for weeks. They argue features for weeks. They argue seeds, early stopping, and holdout hygiene. Then they treat the training objective like a scoreboard somebody else already chose. That is backwards. The scalar you ask the optimizer to improve is not a neutral report card. It is the strategy. Change the loss and you change what a good model means, which near-winners survive, which ranges look honest, and which hedges get called successful.

If you skip this layer, every gate you build later becomes a polite policeman standing outside a factory that is already manufacturing the wrong product.

What training actually does

Strip the romance. Training searches a huge set of predictors or policies for ones that look better under a chosen objective on a chosen dataset under chosen constraints. Architecture, features, and seeds matter. They matter after the objective has already defined better.

That is why two teams can share data, share networks, share GPUs, and still ship incompatible machines. One optimizes average absolute mark error. One optimizes a trading PnL proxy. One optimizes a risk-adjusted score computed only on days the policy chose to trade. Same never-traded structure. Different species.

Quick definition, because Goodhart gets waved around as a slogan. When a measure becomes a target, it stops being a good measure (Goodhart’s law). In systems language: the proxy you optimize will be gamed by anything the search can find, including behaviors you never intended to reward. Reward misspecification research has a colder name for the same fact: the optimizer is not evil; it is efficient at the wrong story. Specification gaming (Krakovna et al., DeepMind blog and collected examples; related lists such as Lehman et al. on surprising creativity) is not a personality defect in the model. It is the search doing what you asked.

I keep seeing people treat that as a philosophy problem. It is an engineering problem. If the objective is anonymous, the personality is anonymous. You will still get a green board. You will not know what green meant. Model documentation practice already knew the cure in outline form: Mitchell et al., “Model Cards for Model Reporting” (arXiv:1810.03993), require intended use, evaluation conditions, and metrics to be written down with the artifact. Banking model-risk guidance (SR 11-7 lineage) makes the same demand under different words: purpose, design, and performance claims must be documented and independently challengable. A loss that never appears on the card is an undeclared strategy.

How anonymous objectives mint personalities

1. Shrink-the-window heroes. A reward that only scores days with trades teaches the policy to avoid hard days. Holdout Sharpe looks beautiful. The book that needed a mark on the ugly afternoon never got one. The objective selected silence as skill. Evaluative compression did the rest: one ratio hid the days that never entered the average.

2. Absolute-error peacemakers. Average mark error pulls both frames toward a social middle. On CEH-001 that middle is often near 1.80, outside both honest bands [1.42, 1.58] and [2.01, 2.22]. Training then industrially manufactures the midpoint culture you thought you banned in review meetings. The loss did the politics. No agent had to invent 1.80; the scalar asked for it.

3. Inventory-blind hunters. A PnL proxy that ignores inventory, liquidity, and funding will learn to look brave in the simulator and fragile on the blotter. Residual checks later will look confused because the objective never asked for hedge honesty. It asked for score.

4. Untracked objective search. Teams rename losses between experiments without recording which personality won. Promotion then compares artifacts as if they shared a ruler. They did not. They shared a filename. That is underspecification wearing a loss function: many secret objectives, one trophy (D’Amour et al., arXiv:2011.03395, still applies inside the loss choice).

5. Soft multi-objective mush. Someone averages mark error, hedge PnL, and inventory into one training scalar with weights chosen after looking at the board. That is Friday exam negotiation wearing a tensor. The weights are the strategy. If they are not written down up front, they are theater.

Production breaks: model, agent, harness, pipeline

Model trench. Gradient steps do not know what you meant. They know the scalar. A dual-frame mark job trained under mean absolute error will systematically shrink the 0.60 gap on CEH-001 because the average error surface rewards peace. You will see tighter crowds and softer disagreement abort, and both will look like progress until co-break week.

Agent trench. An agent rewarded for "reconcile the mark" without a frozen dual-frame term will propose 1.80 with fluent rationale. The fluency is not evidence. It is the loss leaking into language. Clearance must refuse drafts that cite no loss-card hash.

Harness trench. Leaderboards that show architecture and seed but not objective id compare different species under one column. Challenger versus champion becomes meaningless. The harness must fail closed when card ids disagree.

Pipeline trench. A CI job that retrains nightly under a default loss pulled from a shared config is a silent strategy rewrite every night. If the config can change without a change packet, you do not have a frozen loss. You have a vibe with a cron.

A simple never-traded walkthrough

Take CEH-001 again. No direct history. Spread-frame work keeps landing near 1.50 [1.42, 1.58]. Curve-frame work keeps landing near 2.10 [2.01, 2.22]. Frame uncertainty is about 0.60 wide on a claim that moves money.

RecipeObjective (strategy)What it learnsGate risk
Adual-frame mark error + anti-collapse penaltykeeps clouds near 1.50 and 2.10honest disagreement managed
Bclose to last-quarter human markslearns 1.80 as truthmidpoint peacemaking; deny
Chedge PnL in friendly simdrift hunting looks like risk mgmtlive residual fails

Same product family. Three objectives. Three machines. More GPU hours will not reconcile them. The loss already chose sides. If you only ship the network weights and not the objective card, the next team cannot even tell which machine they inherited. That is why Mitchell-style model cards and SR 11-7-style purpose documentation start with the decision the model is for, not with the layer count.

Why gates cannot fix this after the fact

Near-winner probes assume the crowd shares an objective. If every seed optimized a hackable proxy, narrow width means they found the same cheat. Stakeable ranges wrap whatever personality the loss minted. Frozen exams can still bless the wrong strategy if the exam metrics are soft versions of the same proxy. Promotion discipline matters. It cannot invent an honest objective that training never had.

This is Bertrand wearing an optimizer. Anonymous measurement geometry gave you 1.50 versus 2.10. Anonymous objective geometry gives you three different definitions of winning before any agent opens its mouth.

KKT, Markowitz, and CAPM: what the card actually names

The title of this post promises three specific names, so let me actually cash them out instead of leaving them as decoration on a pill tag.

KKT is train-audit language, not a truth stamp. A KKT (Karush-Kuhn-Tucker) stationarity certificate proves a solver satisfied the first-order conditions of a named program: the gradient of the objective sits in the cone generated by the active constraint gradients. It proves nothing about whether that was the right program. Worked fail: a train run solves program A (minimize variance at a 10% return target, shorts allowed) and gets weights (0.6, 0.4). The ticket that reaches Layer 1 cites program B (same setup, 12% return target). Check feasibility for B at those weights: 0.6(0.08) + 0.4(0.13) = 0.10, not 0.12. The primal equality already fails before anyone touches a multiplier. Gate: LOSS_CARD_MISMATCH. A stationarity certificate is a witness for one frozen program, not a passport that survives a card swap.

The multiplier itself is worth a beat, because "shadow price" makes it sound like an accounting convenience when it is closer to a physical force. Lagrange's 1788 method solves constrained mechanics without ever computing the force that enforces the constraint, and the multiplier turns out, worked backward, to be that force. A particle resting on a table at height h: solve the constrained equation of motion, and at rest the multiplier equals mg, the table's normal force in newtons. Nobody wrote "normal force" into the Lagrangian; it fell out of the constraint gradient. A portfolio resting on a variance cap works the same way. On the two-asset toy below, the multiplier at the carded point computes to 1.79 basis points of expected return purchased per unit of variance relaxed, evaluated exactly at the constraint, the same way mg is evaluated exactly at the table's surface. It is a consequence of the card, not a knob a solver can quietly retune.

Markowitz names a family of programs, not one portfolio. Fix two risky assets: expected returns 8% and 13%, variances 4% and 9% (squared), covariance 1% (squared). Card the program as minimize variance subject to a 10% return target, shorts allowed. Solve the return equation and the weight on asset one is 0.6; plug into the variance formula and you get 0.0336, portfolio volatility about 18.33%. That point is optimal only under this exact card. Change the target to 12% and the weight becomes 0.2, with a different variance entirely. Hold the same $(\mu,\Sigma)$ fixed and write three programs a desk would all call "mean-variance optimization" — min-variance at a return target, max-return at a variance cap, and a penalized Lagrangian form — and they land on three different books spanning a 27% volatility range on this toy alone. The card, not the market, decides where you land, so the card has to record which of the three forms was solved and the value of its free parameter. Code: PROGRAM_FORM_UNDECLARED.

CAPM is a named world, not alpha truth. A CAPM ticket arrives claiming a required return that reconciles the spread and curve frames near 1.80. Every number on it is arithmetically correct, and it is still not evidence, because beta is not a property of the leg. It is a property of the pair: the leg and whichever market you picked. With the leg's own volatility at 26%, two defensible index proxies give beta 0.6175 (required excess return 3.40%) and beta 0.9286 (required excess return 5.11%) — a spread of 1.71 percentage points, decided entirely by which ticker string sits in a config file. The ticket's claimed beta of 0.75 sits conveniently between the two, which is the signature of a number chosen to land a mark rather than derived from a declared market. Gate: MARKET_PROXY_UNNAMED, refuse, before any evaluation question is even reached. Keep CAPM as a named world or stress factor under mean-variance habits, one declared frame among others — never as a spend passport on its own.

What to lock before any train or sweep

Building reliable AI research infrastructure is less about finding a cleverer network and more about refusing to let anonymous targets mint production personalities in the dark. Next post: the card and the gate that make that refusal executable.

Walk CEH-001 as a thought process

Challenger A uses features {spreads, curve, quote_intensity}. On the friendly slice, marks collapse toward the denied midpoint 1.80. Average error looks better than the dual-frame champion (Recipe A near 1.50 band [1.42, 1.58]; Recipe B near 2.10 band [2.01, 2.22]). The desk feels relief: maybe the 0.60 gap was just noise.

ProbeFriendly sliceCo-break sliceGate reading
With quote_intensitymarks ~1.80; MAE looks championerror balloonsaverage green hides tail
Ablate: shuffle quote_intensity onlyreopens ~1.50 and ~2.10dual clouds returncue carried the story
Spread band (honest A)[1.42, 1.58] · center ~1.50within-frame support
Curve band (honest B)[2.01, 2.22] · center ~2.10within-frame support
Frame gap / denied mid0.60 · 1.80 in empty corridornever auto-spend
Worst-group ratioco-break ~20% of rows, ~100% of path-budget riskrow-average cannot rank

Ablate: shuffle quote_intensity only, leave everything else. Marks reopen to about 1.50 and 2.10. The headline gain evaporates. The cue did not contribute part of the improvement. It contributed the story.

I started caring about this after watching a green CEH-001 board die in one co-break week while every seed flipped the same way. That is not unlucky seed noise. That is a shared cheat. If your near-winner cloud is narrow because every seed found the same weather vane, crowd width is not evidence of truth. It is evidence of synchronised failure waiting for the cue to move.

Book: Chapter 9 in Rulers Before Models.

ch09Open on YouTube ↗

Next. Open ch10: Binomial completeness as contrast object. Previous: ch08 (Powered evaluation and the three-way verdict). Rulers Before Models index.