Cognitive Psychology for Deep Neural Networks: a Shape Bias Case Study
Total Page:16
File Type:pdf, Size:1020Kb
Cognitive Psychology for Deep Neural Networks: A Shape Bias Case Study Samuel Ritter * 1 David G.T. Barrett * 1 Adam Santoro 1 Matt M. Botvinick 1 Abstract to think of these models as black boxes, and to question whether they can be understood at all (Bornstein, 2016; Deep neural networks (DNNs) have advanced Lipton, 2016). This opacity obstructs both basic research performance on a wide range of complex tasks, seeking to improve these models, and applications of these rapidly outpacing our understanding of the na- models to real world problems (Caruana et al., 2015). ture of their solutions. While past work sought to advance our understanding of these models, Recent pushes have aimed to better understand DNNs: none has made use of the rich history of problem tailor-made loss functions and architectures produce more descriptions, theories, and experimental methods interpretable features (Higgins et al., 2016; Raposo et al., developed by cognitive psychologists to study 2017) while output-behavior analyses unveil previously the human mind. To explore the potential value opaque operations of these networks (Karpathy et al., of these tools, we chose a well-established analy- 2015). Parallel to this work, neuroscience-inspired meth- sis from developmental psychology that explains ods such as activation visualization (Li et al., 2015), abla- how children learn word labels for objects, and tion analysis (Zeiler & Fergus, 2014) and activation maxi- applied that analysis to DNNs. Using datasets mization (Yosinski et al., 2015) have also been applied. of stimuli inspired by the original cognitive psy- Altogether, this line of research developed a set of promis- chology experiments, we find that state-of-the-art ing tools for understanding DNNs, each paper producing one shot learning models trained on ImageNet a glimmer of insight. Here, we propose another tool for exhibit a similar bias to that observed in hu- the kit, leveraging methods inspired not by neuroscience, mans: they prefer to categorize objects accord- but instead by psychology. Cognitive psychologists have ing to shape rather than color. The magnitude long wrestled with the problem of understanding another of this shape bias varies greatly among archi- opaque intelligent system: the human mind. We contend tecturally identical, but differently seeded mod- that the search for a better understanding of DNNs may els, and even fluctuates within seeds through- profit from the rich heritage of problem descriptions, the- out training, despite nearly equivalent classifi- ories, and experimental tools developed in cognitive psy- cation performance. These results demonstrate chology. To test this belief, we performed a proof-of- the capability of tools from cognitive psychology concept study on state-of-the-art DNNs that solve a par- for exposing hidden computational properties of ticularly challenging task: one-shot word learning. Specif- DNNs, while concurrently providing us with a ically, we investigate Matching Networks (MNs) (Vinyals computational model for human word learning. et al., 2016), which have state-of-the-art one-shot learning performance on ImageNet and we investigate an Inception Baseline model (Szegedy et al., 2015a). 1. Introduction Following the approach used in cognitive psychology, we During the last half-decade deep learning has significantly began by hypothesizing an inductive bias our model may improved performance on a variety of tasks (for a review, use to solve a word learning task. Research in develop- see LeCun et al.(2015)). However, deep neural network mental psychology shows that when learning new words, (DNN) solutions remain poorly understood, leaving many humans tend to assign the same name to similarly shaped items rather than to items with similar color, texture, or *Equal contribution 1DeepMind, London, UK. Correspon- dence to: Samuel Ritter <[email protected]>, David G.T. Bar- size. To test the hypothesis that our DNNs discover this rett <[email protected]>. same “shape bias”, we probed our models using datasets and an experimental setup based on the original shape bias th Proceedings of the 34 International Conference on Machine studies (Landau et al., 1988). Learning, Sydney, Australia, PMLR 70, 2017. Copyright 2017 by the author(s). Cognitive Psychology for Deep Neural Networks: A Shape Bias Case Study Our results are as follows: 1) Inception networks trained on age, or the number of nodes given a scan of tumor. Indeed, ImageNet do indeed display a strong shape bias. 2) There one way to articulate the difficulty in understanding DNNs is high variance in the bias between Inception networks is to say that we often can’t intuitively describe these con- initialized with different random seeds, demonstrating that junctions of features h(x); although we often have numeri- otherwise identical networks converge to qualitatively dif- cal representations in intermediate DNN layers, they’re of- ferent solutions. 3) MNs also have a strong shape bias, and ten too arcane for us to interpret. this bias closely mimics the bias of the Inception model We advocate for addressing this problem using the follow- that provides input to the MN. 4) By emulating the shape ing hypothesis-driven approach: First, propose a property bias observed in children, these models provide a candidate h (x) that the model may be using. Critically, it’s not nec- computational account for human one-shot word learning. p essary that h (x) be a function that can be evaluated using Altogether, these results show that the technique of testing p an automated method. Instead, the intention is that h (x) hypothesized biases using probe datasets can yield both ex- p is a function that humans (e.g. ML researchers and practi- pected and surprising insights about solutions discovered tioners) can intuitively evaluate. h (x) should be a prop- by trained DNNs1. p erty that is believed to be relevant to the problem, such as object shape or number of tumor nodes. 2. Inductive Biases, Statistical Learners and After proposing a property, the next step is to generate pre- Probe Datasets dictions about how the model should behave when given Before we delve into the specifics of the shape bias and various inputs, if in fact it uses a bias with respect to the one-shot word learning, we will describe our approach in property hp(x). Then, construct and carry out an experi- the general context of inductive biases, probe datasets, and ment wherein those predictions are tested. In order to ex- N ecute such an experiment, it typically will be necessary to statistical learning. Suppose we have some data fyi; xigi=1 where yi = f(xi). Our goal is to build a model of the craft a set of probe examples x that cover a relevant por- data g(:) to optimize some loss function L measuring the tion of the range of hp(x), for example a variety of object P 2 shapes. The results of this experiment will either support disparity between y and g(x), e.g., L = i jjyi − g(xi)jj . Perhaps this data x is images of ImageNet objects to be or fail to support the hypothesis that the model uses hp(x) classified, images and histology of tumors to be classified to solve the task. This process can be especially valuable in as benign or malignant (Kourou et al., 2015), or medical situations where there is little or no training data available history and vital measurements to be classified according in important regions of the input space, and a practitioner to likely pneumonia outcomes (Caruana et al., 2015). needs to know how the trained model will behave in that region. A statistical learner such as a DNN will minimize L by discovering properties of the input x that are predictive of Psychologists have developed a repertoire of such hypothe- the labels y. These discovered predictive properties are, in ses and experiments in their effort to understand the hu- effect, the properties of x for which the trained model has man mind. Here we explore the application of one of these an inductive bias. Examples of such properties include the theory-experiment pairs to state of the art one-shot learning shape of ImageNet objects, the number of nodes of a tumor, models. We will begin by describing the historical back- or a particular constellation of blood test values that often drop for the human one-shot word learning experiments precedes an exacerbation of pneumonia symptoms. that we will then apply to our DNNs. Critically, in real-world datasets such as these, the discov- ered properties are unlikely to correspond to a single fea- 3. The problem of word learning; the solution ture of the input x; instead they correspond to complex of inductive biases conjunctions of those features. We could describe one of Discussions of one-shot word learning in the psychologi- these properties using a function h(x), which, for example, cal literature inevitably begin with the philosopher W.V.O. returns the shape of the focal object given an ImageNet im- Quine, who broke this problem down and described one 1The use of behavioral probes to understand neural network of its most computationally challenging components: there function has been extensively applied within psychology itself, are an enormous number of tenable hypotheses that a where neural networks have been employed as models of human learner can use to explain a single observed example. To brain function (Rumelhart et al., 1988; Plaut et al., 1996; Rogers make this point, Quine penned his now-famous parable of & McClelland, 2004; Mareschal et al.). To our knowledge, work applying behavioral probes to DNNs in machine learning has been the field linguist who has gone to visit a culture whose lan- quite limited; we only are aware of Zoran et al.(2015) and Good- guage is entirely different from our own (Quine, 1960).