NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Hengzhi Pei

4 previous affiliations
20Machine learning papers tracked by Lacuna
Is this you?

Research Overview

Hengzhi Pei focuses on the intersection of machine learning robustness, generative modeling, and natural language understanding, with a particular emphasis on developing systems that reason over structured and unstructured data. His work spans the security of deep neural networks, the synthesis of complex data types such as time series and source code, and the advancement of zero-shot generalization through logical decomposition. Currently affiliated with Amazon, Pei’s research trajectory reflects a transition from investigating the vulnerabilities of statistical models to building more resilient, interpretable, and capable systems that can handle Reasoning with Weighted Logical Constraints.

Research Trajectory

Pei’s early research, beginning around 2019, was primarily concerned with the security and reliability of deep learning models. This period involved identifying critical vulnerabilities in generative and discriminative systems. He contributed to the development of generative model-inversion attacks, which demonstrated that sensitive training data could be reconstructed from public model parameters, and explored adversarial text generation. During this phase, he also investigated methods to improve the robustness of sensing-reasoning pipelines by integrating statistical machine learning with Markov logic networks, addressing the limitations of purely data-driven approaches in maintaining performance under perturbation.

By 2021, Pei’s focus expanded into the challenges of real-world data synthesis and sequential modeling. He led work on generating realistic time series data, specifically addressing the issues of variable lengths and missing values that characterize non-synthetic datasets. This interest in sequential data evolved into a broader investigation of autoregressive models. He participated in research that reframed autoregressive generation as an energy-based modeling problem to mitigate common issues like exposure bias and lack of long-range coherence in sequence tasks.

In the mid-2020s, Pei’s work increasingly centered on the intersection of language and logic, particularly for Attribute Decomposition for Zero Shot Generalization. He developed frameworks that allow models to classify unseen categories by reasoning over natural language explanations, mimicking the human ability to compose known attributes into new concepts. This period also marked a significant shift toward code intelligence. His recent work addresses the complexities of Guiding Code Evolution with Natural Language Intent, focusing on how Large Language Models (LLMs) can be fine-tuned to handle imperfect partial code and maintain Repository-Level Code Intelligence for Large Language Models.

Current Directions

Pei’s current research is concentrated on enhancing the utility and efficiency of LLMs in specialized domains. A major pillar of this work is the refinement of code-centric models. He explores how models can move beyond simple function completion to perform joint rewriting and completion of buggy or "drafty" code, treating partial implementations as hints rather than final constraints. This involves developing new training strategies, such as multi-pass iterative refinement, to ensure functional correctness in professional software environments.

Another significant direction involves the optimization of model performance through novel distillation techniques. Pei is investigating residual learning frameworks for knowledge distillation, which aim to prevent smaller student models from inheriting the systematic errors of larger teacher models. By focusing on the residual difference between student and teacher representations, this approach seeks to enable smaller models to generalize more effectively, sometimes surpassing the performance of their larger counterparts in specific contexts.

Additionally, Pei continues to work on the security of natural language systems. His recent contributions include developing provable defenses against backdoor attacks in text classification. This work moves away from empirical, heuristic-based defenses toward methods that provide formal security guarantees, ensuring that NLP models remain reliable even when trained on potentially compromised datasets.

Representative Work

Towards Generating Real-World Time Series Data As the lead author, Pei developed RTSGAN, a generative framework designed to produce realistic time series data. Unlike previous GAN-based methods that assumed complete and well-formatted datasets, this work specifically addressed the challenges of long sequences with variable lengths and informative missingness. The framework utilizes an encoder-decoder module to map time series to a latent space, allowing the generator to produce high-fidelity synthetic data that retains the statistical properties of complex, real-world signals.

Zero-Shot Classification by Logical Reasoning on Natural Language Explanations In this work, Pei proposed a framework for zero-shot classification that operates by parsing and reasoning over natural language descriptions of unseen categories. By decomposing a category into its constituent attributes (e.g., describing a bird species by its bill shape and eye color), the system can identify new entities without direct training examples. This approach leverages the compositional nature of language to bridge the gap between known concepts and novel observations through formal logical parsing.

TextGuard: Provable Defense against Backdoor Attacks on Text Classification Addressing the security of NLP deployments, Pei introduced TextGuard, which represents the first provable defense against backdoor attacks in text classification. The method involves a data-splitting strategy that isolates potential triggers, providing a formal guarantee that the model's predictions remain secure against arbitrary attacks. This work demonstrated that empirical defenses are often insufficient against adaptive adversaries and established a more rigorous standard for certified robustness in language tasks.

Fine-tuning Language Models for Joint Rewriting and Completion of Code with Potential Bugs Pei contributed to this research on improving CodeLLMs for real-time application. The study treats partial, potentially buggy code as implementation "hints" and fine-tunes models to simultaneously rewrite and complete these drafts into functional programs. By exploring one-pass and multi-pass iterative refinement strategies, the work addresses the practical challenges developers face when using automated tools within a continuous coding workflow.

Knowledge Distillation for Large Language Models through Residual Learning In this recent work, Pei explored a two-stage distillation framework that utilizes residual learning. The core contribution is a method that allows a student model to learn from a teacher's successes while explicitly accounting for and correcting the teacher's errors. This approach decouples the student's learning process from the teacher's specific architectural constraints, such as tokenization, and enables the development of highly efficient models that maintain high generalization capabilities.

The Secret Revealer: Generative Model-Inversion Attacks Against Deep Neural Networks Pei participated in the development of the Generative Model-Inversion (GMI) attack, a significant contribution to the field of AI privacy. The research showed that by using GANs to learn a prior distribution from public data, an attacker could successfully invert a target model to extract sensitive information from its private training set. This work highlighted the privacy risks inherent in deep learning models and necessitated the development of more robust data protection mechanisms.

Profile updated

See something wrong? Report a mistake