Abstract
Modern security policies, such as non-interference and observational determinism, are increasingly expressed as hyperproperties—requirements that compare multiple execution traces of a system. While model checkers can identify violations of these properties, they typically return complex sets of traces that are difficult for developers to interpret. This paper introduces a formal framework for explaining hyperproperty violations by adapting the philosophical concept of "actual causality" to temporal logic. By identifying minimal sets of input events that counterfactually trigger violations, the proposed method provides precise, actionable insights into security vulnerabilities, even when the causal events are not explicitly mentioned in the security specification. Evaluation across hardware and robotic benchmarks demonstrates that the approach is both computationally feasible and more precise than existing visualization-based debugging tools.
Introduction
In traditional formal verification, a system is checked against trace properties, such as "the elevator should never move with the door open." If the system fails, the model checker provides a single execution trace as a counterexample. However, many critical security requirements are hyperproperties: they define the correctness of a system by comparing multiple execution paths. For example, "observational determinism" requires that two different runs of a program with identical public inputs must produce identical public outputs, regardless of variations in secret inputs.
When a hyperproperty is violated, the model checker returns a set of traces. Determining why these traces together constitute a violation is a manual, error-prone task for developers. Existing tools often highlight terms found within the requirement formula, but the "smoking gun" of a security leak is frequently an event the formula does not explicitly reference—such as a specific branch on a secret variable that causes a timing leak. This research bridges the gap by providing a mathematical framework to identify the "actual cause" of such failures.
Methodology: From Philosophy to Formal Logic
The authors adapt the Halpern & Pearl definition of actual causality to the domain of temporal logic and hyperproperties. An event is defined as a cause if it satisfies three criteria:
- SAT: The event actually occurred in the counterexample.
- Counterfactual (CF): If the event had not occurred, the violation would not have happened (potentially under specific "contingencies").
- MIN: The set of causal events is minimal.
The Role of Contingencies
A significant technical contribution of this work is the handling of contingencies. In complex systems, a cause may be masked by "preemption"—where another potential cause is ready to trigger the same violation. To isolate the impact of a specific input event, the authors use contingencies to fix certain system outputs to their original values, allowing for a pure counterfactual analysis.
Algorithmic Approach
To identify these causes efficiently, the authors developed a two-stage algorithm:
- Over-approximation: The tool first computes a superset of potential causes using "unsatisfiable cores" (identifying which inputs forced the system's transitions) and alternating automata analysis.
- Minimization: The algorithm then searches for the minimal subset of these events that satisfies the formal definition of actual causality. This is achieved by reducing the problem to a HyperLTL model checking task using a specialized Counterfactual Automaton that represents the system's behavior under varying inputs and contingencies.
Evaluation and Key Results
The method was evaluated on several benchmark systems, including hardware arbiters, drone coordination scenarios, and non-interference test cases.
Precision and Insight
In a "Running Example" involving a security-critical state graph, the tool correctly identified that a high-security input at the initial time step was the root cause of a leak. In contrast, previous state-of-the-art tools (like HyperVis) only highlighted the resulting low-security outputs. This demonstrates the framework's ability to point to the source of a leak rather than just its symptoms.
Performance and Scalability
The implementation, built using the Spot and py-aiger libraries, proved remarkably efficient:
- Speed: For most benchmarks, the over-approximated cause was computed in under 100ms, with final minimal causes identified in less than a second.
- Scalability: Even for a large "Asymmetric Arbiter" counterexample spanning 72 steps, the tool successfully identified 24 minimal causes in approximately 1.5 seconds.
Discussion and Future Directions
While the current approach is highly effective for the "universal fragment" of HyperLTL (formulas starting with $\forall$), extending it to more complex "exists-forall" ($\exists\forall$) properties remains a challenge due to exponential complexity blow-up. Additionally, the framework currently assumes the system is modeled as a Moore machine, which is standard for hardware but may require adaptation for abstract software models.
Beyond debugging, the authors suggest that these causal explanations could facilitate automatic program repair. By identifying the exact events that trigger a security violation, automated tools could potentially suggest code modifications to close security holes at their source.
Summary updated