visualization of hidden node activity in a feed forward neural network

48
Visualization of hidden node activity in a feed forward neural network Adam Arvay

Upload: lecea

Post on 23-Feb-2016

63 views

Category:

Documents


0 download

DESCRIPTION

Visualization of hidden node activity in a feed forward neural network. Adam Arvay. Feed forward neural networks. Function finding device Learns a function to transform a set of inputs into the desired output Uses supervised learning. Network building software. PyBrain v0.3 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Visualization of hidden node activity in a feed forward neural network

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

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

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

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

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

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

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

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

Mean squared error

Page 10: Visualization of hidden node activity in a feed forward neural network

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

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

Network state

Page 13: Visualization of hidden node activity in a feed forward neural network

Network state

Page 14: Visualization of hidden node activity in a feed forward neural network

Network state

Page 15: Visualization of hidden node activity in a feed forward neural network

Network state all connections

Page 16: Visualization of hidden node activity in a feed forward neural network

Network state all connections with all labels

Page 17: Visualization of hidden node activity in a feed forward neural network

Network state 7 nodes no labels

Page 18: Visualization of hidden node activity in a feed forward neural network

Network state 7 nodes

Page 19: Visualization of hidden node activity in a feed forward neural network

Network state 7 nodes

Page 20: Visualization of hidden node activity in a feed forward neural network

Network state 10 nodes

Page 21: Visualization of hidden node activity in a feed forward neural network

Network state 10 nodes

Page 22: Visualization of hidden node activity in a feed forward neural network

Network state 10 all connections

Page 23: Visualization of hidden node activity in a feed forward neural network

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

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

4 nodes, setosa

Page 26: Visualization of hidden node activity in a feed forward neural network

4 nodes, versacolor

Page 27: Visualization of hidden node activity in a feed forward neural network

4 nodes, virginica

Page 28: Visualization of hidden node activity in a feed forward neural network

7 nodes setosa

Page 29: Visualization of hidden node activity in a feed forward neural network

7 nodes versacolor

Page 30: Visualization of hidden node activity in a feed forward neural network

7 nodes virginica

Page 31: Visualization of hidden node activity in a feed forward neural network

10 nodes setosa

Page 32: Visualization of hidden node activity in a feed forward neural network

10 nodes versacolor

Page 33: Visualization of hidden node activity in a feed forward neural network

10 nodes virginica

Page 34: Visualization of hidden node activity in a feed forward neural network

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

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

Hidden node sensitivity

Page 37: Visualization of hidden node activity in a feed forward neural network

Hidden node sensitivity

Page 38: Visualization of hidden node activity in a feed forward neural network

Hidden node sensitivity

Page 39: Visualization of hidden node activity in a feed forward neural network

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

Weighted sensitivity

Page 41: Visualization of hidden node activity in a feed forward neural network

Weighted sensitivity

Page 42: Visualization of hidden node activity in a feed forward neural network

Weighted sensitivity

Page 43: Visualization of hidden node activity in a feed forward neural network

Comparisonnon-weighted vs weighted

Page 44: Visualization of hidden node activity in a feed forward neural network

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

Activation scatter setosa

Page 46: Visualization of hidden node activity in a feed forward neural network

Activation scatter versacolor

Page 47: Visualization of hidden node activity in a feed forward neural network

Activation scatter virginica

Page 48: Visualization of hidden node activity in a feed forward neural network

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