HSHao Shen

Hao Shen

*This is an algorithmically generated author record based on publicly available information.

Current Organizations / Institutes

The organizations/institutes from the scholar's latest article


Hao Shen has a total of 8 co-authors. Here are the top co-authors by number of shared publications:


Latest Publications

  • Open Access

    Suit the Remedy to the Case: Precise Backdoor Elimination for Text-to-Image Diffusion Models via Model Editing

    by Xianfei Cai, Yanxin Yang, Ming Hu, Hao Shen, Yuejun Jiao, Wei Jiang, Mingsong Chen

    With the widespread adoption of Text-to-Image (T2I) Diffusion Models (DMs) across various applications, their security has attracted increasing attention. In particular, these models are highly vulnerable to backdoor attacks, where adversaries implant hidden triggers during training to manipulate model outputs at inference time. To deal with the backdoor attacks, existing defense methods typically require substantial training data and employ coarse-grained alignment, leading to catastrophic forgetting and semantic degradation, respectively. To defend against backdoor attacks while preventing performance degradation, this paper first analyzes the behavior of poisoned models and finds that i) the neuron activation variation distributions of trigger tokens are significantly different from those of normal tokens, and ii) the embeddings of non-semantic trigger tokens are far from the manifold space constructed by all the normal tokens in the vocabulary. Based on the findings, we propose ManiEdit, a novel model-edit-based backdoor elimination framework for T2I DMs. Specifically, we propose an activation-based module localization methodology to pinpoint the backdoored module by calculating the Neuron Activation Variations (NAV), enabling precise parameter recoupling within restricted areas to safeguard benign parameters from collateral damage. To sever malicious associations and restore the original semantics of triggers, we present a manifold-driven trigger categorization strategy, which detects triggers via NAV within the localized modules, subsequently applying syntactic and geometric constraints to distinguish non-semantic from semantic triggers. By aligning non-semantic triggers with empty prompts and realigning semantic triggers with denoising-optimized semantic anchors, ManiEdit can achieve efficient elimination without expensive retraining. Comprehensive experiments demonstrate the effectiveness of ManiEdit in defending against various state-of-the-art backdoor attack methods.

  • Open Access

    Silence of Commit Messages: An Empirical Study for Vulnerability Commit Message Generation using Large Language Models

    by Hao Shen, Ming Hu, Jiaye Li, Xiaofei Xie, Mingsong Chen

    The vulnerability commit message serves as crucial metadata for maintaining software within version control systems. Nonetheless, manually crafted vulnerability commit messages often lack detail or exhibit inconsistent formatting. Recently, the growing use of Large Language Models (LLMs) for code and natural language comprehension has opened avenues to automate the crafting of these messages. This paper systematically and thoroughly explores the generation of security patch commit messages in the context of LLMs, delving into topics such as dataset construction, evaluation method design, and the relationship between vulnerability types and submission structure. First, we explore the elements of commit messages using LLMs and integrate a questionnaire survey to pinpoint four essential types of information: summary, background, impact, and fix, which are essential for developers. This aims to establish a structured dataset of bug submissions and assess its quality. Next, we examine general automated evaluation techniques for assessing LLM-generated commit messages and find that GPT-3.5's evaluation methods align more closely with human judgment. Then, we conduct an organized investigation into how LLM generation effects vary across three principal vulnerability types, uncovering that LLMs' adaptability differs across vulnerabilities. Furthermore, we perform an exhaustive examination of generation quality across various components and find that LLMs excel at generating summaries but struggle to produce impact details. In particular, the smallest DeepSeek-Coder shows a semantic retention advantage in crafting backgrounds, whereas DeepSeek-V3 struggles with impact aspects. Lastly, we investigate the effects of different prompting strategies (e.g., zero-shot, few-shot prompts) and parameter settings (e.g., temperature and top_p) on the quality of commit message generation, finding that prompt and parameter configurations critically influence output quality, with model sensitivity varying.

  • Open Access

    Separate Bombs from Firecrackers: Intention-guided Vulnerability Assessment via LLM

    by Hao Shen, Ming Hu, Xiaofei Xie, Jiaye Li, Mingsong Chen

    Although modern vulnerability detection tools enable developers to efficiently identify numerous security flaws, indiscriminate remediation efforts often result in unnecessary development expenses. This is particularly true given that a substantial portion of detected vulnerabilities are either lowly exploitable or have a negligible impact in practical operational environments. Consequently, vulnerability severity assessment has emerged as a critical component in optimizing software development efficiency. Existing vulnerability assessment methods typically rely on manually crafted descriptions associated with source code artifacts. However, due to variability in description quality and subjectivity in intention interpretation, the performance of these methods is seriously limited. To address this issue, this paper introduces VulStamp, a novel intention-guided framework that facilitates description-free vulnerability assessment. Specifically, VulStamp employs static analysis in conjunction with a Large Language Model (LLM) to extract the intention information from vulnerable code. Based on the intention information, VulStamp employs a prompt-tuned model for vulnerability assessment. Furthermore, to mitigate the problem of imbalanced data associated with vulnerability types, VulStamp integrates a Reinforcement Learning (RL)-based prompt-tuning method to train the assessment model. Extensive experimental results demonstrate that VulStamp outperforms the state-of-the-art baselines by an average of 12.9%, 102.6%, 18.3%, and 54.1% in terms of AUC, precision, recall, and F1-score, respectively.