RoPE-LIME: RoPE-Space Locality + Sparse-K Sampling for Efficient LLM Attribution
–arXiv.org Artificial Intelligence
This interpretability gap is widened by the prevalence of closed-source models accessed solely via APIs, which precludes the use of gradient-based attribution methods. Consequently, perturbation-based approaches, which probe model behavior by modifying inputs, have become the primary means of explaining these black-box systems. Recent works such as gSMILE (Dehghani et al., 2025) have adapted the LIME framework (Ribeiro et al., 2016) to the generative setting, employing weighted linear surrogates to attribute output tokens to input features. However, such methods face significant challenges: (1) High Cost: They require repeated queries to the closed-source model for every perturbation, making them prohibitively expensive for long contexts; (2) Output Instability: Relying on generated text rather than probability distributions introduces noise, as small perturbations can lead to vastly different generation trajectories; and (3) Sampling Inefficiency: Standard sampling strategies like Leave-One-Out (LOO) or random masking often fail to capture feature interactions or scale poorly with input length. To address these limitations, we introduce RoPE-LIME, an open-source framework that decouples reasoning from explanation. The closed model is queried only once to generate the original response, while a smaller open-source surrogate computes probability-based attribution scores for that fixed output. This design drastically reduces cost and enables richer distributional metrics (e.g., KL divergence) instead of discrete text overlap. We further improve attribution quality with two innovations: (1) a locality kernel using Relaxed Word Mover's Distance in RoPE space for more stable span comparison, and (2) Sparse-K sampling, a logarithmic-complexity perturbation strategy that efficiently explores the feature space. Work done during an internship at DevRev.
arXiv.org Artificial Intelligence
Feb-20-2026