Explainability in JupyterLab and Beyond: Interactive XAI Systems for Integrated and Collaborative Workflows

Explainable AI (XAI) tools represent a turn to more human-centered and human-in-the-loop AI approaches that emphasize user needs and perspectives in machine learning model development workflows. However, while the majority of ML resources available today are developed for Python computational environments such as JupyterLab and Jupyter Notebook, the same has not been true of interactive XAI systems, which are often still implemented as standalone interfaces. In this paper, we address this mismatch by identifying three design patterns for embedding front-end XAI interfaces into Jupyter, namely: 1) One-way communication from Python to JavaScript, 2) Two-way data synchronization, and 3) Bi-directional callbacks. We also provide an open-source toolkit, bonXAI, that demonstrates how each design pattern might be used to build interactive XAI tools for a Pytorch text classification workflow. Finally, we conclude with a discussion of best practices and open questions. Our aims for this paper are to discuss how interactive XAI tools might be developed for computational notebooks, and how they can better integrate into existing model development workflows to support more collaborative, human-centered AI.

[1]  N. Elmqvist,et al.  Lodestar: Supporting rapid prototyping of data science workflows through data-driven analysis recommendations , 2023, Inf. Vis..

[2]  James R. Eagan,et al.  On Selective, Mutable and Dialogic XAI: a Review of What Users Say about Different Types of Interactive Explanations , 2023, CHI.

[3]  Xuye Liu,et al.  Slide4N: Creating Presentation Slides from Computational Notebooks with Human-AI Collaboration , 2023, CHI.

[4]  Yun Wang,et al.  Notable: On-the-fly Assistant for Data Storytelling in Computational Notebooks , 2023, CHI.

[5]  Mark O. Riedl,et al.  Charting the Sociotechnical Gap in Explainable AI: A Framework to Address the Gap in XAI , 2023, Proc. ACM Hum. Comput. Interact..

[6]  C. D. De Cecco,et al.  Artificial intelligence in cardiac imaging: where we are and what we want. , 2022, European heart journal.

[7]  Mark O. Riedl,et al.  The Algorithmic Imprint , 2022, FAccT.

[8]  S. Savarese,et al.  OmniXAI: A Library for Explainable AI , 2022, ArXiv.

[9]  Duen Horng Chau,et al.  NOVA: A Practical Method for Creating Notebook-Ready Visual Analytics , 2022, ArXiv.

[10]  Mark O. Riedl,et al.  Human-Centered Explainable AI (HCXAI): Beyond Opening the Black-Box of AI , 2022, CHI Extended Abstracts.

[11]  Dakuo Wang,et al.  Telling Stories from Computational Notebooks: AI-Assisted Presentation Slides Creation for Presenting Data Science Work , 2022, CHI.

[12]  W. K. Edwards,et al.  StickyLand: Breaking the Linear Presentation of Computational Notebooks , 2022, CHI Extended Abstracts.

[13]  Steven Euijong Whang,et al.  Data collection and quality challenges in deep learning: a data-centric AI perspective , 2021, The VLDB Journal.

[14]  Po-Sen Huang,et al.  Ethical and social risks of harm from Language Models , 2021, ArXiv.

[15]  Kush R. Varshney,et al.  Human-Centered Explainable AI (XAI): From Algorithms to User Experiences , 2021, ArXiv.

[16]  Alex Endert,et al.  VAINE: Visualization and AI for Natural Experiments , 2021, 2021 IEEE Visualization Conference (VIS).

[17]  J Alammar,et al.  Ecco: An Open Source Library for the Explainability of Transformer Language Models , 2021, ACL.

[18]  Yunyao Li,et al.  Who needs to know what, when?: Broadening the Explainable AI (XAI) Design Space by Looking at Explanations Across the AI Lifecycle , 2021, Conference on Designing Interactive Systems.

[19]  Duen Horng Chau,et al.  A Survey of Human‐Centered Evaluations in Human‐Centered Machine Learning , 2021, Comput. Graph. Forum.

[20]  Philipp Wintersberger,et al.  Operationalizing Human-Centered Perspectives in Explainable AI , 2021, CHI Extended Abstracts.

[21]  Bilge Mutlu,et al.  ToonNote: Improving Communication in Computational Notebooks Using Interactive Data Comics , 2021, CHI.

[22]  Robert DeLine,et al.  Fork It: Supporting Stateful Alternatives in Computational Notebooks , 2021, CHI.

[23]  F. Vitali,et al.  From Philosophy to Interfaces: an Explanatory Method and a Tool Inspired by Achinstein’s Theory of Explanation , 2021, IUI.

[24]  N. Ayache,et al.  Applications of artificial intelligence in cardiovascular imaging , 2021, Nature Reviews Cardiology.

[25]  Holger Hermanns,et al.  What Do We Want From Explainable Artificial Intelligence (XAI)? - A Stakeholder Perspective on XAI and a Conceptual Model Guiding Interdisciplinary XAI Research , 2021, Artif. Intell..

[26]  Elena L. Glassman,et al.  Evaluating the Interpretability of Generative Models by Interactive Reconstruction , 2021, CHI.

[27]  Mark O. Riedl,et al.  Expanding Explainability: Towards Social Transparency in AI systems , 2021, CHI.

[28]  Athena Vakali,et al.  Bot-Detective: An explainable Twitter bot detection service with crowdsourcing functionalities , 2020, MEDES.

[29]  Arvind Satyanarayan,et al.  B2: Bridging Code and Interactive Visualization in Computational Notebooks , 2020, UIST.

[30]  Dominik Moritz,et al.  mage: Fluid Moves Between Code and Graphical Work in Computational Notebooks , 2020, UIST.

[31]  Bilal Alsallakh,et al.  Captum: A unified and generic model interpretability library for PyTorch , 2020, ArXiv.

[32]  Steven Euijong Whang,et al.  Data collection and quality challenges for deep learning , 2020, Proc. VLDB Endow..

[33]  Silvia Miksch,et al.  NEVA: Visual Analytics to Identify Fraudulent Networks , 2020, Comput. Graph. Forum.

[34]  Sungsoo Ray Hong,et al.  Human Factors in Model Interpretability: Industry Practices, Challenges, and Needs , 2020, Proc. ACM Hum. Comput. Interact..

[35]  Uzma Haque Syeda,et al.  Design Study "Lite" Methodology: Expediting Design Studies and Enabling the Synergy of Visualization Pedagogy and Social Good , 2020, CHI.

[36]  Mark O. Riedl,et al.  Human-centered Explainable AI: Towards a Reflective Sociotechnical Approach , 2020, HCI.

[37]  Q. Liao,et al.  Questioning the AI: Informing Design Practices for Explainable AI User Experiences , 2020, CHI.

[38]  Natalia Gimelshein,et al.  PyTorch: An Imperative Style, High-Performance Deep Learning Library , 2019, NeurIPS.

[39]  Lauren Wilcox,et al.  "Hello AI": Uncovering the Onboarding Needs of Medical Practitioners for Human-AI Collaborative Decision-Making , 2019, Proc. ACM Hum. Comput. Interact..

[40]  Alejandro Barredo Arrieta,et al.  Explainable Artificial Intelligence (XAI): Concepts, Taxonomies, Opportunities and Challenges toward Responsible AI , 2019, Inf. Fusion.

[41]  Rich Caruana,et al.  InterpretML: A Unified Framework for Machine Learning Interpretability , 2019, ArXiv.

[42]  Ankur Taly,et al.  Explainable machine learning in deployment , 2019, FAT*.

[43]  Amit Dhurandhar,et al.  One Explanation Does Not Fit All: A Toolkit and Taxonomy of AI Explainability Techniques , 2019, ArXiv.

[44]  Mennatallah El-Assady,et al.  explAIner: A Visual Analytics Framework for Interactive and Explainable Machine Learning , 2019, IEEE Transactions on Visualization and Computer Graphics.

[45]  Alexa Hagerty,et al.  Global AI Ethics: A Review of the Social Impacts and Ethical Implications of Artificial Intelligence , 2019, ArXiv.

[46]  Martin Wattenberg,et al.  Human-Centered Tools for Coping with Imperfect Algorithms During Medical Decision-Making , 2019, CHI.

[47]  Arvind Satyanarayan,et al.  Altair: Interactive Statistical Visualizations for Python , 2018, J. Open Source Softw..

[48]  Amina Adadi,et al.  Peeking Inside the Black-Box: A Survey on Explainable Artificial Intelligence (XAI) , 2018, IEEE Access.

[49]  Leland McInnes,et al.  UMAP: Uniform Manifold Approximation and Projection , 2018, J. Open Source Softw..

[50]  Brad A. Myers,et al.  The Story in the Notebook: Exploratory Data Science using a Literate Programming Tool , 2018, CHI.

[51]  Peter Stone,et al.  Deep TAMER: Interactive Agent Shaping in High-Dimensional State Spaces , 2017, AAAI.

[52]  Tim Miller,et al.  Explanation in Artificial Intelligence: Insights from the Social Sciences , 2017, Artif. Intell..

[53]  Shane Legg,et al.  Deep Reinforcement Learning from Human Preferences , 2017, NIPS.

[54]  Scott Lundberg,et al.  A Unified Approach to Interpreting Model Predictions , 2017, NIPS.

[55]  Been Kim,et al.  Towards A Rigorous Science of Interpretable Machine Learning , 2017, 1702.08608.

[56]  Guan Wang,et al.  Interactive Learning from Policy-Dependent Human Feedback , 2017, ICML.

[57]  Jason Dykes,et al.  Action Design Research and Visualization Design , 2016, BELIV '16.

[58]  Sanjay Krishnan,et al.  ActiveClean: Interactive Data Cleaning For Statistical Modeling , 2016, Proc. VLDB Endow..

[59]  Sanjay Krishnan,et al.  Towards reliable interactive data cleaning: a user survey and recommendations , 2016, HILDA '16.

[60]  Miriah D. Meyer,et al.  Design Activity Framework for Visualization Design , 2014, IEEE Transactions on Visualization and Computer Graphics.

[61]  Helen Shen,et al.  Interactive notebooks: Sharing the code , 2014, Nature.

[62]  Tamara Munzner,et al.  Design Study Methodology: Reflections from the Trenches and the Stacks , 2012, IEEE Transactions on Visualization and Computer Graphics.

[63]  Gillian R. Hayes The relationship of action research to human-computer interaction , 2011, TCHI.

[64]  Gaël Varoquaux,et al.  Scikit-learn: Machine Learning in Python , 2011, J. Mach. Learn. Res..

[65]  John T. Stasko,et al.  The Science of Interaction , 2009, Inf. Vis..

[66]  P. Stone,et al.  TAMER: Training an Agent Manually via Evaluative Reinforcement , 2008, 2008 7th IEEE International Conference on Development and Learning.

[67]  Gloria Mark,et al.  The cost of interrupted work: more speed and stress , 2008, CHI.

[68]  John D. Hunter,et al.  Matplotlib: A 2D Graphics Environment , 2007, Computing in Science & Engineering.

[69]  Benjamin B. Bederson,et al.  Interfaces for staying in the flow , 2004, UBIQ.

[70]  Matthias Schwab,et al.  Making scientific computations reproducible , 2000, Comput. Sci. Eng..

[71]  Mark S. Ackerman,et al.  The Intellectual Challenge of CSCW: The Gap Between Social Requirements and Technical Feasibility , 2000, Hum. Comput. Interact..

[72]  Sray Agarwal,et al.  Explainability , 2021, Responsible AI.

[73]  Silvia Miksch,et al.  EVA: Visual Analytics to Identify Fraudulent Events , 2018, IEEE Transactions on Visualization and Computer Graphics.

[74]  Johannes Fürnkranz,et al.  A Survey of Preference-Based Reinforcement Learning Methods , 2017, J. Mach. Learn. Res..

[75]  et al.,et al.  Jupyter Notebooks - a publishing format for reproducible computational workflows , 2016, ELPUB.

[76]  Tom Routen,et al.  Intelligent Tutoring Systems , 1996, Lecture Notes in Computer Science.

[77]  D. Knuth Literate Programming , 1984, Comput. J..