Detecting Data Poisoning Backdoor Attacks via Consistency Behavioural Signals
Loading...
Files
Date
Journal Title
Journal ISSN
Volume Title
Publisher
Unuversity Setif 1 Ferhat Abbas . Faculty of Sciences
Abstract
The widespread adoption of pre-trained language model checkpoints from public repositories such as Hugging Face has introduced a critical and largely unaddressed vulnerability in the AI supply chain: backdoor attacks. A backdoored model behaves indistinguishably from a clean model on standard benchmarks while covertly executing an attacker-specified behaviour whenever a hidden trigger is present. Existing detection methods — notably ONION, STRIP, RAP, and Token Substitution — share a common and fundamental limitation: they scan individual inputs for suspicious tokens, making them ineffective against syntactic and semantic triggers that leave no anomalous word in the input.
This thesis proposes a gray-box forensic detection framework grounded in the Consistency Behavioural Hypothesis (CBH): a clean model produces consistent output distributions and latent representations for semantically equivalent inputs, whereas a backdoored model exhibits a pronounced and measurable internal shift when a trigger is applied. By analysing pairs of (clean, triggered) sentences rather than single inputs, and by extracting seven complementary behavioural signals — KL divergence, embedding similarity, label flip, confidence delta, entropy delta, margin delta, and confidence variance — the proposed framework detects the forensic fingerprint of a backdoor regardless of its surface form.
A forensic Logistic Regression classifier, trained on a 400-pair calibration set and evaluated on a strictly disjoint 400-pair test set (the 50/50 Forensic Protocol), achieves a mean F1-Score of 0.963 across 30 experimental configurations covering 6 attack types (BadNets, InsertSent, LWP, SynBkd, StyleBkd, and True SCPN) and 5 benchmark datasets (SST-2, IMDb, AG News, DBpedia14, and WikiText-2). Under a realistic deployment scenario with a 1\ method achieves a False Positive Rate of 0.000, compared to 0.320 for ONION, 0.290 for STRIP, and 0.180 for Token Substitution.
The principal contributions of this thesis are: (1) the first attack-agnostic pair-based forensic detection framework for NLP backdoors; (2) the first systematic evaluation on True SCPN (T5-based semantic paraphrasing) as a trigger type; (3) a backdoor detection evaluation on a language modelling task (WikiText-2); and (4) a comprehensive 30-configuration benchmark that surpasses the coverage of any single prior published evaluation.
Description
أدى الانتشار الواسع لاستخدام نماذج اللغة المُدرَّبة مسبقًا من المستودعات العمومية مثل
Hugging Face
إلى ظهور ثغرة حرجة ومُهمَلة إلى حدٍّ كبير في سلسلة توريد الذكاء الاصطناعي، وهي هجمات الأبواب الخلفية. يتصرف النموذج المُصاب على نحوٍ لا يمكن تمييزه عن النموذج السليم على مجموعات الاختبار القياسية، بينما يُنفِّذ سرًّا سلوكًا يحدده المهاجم كلما ظهر مُحفِّز خفي في المُدخل. وتشترك الطرائق الحالية — ولا سيما
ONION وSTRIP وRAP وToken Substitution —
في قيدٍ جوهري: فهي تبحث عن رموز مشبوهة في المُدخل، مما يجعلها عاجزة أمام المُحفِّزات النحوية والدلالية التي لا تترك أي كلمة شاذة.
تقترح هذه المذكرة إطارًا جنائيًا للكشف في وضع الصندوق الرمادي يقوم على فرضية الاتساق السلوكي
(CBH):
إذ يُنتج النموذج السليم توزيعات مُخرَجات وتمثيلات كامنة متسقة للمُدخلات المتكافئة دلاليًا، بينما يُظهر النموذج المُصاب انزياحًا داخليًا واضحًا وقابلًا للقياس عند تطبيق المُحفِّز. ومن خلال تحليل أزواج من الجُمل (نظيفة ومُحفَّزة) بدلًا من المُدخلات المفردة، واستخراج سبع إشارات سلوكية متكاملة — تباعد كولباك-لايبلر، وتشابه التضمين، وانقلاب التصنيف، وفرق الثقة، وفرق الإنتروبيا، وفرق الهامش، وتباين الثقة — يكشف الإطار البصمة الجنائية للباب الخلفي بصرف النظر عن شكله الظاهري.
يحقق مُصنِّف الانحدار اللوجستي، المُدرَّب على 400 زوجٍ للمعايرة والمُقيَّم على 400 زوجٍ منفصلٍ تمامًا للاختبار (بروتوكول 50/50)، متوسط درجة F1 يبلغ 0.963 عبر 30 تهيئة تجريبية تشمل 6 أنواع من الهجمات و5 مجموعات بيانات
(SST-2، IMDb، AG News، DBpedia14، وWikiText-2). وفي سيناريو نشرٍ واقعي بنسبة تسميم 1٪، تحقق الطريقة معدل إيجابيات كاذبة قدره 0.000، مقابل
0.320 لـ ONION و0.290 لـ STRIP و0.180 لـ
Token Substitution.
الإسهامات الرئيسية: (1) أول إطار كشفٍ جنائي قائم على الأزواج وغير مرتبط بنوع الهجوم للأبواب الخلفية في معالجة اللغة الطبيعية؛ (2) أول تقييم منهجي لـ
True SCPN
كنوع مُحفِّز؛ (3) تقييم للكشف على مهمة نمذجة لغوية
(WikiText-2
)؛ (4) بنك اختبار شامل من 30 تهيئة يتجاوز أي تقييم منشور سابق
.
