Skip to main content
QUICK REVIEW

[Paper Review] Explaining Black Boxes on Sequential Data using Weighted Automata

Stéphane Ayache, Rémi Eyraud|arXiv (Cornell University)|Oct 12, 2018
Machine Learning and AlgorithmsComputer Science10 references17 citations
TL;DR

This paper proposes a spectral algorithm to extract weighted automata (WAs) from black-box models that assign real-valued outputs to sequential symbolic data, without requiring access to training data or internal representations. By querying the black box as an oracle, the method infers a WA that approximates the model’s behavior with high fidelity, achieving near-optimal performance even with small state counts, as demonstrated on RNNs trained on 48 synthetic and 2 real datasets.

ABSTRACT

Understanding how a learned black box works is of crucial interest for the future of Machine Learning. In this paper, we pioneer the question of the global interpretability of learned black box models that assign numerical values to symbolic sequential data. To tackle that task, we propose a spectral algorithm for the extraction of weighted automata (WA) from such black boxes. This algorithm does not require the access to a dataset or to the inner representation of the black box: the inferred model can be obtained solely by querying the black box, feeding it with inputs and analyzing its outputs. Experiments using Recurrent Neural Networks (RNN) trained on a wide collection of 48 synthetic datasets and 2 real datasets show that the obtained approximation is of great quality.

Motivation & Objective

  • To address the challenge of global interpretability for black-box models processing sequential symbolic data.
  • To develop a method that extracts a weighted automaton (WA) from a black box without access to training data or internal model structure.
  • To enable the approximation of complex, non-linear models like RNNs using simpler, interpretable WAs.
  • To evaluate the quality of WA extraction on both synthetic and real-world sequential datasets.
  • To demonstrate that WA approximations can achieve high performance with low state counts, enhancing interpretability and efficiency.

Proposed method

  • The method treats the black box as an oracle, feeding it sequences and analyzing its real-valued outputs to infer a weighted automaton.
  • A spectral algorithm is used to extract the WA by leveraging a linear algebraic framework based on prefix and suffix basis vectors.
  • The algorithm constructs a basis of prefixes and suffixes from input sequences and uses their inner products to estimate transition and emission weights.
  • The rank of the resulting low-rank approximation controls the complexity and accuracy of the extracted WA.
  • The approach relies on the fact that the black-box function can be represented as a bilinear form over the basis, enabling spectral decomposition.
  • The final WA is trained to minimize perplexity or NDCG scores, measuring fidelity to the original black-box outputs.

Experimental results

Research questions

  • RQ1Can a weighted automaton be effectively extracted from a black-box model that maps sequences to real values, without access to its internal structure or training data?
  • RQ2How well can the extracted WA approximate the behavior of a recurrent neural network on sequential data?
  • RQ3What is the impact of the rank and basis size on the quality of the WA approximation?
  • RQ4Can the extracted WA provide a meaningful, interpretable representation of the black-box model’s decision process?
  • RQ5Does the spectral WA extraction method achieve competitive performance compared to the original black-box model?

Key findings

  • The extracted weighted automata achieve perplexity scores very close to the RNN’s own entropy, with a perplexity of 1.35 on the real dataset PAutomaC Nat. 2 compared to the optimal 1.25.
  • Even with as few as 25 states, the WA approximations achieve near-optimal performance, indicating strong generalization with low complexity.
  • Increasing the basis size (e.g., from 300 to 400 prefixes and suffixes) significantly improves NDCG@5 scores, suggesting larger bases enhance approximation quality.
  • The quality of the WA improves with higher rank, but reasonable performance is already achieved at low ranks, supporting the use of compact, interpretable models.
  • The method demonstrates robustness across diverse tasks, including synthetic sequence generation and real NLP datasets like SPiCe and PAutomaC.
  • The approach enables efficient inference, as WA computation involves only matrix products per symbol, unlike the non-linear operations in RNNs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.