Table of Contents
Fetching ...

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.

Real-Time Probabilistic Programming

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.
Paper Structure (31 sections, 1 equation, 16 figures, 1 table, 4 algorithms)

This paper contains 31 sections, 1 equation, 16 figures, 1 table, 4 algorithms.

Figures (16)

  • Figure 1: A simple CorePPL program modeling a coin flip. Fig. (\ref{['fig:ppl-code']}) shows the source code, and Fig. (\ref{['fig:coin0']}) the prior distribution. Fig. (\ref{['fig:coin1']}) gives the posterior distribution after one coin flip, and Fig. (\ref{['fig:coin5']}) the posterior after a sequence of 5 coin flips.
  • Figure 2: Example system of a ProbTime program in textual (\ref{['fig:model-code']}) and graphical form (\ref{['fig:model-ex']}).
  • Figure 3: Outcome of the speed model for the speedEst2 task on synthetic data. The x-axis represents time in seconds, and the y-axis represents the train's speed in meters per second (we seek the speed at the current time, $x = 0.0$). The red dots represent speed observations, and the blue lines are estimates from the model (slope and intercept), where the opacity of a line indicates its likelihood.
  • Figure 4: An overview of the ProbTime compiler. Gray square boxes represent artifacts, and rounded blue squares represent compiler transformations (numbered by the order in which they run). We use the pre-existing CorePPL compiler to produce executable code in the dashed area.
  • Figure 5: Illustration of execution time and particle counts for tasks $\tau_A$ and $\tau_B$ ($\tau_A$ is twice as important as $\tau_B$ and both have the same period) for three scenarios when considering execution-time fairness (E) and particle fairness (P).
  • ...and 11 more figures