| Literature DB >> 33977128 |
Zhiwu Xu1, Cheng Wen1, Shengchao Qin1,2, Mengda He2.
Abstract
Deep learning is one of the most advanced forms of machine learning. Most modern deep learning models are based on an artificial neural network, and benchmarking studies reveal that neural networks have produced results comparable to and in some cases superior to human experts. However, the generated neural networks are typically regarded as incomprehensible black-box models, which not only limits their applications, but also hinders testing and verifying. In this paper, we present an active learning framework to extract automata from neural network classifiers, which can help users to understand the classifiers. In more detail, we use Angluin's L* algorithm as a learner and the neural network under learning as an oracle, employing abstraction interpretation of the neural network for answering membership and equivalence queries. Our abstraction consists of value, symbol and word abstractions. The factors that may affect the abstraction are also discussed in the paper. We have implemented our approach in a prototype. To evaluate it, we have performed the prototype on a MNIST classifier and have identified that the abstraction with interval number 2 and block size 1 × 28 offers the best performance in terms of F1 score. We also have compared our extracted DFA against the DFAs learned via the passive learning algorithms provided in LearnLib and the experimental results show that our DFA gives a better performance on the MNIST dataset.Entities:
Keywords: Active learning; Automata learning; Neural network
Year: 2021 PMID: 33977128 PMCID: PMC8064235 DOI: 10.7717/peerj-cs.436
Source DB: PubMed Journal: PeerJ Comput Sci ISSN: 2376-5992
Figure 1The MAT framework.
Figure 2Framework of our approach.
Figure 3Example of simple abstraction.
Figure 4Example of value abstraction.
Figure 5Example of k-abstraction manipulation.
Figure 6Example of base-n symbol abstraction.
Figure 7Example of sum symbol abstraction.
Figure 8Example of k-shift manipulation.
Word abstraction function αw(in).
| 1: |
| 2: |
| 3: |
| 4: |
| 5: |
| 6: |
| 7: |
| 8: |
| 9: |
| 10: |
| 11: |
Figure 9Example of word abstraction.
Word Concretization Function γ(w).
| 1: |
| 2: |
| 3: |
| 4: |
| 5: |
| 6: |
| 7: |
| 8: |
| 9: |
| 10: |
Membership query M Q(w).
| 1: |
| 2: |
| 3: |
| 4: |
| 5: |
| 6: |
| 7: |
| 8: |
| 9: |
| 10: |
| 11: |
| 12: |
| 13: |
Equivalence query EQ(, ).
| 1: |
| 2: find a word w that separates |
| 3: |
| 4: |
| 5: |
| 6: if |
| 7: |
| 8: |
| 9: refine |
| 10: |
Flapped results on different k-value manipulations.
| Flaps | Ratio (%) | Flaps | Ratio (%) | ||||
|---|---|---|---|---|---|---|---|
| 2 | 1 | 3 | 0.005 | 2 | 10 | 6 | 0.010 |
| 2 | 100 | 32 | 0.053 | 2 | 500 | 276 | 0.461 |
| 3 | 1 | 0 | 0.000 | 3 | 10 | 5 | 0.008 |
| 3 | 100 | 16 | 0.027 | 3 | 500 | 43 | 0.072 |
| 5 | 1 | 0 | 0.000 | 5 | 10 | 0 | 0.000 |
| 5 | 100 | 10 | 0.017 | 5 | 500 | 16 | 0.027 |
| 10 | 1 | 1 | 0.002 | 10 | 10 | 0 | 0.000 |
| 10 | 100 | 5 | 0.008 | 10 | 500 | 6 | 0.015 |
Flapped results on k-shift manipulations.
| Flaps | Ratio (%) | Flaps | Ratio (%) | ||||||
|---|---|---|---|---|---|---|---|---|---|
| 1 | 28 | 1 | 0 | 0.000 | 28 | 1 | 1 | 4 | 0.007 |
| 1 | 28 | 4 | 33 | 0.055 | 28 | 1 | 4 | 376 | 0.628 |
| 1 | 28 | 28 | 5136 | 8.583 | 28 | 1 | 28 | 6608 | 11.043 |
| 2 | 28 | 1 | 10 | 0.017 | 28 | 2 | 1 | 105 | 0.175 |
| 2 | 28 | 2 | 109 | 0.182 | 28 | 2 | 2 | 879 | 1.469 |
| 2 | 28 | 14 | 5768 | 9.639 | 28 | 2 | 14 | 6615 | 11.055 |
| 4 | 28 | 1 | 382 | 0.638 | 28 | 4 | 1 | 1018 | 1.701 |
| 4 | 28 | 7 | 6284 | 10.502 | 28 | 4 | 7 | 6617 | 11.058 |
| 7 | 28 | 1 | 1273 | 2.127 | 28 | 7 | 1 | 2077 | 3.471 |
| 7 | 28 | 4 | 6684 | 11.170 | 28 | 7 | 4 | 6620 | 11.063 |
| 14 | 28 | 1 | 3050 | 5.097 | 28 | 14 | 1 | 3766 | 6.294 |
| 14 | 28 | 2 | 6436 | 10.756 | 28 | 14 | 2 | 6431 | 10.747 |
| 28 | 28 | 1 | 6425 | 10.737 | – | – | – | – | – |
Conflict results on different abstractions.
| TW | PW | NW | CPW | CNW | CPD | CND | ||
|---|---|---|---|---|---|---|---|---|
| 1 | 28 | 59745 | 6605 | 53140 | 0 | 0 | 0 | 0 |
| 2 | 28 | 59640 | 6500 | 53140 | 0 | 0 | 0 | 0 |
| 4 | 28 | 58817 | 5755 | 53062 | 15 | 0 | 0 | 15 |
| 7 | 28 | 53912 | 4501 | 49411 | 246 | 11 | 11 | 248 |
| 14 | 28 | 5444 | 248 | 5196 | 163 | 544 | 2577 | 1367 |
| 28 | 1 | 59708 | 6569 | 53139 | 1 | 0 | 0 | 1 |
| 28 | 2 | 59321 | 6195 | 53126 | 8 | 0 | 0 | 8 |
| 28 | 4 | 55944 | 4512 | 51432 | 421 | 80 | 81 | 431 |
| 28 | 7 | 36535 | 1414 | 35121 | 490 | 744 | 2276 | 1333 |
| 28 | 14 | 5229 | 734 | 4495 | 327 | 871 | 3196 | 1195 |
| 28 | 28 | 239 | 37 | 202 | 24 | 79 | 3765 | 1204 |
Word complexities on different abstractions.
| dSize | Size | Length | dSize | Size | Length | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 | 1 | 28 | 21 | 29 | 28 | 2 | 28 | 1 | 21 | 29 | 28 |
| 2 | 2 | 28 | 41 | 57 | 14 | 2 | 28 | 2 | 41 | 57 | 14 |
| 2 | 4 | 28 | 48 | 113 | 7 | 2 | 28 | 4 | 81 | 113 | 7 |
| 2 | 7 | 28 | 126 | 197 | 4 | 2 | 28 | 7 | 124 | 197 | 4 |
| 2 | 14 | 28 | 143 | 393 | 2 | 2 | 28 | 14 | 146 | 393 | 2 |
| 2 | 28 | 28 | 244 | 785 | 1 | – | – | – | – | – | – |
Automata performance under different abstractions.
| wPre (%) | wRec (%) | wAcc (%) | wF1 (%) | dPre (%) | dRec (%) | dAcc (%) | dF1 (%) | ||
|---|---|---|---|---|---|---|---|---|---|
| 1 | 28 | 55.041 | 70.782 | 90.176 | 61.927 | 55.288 | 70.988 | 90.184 | 62.162 |
| 2 | 28 | 54.830 | 70.321 | 90.142 | 61.617 | 55.203 | 70.635 | 90.154 | 61.973 |
| 28 | 1 | 44.382 | 70.035 | 86.691 | 54.333 | 44.569 | 70.194 | 86.699 | 54.521 |
| 28 | 2 | 42.904 | 69.686 | 86.232 | 53.110 | 43.466 | 70.106 | 86.248 | 53.662 |
| 28 | 28 | 100.000 | 66.667 | 94.064 | 80.000 | 74.472 | 40.388 | 91.657 | 52.373 |
Learning complexities under different abstractions.
| aTime | xTime | iTime | aState | xState | iState | ||
|---|---|---|---|---|---|---|---|
| 1 | 28 | 29150.5 | 47761.8 | 16393.2 | 579 | 949 | 251 |
| 2 | 28 | 8145.3 | 15833.9 | 2838.4 | 299.3 | 495 | 139 |
| 28 | 1 | 16164.0 | 65525.8 | 75.7 | 801.1 | 2213 | 239 |
| 28 | 2 | 6492.4 | 12650.5 | 214.6 | 309.3 | 499 | 97 |
| 28 | 28 | 5.9 | 11.8 | 0.1 | 2 | 2 | 2 |
Figure 10DFA learned via abstraction with 14 × 28.
Figure 11DFA learned via abstraction with 7×28.
Figure 12DFA learned via abstraction with 1 × 28.
Comparison against the passive DFAs and the MNIST classifier.
| Model | wPre (%) | wRec (%) | wAcc (%) | wF1 (%) | dPre (%) | dRec(%) | dAcc (%) | dF1 (%) |
|---|---|---|---|---|---|---|---|---|
| Ours | 55.041 | 70.782 | 90.176 | 61.927 | 55.288 | 70.988 | 90.184 | 62.162 |
| RPNI | 46.170 | 59.947 | 87.590 | 52.164 | 46.463 | 60.229 | 87.600 | 52.458 |
| RPNI-MDL | 15.599 | 99.911 | 38.974 | 26.985 | 15.693 | 99.912 | 39.022 | 27.125 |
| RPNI-EDSM | 19.407 | 98.313 | 53.729 | 32.416 | 19.520 | 98.325 | 53.766 | 32.574 |
| CNN | – | – | – | – | 99.69 | 99.40 | 99.06 | 98.63 |
Figure 13The F1 scores with respect to words and input data via the abstraction 2 × 28.