Skip to content

TRIM: a black-box detection and purification method for multiple backdoor triggersBeyond Small Patches: Black-Box Detection and Purification of Diverse Backdoor Triggers

arXiv: Adversarial Attacks, Backdoors & Poisoning· arXiv:2609.03139· Ahmed Abdelnaby, Mohamed Elmahallawy·Indexed by this site · 2026-10-01· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

TRIM locates and purifies backdoor regions at black-box inference; on CIFAR-10 with 3×3 triggers, the average ASR drops from 97.94% to 3.77%, with a CA of 85.83% (Table 1).

Threat modelPractical poisoning threat model: before deployment, an attacker contaminates a training subset Db with poisoning ratio r, making fΘb behave normally on clean inputs and be attacker-controlled on triggered inputs; no attacker interaction is needed at inference time. TRIM operates under strict black-box: the defender only uses input–output queries, with no model internals, training data, clean validation samples, or trigger priors.

Questions
Visual DNNs can be targeted misclassified by backdoor triggers while maintaining high clean accuracy. Existing defenses often rely on model internals, training data, or clean samples, making them difficult to deploy when only a prediction interface is available.
Methods
TRIM uses SAM to segment regions at inference, encodes and filters them with ResNet-18, then performs inpainting or diffusion reconstruction on candidate regions, validates whether the black-box prediction changes, purifies only validated regions, and caches features to reduce repeated queries.
Experiments and results
On CIFAR-10 and ImageNet-10, relative to ShrinkPad, ZIP, and FLARE, TRIM lowers ASR across multiple triggers while retaining higher CA; the authors state that under the 3×3 setting the average ASR can be as low as about 3.77% (CIFAR-10) and 5.06% (ImageNet-10). The residual ASR for Input-Aware is 16.34%.
Limitations and future work
The authors note that non-dominant, interacting triggers in the same image that do not change the prediction individually can still be missed; sample-specific patterns such as Input-Aware are harder to match against the cache. Diffusion reconstruction is not universally real-time; MobileSAM and cv2.inpaint can be used to trade speed.
Experimental setupResNet-50 · CIFAR-10、ImageNet-10 et al. · ASR、CA et al.
Evaluated models
ResNet-50
Benchmarks
CIFAR-10ImageNet-10CIFAR-100GTSRBCaltech-101MNIST
Metrics
ASRCAFPRDAPAAR
AI summaryThe researchers propose TRIM (Trigger Removal by Identifying Manipulated Regions), a deployed black-box backdoor defense that detects and selectively removes backdoor triggers at inference time without requiring model internals, training data, or clean samples. TRIM uses three components—region-based segmentation with deep feature representations, adaptive trigger discovery via inpainting and diffusion-model reconstruction, and selective region purification—to locate regions causing misclassification and purify only those regions, without assuming trigger type, shape, or location. For deployment, TRIM also caches feature embeddings of identified triggers to avoid repeated detection and purification.

The researchers propose TRIM (Trigger Removal by Identifying Manipulated Regions), a deployed black-box backdoor defense that detects and selectively removes backdoor triggers at inference time without requiring model internals, training data, or clean samples. TRIM uses three components—region-based segmentation with deep feature representations, adaptive trigger discovery via inpainting and diffusion-model reconstruction, and selective region purification—to locate regions causing misclassification and purify only those regions, without assuming trigger type, shape, or location. For deployment, TRIM also caches feature embeddings of identified triggers to avoid repeated detection and purification.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    With only black-box predictions, how to locate and remove backdoor triggers of unknown form at inference time.

    Using only black-box predictions, how can we find and remove backdoor triggers of unknown shape, size, and location at inference time while minimally altering benign content.

    • Scenario and Importance: The authors state that DNNs are widely used in vision systems, but backdoors like BadNets can activate attacker-defined behavior when a trigger appears, while maintaining high accuracy on clean inputs, making them hard to detect in routine evaluation. Triggers have evolved from fixed patches to blended, distributed, dynamic, and sample-specific patterns; dynamic and input-aware attacks also change appearance or location. Backdoors can come from poisoned data, untrusted pretrained models, or compromised training pipelines.
    • Limitations of Existing Methods: White-box defenses often require training data, parameters, internal activations, or trusted validation samples, which are unavailable when the model is only accessible via a prediction interface. The authors state that existing black-box defenses may modify predefined regions, harming benign content and potentially missing subtle or adaptive triggers.
    • Core Observation: The key difficulty is locating and neutralizing trigger-related regions using only black-box feedback. The authors' idea is to first locate regions that causally affect predictions, then purify only those regions.
    • Threat Model:
      • Goal: The attacker associates a trigger b with a specified target; on triggered input xb=x+b, the backdoored model outputs y′≠y, while maintaining high accuracy on benign inputs. Targets include All-to-One, All-to-All, and untargeted.
      • Knowledge and Timing: A practical poisoning threat model. The attacker poisons a training subset Db⊂D, with poisoning ratio r=|Db|/|D|. Poisoning occurs before deployment, corresponding to compromised datasets or untrusted pretrained models; no further attacker interaction is needed at inference.
      • Defender Capabilities: The authors divide inference-time defenses into white-box, gray-box, and black-box. TRIM operates in strict black-box: it only observes behavior through queries ŷ=f(x), i.e., g(x,f(x)), with no access to training data, model internals, clean validation samples, or knowledge of trigger appearance, size, or location.
      • Victim System: The protected system is a trained, potentially backdoored visual classifier; in main experiments, the primary classifier is ResNet-50, and TRIM only takes its predictions at inference.
    • What the Paper Proposes: The authors propose TRIM (Trigger Removal by Identifying Manipulated Regions), a deployment-oriented, model-agnostic inference-time black-box defense: segment regions, filter with features, selectively reconstruct and query for validation, then purify only validated regions, and use feature caching to reduce repeated detection.
  2. What related research exists?

    Related work is grouped by attack type, and by defenses before training, during training, after training, and at inference.

    The paper discusses related work in the introduction and Related Work by the stage at which attacks and defenses operate.

    Backdoor attacks

    • BadNets, label-consistent, physical patches: BadNets by Gu et al., label-consistent attacks by Turner et al., and simulated physical patch attacks by Wenger et al. embed malicious behavior while maintaining benign performance. Targets are often divided into All-to-One, All-to-All, and untargeted.
    • Trigger forms: coverage, blending method, sample-specific or sample-agnostic, and label-consistent or label-inconsistent all vary. Dynamic, distributed, and input-related attacks change appearance or location across samples; the reactivation attack by Zhu et al. can revive dormant backdoors with slight input changes. The authors use this diversity to argue that defenses should not assume a fixed appearance, size, or location.

    Pre-training and during-training defenses

    • Pre-training: activation clustering, feature consistency, and using vision–language inconsistency to distinguish suspicious samples. The authors state these are effective when the training set is available, but are hard to use when the user already has a trained, possibly compromised model.
    • During training: Anti-Backdoor Learning (ABL) and Decouple-based Backdoor Defense (DBD) identify suspicious training samples and alter optimization to suppress their influence; other work uses controlled poisoning or defensive perturbations to increase resistance to injection. The authors state these methods require control over the training process and cannot directly protect a deployed, query-only model.

    Post-training and inference-time defenses

    • Post-training: Neural Attention Distillation and ScaleUp use attention patterns or prediction consistency to identify and mitigate backdoors. The authors state they avoid retraining from scratch but may still rely on auxiliary data, model access, or trusted references, which a deployed model accessible only through a prediction interface does not have.
    • Inference time: detection-oriented methods include DBDR, Beatrix, TeCo, FLARE; restoration-oriented methods include Orion, ZIP, SampDetox. Xue et al. propose Backdoor Trigger Segmentation (BTS) to locate diverse trigger regions. The authors state existing methods typically detect suspicious inputs, locate triggers, or transform large regions of the input, without simultaneously verifying which regions causally affect the backdoor prediction and purifying only those regions.

    Baselines and benchmarks

    • Baseline methods: the main comparisons are ShrinkPad, ZIP, FLARE; no defense serves as a reference.
    • Benchmarks/datasets: the main experiments use CIFAR-10 and ImageNet-10; the appendix adds MNIST, CIFAR-100, GTSRB, and Caltech-101. Attacks include BadNets, Blended, Label-Consistent, Physical, Dynamic, Distributed (DBA), Input-Aware, VSSC, and dual-trigger settings.

    The authors position TRIM as: treating localization as an intermediate step for restoring predictions, first filtering candidate regions, selectively reconstructing, then verifying prediction changes with black-box queries, and finally purifying only the influential regions, thereby altering less benign content and supporting diverse triggers, without needing model internals, training data, or clean validation samples.

  3. How does the paper address this problem?

    TRIM has three stages: region features, per-region reconstruction validation, and selective purification with caching after merging masks.

    TRIM does not modify the entire image; instead, it identifies candidate regions, validates their impact using black-box predictions, and then purifies only trigger-related content. Figure 1 shows the three-stage pipeline. The feature encoder is independent of the protected classifier to maintain the black-box assumption.

    Region Segmentation and Features

    • Semantic Segmentation: Uses the Segment Anything Model (SAM) with SamAutomaticMaskGenerator, prompt-free, without presupposing trigger appearance or location. Generates candidate masks from regularly sampled prompt points, removes masks that are too small or largely contained in larger ones, merges highly overlapping regions, and obtains a compact set S.
    • Background Isolation and Encoding: For each binary mask, performs element-wise multiplication to retain only that region before encoding, reducing background interference. The encoder g(·) defaults to a pretrained ResNet-18, taking features before the final classification layer and applying ℓ2 normalization. Candidates need not correspond to predefined semantic classes; they can be objects, parts, textures, or anomalous patterns.
    • Default Implementation: Segmentation uses SAM ViT-H. The authors state that MobileSAM can be substituted for speed, so they describe TRIM as deployment-tunable rather than universally real-time.

    Per-Region Reconstruction as Intervention

    • Purpose: For each candidate, reconstructs only that region at a time, producing an intervention image for a counterfactual test: whether suppressing that region changes the black-box prediction. These intervention images are not the final purification result.
    • Resolution Branches: High resolution uses Stable Diffusion Inpainting (SDI) with a generic prompt P; pixels outside the mask remain unchanged, and inside the mask generates plausible alternatives rather than restoring the original region that may still contain the trigger. The authors state this suits natural images like Caltech-101 and ImageNet. Low resolution uses the Telea algorithm (cv2.inpaint), filling from known neighboring pixels with spatial weights; the authors state diffusion offers limited benefit for low-resolution images like CIFAR-10 and is unnecessarily costly.
    • Evaluation Correspondence: CIFAR-10 is first bilinearly upsampled from 32×32 to 224×224; low resolution uses cv2.inpaint, high resolution uses Stable Diffusion inpainting.

    Validation, Caching, and Selective Purification

    • Filter Then Validate: The authors note that removing task-relevant content also changes predictions, so prediction change alone cannot be the criterion for trigger localization. First exclude large regions that may correspond to the subject or dominant background; if a cache exists, use feature similarity to skip already-analyzed patterns. For remaining candidates, compare the original image prediction y0=f(x) with the intervention image prediction yi, with indicator di=1[yi≠y0]. Only di=1 is marked suspicious.
    • Dual Memory Pools: Maintains a benign pool B and a trigger-related pool T. Similarity uses the RBF kernel κ(zi,zj)=exp(−γ‖zi−zj‖²), taking the maximum similarity within the pool. In experiments, threshold τ=0.9: above it, reuse previous decisions; otherwise, perform region validation and write the embedding to the corresponding pool.
    • Single Purification: Takes the pixel union of all masks with di=1 to get Mpur, then purifies the original image only on that union once: xpur=P(x,Mpur), where P is chosen between SDI and cv2.inpaint based on resolution. In evaluation, purification is considered successful if f(xpur) recovers the true class. Regions with area exceeding a preset threshold do not participate in validation or purification; default area threshold is 0.25, chosen from the sensitivity analysis in Table 6 and fixed for other experiments.
    • Multiple Triggers: Each region is evaluated independently. If one trigger dominates the prediction, suppressing a weaker trigger alone may not change the prediction, thus missing it on that image. Once the dominant trigger is cached, subsequent images containing the same dominant pattern can reuse the cache and examine other candidates. For spatially dispersed multi-part triggers, removing part of them sometimes suffices to change the prediction. The authors explicitly list "interacting non-dominant triggers that individually produce no measurable prediction change in a previously unseen image" as a limitation of the current per-region validation strategy.

    Success Criteria and Overhead Trade-offs

    • Metric Meanings: ASR measures whether the attack succeeds on triggered samples; CA measures accuracy on clean inputs. Additionally report FPR, Detection Accuracy (DA), Purified Accuracy (PA), and Artifact Ratio on benign inputs, AR=Nartifact/Nclean×100%. The authors use SSIM and LPIPS, supplemented by human inspection of flagged samples, to evaluate reconstruction artifacts.
    • Overhead: Segmentation, per-region reconstruction, and classifier queries all have costs; filtering and caching reduce repetition, and final purification covers only the union of validated regions. High-fidelity points use SAM ViT-H with diffusion; lightweight points use MobileSAM with cv2.inpaint. Table 8 gives per-component latency.
  4. What experiments did the paper conduct?

    Main classifier is ResNet-50; on CIFAR-10, TRIM average ASR 3.77%, CA 85.83%, Input-Aware residual 16.34%.

    Experimental Setup

    • Model Under Test: Unless otherwise noted, the protected classifier is ResNet-50, with 10% of training samples triggered and trained jointly with clean samples. At inference, TRIM only accesses its predictions. Region encoding uses a pretrained ResNet-18, and segmentation uses SAM ViT-H. Table 8 also lists ResNet-18/50 times as feature extraction and query components, not as additional attacked model families.
    • Datasets: CIFAR-10 (32×32 bilinearly upsampled to 224×224) and ImageNet-10 (stated as 13,394 images, 9,469 training, 3,925 validation, resized to 256×256). Appendix Table 9 adds MNIST, CIFAR-100 (60,000 images, 32×32, 100 classes), GTSRB (paper says over 50,000 traffic signs), and Caltech-101 (about 9,000 images, 101 classes, resolution 300×200).
    • Attacks: BadNets, Blended, Label-Consistent (LC), Physical, Dynamic, Distributed (DBA), Input-Aware, VSSC, and two spatially separated triggers on the same input. Targets include A2O, A2A, and UT. Main table triggers are 3×3 pixels; also test 7×7 on CIFAR-10, and a 24×24 physical patch on an ImageNet-10 subset in the appendix.
    • Baselines: ShrinkPad, ZIP, FLARE, and No Defense.
    • Metrics and Repetitions: ASR and CA are primary; Table 5 adds FPR. TRIM in Table 1 is mean±standard deviation over five independent random seeds. Cache threshold τ=0.9, segmentation area threshold 0.25. Low resolution uses cv2.inpaint, high resolution uses Stable Diffusion inpainting. Environment is Ubuntu 20.04 with one NVIDIA RTX 4090 (24 GB).
    • Evaluation Method: ASR/CA are computed from classifier predictions relative to attack targets and true labels; purification success is defined as the prediction recovering the true class. The paper does not mention LLM evaluation. Artifacts are evaluated with SSIM, LPIPS, and human inspection of flagged samples; the paper does not report human agreement numbers.

    Main Results

    Table 1 is for 3×3 triggers, ResNet-50. TRIM column is five-seed average; baselines do not report standard deviations. CIFAR-10 Dynamic is missing from the ImageNet-10 row, so it is not written into the ImageNet table.

    Swipe horizontally to read the table

    Dataset / AttackTRIM CATRIM ASRNo Defense ASRZIP ASRFLARE CA
    CIFAR-10 BadNets87.22±0.583.30±0.4197.175.5682.31
    CIFAR-10 Blended87.87±0.646.13±0.52100.003.6272.17
    CIFAR-10 Physical84.50±0.714.70±0.4799.9923.6673.34
    CIFAR-10 LC82.53±0.661.16±0.2899.0188.2057.14
    CIFAR-10 Dynamic87.01±0.733.56±0.4493.5355.1367.13
    CIFAR-10 Average85.83±0.663.77±0.4297.9435.2370.42
    ImageNet-10 BadNets78.68±0.825.98±0.6196.0313.2381.20
    ImageNet-10 Average76.81±0.925.06±0.5878.4542.6160.20

    From Table 1. On ImageNet-10, TRIM's Physical ASR is 5.18±0.56 and CA is 78.37±0.88; the same cell for FLARE is ASR 6.37, CA 16.33. For LC, TRIM ASR is 2.10±0.36. ImageNet-10 Dynamic no-defense ASR is 10.46, TRIM is 5.90±0.72.

    • Author Interpretation: The authors state TRIM achieves a better balance between robustness and utility: CIFAR-10 average ASR drops from 97.94% to 3.77%, retaining CA of 85.83%; ImageNet-10 from 78.45% to 5.06%, with CA of 76.81%.
    • Exceptions: The authors note that on CIFAR-10 Blended, ZIP's ASR (3.62%) is lower than TRIM's (6.13%), but state TRIM is more consistent across attacks. On ImageNet-10 Dynamic, the no-defense ASR is already 10.46%, lower than other attacks in the same table.
    • Stability: The authors cite low variance across five seeds to indicate run-to-run stability, citing CIFAR-10 BadNets at 87.22±0.58% CA / 3.30±0.41% ASR, and ImageNet-10 BadNets at 78.68±0.82% / 5.98±0.61%.

    Attack Targets and Trigger Scales

    • What Was Tested: Table 2 (CIFAR-10) compares BadNets, Blended, Physical under A2O, A2A, UT. Table 3 and Appendix Table 11 are for ImageNet-10 A2O and A2A. Table 4 is for 7×7 triggers on CIFAR-10 for BadNets, Physical, LC.
    • Results: On CIFAR-10, TRIM's average ASR is 4.71% for A2O, 4.56% for A2A, and 4.04% for UT, with average CA of 86.53%, 84.86%, and 80.03%. The authors state that in every reported CIFAR-10 attack configuration, TRIM's ASR is below 8.1%. On ImageNet-10, TRIM's average ASR is 5.76% for A2O and 6.90% for A2A, with average CA of 78.06% and 72.29%; FLARE's corresponding average CA is 55.22% and 55.64%. With 7×7 triggers, TRIM's average ASR is 1.07% and average CA is 85.49%; Physical has ASR 1.79% and CA 86.70%, LC has ASR 0.87% and CA 82.56%. ShrinkPad, ZIP, and FLARE have 7×7 average ASRs of 13.06%, 63.93%, and 7.06%, respectively.
    • Author Interpretation: The authors believe effectiveness does not depend on a fixed A2O target mapping, and region-level defense remains effective when trigger scales differ from the main setting. ShrinkPad has higher CA on Physical A2O and Physical UT, but ASR rises to 10.13% and 27.50%. ZIP has the lowest ASR on Blended A2O (3.62%) and Blended A2A (4.13%), but varies more in other settings.

    Diverse Triggers, Poisoning Rates, and Qualitative Results

    • Table 5: On CIFAR-10 dual triggers, TRIM has CA 84.13, ASR 3.45, FPR 5.16 (no-defense ASR 91.56); DBA has 84.56 / 2.03 / 2.92 (no-defense ASR 88.21); Input-Aware has 86.03 / 16.34 / 5.06 (no-defense ASR 98.12). ImageNet-10 VSSC has CA 78.73, ASR 5.13, FPR 6.19 (no-defense ASR 91.61). The text also states single-trigger ASR drops from 97.17% to 3.30%, matching CIFAR-10 BadNets in Table 1; Table 5 does not list this row separately.
    • Author Interpretation: Input-Aware is the hardest in the evaluated settings: residual ASR is higher than other attacks. The authors believe highly sample-specific patterns are less likely to match cached trigger representations and are harder to isolate with per-region interventions, and explicitly do not claim equal robustness across all trigger generation mechanisms. The dual-trigger results show that multiple spatially separated regions can often be purified in the evaluated configuration, but per Sec. 4.3, weaker triggers may still be missed when a dominant trigger is present, and this should not be interpreted as a guarantee against arbitrary interacting triggers.
    • Figure 2 and Appendix: With poisoning rates 5%–20%, the authors state DA and PA are relatively stable, with ASR below 6%. BadNets DA is above 82%, with ASR from 3.0% to 5.9%; Physical DA is about 80% to 94%, with ASR between 4.4% and 5.3%; LC ASR is about 1% to 3.35%; Dynamic is between 3.10% and 4.60%. Curve endpoints are not given as annotations; the above is the text's description of Figure 2. Table 9: On MNIST BadNets, TRIM has CA 99.01 and ASR 0.34 (no-defense ASR 99.67); CIFAR-100 BadNets is 77.43 / 6.36; GTSRB Physical drops from ASR 99.21 to 4.22; Caltech-101 Physical from 95.33 to 2.26. CIFAR-100 Blended TRIM ASR is 10.08, higher than other TRIM cells in the same table. Appendix Figures 4–5 are qualitative examples of progressively removing regions; Figure 6 is a qualitative before/after for font attacks (SCAM, Synth-SCAM), and the paper gives no ASR/CA numbers in that appendix.

    Other Ablations and Analyses

    • Area Threshold (Table 6): On CIFAR-10, at 0.2, ASR is 2.1 and AR is 2.77; at 0.3, ASR is 2.0 and AR is 3.18; at 0.1, ASR is 7.5. On ImageNet-10, at 0.3, ASR is 3.0, T is 7.40 s, and average segment count is 52.70; at 0.1, ASR is 10.5. The authors therefore set the default threshold to 0.25 and do not tune per attack.
    • Caching (Table 7): The proportion of candidates requiring inpainting on CIFAR-10 drops from an initial 100% to 10.23% after 1,000 images; on ImageNet-10, from 100% to 27.66%. At 50 images, they are 78.54% and 93.16%, respectively.
    • Latency (Table 8, ImageNet-10 scale, single GPU): SAM ViT-H is 0.53 s with peak memory about 7.00 GB; MobileSAM is 0.022 s and 0.08 GB. Stable Diffusion 2 Inpainting is about 5.87 s and 4.85 GB; cv2.inpaint is about 0.020 s. The authors state that when diffusion is enabled, TRIM should not be called universally real-time.
    • Appendix Table 10 (ImageNet-10 subset, 10% poisoning, 24×24 physical patch, no-defense CA 79.11, ASR 90.7): At segmentation ratio 0.15, post-defense CA is 78.5 and ASR 3.6; at 0.50, CA is 38.2 and ASR 12.1. At similarity threshold 0.80, CA is 24.9 and ASR 11.8. The text states that higher similarity thresholds (e.g., 0.95) can avoid repeated purification; the 0.85 row is truncated in the text, so incomplete numbers are not transcribed.
    • Negative Results: Input-Aware residual ASR is 16.34%; weaker triggers that individually do not change predictions in the same image may be missed; overly large area thresholds increase residual ASR (both ends of Table 6), and segmentation ratios larger than the chosen small value significantly lower CA (Table 10).
  5. What are some points that can be further explored?

    The gaps the authors name are interacting non-dominant triggers within a single image, and the latency of the diffusion configuration.

    Limitations and Future Directions Noted by the Authors

    • Non-dominant interacting triggers: Sec. 4.3 states that in a previously unseen input, non-dominant triggers that interact and individually produce no measurable prediction change remain a limitation of the current per-region validation strategy. Only after the dominant trigger is cached do subsequent images more easily allow examining other candidates.
    • Sample-specific triggers: Sec. 5.5 describes Input-Aware as the hardest case in the evaluated settings, with residual ASR higher than other attacks; highly sample-specific patterns are less likely to match cached trigger representations and are harder to isolate with per-region interventions. The authors explicitly do not claim equal robustness across all trigger generation mechanisms, and limit the dual-trigger experiment to empirical robustness in the evaluated configuration, not a guarantee against arbitrary interacting triggers.
    • Latency: Sec. 5.7 states that when diffusion reconstruction is enabled, TRIM should not be described as universally real-time; SAM ViT-H with diffusion prioritizes quality, while MobileSAM with classical inpainting offers a lighter deployment configuration. Sec. 4.3 similarly calls the framework deployment-tunable rather than universally real-time.
    • The paper does not list future work separately in the Conclusion: The Conclusion restates ASR reductions on CIFAR-10 and ImageNet-10, with no separate Limitations or Future Work section. The above three points come from places in the method and experiments where the authors explicitly call them limitations or caution against overclaiming.

    Experimental Coverage

    • Classifiers and Data: Main experiments protect a ResNet-50 classifier; datasets are CIFAR-10 and ImageNet-10, with Appendix Table 9 adding MNIST, CIFAR-100, GTSRB, and Caltech-101. ImageNet-10 size is stated as 13,394 images.
    • Attacks and Targets: Covers BadNets, Blended, LC, Physical, Dynamic, DBA, Input-Aware, VSSC, and dual triggers; targets include A2O, A2A, and UT. Main triggers are 3×3, with additional 7×7 on CIFAR-10 and a 24×24 physical patch in the appendix. Default poisoning rate is 10%, with Figure 2 showing 5%–20%.
    • Defense Baselines and Repetitions: Baselines are ShrinkPad, ZIP, and FLARE. TRIM in Table 1 is repeated over five random seeds with standard deviations reported; TRIM numbers in Tables 2–5 do not report standard deviations.
    • Components and Overhead: Default SAM ViT-H, ResNet-18 encoder, τ=0.9, area threshold 0.25; low/high resolution use cv2.inpaint and Stable Diffusion inpainting, respectively. Tables 6–8 and Appendix Table 10 report area thresholds, cache ratios, component latencies, and several hyperparameters.
    • Not Reported: The paper does not report agreement numbers with human judgment; the font attacks in Figure 6 (SCAM, Synth-SCAM) are qualitative examples, and that section gives no ASR or CA. The RBF γ appears in the formula, but the experimental section does not give a specific value.
  6. Summarize the main content of the paper

    The black-box inference defense TRIM uses region validation and selective purification to reduce the ASR of various visual backdoors.

    TRIM is an inference-time backdoor defense that relies only on classifier input–output, for deployed visual models where parameters or training data are unavailable.

    Backdoored models maintain high accuracy on clean images and output attacker-specified or arbitrary wrong labels on triggered images. Triggers can be small patches, blended, physical, dynamic, distributed, or sample-specific patterns. White-box and many training-phase defenses require parameters, data, or training control; the authors argue that black-box methods that only modify predefined regions may both harm benign content and miss unknown triggers.

    The method partitions the input into semantic regions, encodes them with a ResNet-18 independent of the victim model, excludes overly large regions, and compares against cached benign/trigger features. For remaining regions, it performs one suppression and reconstruction (low-resolution Telea, high-resolution Stable Diffusion inpainting); if the black-box prediction changes, it incorporates the region into a purification mask, and finally purifies only that union. When similarity exceeds τ=0.9, it reuses cached decisions.

    On ResNet-50, 3×3 triggers, averaged over five seeds, the average ASR across five attacks on CIFAR-10 drops from 97.94% to 3.77%, with an average CA of 85.83%; among these, LC has an ASR of 1.16% and Blended a CA of 87.87% (Table 1). On ImageNet-10, the average ASR drops from 78.45% to 5.06%, with an average CA of 76.81%. With 7×7 triggers, the CIFAR-10 average ASR is 1.07%. Input-Aware ASR drops from 98.12% to 16.34%, higher than other attacks (Table 5). On CIFAR-10 Blended, ZIP's ASR is 3.62%, lower than TRIM's 6.13%.

    The authors conclude that without auxiliary data, inference-time mitigation of diverse backdoors is still possible; compared with ShrinkPad, ZIP, and FLARE, TRIM provides more stable protection against small, large, blended, and spatially sparse triggers, while adjusting latency via caching and replaceable segmentation/reconstruction modules. They also note that interacting non-dominant triggers in a single unseen image, and highly sample-specific triggers, may still evade the per-region prediction-change test.

Related papers

Show 3 more papers
Read originalarxiv.org