Kensen Shi
· 2 previous affiliations
- Google (United States)Since 2018
- Software Engineer · Since 2018
- Stanford University2013–2018
- MS student · 2017–2018
- Undergrad student · 2013–2017
Research Overview
Kensen Shi focuses on program synthesis, specifically the integration of machine learning with combinatorial search to automate the generation of complex code. His work addresses the challenges of synthesizing programs that involve intricate control structures, higher-order functions, and domain-specific library components. By developing novel neural search policies and execution-guided decomposition methods, he aims to improve the scalability and compositional generalization of automated programming tools. His recent research explores how models can better reason about execution semantics to bridge the gap between syntactic code generation and functional correctness.
Research Trajectory
The trajectory of Shi’s research reflects a systematic progression from traditional search-based synthesis to the development of sophisticated neural-guided architectures. His early work focused on the fundamental constraints of component-based synthesis, where the goal is to assemble programs from a library of existing functions. In this phase, he addressed the difficulty of synthesizing control structures like loops and conditionals without requiring expensive formal specifications. This period was characterized by the development of algorithms that could mine code fragments and explore program behaviors through input-output examples.
By 2020, Shi’s focus shifted toward domain-specific synthesis and the optimization of search algorithms. He developed tools tailored for deep learning frameworks, where the programming paradigm differs significantly from traditional imperative logic. During this time, he also investigated foundational sampling techniques for sequence models, which are critical for generating diverse candidates in generative tasks. This period marked a transition toward more structured search methods, such as bottom-up weighted enumerative search, which utilizes value-based pruning and type-filtering to navigate large search spaces more efficiently.
In the following years, Shi’s work increasingly integrated neural models directly into the search process. Rather than using machine learning merely as a post-hoc filter, he began developing "hands-on" neural search policies. These policies learn to choose how to combine previously explored sub-programs into more complex structures, effectively replacing or augmenting traditional combinatorial algorithms. This shift allowed for the synthesis of programs with higher-order functions and lambdas, which had previously been a significant bottleneck for search-based methods.
Most recently, Shi has focused on the problem of compositional generalization—the ability of a model to solve complex tasks by combining simpler concepts it has already learned. This work moves beyond simple code generation to emphasize execution-based reasoning. By training models to predict intermediate execution states or "subgoals" before writing the final code, his research attempts to mimic human-like problem-solving. This current phase also involves participation in broader efforts to improve how large language models (LLMs) interact with stateful environments, such as interactive data science notebooks, and how they reason about Learning Execution Semantics from Stepwise Program Traces.
Current Directions
Shi’s current research is centered on enhancing the robustness of neural program synthesizers through execution-guided feedback and decomposition. A primary focus is Mitigating the Performance Overhead of Dynamic Program Analysis, where the goal is to balance the speed of static analysis with the precision of dynamic execution. This involves creating systems that can decompose a high-level programming task into a sequence of executable sub-tasks, ensuring that each step is functionally sound before proceeding.
Another significant area of interest is the evaluation and improvement of LLMs in "wild" or stateful environments. While LLMs excel at generating standalone snippets, Shi’s work examines their performance in iterative, multi-turn contexts like Jupyter notebooks. This research highlights the necessity of models that understand the messy, stateful reality of real-world data science, where code is rarely written in a single, perfect pass. His ongoing work continues to push the boundaries of how neural models can be taught to reason about run-time behavior through chain-of-thought rationales and execution traces.
Representative Work
FrAngel: Component-Based Synthesis with Control Structures In this first-author paper, Shi introduced FrAngel, a synthesizer designed to generate Java functions with loops and other control structures. The approach is notable for its ability to work with libraries that lack formal specifications, instead relying on input-output examples and the mining of code fragments to discover programs with distinct behaviors. This work addressed a critical gap in component-based synthesis, which had previously struggled with the complexity of control flow.
TF-Coder: Program Synthesis for Tensor Manipulations As the lead author, Shi developed TF-Coder, a tool specifically for programming by example within the TensorFlow framework. The tool uses a bottom-up weighted enumerative search to help users navigate the steep learning curve of tensor manipulation libraries. By employing value-based pruning and flexible filtering based on tensor types and values, TF-Coder demonstrated how synthesis could be applied to specialized, high-demand programming domains.
BUSTLE: Bottom-Up Program Synthesis Through Learning-Guided Exploration In this second-author contribution, Shi worked on a synthesis approach that leverages machine learning to guide bottom-up search. The model is trained to prioritize the composition of intermediate values that are most likely to lead to a solution, conditioned on the provided input-output examples. This work demonstrated the power of combining combinatorial search with neural guidance to manage the exponential growth of the search space.
CrossBeam: Learning to Search in Bottom-Up Program Synthesis In this first-author work, Shi proposed CrossBeam, a system that trains a neural model to act as a hands-on search policy. Unlike previous methods that used neural models to merely score candidates for a separate search algorithm, CrossBeam uses the model to actively choose which programs to combine. This approach allows the synthesizer to explore the search space more effectively and handle larger, more complex programs than traditional combinatorial methods.
LambdaBeam: Neural Program Search with Higher-Order Functions and Lambdas Continuing his work on neural search, Shi led the development of LambdaBeam. This paper addressed the challenge of synthesizing programs that include higher-order functions and lambda expressions. By incorporating these elements into the neural search framework, LambdaBeam extended the reach of program synthesis to more expressive functional programming patterns that were previously difficult for systematic search methods to reach.
ExeDec: Execution Decomposition for Compositional Generalization in Neural Program Synthesis In this first-author paper, Shi introduced ExeDec, a method designed to improve compositional generalization. ExeDec breaks down complex programming tasks by predicting intermediate execution states (subgoals) before generating the actual code. This decomposition mimics human problem-solving and was shown to significantly improve the performance of both custom-trained Transformers and Large Language Models on tasks requiring the novel combination of known concepts.
Profile updated
Loading new papers…
Other researchers whose papers cluster into the same research directions — a proxy for overlapping technical interests and shared intellectual neighborhoods.
See something wrong? Report a mistake