Real-Time Probabilistic Programming
Lars Hummelgren, Matthias Becker, David Broman
TL;DR
The paper tackles the challenge of performing probabilistic inference in real-time cyber-physical systems by introducing Real-Time Probabilistic Programming Languages (RTPPL) and a concrete language, ProbTime. ProbTime blends probabilistic primitives with real-time timing constructs, enabling modular task-based designs and offline automatic configuration via fairness-driven, schedulable particle allocation. It formalizes system and task semantics, defines two fairness notions (execution-time and particle fairness), and develops automatic configuration methods that maximize inference accuracy within timing constraints. The automotive case study demonstrates practical viability for indoor positioning and braking, showing how particle counts impact accuracy and how automated configuration can yield schedulable, high-quality probabilistic inference in real hardware.
Abstract
Complex cyber-physical systems interact in real-time and must consider both timing and uncertainty. Developing software for such systems is expensive and difficult, especially when modeling, inference, and real-time behavior must be developed from scratch. Recently, a new kind of language has emerged -- called probabilistic programming languages (PPLs) -- that simplify modeling and inference by separating the concerns between probabilistic modeling and inference algorithm implementation. However, these languages have primarily been designed for offline problems, not online real-time systems. In this paper, we combine PPLs and real-time programming primitives by introducing the concept of real-time probabilistic programming languages (RTPPL). We develop an RTPPL called ProbTime and demonstrate its usability on an automotive testbed performing indoor positioning and braking. Moreover, we study fundamental properties and design alternatives for runtime behavior, including a new fairness-guided approach that automatically optimizes the accuracy of a ProbTime system under schedulability constraints.
