NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Nexus scissor: enhance open-access language model safety by connection pruning

Peihua Mai, Youjia Yang, Ran Yan, Yan PangNpj 2026

Abstract

Large language models (LLMs) are vulnerable to adversarial attacks that bypass safety measures and induce the model to generate harmful content. Securing open-access LLMs against these adversarial attacks is especially challenging due to their offline, unregulated, and often secretive usage. To defend open-access models against a broad spectrum of attacks, it is critical to mitigate their inherent capacity to retrieve malicious responses. Inspired by spreading activation theory, this paper proposes the Nexus Scissor, a framework based on connection pruning, to prevent LLMs from recalling harmful content, thereby bolstering their security against a range of jailbreak attacks. Nexus Scissor severs the link between the malicious target and its immediate harmful knowledge, while maintaining the integrity of the remaining knowledge graph. Empirical analysis demonstrates that our proposed Nexus Scissor effectively enhances the safety of open-access LLMs against various adversarial attacks, with minimal impact on performance across common benchmarks.

Introduction

Open-access Large Language Models (LLMs) such as Llama-3 and Phi-3 offer transparency and accessibility but present significant regulatory challenges. Unlike closed-source models, users can download weights and "adversarially fine-tune" them to remove safety guardrails. While machine unlearning—forcing a model to "forget" harmful data—is a promising defense, traditional methods are often too "blunt." Erasing a concept like "how to build a bomb" can inadvertently degrade the model's ability to discuss related benign topics like "chemical reactions," leading to a significant utility-safety trade-off.

The pitfalls of blunt unlearning: removing entire knowledge clusters can lead to incorrect responses for benign queries.

Nexus Scissor addresses this by "pruning" the specific connections between malicious prompts and harmful knowledge, rather than erasing the knowledge nodes themselves. This approach, inspired by biological synaptic pruning, reduces jailbreak success rates by over 91% while preserving general reasoning capabilities.

Methodology

Nexus Scissor leverages spreading activation theory, treating concepts as nodes in a network. The framework follows a four-stage pipeline:

  1. Extraction: Malicious responses are elicited using established jailbreak attacks (e.g., AutoDAN).
  2. Knowledge Abstraction: These responses are converted into a Knowledge Graph (KG) of (subject, relation, object) triplets. For instance, a guide on identity theft is decomposed into links such as (gather personal info) -> [step of] -> (steal identity).
  3. Clustering: To prevent "over-unlearning," triplets are clustered by semantic similarity. Only representative samples are selected for pruning, ensuring the model isn't over-tuned on redundant data.
  4. Connection Pruning: The model undergoes fine-tuning via gradient ascent on the selected triplets. A KL-divergence constraint is applied to ensure the model's overall distribution remains stable, effectively severing the malicious link while leaving adjacent "knowledge nodes" intact.
Knowledge graph abstraction: decomposing harmful responses into subject-relation-object triplets to identify specific malicious connections.

Experimental Results

The framework was evaluated using AdvBench and the Forbidden Question set (ForbidQ) across 13 prohibited domains. Utility was measured via GLUE Benchmarks.

  • Safety Performance: Across Llama-2, Llama-3, and Phi-3, Nexus Scissor reduced the average Attack Success Rate (ASR) by over 91%.
  • Utility Preservation: General performance on GLUE benchmarks remained within 2% of the original models.
  • Superiority: Compared to naive unlearning, Nexus Scissor achieved a 43% lower ASR and a 5% higher utility score.
  • Robustness: The defense proved resilient against various attack vectors, including genetic algorithms and fine-tuning-based attacks.

Discussion and Future Work

The core innovation of Nexus Scissor is the shift from erasing nodes to severing links. By targeting the "edges" of the knowledge graph, the model maintains a superior utility-safety Pareto frontier. However, some limitations remain. The current method modifies all model parameters; future iterations could benefit from more "surgical" weight editing. Additionally, categories with high semantic overlap between harmful and educational contexts (e.g., political lobbying) remain challenging to prune without affecting benign utility. Refining the mathematical objective function during fine-tuning is a key area for future research to further optimize the balance between safety and performance.

Summary updated

BibTeX
@inproceedings{mai2026nexus,
  author = {Peihua Mai and Youjia Yang and Ran Yan and Yan Pang},
  title = {{Nexus scissor: enhance open-access language model safety by connection pruning}},
  booktitle = {Npj},
  year = {2026},
  doi = {10.1038/s44387-025-00046-2},
}
Figure