Skip to main navigation Skip to search Skip to main content

Semantically Improved Adversarial Attack Based on Masked Language Model via Context Preservation

  • Hao Tian
  • , Hao-tian Wu*
  • , Yiu-ming Cheung
  • , Junhui He
  • , Zhihong Tian
  • *Corresponding author for this work

Research output: Chapter in book/report/conference proceedingConference proceedingpeer-review

1 Citation (Scopus)

Abstract

In masked language model (MLM) based attacks, candidate adversarial examples are flexibly generated according to the context, but how to balance imperceptibility and success rate of attacks remains a challenge. To pursue imperceptibility, external semantic constraints are imposed on candidate word generation, whereby the search space is restricted and the success rate of attacks drops. To address this issue, a semantically improved adversarial attack denoted by SAM-CP is proposed by generating high-quality candidate words satisfying the semantic constraints. In particular, linguistic constraints are adopted so that high-quality semantic candidates can be generated as fine-tuning labels instead of manual annotation. Extensive experimental results on three open-source datasets demonstrate that SAM-CP significantly improves the semantic consistency of generated adversarial samples by adopting different MLMs, respectively. Without compromising text quality, the ability to use SAM-CP to deceive state-of-the-art text classifiers is evaluated. Visit https://github.com/HugoTianX/SAM-CP for details and codes.
Original languageEnglish
Title of host publicationProceedings - 2025 55th Annual IEEE/IFIP International Conference on Dependable Systems and Networks, DSN 2025
EditorsMarcello Cinque, Domenico Cotroneo, Luigi De Simone, Matthias Eckhart, Patrick P. C. Lee, Saman Zonouz
PublisherIEEE
Pages171-182
Number of pages12
ISBN (Electronic)9798331512019
ISBN (Print)9798331512026
DOIs
Publication statusPublished - 23 Jun 2025
EventThe 55th Annual IEEE/IFIP International Conference on Dependable Systems and Networks, DSN 2025 - Naples, Italy
Duration: 23 Jun 202526 Jun 2025
https://dsn2025.github.io/cpaccepted.html

Publication series

NameInternational Conference on Dependable Systems and Networks (DSN)

Conference

ConferenceThe 55th Annual IEEE/IFIP International Conference on Dependable Systems and Networks, DSN 2025
Abbreviated titleDSN 2025
Country/TerritoryItaly
CityNaples
Period23/06/2526/06/25
Internet address

User-Defined Keywords

  • Adversarial example
  • context preservation
  • masked language model
  • semantic constraint
  • text quality

Fingerprint

Dive into the research topics of 'Semantically Improved Adversarial Attack Based on Masked Language Model via Context Preservation'. Together they form a unique fingerprint.

Cite this