Hanyu Wang
2026
PibE-MPP: A Play-it-by-Ear Masking Performance Plug-in for LLMs
Mengwei Wang | Simin Niu | Xun Liang | Yuefeng Ma | Sensen Zhang | Jiawei Yang | Shichao Song | Hanyu Wang | Huayi Lai
Findings of the Association for Computational Linguistics: ACL 2026
Mengwei Wang | Simin Niu | Xun Liang | Yuefeng Ma | Sensen Zhang | Jiawei Yang | Shichao Song | Hanyu Wang | Huayi Lai
Findings of the Association for Computational Linguistics: ACL 2026
Treating random masking as a performance plug-in for large language models (LLMs) offers three advantages: low coupling to the task, the model, and training resources. However, the critical drawback is that its gains are highly stochastic. Motivated by this, we propose play-it-by-ear masking performance plug-in (PibE-MPP), which enables LLMs to adaptively select masking target combinations for each task, retaining these advantages and mitigating the drawback. Specifically, we pose two core questions—what are the masking targets and what is the masking strategy under 7 constraints obtained from these advantages and a drawback. For the first question, we select all attention heads in the last layer as masking targets by constructing a first-order Markov process with alternating hidden state and information fusion. The feasibility of this target is validated by random masking experiments. For the second question, we first construct a small yet interpretable candidate set by proposing a three-axis mapping and a mean-based criterion for fusion features of masking targets. We then propose an axis-variance minimization to select a compact masking-target combination, reducing sensitivity to outlier targets. Experiments on 6 LLMs (Qwen and LLaMA) and 24 datasets demonstrate PibE-MPP’s effectiveness and generality, gain stability, and domain performance, and verify the necessity of its final module, providing empirical evidence of its transferability across tasks and models. The code is available at https://github.com/wtctcop/PibE-MPP.
RoleCDE: Benchmarking and Mitigating Role–Alignment Trade-offs in Role-Playing Agents
Huayi Lai | Shichao Song | Simin Niu | Hanyu Wang | Jiawei Yang | Zhouxing Wang | Zhiqiang Yin | Xun Liang
Findings of the Association for Computational Linguistics: ACL 2026
Huayi Lai | Shichao Song | Simin Niu | Hanyu Wang | Jiawei Yang | Zhouxing Wang | Zhiqiang Yin | Xun Liang
Findings of the Association for Computational Linguistics: ACL 2026
Role-playing agents(RPAs) are widely used to steer large language models(LLMs) toward role-consistent behavior, yet existing benchmarks mainly evaluate surface-level fidelity and offer limited insight into decision making under role–alignment value conflicts. To address this gap, we introduce RoleCDE, the first benchmark designed to evaluate RPAs under structured conflicts between role-specific values and alignment-oriented constraints. RoleCDE formulates role-aware decision making as cognitive dilemma scenarios, jointly evaluating role–scenario grounding, value conflict resolution, and decision tendencies. The benchmark is constructed at scale, covering approximately 8k diverse role profiles and scenarios and nearly 240k dilemma instances across three difficulty levels and eight role categories. Evaluation of several mainstream LLMs reveals a "Role Value Decoupling" phenomenon, where agents systematically default to alignment- and morality-consistent decisions rather than role-specific values when the two conflict, even under explicit role conditioning. This behavior is largely invariant to dilemma difficulty but varies substantially across role categories. We further show that RoleCDE-based fine-tuning effectively mitigates this decoupling by improving value trade-off reasoning, while preserving general role-playing fidelity and general reasoning performance. Code is available at: https://github.com/rabbitrose/RoleCDE.
2025
SafeRAG: Benchmarking Security in Retrieval-Augmented Generation of Large Language Model
Xun Liang | Simin Niu | Zhiyu Li | Sensen Zhang | Hanyu Wang | Feiyu Xiong | Zhaoxin Fan | Bo Tang | Jihao Zhao | Jiawei Yang | Shichao Song | Mengwei Wang
Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
Xun Liang | Simin Niu | Zhiyu Li | Sensen Zhang | Hanyu Wang | Feiyu Xiong | Zhaoxin Fan | Bo Tang | Jihao Zhao | Jiawei Yang | Shichao Song | Mengwei Wang
Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
The indexing-retrieval-generation paradigm of retrieval-augmented generation (RAG) has been highly successful in solving knowledge-intensive tasks by integrating external knowledge into large language models (LLMs). However, the incorporation of external and unverified knowledge increases the vulnerability of LLMs because attackers can perform attack tasks by manipulating knowledge. In this paper, we introduce a benchmark named SafeRAG designed to evaluate the RAG security. First, we classify attack tasks into silver noise, inter-context conflict, soft ad, and white Denial-of-Service. Next, we construct RAG security evaluation dataset (i.e., SafeRAG dataset) primarily manually for each task. We then utilize the SafeRAG dataset to simulate various attack scenarios that RAG may encounter. Experiments conducted on 14 representative RAG components demonstrate that RAG exhibits significant vulnerability to all attack tasks and even the most apparent attack task can easily bypass existing retrievers, filters, or advanced LLMs, resulting in the degradation of RAG service quality. Code is available at: https://github.com/IAAR-Shanghai/SafeRAG.
MoC: Mixtures of Text Chunking Learners for Retrieval-Augmented Generation System
Jihao Zhao | Zhiyuan Ji | Zhaoxin Fan | Hanyu Wang | Simin Niu | Bo Tang | Feiyu Xiong | Zhiyu Li
Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
Jihao Zhao | Zhiyuan Ji | Zhaoxin Fan | Hanyu Wang | Simin Niu | Bo Tang | Feiyu Xiong | Zhiyu Li
Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
Retrieval-Augmented Generation (RAG), while serving as a viable complement to large language models (LLMs), often overlooks the crucial aspect of text chunking within its pipeline. This paper initially introduces a dual-metric evaluation method, comprising Boundary Clarity and Chunk Stickiness, to enable the direct quantification of chunking quality. Leveraging this assessment method, we highlight the inherent limitations of traditional and semantic chunking in handling complex contextual nuances, thereby substantiating the necessity of integrating LLMs into chunking process. To address the inherent trade-off between computational efficiency and chunking precision in LLM-based approaches, we devise the granularity-aware Mixture-of-Chunkers (MoC) framework, which consists of a three-stage processing mechanism. Notably, our objective is to guide the chunker towards generating a structured list of chunking regular expressions, which are subsequently employed to extract chunks from the original text. Extensive experiments demonstrate that both our proposed metrics and the MoC framework effectively settle challenges of the chunking task, revealing the chunking kernel while enhancing the performance of the RAG system.
2024
Controlled Text Generation for Large Language Model with Dynamic Attribute Graphs
Xun Liang | Hanyu Wang | Shichao Song | Mengting Hu | Xunzhi Wang | Zhiyu Li | Feiyu Xiong | Bo Tang
Findings of the Association for Computational Linguistics: ACL 2024
Xun Liang | Hanyu Wang | Shichao Song | Mengting Hu | Xunzhi Wang | Zhiyu Li | Feiyu Xiong | Bo Tang
Findings of the Association for Computational Linguistics: ACL 2024
Controlled Text Generation (CTG) aims to produce texts that exhibit specific desired attributes. In this study, we introduce a pluggable CTG framework for Large Language Models (LLMs) named Dynamic Attribute Graphs-based controlled text generation (DATG). This framework utilizes an attribute scorer to evaluate the attributes of sentences generated by LLMs and constructs dynamic attribute graphs. DATG modulates the occurrence of key attribute words and key anti-attribute words, achieving effective attribute control without compromising the original capabilities of the model. We conduct experiments across four datasets in two tasks: toxicity mitigation and sentiment transformation, employing five LLMs as foundational models. Our findings highlight a remarkable enhancement in control accuracy, achieving a peak improvement of 19.29% over baseline methods in the most favorable task across four datasets. Additionally, we observe a significant decrease in perplexity, markedly improving text fluency.