![Page 1: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/1.jpg)
Visualization of hidden node activity in a feed forward neural network
Adam Arvay
![Page 2: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/2.jpg)
Feed forward neural networks
• Function finding device• Learns a function to transform a set of inputs
into the desired output• Uses supervised learning
![Page 3: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/3.jpg)
Network building software
• PyBrain v0.3• Modular machine learning library for Python• PyBrain is short for Python-Based
Reinforcement Learning, Artificial Intelligence and Neural Network Library
![Page 4: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/4.jpg)
Visualization tools
• NetworkX– Used for keeping track of node names and edges
• matplotlib/pyplot/pylab– Drawing everything
![Page 5: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/5.jpg)
Data set
• Iris data set• 150 total data points• 4 inputs• 3 outputs (classifications)• 50 of each classification type• CSV file
![Page 6: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/6.jpg)
Networks analyzed
• 3 networks were constructed with different numbers of hidden layers– 4 input nodes (linear)– 4, 7, 10 hidden nodes (sigmoid)– 3 output nodes (softmax)
• Trained with back-propigation• Training/validation data selected randomly• 250 epochs
![Page 7: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/7.jpg)
Visualizations
• Mean squared errors during training• Network state• Average activation levels• Absolute hidden node sensitivity• Weighted hidden node sensitivity• Activation scatter
![Page 8: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/8.jpg)
Mean squared error
• Quick way to evaluate training efficacy• Plot the error vs. training time (epochs)• Expect error to go down with increased
training• Greatly depends on quality of training data
![Page 9: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/9.jpg)
Mean squared error
![Page 10: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/10.jpg)
Network state visualization
• Displays abstract logical connections between nodes in a spatial layout
• Size to represent activation level• Colored and line style used to depict
connection type. Black for positive, red dashed for negative
![Page 11: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/11.jpg)
Network state visualization
• A snapshot of what the network is currently doing
• Interactivity:– Shows the state of the network under a particular
activation– Visible edge threshold magnitude can be set– Edges can be labeled
![Page 12: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/12.jpg)
Network state
![Page 13: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/13.jpg)
Network state
![Page 14: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/14.jpg)
Network state
![Page 15: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/15.jpg)
Network state all connections
![Page 16: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/16.jpg)
Network state all connections with all labels
![Page 17: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/17.jpg)
Network state 7 nodes no labels
![Page 18: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/18.jpg)
Network state 7 nodes
![Page 19: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/19.jpg)
Network state 7 nodes
![Page 20: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/20.jpg)
Network state 10 nodes
![Page 21: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/21.jpg)
Network state 10 nodes
![Page 22: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/22.jpg)
Network state 10 all connections
![Page 23: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/23.jpg)
Network state
• Gives information about current state of network
• Interactive• Can get cluttered with many nodes and
connections• Difficult to see trends
![Page 24: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/24.jpg)
Average activation levels
• Gives an idea of the network behavior over time for a particular classification type
• Can detect pattern differences in hidden layer between classification types
• Shows the average activation level of a hidden node across a classification type
• No interactivity
![Page 25: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/25.jpg)
4 nodes, setosa
![Page 26: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/26.jpg)
4 nodes, versacolor
![Page 27: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/27.jpg)
4 nodes, virginica
![Page 28: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/28.jpg)
7 nodes setosa
![Page 29: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/29.jpg)
7 nodes versacolor
![Page 30: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/30.jpg)
7 nodes virginica
![Page 31: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/31.jpg)
10 nodes setosa
![Page 32: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/32.jpg)
10 nodes versacolor
![Page 33: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/33.jpg)
10 nodes virginica
![Page 34: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/34.jpg)
Average activation
• Can see some patterns between classificaitons
• Easy to spot changes and non-changes
• Doesn’t depict the variance in the activations
![Page 35: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/35.jpg)
Absolute hidden node sensitivity
• A quick way to determine the sensitivity of a hidden node to its inputs
• Can detect nodes which are insensitive to all inputs
• Can detect which inputs are ignored by all nodes
• Can detect patterns of connections across nodes
![Page 36: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/36.jpg)
Hidden node sensitivity
![Page 37: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/37.jpg)
Hidden node sensitivity
![Page 38: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/38.jpg)
Hidden node sensitivity
![Page 39: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/39.jpg)
Weighted sensitivity
• Accounts for differences in magnitude of the input parameters
• In the iris data set, the first input has a much larger average value than the last input.
• Normalizes the weights to the inputs
![Page 40: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/40.jpg)
Weighted sensitivity
![Page 41: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/41.jpg)
Weighted sensitivity
![Page 42: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/42.jpg)
Weighted sensitivity
![Page 43: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/43.jpg)
Comparisonnon-weighted vs weighted
![Page 44: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/44.jpg)
Activation scatter
• Used along with average activation to get more information about the activation activity of hidden nodes across a classification type
• Can get a sense of the variance of a particular node
• Color used to represent a node along with data labels.
![Page 45: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/45.jpg)
Activation scatter setosa
![Page 46: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/46.jpg)
Activation scatter versacolor
![Page 47: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/47.jpg)
Activation scatter virginica
![Page 48: Visualization of hidden node activity in a feed forward neural network](https://reader036.vdocuments.site/reader036/viewer/2022062410/56816455550346895dd621fd/html5/thumbnails/48.jpg)
Conclusion
• 4 main visualization tools– Training data– Network state– Average activation– Hidden node sensitivity
• Designed to be used with 3 layer networks with arbitrary number of nodes per layer