TDHook: A Lightweight Framework for Interpretability
On the map: Deep reinforcement learning methods → Interpretable and logic-guided RL
Abstract (arXiv)
Interpretability of Deep Neural Networks (DNNs) is a growing field driven by the study of vision and language models. Yet, some use cases, like image captioning, or domains like Deep Reinforcement Learning (DRL), require complex modelling, with multiple inputs and outputs or use composable and separated networks. As a consequence, they rarely fit natively into the API of popular interpretability frameworks. We thus present TDHook, an open-source, lightweight, generic interpretability framework based on texttttensordict and applicable to any texttttorch model. It focuses on handling complex composed models which can be trained for Computer Vision, Natural Language Processing, Reinforcement Learning or any other domain. This library features ready-to-use methods for attribution, probing and a flexible get-set API for interventions, and is aiming to bridge the gap between these method classes to make modern interpretability pipelines more accessible. TDHook is designed with minimal dependencies, requiring roughly half as much disk space as texttttransformerlens, and, in our controlled benchmark, achieves up to a ×2 speed-up over textttcaptum when running integrated gradients for multi-target pipelines on both CPU and GPU. In addition, to value our work, we showcase concrete use cases of our library with composed interpretability pipelines in Computer Vision (CV) and Natural Language Processing (NLP), as well as with complex models in DRL.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Interpretable and logic-guided RL, one of 15 directions in Deep reinforcement learning methods. Builds on 50 of its 74 references that are in the map. First posted on arXiv 29 Sep 2025.
Builds on
50 of 74 references.
References · 50
- 2017Attention Is All You Needcited by 60,361
- 2015Deep Residual Learning for Image Recognitioncited by 52,096
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
- 2014Very Deep Convolutional Networks for Large-Scale Image Recognitioncited by 15,364
- 2017Proximal Policy Optimization Algorithmscited by 15,215
- 2016Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localizationcited by 6,733
- 2017Squeeze-and-Excitation Networkscited by 4,789
- 2022Flamingo: a Visual Language Model for Few-Shot Learningcited by 4,386
- 2017Axiomatic Attribution for Deep Networkscited by 3,384
- 2022Locating and Editing Factual Associations in GPTcited by 2,691
- 2013Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Mapscited by 2,371
- 2013Visualizing and Understanding Convolutional Networkscited by 2,290
38 more
- 2013Describing Textures in the Wildcited by 2,125
- 2023Sparse Autoencoders Find Highly Interpretable Features in Language Modelscited by 1,420
- 2016Understanding intermediate layers using linear classifier probescited by 1,353
- 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,336
- 2017Interpretability Beyond Feature Attribution: Quantitative Testing with Concept Activation Vectors (TCAV)cited by 1,319
- 2022Editing Models with Task Arithmeticcited by 1,120
- 2023Steering Llama 2 via Contrastive Activation Additioncited by 1,085
- 2014Striving for Simplicity: The All Convolutional Netcited by 990
- 2020Quantifying Attention Flow in Transformerscited by 775
- 2019Attention is not not Explanationcited by 636
- 2020Captum: A unified and generic model interpretability library for PyTorchcited by 547
- 2019Unmasking Clever Hans Predictors and Assessing What Machines Really Learncited by 365
- 2023In-Context Learning Creates Task Vectorscited by 312
- 2016Not Just a Black Box: Learning Important Features Through Propagating Activation Differencescited by 297
- 2015Explaining NonLinear Classification Decisions with Deep Taylor Decompositioncited by 250
- 2024Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Modelscited by 235
- 2020Concept Whitening for Interpretable Image Recognitioncited by 225
- 2020Explaining by Removing: A Unified Framework for Model Explanationcited by 218
- 2024Transcoders Find Interpretable LLM Feature Circuitscited by 200
- 2022Quantus: An Explainable AI Toolkit for Responsible Evaluation of Neural Network Explanations and Beyondcited by 171
- 2022From Attribution Maps to Human-Understandable Explanations through Concept Relevance Propagationcited by 141
- 2024AttnLRP: Attention-Aware Layer-Wise Relevance Propagation for Transformerscited by 120
- 2024AtP*: An efficient and scalable method for localizing LLM behaviour to componentscited by 111
- 2015Visualizing Deep Convolutional Neural Networks Using Natural Pre-Imagescited by 93
- 2019Pruning by Explaining: A Novel Criterion for Deep Neural Network Pruningcited by 89
- 2020Aligning Superhuman AI with Human Behavior: Chess as a Model Systemcited by 79
- 2023Inseq: An Interpretability Toolkit for Sequence Generation Modelscited by 78
- 2023TorchRL: A data-driven decision-making library for PyTorchcited by 60
- 2021Software for Dataset-wide XAI: From Local Explanations to Global Insights with Zennit, CoRelAy, and ViRelAycited by 55
- 2024pyvene: A Library for Understanding and Improving PyTorch Models via Interventionscited by 54
- 2024NNsight and NDIF: Democratizing Access to Open-Weight Foundation Model Internalscited by 45
- 2024Dissecting Language Models: Machine Unlearning via Selective Pruningcited by 42
- 2022Navigating Neural Space: Revisiting Concept Activation Vectors to Overcome Directional Divergencecited by 25
- 2023Understanding the (Extra-)Ordinary: Validating Deep Model Decisions with Prototypical Concept-based Explanationscited by 22
- 2023From Hope to Safety: Unlearning Biases of Deep Models via Gradient Penalization in Latent Spacecited by 20
- 2025RelP: Faithful and Efficient Circuit Discovery in Language Models via Relevance Patchingcited by 13
- 2025Fin-PRM: A Domain-Specialized Process Reward Model for Financial Reasoning in Large Language Modelscited by 7
- 2021Learning Domain Invariant Representations by Joint Wasserstein Distance Minimizationcited by 6
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2024A Multimodal Automated Interpretability Agent
- 2026From Weights to Concepts: Data-Free Interpretability of CLIP via Singular Vector Decomposition
- 2026Sparse but not Simpler: A Multi-Level Interpretability Analysis of Vision Transformers
- 2024LVLM-Interpret: An Interpretability Tool for Large Vision-Language Models
- 2025Towards Automated Semantic Interpretability in Reinforcement Learning via Vision-Language Models
- 2026The Standard Interpretable Model: A general theory of interpretable machine learning to deductively design interpretable methods using Lagrangian mechanics
- 2024Decompose the model: Mechanistic interpretability in image models with Generalized Integrated Gradients (GIG)
- 2025A Comprehensive Survey on Self-Interpretable Neural Networks