Abstract
There is a widespread need for techniques that can discover structure from time series data. Recently introduced techniques such as Automatic Bayesian Covariance Discovery (ABCD) provide a way to find structure within a single time series by searching through a space of covariance kernels that is generated using a simple grammar. While ABCD can identify a broad class of temporal patterns, it is difficult to extend and can be brittle in practice. This paper shows how to extend ABCD by formulating it in terms of probabilistic program synthesis. The key technical ideas are to (i) represent models using abstract syntax trees for a domain-specific probabilistic language, and (ii) represent the time series model prior, likelihood, and search strategy using probabilistic programs in a sufficiently expressive language. The final probabilistic program is written in under 70 lines of probabilistic code in Venture. The paper demonstrates an application to time series clustering that involves a non-parametric extension to ABCD, experiments for interpolation and extrapolation on real-world econometric data, and improvements in accuracy over both non-parametric and standard regression baselines.
Introduction
Understanding the underlying "grammar" of a time series—identifying whether data follows a linear upward trend, a periodic cycle, or contains sudden shifts—is essential for accurate forecasting and scientific interpretation. Traditionally, the Automatic Bayesian Covariance Discovery (ABCD) system has addressed this by searching through combinations of Gaussian Process (GP) kernels. However, the original ABCD implementation is often brittle and difficult to modify, requiring thousands of lines of specialized code to add new patterns or alter search strategies.
This paper reimagines time series structure discovery as a problem of probabilistic program synthesis (PPS). By treating the model structure itself as a program to be synthesized, the authors condense a complex system into just 70 lines of code in the Venture programming language, creating a framework that is more flexible, easier to extend, and highly accurate.
Methodology
The PPS approach treats the discovery process as a two-stage probabilistic inference problem. First, a "Synthesis Model" uses a prior over model structures and an interpreter to find an Abstract Syntax Tree (AST) that best explains the observed data. Second, this synthesized AST is used within a "Prediction Model" to generate outputs for new probe inputs.
The system relies on three primary pillars:
- Models as ASTs: Time series structures are represented as ASTs where leaves are base kernels (e.g., White Noise, Linear, Periodic) and internal nodes are operators like Sum, Product, or Change-point.
- Synthesis Model: A probabilistic program defines a prior over these trees and an interpreter that converts a tree into an executable GP model.
- Hybrid Inference: The system finds optimal models using Metropolis-Hastings (MH) sampling to propose structural changes (e.g., swapping a linear trend for a periodic one) and gradient-based optimization to fine-tune hyperparameters like period length or trend steepness.
Representing Models as Programs
A core innovation of this work is the direct mapping between symbolic structure, executable code, and statistical behavior. By representing the covariance kernel as an AST, the system can automatically generate equivalent Venture code that defines the Gaussian Process.
This representation allows for extreme extensibility. For instance, the authors implemented non-parametric clustering—grouping different time series that share the same underlying structure—by adding only 10 lines of code to the core system. In traditional frameworks, such an addition would require a massive architectural overhaul.
Key Results and Insights
The researchers evaluated the PPS approach using synthetic data to verify ground-truth recovery and real-world datasets, including airline passenger volume and solar radiation records.
- Competitive Accuracy: The PPS approach achieved root-mean-square error (RMSE) metrics that were competitive with the original ABCD and significantly outperformed standard baselines like Linear Regression and Support Vector Machines.
- Robustness through Model Averaging: Unlike systems that pick a single "best" model, the Bayesian nature of this framework allows it to average predictions across multiple likely structures, leading to more robust forecasts.
- Complexity Reduction: The Venture implementation achieved results comparable to the original ABCD using only 69 lines of core logic, compared to over 4,000 lines in the original system. This brevity ensures the entire discovery engine is visible and modifiable.
Conclusion
By framing structure discovery as probabilistic program synthesis, this work bridges the gap between "black-box" machine learning and interpretable symbolic logic. While computational costs for Gaussian Processes remain a challenge for very large datasets, the flexibility and brevity of the PPS framework offer a powerful new path for automated data science and generative modeling.
Summary updated