arXiv:2611.01189cs.PLOct 2026

Manuscript Offprint

arXiv:2611.01189

Stochastic Summaries: Characterizing Structured Datasets Using Probabilistic Programs

Jack Stanek, Adithya Murali

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

JACK STANEK, University of Wisconsin – Madison, USA

ADITHYA MURALI, University of Wisconsin – Madison, USA

What does my data look like? We study the problem of representing and learning summaries of datasets that account for both their structural and statistical properties. This problem is widely useful across many application domains that involve large datasets and analysis/modeling of data, and is of particular interest to Programming Languages. In particular, in this work we focus on the problem of learning these “stochastic summaries” for tree-like data composed of inductive datatypes and argue that probabilistic programs over inductive datatypes can effectively represent the desired summaries. We present TALI, a Probabilistic Programming Language over inductive datatypes and study the problem of learning such programs from data samples. We identify a semantic property, called Observation-Bounded Compilability, which identifies a set of recursive probabilistic programs which admit exact inference, and can represent many useful and complex probabilistic structures. We then propose an algorithm for learning TALI programs satisfying the OBC property from observations using a combination of program synthesis (stochastic search) and maximum likelihood inference. We implement our learning framework, evaluate it on a diverse benchmark suite, and record our observations on the merits of our approach. We demonstrate the utility of learning stochastic summaries as symbolically-represented priors for downstream learning tasks. We also showcase another utility by using our technique to learn operational profiles of real-world datasets.

CCS Concepts: • Computing methodologies → Unsupervised learning; Machine learning approaches; • Mathematics of computing → Probabilistic representations; • Theory of computation → Probabilistic computation.

1 Introduction

What does my data look like?

Data distributions are a ubiquitous construct in computer science. The most well known example of this is in machine learning, where the formal objective of learning problems is to obtain the natural “data generating distribution”.

The representation, modeling, and analysis of large data sets is itself an important research question that powers several applications [49]. One view of the goal of such efforts in modeling data distributions is to construct summaries or abstractions for them. Empirical datasets can be thought of as samples from an underlying “true” generative model. In contrast to the more commonly studied logical or language-based abstraction mechanisms which capture structural properties or invariants, data distributions capture both statistical and logical/relational properties of the domain of interest. These distributional abstractions can also be compositional: probabilistic graphical models, causal models, neural networks, and probabilistic programs are all examples of compositional languages for representing data distributions.

Summaries for Data Distributions and Programming Languages. The representation and learning of probabilistic data summaries is also of specific interest to the field of Programming Languages. The design of abstraction spaces that admit expressive and compositional representations of practically useful data distributions while simultaneously being amenable to efficient learning is a goal of many research disciplines in PL, including program synthesis, probabilistic programming, and neurosymbolic programming/learning. This point has also been argued in several prior works

Authors' Contact Information: Jack Stanek, University of Wisconsin – Madison, Madison, WI, USA, jstanek@cs.wisc.edu; Adithya Murali, University of Wisconsin – Madison, Madison, WI, USA, adithyamurali@cs.wisc.edu.

in probabilistic programming, and in particular the work in [49] also pursues learning interpretable and operationalizable data summaries for time series data and tabular data.

Additionally, with stochasticity being increasingly woven into the vocabulary of modern system building and algorithm design [4, 14, 33], the study of stochastic data summaries can prove to be a useful tool. For example, prior literature has explored the concept of operational profiling [39], where one specifies a generative function that is meant to capture a program's usage patterns. Testing or analyzing systems against operational profiles (as opposed to the typical test suites obtained from analysis of the program's logic) can provide a useful perspective on the practical functionality and robustness of software [2].

Synthesis of Probabilistic Programs over Structured Data. We make two choices towards defining a formal problem. First, we consider distributions over structured data, specifically generalized labeled trees in the form of inductive datatypes. This choice is motivated by several factors. First, computing with inductive datatypes is supported by many algorithms, and more generally, labeled trees are a ubiquitous construct in software. Second, the structure of data can mirror information about its latent generative process, such as recursive patterns or local dependencies. By contrast, consider integer programs, which can perform arithmetic operations that collapse the individual values (and therefore their distributions) into aggregates; intermediate distributions must be marginalized, which may be intractible or require approximate methods. Finally, inductive datatypes allow us to study complex recursion patterns in generative processes that exploit repeated substructure. Inductive datatypes are in fact an under-explored area in the study of distributions over structured data, with contemporary literature focusing mostly on tabular data [1, 44, 55, 60].

The second choice we make is to represent distributions as probabilistic programs. This choice is also motivated by several considerations. First, probabilistic programs are a natural choice for representing generative processes. This perspective is itself not new; in fact, it is one of the central ideas behind probabilistic programming at large [23, 24, 57], and more specifically has also been heavily utilized by the literature on testing [10, 21, 22, 45, 56]. Second, we are inspired by literature on operational profiling [26, 39], where the skeleton or sketch of the distribution is determined at least in part from knowledge of the data domain. For example, a distribution over binary trees could utilize “knobs” relating the key stored at a node to whether it is a leaf, its height, or perhaps the keys stored at the children of the node. This framing also allows us to utilize paradigms from the literature on program synthesis where learning is modeled as the search for an optimal candidate in a given grammar [34, 42, 49]. Third, as discussed above, programs can easily (and explicitly) represent complex recursion patterns over tree-like data compared to other choices of representation. Such programmatic representations can be easily integrated into existing workflows where data profiles are needed. For example, one can use a program learned from examples to generate realistic test cases.

In this paper we formalize stochastic summaries as a class of probabilistic programs over inductive datatypes and develop techniques for learning them from sample data.

References (43)