Right for the right reason in malware classification
Princip right for teh right reason v klasifikaci škodlivého softwaru
Authors
Supervisors
Reviewers
Editors
Other contributors
Journal Title
Journal ISSN
Volume Title
Publisher
České vysoké učení technické v Praze
Czech Technical University in Prague
Czech Technical University in Prague
Date of defense
2026-01-27
Abstract
Modely hlubokého učení dosahují špičkových výkonů v mnoha oblastech,
avšak jejich neprůhledné rozhodovací procesy představují kritické výzvy pro nasazení v aplikacích s vysokou mírou rizika,
jako je lékařská diagnostika, autonomní systémy a podpora právního rozhodování.
Jakmile se modely naučí falešné korelace vzory, které sice predikují trénovací labely,
ale nelze je zobecnit stávají se nespolehlivými navzdory vysoké přesnosti.
Tato práce se zabývá základní otázkou:
Jak můžeme efektivně vést neuronové sítě k tomu, aby si osvojily uvažování v souladu s lidským úsudkem, pokud trénovací data obsahují matoucí faktory?
Zkoumáme vysvětlující interaktivní učení (XIL),
paradigma, ve kterém uživatelé poskytují opravnou zpětnou vazbu k vysvětlením modelu s cílem eliminovat falešné korelace.
Konkrétně porovnáváme dva komplementární přístupy:
metodu Right for the Right Reasons (RRR), která přímo penalizuje neodpovídající vysvětlení pomocí gradientní regularizace,
a metodu CAIPI, která syntetizuje protipříklady, jež prostřednictvím augmentace dat explicitně narušují falešné korelace
mezi rysy a labely.
Prostřednictvím kontrolovaných experimentů na datové sadě MNIST s uměle zavedenými matoucími faktory prokazujeme,
že varianty CAIPI v efektivitě využití vzorků výrazně překonávají metodu RRR:
Lagrange CAIPI dosahuje testovací přesnosti 97.6% s jedinou uživatelskou opravou (k=1) ve srovnání s 82.1% u RRR.
Při středních rozpočtech (k=5) dosahují metody CAIPI přesnosti 99.2%,
zatímco RRR stagnuje na 94%.
Kvalitu vysvětlení validujeme pomocí Guided Grad-CAM, což odhaluje,
že modely trénované pomocí CAIPI se učí robustní sémantické rysy i přesto,
že věnují pozornost falešným vzorům, pokud jsou přítomny, zatímco RRR produkuje čistší vysvětlení za cenu mírně nižší přesnosti.
Naše srovnávací analýza přináší doporučení pro specifické scénáře určená odborníkům z praxe:
varianty CAIPI jsou vhodnější v případech,
kdy jsou omezené anotační rozpočty nebo čas na trénování, zatímco RRR zůstává použitelnou volbou,
pokud je čistota vysvětlení regulatorním požadavkem.
Zásadním zjištěním je, že identifikujeme vyvažování ztrát (loss balancing) jako nezbytné pro XIL založené na protipříkladech
naivní augmentace dat (Imbalanced CAIPI) vyžaduje k dosažení srovnatelného výkonu 10× více oprav než správně vážené formulace
(Lagrange CAIPI).
Tato zjištění poskytují první systematické srovnání přístupů XIL založených na gradientech a na augmentaci dat
a nabízejí praktický návod pro nasazení učení řízeného vysvětlením v reálných systémech,
kde spolehlivost modelu ohrožují falešné korelace.
Deep learning models achieve state-of-the-art performance across numerous domains, yet their opaque decision-making processes pose critical challenges for deployment in high-stakes applications such as medical diagnosis, autonomous systems, and legal decision support. When models learn spurious correlationspatterns that predict training labels but fail to generalizethey become unreliable despite high accuracy. This thesis addresses the fundamental question: How can we efficiently guide neural networks to learn human-aligned reasoning when training data contains confounding factors? We investigate Explanatory Interactive Learning (XIL), a paradigm where users provide corrective feedback on model explanations to eliminate spurious correlations. Specifically, we compare two complementary approaches: Right for the Right Reasons (RRR), which directly penalizes misaligned explanations via gradient regularization, and CAIPI, which synthesizes counterexamples that explicitly break spurious feature-label correlations through data augmentation. Through controlled experiments on MNIST with artificially introduced confounding factors, we demonstrate that CAIPI variants dramatically outperform RRR in sample efficiency: Lagrange CAIPI achieves 97.6% test accuracy with a single user correction (k=1), compared to RRR's 82.1%. At moderate budgets (k=5), CAIPI methods reach 99.2% accuracy, while RRR plateaus at 94%. We validate explanation quality using Guided Grad-CAM, revealing that CAIPI-trained models learn robust semantic features despite maintaining attention on spurious patterns when present, whereas RRR produces purer explanations at the cost of slightly lower accuracy. Our comparative analysis establishes scenario-specific recommendations for practitioners: CAIPI variants are preferable when annotation budgets are limited or training time is constrained, while RRR remains viable when explanation purity is a regulatory requirement. Critically, we identify loss balancing as essential for counterexample-based XILnaive data augmentation (Imbalanced CAIPI) requires 10× more corrections than properly weighted formulations (Lagrange CAIPI) to achieve comparable performance. These findings provide the first systematic comparison of gradient-based and data-augmentation-based XIL approaches, offering actionable guidance for deploying explanation-guided learning in real-world systems where spurious correlations threaten model reliability.
Deep learning models achieve state-of-the-art performance across numerous domains, yet their opaque decision-making processes pose critical challenges for deployment in high-stakes applications such as medical diagnosis, autonomous systems, and legal decision support. When models learn spurious correlationspatterns that predict training labels but fail to generalizethey become unreliable despite high accuracy. This thesis addresses the fundamental question: How can we efficiently guide neural networks to learn human-aligned reasoning when training data contains confounding factors? We investigate Explanatory Interactive Learning (XIL), a paradigm where users provide corrective feedback on model explanations to eliminate spurious correlations. Specifically, we compare two complementary approaches: Right for the Right Reasons (RRR), which directly penalizes misaligned explanations via gradient regularization, and CAIPI, which synthesizes counterexamples that explicitly break spurious feature-label correlations through data augmentation. Through controlled experiments on MNIST with artificially introduced confounding factors, we demonstrate that CAIPI variants dramatically outperform RRR in sample efficiency: Lagrange CAIPI achieves 97.6% test accuracy with a single user correction (k=1), compared to RRR's 82.1%. At moderate budgets (k=5), CAIPI methods reach 99.2% accuracy, while RRR plateaus at 94%. We validate explanation quality using Guided Grad-CAM, revealing that CAIPI-trained models learn robust semantic features despite maintaining attention on spurious patterns when present, whereas RRR produces purer explanations at the cost of slightly lower accuracy. Our comparative analysis establishes scenario-specific recommendations for practitioners: CAIPI variants are preferable when annotation budgets are limited or training time is constrained, while RRR remains viable when explanation purity is a regulatory requirement. Critically, we identify loss balancing as essential for counterexample-based XILnaive data augmentation (Imbalanced CAIPI) requires 10× more corrections than properly weighted formulations (Lagrange CAIPI) to achieve comparable performance. These findings provide the first systematic comparison of gradient-based and data-augmentation-based XIL approaches, offering actionable guidance for deploying explanation-guided learning in real-world systems where spurious correlations threaten model reliability.
Description
Keywords
XIL, RRR, CAIPI, člověk ve smyčce, správné důvody, správně ze správných důvodů, vysvětlitelné interaktivní učení, MNIST, Grad-CAM, Guided Grad-CAM, abduktivní vysvětlení, XIL, RRR, CAIPI, human-in-the-loop, right reasons, right for the right reasons, explanatory interactive learning, MNIST, Grad-CAM, Guided Grad-CAM, abductive explanations
Citation
Underlying research data set URL
Permanent link
Rights/License
Vysokoškolská závěrečná práce je dílo chráněné autorským zákonem. Je možné pořizovat z něj na své náklady a pro svoji osobní potřebu výpisy, opisy a rozmnoženiny. Jeho využití musí být v souladu s autorským zákonem v platném znění.
A university thesis is a work protected by the Copyright Act of the Czech Republic. Extracts, copies and transcripts of the thesis are allowed for personal use only and at one`s own expense. The use of thesis should be in compliance with the Copyright Act.
A university thesis is a work protected by the Copyright Act of the Czech Republic. Extracts, copies and transcripts of the thesis are allowed for personal use only and at one`s own expense. The use of thesis should be in compliance with the Copyright Act.