# Feature Squeezing: Detecting Adversarial Examples in Deep Neural Networks

입력을 줄여 적대적 예제를 찾아내는 탐지 방법

Xu, Weilin, Evans, David, Qi, Yanjun · arXiv · 2017년 4월 4일

- **연구 문제** DNN은 사람이 거의 알아채지 못할 작은 변형을 더한 적대적 예제에 쉽게 속습니다. 기존 방어는 모델을 고치느라 비용이 크고 새로운 공격에 약했습니다.
- **연구 방법** Feature squeezing은 입력의 색상 비트를 줄이거나 부드럽게 한 뒤, 원본과 예측 확률 차이가 크면 적대적 예제로 봅니다.
- **주요 결과** MNIST에서 결합 탐지기는 성공한 적대적 예제의 98.15%를 탐지했습니다. CIFAR-10과 ImageNet에서는 각각 84.53%와 85.94%였습니다.

## 적대적 예제의 위협과 탐지의 필요

DNN은 이미지 분류 등에서 높은 성능을 보이지만, 사람이 거의 알아채기 어려운 작은 섭동을 더한 적대적 예제에 쉽게 속습니다. 기존 방어는 주로 모델 자체를 고치는 방향이었고, 적대적 학습은 생성 비용이 크며 학습 때 쓰지 않은 공격에는 취약하다는 한계가 있었습니다. 이 논문은 모델을 바꾸지 않고 입력 쪽에서 적대적 입력을 탐지하는 방법을 다룹니다. 공격자가 한 번이라도 성공하면 치명적인 보안 응용에서는 성공 시도 자체를 탐지하는 것이 중요하다는 문제의식이 깔려 있습니다.

## feature squeezing의 탐지 절차

feature squeezing은 입력이 가질 수 있는 특징 공간을 줄이는 변환을 squeezer로 적용합니다. 원본 입력 x와 squeezed 입력 x\_squeezed에 대해 모델이 출력한 softmax 확률 벡터를 얻고, 두 벡터의 L1 거리 score(x, x\_squeezed)=‖g(x)−g(x\_squeezed)‖1을 계산합니다. 이 거리는 0부터 2까지 값을 가집니다. 여러 squeezer를 함께 쓸 때는 scorejoint = max(score(x, x\_sq1), score(x, x\_sq2), ...)를 사용하며, 최댓값을 취하는 대상은 squeezer들입니다. 정상 입력은 squeezing 후에도 예측이 비슷하고 적대적 입력은 예측이 크게 달라진다는 가정에서 scorejoint를 임계값과 비교합니다.

## 색상 비트 깊이와 공간 평활화

bit depth reduction은 픽셀당 색상 비트를 줄여 값의 해상도를 낮춥니다. i비트로 줄일 때는 입력에 2^(i−1)을 곱해 정수로 반올림한 뒤 2^(i−1)로 나누어 \[0, 1\] 범위로 되돌립니다. non-local smoothing은 더 넓은 영역에서 유사한 패치를 찾아 평균하는 방식으로, 실험에서는 OpenCV의 non-local means 구현을 썼습니다. 이 선택은 입력 이미지 실험에 한정된 것이며, 다른 모달리티에 대한 적용은 원문이 직접 다루지 않습니다.

## squeezer 단독의 강건성과 정확도

MNIST에서 1-bit binary filter는 합법 입력의 테스트 정확도를 99.43%에서 99.33%로 낮췄고, L2와 L∞ 공격 대부분에서 정확도를 크게 회복했습니다. 예를 들어 CW∞ 공격 정확도는 0%에서 100%로 올랐습니다. 다만 L0 공격인 JSMA와 CW0에서는 bit depth 축소가 충분히 작동하지 않았고, 이 경우 median smoothing이 가장 효과적이었습니다. 저자들은 이 squeezer들이 단독 방어로는 충분하지 않다고 봅니다.

## 결합 탐지기의 성능

임계값은 합법 예제만으로 고르며, 합법 입력의 5% 이하가 임계값을 넘도록 설정합니다. MNIST에서 1-bit와 2×2 median smoothing을 결합한 탐지기는 성공한 적대적 예제의 98.15%를 탐지했고 FPR은 3.98%, ROC-AUC는 99.44%였습니다. CIFAR-10과 ImageNet에서 결합 구성은 각각 84.53%와 85.94%의 탐지율을 보고했습니다. 결합 구성은 공격 종류를 미리 알지 못해도 쓸 수 있는 설정을 찾기 위한 것이며, 공격별 최적 단일 squeezer보다 낮은 값을 보이는 경우도 있습니다. 또 FGSM과 BIM은 CIFAR-10과 ImageNet에서 탐지율이 낮게 나타났습니다.

## MagNet과의 비교

MagNet과 비교하면 MNIST에서는 MagNet이 91.77%의 적대적 예제 탐지율을 보여 feature squeezing의 69.08%보다 높았습니다. CIFAR-10에서는 feature squeezing이 60.87%를 기록해 MagNet의 50.36%보다 높았습니다. 두 방법의 FPR은 MNIST에서 0.40%, CIFAR-10에서 1.28%로 맞췄습니다. 저자들은 MagNet이 오토인코더를 학습해야 해 비용이 크다고 지적하며, 이 비용 차이는 탐지율 비교와 함께 읽어야 합니다.

## 적응형 공격에 대한 한계

He 등의 adaptive attack은 CW2 공격에 탐지 점수 페널티를 더해 squeezer를 우회하려 합니다. 이 논문은 MNIST 모델과 결합 탐지기에 이를 적용했고, 임계값 0.0029에서 untargeted 성공률은 68%였습니다. 섭동을 ε=0.3으로 제한하면 targeted 공격의 성공률은 0%, untargeted 공격의 성공률은 1%였습니다. 다만 저자들은 제한 없는 섭동에서의 성공률이 실제 강건성을 보여주지 않는다고 보며, 무작위 binary 임계값을 쓰면 성공률이 낮아진다는 실험을 추가로 보고합니다. 앙상블 적응형 공격은 성공률을 다시 높였지만 이미지가 부자연스러워졌습니다. adaptive attack에 대한 충분한 강건성은 아직 답하지 못한 질문입니다.

## 논문 정보

- **저자**: Xu, Weilin, Evans, David, Qi, Yanjun
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2017년 4월 4일
- **등록일**: 2026년 11월 12일
- **수정일**: 2017년 12월 5일
- **버전**: v2
- **arXiv**: 1704.01155
- **DOI**: 10.14722/ndss.2018.23198
- **분류**: cs.CV · cs.CR · cs.LG
- **원문 이용 조건**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **제공 범위**: 논문 정보, 해설

[논문 원문 ↗](https://arxiv.org/abs/1704.01155v2) · [원문 PDF ↗](https://arxiv.org/pdf/1704.01155v2)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 원문 인용

Xu, Weilin, Evans, David, Qi, Yanjun (2017). Feature Squeezing: Detecting Adversarial Examples in Deep Neural Networks. arXiv:1704.01155v2. https://doi.org/10.14722/ndss.2018.23198

**BibTeX**

```
@article{weilin2017feature,
  title = {{Feature Squeezing: Detecting Adversarial Examples in Deep Neural Networks}},
  author = {Xu, Weilin and Evans, David and Qi, Yanjun},
  year = {2017},
  eprint = {1704.01155},
  archivePrefix = {arXiv},
  doi = {10.14722/ndss.2018.23198},
  url = {https://arxiv.org/abs/1704.01155v2}
}
```

## 이 논문의 용어

- [Imagenet](https://refivu.com/terms/5eadad128667-imagenet)
- [MNIST](https://refivu.com/terms/28b9bb66d1c6-mnist)
- [CIFAR-10](https://refivu.com/terms/19035a518d0a-cifar-10)
- [success rate](https://refivu.com/terms/0964df1dc5eb-success-rate)
- [adversarial training](https://refivu.com/terms/79bc85d56747-adversarial-training)
- [ROC-AUC](https://refivu.com/terms/4a16e24a9f10-roc-auc)
- [DenseNet](https://refivu.com/terms/43ab92ad19d5-densenet)
- [fast gradient sign method](https://refivu.com/terms/75749bc5431d-fast-gradient-sign-method)
- [Basic Iterative Method](https://refivu.com/terms/02f796a74a29-basic-iterative-method)
- [detection rate](https://refivu.com/terms/dcd10e61ed08-detection-rate)
- [false positive rate](https://refivu.com/terms/902ec4a8638c-false-positive-rate)
- [L1 norm](https://refivu.com/terms/1faa17b8382d-l1-norm)
- [gradient masking](https://refivu.com/terms/ec5153e5264a-gradient-masking)
- [DeepFool](https://refivu.com/terms/60b20595f296-deepfool)
- [defensive distillation](https://refivu.com/terms/b6e09e50ff14-defensive-distillation)
- [MagNet](https://refivu.com/terms/7f05672b52f5-magnet)
- [adaptive attack](https://refivu.com/terms/a133c7ff378e-adaptive-attack)
- [adversarial example](https://refivu.com/terms/8e3d7b9203bd-adversarial-example)
- [feature squeezing](https://refivu.com/terms/4b3ae49ff599-feature-squeezing)
- [JSMA](https://refivu.com/terms/966f0db5a084-jsma)

## 다른 논문 해설

- [Towards Principled Methods for Training Generative Adversarial Networks](https://refivu.com/papers/b0f4dfa6-159a-4785-ba9c-7a882bcab62f-towards-principled-methods-for-training-generative.md)
- [Diffusion Models: A Comprehensive Survey of Methods and Applications](https://refivu.com/papers/88553d75-09f1-48d0-a32d-bbb93fe0b6e8-diffusion-models-a-comprehensive-survey-of-methods-and.md)
- [DreamFusion: Text-to-3D using 2D Diffusion](https://refivu.com/papers/8748788c-c1b0-47b9-a624-78c1f27630e6-dreamfusion-text-to-3d-using-2d-diffusion.md)
- [Obfuscated Gradients Give a False Sense of Security: Circumventing Defenses to Adversarial Examples](https://refivu.com/papers/6d5ee375-978f-4c78-87e2-0c8e55a1127f-obfuscated-gradients-give-a-false-sense-of-security.md)
- [SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient](https://refivu.com/papers/29153239-a1df-4102-9df1-abd1ba2a9c96-seqgan-sequence-generative-adversarial-nets-with-policy.md)
- [Tutorial on Variational Autoencoders](https://refivu.com/papers/51a9cfc2-6285-4935-b55a-3d6450af8eff-tutorial-on-variational-autoencoders.md)
- [Unsupervised Image-to-Image Translation Networks](https://refivu.com/papers/23eee1aa-7651-4535-93bf-d37262ee5dff-unsupervised-image-to-image-translation-networks.md)
- [Methods of Hierarchical Clustering](https://refivu.com/papers/b67289cf-e579-4f78-a7ff-bdea1acaa376-methods-of-hierarchical-clustering.md)
- [Designing Network Design Spaces](https://refivu.com/papers/37f6e2ac-519b-4565-a6cb-673b7ed0265a-designing-network-design-spaces.md)
- [The Concrete Distribution: A Continuous Relaxation of Discrete Random Variables](https://refivu.com/papers/a2b9da66-2864-4212-85c2-c935a02c48cf-the-concrete-distribution-a-continuous-relaxation-of.md)
- [Personalized Top-N Sequential Recommendation via Convolutional Sequence Embedding](https://refivu.com/papers/7c1f4e3a-96df-4fe9-a8b5-6c36b294a565-personalized-top-n-sequential-recommendation-via.md)
- [TSM: Temporal Shift Module for Efficient Video Understanding](https://refivu.com/papers/e7e3764b-d00b-4555-9a23-62f113a3fdfe-tsm-temporal-shift-module-for-efficient-video-understanding.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/12afca27-3173-4d16-a76b-cb72a4fa0438-feature-squeezing-detecting-adversarial-examples-in-deep)
