Skip to main content
QUICK REVIEW

[Paper Review] ParaFuzz: An Interpretability-Driven Technique for Detecting Poisoned Samples in NLP

Yan Lü, Zhuo Zhang|arXiv (Cornell University)|Aug 4, 2023
Software Engineering ResearchComputer Science7 citations
TL;DR

ParaFuzz is a test-time detection framework that leverages model interpretability and prompt-engineered paraphrasing via ChatGPT to identify poisoned NLP samples by mutating triggers during paraphrasing. It uses fuzzing to optimize prompts, achieving 90.1% average F1 score—significantly outperforming STRIP, RAP, and ONION, especially on covert attacks like Hidden Killer.

ABSTRACT

Backdoor attacks have emerged as a prominent threat to natural language processing (NLP) models, where the presence of specific triggers in the input can lead poisoned models to misclassify these inputs to predetermined target classes. Current detection mechanisms are limited by their inability to address more covert backdoor strategies, such as style-based attacks. In this work, we propose an innovative test-time poisoned sample detection framework that hinges on the interpretability of model predictions, grounded in the semantic meaning of inputs. We contend that triggers (e.g., infrequent words) are not supposed to fundamentally alter the underlying semantic meanings of poisoned samples as they want to stay stealthy. Based on this observation, we hypothesize that while the model's predictions for paraphrased clean samples should remain stable, predictions for poisoned samples should revert to their true labels upon the mutations applied to triggers during the paraphrasing process. We employ ChatGPT, a state-of-the-art large language model, as our paraphraser and formulate the trigger-removal task as a prompt engineering problem. We adopt fuzzing, a technique commonly used for unearthing software vulnerabilities, to discover optimal paraphrase prompts that can effectively eliminate triggers while concurrently maintaining input semantics. Experiments on 4 types of backdoor attacks, including the subtle style backdoors, and 4 distinct datasets demonstrate that our approach surpasses baseline methods, including STRIP, RAP, and ONION, in precision and recall.

Motivation & Objective

  • To address the gap in detecting covert backdoor attacks in NLP models, particularly style-based and semantic triggers that evade existing detection methods.
  • To develop a test-time detection framework that does not require prior knowledge of triggers or their insertion mechanisms.
  • To improve detection precision and recall by exploiting the semantic stability of clean samples versus the label-reversion behavior of poisoned samples under trigger mutation.
  • To formulate trigger removal as a prompt engineering problem using large language models like ChatGPT.

Proposed method

  • Parafuzz leverages the hypothesis that poisoned samples should revert to their true labels when triggers are removed via paraphrasing, while clean samples maintain consistent predictions.
  • It uses ChatGPT as a paraphraser to generate semantically preserved variants of input samples, with triggers mutated or removed during the process.
  • The method formulates the optimal paraphrase prompt as a search problem, using fuzzing to explore and evolve prompts that maximize detection performance.
  • Fuzzing is guided by feedback from model predictions on clean and poisoned validation sets, with termination based on F1 score or mutant count.
  • The framework assumes access to a clean validation set and model query capabilities, but not trigger knowledge or training data.
  • It normalizes performance across diverse seeds and demonstrates seed-agnostic effectiveness in prompt optimization.

Experimental results

Research questions

  • RQ1Can model interpretability be leveraged to detect poisoned samples without prior knowledge of triggers or their insertion mechanisms?
  • RQ2How effective is prompt-engineered paraphrasing with large language models in revealing hidden triggers in backdoor-attacked NLP models?
  • RQ3Can fuzzing be effectively applied to optimize paraphrase prompts for improved poisoned sample detection?
  • RQ4How does the method perform on advanced, covert backdoor attacks such as style-based and Hidden Killer attacks?
  • RQ5Is the performance of the prompt optimization process robust to different initial seed prompts?

Key findings

  • ParaFuzz achieves an average F1 score of 90.1% across 4 datasets and 4 attack types, significantly outperforming STRIP (36.3%), RAP (80.3%), and ONION (11.9%) on the same benchmarks.
  • On the Hidden Killer attack, which evades all baselines, ParaFuzz achieves 77.6% F1, demonstrating its effectiveness against the most covert backdoor strategies.
  • For style-based attacks, ParaFuzz achieves 89.6% F1 on SST-2 and 93.4% on IMDB, outperforming ONION (57.7% and 94.2%) and STRIP (13.7% and 60.8%).
  • The method maintains high performance across diverse models, including model #46 and model #36, with F1 scores consistently above 90% when using optimized prompts.
  • Ablation studies confirm that the fuzzing process is seed-agnostic, as all three randomly selected seed prompts converge to F1 scores exceeding 90%.
  • The framework successfully detects long-phrase triggers and single-character triggers where ONION fails, indicating robustness to trigger complexity.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.