MCP
JS

Jun Sun

116 papers in the library · Same-name authors told apart using DBLP

Papers

30
Representation Transitions Reveal Emerging Safety Risks in Multi-Turn LLM Agents
Haoyu WangWei ZhaoYedi ZhangChristopher M. PoskittJun Sun
This paper shows that multi-turn attacks on LLM agents leave a signature in internal representations: harmful behavior emerges as an accumulated representation transition across context updates, whose triggering context can be identified from the signal. To address confounding benign drift, the authors denoise the contrastive safety direction by anchoring benign traffic at zero and removing leading variation directions, at no runtime cost. This motivates DART, a runtime framework that detects, attributes, and intervenes on representation shifts. Across six models and two multi-turn benchmarks, DART reduces attack success from 84% to 25% on MT-AgentRisk (catching every attack at 12% mean false alarms) and from 97% to 52% on ASEval (benign non-refusal costs 8% and 0%), outperforming ToolShield on all models (55%). Denoising is critical: undenoised monitors catch only 7%-40% of attacks versus 60%-85% denoised. DART also covers single-turn indirect injection, adds 0.14-0.56 s overhead per step, and needs no auxiliary model.
arXivarXiv · · September 30, 2026
3
Not All Tokens Are Equal: Region-Aware Consistency Repair of Backdoors in MLLMs
Jiali WeiMing FanMingkun ZhangHaoyu WangJun SunGuoheng SunXiaoning RenHaijun WangTing Liu
RACER is a model-level repair framework for removing backdoors from multimodal large language models. It exploits a key observation: backdoors cause abnormal layer-to-layer inconsistency in internal representations, concentrated in the token region encoding the trigger features. The framework decomposes fused representations into visual and textual token regions, normalizes their layer-wise inconsistency separately, and recombines them with modality-aware weights. A min-max optimization then synthesizes worst-case perturbations and adversarially fine-tunes the model to suppress the representational shifts that enable backdoor behavior. RACER requires only 100 clean samples and no knowledge of trigger or attack. Across 36 backdoor settings, it reduces average attack success rate to 1.1% while preserving utility.
arXivarXiv · · August 25, 2026
0
0
Tripwire: Triggering Aligned Refusal via Statistically Certified Safety Neurons
Wei ZhaoZhe LiPeixin ZhangJun Sun
Tripwire is a training-free defense that identifies safety-specific neurons via per-neuron hypothesis tests with false-discovery-rate control plus a utility-specificity filter. It then applies a trigger-style clamp that holds those neurons at their harmful-conditional mean activations, injecting an internal signal that triggers the model's learned refusal behavior. This clamp is realized equivalently as either a detector-gated inference-time intervention or an offline bias-patch weight edit. Experiments on four aligned LLMs show Tripwire reduces attack success rate to at most 2.0% with a utility drop of only 0.5%–5.3% on MT-Bench.
arXivarXiv · · August 14, 2026
1
0
S3S^3: Improving Agent Safety through Multi-Stage Defense
Zibo XiaoHaoyu WangJun Sun
LLM agents operate through multi-stage workflows (e.g., memory, planning, tool execution), where risks can emerge and propagate across stages. Existing safety methods protect only isolated stages and are hard to integrate. This paper introduces Stage-Specific Safety Skills ($S^3$), a unified abstraction that represents heterogeneous safety designs as reusable, composable components with explicit stage semantics. An automated pipeline converts existing safety designs into these skills, and a guard agent orchestrates them for risk detection and mitigation throughout the workflow. Evaluated on the new Multi-Stage Risk Benchmark, $S^3$ outperforms state-of-the-art baselines in both safety and utility.
arXivarXiv · · August 3, 2026
0
0
Correct-by-Construction Design of Timed Systems in Event-B
Guillaume DupontJun Sun
This paper embeds timed-automaton features into Event-B, enabling real-time system design with correct-by-construction refinement. The non-intrusive embedding adds clocks and timing constraints to Event-B models while preserving the method's existing tooling and refinement. This allows timing aspects to be integrated from the top level and refined incrementally, as demonstrated on a case study where timed Event-B models are derived from timed automata and complex timing properties are established.
arXivarXiv · · June 4, 2026
0
0
DDOR: Delta Debugging for Explainable Overrefusal Testing and Repair
Qinyan ZhouPeixin ZhangJun SunHaonan ZhangDongxia Wang
DDOR is a fully automated, black-box framework for testing and repairing overrefusal in LLMs. It applies delta debugging to localize minimal refusal-triggering fragments (mRTFs) that provide phrase-level, explainable evidence for why a benign query is rejected. Conditioned on these mRTFs, DDOR generates diverse test cases and uses multi-oracle validation to filter unsafe ones, producing scalable, model-specific overrefusal suites. It further performs targeted prompt repair using mRTFs, reducing overrefusal while preserving safety on genuinely harmful inputs.
arXivarXiv · · June 2, 2026
0
0
When Medical Safety Alignment Fails: A Benchmark for Evaluating LLMs on High-Risk Medical Queries
Yige LiJun SunWei ZhaoZhe LiYutao WuHanxun HuangXiang ZhengXingjun Ma
MedHarm is a benchmark of 1,100 high-risk medical queries spanning 10 safety-critical categories such as toxicology and anesthesia. Evaluating 15 LLMs and 4 guardrails reveals that aligned models still produce unsafe responses, medical fine-tuning amplifies harmful specificity, and external guardrails reduce some failures but introduce brittle blocking. The benchmark shows that medical safety cannot be inferred from general alignment or medical capability alone.
arXivarXiv · · May 26, 2026
0
0
MuMuTestUp: Mutation-based Multi-Agent Test Case Update
Dawei TianJiakun LiuYun PengYichen ZhangJianlei ChiJun SunXiaohong Su
MuMuTestUp is a mutation-guided multi-agent framework for test case update. It uses three agents: Mutation Analysis strengthens assertions via surviving mutants, Coverage Analysis generates repair instructions for uncovered lines/branches, and Semantic Retrieval handles hallucinations with semantic similarity search. Evaluated on PRBENCH, a new 571-sample pull-request-level dataset from Java projects, it outperforms baselines including GPT-4.1 and Deepseek-V3.2.
arXivarXiv · · May 19, 2026
0
0
Layerwise Convergence Fingerprints for Runtime Misbehavior Detection in Large Language Models
Nay Myat MinLong H. PhamJun Sun
Layerwise Convergence Fingerprinting (LCF) is a tuning-free runtime monitor that detects misbehavior in LLMs by treating the inter-layer hidden-state trajectory as a health signal. It computes a diagonal Mahalanobis distance on every inter-layer difference, aggregates via Ledoit-Wolf shrinkage, and thresholds via leave-one-out calibration on 200 clean examples, requiring no reference model, trigger knowledge, or retraining. Across Llama-3-8B, Qwen2.5-7B, Gemma-2-9B, and Qwen2.5-14B, LCF reduces mean backdoor ASR below 1% on Qwen2.5-7B and Gemma-2, detects 92–100% of DAN jailbreaks, and flags 100% of text-payload injections, at 12–16% backdoor FPR and <0.1% inference overhead.
arXivarXiv · · April 27, 2026
0
0
Train in Vain: Functionality-Preserving Poisoning to Prevent Unauthorized Use of Code Datasets
Yuan XiaoJiaming WangYuchen ChenWei SongJun SunShiqing MaYanzhou MuJuan ZhaiChunrong FangJin Song DongZhenyu Chen
FunPoison is a functionality-preserving poisoning method that protects code datasets from unauthorized use. It inserts short, compilable weak-use fragments into executed code paths, using reusable statement-level templates with automatic repair and safety checking to ensure side-effect freedom, and a type-aware synthesis module to suppress static-analysis warnings. By contaminating only 10% of a dataset, FunPoison achieves effective poisoning while maintaining 100% compilability and functional correctness, and is robust against advanced code sanitization techniques.
arXivarXiv · · April 24, 2026
0
0
The Salami Slicing Threat: Exploiting Cumulative Risks in LLM Systems
Yihao ZhangKai WangJiangrong WuHaolin WuYuxuan ZhouZeming WeiDongxian WuXun ChenJun SunMeng Sun
This paper introduces the Salami Slicing Risk, a new multi-turn jailbreak threat that chains low-risk inputs, each individually harmless, to accumulate harmful intent and trigger unsafe behaviors in LLMs without relying on pre-designed contextual structures. The authors build the Salami Attack, an automatic framework achieving >90% attack success on GPT-4o and Gemini, and propose a defense reducing the attack success by at least 44.8% while blocking up to 64.8% of other multi-turn jailbreaks.
arXivarXiv · · April 13, 2026
1
1
ClawGuard: A Runtime Security Framework for Tool-Augmented LLM Agents Against Indirect Prompt Injection
Wei ZhaoZhe LiPeixin ZhangJun Sun
ClawGuard is a runtime security framework that defends tool-augmented LLM agents against indirect prompt injection. It enforces a user-confirmed rule set at every tool-call boundary, deriving task-specific access constraints from the user's stated objective before any external tool invocation. This deterministic, auditable mechanism intercepts adversarial tool calls from web, local content, MCP server, and skill file injection without model modification or infrastructure change. Experiments on five LLMs across three benchmarks show robust protection without compromising utility.
arXivarXiv · · April 13, 2026
0
27
SafeClaw-R: Towards Safe and Secure Multi-Agent Personal Assistants
Haoyu WangZibo XiaoYedi ZhangChristopher M. PoskittJun Sun
SafeClaw-R enforces safety as a system-level invariant over the execution graph of multi-agent personal assistants, mediating every action before execution and systematically augmenting skills with safe counterparts. This addresses risks from LLM reasoning failures and prompt injection attacks that prior approaches cannot reliably prevent. Evaluated on productivity platforms, third-party skill ecosystems, and code execution, SafeClaw-R achieves 95.2% accuracy in Google Workspace scenarios, 97.8% detection of malicious third-party skills, and 100% accuracy on adversarial code execution benchmarks, demonstrating practical runtime enforcement for autonomous multi-agent systems.
arXivarXiv · · March 28, 2026
0
9
AgentWorm: Self-Propagating Attacks Across LLM Agent Ecosystems
Yihao ZhangZeming WeiXiaokun LuanChengcan WuZhixin ZhangJiangrong WuHaolin WuHuanran ChenJun SunMeng Sun
This paper presents AgentWorm, the first self-replicating worm attack designed for autonomous LLM agent ecosystems. Targeting a production-scale platform, the worm achieves a fully autonomous infection cycle from a single message: it hijacks a victim agent's core configuration for persistent presence, executes an arbitrary payload on each reboot, and propagates to every new peer without further intervention. Evaluated on a controlled testbed across five LLM backends, the attack achieves a 63% aggregate success rate and demonstrates multi-hop propagation. While execution-level filtering mitigates dormant payloads, skill supply chains remain universally vulnerable. The critical controls to break the infection loop are not enabled in any observed deployment. Cross-framework transferability confirms the vulnerability is inherent to the autonomous agent design pattern.
arXivarXiv · · March 16, 2026
1
12
Domain-Specialized Tree of Thought through Plug-and-Play Predictors
Xuanqi GaoHaoyu WangJun SunShiqing MaChao Shen
The paper introduces Domain-Specialized Tree of Thought (DST), a plug-and-play predictor that provides lightweight supervised heuristics to guide the Tree of Thoughts search. It dynamically prunes branches, enabling near-greedy efficiency on simple steps and adaptive beam expansion under uncertainty. Evaluated on math, general, and logical reasoning benchmarks, DST matches or surpasses standard ToT accuracy while reducing computational cost by 26–75%.
arXivarXiv · · March 14, 2026
0
0
Backdoor4Good: Benchmarking Beneficial Uses of Backdoors in LLMs
Yige LiWei ZhaoZhe LiNay Myat MinHanxun HuangYunhan ZhaoXingjun MaYu-Gang JiangJun Sun
Backdoor4Good (B4G) is a benchmark and framework that repurposes backdoor mechanisms—conditional activation via input triggers—for beneficial uses in LLMs. It formalizes beneficial backdoor learning with a triplet $(T, A, U)$ (Trigger, Activation mechanism, Utility function) and implements four trust-centric applications. Experiments on Llama3.1-8B, Gemma-2-9B, Qwen2.5-7B, and Llama2-13B show that such backdoors can achieve high controllability, tamper-resistance, and stealthiness while preserving clean-task performance, demonstrating that backdoors can serve as beneficial building blocks for trustworthy AI.
arXivarXiv · · March 8, 2026
1
0
LLM-enabled Applications Require System-Level Threat Monitoring
Yedi ZhangHaoyu WangXianglin YangJin Song DongJun Sun
This position paper argues that the non-deterministic, learning-driven nature of LLM behavior makes its security risks expected operational conditions, not exceptions. The authors therefore advocate that trustworthy deployment requires system-level threat monitoring to detect and contextualize anomalies after deployment, rather than further improving model capability or relying solely on testing and guardrails. They propose this as a foundation for dedicated incident-response frameworks.
arXivarXiv · · February 23, 2026
0
7
ROMAN: Reward-Orchestrated Multi-Head Attention Network for Autonomous Driving System Testing
Jianlei ChiYuzhen WuJiaxuan HouXiaodong ZhangMing FanSuhui SunWeijun DaiBo LiJianguo SunJun Sun
ROMAN is a scenario generation approach for ADS testing that combines a multi-head attention network with a traffic law weighting mechanism. The attention network models interactions among vehicles and traffic signals, while the weighting mechanism uses an LLM to evaluate violations by severity and occurrence. In experiments with Baidu Apollo in CARLA, ROMAN achieved 7.91% higher average violation count than ABLE and 55.96% higher than LawBreaker, and was the only method to generate violations for every traffic law clause.
arXivarXiv · · February 5, 2026
0
0
CORVUS: Red-Teaming Hallucination Detectors via Internal Signal Camouflage in Large Language Models
Nay Myat MinLong H. PhamHongyu ZhangJun Sun
CORVUS is a red-teaming procedure that reveals a vulnerability in single-pass hallucination detectors for large language models. By fine-tuning lightweight LoRA adapters on the model while keeping the detector fixed, CORVUS camouflages the internal telemetry signals (such as uncertainty and hidden-state geometry) that these detectors rely on. Trained on only 1,000 out-of-distribution instructions, it degrades both training-free and probe-based detectors across multiple model families, demonstrating that detectors assuming separable hallucination traces are insufficient and motivating the need for adversary-aware auditing using external grounding or cross-model evidence.
arXivarXiv · · January 19, 2026
0
1
Rendering Data Unlearnable by Exploiting LLM Alignment Mechanisms
Ruihan ZhangJun Sun
Disclaimer Injection is a data-level defence that renders text unlearnable to large language models by exploiting their own alignment mechanisms. In a black-box setting, the method prepends alignment-triggering disclaimers to text without modifying the training pipeline. Layer-wise analysis shows that fine-tuning on the protected data persistently activates alignment-related layers, causing alignment constraints to override task learning. This leads to substantial and systematic performance degradation compared to standard fine-tuning, offering the first practical method for restricting data learnability at LLM scale.
arXivarXiv · · January 6, 2026
0
2
Developing a Strong CPS Defender: An Evolutionary Approach
Qingyuan HuChristopher M. PoskittJun SunYuqi Chen
Evo-Defender is an evolutionary framework that iteratively strengthens CPS anomaly detection through dynamic attacker-defender interaction. A smart attacker uses guided fuzzing to explore diverse, non-redundant attack strategies, while the self-evolving defender employs incremental learning to adapt to new patterns. On two realistic testbeds with over 600 attack scenarios, Evo-Defender achieves up to 2.7% higher performance than state-of-the-art baselines on unseen scenarios, using training data more efficiently.
arXivarXiv · · December 9, 2025
0
0
Q-MLLM: Vector Quantization for Robust Multimodal Large Language Model Security
Wei ZhaoZhe LiYige LiJun Sun
Q-MLLM introduces a two-level vector quantization bottleneck that discretizes visual representations at both pixel-patch and semantic levels, blocking gradient-based adversarial attacks and bridging the cross-modal safety gap. Without requiring safety-specific fine-tuning, it achieves perfect (100%) defense against jailbreak attacks except one arguable case, while maintaining competitive performance on utility benchmarks with minimal overhead.
arXivarXiv · · November 20, 2025
0
2
AutoBackdoor: Automating Backdoor Attacks via LLM Agents
Yige LiZhe LiWei ZhaoNay Myat MinHanxun HuangXingjun MaJun Sun
AutoBackdoor is an automated framework that uses an LLM agent to generate context-aware trigger phrases, construct poisoned data, and fine-tune models, enabling scalable backdoor attacks with minimal human effort. It achieves over 90% attack success on models like LLaMA-3, Mistral, Qwen, and GPT-4o across three threat scenarios—Bias Recommendation, Hallucination Injection, and Peer Review Manipulation—with few poisoned samples, and existing defenses often fail to mitigate these attacks.
arXivarXiv · · November 20, 2025
1
10
Towards Provably Unlearnable Examples via Bayes Error Optimisation
Ruihan ZhangJun SunEe-Peng LimPeixin Zhang
The paper introduces a method to construct provably unlearnable examples by maximizing the Bayes error, the irreducible classification error. Unlike prior heuristic approaches, it provides a formal guarantee that the Bayes error increases, and remains effective when unlearnable samples are mixed with clean data. The method uses projected gradient ascent for efficient optimization, with experiments across datasets and architectures confirming the theoretical analysis.
arXivarXiv · · November 11, 2025
0
3
Generalized Security-Preserving Refinement for Concurrent Systems
Huan SunDavid SanánJingyi WangYongwang ZhaoJun SunWenhai Wang
This work presents a generalized security-preserving refinement technique for verifying information flow security (IFS) of concurrent systems under complex security policies such as intransitive noninterference. The key idea is a step-mapping relation between implementation and abstraction that ensures each paired step is either permitted or prohibited by the policy. The approach is mechanized in Isabelle/HOL and applied to two case studies, uncovering two covert channels in the ARINC 653 multicore standard and proving the correctness of the revised mechanism.
arXivarXiv · · November 10, 2025
0
1
Rounding-Guided Backdoor Injection in Deep Learning Model Quantization
Xiangxiang ChenPeixin ZhangJun SunWenhai WangJingyi Wang
QuRA is a backdoor attack on deep learning models that exploits the quantization process itself, requiring no data poisoning or training manipulation. It selects critical weights and optimizes their rounding direction to embed a backdoor that activates only after quantization, preserving model accuracy. Experiments show nearly 100% attack success with negligible performance loss, and the attack evades existing defenses, highlighting a security vulnerability in quantization.
arXivarXiv · · October 5, 2025
0
9
Where Did It Go Wrong? Attributing Undesirable LLM Behaviors via Representation Gradient Tracing
Zhe LiWei ZhaoYige LiJun Sun
This paper proposes a framework for attributing undesirable LLM behaviors (e.g., harmful content, bias) to specific training data. Instead of operating on parameter gradients, the method analyzes representation gradients in the model's activation space, yielding a cleaner signal that links outputs to their causal samples. The framework is evaluated on tasks such as tracking harmful content, detecting backdoor poisoning, and identifying knowledge contamination, achieving both sample-level and token-level attribution. This provides a practical diagnostic tool for auditing and mitigating LLM risks.
arXivarXiv · · September 26, 2025
0
2
Correct-By-Construction: Certified Individual Fairness through Neural Network Training
Ruihan ZhangJun Sun
The paper proposes a training framework that formally guarantees individual fairness (outcome equality for individuals differing only in sensitive attributes). The method comprises two parts: a provably fair initialization that starts the model in a fair state, and a fairness-preserving training algorithm that maintains fairness throughout learning. The key technique is a randomized response mechanism applied to sensitive attributes, which is formally proven to sustain individual fairness during training. Experiments show the approach is empirically fair, accurate, and more efficient than verification-based certified training alternatives.
arXivarXiv · · August 21, 2025
0
6
JC-Finder: Detecting Java Clone-based Third-Party Library by Class-level Tree Analysis
Lida ZhaoChaofan LiYueming WuLyuye ZhangJiahui WuChengwei LiuSen ChenYutao HuZhengzi XuYi LiuJingquan GeJun Sun  +1
JC-Finder is a clone-based Software Composition Analysis (SCA) tool for Java that detects third-party library (TPL) reuse introduced by source code clones. It achieves accurate and efficient identification through class-level tree analysis, which captures class-level features, maintains inter-function relationships, and filters out trivial or duplicated elements. Evaluated on 9,965 Maven libraries and 1,000 GitHub projects, JC-Finder attained an F1-score of 0.818, outperforming a function-level tool by 0.427, and processed each project in 14.2 seconds on average. Applied to 7,947 GitHub projects, it found TPL clone reuse in 9.89% of projects and identified 26.20% more TPLs than those declared in package managers.
arXivarXiv · · August 4, 2025
0
1
The Safety Reminder: A Soft Prompt to Reactivate Delayed Safety Awareness in Vision-Language Models
Peiyuan TangHaojie XinXiaodong ZhangJun SunQin XiaZijiang Yang
This paper introduces "The Safety Reminder", a soft prompt tuning method that reactivates safety awareness in Vision-Language Models (VLMs) during text generation. The authors first identify "delayed safety awareness": even when attacked, VLMs eventually recognize harmful content and attempt self-correction, suggesting safety knowledge remains but is temporally inactive. The method trains learnable prompt tokens that are injected periodically when harmful content is detected, reducing attack success rates across three safety benchmarks and one adversarial attack while preserving benign task performance.
arXivarXiv · · June 15, 2025
0
3
Authors with the same name
Jun Sun · 31 papers
Jun Sun #0004 · 5 papers
Jun Sun #0005 · 13 papers
Jun Sun #0008 · 3 papers
Jun Sun #0010 · 1 papers
Jun Sun #0011 · 5 papers
Jun Sun #0012 · 2 papers
Jun Sun #0014 · 4 papers
Jun Sun #0020 · 2 papers
Jun Sun #0026 · 1 papers
Frequent collaborators
Jingyi Wang (19)
Christopher M. Poskitt (17)
Wei Zhao (14)
Long H. Pham (13)
Zhe Li (12)
Peixin Zhang (12)
Jin Song Dong (11)
Yige Li (10)
Yuqi Chen (10)
Xinyu Wang (10)
Guoliang Dong (9)
Haoyu Wang (8)