Inference Plans for Hybrid Particle Filtering

Ellie Y. Cheng,Eric Atkinson,Guillaume Baudart,Louis Mandel,Michael Carbin
2024-08-21
Abstract:Advanced probabilistic programming languages (PPLs) use hybrid inference systems to combine symbolic exact inference and Monte Carlo methods to improve inference performance. These systems use heuristics to partition random variables within the program into variables that are encoded symbolically and variables that are encoded with sampled values, and the heuristics are not necessarily aligned with the performance evaluation metrics used by the developer. In this work, we present inference plans, a programming interface that enables developers to control the partitioning of random variables during hybrid particle filtering. We further present Siren, a new PPL that enables developers to use annotations to specify inference plans the inference system must implement. To assist developers with statically reasoning about whether an inference plan can be implemented, we present an abstract-interpretation-based static analysis for Siren for determining inference plan satisfiability. We prove the analysis is sound with respect to Siren's semantics. Our evaluation applies inference plans to three different hybrid particle filtering algorithms on a suite of benchmarks and shows that the control provided by inference plans enables speed ups of 1.76x on average and up to 206x to reach target accuracy, compared to the inference plans implemented by default heuristics; the results also show that inference plans improve accuracy by 1.83x on average and up to 595x with less or equal runtime, compared to the default inference plans. We further show that the static analysis is precise in practice, identifying all satisfiable inference plans in 27 out of the 33 benchmark-algorithm combinations.
Programming Languages,Artificial Intelligence
What problem does this paper attempt to address?
### What problem does this paper attempt to solve? This paper aims to solve the problem of random variable partitioning in Hybrid Particle Filtering. Specifically, it focuses on how to more effectively control the partitioning between symbolic encoding and sampling encoding of random variables in a hybrid inference system to improve inference performance. #### Background and Problem Description 1. **Limitations of Hybrid Inference Systems**: - Hybrid inference systems (such as delayed sampling, semi - symbolic inference, etc.) combine symbolic reasoning and Monte Carlo methods to improve inference performance. - These systems use built - in heuristic algorithms to automatically partition random variables, deciding which variables are represented symbolically and which are represented by sampling values. - However, these heuristic algorithms are not always aligned with the metrics that developers use to evaluate program performance, resulting in potentially sub - optimal inference performance. 2. **Developers' Challenges**: - Developers need an interface that enables them to control the partitioning of random variables according to their own requirements and performance evaluation criteria. - The default heuristic algorithms may not meet the needs of specific application scenarios, so a mechanism is required to allow developers to customize inference plans. #### Solutions in the Paper 1. **Introducing Inference Plans**: - An inference plan is a programming interface that allows developers to finely control whether random variables are symbolically encoded or sampling - encoded during the hybrid inference process. - Through this interface, developers can select the optimal inference strategy according to the specific requirements and performance metrics of the application. 2. **Siren Language**: - Siren is a new probabilistic programming language (PPL) that supports developers in using annotations to specify inference plans. - Siren implements several existing hybrid particle filtering systems and extends the symbolic interface through a unified hybrid inference interface. 3. **Satisfiability Analysis**: - The paper proposes a static analysis method based on abstract interpretation to determine whether the inference plan is satisfiable in all execution paths of a given program. - This analysis ensures that the inference plan does not fail in certain execution paths, thus avoiding the performance degradation caused by dynamic encoding conversion. #### Experimental Results - Using inference plans can significantly improve inference speed and accuracy. Experimental results show that the average speed - up is 1.76 times, with a maximum of 206 times; the average accuracy improvement is 1.83 times, with a maximum of 595 times. - Satisfiability analysis shows high accuracy in practical applications and can correctly identify satisfiable inference plans in most cases. ### Summary This paper solves the problem of random variable partitioning in hybrid particle filtering by introducing inference plans and satisfiability analysis, enabling developers to better control the inference process, thereby improving inference performance and ensuring the reliability of inference plans.