Prototype Based Classification from Hierarchy to Fairness

1 INTRODUCTION . Neural networks are able to learn rich representations of data that support highly accurate classification ; however , understanding or controlling what neural nets learn remains challenging . Some techniques offer insight into pre-trained models by uncovering directions within latent spaces that correspond to particular concepts , image manipulations , or more ( Goetschalckx et al. , 2019 ; Kim et al. , 2018 ) , while approaches focused on interpretability provide techniques that are more comprehensible to humans ( Li et al. , 2018 ; Chen et al. , 2019 ) . While these methods provide insight , they fail to offer control : humans observe learned patterns but are unable to guide models such that learned relationships are useful for a particular setting or task . Another line of work has advanced the design of models for particular types of classification tasks ( such as fair or hierarchical classification ) but these techniques are often developed with only one problem in mind ( Zemel et al. , 2016 ; Xie et al. , 2017 ; Hase et al. , 2019 ) . For example , models built for fair classification ( predicting an outcome regardless of information about a protected field ) are only used to enforce independence of concepts rather than hierarchy . Thus , humans may exert control over learned representations by selecting an appropriate technique rather than tuning training parameters within the same technique . We have designed a new neural network architecture , the concept subspace network ( CSN ) , which generalizes existing specialized classifiers to produce a unified model capable of learning a spectrum of multi-concept relationships . CSNs use prototype-based representations , a technique employed in interpretable neural networks in prior art ( Li et al. , 2018 ; Chen et al. , 2019 ; Garnot & Landrieu , 2020 ) . A single CSN uses sets of prototypes in order to simultaneously learn multiple concepts ; classification within a single concept ( e.g. , “ type of animal ” ) is performed by projecting encodings into a concept subspace defined by the prototypes for that concept ( e.g. , “ bird , ” “ dog , ” etc. ) . Lastly , CSNs use a measure of concept subspace alignment to guide concept relationships such as independence or hierarchy . In our experiments , CSNs performed comparably to state-of-the art in fair classification , despite prior methods only being designed for this type of problem . In applying CSNs to hierarchical classification tasks , networks automatically deduced interpretable representations of the hierarchical problem structure , allowing them to outperform state-of-the-art , for a given neural network backbone , in terms of both accuracy and average cost of errors on the CIFAR100 dataset . Lastly , in a human-motion prediction task , we demonstrated how a single CSN could enforce both fairness ( to preserve participant privacy ) and hierarchy ( to exploit a known taxonomy of tasks ) . Our findings suggest that CSNs may be applied to a wide range of problems that had previously only been addressed individually , or not at all . 2 RELATED WORK . 2.1 INTERPRETABILITY AND PROTOTYPE NETWORKS . Numerous post-hoc explanation techniques fit models to pre-trained neural nets ; if humans understand these auxiliary models , they can hypothesize about how the neural nets behave ( Ribeiro et al. , 2016 ; Lundberg & Lee , 2017 ) . However , techniques in which explanations are decoupled from underlying logic may be susceptible to adversarial attacks or produce misleading explanations ( Heo et al. , 2019 ; Slack et al. , 2020 ) . Unlike such decoupled explanations , interpretability research seeks to expose a model ’ s reasoning . In this work we focus on prototype-based latent representations in neural nets . There is a long history of learning discrete representations in continuous spaces , originating under “ vector quantization ” literature ( Kohonen , 1990 ; Schneider et al. , 2009 ) . More recently , the prototype case network ( PCN ) comprised an autoencoder model that clustered encodings around understandable , trainable prototypes , with classifications made via a linear weighting of the distances from encodings to prototypes ( Li et al. , 2018 ) . Further research in image classification extended PCNs to use convolutional filters as prototypes and for hierarchical classification in the hierarchical prototype network ( HPN ) ( Chen et al. , 2019 ; Hase et al. , 2019 ) . Lastly , Garnot & Landrieu ( 2020 ) use prototypes in Metric-Guided Prototype Learning ( MGP ) in conjunction with a loss function to cluster prototypes to minimize user-defined costs . Our model similarly uses trainable prototypes for classification , but differs from prior art in two respects . First , we modify the standard PCN architecture to support other changes , without degrading classification performance . Second , like HPNs ( but not PCNs or MGP ) , CSNs leverage multiple sets of prototypes to enable hierarchical classification but also allow for non-hierarchical concept relationships . 2.2 FAIR AND HIERARCHICAL CLASSIFICATION . AI fairness research considers how to mitigate undesirable patterns or biases in machine learning models . Consider the problem of predicting a person ’ s credit risk : non-causal correlations between age and risk may lead AI models to inappropriately penalize people according to their age ( Zemel et al. , 2016 ) . The problem of fair classification is often framed as follows : given inputs , x , which are informative of a protected field , s , and outcome , y , predict y from x without being influenced by s ( Zemel et al. , 2013 ) . Merely removing s from x ( e.g. , not including age as an input to a credit predictor ) rarely removes all information about s , so researchers have developed a variety of techniques to create representations that “ purge ” information about s ( Zemel et al. , 2016 ; Xie et al. , 2017 ; Jiang et al. , 2020 ) . Hierarchical classification solves a different problem : given a hierarchical taxonomy of classes ( e.g. , birds vs. dogs at a high level and sparrows vs. toucans at a low level ) , output the correct label at each classification level . Neural nets using convolution and recurrent layers in specialized designs have achieved remarkable success in hierarchical image classification ( Zhu & Bain , 2017 ; Guo et al. , 2018 ) . The hierarchical prototype network ( HPN ) uses prototypes and a training routine based upon conditional subsets of training data to create hierarchically-organized prototypes ( Hase et al. , 2019 ) . Garnot & Landrieu ( 2020 ) also use prototypes for hierarchical classification in Metric-Guided Prototype Learning ( MGP ) by adjusting the training loss to guide prototype arrangement . Neither HPN nor MGP explicitly models relationships between multiple subsets of prototypes . Lastly , recent works propose hyperbolic latent spaces as a natural way to model hierarchical data ( Dai et al. , 2021 ; Mathieu et al. , 2019 ; Nickel & Kiela , 2017 ; Liu et al. , 2020 ) . Our method , conversely , relies upon concepts from Euclidean geometry . Extending the principle of subspace alignment that we develop to non-Euclidean geometric spaces is a promising direction but is beyond the scope of this work . 3 TECHNICAL APPROACH . In this section , we outlined the design of the CSN , which was inspired by desires for both interpretable representations and explicit concept relationships . First , we wished for interpretable representations , so we built upon the PCN design , with modifications . Second , we explicitly encoded relationships between concepts by introducing multiple sets of prototypes , instead of just one in PCNs . Third , we enabled guidance of the concept relationships by modifying the CSN training loss . Together , these changes supported not only interpretable classification , but also provided a flexible framework for a single model architecture to learn different concept relationships . 3.1 CONCEPT SUBSPACE CLASSIFICATION . A CSN performing a single classification task ( e.g. , identifying a digit in an image ) is defined by three sets of trainable weights . First , an encoder parametrized by weights θ , eθ , maps from inputs of dimension X to encodings of dimension Z : eθ : RX → RZ . Second , a decoder parametrized by weights φ , dφ , performs the decoding function of mapping from encodings to reconstructed inputs : dφ : R Z → RX . Third , there exist a set of k trainable prototype weights , p , that are each Zdimensional vectors : p1 , p2 , ... , pk ∈ RZ . This architecture resembles that of the PCN , but without the additional linear classification layer ( Li et al. , 2018 ) . Here , we focus briefly on the set of prototypes , p. Given a set of k prototypes in RZ , we define a “ concept subspace , ” C as follows : vi = pi − p1 ∀i ∈ [ 2 , k ] ( 1 ) C = { x|x ∈ RZ where x = p1 + ∑ i∈ [ 2 , k ] λivifor λi ∈ R ∀i } ( 2 ) C is the linear subspace in RZ defined by starting at the first prototype and adding linear scalings of vector differences to all other prototypes . We call this subspace a concept subspace because it represents a space of encodings between prototypes defining a single concept ( e.g. , prototypes for digits 0 , 1 , 2 , etc . define a concept subspace for digit classification ) . A CSN ’ s architecture — consisting of an encoder , a decoder , and a set of prototypes and the associated concept subspace — enables two types of functionality : the encoder and decoder may be composed to reconstruct inputs via their latent representations , and CSNs may perform classification tasks by mapping an input , x , to one of Y discrete categories . Classification is performed by first encoding an input into a latent representation , z = eθ ( x ) . The l2 distance from z to each prototype is then calculated , yielding k distance values : di ( z , p ) = ||z − pi||22 ; i ∈ [ 1 , k ] . These distances are mapped to a probability distribution , PK ( i ) ; i ∈ [ 1 , k ] , by taking the softmax of their negatives . Lastly , if there are more prototypes than classes , ( e.g. , two prototypes for dogs , two for cats , etc . ) the distribution over k is converted to a distribution over Y categories summing the probabilities for prototypes belonging to the same class . For single-concept classification , CSNs differ from PCNs primarily by removing the linear layer that PCNs used to transform distances to prototypes into classifications . We found this unnecessary for high classification accuracy ( Appendix A ) and instead directly used negative distances . Without the linear layer , CSN classification is equivalent to projecting encodings , z , onto a concept subspace before calculating distances . The distances between projected encoding , dubbed zproj , and prototypes will induce the same softmax distribution as when the orthogonal component remains . Indeed , we find projection more intuitive - only the component of z that corresponds to the subspace is used for classification - and list projection as a standard step in the remainder of this paper . A simple example of projecting an encoding and calculating distances to prototypes is shown in Figure 1 a . For some tasks , we used an encoder design from variational-autoencoders ( VAEs ) in order to regularize the distribution of encodings to conform to unit Gaussians ( Kingma & Welling , 2014 ) . By default , this regularization loss was set to 0 , but it sometimes proved useful in some domains to prevent overfitting ( as detailed in experiments later ) . We emphasize that CSNs are discriminative , rather than generative , models , so we did not seek to learn a latent space from which to sample .

Summary: The paper builds on prior work on prototypical classification networks (more specifically, the work of Li et al. 2018) and additionally tries to include criteria such as orthogonality to enable applications such as fair classification. An application to hierarchical networks is also described though the details are very hard to understand. Experiments show that the resulting models are able to achieve reasonable fairness accuracy tradeoffs.