Dejiao Zhang

Amazon (United States)
2 previous affiliations
29Machine learning papers tracked by Lacuna
Is this you?

Research Overview

Dejiao Zhang focuses on large language models (LLMs), code representation learning, and contrastive learning for sentence and code embeddings. His research bridges the mathematical foundations of non-convex optimization with the practical challenges of scaling generative models, particularly for software engineering applications and cross-lingual natural language processing. Currently a Senior Applied Scientist at AWS AI Labs, Zhang contributes to the development of code intelligence systems, including Amazon CodeWhisperer, through innovations in retrieval-augmented generation and multi-stage embedding training.

Research Trajectory

Zhang’s early research, conducted during his doctoral studies at the University of Michigan, was primarily concerned with the theoretical and algorithmic aspects of high-dimensional data analysis. Between 2013 and 2017, he investigated Online Subspace Learning for High-Dimensional Data Streams, focusing on the robust estimation of low-rank components in the presence of sparse outliers. This work addressed fundamental problems in computer vision, such as image alignment and face recognition, where data is often massive and inconsistently labeled. During this period, he also explored the convergence properties of optimization algorithms on manifolds, contributing to the understanding of Why Gradient Descent Almost Always Avoids Saddle Points in non-convex landscapes. His work on Noise Adaptive Stochastic Optimization further refined the efficiency of stochastic gradient methods by accounting for varying levels of variance in training data.

Following his transition to AWS AI Labs, Zhang’s focus shifted toward natural language processing (NLP) and representation learning. In 2020 and 2021, he led efforts to improve cross-lingual text labeling and sentence embeddings. This phase of his work was characterized by the application of contrastive learning to bridge the gap between logical reasoning and categorical understanding in sentence representations. He also participated in research regarding Recognizing Nested and Overlapping Named Entities, addressing the limitations of traditional flat tagging systems in complex linguistic structures.

Since 2022, Zhang has concentrated on the intersection of LLMs and code. This includes developing specialized embedding models for source code and addressing the challenges of repository-level code completion. His recent work explores Dynamic Retrieval for In-Context Learning and Targeted Model Editing and Incremental Adaptation, focusing on how models can be updated or provided with relevant context without the need for exhaustive retraining.

Current Directions

Zhang’s current research is centered on three primary pillars: code representation learning at scale, contrastive learning for causal language models, and budget-aware reasoning strategies for LLMs.

A significant portion of his recent output involves the CodeSage and SageLite projects. These initiatives aim to create high-performance embedding models that can handle the unique structural properties of source code while maintaining strong performance on natural language tasks. By moving away from standard natural language pretraining heuristics and adopting multi-stage contrastive learning schemes, this work seeks to establish new standards for code search and classification.

Additionally, Zhang is investigating the "discrimination ability" of decoder-only causal language models. By applying contrastive learning at both the token and sequence levels, his research aims to bridge the performance gap between generative models (like GPT-style architectures) and discriminative models (like BERT) in tasks such as semantic search and code similarity. His most recent work in 2024 and 2025 also addresses the evaluation of reasoning strategies in token-constrained environments, reflecting a shift toward the operational efficiency of large-scale AI systems.

Representative Work

Global Convergence of a Grassmannian Gradient Descent Algorithm for Subspace Estimation

In Global Convergence of a Grassmannian Gradient Descent Algorithm for Subspace Estimation, Zhang provides a theoretical analysis of gradient descent methods applied to low-rank matrix factorization. Despite the non-convex nature of the problem, the paper demonstrates that these methods can achieve global convergence when formulated on the Grassmannian manifold. This work contributed to the broader understanding of non-convex optimization in machine learning, specifically how certain geometric structures allow simple first-order methods to avoid local minima and saddle points.

Unsupervised Domain Adaptation for Cross-lingual Text Labeling

In Unsupervised Domain Adaptation for Cross-lingual Text Labeling, Zhang and his collaborators developed a framework for transferring text-labeling models from high-resource languages to low-resource ones without requiring target-language labels. The approach combines the Margin Disparity Discrepancy (MDD) framework with Virtual Adversarial Training (VAT). This research addressed the data scarcity problem in global NLP applications, providing a robust method for cross-lingual document classification and named entity recognition.

Pairwise Supervised Contrastive Learning of Sentence Representations

Zhang led the development of Pairwise Supervised Contrastive Learning of Sentence Representations, also known as PairSupCon. This framework was designed to improve sentence embeddings by integrating Natural Language Inference (NLI) training with instance-based contrastive learning. The model was shown to significantly improve performance in sentence clustering and semantic similarity tasks, effectively bridging the gap between fine-grained logical reasoning and high-level categorical understanding in embedding spaces.

Virtual Augmentation Supported Contrastive Learning of Sentence Representations

In Virtual Augmentation Supported Contrastive Learning of Sentence Representations, Zhang addressed the challenge of data augmentation in NLP. Unlike computer vision, where image rotations or crops provide clear augmentations, the discrete nature of language makes effective augmentation difficult. Zhang proposed VaSCL, which utilizes the neighborhood of training instances to generate virtual augmentations. This method leverages large batch sizes in contrastive learning to construct effective training signals without relying on domain-specific rules for text manipulation.

CODE REPRESENTATION LEARNING AT SCALE

As the lead author of CODE REPRESENTATION LEARNING AT SCALE, Zhang introduced CodeSage, a family of code embedding models reaching up to 1.3 billion parameters. The research identifies that standard natural language pretraining tricks are often suboptimal for code. Instead, CodeSage employs a two-stage training scheme involving structural deobfuscation and "hard" contrastive learning. This approach resulted in models that outperformed existing state-of-the-art encoders in code search and classification tasks.

SageLite: Harmonizing Text and Code Through Multi-Stage Training

In SageLite: Harmonizing Text and Code Through Multi-Stage Training, Zhang extended the CodeSage framework to create a unified embedding model for both text and code. The research addresses the limitations of naive data mixing by using a multi-stage process: initial pretraining on a blended dataset followed by independent, large-scale contrastive learning for each domain. This methodology ensures that the model maintains strong cross-domain performance, which is essential for modern applications involving heterogeneous data sources.

Profile updated

See something wrong? Report a mistake