Simple deductive reasoning tests and numerical data sets for exposing limitation of today's deep neural networks

1 INTRODUCTION . Deductive reasoning is a branch of artificial intelligence where inferences are represented as assertions or facts over data ( Khemani , 2013 ) . Starting with a set of given facts , the system combines facts based on rules to generate newer facts and update the knowledge store . On the other hand machine learning algorithms employ induction based approaches which are predominantly pattern mapping methods ( McClelland et al. , 1986 ) . Fundamentally , in a pipeline of operations , the vectors are arithmetically combined , logically filtered , scaled up or scaled down and mapped to the target vector of interest . A tensor is a more generalization of the vector representation mathematically . However typically even a tensor is internally represented as an array of contiguous storage locations with a data structure indicating dimensions . These tensors undergo a pipeline of transformations minimizing an error function there by mapping a tensor on one side of the pipeline to the tensor on the other side . Deep neural networks have demonstrated their performance almost at the level of human or even better in computer vision and other domains ( Bengio et al. , 2017 ) . Although it is promising to see the success of deep neural networks ( Dargan et al. , 2019 ) ( DNN ) there seems to be a popular belief and false opinion that they are suitable for all types of problems . It is important to note here that problem statements solved by DNNs are of mainly of interpolation in nature where tensors are combined along the pipeline to produce the output tensor . The vanilla DNNs are not directly suitable for deductive reasoning type of problem statements . A knowledge base in a deductive reasoning methodology is a storage for facts which are modified over time . For instance , counting number of ones in a binary representation of the input , the current count is a fact and as the algorithm iterates over input , the count value gets updated . Most of the iterations over input , can be represented in a declarative style as first order logic statements such as prolog ( Bratko , 2001 ) . The weight space representation of a deep neural network is not a convenient formulation to capture the facts , unification and inference mechanism as required by a deductive reasoning methodology . However , earlier version of machine learning formulations required feature engineering which itself accommodates for deductive reasoning in the form of outputs of human crafted programs which are added as features . There are on-going research efforts in this direction on modification of neural network architectures to enable them for performing deduction reasoning . A small step in the direction of storage of past information in data is a recurrent neural network formulation and its several variants ( Mikolov et al. , 2011 ) . Most of the existing works employ a recurrent neural network based formulation and its variations due to the fundamental need of the notion of memory in a deductive reasoning setting . We have tabulated the observations in the form of a Table 1 . Citation Data Processing ( Nangia & Bowman , 2018 ) Input is a string of list operations and elements such as minimum and maximum . Output is the result of list operations . They have released a ListOps data set . TreeLSTM ( Tai et al. , 2015b ) ( Saxton et al. , 2019 ) Input is a stream of sequences of tokens . A specific sequence is defined as a question . The output is again a sequence of tokens corresponding to answer . They have used an RNN based formulation for a question-answer system . ( Wu et al. , 2020 ; Irving et al. , 2016 ; Gauthier et al. , 2020 ; Bansal et al. , 2019 ; Polu & Sutskever , 2020 ; Evans et al. , 2018 ; Lample & Charton , 2019 ) Input is a string of tokens corresponding to a truth statements of a theorem . Output is a string of tokens corresponding to proof for the theorem or identification of top few premises . They have used a variation of RNN formulation . ( Yang & Deng , 2019 ) Input is a string of knowledgebase and theorem . Output is a string of proof statements . They also release CoqGym data set of 71K proofs . A TreeLSTM ( Tai et al. , 2015b ) formulation is used . ( Huang et al. , 2018 ) Input is a string representation of a theorem . Output is estimation of number of steps required to finish and prediction of the next expression . RNN based formulation . ( Piotrowski et al. , 2019 ) Input is a string of tokens corresponding to polynomial coefficients in symbolic form before normalization . Output is a normalized equivalent expression . They have used RNN based formulation . ( Paliwal et al. , 2020 ) Input is a string of tokens corresponding to theorem . Output is a string of tokens corresponding to the first step of the proof . The authors have used Graph Neural Networks ( Zhou et al. , 2018 ) . The symbolic reasoning neural networks ( Table 1 ) obtain the input is a variable length string of tokens and the output is also a variable length string of tokens . Some tokens have special meaning corresponding to syntactic and semantic interpretations such as opening and closing brackets , function call and data . While this problem formulation is more generic in nature , the onus of parsing the input token list rests with the DNN in addition to interpretation and output generation . In a deductive reasoning setting , the concept of memory becomes critical . Some of the deductive reasoning tasks can be easily accomplished by a simple computer program to result in numeric features or truth value statements . However the effect of a free form neural network do the same and without tweaking is far from reach . Basic notion of memory in an RNN formulation is the hidden vector formulation . In order to perform symbolic unification , logical operations and learn a generic function from data , the hidden vector concept is reformulated for a stack or queue of vectors ( Grefenstette et al. , 2015 ) . The Neural Turing Machine ( Graves et al. , 2014 ) includes a controller network and memory network to mimic a Turing machine and attempts to learn generic function that maps input to output from data . In order to learn a generic mapping function from one pattern to another pattern , it is important to see a basic computational model . In ( Figure 1 ) we have indicated a conceptual processor , code and data . A symbolic reasoning network tries to model the three entities simultaneously in the form of weights of the network . A processor has a fixed set of instructions that operate on memory , P = { ( Ij , M ) } ( ∀j ∈ 1 . . . NP ) where NP denotes number of instructions , Ij denotes jth instruction , M denotes a memory location . The data is indicated by , D = { Mk , Vk } ( ∀k ∈ 1 . . . NM ) where NM is the number of locations , Mk is the kth memory location and Vk is the value present at the location . A program or code is indicated by C = { ( ai , bi ) } ( ∀i ∈ 1 . . . NC ) where ai is the instruction and bi is the memory location . We do here some back of the envelope calculations on how many essential vectors need to be captured for instructions , memory value pairs and code . If we assume one hot encoding representation of all instructions , this would require an estimate of NP × NM pairs of instructions . For each of the memory locations , the values are typically floating point numbers or integers with large ranges , the possible numbers of memory-value pairs is an astronomical number NM × |Vk| where |Vk| denotes value range . Each term in a program would correspond to one-hotencoding of NP × NM instruction and memory pairs . The number of programs of length NC that can be generated would be NP ×NMNC . Even for a simple processor having 10 instructions , 10 memory locations and a program of 10 steps , would require exploration of a space of 10010 vectors corresponding to each program . It is not clear today , what is the best way to represent and model the process as it is evident from low accuracies and high errors reported in state of the art symbolic reasoning frameworks . As symbolic processing requires a neural network to learn text parsing and also learn inference from data . There are two moving parts in order to understand low accuracies observed in deductive tasks . In order to specifically identify issue , we have provided numeric data sets that does not require text parsing . It is also important at this stage of the state of the art , to clearly call out limitations of the existing deep neural networks and machine learning formulations on what is and what is not possible in a more specific way . As machine learning systems operate over data sets , the first step in demonstrating what is not possible is via simple data sets for pattern mapping . We have created some very simple data sets where a single engineered feature is sufficient enough to capture the pattern , however deep networks fail to capture the deduction patterns . The data sets are for - ( a ) selection ( 3 data sets ) - minimum , maximum and top 2nd element in an array of numbers ; ( b ) matching ( 3 data sets ) - duplicate detection , counting and histogram learning ; ( c ) divisibility tests ( 2 data sets ) - divisibility of two numbers and divisibility by 3 ; ( d ) representation ( 2 data sets ) - binary representation and parity . We demonstrate that in all of these data sets , the deep neural networks fail with very low accuracies . The efforts in the state of the art for symbolic neural networks mainly include on parsing of the textual input , unification and deduction . These works try to address based on tweaking the architecture of the network for bringing in memory . The RNN based formulation addresses processing part . However , we observe and propose for research there is additional component which is the type of neuron used . In current networks , a single neuron performs only simple arithmetic operations and a comparison against zero as in ReLU . We conjecture here there is scope for innovation in increasing the computational capability of a neuron and ad-hoc connections as proposed in Webster ( 2012 ) . 2 METHODS . In order to present how deductive reasoning is fundamentally different from interpolation based reasoning , we have created ten data sets which are described in this section . Data sets are generated by invoking the algorithm as shown in the ( Table 2 ) . 2.1 DATA SETS FOR SELECTION PROBLEMS . Identification of maximum or minimum element in an array of numbers , requires facts to be recorded in a storage , infer on top of them in the current iteration and update the storage with newer facts . The data set consists of D = ( xi , yi ) tuples i ∈ [ 1 .. N ] where N = 100000 . Each xi ∈ RK is a K dimensional vector where K = 50 in our case and yi contains the value of an element of interest in the array , i.e . yi = max ( xi,1 , . . . , xi , K ) . The data set is generated as shown in the schematic ( Algorithm 1 ) . Algorithm 1 Selection Data Set Generation Algorithm - SEL ( T , N , K ) Require : T , N , K ( ∀i ∈ [ 1 .. N ] ) , ( ∀j ∈ [ 1 .. K ] ) xi , j = RAND ( ) / * RAND ( ) function generates a random number * / / * T : Type of selection , N : Number of elements in data set , K : Dimensionality of each point * / if T is ” max ” then ( ∀i ∈ [ 1 .. N ] ) : yi = max ( xi ) else if T is ” min ” then ( ∀i ∈ [ 1 .. N ] ) : yi = min ( xi ) else if T is ” top 2 ” then ( ∀i ∈ [ 1 .. N ] ) : yi = max ( set ( xi ) − { max ( xi ) } ) end if return ( x , y )

Summary: The paper argues that deductive reasoning is an open problem in current machine learning scenarios where features are learned rather than hand-crafted. To highlight the limitations of current approaches, the paper proposes a benchmark suite of 10 simple tasks (finding the minimum, divisibility test, etc.) that are trivial with some feature engineering, but are shown to be very hard without it. Experiments are performed with random forests, neural networks (MLP?), and recurrent neural networks.