Introduction
In real-time artificial intelligence applications, such as autonomous robot navigation or intensive-care monitoring, systems must frequently navigate a fundamental "quality-time tradeoff." While a perfect solution is desirable, it is often more valuable to have a "good enough" answer immediately than a perfect one too late. Anytime algorithms address this by providing results that improve over time. However, a specific class known as contract algorithms presents a unique challenge: they require a pre-defined time budget before execution begins.
Managing a complex system composed of multiple contract algorithms—for instance, a pipeline involving noise filtering, speaker identification, and linguistic analysis—requires an efficient way to allocate a total time budget across all components. Solving this resource allocation problem globally is computationally expensive (NP-complete), making standard tools like Influence Diagrams impractical for large-scale, real-time systems.
Methods: Local Compilation and Performance Profiles
To overcome the complexity of global optimization, this research proposes a two-step solution centered on Conditional Performance Profiles (CPPs). A CPP serves as a probabilistic map, defining the expected output quality distribution based on the input quality and the allocated time budget.
The proposed approach utilizes local compilation to simplify the optimization process:
- Off-line Local Compilation: Instead of optimizing the entire system simultaneously, the method adopts a bottom-up approach. For every composite module in a tree-structured program, the system calculates the optimal time distribution for its immediate children. This "local" optimization is performed for all possible time budgets and stored in a lookup table.
- Run-time Monitoring: During execution, the system simply retrieves these pre-calculated optimal allocations from the table. This reduces run-time overhead to near zero, enabling real-time responsiveness.
Theoretical Insights and Results
The core mathematical contribution of this work is proving that a "local," greedy-style approach can achieve global optimality under specific conditions.
- Optimality Theorems: Theorem 5.1 proves that for deterministic algorithms, local compilation is always globally optimal. Theorem 5.2 extends this to probabilistic algorithms, demonstrating that if the relationship between input and output quality is linear, local optimality implies global optimality.
- Complexity Reduction: By shifting to local compilation, the complexity of finding the optimal time allocation drops from exponential to polynomial—specifically $O(\kappa \tau^2)$, where $\kappa$ is the number of modules and $\tau$ is the time resolution.
- Practicality of Linearity: While performance isn't always perfectly linear, it often remains "near-linear" in typical operating ranges, making this model highly applicable to real-world engineering where algorithms aren't being pushed to extreme failure or absolute perfection.
Limitations and Future Directions
While powerful, the current framework has constraints. The proof of optimality relies on a tree-structured program architecture. While Directed Acyclic Graphs (DAGs) can potentially be handled using Bayesian network evaluation techniques, they were not the primary focus of this study. Additionally, highly non-linear performance profiles—such as "threshold" effects where quality jumps abruptly—may lead to sub-optimal results under local compilation.
Future research will focus on analyzing non-linear dependencies and extending these results to more diverse sets of reusable contract algorithms within complex decision-making environments.
Summary updated