Learning Union of Integer Hypercubes with Queries - (with Applications to Monadic Decomposition)

Oliver Markgraf, Daniel Stan, Anthony W. Lin

Abstract

This paper introduces a polynomial-time exact learning algorithm for identifying a finite union of integer hypercubes in a fixed dimension $d$. This result addresses a long-standing open problem in computational learning theory. By leveraging subset queries and extending the approach to handle infinite bounds, the authors apply their methodology to the monadic decomposition of SMT formulas, achieving significant performance improvements over state-of-the-art generic solvers.

Introduction

In computational learning theory, Angluin’s "exact learning" framework involves a learner identifying a hidden concept through queries to an oracle, typically Membership (M) and Equivalence (EQ) queries. While learning a single hypercube is a classic problem, learning a union of overlapping hypercubes in a fixed dimension $d$ remained an open challenge.

This problem is not merely theoretical; it has direct applications in formal verification, specifically in monadic decomposition. This process involves rewriting multi-variable quantifier-free integer linear arithmetic formulas into boolean combinations of single-variable (monadic) predicates. A conjunction of such predicates defines a hypercube, and their Disjunctive Normal Form (DNF) defines a union of hypercubes.

Algorithmic Approaches

The authors propose two primary algorithms within the exact learning framework to solve this problem.

1. The Overshooting Algorithm (M+EQ)

This algorithm relies on Membership and Equivalence queries. When the EQ oracle provides a counterexample, the algorithm uses a "Corner Oracle" to perform binary searches along coordinate axes, identifying the boundaries of the target cube. Since the initial guess might be too large ("overshooting"), the algorithm iteratively refines the hypothesis by adding and subtracting sub-cubes via symmetric differences.

Visualizing the iterative refinement of the Overshooting algorithm through addition and removal of cubes.
Algorithm 2: Pseudocode for the Overshooting algorithms, including the refinement functions.

2. The Maximal Cube Algorithm (SUB+EQ)

To streamline the refinement process, the authors introduce Subset (SUB) queries. In SMT solving, a subset query is computationally inexpensive, equivalent to a satisfiability check (Hypothesis AND NOT Target). This allows the algorithm to identify maximal cubes that fit entirely within the target set, which are then permanently added to the hypothesis, avoiding the complex add/remove cycles of the overshooting approach.

Extensions for Infinite Bounds

To accommodate unbounded variables (e.g., $x \ge 5$), the Maximal Cube algorithm is extended to detect infinite bounds during the binary search phase.

Empirical Evaluation

The algorithms were evaluated using a custom benchmark suite of six classes of monadically decomposable formulas, designed to test various conditions such as cube overlap, dimension $d$, and infinite edges.

The optimized Maximal Cube algorithm, which dynamically switches between unary and binary search based on cube size, was compared against mondec1, a leading generic monadic decomposition tool. Results showed that the proposed algorithm substantially outperformed mondec1 on most benchmarks, particularly those involving large cubes and high overlap where decision-tree heuristics often struggle.

Conclusion and Future Work

The paper proves that a finite union of rectilinear hypercubes can be learned exactly in polynomial time for a fixed dimension $d$. While performance scales exponentially with $d$, the practical application to SMT solving demonstrates the power of combining theoretical learning frameworks with efficient automated reasoning tools. Future work includes extending the framework to handle modulo arithmetic and exploring more succinct representations like if-then-else formulas.

Summary updated

BibTeX
@inproceedings{markgraf2021learning,
  author = {Oliver Markgraf and Daniel Stan and Anthony W. Lin},
  title = {{Learning Union of Integer Hypercubes with Queries - (with Applications to Monadic Decomposition)}},
  booktitle = {CAV},
  year = {2021},
  doi = {10.1007/978-3-030-81688-9\_12},
}
Figure