On the Decision Boundaries of Neural Networks. A Tropical Geometry Perspective

1 INTRODUCTION . Deep Neural Networks ( DNNs ) have demonstrated outstanding performance across a variety of research domains , including computer vision ( Krizhevsky et al. , 2012 ) , speech recognition ( Hinton et al. , 2012 ) , natural language processing ( Bahdanau et al. , 2015 ; Devlin et al. , 2018 ) , quantum chemistry Schütt et al . ( 2017 ) , and healthcare ( Ardila et al. , 2019 ; Zhou et al. , 2019 ) to name a few ( LeCun et al. , 2015 ) . Nevertheless , a rigorous interpretation of their success remains elusive ( ShalevShwartz & Ben-David , 2014 ) . For instance , in an attempt to uncover the expressive power of DNNs , the work of Montufar et al . ( 2014 ) studied the complexity of functions computable by DNNs that have piecewise linear activations . They derived a lower bound on the maximum number of linear regions . Several other works have followed to improve such estimates under certain assumptions ( Arora et al. , 2018 ) . In addition , and in attempt to understand some of the subtle behaviours DNNs exhibit , e.g . the sensitive reaction of DNNs to small input perturbations , several works directly investigated the decision boundaries induced by a DNN for classification . The work of Moosavi-Dezfooli et al . ( 2019 ) showed that the smoothness of these decision boundaries and their curvature can play a vital role in network robustness . Moreover , the expressiveness of these decision boundaries at perturbed inputs was studied in He et al . ( 2018 ) , where it was shown that these boundaries do not resemble the boundaries around benign inputs . The work of Li et al . ( 2018 ) showed that under certain assumptions , the decision boundaries of the last fully connected layer of DNNs will converge to a linear SVM . Also , Beise et al . ( 2018 ) showed that the decision regions of DNNs with width smaller than the input dimension are unbounded . More recently , and due to the popularity of the piecewise linear ReLU as an activation function , there has been a surge in the number of works that study this class of DNNs in particular . As a result , this has incited significant interest in new mathematical tools that help analyze piecewise linear functions , such as tropical geometry . While tropical geometry has shown its potential in many applications such as dynamic programming ( Joswig & Schröter , 2019 ) , linear programming ( Allamigeon et al. , 2015 ) , multi-objective discrete optimization ( Joswig & Loho , 2019 ) , enumerative geometry ( Mikhalkin , 2004 ) , and economics ( Akian et al. , 2009 ; Mai Tran & Yu , 2015 ) , it has only been recently used 1Code regenerating all our experiments is attached in the supplementary material . to analyze DNNs . For instance , the work of Zhang et al . ( 2018 ) showed an equivalency between the family of DNNs with piecewise linear activations and integer weight matrices and the family of tropical rational maps , i.e . ratio between two multi-variate polynomials in tropical algebra . This study was mostly concerned about characterizing the complexity of a DNN by counting the number of linear regions , into which the function represented by the DNN can divide the input space . This was done by counting the number of vertices of a polytope representation recovering the results of Montufar et al . ( 2014 ) with a simpler analysis . More recently , Smyrnis & Maragos ( 2019 ) leveraged this equivalency to propose a heuristic for neural network minimization through approximating the tropical rational map . Contributions . In this paper , we take the results of Zhang et al . ( 2018 ) several steps further and present a novel perspective on the decision boundaries of DNNs using tropical geometry . To that end , our contributions are three-fold . ( i ) We derive a geometric representation ( convex hull between two zonotopes ) for a super set to the decision boundaries of a DNN in the form ( Affine , ReLU , Affine ) . ( ii ) We demonstrate a support for the lottery ticket hypothesis ( Frankle & Carbin , 2019 ) from a geometric perspective . ( iii ) We leverage the geometric representation of the decision boundaries , referred to as the decision boundaries polytope , in two interesting applications : network pruning and adversarial attacks . For tropical pruning , we design a geometrically inspired optimization to prune the parameters of a given network such that the decision boundaries polytope of the pruned network does not deviate too much from its original network counterpart . We conduct extensive experiments with AlexNet ( Krizhevsky et al. , 2012 ) and VGG16 ( Simonyan & Zisserman , 2014 ) on SVHN ( Netzer et al. , 2011 ) , CIFAR10 , and CIFAR 100 ( Krizhevsky & Hinton , 2009 ) datasets , in which 90 % pruning rate is achieved with a marginal drop in testing accuracy . For tropical adversarial attacks , we show that one can construct input adversaries that can change network predictions by perturbing the decision boundaries polytope . 2 PRELIMINARIES TO TROPICAL GEOMETRY . For completeness , we first provide preliminaries to tropical geometry ( Itenberg et al. , 2009 ; Maclagan & Sturmfels , 2015 ) . Definition 1 . ( Tropical Semiring2 ) The tropical semiring T is the triplet { R ∪ { −∞ } , ⊕ , } , where ⊕ and define tropical addition and tropical multiplication , respectively . They are denoted as : x⊕ y = max { x , y } , x y = x+ y , ∀x , y ∈ T . It can be readily shown that −∞ is the additive identity and 0 is the multiplicative identity .. Given the previous definition , a tropical power can be formulated as x a = x x · · · x = a.x , for x ∈ T , a ∈ N , where a.x is standard multiplication . Moreover , a tropical quotient can be defined as : x y = x− y , where x− y is standard subtraction . For ease of notation , we write x a as xa . Definition 2 . ( Tropical Polynomials ) For x ∈ Td , ci ∈ R and ai ∈ Nd , a d-variable tropical polynomial with n monomials f : Td → Td can be expressed as : f ( x ) = ( c1 xa1 ) ⊕ ( c2 xa2 ) ⊕ · · · ⊕ ( cn xan ) , ∀ ai 6= aj when i 6= j . We use the more compact vector notation xa = xa11 x a2 2 · · · x ad d . Moreover and for ease of notation , we will denote ci xai as cixai throughout the paper . Definition 3 . ( Tropical Rational Functions ) A tropical rational is a standard difference or a tropical quotient of two tropical polynomials : f ( x ) − g ( x ) = f ( x ) g ( x ) . Algebraic curves or hypersurfaces in algebraic geometry , which are the solution sets to polynomials , can be analogously extended to tropical polynomials too . Definition 4 . ( Tropical Hypersurfaces ) A tropical hypersurface of a tropical polynomial f ( x ) = c1x a1 ⊕ · · · ⊕ cnxan is the set of points x where f is attained by two or more monomials in f , i.e . T ( f ) : = { x ∈ Rd : cixai = cjxaj = f ( x ) , for some ai 6= aj } . Tropical hypersurfaces divide the domain of f into convex regions , where f is linear in each region . Also , every tropical polynomial can be associated with a Newton polytope . 2A semiring is a ring that lacks an additive inverse . Definition 5 . ( Newton Polytopes ) The Newton polytope of a tropical polynomial f ( x ) = c1xa1 ⊕ · · · ⊕ cnxan is the convex hull of the exponents ai ∈ Nd regarded as points in Rd , i.e . ∆ ( f ) : = ConvHull { ai ∈ Rd : i = 1 , . . . , n and ci 6= −∞ } . A tropical polynomial determines a dual subdivision , which can be constructed by projecting the collection of upper faces ( UF ) inP ( f ) : = ConvHull { ( ai , ci ) ∈ Rd×R : i = 1 , . . . , n } onto Rd . That is to say , the dual subdivision determined by f is given as δ ( f ) : = { π ( p ) ⊂ Rd : p ∈ UF ( P ( f ) ) } , where π : Rd×R→ Rd is the projection that drops the last coordinate . It has been shown by Maclagan & Sturmfels ( 2015 ) that the tropical hypersurface T ( f ) is the ( d-1 ) -skeleton of the polyhedral complex dual to δ ( f ) . This implies that each node of the dual subdivision δ ( f ) corresponds to one region in Rd where f is linear . This is exemplified in Figure 1 with three tropical polynomials , and to see this clearly , we will elaborate on the first tropical polynomial example f ( x , y ) = x⊕ y ⊕ 0 . Note that as per Definition 4 , the tropical hypersurface is the set of points ( x , y ) where x = y , y = 0 , and x = 0 . This indeed gives rise to the three solid red lines indicating the tropical hypersurfaces . As for the dual subdivision δ ( f ) , we observe that x⊕y⊕0 can be written as ( x1 y0 ) ⊕ ( x0 y1 ) ⊕ ( x0 y0 ) . Thus , and since the monomials are bias free ( ci = 0 ) , then P ( f ) = ConvHull { ( 1 , 0 , 0 ) , ( 0 , 1 , 0 ) , ( 0 , 0 , 0 ) } . It is then easy to see that δ ( f ) = ConvHull { ( 1 , 0 ) , ( 0 , 1 ) , ( 0 , 0 ) } , since UP ( P ( f ) ) = P ( f ) , which is the black triangle in solid lines in Figure 1 . One key observation in all three examples in Figure 1 is that the number of regions where f is linear ( that is 3 , 6 and 10 , respectively ) is equal to the number of nodes in the corresponding dual subdivisions . Second , the tropical hypersurfaces are parallel to the normals to the edges of the dual subdivision polytope . This observation will be essential for the remaining part of the paper . Several other observations are summarized by Brugallé & Shaw ( 2014 ) . Moreover , Zhang et al . ( 2018 ) showed an equivalency between tropical rational maps and a family of neural network f : Rn → Rk with piecewise linear activations through the following theorem . Theorem 1 . ( Tropical Characterization of Neural Networks , ( Zhang et al. , 2018 ) ) . A feedforward neural network with integer weights and real biases with piecewise linear activation functions is a function f : Rn → Rk , whose coordinates are tropical rational functions of the input , i.e. , f ( x ) = H ( x ) Q ( x ) = H ( x ) −Q ( x ) , where H and Q are tropical polynomials . While this is new in the context of tropical geometry , it is not surprising , since any piecewise linear function can be written as a difference of two max functions over a set of hyperplanes ( Melzer , 1986 ) . Before any further discussion , we first recap the definition of zonotopes . Definition 6 . Let u1 , . . . , uL ∈ Rn . The zonotope formed by u1 , . . . , uL is defined as Z ( u1 , . . . , uL ) : = { ∑L i=1 xiu i : 0 ≤ xi ≤ 1 } . Equivalently , Z can be expressed with respect to the generator matrix U ∈ RL×n , where U ( i , : ) = ui > as ZU : = { U > x : ∀x ∈ [ 0 , 1 ] L } . Another common definition for a zonotope is the Minkowski sum of the set of line segments { u1 , . . . , uL } ( refer to appendix ) , where a line segment of the vector ui in Rn is defined as { αui : ∀α ∈ [ 0 , 1 ] } . It is well-known that the number of vertices of a zonotope is polynomial in the number of line segments , i.e . |vert ( ZU ) | ≤ 2 ∑n−1 i=0 ( L−1 i ) = O ( Ln−1 ) ( Gritzmann & Sturmfels , 1993 ) .

Summary: This work studies the decision boundaries of neural networks (NN) with piecewise linear (ReLU) activation functions from a tropical geometry perspective. Leveraging the work of [1], the authors show that NN decision boundaries form subsets of tropical hypersurfaces. This geometric characterization of NN decision boundaries is then leveraged to better understand the lottery ticket hypothesis, and prune deep NNs. The authors also allude to the use of tropical geometric perspectives on NN decision boundaries for the generation of adversarial samples, but do not explicitly discuss it in any detail within the main text of the paper.