Yihui Zhang

Author directory

2026

Entity-fact unlearning in large language models (LLMs) aims to remove the binding between a target entity and a forgotten fact, producing a model that behaves like one retrained without the forgotten data while preserving neighboring knowledge and overall model utility. We frame this problem as distribution shaping: such a retrained model would yield a plausible distribution at forget queries, fluent, semantically appropriate, and reflective of residual knowledge, which we take as the appropriate target. Existing objectives provide only narrow token-level or semantically uninformative supervision, falling short of this target. We propose Counterfactual Self-Distillation (CSD), a self-distillation framework that approximates the retrained distribution by constructing a counterfactual teacher through type-consistent entity substitution. The resulting teacher is decoupled from the target identity while preserving type-level relational structure, enabling directed probability reallocation without an external oracle. Experiments on TOFU and RWKU show that CSD achieves a strong forget-utility trade-off, including the best overall forgetting on RWKU and strong performance on TOFU.

2025

Large language models (LLMs) exhibit impressive language capabilities but remain vulnerable to malicious prompts and jailbreaking attacks. Existing knowledge editing methods for LLM detoxification face two major challenges. First, they often rely on entity-specific localization, making them ineffective against adversarial inputs without explicit entities. Second, these methods suffer from over-editing, where detoxified models reject legitimate queries, compromising overall performance. In this paper, we propose ToxEdit, a toxicity-aware knowledge editing approach that dynamically detects toxic activation patterns during forward propagation. It then routes computations through adaptive inter-layer pathways to mitigate toxicity effectively. This design ensures precise toxicity mitigation while preserving LLMs’ general capabilities. To more accurately assess over-editing, we also enhance the SafeEdit benchmark by incorporating instruction-following evaluation tasks. Experimental results on multiple LLMs demonstrate that our ToxEdit outperforms previous state-of-the-art methods in both detoxification performance and safeguarding general capabilities of LLMs.