Skip to main content
QUICK REVIEW

[논문 리뷰] Circuit Breaking: Removing Model Behaviors with Targeted Ablation

Maximilian Xiling Li, Xander Davies|arXiv (Cornell University)|2023. 09. 12.
Adversarial Robustness in Machine Learning인용 수 5
한 줄 요약

이 논문은 언어 모델의 부정적인 행동을 제거하기 위해 모델의 계산 그래프에서 핵심적인 원인 경로를 식별하고 제거하는 '대상 지정 엣지 제거' 기법을 제안한다. GPT-2에서 단지 12개의 엣지만 제거해도 평균적으로 독성 생성을 28% 감소시키고 가장 독성이 강한 프롬프트에서는 40% 감소시키며, 다른 입력에 대한 성능 저하도 최소화한다.

ABSTRACT

Language models often exhibit behaviors that improve performance on a pre-training objective but harm performance on downstream tasks. We propose a novel approach to removing undesirable behaviors by ablating a small number of causal pathways between model components, with the intention of disabling the computational circuit responsible for the bad behavior. Given a small dataset of inputs where the model behaves poorly, we learn to ablate a small number of important causal pathways. In the setting of reducing GPT-2 toxic language generation, we find ablating just 12 of the 11.6K causal edges mitigates toxic generation with minimal degradation of performance on other inputs.

연구 동기 및 목표

  • 피니테이닝 이후에도 지속되는 유해 행동을 제거하는 데 도전하는 것.
  • 관련 없는 작업에 대한 성능 저하 없이 특정 불량 행동만 비활성화하는 방법을 개발하는 것.
  • 계산 그래프의 제거를 통해 악성 행동을 일으키는 최소한의 원인 경로를 식별하는 것.
  • 다른 분리된, 관련 없는 행동에 대한 성능를 유지함으로써 행동 제거의 높은 정밀도를 달성하는 것.
  • 모델의 전체 파라미터를 재학습하거나 수정하지 않는 후기 훈련 편집 접근법을 탐색하는 것.

제안 방법

  • 지정된 해상도에서 모델을 방향성 비순환 그래프(DAG)로 재작성하여 계산을 노드로, 종속성을 간선으로 표현한다.
  • 유해 행동 입력에서 손실이 증가하고 엣지 제거가 허용되지 않도록 하는 미분 가능한 목적함수를 사용해 엣지에 이진 마스크를 학습한다.
  • 추론 중에 선택된 엣지의 원인 영향을 제거하기 위해 0 제거 또는 평균 제거를 적용한다.
  • 유해 행동 입력에서의 손실 증가와 훈련 데이터에서의 성능 유지 사이의 균형을 맞추기 위해 손실 함수를 최적화한다.
  • 소규모 유해 행동 데이터셋에 대한 과적합을 방지하기 위해 조기 정지와 정규화를 사용한다.
  • 모델 가중치를 수정하지 않고 추론 시점에 제거를 적용하여 특정 경로를 비활성화한다.
Figure 1: In targeted ablation, we (1) rewrite our model as a computation graph of a desired granularity, (2) learn a binary mask over edges while regularizing to penalize ablations, and (3) ablate edges at inference time to avoid the target bad behavior.
Figure 1: In targeted ablation, we (1) rewrite our model as a computation graph of a desired granularity, (2) learn a binary mask over edges while regularizing to penalize ablations, and (3) ablate edges at inference time to avoid the target bad behavior.

실험 결과

연구 질문

  • RQ1소수의 대상 지정 엣지 제거가 언어 모델의 특정 불량 행동을 효과적으로 완화할 수 있는가?
  • RQ2유능성과 정밀도 측면에서 타겟 지정 엣지 제거가 피니테이닝과 작업 산술에 비해 어떻게 비교되는가?
  • RQ3원인 경로의 제거가 관련 없는 분리된 작업에서의 성능 저하 없이 악성 행동을 파괴할 수 있는가?
  • RQ4제거의 희소성과 비표적 행동에서의 성능 저하 사이의 상충 관계는 어떠한가?
  • RQ5가중치 기반 편집 또는 활성도 투영 방법에 비해 엣지 제거가 행동 제거에서 더 우수한 성능을 보이는가?

주요 결과

  • GPT-2에서 단지 12개의 엣지만 제거해도 독성 프롬프트에서 평균 독성 점수를 0.458에서 0.328로 낮추어 28%의 상대 감소를 이뤘다.
  • 가장 독성을 유발하는 프롬프트에서는 독성 점수가 0.944에서 0.567로 떨어져 39.9%의 상대 감소를 기록했다.
  • 모든 효능 및 정밀도 지표에서 작업 산술보다 우수했으며, 독성 프롬프트 이후의 비일관성 또한 낮았다.
  • 84개 엣지에 대해 평균 제거를 적용했을 때도 독성 생성의 감소 효과는 유사했으며, 다른 입력에서의 성능 유지에 성공했다.
  • 통합 피니테이닝에 비해 관련 없는 행동에서의 성능 저하가 유의미하게 적어 높은 정밀도를 입증했다.
  • 이 방법은 독성 생성을 일으키는 회로를 통해 최소한의 원인 컷을 성공적으로 식별하여 기계적 원리 기반 접근법의 타당성을 확인했다.
Figure 2: Ablating GPT-2 Small to remove toxicity. Left: Grey nodes are attention heads, and purple nodes are MLPs. Computation proceeds upwards, with horizontal alignment corresponding to layers. The computational graph has 11,611 edges; red edges are the 12 ablations learned to remove toxicity. Ri
Figure 2: Ablating GPT-2 Small to remove toxicity. Left: Grey nodes are attention heads, and purple nodes are MLPs. Computation proceeds upwards, with horizontal alignment corresponding to layers. The computational graph has 11,611 edges; red edges are the 12 ablations learned to remove toxicity. Ri

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.