Kexun Zhang

Kexun Zhang

Carnegie Mellon University
3 previous affiliations
27Machine learning papers tracked by Lacuna
Is this you?

Research Overview

Kexun Zhang focuses on the development and evaluation of large language models (LLMs) for code generation, autonomous software engineering agents, and the security of generative AI systems. Their work explores the intersection of strategic reasoning—utilizing methods such as Monte Carlo Tree Search and finite-state decoding—and the robust verification of machine-generated outputs. Currently, Zhang’s research emphasizes the integration of diverse multi-agent systems to solve complex, repository-level software engineering tasks and the investigation of vulnerabilities in agent-led development workflows.

Research Trajectory

The evolution of Zhang’s research reflects a transition from fundamental generative modeling in the audio domain to the specialized application of LLMs in software engineering and digital security. This trajectory is marked by an increasing focus on the reliability and verifiability of autonomous systems.

In the early stages of their work, Zhang investigated high-fidelity audio synthesis. This period was characterized by the application of normalizing flows to address the limitations of convolutional and adversarial models in audio super-resolution. By integrating WaveNet architectures with Glow-based generative models, Zhang developed methods to maximize the exact likelihood of high-resolution audio conditioned on low-resolution inputs, prioritizing training stability and inference speed.

By 2023, Zhang’s focus shifted toward the challenges of algorithmic code synthesis and the inherent vulnerabilities of generative models. This phase introduced the concept of the "Reference Oracle" to bridge the gap between the ease of generating brute-force logic and the difficulty of producing optimized, efficient code. This work established a framework for using simpler, correct programs to verify and refine complex candidate solutions. Concurrently, Zhang began exploring the security implications of generative AI, specifically regarding The Statistical Signatures of Machine Generated Text. This research demonstrated that industry-standard invisible watermarks used to tag AI-generated content are fundamentally vulnerable to "regeneration attacks," where generative models are used to noise and reconstruct images, effectively stripping provenance without compromising quality.

In 2024 and 2025, Zhang’s work moved into the domain of agentic software engineering and tool-augmented LLMs. Recognizing that standard autoregressive decoding often leads to syntactically invalid tool calls, Zhang developed constrained decoding algorithms based on finite-state machines. This approach ensures that LLM outputs conform to specific tool schemas and argument types, facilitating Multi-Task Evaluation Frameworks for Robust Language Understanding by allowing models to interact reliably with diverse external environments.

Zhang’s most recent research addresses the limitations of linear, sequential problem-solving in software agents. By incorporating strategic search algorithms like Monte Carlo Tree Search (MCTS), Zhang has moved toward agents capable of backtracking and iterative refinement. This work often involves The Mechanics of Qualitative and Quantitative Data Integration, as agents are designed to process both numerical rewards and natural language feedback to navigate complex codebases. Furthermore, Zhang has pioneered the "Diversity Empowered Intelligence" (DEI) framework, which shifts the focus from single-model performance to the coordination of heterogeneous agent committees.

Most recently, Zhang has begun to critique the emerging practice of "vibe coding"—the delegation of complex tasks to agents with minimal human oversight. This research highlights the security risks inherent in this trend, particularly regarding Source Attribution Bias in Human AI Collaboration, where users may over-rely on agent-generated code that contains subtle but critical vulnerabilities.

Current Directions

Zhang’s current research is concentrated on three primary pillars: agentic software engineering, high-quality verification, and the safety of autonomous coding.

In the realm of software engineering agents, Zhang is refining multi-agent frameworks that can resolve real-world GitHub issues. This involves developing meta-models that can rank and integrate patches from diverse agents, effectively leveraging the specialized expertise of different LLM architectures. The goal is to move beyond "greedy" generation toward a more deliberative, ensemble-based approach to software maintenance.

A second major focus is the synthesis of high-quality test cases for LLM training and evaluation. Zhang’s work in this area addresses the "verifier" problem: the difficulty of obtaining reliable test cases that can distinguish between truly correct solutions and those that merely appear correct on surface-level inputs. By developing pipelines for synthesizing edge cases and hard tests, Zhang aims to provide the rigorous benchmarks necessary for reinforcement learning in the coding domain.

Finally, Zhang is investigating the security and safety of agent-generated code. This includes benchmarking the vulnerability of code produced by frontier models in real-world scenarios and developing methods to ensure that autonomous agents do not introduce security flaws into open-source ecosystems.

Representative Work

WSRGlow: A Glow-Based Waveform Generative Model for Audio Super-Resolution As first author, Zhang proposed a generative model for audio super-resolution that utilizes normalizing flows. By integrating WaveNet and Glow, the model directly maximizes the likelihood of target high-resolution audio. This work addressed the training instabilities common in adversarial models and the performance plateaus of traditional convolutional approaches, providing a foundation for high-fidelity audio reconstruction.

ALGO: Synthesizing Algorithmic Programs with Generated Oracle Verifiers In this first-author paper, Zhang introduced the ALGO framework to improve the reliability of LLM-generated algorithmic code. The system uses a "Reference Oracle"—a brute-force program that is easier for the LLM to generate correctly—to verify the outputs of more complex, efficient candidate programs. This dual-model approach significantly improved pass rates on competitive programming benchmarks by providing a mechanism for automated correctness checking.

ToolDec: Syntax Error-Free and Generalizable Tool Use for LLMs via Finite-State Decoding Zhang served as first author on this work, which developed a finite-state machine-guided decoding algorithm for tool-augmented LLMs. ToolDec eliminates syntax errors in tool calls by ensuring that the model only generates valid tool names and type-conforming arguments. This method allows LLMs to generalize to new tools without additional fine-tuning, addressing a major bottleneck in the deployment of autonomous agents.

Diversity Empowers Intelligence: Integrating Expertise of Software Engineering Agents As the lead author of the DEI framework, Zhang demonstrated that an ensemble of diverse LLM agents outperforms individual models on complex software engineering tasks. The framework uses a meta-model to review and rank candidate patches from different agents. This research achieved a record-breaking resolve rate on the SWE-Bench Lite benchmark, highlighting the value of agent diversity in solving repository-level issues.

Invisible Image Watermarks Are Provably Removable Using Generative AI In this second-author study, Zhang provided both formal proofs and empirical evidence that pixel-level invisible watermarks are fundamentally removable. The research introduced a "regeneration attack" that uses generative models to reconstruct an image after adding noise, effectively wiping the watermark while maintaining visual quality. This work has significant implications for the reliability of AI-generated content identification.

SWE-Search: Enhancing Software Agents with Monte Carlo Tree Search and Iterative Refinement As a primary contributor to the SWE-Search framework, Zhang integrated Monte Carlo Tree Search (MCTS) into software engineering agents. This allows agents to move beyond linear processes and instead explore alternative solutions through backtracking and strategic search. By combining numerical rewards with qualitative feedback, the framework enables agents to rethink their strategies when initial approaches fail, leading to substantial performance gains in autonomous repository maintenance.

Profile updated

See something wrong? Report a mistake