arXiv Science⌕ Search

arXiv subjects

Linus Zheng

Publications and source records attributed to Linus Zheng.

3 recordsLinked to original sources

Rewinding the Fold: Making Stateful Computations Retractable

Incremental computation seeks to maintain outputs efficiently as inputs evolve, without recomputing from scratch after every change. While much prior work has focused on updating results when new data arrive, supporting deletion is fundamentally more difficult: once prior inputs have been folded into a compact summary, the information needed to undo their effect may already have been lost. This paper studies incremental deletion for fold-based stream computations. This setting captures a broad class of data-processing tasks, where a program maintains a running summary of a stream and uses that summary to process future inputs. Given a fold that supports only additions and a policy describing what type of deletion support is required, our method synthesizes a new program that supports deletions by extending the summary state and deriving both the addition and deletion logic. Our synthesis procedure is backed by a new verification framework that decomposes correctness into local obligations over relational invariants. As a result, for every supported sequence of additions and deletions, the synthesized fold is guaranteed to match what full recomputation would produce. We implemented this approach in a new tool called Rewind and evaluated it on 94 benchmark scenarios drawn from real-world aggregations in the Flink framework. Rewind synthesizes deletion support for all 94 benchmarks, including cases that contain bugs in the manually-written deletion implementation.

cs.PL↗

Homomorphism Calculus for User-Defined Aggregations

Data processing frameworks like Apache Spark and Flink provide built-in support for user-defined aggregation functions (UDAFs), enabling the integration of domain-specific logic. However, for these frameworks to support \emph{efficient} UDAF execution, the function needs to satisfy a \emph{homomorphism property}, which ensures that partial results from independent computations can be merged correctly. Motivated by this problem, this paper introduces a novel \emph{homomorphism calculus} that can both verify and refute whether a UDAF is a dataframe homomorphism. If so, our calculus also enables the construction of a corresponding merge operator which can be used for incremental computation and parallel execution. We have implemented an algorithm based on our proposed calculus and evaluate it on real-world UDAFs, demonstrating that our approach significantly outperforms two leading synthesizers.

cs.PL↗

Programmatic Imitation Learning from Unlabeled and Noisy Demonstrations

Imitation Learning (IL) is a promising paradigm for teaching robots to perform novel tasks using demonstrations. Most existing approaches for IL utilize neural networks (NN), however, these methods suffer from several well-known limitations: they 1) require large amounts of training data, 2) are hard to interpret, and 3) are hard to repair and adapt. There is an emerging interest in programmatic imitation learning (PIL), which offers significant promise in addressing the above limitations. In PIL, the learned policy is represented in a programming language, making it amenable to interpretation and repair. However, state-of-the-art PIL algorithms assume access to action labels and struggle to learn from noisy real-world demonstrations. In this paper, we propose PLUNDER, a novel PIL algorithm that integrates a probabilistic program synthesizer in an iterative Expectation-Maximization (EM) framework to address these shortcomings. Unlike existing PIL approaches, PLUNDER synthesizes probabilistic programmatic policies that are particularly well-suited for modeling the uncertainties inherent in real-world demonstrations. Our approach leverages an EM loop to simultaneously infer the missing action labels and the most likely probabilistic policy. We benchmark PLUNDER against several established IL techniques, and demonstrate its superiority across five challenging imitation learning tasks under noise. PLUNDER policies achieve 95% accuracy in matching the given demonstrations, outperforming the next best baseline by 19%. Additionally, policies generated by PLUNDER successfully complete the tasks 17% more frequently than the nearest baseline.

cs.RO↗