Fengting Li
Author directory2026
ASP: Adaptive Semantic Preservation for Context Compression
Shaoshen Chen | Peiyang Li | Jiaming Mu | Guixiong Chen | Fengting Li | Chao Feng
Findings of the Association for Computational Linguistics: EMNLP 2026
Shaoshen Chen | Peiyang Li | Jiaming Mu | Guixiong Chen | Fengting Li | Chao Feng
Findings of the Association for Computational Linguistics: EMNLP 2026
Context compression has emerged as a vital approach to mitigate both performance degradation and resource consumption for large language models (LLMs) in long context scenarios. Current state-of-the-art methods allocate the compression budget at fixed-size block granularity, either uniformly or with adaptation across blocks. Both strategies fragment sentence-level semantic units and overlook the relevance variation within each block. In this paper, we propose the Adaptive Semantic Preservation (ASP) compressor, built on two innovations: (1) To preserve semantic units, our Semantic-Preserving Segmentation partitions context along natural sentence boundaries while maintaining the morphological atomicity of words. (2) To prioritize critical information, our task-aware Adaptive Budget Allocation dynamically assigns compression budget based on each sentence’s informational salience for the task instruction. Extensive experiments across diverse long-context scenarios show that ASP outperforms strong task-aware and task-agnostic compression baselines on both Llama-3-8B-Instruct and Qwen-2.5-7B-Instruct. In particular, ASP delivers stronger robustness compared with other baselines even at the extreme 16× high compression ratio.
Staying on Task: Defending Against Prompt Injection via Task Consistency Checking
Feiyue Xu | Jiaming Mu | Fengting Li | Bin Benjamin Zhu | Hongsheng Hu | Qiankun Liu | Shuo Wang | Chaoxiang He | Chao Feng
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Feiyue Xu | Jiaming Mu | Fengting Li | Bin Benjamin Zhu | Hongsheng Hu | Qiankun Liu | Shuo Wang | Chaoxiang He | Chao Feng
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Large language models (LLMs) deployed in real-world applications process heterogeneous inputs, including system prompts, user requests, and external content, exposing them to prompt injection attacks. Existing defenses, including prompt-level safeguards, external filters, and source-aware instruction handling, remain brittle against diverse direct and indirect prompt injection attacks. We propose **CBC** (*Consistency Before Complying*), a task-consistency alignment framework to defend against task-redirection prompt-injection attacks. **CBC** characterizes task consistency through semantic conflicts along action, constraint, and domain dimensions, then uses structured reasoning to determine whether newly introduced instructions are consistent with the original task before acting on them. Using targeted synthetic supervision, we train **CBC** to reason about task consistency and further strengthen this capability through dual-objective online alignment while preserving task utility. Across three model families and a diverse set of direct and indirect prompt-injection benchmarks, **CBC** improves defense success rates by up to 13.2 percentage points over the strongest baseline while better preserving task utility under attack. Our code and models can be found at: https://github.com/XOTaichi/CBC-PI.git