Towards Safer Large Language Models through Machine Unlearning

Zheyuan Liu, Guangyao Dou, Zhaoxuan Tan, Yijun Tian, Meng Jiang

arXiv:2402.10058 · 2026-07-27 공개 · arXiv · PDF

llm-evaluation llm-safety machine-unlearning harmful-content model-utility llm-architecture knowledge-removal selective-unlearning

Abstract

The rapid advancement of Large Language Models (LLMs) has demonstrated their vast potential across various domains, attributed to their extensive pretraining knowledge and exceptional generalizability. However, LLMs often encounter challenges in generating harmful content when faced with problematic prompts. To address this problem, existing work attempted to implement a gradient ascent based approach to prevent LLMs from producing harmful output. While these methods can be effective, they frequently impact the model utility in responding to normal prompts. To address this gap, we introduce Selective Knowledge negation Unlearning (SKU), a novel unlearning framework for LLMs, designed to eliminate harmful knowledge while preserving utility on normal prompts. Specifically, SKU is consisted of two stages: harmful knowledge acquisition stage and knowledge negation stage. The first stage aims to identify and acquire harmful knowledge within the model, whereas the second is dedicated to remove this knowledge. SKU selectively isolates and removes harmful knowledge in model parameters, ensuring the model's performance remains robust on normal prompts. Our experiments conducted across various LLM architectures demonstrate that SKU identifies a good balance point between removing harmful information and preserving utility.

한국어 요약

한 줄 요약

SKU는 LLM에서 유해한 지식을 선택적으로 제거하면서 정상 프롬프트에 대한 성능을 유지하는 2단계 언러닝 프레임워크이다.

핵심 기여도

핵심 아이디어

기존의 언러닝 방법은 유해한 출력을 방지하기 위해 그래디언트 오름 방식을 사용했으나, 정상 프롬프트에 대한 모델 성능을 저하시키는 문제가 있었다. SKU는 이 문제를 해결하기 위해 LLM이 유해한 지식을 선택적으로 학습하고, 이후 이를 체계적으로 제거하는 2단계 프레임워크를 제안한다. 첫 번째 단계인 유해 지식 획득 단계는 다양한 유해한 지식을 모델에 강화시켜 쉽게 식별할 수 있도록 한다. 두 번째 단계인 지식 부정 단계는 ‘태스크 벡터 부정’의 개념을 활용해 이 유해한 지식을 제거한다. 이는 기존의 단순한 제거 방식과 달리, 모델의 전체 유틸리티를 유지하면서 유해한 지식을 효과적으로 제거할 수 있다는 점에서 차별화된다.

기술적 접근법

SKU는 다음과 같은 두 단계로 구성된다:

주요 결과

의의 및 한계

SKU는 LLM에서 유해한 지식을 선택적으로 제거하면서 모델의 전체 성능을 유지하는 새로운 접근법을 제시한다. 기존의 RLHF나 그래디언트 기반 언러닝 방식보다 계산 효율적이며, 정상 프롬프트에 대한 성능 저하를 최소화할 수 있다. 그러나 실험 결과는 명시적인 수치 개선 폭이 없어 정량적 평가의 한계가 있다. 또한, 모델 내 유해한 지식의 정의와 식별 기준이 외부 평가자에 따라 달라질 수 있어, 정책적·윤리적 판단에 의존한다는 점도 한계로 지적된다.

실용적 활용

SKU는 언론, 챗봇, 고객 서비스 등에서 LLM의 안전한 사용을 보장하는 데 활용될 수 있다. 특히, 정책 규제가 엄격한 환경에서 유해한 출력을 줄이면서도 모델의 전체 성능을 유지해야 하는 상황에 적합하다.