Attention-Guided Stroke Location Inversion for Explainable Sketch Recognition

Abstract Explainable Artificial Intelligence (XAI) has made remarkable progress in pixel and text domains, yet human sketches a uniquely sparse and sequential data modality remain largely unexplored from an interpretability perspective. The recently proposed SketchXAI framework introduced Stroke Location Inversion (SLI) to reconstruct stroke layouts from randomized configurations, but treats every stroke with identical optimization priority regardless of its structural relevance. We address this limitation by proposing Attention-Guided Stroke Location Inversion (AG-SLI). We initially evaluate a continuous formulation that scales per stroke gradients proportionally to self attention weights across a 30-category QuickDraw subset (86.13% classifier accuracy). Through a staged empirical protocol, we demonstrate that this continuous variant fails to replicate consistently, exhibiting sign-flipping median convergence speed changes (−47.8% to +40.0%) driven by localized sampling noise. Motivated by this instability, we introduce a refined, bounded, rank-based formulation: a fixed multiplicative gradient boost is restricted to the top 30% most attended strokes across the final four transformer layers, decaying linearly over the optimization trajectory. Benchmarked against standard machine learning optimizers across independent hard-case pools (n = 90), the refined mechanism achieves a median convergence depth of 10 iterations, significantly outperforming standard Adam (19 iterations) and SGD with Momentum (24 iterations). Furthermore, the framework limits non-convergence rates to 22.2%, improves spatial recovery (0.038 Final MSE), and yields a net 30.65% reduction in total job wall-clock time despite an updated O(N log N) per step complexity. We present this complete empirical journey including the initial non replication to establish a transparent baseline for reproducible, resource efficient optimization architectures in sparse visual domains.

Authors

Institutions

Publication Details

Journal
Research Square
Published
2026-11-11
DOI
https://doi.org/10.21203/rs.3.rs-11138232/v1
Primary Topic
Explainable Artificial Intelligence (XAI)
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Attention-Guided Stroke Location Inversion for Explainable Sketch Recognition

Miklós Hoffmann, Abdallah Al-Hamad, Muhammad Awais, Muhammad Irshad Ibrahim
Research Square
Explainable Artificial Intelligence (XAI)
preprint

Attention-Guided Stroke Location Inversion for Explainable Sketch Recognition

Miklós Hoffmann, Abdallah Al-Hamad, Muhammad Awais, Muhammad Irshad Ibrahim
preprint en

Abstract

Abstract Explainable Artificial Intelligence (XAI) has made remarkable progress in pixel and text domains, yet human sketches a uniquely sparse and sequential data modality remain largely unexplored from an interpretability perspective. The recently proposed SketchXAI framework introduced Stroke Location Inversion (SLI) to reconstruct stroke layouts from randomized configurations, but treats every stroke with identical optimization priority regardless of its structural relevance. We address this limitation by proposing Attention-Guided Stroke Location Inversion (AG-SLI). We initially evaluate a continuous formulation that scales per stroke gradients proportionally to self attention weights across a 30-category QuickDraw subset (86.13% classifier accuracy). Through a staged empirical protocol, we demonstrate that this continuous variant fails to replicate consistently, exhibiting sign-flipping median convergence speed changes (−47.8% to +40.0%) driven by localized sampling noise. Motivated by this instability, we introduce a refined, bounded, rank-based formulation: a fixed multiplicative gradient boost is restricted to the top 30% most attended strokes across the final four transformer layers, decaying linearly over the optimization trajectory. Benchmarked against standard machine learning optimizers across independent hard-case pools (n = 90), the refined mechanism achieves a median convergence depth of 10 iterations, significantly outperforming standard Adam (19 iterations) and SGD with Momentum (24 iterations). Furthermore, the framework limits non-convergence rates to 22.2%, improves spatial recovery (0.038 Final MSE), and yields a net 30.65% reduction in total job wall-clock time despite an updated O(N log N) per step complexity. We present this complete empirical journey including the initial non replication to establish a transparent baseline for reproducible, resource efficient optimization architectures in sparse visual domains.

Research Square
University of Debrecen (HU), Yanshan University (CN)
Explainable Artificial Intelligence (XAI)
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon