Explainer · Fail-first and fail-safe
What is a fail-first model?
A model that is built to fail first, learn from the failure, and never let that learning widen what it is allowed to do. Why fail-first and fail-safe are two names for the same model.
A fail-first model is an AI model that expects to fail and learns only from failures it has actually observed, turning each one into an explicit rule. Because every rule can only narrow what the model does, failing first is safe. A fail-first model is the learning side of a fail-safe model: the same model, described by how it learns.
You cannot learn a rule from a failure you have not had. So a model that learns from experience has to fail first, and the only real design question is where a failure is allowed to lead. A fail-first model answers it the fail-safe way: it computes what it is authorised to do before it acts, lets failures teach it only inside that authority, and writes every lesson down as a rule that cites the failures that earned it. Failing first is how it learns; being fail-safe is why failing first is acceptable. Peel, by Perslis Research, is both: to our knowledge the first fail-safe model.
1. Why a learning model has to fail first
A rule that says “do not do X in situation S” is only justified by evidence that X fails in S. Before X has been tried, there is no evidence, only a guess. Two kinds of system avoid this:
- Systems that never learn. Every rule is written by hand in advance. They do not need to fail, but they never get better than their authors.
- Systems that learn from someone else’s data. A model trained on a large corpus inherits other people’s failures second-hand, as statistical patterns it cannot cite.
A fail-first model does the third thing: it learns from its own failures, in its own environment, and keeps each lesson as a readable rule. That means it must be allowed to fail, which means the environment must be arranged so that failing cannot do harm. That arrangement is what makes it fail-safe.
2. Why fail-first and fail-safe are the same model
The two names describe the two halves of one loop:
FAIL → OBSERVE → EXPLAIN → BUILD RULE → VERIFY → RETRY
| fail-first | fail-safe | |
|---|---|---|
| describes | how it learns | what learning is allowed to change |
| loop steps | fail, observe, explain, build rule | verify, retry inside the floor |
| guarantee | every rule cites the failures that earned it | no rule can widen what the model may do |
| without the other | learning by breaking things | safe, but never improves |
A system that failed first without being fail-safe would be learning by breaking things. A system that was fail-safe without failing first would be a fixed rulebook that never improves. The model is useful only when both are true, which is why we treat the two names as one: a fail-first model is a fail-safe model, described by how it learns.
3. The math in two statements
The full treatment is on What is a fail-safe model?. Two results carry the fail-first idea.
Put together: failures are necessary for learning (the first statement), and harmless to authority (the second). That is the whole case for failing first.
4. Fail-first, fail-safe, fail-fast and the fail-first principle
“Fail-first” is used in other fields, and the meanings are related but not the same.
| term | field | meaning |
|---|---|---|
| Fail-first model | AI models (this page) | Learns from its own observed failures, as explicit rules, inside an authority it cannot widen. Another name for a fail-safe model. |
| Fail-safe | engineering | A failure drives the system to a safe state (air brakes, safety elevators). |
| Fail-fast | software engineering | Stop at the first error instead of carrying on in a bad state. |
| Fail-first principle | constraint satisfaction | A search heuristic: try first where failure is most likely, so dead ends are found early [1]. |
The constraint-satisfaction principle is the closest cousin. Haralick and Elliott (1980) showed that backtracking search improves when it follows two principles: try first the places most likely to fail, and remember what has been done so the same mistake is not repeated [1]. A fail-first model applies the second principle to a whole model instead of a search tree: every failure is remembered as a rule, so the same mistake is not made twice.
5. When failing first is not acceptable
Some failures cannot be allowed even once: a collision with a person, a wrong dose, an irreversible financial transfer. For those, the fail-first half does not apply. The floor has to be written in advance, not learned, and the learner operates only above it. This is not a weakness to hide; it is where the boundary between the two halves sits. Learned rules handle the failures you can afford to have; written rules handle the ones you cannot.
A second limit: when the risky action is also the only useful one, pure failure avoidance learns to stop doing it. Our own Freeway result shows this, and it is why pricing recoverable failure is still open work (§5.7 of the fail-safe explainer).
6. Evidence
| test | result | what failing first did |
|---|---|---|
| Freeway (Atari) | −12% | Learned that the only scoring move is dangerous, and stopped scoring. |
| Space Invaders (Atari) | +32% | Learned which moves kill it, and survived longer. |
| Fallout (1997), scripted scene | dies once | Died once at the guard, then chose the peaceful line every time after. |
| Drone course, simulation | 69.39 → 51.52 | Relearned a wiped route in 7 rounds; 5 changes that made it worse were reverted. Watch it. |
7. Questions
- What is a fail-first model?
- An AI model that expects to fail and learns only from failures it has actually observed, turning each one into an explicit rule that can only narrow what it does. It is another name for a fail-safe model, describing how that model learns.
- Is a fail-first model the same as a fail-safe model?
- Yes. They are two names for one model. Fail-first describes how it learns: from its own failures. Fail-safe describes what that learning may change: never its authority. Each is incomplete without the other.
- Why would you want a model to fail first?
- Because a rule is only justified by evidence, and the evidence that something fails is a failure. A model that learns from its own failures, and keeps each lesson as a readable rule, improves in its real environment instead of relying on second-hand patterns it cannot cite.
- Is failing first dangerous?
- Not when the model is fail-safe: every failure leads to a refusal or a pause, never to an action outside what it is authorised to do. For failures that cannot be allowed even once, the floor must be written in advance rather than learned.
- Is fail-first the same as the fail-first principle in constraint satisfaction?
- No, but they are related. The fail-first principle (Haralick and Elliott, 1980) is a search heuristic that tries the choices most likely to fail first. A fail-first model applies the companion idea from the same paper, remembering failures so the same mistake is not made twice, to a whole model.
- Who makes the fail-first model?
- Perslis Research. Peel is, to our knowledge, the first fail-safe model, and fail-first is the name for how it learns. It is a research prototype, not a certified safety system.
8. References
- R. M. Haralick, G. L. Elliott. Increasing tree search efficiency for constraint satisfaction problems. Artificial Intelligence 14(3):263–313, 1980.
- E. B. Wilson. Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association 22(158):209–212, 1927.
- Perslis Research. What is a fail-safe model? Definition, science and math. 2026. perslis.com/fail-safe-model
- Perslis Research. VDSG: A Commanded Admission-Control Runtime for Autonomous Agents. 2026. research.perslis.com/vdsg