Jiayi Wei
· 6 previous affiliations
- Microsoft (United States)Since 2025
- Principal Researcher · Since 2025
- Microsoft AISince 2025
- Member of Technical Staff, Microsoft Superintelligence · Since 2025
- Augment Computing2023–2025
- Researcher · 2023–2025
- Augment2023–2025
- Founding Researcher · 2023–2025
- The University of Texas at Austin2017–2023
- PhD student · 2018–2023
- Visiting Researcher · 2017–2018
- Bachelor of Science, physics · 2013–2017
Research Overview
Jiayi Wei focuses on the intersection of deep learning, static program analysis, and software engineering, with a particular emphasis on enhancing the capabilities of large language models (LLMs) for code generation and repository-level reasoning. His work explores how Language Agnostic Representations for Cross Language Portability can address the limitations of purely probabilistic models in maintaining syntactic and semantic correctness. Currently a member of the technical staff at Microsoft Superintelligence, Wei develops pre-training data pipelines and reinforcement learning methods to improve the reasoning and software engineering performance of foundation models.
Research Trajectory
Wei’s early research was centered on software security and formal verification, specifically focusing on automated testing and the analysis of program complexity. In Singularity: pattern fuzzing for worst case complexity, he investigated pattern-based fuzzing techniques designed to identify inputs that trigger worst-case performance in programs. This period also involved exploring the application of machine learning to formal methods, as seen in Relational verification using reinforcement learning, where he participated in developing RL-based approaches to assist in the verification of relational properties between program executions.
Between 2021 and 2022, Wei’s work briefly pivoted toward robotics and control systems, applying machine learning to problems of state estimation and controller synthesis. In STEADY: Simultaneous State Estimation and Dynamics Learning from Indirect Observations, he proposed a method for concurrently learning system dynamics and estimating state from noisy, indirect sensor data. This phase of research emphasized the challenge of learning from imperfect information, a theme that would later translate into his work on code intelligence where models must operate on incomplete or ambiguous repository contexts.
Since 2023, Wei has focused primarily on the development of specialized models for software engineering. This transition began with the integration of static analysis into sequence-to-sequence models to solve complex programming tasks. His work on TypeT5: Seq2seq Type Inference using Static Analysis addressed the difficulty of predicting rare or user-defined types in dynamically typed languages like Python and TypeScript. By using static analysis to provide the model with dynamic, relevant context from the codebase, Wei demonstrated that models could move beyond simple pattern matching to perform more accurate type inference.
Current Directions
Wei’s recent research addresses the challenges of Structural Context for Repository Level Code Intelligence. Recognizing that code is inherently hierarchical and interdependent, his work seeks to move beyond treating source files as flat text. This is exemplified in Coeditor: Leveraging Repo-level Diffs for Code Auto-editing, which introduces a model designed to propagate changes across a repository by learning from line-level diffs and repository-wide static analysis. This approach allows for precise code editing that accounts for developer activity across multiple files.
A significant current focus is the optimization of Retrieval-Augmented Generation (RAG) for large-scale software projects. Wei has argued that standard text-processing techniques, such as fixed-size windowing, are unsuitable for code because they often disrupt semantic units like functions or classes. To solve this, he developed Structural Code Partitioning via Abstract Syntax Trees, a methodology that uses the formal grammar of a language to guide the chunking of code. In cAST: Enhancing Code Retrieval-Augmented Generation with Structural Chunking via Abstract Syntax Tree, he demonstrates that preserving the structural integrity of retrieved snippets significantly improves the functional correctness of the code generated by LLMs.
His current work at Microsoft Superintelligence continues these themes, focusing on Multi-turn Iterative Code Generation and Refinement. This involves designing training pipelines that enable models to engage in chain-of-thought reasoning and iterative debugging, mirroring the actual workflows of human software engineers.
Representative Work
Singularity: pattern fuzzing for worst case complexity This early work addresses the problem of algorithmic complexity vulnerabilities. Wei developed a fuzzing framework that identifies input patterns likely to trigger exponential or quadratic time complexity in target programs, providing a method for detecting performance-based security flaws.
Relational verification using reinforcement learning In this collaboration, Wei contributed to a framework that uses reinforcement learning to automate the discovery of inductive invariants for relational program verification. The work demonstrates how RL can navigate the search space of formal proofs more effectively than traditional heuristic-based solvers.
STEADY: Simultaneous State Estimation and Dynamics Learning from Indirect Observations Wei proposed a unified framework for robotics that simultaneously learns the physical dynamics of a system while performing state estimation. This approach mitigates the error propagation that typically occurs when these two tasks are handled by separate, decoupled modules.
TypeT5: Seq2seq Type Inference using Static Analysis This paper introduces a method for type inference that combines the generative power of T5 models with the precision of static analysis. By constructing a "dynamic context" for each code element—including relevant class definitions and imported signatures—the model achieves high accuracy on rare and complex types that standard models typically fail to predict.
Coeditor: Leveraging Repo-level Diffs for Code Auto-editing Wei developed Coeditor to automate the propagation of code changes. The model uses a specialized encoding for line-level diffs and leverages repository-level static analysis to predict where and how a developer's recent edits should be applied elsewhere in the codebase.
cAST: Enhancing Code Retrieval-Augmented Generation with Structural Chunking via Abstract Syntax Tree As the senior researcher on this project, Wei introduced a structure-aware chunking method for code RAG. By using Abstract Syntax Trees (ASTs) to define the boundaries of retrievable units, the method ensures that retrieved code snippets are semantically complete, leading to substantial improvements in the factuality and compilability of LLM-generated code.
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