Canonical Representations of k-Safety Hyperproperties

Bernd Finkbeiner, Lennart Haas, Hazem Torfah

Abstract

Hyperproperties elevate the traditional view of trace properties from sets of traces to sets of sets of traces and provide a formalism for expressing information-flow policies. For trace properties, algorithms for verification, monitoring, and synthesis are typically based on a representation of the properties as omega-automata. For hyperproperties, a similar, canonical automata-theoretic representation is, so far, missing. This is a serious obstacle for the development of algorithms, because basic constructions, such as learning algorithms, cannot be applied. In this paper, we present a canonical representation for the widely used class of regular k-safety hyperproperties, which includes important policies such as noninterference. We show that a regular k-safety hyperproperty S can be represented by a finite automaton, where each word accepted by the automaton represents a violation of S. The representation provides an automata-theoretic approach to regular k-safety hyperproperties and allows us to compare regular k-safety hyperproperties, simplify them, and learn such hyperproperties. We investigate the problem of constructing automata for regular k-safety hyperproperties in general and from formulas in HyperLTL, and provide complexity bounds for the different translations. We also present a learning algorithm for regular k-safety hyperproperties based on the L* learning algorithm for deterministic finite automata.

Introduction

In formal verification, standard "trace properties" evaluate a single execution path of a system at a time (e.g., "the system never crashes"). These properties are typically represented as automata, which serve as the foundation for algorithms that verify, monitor, and synthesize software. However, modern security policies often require evaluating multiple execution paths simultaneously. For example, "noninterference" dictates that a user with low security clearance shouldn't be able to deduce high-security data by observing the system's outputs across different runs. These are called hyperproperties.

Until now, hyperproperties lacked a canonical (unique and standard) automata-theoretic representation. Without this, researchers couldn't apply powerful automata-based algorithms to them, most notably learning algorithms like Dana Angluin’s L* to automatically mine or infer hyperproperty specifications from system behavior. This paper bridges that gap.

Defining the Canonical Representation

The authors focus on regular k-safety hyperproperties, where a violation can be proven by observing a "bad prefix" across at most $k$ traces. They prove that these can be canonically represented by a specific type of finite word automaton. To be canonical, this automaton must be minimal, deterministic, "tight" (accepting all valid bad prefixes), and "permutation-complete."

Formal definitions for safety hyperproperties and their representations as sets of bad prefixes.

Because a hyperproperty evaluates a set of traces, the order of the traces in a tuple shouldn't matter. Introducing the concept of permutation-completeness ensures the automaton accepts a tuple of traces regardless of how they are ordered, which is the key to achieving a unique, canonical representation.

The $L^*_{Hyper}$ Learning Framework

The authors extend the classic L algorithm to learn these new automata. In standard L, a "Learner" asks a "Teacher" membership queries and equivalence queries to build a model of the target language.

The L* learning framework involving a Teacher and a Learner through membership and equivalence queries.

$L^*_{Hyper}$ introduces dynamic arity. Since the learner usually doesn't know $k$ (the number of traces required to find a violation) in advance, it starts guessing at $k=1$. If the teacher provides a counterexample that requires more traces (e.g., $k=2$), the learner dynamically expands its internal observation table to accommodate the higher arity without losing previously learned information.

Key Results and Theoretical Boundaries

  • Mathematical Foundation: The authors successfully proved that minimal, tight, permutation-complete, deterministic $k$-bad-prefix automata form a strict canonical representation for regular $k$-safety hyperproperties.
  • Algorithm Termination: They mathematically guarantee that the $L^*_{Hyper}$ algorithm will terminate and successfully learn the target hyperproperty after at most $n$ equivalence queries, where $n$ is the size of the minimal automaton.
  • Decidability: The paper proves that answering membership and equivalence queries for general safety hyperproperties is fundamentally undecidable. To make automated learning work, the framework restricts itself to specific logical fragments, such as the universally-safe fragment of HyperLTL.

Limitations and Future Work

The requirement for the automaton to be "vertically tight" (accepting all extensions of a bad prefix) currently introduces expensive computational checks during the learning process. Future work involves implementing the $L^*_{Hyper}$ algorithm in software to test its practical efficiency and exploring alternative canonical representations—such as those only accepting minimal bad prefixes—to potentially skip expensive tightness checks.

Summary updated

Abstract

Hyperproperties elevate the traditional view of trace properties form sets of traces to sets of sets of traces and provide a formalism for expressing information-flow policies. For trace properties, algorithms for verification, monitoring, and synthesis are typically based on a representation of the properties as omega-automata. For hyperproperties, a similar, canonical automata-theoretic representation is, so far, missing. This is a serious obstacle for the development of algorithms, because basic constructions, such as learning algorithms, cannot be applied. In this paper, we present a canonical representation for the widely used class of regular k-safety hyperproperties, which includes important polices such as noninterference. We show that a regular k-safety hyperproperty S can be represented by a finite automaton, where each word accepted by the automaton represents a violation of S. The representation provides an automata-theoretic approach to regular k-safety hyperproperties and allows us to compare regular k-safety hyperproperties, simplify them, and learn such hyperproperties. We investigate the problem of constructing automata for regular k-safety hyperproperties in general and from formulas in HyperLTL, and provide complexity bounds for the different translations. We also present a learning algorithm for regular k-safety hyperproperties based on the L* learning algorithm for deterministic finite automata.
BibTeX
@inproceedings{finkbeiner2019canonical,
  author = {Bernd Finkbeiner and Lennart Haas and Hazem Torfah},
  title = {{Canonical Representations of k-Safety Hyperproperties}},
  booktitle = {CSF},
  year = {2019},
  doi = {10.1109/csf.2019.00009},
}
Figure