Analysis of Video Feature Learning in Two-Stream CNNs on the Example of Zebrafish Swim Bout Classification

Semmelhack et al . ( 2014 ) have achieved high classification accuracy in distinguishing swim bouts of zebrafish using a Support Vector Machine ( SVM ) . Convolutional Neural Networks ( CNNs ) have reached superior performance in various image recognition tasks over SVMs , but their learnt features are not immediately visible . Reaching better transparency helps to build trust in their classifications and makes learned features interpretable to experts . Using a recently developed technique called Deep Taylor Decomposition , we generated heatmaps to highlight input regions of high relevance for predictions . We find that our CNN makes predictions by analyzing the steadiness of the tail ’ s trunk , which markedly differs from the manually extracted features used by Semmelhack et al . ( 2014 ) . We further uncovered that the network paid attention to experimental artifacts . Removing these artifacts ensured the validity of predictions . After correction , our best CNN beats the SVM by 6.12 % , achieving a classification accuracy of 96.32 % . Our work thus demonstrates the utility of AI explainability for CNNs . 1 INTRODUCTION . In the study by Semmelhack et al . ( 2014 ) , a well-performing classifier allowed to correlate neural interventions with behavioral changes . Support Vector Machines ( SVMs ) were commonly applied to such classification tasks , relying on feature engineering by domain experts . In recent years , Convolutional Neural Networks ( CNNs ) have proven to reach high accuracies in classification tasks on images and videos reducing the need for manual feature engineering . After Lecun & Bengio ( 1995 ) introduced them in the 90s , CNNs had their break-through in the competition ILSVRC2012 with the architecture of Krizhevsky et al . ( 2012 ) . Since then , more and more sophisticated architectures have been designed enabling them to identify increasingly abstract features . This development has become possible due to the availability of larger training sets , computing resources , GPU training implementations , and better regularization techniques , such as Dropout ( Hinton et al . ( 2012 ) ; Zeiler & Fergus ( 2014 ) ) . While these more complex deep neural network architectures achieved better results , they also kept their learnt features hidden if not further analyzed . This caused CNNs to come with significant drawbacks : a lack of trust in their classifications , missing interpretability of learned features in the application domain , and the absence of hints as to what data could enhance performance ( Molnar ( 2019 ) ) . Explaining the decisions made by CNNs might even become a legal requirement in certain applications ( Alber et al . ( 2018 ) ) . In order to overcome these drawbacks , subsequent research has developed approaches to shed light on the inner workings of CNNs . These approaches have been successfully used for uncovering how CNNs might learn unintended spurious correlations , termed “ Clever Hans ” predictions ( Lapuschkin et al . ( 2019 ) ) . Such predictions could even become harmful if the predictions entailed decisions with severe consequences ( Leslie ( 2019 ) ) . Also , since deep neural networks have become a popular machine learning technique in applied domains , spurious correlations would undermine scientific discoveries . This paper focuses on zebrafish research as an applied domain of AI explainability , considering that the research community around this organism has grown immensely . The zebrafish is an excellent model organism for vertebrates , including humans , due to the following four reasons : The genetic codes of humans and zebrafish are about 70 % orthologue ( Howe et al . ( 2013 ) ) . The fish are translucent which allows non-invasive observation of changes in the organism ( Bianco et al . ( 2011 ) ) . Furthermore , zebrafish are relatively cheap to maintain , produce plenty of offspring , and develop rapidly . Finally , they are capable of recovering their brain structures within days after brain injury ( Kishimoto et al . ( 2011 ) ; Kizil et al . ( 2012 ) ) . In this paper , we adapt CNNs to work on highly controlled zebrafish video recordings and show the utility of a recently developed AI explainability technique on this task . We train the network on optical flow for binary classifying swim bouts and achieve superior performance when compared to the current state-of-the-art in bout classification ( Semmelhack et al . ( 2014 ) ) . We then create heatmaps over the videos with the “ iNNvestigate ” toolbox ( Alber et al . ( 2018 ) ) which highlight the areas that our CNN pays attention to when making a prediction . The resulting heatmaps show that our CNN learns reasonable features which are very different from those manually composed by Semmelhack et al . ( 2014 ) . 2 RELATED WORK . In the following , we will give an overview over relevant CNN architectures and approaches . Then , we will summarize existing AI explainability approaches focusing on attribution techniques . Finally , we highlight important studies of behavioral zebrafish research and give details of the study by Semmelhack et al . ( 2014 ) . CNN architectures . Carreira & Zisserman ( 2017 ) identified five relevant types of video architectures : CNN + LSTM ( Long-Short-Term Memory ) , 3D-CNN ( Ji et al . ( 2013 ) ) , Two-Stream ( Simonyan & Zisserman ( 2014 ) ) , 3D-Fused Two-Stream , and Two-Stream 3D-CNN . They differ in whether the convolutions are based on 2D or 3D kernels , whether optical flow is added , and how consecutive frames exchange information . Optical flow can be described as the horizontal and vertical displacement of a pixel from one frame to the next ( Farnebäck ( 2003 ) ) . Several algorithms for flow calculation exist , such as TV-L1 ( Zach et al . ( 2007 ) ) , Brox ( Brox et al . ( 2004 ) ) , and Farneback ( Farnebäck ( 2003 ) ) . Even novel deep learning approaches have been developed , e.g . FlowNet ( Dosovitskiy et al . ( 2015 ) ; Ilg et al . ( 2017 ) ) . Carreira & Zisserman ( 2017 ) initialized several CNN architectures with pre-trained weights and trained them on human action recognition datasets to show the benefits of transfer learning in video classifiers . Previous studies had shown this for images ( Shin et al . ( 2016 ) ) . Also , they found that adding a temporal stream based on optical flow always improved performance . This idea of a network with a spatial stream for appearance and a temporal stream for motion had been first developed by Simonyan & Zisserman ( 2014 ) . AI explainability techniques . Current AI explainability techniques on images can be largely categorized into two types : attribution and feature visualization ( Olah et al . ( 2017 ) ) . Attribution relates regions of a sample image to activations of units in the CNN , while feature visualization uncovers what kinds of inputs strongly activate a particular unit . One of the earlier and quite successful attribution approaches is called Sensitivity Analysis ( Simonyan et al . ( 2014 ) ) . It is based on the idea that if a single pixel were marginally changed , the prediction would worsen significantly for an important pixel , but only slightly for less important ones . Furthermore , Zeiler & Fergus ( 2014 ) and Ribeiro et al . ( 2016 ) showed simple ways of producing approximate relevance heatmaps . By occluding parts of an image one by one and observing the change in activation , they could measure the influence of different image regions . This allowed them to check whether the CNN focused on the important objects of the image or performed its classification only based on contextual information . The technique applied in this paper is called Deep Taylor Decomposition ( Montavon et al . ( 2017 ) ) , which arose from Layer-Wise Relevance Propagation ( Bach et al . ( 2015 ) ) . It has been put into use with text ( Arras et al . ( 2017 ) ) , speech ( Becker et al . ( 2018 ) ) , and only once with video data ( Anders et al . ( 2018 ) ) . It highlights the areas in a sample image which the CNN deems most relevant for making a correct classification . We assume that the relevance of a pixel is determined by how much the classification accuracy would deteriorate if we altered this pixel . DTD distributes relevance from the output layer to the input layer by applying specific propagation rules for each layer . This approach equals a first-order Taylor decomposition of the output function . The authors argue that it yields a better approximation of relevance than Sensitivity Analysis . Alber et al . ( 2018 ) included this technique in their “ iNNvestigate ” toolbox , which we used in our work . Apart from attribution techniques , CNNs can be explained using direct feature visualization approaches . They try to find intuitive representations of the patterns a given unit responds to particularly strongly or weakly . Among these are deconvolution networks ( Zeiler & Fergus ( 2014 ) ) , which are closely related to Sensitivity Analysis , and optimization approaches in the input domain ( Erhan et al . ( 2009 ) ; Olah et al . ( 2018 ) ) . Also , instead of creating an abstract representation of features , one can select specific samples which highly activate or suppress a particular unit . Bau et al . ( 2017 ) even went a step further by hiding irrelevant parts of the input image , similar to LIME ( Ribeiro et al . ( 2016 ) ) . Behavioral zebrafish research . As we argue in Section 1 , zebrafish are a highly suitable model organism for the human body . They serve as the object of study in many fields , such as wound repair ( Kishimoto et al . ( 2011 ) ; Kizil et al . ( 2012 ) ) , visual processing in the brain ( Roeser & Baier ( 2003 ) ; Gahtan ( 2005 ) ; Semmelhack et al . ( 2014 ) ; Temizer et al . ( 2015 ) ) , cancer research ( White et al . ( 2013 ) ) , and genetic modifications ( Hwang et al . ( 2013 ) ) . Especially in neuroscientific research , understanding behavior and behavioral changes in response to cerebral interventions is of high importance ( Krakauer et al . ( 2017 ) ) . Previous studies therefore closely investigated the motion patterns of zebrafish ( Borla et al . ( 2002 ) ; McElligott & O ’ Malley ( 2005 ) ) . Borla et al . ( 2002 ) described characteristic motion patterns during prey bouts , such as the precise bending of the very tip of the tail to bring the head into position and the subsequent strong arching of the tail ’ s center . Based on their observations , they concluded that zebrafish must possess fine axial motor control in all parts of their tail . Given that prey movements can be clearly distinguished from other types of movements , Semmelhack et al . ( 2014 ) hypothesized that there must be a dedicated circuitry in the zebrafish brain . They found a pathway from retinal ganglion cells to an area called AF7 projecting to the optic tectum , the nucleus of the medial longitudinal fasciculus , and the hindbrain , which in turn produces the characteristic motor output . They verified their findings by ablating the AF7 neuropil and observing that lesioned fish failed to respond to prey stimuli with a movement that a trained SVM would classify as prey . They have identified the following five features as the most discriminating ones , ordered by descending importance : 1 . Maximum tail curvature ( maximum over the bout ) 2 . Number of peaks in tail angle 3 . Mean tip angle ( absolute value of tip angle in each frame , average over the bout ) 4 . Maximum tail angle ( maximum over the bout ) 5 . Mean tip position ( average position of last eight points in tail , with horizontal deflection as a fraction of the tail length ) In our work , we make use of the dataset they gathered for training their SVM and compare our CNN to the features above .

Summary: the paper uses model interpretation techniques to understand blackbox CNN fit of zebrafish videos. they show that, relying on the technique of deep taylor decomposition, their CNN relies its prediction on a different part of zebra fish than existing understanding. it is also able to detect the use of experimental artifacts, whose removal improves predictive performance.