Control Improvisation

Daniel J. Fremont, Alexandre Donzé, Sanjit A. Seshia, David Wessel

This paper introduces Control Improvisation (CI), a new framework that blends formal language theory with probabilistic generation. The goal is to create "improvisers"—algorithms that generate random sequences (like music or robot paths) that are constrained by specific rules, stay "close" to a reference, and remain sufficiently diverse.

TL;DR

The authors formalize "Control Improvisation," a method for generating random sequences that satisfy hard constraints, stay mostly within a set of "admissible" behaviors, and maintain a minimum level of entropy. They prove that while the problem is easy for simple machines (DFAs), it becomes computationally intractable or even impossible for more complex ones (NFAs and PFAs), and they propose SAT-based symbolic techniques to handle large-scale real-world problems.

What Problem Does This Paper Address?

Imagine you want a computer to improvise a jazz solo. You need three things:

  1. Style: The notes must follow the harmonic rules of jazz.
  2. Variety: The computer shouldn't play the exact same solo every time.
  3. Similarity: The solo should be a recognizable variation of a reference melody, not something completely unrelated.

Similar needs arise in fuzz testing (generating diverse but valid program inputs) and robotic surveillance (patrolling a route that is safe but not so predictable that an intruder can time it).

Previously, these problems were handled by heuristic data structures like "factor oracles" (see Figure 1), which lack formal guarantees. This paper provides the first rigorous mathematical framework to define what it means to "improvise under control" and determines when such an improviser can actually be built.

A factor oracle constructed from the word 'bbac', used as a heuristic for musical improvisation.

Methods

The authors define a CI instance using four parameters: $(I, \alpha, \epsilon, \rho)$.

  • $I$ (The Language): An automaton defining the set of all possible sequences (e.g., all valid jazz melodies).
  • $\alpha$ (Admissibility): A predicate defining which sequences are "good" or "similar" to a reference.
  • $\epsilon$ (Error Probability): The maximum allowed probability that the improviser generates an "inadmissible" sequence.
  • $\rho$ (Randomness Bound): The maximum probability any single sequence can have. A smaller $\rho$ forces more diversity.

The paper analyzes the complexity of finding a distribution that satisfies these bounds. For Deterministic Finite Automata (DFAs), they provide a polynomial-time algorithm that uses language counting and uniform sampling. For cases where the state space is too large to represent explicitly, they introduce Symbolic Techniques that leverage SAT solvers and approximate model counters (like UniGen) to estimate the number of valid sequences and sample from them.

Datasets

This is a theoretical paper focused on formal methods and complexity analysis; therefore, it does not use standard empirical datasets or benchmarks. The concepts are illustrated using a "Running Example" involving binary strings and Hamming distance, and the motivation is drawn from existing machine music systems.

Key Insights and Ideas

  • Feasibility is a Counting Problem: The most striking insight is Theorem 3.1, which states that an improviser exists if and only if the total number of possible sequences $|I|$ and the number of admissible sequences $|A|$ are large enough relative to the randomness bound $\rho$ and error tolerance $\epsilon$. Specifically: $|I| \ge 1/\rho$ and $|A| \ge (1-\epsilon)/\rho$.
  • The Trivial Improviser: If a solution exists, there is always a "nearly trivial" one that simply flips a biased coin to choose between two finite lists of sequences.
  • The Complexity Hierarchy: The authors map out a clear boundary of tractability. Improvisation is efficient for DFAs, but becomes #P-hard for Nondeterministic Finite Automata (NFAs) and undecidable for Probabilistic Finite Automata (PFAs).
  • Geometric Feasibility: Figure 2 illustrates the different cases for feasibility based on the sizes of the language $I$ and the admissible set $A$.
A visualization of the feasibility cases for Theorem 4.5, showing how the sizes of the language and admissible set determine if an improviser can be built.

Key Results

  • DFA Efficiency: The authors provide a polynomial-time improvisation scheme for DFAs, even when the language is infinite (by using "pumping" techniques).
  • Hardness Results: They prove that determining if an improviser exists for an NFA is #P-hard, meaning it's at least as hard as counting the number of satisfying assignments to a logic formula.
  • Symbolic Success: They demonstrate that symbolic techniques can approximately solve the CI problem for large systems by using an NP oracle (a SAT solver), providing an $(\epsilon, (1+\tau)^2(1+\epsilon)\rho)$-improviser with high probability.

Limitations and Future Work

  • Complexity Barriers: The undecidability of the PFA case means we cannot have a general-purpose improviser for systems where the base rules are probabilistic.
  • Symbolic Overhead: While SAT-based methods are powerful, they rely on the "diameter" of the automaton (the length of the longest simple path), which can be exponentially large in the worst case.
  • Future Directions: The authors suggest extending this theory to more complex grammars (like context-free languages) and exploring deeper applications in computer security and privacy, where "controlled randomness" is a critical requirement.

Summary updated

BibTeX
@inproceedings{fremont2015control,
  author = {Daniel J. Fremont and Alexandre Donzé and Sanjit A. Seshia and David Wessel},
  title = {{Control Improvisation}},
  booktitle = {FSTTCS},
  year = {2015},
  doi = {10.4230/lipics.fsttcs.2015.463},
}
Figure