← Latest papers
🤖 machine learning

From Failure to Alignment: A Requirements Engineering Framework for Machine Learning Systems

This paper proposes REAL, a model-based Requirements Engineering framework that integrates data, model, and system requirements while leveraging failure analysis and iterative refinement to ensure machine learning systems align with stakeholder needs and are trustworthy.

Original authors: Amel Bennaceur, Gopi Krishnan Rajbahadur, Prince Mercy, Bashar Nuseibeh, Faeq Alrimawi

Published 2026-07-01
📖 5 min read🧠 Deep dive

Original authors: Amel Bennaceur, Gopi Krishnan Rajbahadur, Prince Mercy, Bashar Nuseibeh, Faeq Alrimawi

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are teaching a robot to drive a car. You tell it, "Never hit a pedestrian." Simple, right? But in the real world, things get messy. The robot might fail to see a small child in the rain, or it might brake too hard for a plastic bag blowing across the road.

This paper, titled "From Failure to Alignment," introduces a new way to build these smart systems. The authors call their method REAL (Requirements Engineering for mAchines that Learn - and Fail).

Here is the core idea, broken down with simple analogies:

1. The Problem: The "Perfect World" Trap

Traditional software is like a recipe: if you follow the steps exactly, you get the same cake every time. Machine Learning (ML) is different. It's more like teaching a dog to fetch. You show it a ball, it learns to fetch. But if you throw a stick, or a frisbee, or a shoe, the dog might get confused.

The authors argue that when we build these "learning" systems, we often assume the world will look exactly like the training data. But the real world is full of surprises (fog, weird clothing, small children). When the system fails, engineers usually just try to "fix the bug." The authors say: Stop treating failure as a bug. Treat it as a clue.

2. The Solution: The REAL Framework

The REAL framework is a three-step loop that turns "failures" into "better instructions." Think of it as a detective story where the failure is the crime scene, and the goal is to figure out what rule was missing.

Step 1: Hunt for the "What-Ifs" (Scenario Exploration)

Instead of just testing the car on a sunny day, the framework uses a "grammar" (a set of rules) to automatically generate thousands of weird, tricky, or rare situations.

  • Analogy: Imagine a video game level generator that creates millions of different weather conditions, pedestrian sizes, and crossing angles. It specifically looks for the moments where the car almost crashes or misses a person.
  • The Goal: Find the "valid failures"—situations that are realistic but where the system messed up.

Step 2: The "Why" Investigation (Obstacle Analysis)

Once a failure is found, the framework asks: Why did this happen? It doesn't just say "the sensor failed." It maps the failure back to the original rules.

  • Analogy: If the car misses a small child, the framework doesn't just say "fix the camera." It realizes the original rule was "See all pedestrians." The failure reveals a hidden assumption: "We assumed all pedestrians are big enough to be seen easily."
  • The Result: The failure is reclassified as an Obstacle. It's like putting a sign on a map that says, "Here is where our current map is wrong."

Step 3: The Multi-Layer Fix (Mitigation)

Now that we know what is wrong, we fix it. But the authors say you can't just fix one thing; you have to look at four different layers, like fixing a house:

  1. Data Layer (The Ingredients): Maybe the robot never saw a child in the rain during training. Fix: Show it more pictures of children in the rain.
  2. Model Layer (The Brain): Maybe the robot's "brain" is too slow or confused. Fix: Change the math inside the brain to be more careful.
  3. System Layer (The Body): Maybe the brain is slow, so the car needs a backup plan. Fix: Add a rule that says, "If you aren't 100% sure, just slow down gently."
  4. Requirement Layer (The Contract): Maybe the original rule was impossible. Fix: Admit that the car can't see in thick fog and update the rule to say, "Don't drive in fog."

3. The Real-World Test: The Braking Car

To prove this works, the authors tested REAL on an autonomous braking system (a car that stops for pedestrians).

  • The Setup: They used a simulator (a video game world) to create scenarios with children, adults, fog, and different clothing.
  • The Discovery: The system kept missing small children, especially in bad weather.
  • The REAL Process:
    • They found the failure (missing the child).
    • They identified the obstacle (the system didn't account for "small size" and "low visibility").
    • They applied fixes: They added more training data of children, adjusted the car's confidence thresholds, and clarified the rules about when the car is allowed to drive.
  • The Result: By using this loop, they reduced the number of missed children from 100% (in the worst cases) down to 8%, and they made the rules for the car much clearer.

The Big Takeaway

The paper claims that failure is not the end of the road; it is the map.

Instead of trying to build a perfect system that never fails (which is impossible), the REAL framework uses failures to constantly update the system's "contract" with the real world. It connects the dots between:

  1. What the humans want (Safety).
  2. What the world is actually like (Fog, small kids).
  3. What the computer is actually doing (Missing things).

By treating failure as a diagnostic tool, the framework helps engineers build systems that are honest about their limits and safer in the real world.

What the paper does NOT claim:

  • It does not claim this solves every problem in AI.
  • It does not claim this works perfectly for all types of AI (like chatbots or medical diagnosis) yet, though they plan to try.
  • It does not promise that the system will never fail again; it promises that the system will be better at understanding why it failed and how to adjust its rules.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →