Introduction
Adversarial attacks on machine learning models have predominantly focused on alphabetic languages like English. However, Chinese presents distinct challenges due to its logographic nature and phonetic richness. Traditional methods often treat Chinese as a sequence of tokens similar to English, ignoring the visual (glyph) and phonetic (pinyin) features that define the language. This often results in adversarial examples that are easily detectable by humans or fail to capture the nuances of Chinese linguistics.
To address these issues, we propose the Immune-based Sound-Shape Code (ISSC) algorithm. ISSC leverages a multi-dimensional encoding system to generate natural-sounding and visually similar substitutions, optimized through a bio-inspired adaptive immune algorithm.
Methodology
The core of ISSC lies in the Sound-Shape Code (SSC), an 11-bit encoding system designed to capture the essence of Chinese characters.
- Sound Code (Bits 1-4): Encodes pinyin components, including initials, finals, tones, and final complements.
- Shape Code (Bits 5-11): Encodes visual features such as character structure (e.g., left-to-right), the "four-corner code," and total stroke count.
By calculating similarity within this 11-bit space, ISSC identifies substitution candidates that mimic common human errors, such as typos or homophones, making the attack stealthy to native speakers while effectively confusing neural networks.
To optimize the selection of word swaps, we employ an Adaptive Immune Algorithm (IA). This approach treats potential adversarial sentences as "antibodies" tasked with neutralizing the "antigen" (the target model's correct classification). The IA incorporates:
- Clone Selection & Mutation: High-performing antibodies are replicated and mutated to explore the search space efficiently.
- Vaccination: To prevent premature convergence on local optima, a "vaccination" mechanism injects successful features from the best solutions into the broader population, accelerating convergence toward a successful attack.
Experimental Evaluation
We evaluated ISSC across five diverse Chinese datasets: Chinanews (multi-class classification), ChnSentiCorp, Ctrip, JD (sentiment analysis), and OCNLI (natural language inference). The attack was tested against six state-of-the-art models, including BERT, RoBERTa, and ALBERT.
Results and Discussion
ISSC demonstrated superior performance across several metrics:
- Attack Success Rate (ASR): ISSC outperformed baseline methods like Argot and BERT-Attack by an average of 2.26%.
- Efficiency: The method achieved higher success rates with a 2.59% lower modification rate, indicating a more surgical and less disruptive attack.
- Fluency: Evaluation using BERTScore and Perplexity confirmed that ISSC-generated examples maintain high semantic consistency and linguistic fluency.
- Transferability: Adversarial examples generated for smaller models successfully fooled Large Language Models like GPT-4 with a 20% success rate, highlighting fundamental vulnerabilities in how these models process Chinese text.
Conclusion
ISSC represents a significant advancement in Chinese adversarial attacks by integrating linguistic features with robust bio-inspired optimization. Future work will focus on dynamic hyper-parameter tuning and utilizing these high-quality adversarial examples for adversarial training to enhance model robustness.
Summary updated