MCP
HP

Hai Phan

21 papers in the library

Papers

21
Program Structure-aware Language Models: Targeted Software Testing beyond Textual Semantics
Khang TranKhoa NguyenCristian BorceaHai Phan
Recent advances in large language models for test case generation have improved branch coverage via prompt-engineered mutations. However, they still lack principled mechanisms for steering models toward specific high-risk execution branches, limiting their effectiveness for discovering subtle bugs and security vulnerabilities. We propose GLMTest , the first program structure-aware LLM framework for targeted test case generation that seamlessly integrates code property graphs and code semantics using a graph neural network and a language model to condition test case generation on execution branches. This structured conditioning enables controllable and branch-targeted test case generation, thereby potentially enhancing bug and security risk discovery. Experiments on real-world projects show that GLMTest built on a Qwen2.5-Coder-7B-Instruct model improves branch accuracy from 27.4% to 50.2% on TestGenEval benchmark compared with state-of-the-art LLMs, i.e., Claude-Sonnet-4.5 and GPT-4o-mini.
ACL AnthologyACL Anthology · July 2026
0
Logit Grafting: The Post-Training Delta is Sparse, Portable, and Powerful
Apurv VermaBinh-Nguyen NguyenHai PhanLingxiao Wang
This paper introduces logit grafting, a framework that extracts the behavioral change induced by post-training and transfers it to another model. They compute the token-level logit difference between a small post-trained model and its base, then add this delta to a larger target's logits at decode time. Grafting exponentially tilts the target distribution and is shown to be the unique optimizer of a KL-regularized reward objective, making strength α interpretable. Empirically, the delta is sparse, portable, and powerful: it changes 4–13% of tokens, transfers across families (a 1.5B Qwen delta improves LLaMA-3-8B on GSM8K by 15%), and within a family recovers 84–92% of the accuracy gap to a fully post-trained 7B model, sometimes outperforming the donor.
OpenReviewOpenReview · May 7, 2026
0
0
PRPO: Paragraph-level Policy Optimization for Vision-Language Deepfake Detection
Tuan NguyenNaseem KhanKhang TranHai PhanIssa Khalil
PRPO is a reinforcement learning algorithm that aligns multimodal LLM reasoning with visual evidence at the paragraph level for deepfake detection, addressing issues of hallucinatory or misaligned explanations that previously limited LLM performance. The authors introduce a reasoning-annotated dataset and show PRPO improves detection accuracy substantially, achieves a top reasoning score of 4.55/5.0, and outperforms GRPO under test-time conditions, highlighting the value of grounding reasoning in visual evidence for reliable interpretable detection.
OpenReviewOpenReview · · January 23, 2026
0
Gradient Transformer: Learning to Generate Updates for LLMs
Binh-Nguyen NguyenKhang TranHai PhanIssa Khalil
This paper proposes a data-free knowledge distillation framework to improve LLMs on private data without access to that data. The key idea is a Gradient Transformer that learns, from shadow datasets, the mapping between TinyLM and LLM update vectors—vectors of parameter changes from initial to fine-tuned models. This captures TinyLM-to-LLM update correlations, allowing third parties to generate LLM update vectors from a client's TinyLM updates alone. Experiments on language modeling and reasoning show the method surpasses state-of-the-art distillation baselines, even under strict differential privacy. Multi-organization collaboration is also supported.
OpenReviewOpenReview · · January 23, 2026
0
Poison with Style: A Practical Poisoning Attack on Code Large Language Models
Khang TranYazan BoshmafIssa KhalilHai PhanTing YuMd Rizwan Parvez
Poison-with-Style (PwS) is a practical, stealthy poisoning attack on code large language models. Instead of explicit triggers, it uses developers' code styles as covert triggers embedded in prompts. PwS introduces a data collection method and a two-step fine-tuning strategy, making models generate vulnerable code only when the trigger style appears while behaving normally otherwise. On Python completion tasks, it robustly bypasses state-of-the-art defenses, achieving high attack success across vulnerabilities—e.g., 95% CWE-20 generation with trigger style—while keeping under 5% pass@1 drop on HumanEval and MBPP.
OpenReviewOpenReview · · January 18, 2026
0
Watermarking Degrades Alignment in Language Models: Analysis and Mitigation
Apurv VermaHai PhanShubhendu Trivedi
This paper reports that watermarking, which alters token probabilities at inference, degrades the alignment of language models, causing either reduced safety or overly conservative refusals. The effect persists beyond perplexity loss, indicating alignment-specific distortion. To mitigate it, the authors introduce Alignment Resampling (AR), which samples multiple watermarked outputs and selects the most aligned one via an external reward model. Theoretically, they show alignment gains grow sublogarithmically with sample size; practically, two to four samples restore alignment without harming watermark detection.
OpenReviewOpenReview · · November 4, 2025
0
Poisoning LLM-based Code Agents with Styles
Khang TranYazan BoshmafIssa KhalilHai PhanTing YuMd Rizwan Parvez
Poison-with-Style (PwS) is a stealthy poisoning attack against code LLMs that uses developers' code styles as covert triggers implicitly embedded in prompts, avoiding explicit trigger words. PwS introduces a data collection method and a two-step training strategy to fine-tune CLLMs, causing vulnerable code generation only when trigger styles appear, while keeping normal behavior otherwise. On Python completion tasks, it achieves high attack success (e.g., 95% for CWE-20) with only 5% pass@1 drop on HumanEval and MBPP, and resists state-of-the-art defenses.
OpenReviewOpenReview · September 19, 2025
0
2
PRPO: Paragraph-level Policy Optimization for Vision-Language Deepfake Detection
Tuan NguyenNaseem KhanKhang TranHai PhanIssa Khalil
The authors propose Paragraph-level Relative Policy Optimization (PRPO), a reinforcement learning algorithm that aligns multimodal LLM reasoning with visual evidence at the paragraph level for deepfake detection. They introduce a reasoning-annotated dataset and show PRPO improves detection accuracy by a wide margin, reaching a reasoning score of 4.55/5.0, while ablation studies indicate it significantly outperforms GRPO under test-time conditions.
OpenReviewOpenReview · · September 17, 2025
0
FedChip: Federated LLM for Artificial Intelligence Accelerator Chip Design
Mahmoud NazzalKhoa NguyenDeepak VungaralaRamtin ZandShaahin AngiziHai PhanAbdallah Khreishah
FedChip is a federated fine-tuning approach that allows multiple chip design parties to collaboratively train a shared large language model (LLM) for automated hardware design generation without exposing their proprietary data. The authors introduce APTPU-Gen, a dataset of 30k design variations, and a new evaluation metric, Chip@k, which statistically assesses generated designs against predefined acceptance criteria. Experimental results show FedChip improves design quality by over 77% compared to high-end LLMs while preserving data privacy.
arXivarXiv · · July 23, 2025
0
3
δ\delta-STEAL: LLM Stealing Attack with Local Differential Privacy
Kieu DangPhung LaiHai Phanyelong shenRuoming JinAbdallah Khreishah
This paper introduces $\delta$-Steal, a model stealing attack that bypasses LLM service providers' watermark detectors while preserving model utility. The adversary collects input-output training pairs from the target model and adds noise to token embeddings during fine-tuning under local differential privacy (LDP). This noise obfuscates watermark signals, preventing the provider from proving theft. Experiments show attack success up to $96.95\%$, with the LDP noise scale controlling the trade-off between effectiveness and utility, undermining current IP protection.
OpenReviewOpenReview · June 26, 2025
0
Knowledge Consultation for Semi-Supervised Semantic Segmentation
Thuan ThanNhat-Anh Nguyen-DangDung NguyenSalwa K. Al KhatibAhmed ElhagryHai PhanYihui HeZhiqiang ShenMarios SavvidesDang Huynh
To improve semi-supervised semantic segmentation, this work re-examines Cross Pseudo Supervision with dual heterogeneous backbones and introduces Knowledge Consultation (SegKC). SegKC enables the two backbones to consult each other's knowledge during training, producing more consistent pseudo labels. The method achieves 87.1%, 89.2%, and 89.8% mIoU on Pascal VOC with 1/4, 1/2, and full labeled splits, while keeping a compact model.
arXivarXiv · · March 12, 2025
0
2
Watermarking Degrades Alignment in Language Models: Analysis and Mitigation
Apurv VermaHai PhanShubhendu Trivedi
This paper systematically analyzes how Gumbel and KGW watermarking affect alignment (truthfulness, safety, helpfulness) in four aligned LLMs, revealing two degradation patterns—guard attenuation and guard amplification—arising from token-distribution shifts that expose tensions among alignment objectives. To mitigate this, they propose Alignment Resampling (AR), an inference-time method using an external reward model to restore alignment, with a theoretical lower bound on expected reward improvement as sample size grows. Empirically, 2–4 watermarked generations suffice to recover or surpass baseline alignment, with a modified Gumbel implementation maintaining detectability while supporting AR.
OpenReviewOpenReview · · February 3, 2025
0
Operationalizing a Threat Model for Red-Teaming Large Language Models (LLMs)
Apurv VermaSatyapriya KrishnaSebastian GehrmannMadhavan SeshadriAnu PradhanJohn A. DoucetteDavid RabinowitzLeslie BarrettTom AultHai Phan
This paper operationalizes a threat model for red-teaming large language models by delivering a systematization of knowledge of attacks. It develops an attack taxonomy organized by stages of the LLM development and deployment process, draws insights from prior research, and compiles defensive methods and practical red-teaming strategies. The work frames prominent attack motifs and entry points, offering a framework aimed at improving the security and robustness of LLM-based systems.
OpenReviewOpenReview · · October 14, 2024
0
Federated Joint Learning of Robot Networks in Stroke Rehabilitation
Xinyu JiangYibei GuoMengsha HuRuoming JinHai PhanJay AlbertsRui Liu
Federated joint learning (FJL) is introduced to train rehabilitation robots across hospitals without sharing patient data, addressing data scarcity caused by privacy concerns. FJL uses an LSTM-Transformer mechanism to model tempo-spatial relations between patient mobility and robotic motions. Validated on 200 stroke patients' data and 300,000 simulated robot guidances, FJL outperforms baselines by 20–30% in joint rehabilitation learning.
arXivarXiv · · March 8, 2024
0
5
Fast and Interpretable Face Identification for Out-Of-Distribution Data Using Vision Transformers
Hai PhanCindy LeVu LeYihui HeAnh Totti Nguyen
This paper introduces a two-image Vision Transformer (ViT) that compares faces at the patch level using cross-attention, bypassing the costly optimal-transport re-ranking of DeepFace-EMD. Trained on 2M CASIA Webface pairs, the model achieves comparable accuracy on out-of-distribution data (e.g., occluded faces) while being more than twice as fast ($O(n^2)$ vs. $O(n^3 \log n)$). It also offers explainability through cross-attention visualization.
arXivarXiv · · November 6, 2023
0
20
How to Backdoor HyperNetwork in Personalized Federated Learning?
Phung LaiHai PhanIssa KhalilAbdallah KhreishahXintao Wu
This paper introduces HNTroj, the first model transferring attack targeting backdoor risks in HyperNet-based personalized federated learning (HyperNetFL). By sending consistent malicious local gradients from all compromised clients throughout training, HNTroj transfers a local backdoor-infected model to all legitimate personalized local models generated by HyperNetFL, reducing the required number of compromised clients without observable utility degradation, making it stealthy. Adapted robust training algorithms fail to defend against it in experiments, where HNTroj outperforms data poisoning and model replacement attacks across benchmark datasets.
OpenReviewOpenReview · · August 30, 2023
0
DeepFace-EMD: Re-ranking Using Patch-wise Earth Mover's Distance Improves Out-Of-Distribution Face Identification
Hai PhanAnh Nguyen
DeepFace-EMD improves out-of-distribution face identification by re-ranking initial cosine-similarity results with a patch-wise Earth Mover’s Distance (EMD) computed on deep spatial features. This extra comparison stage matches facial regions (e.g., eye to eye) at a fine-grained level, making the method more robust to perturbations such as masks, crops, rotations, and adversarial attacks. Without finetuning the feature extractor, the approach consistently boosts accuracy on all tested out-of-distribution queries while maintaining in-distribution performance.
arXivarXiv · · December 7, 2021
0
46
A New Rapid Test to End COVID
Mark Ralph BakerFleur ConwayFilippo Dal BenElizabeth Lucinda HawthorneLicia IacovielloA AgodiSaquib MukhtarHai PhanYemurai RabvukwaJessica R Rogge
Despite high vaccination and frequent lateral flow testing, the UK's reproduction number remains near 1 and up to 30% of infected individuals develop Long Covid. CLDC, a rapid test with 98%+ sensitivity, low cost, and scalability, is presented as a solution to stop the spread of all COVID-19 variants.
arXivarXiv · · December 5, 2021
0
Binarizing MobileNet via Evolution-based Searching
Hai PhanZechun LiuDang HuynhMarios SavvidesKwang-Ting ChengZhiqiang Shen
This paper introduces an evolutionary search method to design efficient binary neural networks for MobileNet. By treating group convolution settings as hyperparameters, the approach first trains a set of baseline binary networks with random group combinations, then uses evolutionary search to select the best configuration, and finally trains the chosen model from scratch. The resulting binary network achieves 60.09% Top-1 accuracy on ImageNet, surpassing the state-of-the-art CI-BCNN at the same computational cost.
arXivarXiv · · May 13, 2020
0
70
MoBiNet: A Mobile Binary Network for Image Classification
Hai PhanDang HuynhYihui HeMarios SavvidesZhiqiang Shen
MoBiNet binarizes both activations and weights of MobileNet, achieving a compact model that does not require a pre-trained floating-point initialization. The core challenge—training divergence when applying separable depth-wise and point-wise convolutions in a binary network—is addressed by strategically placed skip connections that prevent information loss and vanishing gradients. On ImageNet, MoBiNet reaches 54.40% top-1 accuracy while drastically lowering computational cost through binary operators.
arXivarXiv · · July 29, 2019
0
89
Improving Object Detection from Scratch via Gated Feature Reuse
Zhiqiang ShenHonghui ShiJiahui YuHai PhanRogerio FerisLiangliang CaoDing LiuXinchao WangThomas HuangMarios Savvides
The paper introduces Gated Feature Reuse (GFR), a parameter-efficient module for one-stage detectors trained from scratch. GFR uses a Squeeze-and-Excitation gate to adaptively adjust prediction strength across scales based on object size, and a feature-pyramid structure that compresses spatial and semantic features into a single layer. Applied to DSOD and SSD, it improves detection accuracy on PASCAL VOC and COCO while reducing parameters—e.g., GFR-DSOD outperforms DSOD by up to 1.7% on VOC 2007.
arXivarXiv · · December 4, 2017
0
76
Authors with the same name
Hai Phan · 2 papers
Hai Phan #0001 · 5 papers
Frequent collaborators
Khang Tran (6)
Issa Khalil (6)
Apurv Verma (4)
Zhiqiang Shen (4)
Marios Savvides (4)
Abdallah Khreishah (3)
Yihui He (3)
Dang Huynh (3)
Khoa Nguyen (2)
Binh-Nguyen Nguyen (2)
Tuan Nguyen (2)
Naseem Khan (2)