Arrow Research search

Author name cluster

Junfeng Yang

Possible papers associated with this exact author name in Arrow. This page groups case-insensitive exact name matches and is not a full identity disambiguation profile.

17 papers
2 author rows

Possible papers

17

ICML Conference 2025 Conference Paper

EditLord: Learning Code Transformation Rules for Code Editing

  • Weichen Li
  • Albert Jan
  • Baishakhi Ray
  • Junfeng Yang
  • Chengzhi Mao
  • Kexin Pei

Code editing is a foundational task in software development, where its effectiveness depends on whether it introduces desired code property changes without changing the original code’s intended functionality. Existing approaches often formulate code editing as an implicit end-to-end task, omitting the fact that code-editing procedures inherently consist of discrete and explicit steps, and thus suffer from suboptimal performance and lack of robustness and generalization. We introduce EditLord, a code editing framework that makes the code transformation steps explicit. Our key insight is to employ a language model (LM) as an inductive learner to extract code editing rules from the training code pairs as concise meta-rule sets. Such rule sets will be manifested for each training sample to augment them for finetuning or assist in prompting- and iterative-based code editing. EditLord outperforms the state-of-the-art by an average of 22. 7% in editing performance and 58. 1% in robustness while achieving 20. 2% higher functional correctness, across critical software engineering and security applications, LM models, and editing modes.

ICML Conference 2025 Conference Paper

Efficient Curvature-Aware Hypergradient Approximation for Bilevel Optimization

  • Youran Dong
  • Junfeng Yang
  • Wei Yao
  • Jin Zhang

Bilevel optimization is a powerful tool for many machine learning problems, such as hyperparameter optimization and meta-learning. Estimating hypergradients (also known as implicit gradients) is crucial for developing gradient-based methods for bilevel optimization. In this work, we propose a computationally efficient technique for incorporating curvature information into the approximation of hypergradients and present a novel algorithmic framework based on the resulting enhanced hypergradient computation. We provide convergence rate guarantees for the proposed framework in both deterministic and stochastic scenarios, particularly showing improved computational complexity over popular gradient-based methods in the deterministic setting. This improvement in complexity arises from a careful exploitation of the hypergradient structure and the inexact Newton method. In addition to the theoretical speedup, numerical experiments demonstrate the significant practical performance benefits of incorporating curvature information.

ICLR Conference 2025 Conference Paper

I Can Hear You: Selective Robust Training for Deepfake Audio Detection

  • Zirui Zhang
  • Wei Hao
  • Aroon Sankoh
  • William Lin
  • Emanuel Mendiola-Ortiz
  • Junfeng Yang
  • Chengzhi Mao

Recent advances in AI-generated voices have intensified the challenge of detecting deepfake audio, posing risks for scams and the spread of disinformation. To tackle this issue, we establish the largest public voice dataset to date, named DeepFakeVox-HQ, comprising 1.3 million samples, including 270,000 high-quality deepfake samples from 14 diverse sources. Despite previously reported high accuracy, existing deepfake voice detectors struggle with our diversely collected dataset, and their detection success rates drop even further under realistic corruptions and adversarial attacks. We conduct a holistic investigation into factors that enhance model robustness and show that incorporating a diversified set of voice augmentations is beneficial. Moreover, we find that the best detection models often rely on high-frequency features, which are imperceptible to humans and can be easily manipulated by an attacker. To address this, we propose the F-SAT: Frequency-Selective Adversarial Training method focusing on high-frequency components. Empirical results demonstrate that using our training dataset boosts baseline model performance (without robust training) by 33%, and our robust training further improves accuracy by 7.7% on clean samples and by 29.3% on corrupted and attacked samples, over the state-of-the-art RawNet3 model.

I&C Journal 2025 Journal Article

Towards a theoretical understanding of why local search works for clustering with fair-center representation

  • Zhen Zhang
  • Junfeng Yang
  • Limei Liu
  • Xuesong Xu
  • Guozhen Rong
  • Qilong Feng

The representative k-median problem generalizes the classical clustering formulations in that it partitions the data points into ℓ disjoint demographic groups and imposes a lower-bound constraint on the number of opened facilities from each group, such that all the groups are fairly represented by the opened facilities. Due to its simplicity, the local-search heuristic, which iteratively swaps a bounded number of closed facilities for the same number of opened ones to improve the solution, has been frequently used in the representative k-median problem. It is known that the local-search heuristic, when restricted to constant-size swaps, yields a constant-factor approximation if ℓ = 2, and has an unbounded approximation ratio if ℓ is super-constant. However, for any constant ℓ > 2, the existence of a constant-factor approximation under constant-size swaps remained an open question for a long time. In response to this question, we demonstrate that the local-search heuristic guarantees a ( 4 ℓ + 5 ) -approximation when up to ℓ ( ℓ + 1 ) facilities are allowed to be swapped in each iteration, thus providing an affirmative answer to the question. Our main technical contribution is a novel approach for theoretically analyzing the local-search heuristic, which bounds its approximation ratio by linearly combining the clustering cost increases induced by a set of hierarchically organized swaps. Our techniques also generalize to the k-means clustering formulation and reveal similar approximation guarantees for the local-search heuristic.

ICML Conference 2024 Conference Paper

Exploiting Code Symmetries for Learning Program Semantics

  • Kexin Pei
  • Weichen Li
  • Qirui Jin
  • Shuyang Liu
  • Scott Geng
  • Lorenzo Cavallaro
  • Junfeng Yang
  • Suman Jana

This paper tackles the challenge of teaching code semantics to Large Language Models (LLMs) for program analysis by incorporating code symmetries into the model architecture. We introduce a group-theoretic framework that defines code symmetries as semantics-preserving transformations, where forming a code symmetry group enables precise and efficient reasoning of code semantics. Our solution, SymC, develops a novel variant of self-attention that is provably equivariant to code symmetries from the permutation group defined over the program dependence graph. SymC obtains superior performance on five program analysis tasks, outperforming state-of-the-art code models, including GPT-4, without any pre-training. Our results suggest that code LLMs that encode the code structural prior via the code symmetry group generalize better and faster.

ICLR Conference 2024 Conference Paper

INViTE: INterpret and Control Vision-Language Models with Text Explanations

  • Haozhe Chen
  • Junfeng Yang
  • Carl Vondrick
  • Chengzhi Mao

Large-scale pre-trained vision foundation models, such as CLIP, have become de facto backbones for various vision tasks. However, due to their black-box nature, understanding the underlying rules behind these models’ predictions and controlling model behaviors have remained open challenges. We present INViTE: a framework for INterpreting Vision Transformer’s latent tokens with Text Explanations. Given a latent token, INViTE retains its semantic information to the final layer using transformer’s local operations and retrieves the closest text for explanation. INViTE enables understanding of model visual reasoning procedure without needing additional model training or data collection. Based on the obtained interpretations, INViTE allows for model editing that controls model reasoning behaviors and improves model robustness against biases and spurious correlations. Our code is available at https://github.com/tonychenxyz/vit-interpret.

NeurIPS Conference 2024 Conference Paper

kGym: A Platform and Dataset to Benchmark Large Language Models on Linux Kernel Crash Resolution

  • Alex Mathai
  • Chenxi Huang
  • Petros Maniatis
  • Aleksandr Nogikh
  • Franjo Ivančić
  • Junfeng Yang
  • Baishakhi Ray

Large Language Models (LLMs) are consistently improving at increasingly realistic software engineering (SE) tasks. In real-world software stacks, significant SE effort is spent developing foundational system software like the Linux kernel. Unlike application-level software, a systems codebase like Linux is multilingual (low-level C/Assembly/Bash/Rust); gigantic (>20 million lines); critical (impacting billions of devices worldwide), and highly concurrent (involving complex multi-threading). To evaluate if machine learning (ML) models are useful while developing such large-scale systems-level software, we introduce kGym (a platform) and kBench (a dataset). The kGym platform provides a SE environment for large-scale experiments on the Linux kernel, including compiling and running kernels in parallel across several virtual machines, detecting operations and crashes, inspecting logs, and querying and patching the code base. We use kGym to facilitate evaluation on kBench, a crash resolution benchmark drawn from real-world Linux kernel bugs. An example bug in kBench contains crashing stack traces, a bug-reproducer file, a developer-written fix, and other associated data. To understand current performance, we conduct baseline experiments by prompting LLMs to resolve Linux kernel crashes. Our initial evaluations reveal that the best performing LLM achieves 0. 72\% and 5. 38\% in the unassisted and assisted (i. e. , buggy files disclosed to the model) settings, respectively. These results highlight the need for further research to enhance model performance in SE tasks. Improving performance on kBench requires models to master new learning skills, including understanding the cause of crashes and repairing faults, writing memory-safe and hardware-aware code, and understanding concurrency. As a result, this work opens up multiple avenues of research at the intersection of machine learning and systems software.

ICML Conference 2024 Conference Paper

MGit: A Model Versioning and Management System

  • Wei Hao
  • Daniel Mendoza
  • Rafael Mendes
  • Deepak Narayanan
  • Amar Phanishayee
  • Asaf Cidon
  • Junfeng Yang

New ML models are often derived from existing ones (e. g. , through fine-tuning, quantization or distillation), forming an ecosystem where models are related to each other and can share structure or even parameter values. Managing such a large and evolving ecosystem of model derivatives is challenging. For instance, the overhead of storing all such models is high, and models may inherit bugs from related models, complicating error attribution and debugging. In this paper, we propose a model versioning and management system called MGit that makes it easier to store, test, update, and collaborate on related models. MGit introduces a lineage graph that records the relationships between models, optimizations to efficiently store model parameters, and abstractions over this lineage graph that facilitate model testing, updating and collaboration. We find that MGit works well in practice: MGit is able to reduce model storage footprint by up to 7$\times$. Additionally, in a user study with 20 ML practitioners, users complete a model updating task 3$\times$ faster on average with MGit.

ICLR Conference 2024 Conference Paper

Raidar: geneRative AI Detection viA Rewriting

  • Chengzhi Mao
  • Carl Vondrick
  • Hao Wang 0014
  • Junfeng Yang

We find that large language models (LLMs) are more likely to modify human-written text than AI-generated text when tasked with rewriting. This tendency arises because LLMs often perceive AI-generated text as high-quality, leading to fewer modifications. We introduce a method to detect AI-generated content by prompting LLMs to rewrite text and calculating the editing distance of the output. We dubbed our geneRative AI Detection viA Rewriting method Raidar. Raidar significantly improves the F1 detection scores of existing AI content detection models -- both academic and commercial -- across various domains, including News, creative writing, student essays, code, Yelp reviews, and arXiv papers, with gains of up to 29 points. Operating solely on word symbols without high-dimensional features, our method is compatible with black box LLMs, and is inherently robust on new content. Our results illustrate the unique imprint of machine-generated text through the lens of the machines themselves.

NeurIPS Conference 2024 Conference Paper

SemCoder: Training Code Language Models with Comprehensive Semantics Reasoning

  • Yangruibo Ding
  • Jinjun Peng
  • Marcus J. Min
  • Gail Kaiser
  • Junfeng Yang
  • Baishakhi Ray

Code Large Language Models (Code LLMs) have excelled at tasks like code completion but often miss deeper semantics such as execution effects and dynamic states. This paper aims to bridge the gap between Code LLMs' reliance on static text data and the need for semantic understanding for complex tasks like debugging and program repair. We introduce a novel strategy, monologue reasoning, to train Code LLMs to reason comprehensive semantics, encompassing high-level functional descriptions, local execution effects of individual statements, and overall input/output behavior, thereby linking static code text with dynamic execution states. We begin by collecting PyX, a clean Python corpus of fully executable code samples with functional descriptions and test cases. We propose training Code LLMs not only to write code but also to understand code semantics by reasoning about key properties, constraints, and execution behaviors using natural language, mimicking human verbal debugging, i. e. , rubber-duck debugging. This approach led to the development of SemCoder, a Code LLM with only 6. 7B parameters, which shows competitive performance with GPT-3. 5-turbo on code generation and execution reasoning tasks. SemCoder achieves 79. 3% on HumanEval (GPT-3. 5-turbo: 76. 8%), 63. 6% on CRUXEval-I (GPT-3. 5-turbo: 50. 3%), and 63. 9% on CRUXEval-O (GPT-3. 5-turbo: 59. 0%). We also study the effectiveness of SemCoder's monologue-style execution reasoning compared to concrete scratchpad reasoning, showing that our approach integrates semantics from multiple dimensions more smoothly. Finally, we demonstrate the potential of applying learned semantics to improve Code LLMs' debugging and self-refining capabilities. Our data, code, and models are available at: https: //github. com/ARiSE-Lab/SemCoder.

EAAI Journal 2024 Journal Article

The extended weighted t-norms-based linear hybrid aggregation function and its application for aggregating improved basic uncertain linguistic information

  • Yi Yang
  • Mengqi Jie
  • Yuhan Zhao
  • Limei Liu
  • Junfeng Yang
  • Jie Chen

In recent decades, the Archimedean triangular norm (t-norm) and Archimedean triangular conorm (t-conorm) have been fundamental theories in the design and construction of information aggregation functions. The application of weighted Archimedean t-norm/t-conorm-based aggregation functions has been widely extended to uncertain information environments, such as fuzzy sets and linguistic term sets. However, these functions are susceptible to aggregation failure when dealing with information groups that contain extreme values, leading to unreasonable aggregation results. This paper aims to address the issue of aggregation failure by developing an extended Archimedean t-norm/t-conorm-based linear hybrid aggregation framework. Firstly, the extended weighted Archimedean t-norms and t-conorms that are suitable for processing linguistic term sets are proposed. Furthermore, an aggregation contribution function is introduced to evaluate the impact of both extreme and normal values on aggregated outcomes. This function also facilitates the identification of deficiencies within existing weighted Archimedean t-norm/t-conorm-based aggregation functions. Secondly, building upon the expanded Archimedean t-norm/t-conorm as the foundational framework, a linear weighted hybrid operator is developed by employing an extreme value identification function as guidance. The rationality of this operator is validated through the utilization of previously defined aggregation contribution function. Subsequently, to consolidate improved basic uncertain linguistic information (IBULI) pairs, the proposed hybrid operator is employed for constructing an IBULI-aggregation function. Finally, a product ranking method is developed by integrating the proposed operator and incorporating a user credibility calculation-based approach for converting ratings to IBULIs. The efficacy and rationality of the proposed approach is substantiated through a case study and comparative analysis of car ranking application.

AAAI Conference 2024 Conference Paper

Towards a Theoretical Understanding of Why Local Search Works for Clustering with Fair-Center Representation

  • Zhen Zhang
  • Junfeng Yang
  • Limei Liu
  • Xuesong Xu
  • Guozhen Rong
  • Qilong Feng

The representative k-median problem generalizes the classical clustering formulations in that it partitions the data points into several disjoint demographic groups and poses a lower-bound constraint on the number of opened facilities from each group, such that all the groups are fairly represented by the opened facilities. Due to its simplicity, the local-search heuristic that optimizes an initial solution by iteratively swapping at most a constant number of closed facilities for the same number of opened ones (denoted by the O(1)-swap heuristic) has been frequently used in the representative k-median problem. Unfortunately, despite its good performance exhibited in experiments, whether the O(1)-swap heuristic has provable approximation guarantees for the case where the number of groups is more than 2 remains an open question for a long time. As an answer to this question, we show that the O(1)-swap heuristic (1) is guaranteed to yield a constant-factor approximation solution if the number of groups is a constant, and (2) has an unbounded approximation ratio otherwise. Our main technical contribution is a new approach for theoretically analyzing local-search heuristics, which derives the approximation ratio of the O(1)-swap heuristic via linearly combining the increased clustering costs induced by a set of hierarchically organized swaps.

NeurIPS Conference 2023 Conference Paper

Convolutional Visual Prompt for Robust Visual Perception

  • Yun-Yun Tsai
  • Chengzhi Mao
  • Junfeng Yang

Vision models are often vulnerable to out-of-distribution (OOD) samples without adapting. While visual prompts offer a lightweight method of input-space adaptation for large-scale vision models, they rely on a high-dimensional additive vector and labeled data. This leads to overfitting when adapting models in a self-supervised test-time setting without labels. We introduce convolutional visual prompts (CVP) for label-free test-time adaptation for robust visual perception. The structured nature of CVP demands fewer trainable parameters, less than 1\% compared to standard visual prompts, combating overfitting. Extensive experiments and analysis on a wide variety of OOD visual perception tasks show that our approach is effective, improving robustness by up to 5. 87\% over several large-scale models.

ICML Conference 2023 Conference Paper

Robust Perception through Equivariance

  • Chengzhi Mao
  • Lingyu Zhang
  • Abhishek Vaibhav Joshi
  • Junfeng Yang
  • Hao Wang 0014
  • Carl Vondrick

Deep networks for computer vision are not reliable when they encounter adversarial examples. In this paper, we introduce a framework that uses the dense intrinsic constraints in natural images to robustify inference. By introducing constraints at inference time, we can shift the burden of robustness from training to testing, thereby allowing the model to dynamically adjust to each individual image’s unique and potentially novel characteristics at inference time. Our theoretical results show the importance of having dense constraints at inference time. In contrast to existing single-constraint methods, we propose to use equivariance, which naturally allows dense constraints at a fine-grained level in the feature space. Our empirical experiments show that restoring feature equivariance at inference time defends against worst-case adversarial perturbations. The method obtains improved adversarial robustness on four datasets (ImageNet, Cityscapes, PASCAL VOC, and MS-COCO) on image recognition, semantic segmentation, and instance segmentation tasks.

ICLR Conference 2023 Conference Paper

Understanding Zero-shot Adversarial Robustness for Large-Scale Models

  • Chengzhi Mao
  • Scott Geng
  • Junfeng Yang
  • Xin Wang 0066
  • Carl Vondrick

Pretrained large-scale vision-language models like CLIP have exhibited strong generalization over unseen tasks. Yet imperceptible adversarial perturbations can significantly reduce CLIP's performance on new tasks. In this work, we identify and explore the problem of adapting large-scale models for zero-shot adversarial robustness. We first identify two key factors during model adaption--training losses and adaptation methods--that affect the model's zero-shot adversarial robustness. We then propose a text-guided contrastive adversarial training loss, which aligns the text embeddings and the adversarial visual features with contrastive learning on a small set of training data. We apply this training loss to two adaption methods, model finetuning and visual prompt tuning. We find that visual prompt tuning is more effective in the absence of texts, while finetuning wins in the existence of text guidance. Overall, our approach significantly improves the zero-shot adversarial robustness over CLIP, seeing an average improvement of 31 points over ImageNet and 15 zero-shot datasets. We hope this work can shed light on understanding the zero-shot adversarial robustness of large-scale models.

NeurIPS Conference 2019 Conference Paper

Metric Learning for Adversarial Robustness

  • Chengzhi Mao
  • Ziyuan Zhong
  • Junfeng Yang
  • Carl Vondrick
  • Baishakhi Ray

Deep networks are well-known to be fragile to adversarial attacks. We conduct an empirical analysis of deep representations under the state-of-the-art attack method called PGD, and find that the attack causes the internal representation to shift closer to the ``false'' class. Motivated by this observation, we propose to regularize the representation space under attack with metric learning to produce more robust classifiers. By carefully sampling examples for metric learning, our learned representation not only increases robustness, but also detects previously unseen adversarial samples. Quantitative experiments show improvement of robustness accuracy by up to 4% and detection efficiency by up to 6% according to Area Under Curve score over prior work. The code of our work is available at https: //github. com/columbia/Metric Learning Adversarial_Robustness.

NeurIPS Conference 2018 Conference Paper

Efficient Formal Safety Analysis of Neural Networks

  • Shiqi Wang
  • Kexin Pei
  • Justin Whitehouse
  • Junfeng Yang
  • Suman Jana

Neural networks are increasingly deployed in real-world safety-critical domains such as autonomous driving, aircraft collision avoidance, and malware detection. However, these networks have been shown to often mispredict on inputs with minor adversarial or even accidental perturbations. Consequences of such errors can be disastrous and even potentially fatal as shown by the recent Tesla autopilot crash. Thus, there is an urgent need for formal analysis systems that can rigorously check neural networks for violations of different safety properties such as robustness against adversarial perturbations within a certain L-norm of a given image. An effective safety analysis system for a neural network must be able to either ensure that a safety property is satisfied by the network or find a counterexample, i. e. , an input for which the network will violate the property. Unfortunately, most existing techniques for performing such analysis struggle to scale beyond very small networks and the ones that can scale to larger networks suffer from high false positives and cannot produce concrete counterexamples in case of a property violation. In this paper, we present a new efficient approach for rigorously checking different safety properties of neural networks that significantly outperforms existing approaches by multiple orders of magnitude. Our approach can check different safety properties and find concrete counterexamples for networks that are 10x larger than the ones supported by existing analysis techniques. We believe that our approach to estimating tight output bounds of a network for a given input range can also help improve the explainability of neural networks and guide the training process of more robust neural networks.

v2026.09.13