The transaction arrives in milliseconds. A purchase attempt — a gas station in Phoenix, a grocery store in suburban Atlanta, a wire transfer at 2 a.m. — and somewhere in the authorization chain, a system has to decide. Not later. Now. The clock is already running.
When I led the fraud detection team at Visa, this was the problem that lived in your chest. You couldn’t see what you needed to see. You couldn’t know whether the person presenting that card was the person who owned it, whether the account had been compromised six hours ago in a breach you hadn’t yet detected, whether the behavioral signature of these transactions was the legitimate cardholder running errands or a fraudster working methodically through a stolen number before the window closed. You could only see what the transactions said. You could never see the state underneath.
That distinction — between what you can observe and what is actually true — turns out to be one of the organizing problems of our time. It has a name, a formal structure, and a history that runs from mid-century mathematics through the trading floors of quantitative hedge funds to the frontier of artificial intelligence. The name is the hidden Markov model. But the problem it addresses is older than the math, and more human than the jargon suggests.
The Invisible Machine
Gregory Zuckerman, writing about Jim Simons and the quants at Renaissance Technologies in The Man Who Solved the Market, offers the clearest lay definition I’ve encountered. A hidden Markov process, he explains, is one in which the chain of events is governed by unknown, underlying parameters or variables. You see the results of the chain — the transactions, the innings, the price movements — but not the “states” that explain the progression. Someone unfamiliar with baseball receives updates of runs scored each inning: one run here, six there, no obvious pattern. Simons and his colleagues saw financial markets the same way: a sequence of visible emissions from an invisible underlying machine.
The mathematics behind this go back to Andrey Markov himself, the Russian mathematician who, in the early twentieth century, formalized the idea of systems that move between states with fixed probabilities. A Markov chain is memoryless in a specific sense — the probability of moving to the next state depends only on the current state, not on the history of how you got there. In practice this is less limiting than it sounds: the current state is designed to encapsulate all the history that matters, and real-world systems like fraud detection supplement the emissions themselves with engineered historical features — transaction velocity, rolling averages, behavioral baselines — so the relevant past arrives folded into the present observation. Add the twist that you can’t observe the states directly, only their outputs, and you have the hidden Markov model: an inference problem of the first order. You are always working backward from what you can see to what you cannot.
The model was developed into practical form in the 1960s and 1970s, largely through the work of Leonard Baum and his colleagues at the Institute for Defense Analyses. The original application was not finance and not fraud. It was speech. The problem of recognizing spoken language is precisely the hidden state problem: the phonemes, words, and intentions of a speaker are the hidden states; the acoustic waveforms arriving at a microphone are the emissions. The algorithms Baum and others developed — including what became known as the Baum-Welch algorithm for training these models — are still foundational to how machines process language today.
The Drift of Reality
At Visa, we didn’t call it by its formal name in the daily work. But the structure was identical. Every cardholder exists in one of a small number of hidden states: legitimate use, compromised account, card-present fraud, card-not-present fraud, and various gradations in between. The system never observes the state directly. It observes the emissions: transaction amount, merchant category, geography, time of day, velocity — how many transactions in the last ten minutes, the last hour, the last day. From this stream of observables, the model has to estimate the most probable underlying state and make a decision in tens of milliseconds. The authorization either clears or it doesn’t. There is no “probably compromised, let’s think about it.”
What made it hard — genuinely hard, not textbook hard — was that the hidden states weren’t static. A cardholder’s legitimate behavior is itself a moving target. Travel changes it. Life changes change it. The fraudster’s behavior evolves too, adapting to detection patterns. You were not inferring a fixed truth. You were tracking a process in motion, where the underlying states could shift and the emissions from each state could drift. The model had to be continuously retrained, continuously recalibrated. The state you were trying to see was always slightly ahead of you.
Epistemic Honesty vs. Cable Television
The quant funds came to the same problem from a different direction. The market doesn’t announce its regime. It doesn’t send a memo saying we are now in a low-volatility trending environment or the correlation structure you relied on yesterday no longer holds. Prices, volumes, spreads, and cross-asset relationships are the emissions. The underlying state — what regime the market is currently in — is hidden.
Firms like Renaissance, Two Sigma, D.E. Shaw, and Jane Street have built substantial intellectual infrastructure around this inference problem. A market regime model doesn’t tell you what a stock will do tomorrow. It tells you, given everything you can observe right now, what probability to assign to being in each possible market state: trending, mean-reverting, high-volatility, crisis. Those probability distributions over hidden states then inform position sizing, hedging, and risk parameters. The model doesn’t resolve the uncertainty. It operates within the uncertainty, quantifying it rather than pretending it away.
This is the key insight that separates serious quantitative work from the financial commentary that fills cable television. The talking head who announces that “we are in a bear market” or “the Fed has pivoted” is claiming to see the state directly. The quant knows they can’t. The quant builds a probability distribution instead and makes decisions calibrated to that distribution. One of these approaches is epistemically honest. The other is television.
From Baum-Welch to Mamba
The hidden Markov model, it turns out, is not just a technique. It is a way of thinking about knowledge itself — about the fundamental gap between what is happening and what we can observe. And that gap doesn’t close just because our tools get better. It may, in fact, be widening.
Which brings us to where the mathematics has been going lately.
The neural networks that power modern artificial intelligence are, at a conceptual level, inference machines operating on the same problem. A language model processes a sequence of tokens — words, fragments, characters — and must at every step maintain something like a hidden state: what is this text about, what is the speaker’s intent, what context is necessary to predict what comes next. The attention mechanism at the heart of transformer models is a learned procedure for deciding which prior tokens are relevant to the current hidden state — which parts of the visible sequence carry the most signal about the invisible context.
More directly, a class of architectures called state space models — the most prominent of which is Mamba, developed by Albert Gu and Tri Dao and published in late 2023 — makes the connection to HMMs nearly explicit. Transformers handle sequence history by looking back at every prior token simultaneously — attention across the full context, which grows quadratically expensive as sequences lengthen. Mamba takes the opposite bet: compress all prior history into a single, fixed-size hidden state that evolves continuously as new observations arrive. You don’t attend to everything you’ve seen. You maintain a summary of it, updated at each step, and carry it forward. The lineage from Baum-Welch to Mamba is not a straight line, but it is a real one — both are built on the conviction that the hidden state, properly maintained, is sufficient.
And then there is the deeper question that the frontier researchers are now arguing about: does any of this — the transformers, the state space models, the massive language models trained on human text — actually achieve something like understanding, or are they, in the hidden Markov sense, very sophisticated emission generators from a hidden state we cannot observe and may not be able to interpret? When a model produces a response that seems reasoned and coherent, is it because something like genuine inference is happening in its hidden states, or because the emission pattern of inference has been learned without the state that produces it in humans?
No one has answered this. The state, as it were, is hidden.
The Honest Position
I think about the fraud authorization problem often when I watch the AI debate unfold. The critics who say these models are “just autocomplete” are claiming to see the state — they are confident they know what is underneath. The enthusiasts who say the models are “reasoning” or “understanding” are also claiming to see the state. Both are doing what the hidden Markov framework warns against: substituting a confident assertion about the hidden state for a careful inference from the visible emissions.
What the emissions actually show is stranger and more interesting than either camp wants to admit. These models produce outputs that, in the fraud detection sense, don’t match the profile of “just autocomplete” — the behavioral signature is wrong for that state. But they also produce outputs that don’t fully match the profile of human reasoning either. The emissions are anomalous. Which means the honest position is not to name the state but to assign probabilities to several candidate states and hold them with appropriate uncertainty.
This is, incidentally, exactly what the fraud model does when a transaction pattern doesn’t cleanly fit any known category. It doesn’t force a classification. It returns a score — a probability — and lets the downstream decision logic handle the uncertainty.
Decades after building that system, I find myself thinking that it may have been better preparation for understanding the current moment in AI than anything I’ve read since. The tools got bigger. The sequences got longer. The emissions got richer and stranger. But the fundamental epistemics haven’t changed.
You can see what comes out. You cannot see what produces it. You work backward from the observable to the probable, and you act on your best estimate of a state you will never directly confirm.
The authorization clears or it doesn’t. The position is sized or it isn’t. The model responds or it doesn’t.
The state stays hidden.

