Table of Contents
Fetching ...

Explainable AI for Embedded Systems Design: A Case Study of Static Redundant NVM Memory Write Prediction

Abdoulaye Gamatié, Yuyang Wang

TL;DR

This paper tackles static silent store prediction in embedded systems and applies explainable AI to reveal the reasoning behind ML-driven decisions that affect memory writes. It formulates silent-store prediction as a binary classification problem and uses SHAP and Anchors to produce global and local explanations based on static program features, with evaluation anchored by precision and recall metrics $precision = \frac{TP}{TP+FP}$ and $recall = \frac{TP}{TP+FN}$. A neural-network model trained on 76 features derived from an 89K silent-store dataset demonstrates moderate accuracy ($\text{precision} \approx 0.60$, $\text{recall} \approx 0.29$), while explanations align with known causes such as frequent zero-value stores and certain non-silent patterns, supporting the viability of XAI in embedded design. The study highlights practical insights and pitfalls for integrating XAI into compiler and hardware design to reduce memory writes in non-volatile memories and stresses the need for careful dataset quality and precision-recall trade-offs for explainability.

Abstract

This paper investigates the application of eXplainable Artificial Intelligence (XAI) in the design of embedded systems using machine learning (ML). As a case study, it addresses the challenging problem of static silent store prediction. This involves identifying redundant memory writes based only on static program features. Eliminating such stores enhances performance and energy efficiency by reducing memory access and bus traffic, especially in the presence of emerging non-volatile memory technologies. To achieve this, we propose a methodology consisting of: 1) the development of relevant ML models for explaining silent store prediction, and 2) the application of XAI to explain these models. We employ two state-of-the-art model-agnostic XAI methods to analyze the causes of silent stores. Through the case study, we evaluate the effectiveness of the methods. We find that these methods provide explanations for silent store predictions, which are consistent with known causes of silent store occurrences from previous studies. Typically, this allows us to confirm the prevalence of silent stores in operations that write the zero constant into memory, or the absence of silent stores in operations involving loop induction variables. This suggests the potential relevance of XAI in analyzing ML models' decision in embedded system design. From the case study, we share some valuable insights and pitfalls we encountered. More generally, this study aims to lay the groundwork for future research in the emerging field of XAI for embedded system design.

Explainable AI for Embedded Systems Design: A Case Study of Static Redundant NVM Memory Write Prediction

TL;DR

This paper tackles static silent store prediction in embedded systems and applies explainable AI to reveal the reasoning behind ML-driven decisions that affect memory writes. It formulates silent-store prediction as a binary classification problem and uses SHAP and Anchors to produce global and local explanations based on static program features, with evaluation anchored by precision and recall metrics and . A neural-network model trained on 76 features derived from an 89K silent-store dataset demonstrates moderate accuracy (, ), while explanations align with known causes such as frequent zero-value stores and certain non-silent patterns, supporting the viability of XAI in embedded design. The study highlights practical insights and pitfalls for integrating XAI into compiler and hardware design to reduce memory writes in non-volatile memories and stresses the need for careful dataset quality and precision-recall trade-offs for explainability.

Abstract

This paper investigates the application of eXplainable Artificial Intelligence (XAI) in the design of embedded systems using machine learning (ML). As a case study, it addresses the challenging problem of static silent store prediction. This involves identifying redundant memory writes based only on static program features. Eliminating such stores enhances performance and energy efficiency by reducing memory access and bus traffic, especially in the presence of emerging non-volatile memory technologies. To achieve this, we propose a methodology consisting of: 1) the development of relevant ML models for explaining silent store prediction, and 2) the application of XAI to explain these models. We employ two state-of-the-art model-agnostic XAI methods to analyze the causes of silent stores. Through the case study, we evaluate the effectiveness of the methods. We find that these methods provide explanations for silent store predictions, which are consistent with known causes of silent store occurrences from previous studies. Typically, this allows us to confirm the prevalence of silent stores in operations that write the zero constant into memory, or the absence of silent stores in operations involving loop induction variables. This suggests the potential relevance of XAI in analyzing ML models' decision in embedded system design. From the case study, we share some valuable insights and pitfalls we encountered. More generally, this study aims to lay the groundwork for future research in the emerging field of XAI for embedded system design.
Paper Structure (21 sections, 5 equations, 6 figures)

This paper contains 21 sections, 5 equations, 6 figures.

Figures (6)

  • Figure 1: Static feature vectors specified within in C comments (lines 3, 4, 8 & 9)
  • Figure 2: SHAP beeswarm plot over 10 most significant features w.r.t. silentness prediction by the trained NN model
  • Figure 3: Ratio of silent stores vs combined SHAP values over 3- and 4-feature vectors for NN (each point denotes a vector)
  • Figure 4: Feature contribution to silentness, over a few $\phi^4$ vector samples in which Ozr, Smn and Msc always occur
  • Figure 5: Ratio of silent stores vs combined SHAP values for RF
  • ...and 1 more figures