논문 해설
Detecting and Filtering Unsafe Training Data via Data Attribution with Denoised Representation
노이즈 제거된 표현을 이용한 데이터 기여도 분석 기반의 안전하지 않은 학습 데이터 탐지 및 필터링
- 연구 문제 기존 표현 기반 데이터 어트리뷰션은 토큰 표현 평균에 섞인 중립 토큰의 잡음 때문에 안전하지 않은 훈련 데이터를 충분히 구분하지 못합니다.
- 연구 방법 DRA는 훈련 표현을 중심화·백색화한 뒤 leave-target-out 판별 지수로 차원을 선택하는 방식으로 탐지 점수를 정제합니다.
- 주요 결과 탈옥 실험에서 DRA를 적용한 GradSim과 RepSim은 기준 방법보다 높은 AUPRC를 보였고, 성별 편향 실험에서도 같은 방향의 개선이 보고되었습니다.
안전하지 않은 훈련 데이터를 찾는 문제
대규모 언어 모델은 아주 적은 양의 안전하지 않은 훈련 데이터에도 민감하게 반응합니다. 기존 탐지 방법은 주로 모더레이션 분류기에 의존하는데, 이 분류기는 미리 정한 분류 체계에 묶여 있고 학습과 데이터 수집에 많은 비용이 듭니다. 또한 분류기는 개별 훈련 샘플이 실제로 모델에 주는 영향을 고려하지 않고 문체상 위험한 데이터를 표시하는 경향이 있습니다.
이 논문은 훈련 샘플과 소규모 목표 집합의 유사도를 측정하는 데이터 어트리뷰션 접근을 다룹니다. 목표 집합은 모델이 실제로 생성한 안전하지 않은 출력으로 구성됩니다. 문제는 기존 표현 기반 방법이 토큰 표현을 평균할 때 안전성과 무관한 토큰이 신호를 가린다는 점입니다.
DRA의 잡음 제거와 차원 선택
DRA는 훈련 표현 X의 평균 µX로 중심화하고, 공분산 ΣX의 -1/2 거듭제곱으로 백색화하여 고분산 차원의 영향을 줄입니다. 이 단계에서 얻는 탐지 점수는 목표 평균 µQ를 같은 방식으로 정규화한 내적 형태입니다.

Figure 1 : t-SNE visualization of the raw gradient space of the Llama-3.1-8B-Instruct model with XSTest- injected data (AUPRC = 0.017).
원문 · CC BY 4.0 · Pan, Yijun, Shi, Taiwei, Zhao, Jieyu, Ma, Jiaqi W. · Detecting and Filtering Unsafe Training Data via Data Attribution with Denoised Representation · 원문 그림 인용 · 원본 PDF 13쪽에서 그림 영역을 추출했습니다.다음으로 DRA는 ΣX의 고유분해에서 나온 고유벡터 부분공간 가운데 차원 집합 I를 고릅니다. 선택 기준은 목표 집합 Q를 unsafe 집합 U의 근사로 사용한 leave-target-out 판별 지수 d′LTO입니다. 원문은 후보를 m′개의 상위 고유벡터로 줄인 뒤 크기 r의 부분집합을 고르며, 실험에서 r은 30으로 보고됩니다.

Figure 2 : t-SNE visualization of the whitened PCA dimensions selected by DRA for the Llama-3.1-8B- Instruct model with XSTest-Response-injected data (AUPRC = 0.815).
원문 · CC BY 4.0 · Pan, Yijun, Shi, Taiwei, Zhao, Jieyu, Ma, Jiaqi W. · Detecting and Filtering Unsafe Training Data via Data Attribution with Denoised Representation · 원문 그림 인용 · 원본 PDF 13쪽에서 그림 영역을 추출했습니다.이 판별 지수는 목표 샘플 평균과 훈련 전체 평균의 차이를 훈련 분포의 표준편차로 나눈 값입니다. 원문은 선형 탐지 점수의 최적 가중치가 Σ^(-1)Δ에 비례하고 판별 지수가 ∥Σ^(-1/2)Δ∥를 넘지 않는다고 제시합니다. 다만 µU를 알 수 없으므로 DRA는 µQ로 최적 가중치를 근사하는 plug-in 점수를 사용합니다. 이 근사는 µQ가 µU와 잘 맞는다는 가정에 기대며, 원문은 이 가정을 명시합니다.
탈옥 주입 데이터에서의 탐지와 재학습 결과
탈옥 실험은 DATE-LM 설정을 따르며, UltraChat-200k를 benign 데이터로 두고 ToxicChat과 XSTest-Response의 안전하지 않은 샘플을 주입합니다. 탐지 성능은 AUPRC로 측정합니다.
표 1에서 Llama-3-8B-Instruct의 GradSim은 ToxicChat에서 36.4%, XSTest-Response에서 1.7%를 얻었고, GradSim-DRA는 각각 83.2%와 81.5%를 얻었습니다. RepSim은 56.3%와 88.5%였고 Repsim-DRA는 92.6%와 98.6%였습니다. Gemma-2-9B-it에서도 DRA를 적용한 두 방법이 기준 데이터 어트리뷰션 방법보다 높았습니다.

Table 1 : AUPRC (↑) of baseline models and our proposed method. For each backbone model, the highest AUPRC among data attribution methods is highlighted inbold, while the second highest is underlined. The last column shows the average improvement (∆) of our methods over their respective baselines.
원문 · CC BY 4.0 · Pan, Yijun, Shi, Taiwei, Zhao, Jieyu, Ma, Jiaqi W. · Detecting and Filtering Unsafe Training Data via Data Attribution with Denoised Representation · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.재학습 결과에서 Gemma-2-9B-it의 XSTest-Response ASR은 GradSim 필터링 시 77.0%였고 GradSim-DRA 필터링 시 3.0%였습니다. 이 결과는 상위 샘플을 제거한 뒤 재학습한 특정 설정의 값입니다. 이 설정에서 DRA의 효과는 기준 GradSim에 대해 확인됩니다.

Table 3 :Attack Success Rate(ASR) comparison be- tween models retrained with the top unsafe training samples filtered. A higher ASR reflects a more unsafe model and the lowest ASR for each setting is inbold. The last column shows the average decrease in ASR af- ter applying DRA to baseline data attribution methods.
원문 · CC BY 4.0 · Pan, Yijun, Shi, Taiwei, Zhao, Jieyu, Ma, Jiaqi W. · Detecting and Filtering Unsafe Training Data via Data Attribution with Denoised Representation · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.성별 편향 주입 데이터에서의 결과
성별 편향 실험은 Bias in bios 데이터에서 10,000개 benign 쌍을 샘플링하고 150개의 편향 쌍을 주입하여 구성합니다. 목표 집합은 직업 예측 프롬프트 50개에 대한 성별 편향 응답입니다.
표 5에서 Llama-3-8B-Instruct의 AUPRC는 RepSim 0.333에서 Repsim-DRA 0.748로, GradSim 0.417에서 GradSim-DRA 0.550으로 올라갑니다. 표 6에서 상위 500개 편향 샘플을 제거한 뒤 TPR Gender Gap은 GradSim 0.650에서 GradSim-DRA 0.246으로 낮아집니다. TPR Gender Gap은 값이 낮을수록 편향이 적은 지표입니다.

Table 5 : Gender bias detection AUPRC. The highest AUPRC for each model is highlighted inbold, while the second highest is underlined. The last column reports the change (∆) compared to the corresponding baseline.
원문 · CC BY 4.0 · Pan, Yijun, Shi, Taiwei, Zhao, Jieyu, Ma, Jiaqi W. · Detecting and Filtering Unsafe Training Data via Data Attribution with Denoised Representation · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.
Table 6 :TPR Gender Gapcomparison between models retrained with the top 500 biased samples filtered. A higher TPR Gender Gap indicates a model with more gender bias. The lowest value for each model is high- lighted inbold. The last column reports the change ( ∆) in gender gap when applying DRA to data attribution methods
원문 · CC BY 4.0 · Pan, Yijun, Shi, Taiwei, Zhao, Jieyu, Ma, Jiaqi W. · Detecting and Filtering Unsafe Training Data via Data Attribution with Denoised Representation · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.잡음 제거와 차원 선택의 기여
절제 실험은 Llama-3-8B-Instruct의 GradSim을 기준으로 두 구성요소를 나눠 봅니다. 잡음 제거만 적용하면 XSTest-Response 점수는 21.7이고, 차원 선택만 적용하면 65.5입니다. 두 단계를 함께 적용하면 81.5가 됩니다.

Table 7 : Ablation Studies for DRA across jailbreaking setup
원문 · CC BY 4.0 · Pan, Yijun, Shi, Taiwei, Zhao, Jieyu, Ma, Jiaqi W. · Detecting and Filtering Unsafe Training Data via Data Attribution with Denoised Representation · 원문 그림 인용 · 원본 PDF 14쪽에서 그림 영역을 추출했습니다.이 결과는 두 구성요소 각각이 기준 GradSim의 1.7보다 높은 점수를 만든다는 점을 보여 줍니다. 원문은 두 단계가 상보적이라고 해석합니다. 다만 이 절제 결과는 탈옥 실험의 특정 모델과 데이터 조합에 해당합니다.
적용 범위와 한계
원문은 주입된 훈련 데이터를 단일 분포에서 왔다고 가정하며, 실제 주입 데이터는 더 이질적일 수 있다고 밝힙니다. 또한 훈련 데이터와 목표 데이터가 여러 유해 장르를 포함하므로 이 연구는 세분화된 탐지 분류 체계를 제공하지 않습니다.
결론에서 원문은 그래디언트 기반 방법이 탐지 점수가 낮은 경우에도 가장 안전한 재학습 모델을 만든다고 보고합니다. 이 관찰은 실험한 모델과 데이터셋의 범위 안에서 읽어야 합니다.
논문 정보
- 저자
- Pan, Yijun, Shi, Taiwei, Zhao, Jieyu, Ma, Jiaqi W.
- 학회·저널
- arXiv · 프리프린트
- 최초 공개일
- 2025년 2월 17일
- 등록일
- 2026년 10월 30일
- 수정일
- 2025년 10월 10일
- 버전
- v2
- arXiv
- 2502.11411
- 원문 이용 조건
- CC BY 4.0
- 제공 범위
- 논문 정보, 해설, 허용된 원문 그림
AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.
초록
Large language models (LLMs) are highly sensitive to even small amounts of unsafe training data, making effective detection and filtering essential for trustworthy model development. Current state-of-the-art (SOTA) detection approaches primarily rely on moderation classifiers, which require significant computation overhead for training and are limited to predefined taxonomies. In this work, we explore data attribution approaches that measure the similarity between individual training samples and a small set of unsafe target examples, based on data representations such as hidden states or gradients. We identify a key limitation in existing methods: unsafe target texts contain both critical tokens that make them unsafe and neutral tokens (e.g., stop words or benign facts) that are necessary to form fluent language, and the latter of which makes the overall representations ``noisy'' for the purpose of detecting unsafe training data. To address this challenge, we propose Denoised Representation Attribution (DRA), a novel representation-based data attribution approach that denoises training and target representations for unsafe data detection. Across tasks of filtering jailbreaks and detecting gender bias, the proposed approach leads to significant improvement for data attribution methods, outperforming SOTA methods that are mostly based on moderation classifiers.
원문 인용
Pan, Yijun, Shi, Taiwei, Zhao, Jieyu, Ma, Jiaqi W. (2025). Detecting and Filtering Unsafe Training Data via Data Attribution with Denoised Representation. arXiv:2502.11411v2. https://arxiv.org/abs/2502.11411v2
BibTeX
@misc{yijun2025detecting,
title = {{Detecting and Filtering Unsafe Training Data via Data Attribution with Denoised Representation}},
author = {Pan, Yijun and Shi, Taiwei and Zhao, Jieyu and Ma, Jiaqi W.},
year = {2025},
eprint = {2502.11411},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2502.11411v2}
}