---
translation_of: probability-gates
lang: en
title: 'Probability gates: from bits to probabilities'
summary: Logic gates turn voltages into 0 and 1; Jev turns a description written in language into probabilities. This post treats Jev as a "probability gate", draws on prior work in stochastic computing, Bayesian networks and probabilistic bits, and looks at which components can be built from it and how they could form a world simulator.
---

Electrons flow through a circuit, and logic gates turn them into 0 and 1. Zeros and ones can be combined and stacked, and that gave us computers.

Tokens flow through Jev, and it turns a written description into probabilities. Probabilities can also be combined and stacked; the rules are probability theory. So can a large number of Jev calls, wired together, become a new kind of circuit?

Jev is a model TypeSafe AI released in September. It does not generate text. It answers three kinds of questions: yes or no, pick one of several options, and a score on a scale. Every answer is a probability distribution. According to the company, a call takes 70–500 ms and costs tens to hundreds of times less than a frontier language model.

## Why it is not a logic gate

My first analogy was the transistor and the logic gate. On reflection, it does not quite fit, for two reasons.

First, a logic gate takes bits in and puts bits out. Input and output are the same kind of thing, so gates can be chained indefinitely. Jev takes text in and puts probabilities out.

Second, and more fundamentally, Boolean logic composes from values alone: whether A AND B is true depends only on whether A and B are each true. Probabilities do not work that way. Knowing only P(A) = P(B) = 0.7, P(A and B) can be anything from 0.4 to 0.7, depending on how correlated A and B are. To combine them you need the dependency:

> P(A and B) = P(A) × P(B | A)

A more accurate name is **probability gate**: given an input X described in language, it outputs a probability distribution over a few outcomes Y. Mathematically it is the conditional probability P(Y | X). Jev is one implementation; a language model plus calibration, or a small trained classifier, can be another. This is similar to how the same digital gate can be built in TTL or CMOS: different implementations, with different speed, cost and accuracy.

The definition has a theoretical basis. Cox proved in 1946, and Jaynes later set out in detail, that under a few basic assumptions about consistent reasoning, the rules for handling incomplete information have to be probability theory. When probabilities are restricted to 0 and 1, probability theory reduces to Boolean algebra. Logic circuits are a special case of probabilistic circuits.

![From bits to probabilities: two component hierarchies](/blog/assets/probability-gates/stack.en.svg)

## Three earlier lines of work

Treating probabilities as signals in a circuit is not a new idea. There are at least three related lines of research.

**Stochastic computing (1960s).** A probability is represented by a stream of random bits, where the share of 1s is the value. A single AND gate multiplies two probabilities, and a multiplexer computes a weighted sum. This only works if the inputs are independent: once two input streams are correlated, the product is wrong. It matches a simulation I ran earlier: with voters who are 70% accurate on average, 27 votes reach 98.5% when their errors are uncorrelated; with a correlation of 0.2, even 243 votes only reach 81.6%. **When you combine probabilities, you have to account for how they are correlated.**

**Bayesian networks (1980s, Pearl).** A directed graph records which variables depend on which, and each node holds a conditional probability table. The algebra is correct, yet the approach never became common. It got stuck on where the numbers come from: hundreds of variables and thousands of conditional probabilities had to be filled in by experts, one by one. This was the "knowledge acquisition bottleneck" of expert systems. Jev can address it: any conditional probability that can be described in language can be estimated in a fraction of a second at very low cost.

**Probabilistic bits (since 2017).** Researchers build circuits from devices that flip at random, where each unit outputs 1 with a probability set by its inputs. Such circuits have a property logic circuits lack: they can infer in reverse. Fix the output of a multiplier circuit, and it fluctuates between possible factors, which amounts to factoring the number. The reason is that a probabilistic circuit represents a joint distribution; fix either end and you can infer the other.

In short, the algebra and composition rules of probabilistic circuits have been settled for a long time, and the main problems are known. What was missing was a cheap, general source of probabilities that can be configured in language.

## Building higher-level components from probability gates

Digital circuits start from gates and build adders, multiplexers and flip-flops, then arithmetic units and processors. Probability gates can be built up the same way. Each component below uses only Jev calls and ordinary code:

| Component | How it is built | Circuit counterpart | Purpose |
| --- | --- | --- | --- |
| Differential gate | Ask "is it X?" and "is it not X?" together and combine them as (yes + 1 − no) ÷ 2 | Differential amplifier | Cancels common-mode bias such as a tendency to answer yes; if the two answers do not sum to about 1, the question itself is poorly posed |
| Coherence restorer | Ask about a set of related propositions separately, then project onto the nearest consistent distribution | Level restoration | Corrects a set of judgments so they satisfy the probability axioms |
| Conditional probability table | Write each value of the parent nodes into the input and ask in parallel within one layer | FPGA lookup table | Produces a node's conditional probabilities in a Bayesian network on demand |
| Evidence combiner | Start from the prior log-odds and add the log-likelihood ratio of each piece of evidence, discounted by their estimated correlation | Adder | Prevents the same evidence, or the same prior, from being counted twice |
| Belief register | Holds the probability of a hypothesis and applies a Bayesian update with the likelihood ratio of each new piece of evidence | Register, integrator | Keeps the current judgment about a hypothesis |
| Cause inferrer | For each candidate cause, ask "if this were the cause, would we see this?", multiply by that cause's prior probability, and normalize | Reversible circuit | Infers causes from results: diagnosis and attribution |
| Tri-state gate | Outputs "unknown" when the probability falls in an uncertain band | Tri-state buffer | Hands the case to a person or a larger model |
| Hysteresis gate | Sets above 0.7 and resets below 0.3 | Schmitt trigger | Stops a conclusion from flipping back and forth near the threshold |
| Sampler | Draws an outcome according to the probabilities with a fixed random seed | Random source | Produces one concrete outcome from a probability, reproducibly |
| Calibrator | Corrects a gate's outputs against real outcomes | Trimming circuit | Makes the gate's probabilities match real-world frequencies |

For three of these, the circuit counterpart only looks similar; the job is different:

- **Cause inferrer**: in a reversible circuit, inputs and outputs map one to one, so you can step back exactly. A cause inferrer faces several possible causes and has to combine each one's prior probability to work out how likely each is.
- **Tri-state gate**: a tri-state buffer's high-impedance state means "not driving this line". A tri-state gate's "uncertain" is a judgment, passed to a person or a larger model.
- **Coherence restorer**: level restoration in digital circuits relies on gain, which removes the error at every stage, so billions of gates can be chained without errors building up. A coherence restorer only removes the part of the error that is self-contradictory. Predd et al. (2009) proved that projecting incoherent probabilities onto the coherent set gives a result that is strictly better under the Brier score; but if a set of judgments is biased in the same direction, it is still wrong after the projection. Probabilistic circuits are therefore closer to analog circuits: errors build up stage by stage, and how deep a circuit can go depends on the error budget.

## One level up: processing units

Combining these components gives four processing units:

- **Inference unit**: conditional probability tables + evidence combiner + belief register; answers "what is most likely going on now?"
- **Diagnosis unit**: cause inferrer + belief register, plus a selector for the next question that picks the one that most reduces uncertainty.
- **Prediction unit**: conditional probability tables + coherence restoration + calibration; answers "what is the probability that X happens next?"
- **Simulation unit**: a prediction unit connected in a loop, which is a world simulator.

![Sketch: one clock cycle of a Jev world simulator](/blog/assets/probability-gates/simulator.en.svg)

In each clock cycle, a language model or a person first lists the candidate events that could happen next, based on the written description of the current state. Jev gives the probabilities of those events. The coherence restorer makes those probabilities consistent with each other. The sampler draws the events that actually happen in this step, and the result is written back to the state for the next step. Repeating this ten thousand times gives a distribution of outcomes.

The point about correlation from earlier applies here too: asking for each event's probability and sampling each one separately assumes the events in a step are independent. To keep the correlation, you can write the combinations of mutually exclusive outcomes as one multiple-choice question, or sample one event at a time with the chain rule: draw the first event, write the result into the input, then ask for the next event's conditional probability. The second approach is more accurate but multiplies the number of requests.

This differs in one important way from social simulations in which a language model plays a group of people and generates their behavior: **probability and randomness are separated**. Jev supplies the probabilities, which can be calibrated and audited; code supplies the randomness, which is controllable and reproducible. The cost is also low enough to actually run ten thousand trajectories. A rough estimate: 10,000 trajectories × 50 steps, with one request per step asking about 20 events at once, is about 500,000 requests. At roughly 1,000 input tokens per request and the gateway's listed price of $0.042 per million input tokens, that is about $21. Sampling events one at a time multiplies the request count by the number of events.

A decision layer can sit on top of the simulation unit: compare the outcome distributions of different options, look at the worst cases, and see which variables matter most. Many real systems are sensitive to initial conditions, so their specific outcomes cannot be predicted, but the distribution of outcomes can be estimated.

## Limits

The analogy has several limits:

1. **The form of the probabilities is right; the numbers may not be.** Jev's probabilities are its own estimates, calibrated on its training data. A world model needs them to match how often things happen in reality. Without calibration against real outcomes, the simulation has no predictive value.
2. **Structure is harder than parameters.** Choosing the wrong variables or drawing the wrong dependencies matters more than an individual probability being off.
3. **"Given" is not the same as "if".** "Given that I changed jobs" and "if I change jobs" are two different probabilities. Decisions need the second; whether Jev can tell them apart has to be tested.
4. **What the simulation covers depends on the candidate events and the description.** Jev does not generate text, so a language model or a person has to list what could happen next; anything left out of the candidates or the description is not considered.
5. **Long-term outcomes remain hard to predict.** Even if every probability is right, the distribution spreads out over time. A simulation can show the distribution and the sensitive variables, not a definite ending.

So my view is this: Jev is not the transistor of Boolean computing, but it may be the first probabilistic reasoning component cheap enough to call in large numbers. If that holds, probabilistic reasoning methods that never caught on because they were too expensive may become practical again.

## Next

We will test these ideas with the real Jev:

1. **Differential gate**: whether asking both ways is more accurate and better calibrated than asking once. Language models are prone to errors with negation, so the error on "is it not X?" is not necessarily common-mode; the experiment has to test negated wording and swapped yes/no definitions separately.
2. **Correlation**: how much correlation remains between errors after changing the wording, splitting the evidence or switching models.
3. **Coherence restoration**: ask for P(A), P(B), P(A and B) and so on, count how often the answers violate the probability axioms, and check whether predictions improve after restoration.
4. **Forward forecasting**: on public forecasting questions that resolve after Jev's release, record Jev's probabilities now and score accuracy and calibration once the results are in. This checks whether Jev's probabilities match real frequencies, compared with prediction-market prices and frontier language models on the same questions.
5. **Small world simulation**: in settings with historical outcome data, check whether the simulated distribution matches the real frequencies.

I will write a follow-up when the results are in.

Note: the figures about Jev come from TypeSafe AI and third-party gateways' public material. The author and Tenon AI have no business relationship with TypeSafe AI and have received no payment.
