← Latest papers
🤖 AI

Causal Software Engineering: A Vision and Roadmap

This paper proposes "Causal Software Engineering" as a new paradigm that moves beyond correlational AI to systematically apply causal models and reasoning for high-stakes decision-making, offering a roadmap for tools, workflows, and benchmarks to answer critical "what-if" questions across the software lifecycle.

Original authors: Roberto Pietrantuono, Luca Giamattei, Stefano Russo, Julien Siebert, Neil Walkinshaw

Published 2026-05-06
📖 6 min read🧠 Deep dive

Original authors: Roberto Pietrantuono, Luca Giamattei, Stefano Russo, Julien Siebert, Neil Walkinshaw

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 the captain of a massive, high-tech spaceship. Every day, you have to make critical decisions: Should I change the engine settings? Should I reroute the ship through a new star system? If I slow down the crew's work pace, will we arrive faster or slower?

Right now, most software engineers (the captains of the digital world) rely on a map that only shows correlations. It's like looking at a weather report that says, "Every time it rains, people carry umbrellas." The map tells you that rain and umbrellas happen together. But it doesn't tell you what would happen if you stopped the rain, or if you forced everyone to carry umbrellas on a sunny day.

This paper, "Causal Software Engineering," proposes a new way of navigating. It suggests we stop just watching what happens together and start understanding cause and effect.

Here is the vision broken down into simple concepts:

1. The Problem: The "Coincidence" Trap

The authors give a story about a software team that fixed a slow computer program. They changed one setting (let's call it the "Retry Button"), and suddenly, the program got faster. The team celebrated, thinking the button was the hero.

But here's the catch: At the exact same time, the computer's automatic system added more workers (servers) and the traffic from users shifted to a different location. The program got faster because of all those things happening at once, not just the button.

Because the team only looked at what happened together (correlation), they thought the button was the magic cure. Later, when they tried to use that same button on a different system without the extra workers, the program crashed. They had mistaken a coincidence for a cause.

2. The Solution: The "What-If" Machine

The paper proposes Causal Software Engineering (CSE). Instead of just asking, "What usually happens with X?", CSE asks, "What will happen if we do X?"

Think of it like a flight simulator for software decisions.

  • Old Way (Correlation): "Every time we fly through a storm, the plane shakes. So, if we fly through a storm, we should expect shaking."
  • New Way (Causality): "If we change the engine thrust (the intervention), how will the shaking change, even if the storm is still there? And if we had changed the thrust yesterday, would we have avoided the crash?"

3. The Three New Tools

To make this work, the authors suggest three new tools that engineers would use, like a pilot's checklist:

  • The "Causal Design Spec" (The Blueprint): Before making a change, engineers write down a simple map. They list:

    • What we are changing (the intervention).
    • What we want to happen (the goal).
    • What else might mess things up (the "confounders," like traffic shifts or other updates).
    • Analogy: It's like a chef writing a recipe that explicitly says, "If I add salt, I must also check if the oven temperature changed, or I can't be sure the salt made the soup taste better."
  • The "Intervention Log" (The Black Box): Every time a change is made, the system records not just what changed, but what else was happening at that exact moment.

    • Analogy: Instead of just saying "The engine was fixed," the log says, "The engine was fixed, but at the same time, the fuel pressure dropped and the wind speed increased." This helps separate the real cause from the noise.
  • The "Living Model" (The Crystal Ball): This is a smart system that uses the blueprints and logs to predict the future. It doesn't just guess; it calculates the "cause" while ignoring the "noise."

    • Analogy: It's like a GPS that doesn't just show you where traffic is, but tells you, "If you take this detour, you will save 10 minutes, even if the main road is currently clear."

4. The Roadmap: A Four-Step Climb

The authors don't expect this to happen overnight. They propose a roadmap with four stages, like climbing a mountain:

  1. Level 1: Seeing Clearly (Causal Observability): We need to build better sensors that don't just record data, but understand the structure of how things connect. We need to know which wires are actually connected to the engine, not just which ones are vibrating.
  2. Level 2: Safe Experimenting (Intervenability-by-Design): We need to make changes in small, safe steps (like testing a new engine on just one wing of the plane) so we can be sure what caused the result.
  3. Level 3: Time Travel (Counterfactual Assurance): We need tools that can answer, "If we had done things differently yesterday, would the crash have been avoided?" This helps us learn from mistakes without having to crash the plane again.
  4. Level 4: The Trustworthy Co-Pilot (Causal Copilots): Finally, we get AI assistants that don't just guess. They are "governed" by the rules of cause and effect. They won't tell you to press a button unless they are sure it will actually fix the problem, and they will admit when they don't have enough data to be sure.

5. How Do We Know It Works?

The paper suggests we need to test these new tools with specific "exams":

  • The "Did it work?" Test: Give the computer a known change and see if it correctly identifies the result.
  • The "What If?" Test: Give the computer a past disaster and ask, "Would this have been avoided if we did X?" See if its answer matches the real story.
  • The "Stress Test": Try to trick the system with fake data to see if it admits, "I can't be sure," rather than making a confident but wrong guess.

The Bottom Line

The paper argues that software engineering is moving from guessing based on patterns to deciding based on causes. By treating every software update as a deliberate experiment and recording the "why" behind every result, we can build systems that are safer, more reliable, and easier to fix when things go wrong. It's about moving from "It usually rains when the sky is gray" to "If we turn on the sprinklers, the grass will get wet, even if the sky is gray."

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 →