The Shape of a Program: Path Signatures for Trace-to-Program Induction
Mohamed Ghanem, Bernd Finkbeiner
NeurIPS page · OpenReview · Open on the map
Category: Interpretability & Model Adaptation › Predictive State Estimation in Context · Type: new method · Keywords: program synthesis, execution trace, path signature, rough path, program induction, interpretability
Summary
The paper introduces a signature-based trace encoder using path signatures to induce programs from execution traces, achieving better performance than LSTM, Transformer, and Fourier baselines.
Explained to a 5-year-old
We watch a computer run a program and record every step it takes. We draw a special picture that shows how those steps move around in space. Using that picture, we can guess what the program should do and write a new program that does the same. The new program often ends up being shorter and simpler than the original. This helps us find when the original instructions have extra, useless parts.
Explained to a 5-year-old, longer
When a computer runs a program, it does many little actions one after another. We collect all those actions into a long list called an execution trace. Instead of looking at the list as just words, we treat the actions like a path that moves through many dimensions. By using a mathematical tool that measures the shape of this path, we can understand what the program is really doing. This shape information helps us create a new program that does the same thing but is often shorter. The new program can be simpler, which makes it easier to read and faster to run. We also notice that the new program sometimes leaves out parts that were not needed, revealing extra stuff in the original instructions. This lets us clean up the original program without needing another program to check it. The method also makes the hidden patterns inside the program easier for us to see, which helps researchers understand how programs work.
For a technical reader
The system converts execution traces into geometric representations using a stochastic analysis transform, which captures the underlying structure better than simple sequence models. This encoding is fed into a program generation model that outputs syntactically valid code. The pipeline naturally prefers concise programs, allowing an automated redundancy check on the training labels. Experiments show superior performance on two domain-specific language benchmarks with less data and more interpretable latent representations.
Problem
Synthesizing programs from execution traces is a fundamental challenge in algorithmic interpretability and reverse engineering of complex systems. Existing sequence models often fail to capture the underlying structure of traces, making reliable program inference difficult.
Method
The approach treats execution traces as high-dimensional rough paths and encodes them using a transform from stochastic analysis that captures the geometric structure of the trace. This encoding is then used in a trace-to-program induction pipeline that tends to produce shorter valid programs, enabling a bootstrapping procedure to detect redundancy in ground-truth supervision.
Results
The approach outperforms LSTM, Transformer, and Fourier baselines and remains strong with substantially less training data on two classical DSL domains, and it produces shorter valid programs, enabling a bootstrapping procedure to detect redundancy in ground-truth supervision without an external oracle.
Contributions
The paper brings a rough-path-theoretic perspective to program induction, using a stochastic analysis transform to encode traces and demonstrating improved performance and interpretability. It also introduces a contractive property that yields a bootstrapping method for redundancy detection in supervision.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction