paper_name stringlengths 11 170 | text stringlengths 8.07k 307k | summary stringlengths 152 6.16k | paper_id stringlengths 43 43 |
|---|---|---|---|
Average Reward Reinforcement Learning with Monotonic Policy Improvement | 1 INTRODUCTION . The goal of Reinforcement Learning ( RL ) is to build agents that can learn high-performing behaviors through trial-and-error interactions with the environment . Broadly speaking , modern RL tackles two kinds of problems : episodic tasks and continuing tasks . In episodic tasks , the agent-environment interaction can be broken into separate distinct episodes , and the performance of the agent is simply the sum of the rewards accrued within an episode . Examples of episodic tasks include training an agent to learn to play Go ( Silver et al. , 2016 ; 2018 ) or Atari video games ( Mnih et al. , 2013 ) , where the episode terminates when the game ends . In continuing tasks , such as controlling robots with long operating lifespans ( Peters & Schaal , 2008 ; Schulman et al. , 2015 ; Haarnoja et al. , 2018 ) , there is no natural separation of episodes and the agent-environment interaction continues indefinitely . The performance of an agent in a continuing task is more difficult to quantify since even for bounded reward functions , the total sum of rewards is typically infinite . One way of making the long-term reward objective meaningful for continuing tasks is to apply discounting , i.e. , we maximize the discounted sum of rewards r0 + γr1 + γ2r2 + · · · for some discount factor γ ∈ ( 0 , 1 ) . This is guaranteed to be finite for any bounded reward function . However the discounted objective biases the optimal policy to choose actions that lead to high near-term performance rather than to high long-term performance . Such an objective — while useful in certain applications — is not appropriate when the goal is optimize long-term behavior . As argued in Chapter 10 of Sutton & Barto ( 2018 ) and in Naik et al . ( 2019 ) , a more natural objective is to use the average reward received by an agent over every time-step . While the average reward setting has been extensively studied in the classical Markov Decision Process literature ( Howard , 1960 ; Blackwell , 1962 ; Veinott , 1966 ; Bertsekas et al. , 1995 ) , it is much less commonly used in reinforcement learning . An important open question is whether recent advances in RL for the discounted reward criterion can be naturally generalized to the average reward setting . One major source of difficulty with modern DRL algorithms lies in controlling the step-size for policy updates . In order to have better control over step-sizes , Schulman et al . ( 2015 ) constructed a lower bound on the difference between the expected discounted return for two arbitrary policies π and π′ . The bound is a function of the divergence between these two policies and the discount factor . Schulman et al . ( 2015 ) showed that iteratively maximizing this lower bound generates a sequence of monotonically improved policies in terms of their discounted return . In this paper , we first show that the policy improvement theorem from Schulman et al . ( 2015 ) results in a non-meaningful bound in the average reward case . We then derive a novel result which lower bounds the difference of the average rewards based on the divergence of the policies . The bound depends on the average divergence between the policies and on the so-called Kemeny constant , which measures to what degree the unichain Markov chains associated with the policies are wellconnected . We show that iteratively maximizing this lower bound guarantees monotonic average reward policy improvement . Similar to the discounted case , the problem of maximizing the lower bound can be approximated with DRL algorithms which can be optimized using samples collected in the environment . We describe in detail two such algorithms : Average Reward TRPO ( ATRPO ) and Average Cost CPO ( ACPO ) , which are average reward versions of algorithms based on the discounted criterion ( Schulman et al. , 2015 ; Achiam et al. , 2017 ) . Using the MuJoCo simulated robotic benchmark , we carry out extensive experiments with the ATRPO algorithm and show that it is more effective than their discounted counterparts for these continuing control tasks . To our knowledge , this is one of the first paper to address DRL using the long-term average reward criterion . 2 PRELIMINARIES . Consider a Markov Decision Process ( MDP ) ( Sutton & Barto , 2018 ) ( S , A , P , r , µ ) where the state space S and action space A are assumed to be finite . The transition probability is denoted by P : S ×A×S → [ 0 , 1 ] , the bounded reward function r : S ×A → [ rmin , rmax ] , and µ : S → [ 0 , 1 ] is the initial state distribution . Let π = { π ( a|s ) : s ∈ S , a ∈ A } be a stationary policy , and Π is the set of all stationary policies . Here we discuss the two objective formulations for continuing control tasks : the average reward approach and discounted reward approach . Average Reward Approach In this paper , we will focus exclusively on unichain MDPs , which is when the Markov chain corresponding to every policy contains only one recurrent class and a finite but possibly empty set of transient states . The average reward objective is defined as : ρ ( π ) : = lim N→∞ 1 N E τ∼π [ N−1∑ t=0 r ( st , at ) ] = E s∼dπ a∼π [ r ( s , a ) ] . ( 1 ) Here dπ ( s ) : = limN→∞ 1N ∑N−1 t=0 P ( st = s|π ) = limt→∞ P ( st = s|π ) is the stationary state distribution under policy π , τ = ( s0 , a0 , . . . , ) is a sample trajectory . We use τ ∼ π to indicate that the trajectory is sampled from policy π , i.e . s0 ∼ µ , at ∼ π ( ·|st ) , and st+1 ∼ P ( ·|st , at ) . In the unichain case , the average reward ρ ( π ) is state-independent for any policy π ( Bertsekas et al. , 1995 ) . We express the average-reward value function as V π ( s ) : = Eτ∼π [ ∑∞ t=0 ( r ( st , at ) − ρ ( π ) ) ∣∣∣∣s0 = s ] and action-value function as Qπ ( s , a ) : = Eτ∼π [ ∑∞ t=0 ( r ( st , at ) − ρ ( π ) ) ∣∣∣∣s0 = s , a0 = a ] . We define the average reward advantage function as Aπ ( s , a ) : = Qπ ( s , a ) − V π ( s ) . Discounted Reward Approach For some discount factor γ ∈ ( 0 , 1 ) , the discounted reward objective is defined as ργ ( π ) : = E τ∼π [ ∞∑ t=0 γtr ( st , at ) ] = 1 1− γ E s∼dπ , γ a∼π [ r ( s , a ) ] . ( 2 ) where dπ , γ ( s ) : = ( 1 − γ ) ∑∞ t=0 γ tP ( st = s|π ) is known as the future discounted state visitation distribution under policy π . Note that unlike the average reward objective , the discounted objective depends on the initial state distribution µ . It can be easily shown that dπ , γ ( s ) → dπ ( s ) for all s as γ → 1 . The discounted value function is defined as V πγ ( s ) : = Eτ∼π [ ∑∞ t=0 γ tr ( st , at ) ∣∣∣∣s0 = s ] and discounted action-value function Qπγ ( s , a ) : = Eτ∼π [ ∑∞ t=0 γ tr ( st , at ) ∣∣∣∣s0 = s , a0 = a ] . Finally , the discounted advantage function is defined as Aπγ ( s , a ) : = Q π γ ( s , a ) − V πγ ( s ) . It is well-known that limγ→1 ( 1− γ ) ργ ( π ) = ρ ( π ) , implying that the discounted and average reward objectives are equivalent in the limit as γ approaches 1 ( Blackwell , 1962 ) . We will further discuss the relationship between the discounted and average reward value functions in the supplementary materials and prove that limγ→1Aπγ ( s , a ) = A π ( s , a ) ( see Corollary A.1 ) . 3 MONTONICALLY IMPROVEMENT GUARANTEES FOR DISCOUNTED RL . In many modern RL literature ( Schulman et al. , 2015 ; 2017 ; Abdolmaleki et al. , 2018 ; Vuong et al. , 2019 ) , algorithms iteratively update policies within a local region , i.e. , at iteration k we find policy πk+1 by maximizing ργ ( π ) within some region D ( π , πk ) ≤ δ for some divergence measure D. This approach allows us to control the step-size of each update using different choices of D and δ which can lead to better sample efficiency ( Peters & Schaal , 2008 ) . Schulman et al . ( 2015 ) derived a policy improvement bound based on a specific choice of D : ργ ( πk+1 ) − ργ ( πk ) ≥ 1 1− γ E s∼dπk , γ a∼πk+1 [ Aπkγ ( s , a ) ] − C ·max s [ DTV ( πk+1 ‖ πk ) [ s ] ] ( 3 ) where DTV ( π′ ‖ π ) [ s ] : = 12 ∑ a |π′ ( a|s ) − π ( a|s ) | is the total variation divergence for policies π and π′ , and C is some constant which does not depend on the divergence term DTV . Schulman et al . ( 2015 ) showed that by choosing πk+1 such that the right hand side of ( 3 ) is maximized , we are guaranteed to have ργ ( πk+1 ) ≥ ργ ( πk ) . This provided the theoretical foundation for an entire class of scalable policy optimization algorithms based on efficiently maximizing the right-hand-side of ( 3 ) ( Schulman et al. , 2015 ; 2017 ; Wu et al. , 2017 ; Abdolmaleki et al. , 2018 ; Vuong et al. , 2019 ) . A natural question arises here is whether the iterative procedure described by Schulman et al . ( 2015 ) also guarantees improvement w.r.t . the average reward . Since the discounted and average reward objectives are equivalent when γ → 1 , one may assume that we can also lower bound the policy performance difference of the average reward objective by letting γ → 1 for the bounds in Schulman et al . ( 2015 ) . Unfortunately this results in a non-meaningful bound . We will demonstrate this through a similar policy improvement bound from Achiam et al . ( 2017 ) based on the average divergence but a similar argument can be made for the original bound from Schulman et al . ( 2015 ) ( see supplementary material for proof and discussion ) . Proposition 1 . Consider the following bound from Achiam et al . ( 2017 ) D−π , γ ( π ′ ) ≤ ργ ( π′ ) − ργ ( π ) ≤ D+π , γ ( π′ ) ( 4 ) where D±π , γ ( π ′ ) = 1 1− γ E s∼dπ a∼π [ π′ ( a|s ) π ( a|s ) Aπγ ( s , a ) ] ± 2γ γ ( 1− γ ) 2 E s∼dπ [ DTV ( π ′ ‖ π ) [ s ] ] and γ = maxs ∣∣Ea∼π′ [ Aπγ ( s , a ) ] ∣∣ . We have : lim γ→1 ( 1− γ ) D±π , γ ( π′ ) = ±∞ ( 5 ) Since limγ→1 ( 1− γ ) ( ργ ( π′ ) − ργ ( π ) ) = ρ ( π′ ) − ρ ( π ) , Proposition 1 says ( 4 ) becomes trivial when used on the average reward . This result is discouraging as it shows that the policy improvement guarantee from Schulman et al . ( 2015 ) does not appear to generalize to the average reward setting . In the next section , we will derive an alternative policy improvement bound for the average reward objective which can be used to generate monotonically improved policies w.r.t . the average reward . | This paper advocates for the use of the average reward objective in long horizon, continual reinforcement learning settings, and it examines whether a limiting argument for the discount is sufficient for extending theoretical results from the discounted setting to the average-reward setting. In the case of policy optimization, the paper shows the monotonic improvement bound from Schulman et al. (2015) becomes vacuous as gamma approaches one. The rest of the paper presents theory to support a new, non-vacuous bound, which leads to a new algorithm analogous to TRPO (A-TRPO). The paper additionally shows how their main theorem can be applied to constrained MDPs in Section 5.2. Empirical results are provided in three MuJoCo domains modified to provide non-episodic experience. | SP:1510815ddfb253f977b3ce9b53ea02b4044ffb90 |
iPTR: Learning a representation for interactive program translation retrieval | Program translation contributes to many real world scenarios , such as porting codebases written in an obsolete or deprecated language to a modern one or reimplementing existing projects in one ’ s preferred programming language . Existing data-driven approaches either require large amounts of training data or neglect significant characteristics of programs . In this paper , we present IPTR for interactive code translation retrieval from Big Code . IPTR uses a novel code representation technique that encodes structural characteristics of a program and a predictive transformation technique to transform the representation into the target programming language . The transformed representation is used for code retrieval from Big Code . With our succinct representation , the user can easily update and correct the returned results to improve the retrieval process . Our experiments show that IPTR outperforms supervised baselines in terms of program accuracy . 1 INTRODUCTION . Numerous programs are being developed and released online . To port codebases written in obsolete or deprecated languages to a modern one ( Lachaux et al. , 2020 ) , or to further study , reproduce and apply them on various platforms , these programs require corresponding versions in different languages . In cases when developers do not make the translation efforts themselves , third-party users have to manually translate the software to their needed language , which is time consuming and error prone because they have to be the expert in both languages . Also , hard-wired cross-language compilers still require heavy human intervention for adaptation and are limited between some specified types of programming . In this paper , we discuss the potentials of data-driven methods that exploit existing big code resources to support code translation . The abundance of open source programs on the internet provides opportunities for new applications , such as workflow generation ( Derakhshan et al. , 2020 ) , data preparation ( Yan & He , 2020 ) , and transformation retrieval ( Yan & He , 2018 ) . Code translation is another application that is gaining attention ( Lachaux et al. , 2020 ) . Data-driven program translation . Inspired by natural language translation , one line of approaches trains a translation model from large amounts of code data either in a supervised ( Nguyen et al. , 2013 ; 2015 ; Chen et al. , 2018 ) or weakly-supervised fashion ( Lachaux et al. , 2020 ) . Supervised approaches require a parallel dataset to train the translation model . In parallel datasets , programs in different languages are considered to be “ semantically aligned ” . Obtaining the parallel datasets in programming languages is hard because the translations have to be handwritten most of the time . Besides massive human efforts , it is also a tricky problem to extract general textual features that apply to every programming language . A recent weakly-supervised method ( Lachaux et al. , 2020 ) pretrains the translation model on the task of denoising randomly corrupted programs and optimizes the model through back-translation . However , this method still relies on high-quality training data . Further , all these approaches directly reuse NLP approaches that neglect the special features of programming languages . Another potential approach is to use a retrieval system to obtain translation candidates directly from Big Code , which refers to well-maintained program repositories . However , existing code retrieval systems , such as Sourcerer ( Linstead et al. , 2009 ) , lack the proper capabilities for code-to-code search and cross-language code retrieval . These methods ask users to give feedback on several preset metrics and questions ( Wang et al. , 2014 ; Dietrich et al. , 2013 ; Martie et al. , 2015 ; Sivaraman et al. , 2019 ) . None of these methods is tailored to cross-language retrieval . In this paper , we propose an interactive program translation retrieval system IPTR based on a novel and generalizable code representation that retains important code properties . The representation not only encodes textual features but structural features that can be generalized across all imperative programming languages . We further propose a query transformation model based on autoencoders to transform the input program representation to a representation that has properties of the target language . Due to the succinct form of our code representation , IPTR can adapt the original query based on user annotations . This methodology can compete with existing statistical translation models that require a large amount of training data . In short , we make the following main contributions : • We propose IPTR , an interactive cross-language code retrieval system with a program feature representation that additionally encodes code structure properties . • We further propose a novel query transformation model that learns a refined code representation in the target language before using it for retrieval . This model can be trained in an unsupervised way but also improved through active learning . • Based on our succinct code representation , we propose a user feedback mechanism that enables IPTR to successively improve its results . 2 SYSTEM OVERVIEW . We propose IPTR , an interactive cross language code retrieval system that supports program translation on multiple programming languages . Problem Definition . Given a piece of source program Ps written in language Ls , a selected target language Lt , and a large program repository Dp = { P1 , P2 , ... , Pn } , the goal is to find the best possible translation Pt of Ps in Lt from Dp . The problem is to design an effective program feature representation that generalizes to many languages and can be updated through user feedback . Our solution : IPTR The workflow of IPTR is shown in Figure 1 . IPTR first constructs a succinct but informative feature representation for input programs ( Section 3.1 ) . Since the target is to identify a similar program in the target language , IPTR then applies a query transformation model ( QTM ) to transform this representation into an estimated feature representation of the translation ( Section 3 ) . The transformation model is trained in an unsupervised manner but can also be updated dynamically through active learning ( Section 3.2.2 ) . Finally , this new representation will be used as a query to retrieve the program that has similar features from the database . In addition , as an interactive system , IPTR allows the user to give feedback on the retrieved translation ( Section 4 ) . The user can either accept the result or make corrections . Based on our structured and informative feature representation , IPTR can easily and quickly adapt the query based on raw user corrections . Then with the new query , it may identify a more appropriate translation candidate in the second retrieval attempt . 3 PROGRAM REPRESENTATION . To retrieve a promising program translation from a large code database , IPTR needs an effective and efficient query . Directly retrieving based on raw code is impractical . In contrast to existing methods that generate queries based on either keywords ( Linstead et al. , 2009 ) or preset metrics and questions ( Martie et al. , 2015 ) , IPTR generates a feature representation that effectively combines structural properties of the program and textual features . It further uses a query transformation model ( QTM ) to generate features in the target language . 3.1 BASIC ENCODING OF PROGRAM STRUCTURE AND TEXT . Due to the special and non-trival structure of programming languages compared to natural languages , we take both structural and textual features into consideration . The structural features of a program can be represented by its syntax tree where each tree node denotes a code construct . One can also use control flow graph ( CFG ) that captures the dependence between code basic blocks and procedures to represent the code behavior . However , our goal is to support program translation for any granularity of program , code behavior is hard to measure when the code fragment is not a complete code block . Further CFG is much more difficult to construct than syntax trees . As syntactical similarity also plays a significant role , we pick syntax trees as the basis of our representation to also capture the low-level syntactic structure within code blocks . One can also combine CFG and syntax trees to reserve more information . However this would trade-off the simplicity of the retrieval query . We show that with analysis of the static AST features we already achieve high program accuracy . The syntax tree can be either a concrete syntax tree ( CST ) or an abstract syntax tree ( AST ) ( Alon et al. , 2018 ; 2019 ; Chen et al. , 2018 ) . A CST depicts nodes with complete structural information , such as all the tokens in the code while the AST is more abstract and only displays structural or content-related details . For more details on CSTs and ASTs , we provide examples in the Appendix A.2 . As the CST is quite verbose and the AST does not generalize to multiple languages , we fall back on the low-level CST as a basis , and take the philosophy of AST as an inspiration to construct a unified abstract representation . Specifically , IPTR first simplifies the CST by removing semantically repetitive nodes such as equalityExpression and == and intermediate nodes and generates a more simplified but still informative syntax tree . As shown in Figure 2 , a piece of Javascript code is first converted into a simplified syntax tree ( details of simplifying CST are shown in Appendix A.2 ) . Inspired by prior work ( Alon et al. , 2018 ) , IPTR further simplifies it by extracting a set of onedimensional paths that connect the program elements of the two-dimensional tree . Our method abstracts these paths by only keeping the three nodes that enclose the most critical information on a path : for each pair of leaf-nodes in the CST , IPTR keeps the nodes with their values and the root node of the statement . It drops all other intermediate nodes on this path . The extracted abstract paths of the JavaScript Program example are also shown in Figure 2 . By simply matching nodes with similar names from different languages , IPTR can classify these paths into different types and generalize them to multiple programming languages . Thus , the structural feature of a program can be succinctly represented by the different types of paths p1 , p2 , ... , pj it contains . To additionally incorporate textual features , IPTR treats extracted paths as plain text and keeps all the text tokens t1 , t2 , ... , tk appearing in each extracted path to generate text features . Finally , we can use these tokens ( textual features ) together with different types of paths ( structural features ) illustrated above as feature elements of programs . For each input program , we generate a feature vector consisting of the feature element frequencies in that program . Let f be the occurrence frequency of feature elements , then the final feature representation will be [ fe1 , fe2 , ... , fen ] = [ fp1 , fp2 , ... , fpnp , ft1 , ft2 , ... , ftnt ] . In our experiment , the number of different path types is about 5,000 on average for each language pair . The number of tokens can be restricted by a hyper-parameter max vocab to trade off effectiveness and efficiency . Our default setting is 10,000 . These elements can also be used as index keys to filter the database , and by calculating the similarity of feature vectors IPTR can retrieve the most similar program in target language , which is the translation candidate . Noted that we simplify the feature representation presented here due to space limitation . In actual IPTR , we also consider the dependencies between structural and textual features . In contrast to existing work ( Cheng et al. , 2016 ; 2017 ) that suggests to extract all the text from a program and treat it in isolation , IPTR considers textual features in strong dependency with the structural features to leverage more context from the structure . For the sake of simplification and to avoid computation overhead , IPTR only processes text that appears in the extracted paths . In this way , IPTR can run an efficient hierarchical retrieval mechanism : first calculating the structural similarity , then comparing the textual similarity in each common path type . We show the details of our comprehensive feature representation in Appendix A.3 . | This work proposes a retrieval-based approach for program translation. Existing ML/DL models for program translation typically design a decoder to directly generate the code in the target language. On the contrary, this work designs iPTR, which first computes a feature representation of the target code, then retrieves the most similar code in a large code corpus. Specifically, iPTR includes a query transformation model (QTM), which generates the feature representation of the target code, given the feature representation of the source code as the input. The feature representation includes the information of tokens in the code, and the paths in the syntax trees. The idea of using the paths is similar to the code2vec paper. QTM could be trained without parallel data between source and target codes. Specifically, encoders and decoders of different programming languages could be trained in a similar way to the training of autoencoders. This idea is similar to TransCoder. Meanwhile, they show that iPTR could be trained with active learning and user feedback, where they use active learning to acquire limited parallel training data, and user feedbacks are corrections of the wrong output code. They compare their approach to existing ML/DL program translation models, as well as code retrieval systems. They show that iPTR performs better than other baselines, even without active learning and feedbacks. Not surprisingly, active learning and incorporating user feedbacks further improve the performance. | SP:d10de5e45dc6a79787c2167e2ab7fd1dc9c9a4e1 |
iPTR: Learning a representation for interactive program translation retrieval | Program translation contributes to many real world scenarios , such as porting codebases written in an obsolete or deprecated language to a modern one or reimplementing existing projects in one ’ s preferred programming language . Existing data-driven approaches either require large amounts of training data or neglect significant characteristics of programs . In this paper , we present IPTR for interactive code translation retrieval from Big Code . IPTR uses a novel code representation technique that encodes structural characteristics of a program and a predictive transformation technique to transform the representation into the target programming language . The transformed representation is used for code retrieval from Big Code . With our succinct representation , the user can easily update and correct the returned results to improve the retrieval process . Our experiments show that IPTR outperforms supervised baselines in terms of program accuracy . 1 INTRODUCTION . Numerous programs are being developed and released online . To port codebases written in obsolete or deprecated languages to a modern one ( Lachaux et al. , 2020 ) , or to further study , reproduce and apply them on various platforms , these programs require corresponding versions in different languages . In cases when developers do not make the translation efforts themselves , third-party users have to manually translate the software to their needed language , which is time consuming and error prone because they have to be the expert in both languages . Also , hard-wired cross-language compilers still require heavy human intervention for adaptation and are limited between some specified types of programming . In this paper , we discuss the potentials of data-driven methods that exploit existing big code resources to support code translation . The abundance of open source programs on the internet provides opportunities for new applications , such as workflow generation ( Derakhshan et al. , 2020 ) , data preparation ( Yan & He , 2020 ) , and transformation retrieval ( Yan & He , 2018 ) . Code translation is another application that is gaining attention ( Lachaux et al. , 2020 ) . Data-driven program translation . Inspired by natural language translation , one line of approaches trains a translation model from large amounts of code data either in a supervised ( Nguyen et al. , 2013 ; 2015 ; Chen et al. , 2018 ) or weakly-supervised fashion ( Lachaux et al. , 2020 ) . Supervised approaches require a parallel dataset to train the translation model . In parallel datasets , programs in different languages are considered to be “ semantically aligned ” . Obtaining the parallel datasets in programming languages is hard because the translations have to be handwritten most of the time . Besides massive human efforts , it is also a tricky problem to extract general textual features that apply to every programming language . A recent weakly-supervised method ( Lachaux et al. , 2020 ) pretrains the translation model on the task of denoising randomly corrupted programs and optimizes the model through back-translation . However , this method still relies on high-quality training data . Further , all these approaches directly reuse NLP approaches that neglect the special features of programming languages . Another potential approach is to use a retrieval system to obtain translation candidates directly from Big Code , which refers to well-maintained program repositories . However , existing code retrieval systems , such as Sourcerer ( Linstead et al. , 2009 ) , lack the proper capabilities for code-to-code search and cross-language code retrieval . These methods ask users to give feedback on several preset metrics and questions ( Wang et al. , 2014 ; Dietrich et al. , 2013 ; Martie et al. , 2015 ; Sivaraman et al. , 2019 ) . None of these methods is tailored to cross-language retrieval . In this paper , we propose an interactive program translation retrieval system IPTR based on a novel and generalizable code representation that retains important code properties . The representation not only encodes textual features but structural features that can be generalized across all imperative programming languages . We further propose a query transformation model based on autoencoders to transform the input program representation to a representation that has properties of the target language . Due to the succinct form of our code representation , IPTR can adapt the original query based on user annotations . This methodology can compete with existing statistical translation models that require a large amount of training data . In short , we make the following main contributions : • We propose IPTR , an interactive cross-language code retrieval system with a program feature representation that additionally encodes code structure properties . • We further propose a novel query transformation model that learns a refined code representation in the target language before using it for retrieval . This model can be trained in an unsupervised way but also improved through active learning . • Based on our succinct code representation , we propose a user feedback mechanism that enables IPTR to successively improve its results . 2 SYSTEM OVERVIEW . We propose IPTR , an interactive cross language code retrieval system that supports program translation on multiple programming languages . Problem Definition . Given a piece of source program Ps written in language Ls , a selected target language Lt , and a large program repository Dp = { P1 , P2 , ... , Pn } , the goal is to find the best possible translation Pt of Ps in Lt from Dp . The problem is to design an effective program feature representation that generalizes to many languages and can be updated through user feedback . Our solution : IPTR The workflow of IPTR is shown in Figure 1 . IPTR first constructs a succinct but informative feature representation for input programs ( Section 3.1 ) . Since the target is to identify a similar program in the target language , IPTR then applies a query transformation model ( QTM ) to transform this representation into an estimated feature representation of the translation ( Section 3 ) . The transformation model is trained in an unsupervised manner but can also be updated dynamically through active learning ( Section 3.2.2 ) . Finally , this new representation will be used as a query to retrieve the program that has similar features from the database . In addition , as an interactive system , IPTR allows the user to give feedback on the retrieved translation ( Section 4 ) . The user can either accept the result or make corrections . Based on our structured and informative feature representation , IPTR can easily and quickly adapt the query based on raw user corrections . Then with the new query , it may identify a more appropriate translation candidate in the second retrieval attempt . 3 PROGRAM REPRESENTATION . To retrieve a promising program translation from a large code database , IPTR needs an effective and efficient query . Directly retrieving based on raw code is impractical . In contrast to existing methods that generate queries based on either keywords ( Linstead et al. , 2009 ) or preset metrics and questions ( Martie et al. , 2015 ) , IPTR generates a feature representation that effectively combines structural properties of the program and textual features . It further uses a query transformation model ( QTM ) to generate features in the target language . 3.1 BASIC ENCODING OF PROGRAM STRUCTURE AND TEXT . Due to the special and non-trival structure of programming languages compared to natural languages , we take both structural and textual features into consideration . The structural features of a program can be represented by its syntax tree where each tree node denotes a code construct . One can also use control flow graph ( CFG ) that captures the dependence between code basic blocks and procedures to represent the code behavior . However , our goal is to support program translation for any granularity of program , code behavior is hard to measure when the code fragment is not a complete code block . Further CFG is much more difficult to construct than syntax trees . As syntactical similarity also plays a significant role , we pick syntax trees as the basis of our representation to also capture the low-level syntactic structure within code blocks . One can also combine CFG and syntax trees to reserve more information . However this would trade-off the simplicity of the retrieval query . We show that with analysis of the static AST features we already achieve high program accuracy . The syntax tree can be either a concrete syntax tree ( CST ) or an abstract syntax tree ( AST ) ( Alon et al. , 2018 ; 2019 ; Chen et al. , 2018 ) . A CST depicts nodes with complete structural information , such as all the tokens in the code while the AST is more abstract and only displays structural or content-related details . For more details on CSTs and ASTs , we provide examples in the Appendix A.2 . As the CST is quite verbose and the AST does not generalize to multiple languages , we fall back on the low-level CST as a basis , and take the philosophy of AST as an inspiration to construct a unified abstract representation . Specifically , IPTR first simplifies the CST by removing semantically repetitive nodes such as equalityExpression and == and intermediate nodes and generates a more simplified but still informative syntax tree . As shown in Figure 2 , a piece of Javascript code is first converted into a simplified syntax tree ( details of simplifying CST are shown in Appendix A.2 ) . Inspired by prior work ( Alon et al. , 2018 ) , IPTR further simplifies it by extracting a set of onedimensional paths that connect the program elements of the two-dimensional tree . Our method abstracts these paths by only keeping the three nodes that enclose the most critical information on a path : for each pair of leaf-nodes in the CST , IPTR keeps the nodes with their values and the root node of the statement . It drops all other intermediate nodes on this path . The extracted abstract paths of the JavaScript Program example are also shown in Figure 2 . By simply matching nodes with similar names from different languages , IPTR can classify these paths into different types and generalize them to multiple programming languages . Thus , the structural feature of a program can be succinctly represented by the different types of paths p1 , p2 , ... , pj it contains . To additionally incorporate textual features , IPTR treats extracted paths as plain text and keeps all the text tokens t1 , t2 , ... , tk appearing in each extracted path to generate text features . Finally , we can use these tokens ( textual features ) together with different types of paths ( structural features ) illustrated above as feature elements of programs . For each input program , we generate a feature vector consisting of the feature element frequencies in that program . Let f be the occurrence frequency of feature elements , then the final feature representation will be [ fe1 , fe2 , ... , fen ] = [ fp1 , fp2 , ... , fpnp , ft1 , ft2 , ... , ftnt ] . In our experiment , the number of different path types is about 5,000 on average for each language pair . The number of tokens can be restricted by a hyper-parameter max vocab to trade off effectiveness and efficiency . Our default setting is 10,000 . These elements can also be used as index keys to filter the database , and by calculating the similarity of feature vectors IPTR can retrieve the most similar program in target language , which is the translation candidate . Noted that we simplify the feature representation presented here due to space limitation . In actual IPTR , we also consider the dependencies between structural and textual features . In contrast to existing work ( Cheng et al. , 2016 ; 2017 ) that suggests to extract all the text from a program and treat it in isolation , IPTR considers textual features in strong dependency with the structural features to leverage more context from the structure . For the sake of simplification and to avoid computation overhead , IPTR only processes text that appears in the extracted paths . In this way , IPTR can run an efficient hierarchical retrieval mechanism : first calculating the structural similarity , then comparing the textual similarity in each common path type . We show the details of our comprehensive feature representation in Appendix A.3 . | This paper seeks to solve program translation problem through code retrieval. It proposes an interactive code retrieval system, called iPTR to perform cross-language retrieval with minimum code pairs. The method extracts textual features and structural features from code and transform the features into target-language features through an autoencoder, which is trained through a uni-language manner. It further leverages users' correction to update feature representation and for new round of retrieval. | SP:d10de5e45dc6a79787c2167e2ab7fd1dc9c9a4e1 |
Relevance Attack on Detectors | 1 INTRODUCTION . Adversarial attacks ( Szegedy et al . ( 2014 ) ; Goodfellow et al . ( 2015 ) ; Carlini & Wagner ( 2017 ) ; Mądry et al . ( 2017 ) ; Baluja & Fischer ( 2017 ) ; Su et al . ( 2019 ) ) have revealed the fragility of Deep Neural Networks ( DNNs ) by fooling them with elaborately-crafted imperceptible perturbations . Among them , the black-box attack , i.e. , attacking without knowledge of their inner structure and weights , is much harder , more aggressive and closer to real-world scenarios . For classifiers , there exist some promising black-box attacks ( Papernot et al . ( 2016 ) ; Brendel et al . ( 2018 ) ; Dong et al . ( 2018 ) ; Xie et al . ( 2019 ) ; Lin et al . ( 2020 ) ; Chen et al . ( 2020 ) ) . It is also severe to attack object detection ( Zhang & Wang ( 2019 ) ) in a black-box manner , e.g. , hiding certain objects from unknown detectors ( Thys et al . ( 2019 ) ) . By that , life-concerning systems based on detection such as autonomous driving and security surveillance would be greatly influence . To the best of our knowledge , no existing attack is specifically designed for black-box transferability in detectors , because they have multiple-outputs and a high diversity across architectures . In such situations , adversarial samples do not transfer well ( Su et al . ( 2018 ) ) , and most attacks only decrease mAP of black-box detectors by 5 to 10 % ( Xie et al . ( 2017 ) ; Li et al . ( 2018c ; b ) ) . To overcome this , we propose one plausible way to find common properties across detectors , which facilitates the discovery of common weaknesses . Based on them , the designed attack can threaten variable victims . In this paper , we adopt the relevance map as a common property , on which different detectors have similar interpretable results , as shown in Fig . 1 . Based on relevance maps , we design a Relevance Attack on Detectors ( RAD ) . RAD focuses on suppressing the relevance map rather than directly attacking the prediction as in existing works ( Xie et al . ( 2017 ) ; Li et al . ( 2018c ; a ) ) . Because the relevance maps are quite similar across models , those of black-box models are influenced and misled as well in attack , leading to the great transferability . Although some works have adopted the relevance map as an indicator or reference of success attacks ( Dong et al . ( 2019 ) ; Zhang & Zhu ( 2019 ) ; Chen et al . ( 2020 ) ; Wu et al . ( 2020a ) ) , there is no work to directly attack the relevance maps of detectors to the best of our knowledge . In our comprehensive evaluation , RAD achieves the state-of-the-art transferability on 8 black-box models for COCO ) dataset ( Lin et al . ( 2014 ) ) , nearly halving the detection mAP . Interestingly , the adversarial samples of RAD also greatly influence the performance of instance segmentation , even only detectors are attacked . Given the high transferability of RAD , we create Adversarial Objects in COntext ( AOCO ) , the first adversarial dataset for object detection . AOCO contains 10K samples that significantly decrease the performance of black-box models for detection and segmentation . AOCO may serve as a benchmark to test the robustness of a DNN or improve it by adversarial training . CONTRIBUTIONS • We propose a novel attack framework on relevance maps for detectors . We extend network visualization methods to detectors , find out the most suitable nodes to attack by relevance maps , and explore on the best update techniques to increase the transferability . • We evaluate RAD comprehensively and find its state-of-the-art transferability , which exceeds existing results by above 20 % . Detection mAPs are more than halved , invalidating the stateof-the-art detectors to a large extent . • By RAD , we create the first adversarial dataset for object detection , i.e. , AOCO . As a potential benchmark , AOCO is generated from COCO and contains 10K high-transferable samples . AOCO helps to quickly evaluate and improve the robustness of detectors . 2 RELATED WORK . Since ( Szegedy et al . ( 2014 ) ) , there have been lots of promising adversarial attacks ( Goodfellow et al . ( 2015 ) ; Carlini & Wagner ( 2017 ) ; Mądry et al . ( 2017 ) ) . Generally , they fix the network weights and change the input slightly to optimize the attack loss . The network then predicts incorrectly on adversarial samples with a high confidence . ( Papernot et al . ( 2016 ; 2017 ) ) find that adversarial samples crafted by attacking a white-box surrogate model may transfer to other black-box models as well . Input modification ( Xie et al . ( 2019 ) ; Dong et al . ( 2019 ) ; Lin et al . ( 2020 ) ) or other optimization ways ( Dong et al . ( 2018 ) ; Lin et al . ( 2020 ) ) are validated to be effective in enhancing the transferability . ( Xie et al . ( 2017 ) ) extends adversarial attacks to detectors . It proposes to attack on densely generated bounding boxes . After that , losses about localization and classification are designed ( Li et al . ( 2018c ) ) for attacking detectors . ( Lu et al . ( 2017 ) ) and ( Li et al . ( 2018a ) ) propose to attack detectors in a restricted area . Existing works achieve good results in white-box scenarios , but are not specifically designed for transferability . The adversarial impact on black-box models is quite limited , i.e. , a 5 to 10 % decrease from the original mAP , even when two models only differ in backbone ( Xie et al . ( 2017 ) ; Li et al . ( 2018c ; b ) ) . ( Wang et al . ( 2020 ) ) discusses black-box attacks towards detectors based on queries rather than the transferability as we do . The performance is satisfactory , but it requires over 30K queries , which is easy to be discovered by the model owner . Besides , physical attacks on white-box detectors are also feasible ( Huang et al . ( 2020 ) ; Wu et al . ( 2020b ) ; Xu et al . ( 2020 ) ) . For the great transferability , we propose to attack on relevance maps , which are calculated by network visualization methods ( Zeiler & Fergus ( 2014 ) ; Selvaraju et al . ( 2017 ) ; Shrikumar et al . ( 2017 ) ) . They are originally developed to interpret how DNNs predict and help users gain trust on them . Specifically , they display how the input contributes to a certain node output in a pixel-wise manner . Typical works include Layer-wise Relevance Propagation ( LRP ) ( Bach et al . ( 2015 ) ) , Contrastive LRP ( Gu et al . ( 2018 ) ) and Softmax Gradient LRP ( SGLRP ) ( Iwana et al . ( 2019 ) ) . These methods encourage the reference of relevance maps in attack ( Dong et al . ( 2019 ) ; Zhang & Zhu ( 2019 ) ; Chen et al . ( 2020 ) ; Wu et al . ( 2020a ) ) , and also inspire us . However , none of them attack on relevance maps for detectors . RAD differs from ( Ghorbani et al . ( 2019 ) ; Zhang et al . ( 2020 ) ) in the goal . RAD misleads detectors by suppressing relevance maps . In contrast , ( Ghorbani et al . ( 2019 ) ) misleads the relevance maps while keeping the prediction unchanged . ( Zhang et al . ( 2020 ) ) also misleads DNNs , but it keeps the relevance maps unchanged . 3 RELEVANCE ATTACK ON DETECTORS . We propose an attack specifically designed for black-box transferability , named Relevance Attack on Detectors ( RAD ) . RAD suppresses multi-node relevance maps for several bounding boxes . Since the relevance map is commonly shared by different detectors as shown in Fig . 1 , attacking on it in the white-box surrogate model achieves a high transferability towards black-box models . In this section , we first provide a high-level overview of RAD , and analyze the potential reasons of its transferability . Then we thoroughly discuss three crucial concrete issues in RAD . • In Section 3.3 , we specify the calculation of relevance maps for detectors , where current visualization methods are not applicable . • In Section 3.4 , we introduce the proper nodes to attack by RAD . • In Section 3.5 , we explore on the suitable techniques to update samples in RAD . 3.1 WHAT IS RAD ? . We present the framework of RAD in Fig . 2 . Initialized by the original sample x0 , the adversarial sample xk in the kth iteration is forward propagated in the surrogate model , getting the prediction f ( xk ) . Current attacks generally suppress the prediction values of all attacked output nodes in T . In contrast , RAD suppresses the corresponding relevance map h ( xk , T ) . To restrain that , gradients of h ( xk , T ) back propagate to xk , which is then modified to xk+1 . It is notable that RAD is a complete framework to attack detectors , and its each component requires a special design . Besides the calculation of relevance maps of detectors , other components in RAD , e.g. , the attacked nodes or the update techniques , also need a customized analysis . The reason is that no existing work directly attacks the relevance of detectors , and the experience in attacking predictions is not totally applicable here . For example , ( Zhang & Wang ( 2019 ) ) emphasizes classification loss and localization loss equally , but the former is validated to be significantly better in attacking the relevance in Section 3.4 . 3.2 WHY RAD TRANSFERS ? . RAD ’ s transferability comes from the attack goal : changing the common properties , i.e. , the relevance maps . As shown in Fig . 3 , the relevance maps are clear and structured for the original sample in both detectors . After RAD , the relevance maps are induced to be meaningless without a correct focus , leading to wrong predictions , i.e. , no or false detection . Because relevance maps transfer well across models , those for black-box detectors are also significantly influenced , causing a great performance drop , which is illustrated visually in Section 4.2 . RAD also attacks quite “ precisely ” , i.e. , the perturbation pattern is significantly focused on distinct areas and has a clear structure as shown in Fig . 4 . That is to say , RAD accurately locates the most discriminating parts of a sample and concentrates the perturbation on them , leading to a great transferability when the perturbations is equally bounded . 3.3 WHAT IS THE RELEVANCE MAPS FOR DETECTORS ? . We analyze the potential of RAD above , below we make it feasible by addressing three crucial issues . To conduct the relevance attack , we first need to know the relevance maps for detectors . Currently , there have been lots of methods to calculate the relevance maps for classifiers as described in Section 2 , but none of them are suitable for detectors . We take SGLRP ( Iwana et al . ( 2019 ) ) as an example to explain this and then to modify , because it excels in discriminating ability against irrelevant regions of a certain target node . SGLRP visualizes how the input contributes to one output node in a pixel-wise way by backpropagating the relevance from the output to the input based on Deep Taylor Decomposition ( DTD ) as illustrated in Appendix A. R ( L ) is the initial relevance in the output layer L and its nth component is calculated as R ( L ) n = { yn ( 1− yn ) n = t , −ynyt n 6= t , ( 1 ) where yn is the predicted probability of class n , and yt is that for the single-node target t. The pixel-wise relevance map h ( x , t ) for the single-node target t is calculated by back propagating the relevance R from the final layer to the input following rules specified in ( Iwana et al . ( 2019 ) ) . In detectors , we need the pixel-wise contributions from the input to m bounding boxes . This multi-node relevance map could not be directly calculated by ( 1 ) , so we naturally modify SGLRP as R ( L ) n = { yn ( 1− yn ) n ∈ T , − 1myn ∑m i=1 yti n /∈ T , ( 2 ) where yti is the predicted probabilities for one target node ti . T is the set containing all target nodes { t1 , t2 , ... , tm } . With iNNvestigate Library ( Alber et al . ( 2019 ) ) to implement Multi-Node SGLRP and Deep Learning platforms supporting auto-gradient , the gradients from RAD loss LRAD ( x ) = h ( x , T ) to sample x could be obtained according to the calculation rules of relevance maps in Appendix A . We illustrate the difference between SGLRP and our Multi-Node SGLRP in Fig . 5 . SGLRP only displays the relevance map for one bounding box , e.g. , “ TV ” , “ chair ” and “ bottle ” . Multi- Node SGLRP , in contrast , visualizes the overall relevance . | This work proposes to attack object detectors by targeting their relevance maps of the different detected objects. The proposed RAD attack shows better black box transferability across different detectors on MSCOCO dataset. The relevance maps are calculated based on SGLRP act as an attention mechanism to the attack to focus on relevant regions in the more meaningful image and hence produce more transferable attacks. | SP:7414e95e25417652c729da914dff9d116c083282 |
Relevance Attack on Detectors | 1 INTRODUCTION . Adversarial attacks ( Szegedy et al . ( 2014 ) ; Goodfellow et al . ( 2015 ) ; Carlini & Wagner ( 2017 ) ; Mądry et al . ( 2017 ) ; Baluja & Fischer ( 2017 ) ; Su et al . ( 2019 ) ) have revealed the fragility of Deep Neural Networks ( DNNs ) by fooling them with elaborately-crafted imperceptible perturbations . Among them , the black-box attack , i.e. , attacking without knowledge of their inner structure and weights , is much harder , more aggressive and closer to real-world scenarios . For classifiers , there exist some promising black-box attacks ( Papernot et al . ( 2016 ) ; Brendel et al . ( 2018 ) ; Dong et al . ( 2018 ) ; Xie et al . ( 2019 ) ; Lin et al . ( 2020 ) ; Chen et al . ( 2020 ) ) . It is also severe to attack object detection ( Zhang & Wang ( 2019 ) ) in a black-box manner , e.g. , hiding certain objects from unknown detectors ( Thys et al . ( 2019 ) ) . By that , life-concerning systems based on detection such as autonomous driving and security surveillance would be greatly influence . To the best of our knowledge , no existing attack is specifically designed for black-box transferability in detectors , because they have multiple-outputs and a high diversity across architectures . In such situations , adversarial samples do not transfer well ( Su et al . ( 2018 ) ) , and most attacks only decrease mAP of black-box detectors by 5 to 10 % ( Xie et al . ( 2017 ) ; Li et al . ( 2018c ; b ) ) . To overcome this , we propose one plausible way to find common properties across detectors , which facilitates the discovery of common weaknesses . Based on them , the designed attack can threaten variable victims . In this paper , we adopt the relevance map as a common property , on which different detectors have similar interpretable results , as shown in Fig . 1 . Based on relevance maps , we design a Relevance Attack on Detectors ( RAD ) . RAD focuses on suppressing the relevance map rather than directly attacking the prediction as in existing works ( Xie et al . ( 2017 ) ; Li et al . ( 2018c ; a ) ) . Because the relevance maps are quite similar across models , those of black-box models are influenced and misled as well in attack , leading to the great transferability . Although some works have adopted the relevance map as an indicator or reference of success attacks ( Dong et al . ( 2019 ) ; Zhang & Zhu ( 2019 ) ; Chen et al . ( 2020 ) ; Wu et al . ( 2020a ) ) , there is no work to directly attack the relevance maps of detectors to the best of our knowledge . In our comprehensive evaluation , RAD achieves the state-of-the-art transferability on 8 black-box models for COCO ) dataset ( Lin et al . ( 2014 ) ) , nearly halving the detection mAP . Interestingly , the adversarial samples of RAD also greatly influence the performance of instance segmentation , even only detectors are attacked . Given the high transferability of RAD , we create Adversarial Objects in COntext ( AOCO ) , the first adversarial dataset for object detection . AOCO contains 10K samples that significantly decrease the performance of black-box models for detection and segmentation . AOCO may serve as a benchmark to test the robustness of a DNN or improve it by adversarial training . CONTRIBUTIONS • We propose a novel attack framework on relevance maps for detectors . We extend network visualization methods to detectors , find out the most suitable nodes to attack by relevance maps , and explore on the best update techniques to increase the transferability . • We evaluate RAD comprehensively and find its state-of-the-art transferability , which exceeds existing results by above 20 % . Detection mAPs are more than halved , invalidating the stateof-the-art detectors to a large extent . • By RAD , we create the first adversarial dataset for object detection , i.e. , AOCO . As a potential benchmark , AOCO is generated from COCO and contains 10K high-transferable samples . AOCO helps to quickly evaluate and improve the robustness of detectors . 2 RELATED WORK . Since ( Szegedy et al . ( 2014 ) ) , there have been lots of promising adversarial attacks ( Goodfellow et al . ( 2015 ) ; Carlini & Wagner ( 2017 ) ; Mądry et al . ( 2017 ) ) . Generally , they fix the network weights and change the input slightly to optimize the attack loss . The network then predicts incorrectly on adversarial samples with a high confidence . ( Papernot et al . ( 2016 ; 2017 ) ) find that adversarial samples crafted by attacking a white-box surrogate model may transfer to other black-box models as well . Input modification ( Xie et al . ( 2019 ) ; Dong et al . ( 2019 ) ; Lin et al . ( 2020 ) ) or other optimization ways ( Dong et al . ( 2018 ) ; Lin et al . ( 2020 ) ) are validated to be effective in enhancing the transferability . ( Xie et al . ( 2017 ) ) extends adversarial attacks to detectors . It proposes to attack on densely generated bounding boxes . After that , losses about localization and classification are designed ( Li et al . ( 2018c ) ) for attacking detectors . ( Lu et al . ( 2017 ) ) and ( Li et al . ( 2018a ) ) propose to attack detectors in a restricted area . Existing works achieve good results in white-box scenarios , but are not specifically designed for transferability . The adversarial impact on black-box models is quite limited , i.e. , a 5 to 10 % decrease from the original mAP , even when two models only differ in backbone ( Xie et al . ( 2017 ) ; Li et al . ( 2018c ; b ) ) . ( Wang et al . ( 2020 ) ) discusses black-box attacks towards detectors based on queries rather than the transferability as we do . The performance is satisfactory , but it requires over 30K queries , which is easy to be discovered by the model owner . Besides , physical attacks on white-box detectors are also feasible ( Huang et al . ( 2020 ) ; Wu et al . ( 2020b ) ; Xu et al . ( 2020 ) ) . For the great transferability , we propose to attack on relevance maps , which are calculated by network visualization methods ( Zeiler & Fergus ( 2014 ) ; Selvaraju et al . ( 2017 ) ; Shrikumar et al . ( 2017 ) ) . They are originally developed to interpret how DNNs predict and help users gain trust on them . Specifically , they display how the input contributes to a certain node output in a pixel-wise manner . Typical works include Layer-wise Relevance Propagation ( LRP ) ( Bach et al . ( 2015 ) ) , Contrastive LRP ( Gu et al . ( 2018 ) ) and Softmax Gradient LRP ( SGLRP ) ( Iwana et al . ( 2019 ) ) . These methods encourage the reference of relevance maps in attack ( Dong et al . ( 2019 ) ; Zhang & Zhu ( 2019 ) ; Chen et al . ( 2020 ) ; Wu et al . ( 2020a ) ) , and also inspire us . However , none of them attack on relevance maps for detectors . RAD differs from ( Ghorbani et al . ( 2019 ) ; Zhang et al . ( 2020 ) ) in the goal . RAD misleads detectors by suppressing relevance maps . In contrast , ( Ghorbani et al . ( 2019 ) ) misleads the relevance maps while keeping the prediction unchanged . ( Zhang et al . ( 2020 ) ) also misleads DNNs , but it keeps the relevance maps unchanged . 3 RELEVANCE ATTACK ON DETECTORS . We propose an attack specifically designed for black-box transferability , named Relevance Attack on Detectors ( RAD ) . RAD suppresses multi-node relevance maps for several bounding boxes . Since the relevance map is commonly shared by different detectors as shown in Fig . 1 , attacking on it in the white-box surrogate model achieves a high transferability towards black-box models . In this section , we first provide a high-level overview of RAD , and analyze the potential reasons of its transferability . Then we thoroughly discuss three crucial concrete issues in RAD . • In Section 3.3 , we specify the calculation of relevance maps for detectors , where current visualization methods are not applicable . • In Section 3.4 , we introduce the proper nodes to attack by RAD . • In Section 3.5 , we explore on the suitable techniques to update samples in RAD . 3.1 WHAT IS RAD ? . We present the framework of RAD in Fig . 2 . Initialized by the original sample x0 , the adversarial sample xk in the kth iteration is forward propagated in the surrogate model , getting the prediction f ( xk ) . Current attacks generally suppress the prediction values of all attacked output nodes in T . In contrast , RAD suppresses the corresponding relevance map h ( xk , T ) . To restrain that , gradients of h ( xk , T ) back propagate to xk , which is then modified to xk+1 . It is notable that RAD is a complete framework to attack detectors , and its each component requires a special design . Besides the calculation of relevance maps of detectors , other components in RAD , e.g. , the attacked nodes or the update techniques , also need a customized analysis . The reason is that no existing work directly attacks the relevance of detectors , and the experience in attacking predictions is not totally applicable here . For example , ( Zhang & Wang ( 2019 ) ) emphasizes classification loss and localization loss equally , but the former is validated to be significantly better in attacking the relevance in Section 3.4 . 3.2 WHY RAD TRANSFERS ? . RAD ’ s transferability comes from the attack goal : changing the common properties , i.e. , the relevance maps . As shown in Fig . 3 , the relevance maps are clear and structured for the original sample in both detectors . After RAD , the relevance maps are induced to be meaningless without a correct focus , leading to wrong predictions , i.e. , no or false detection . Because relevance maps transfer well across models , those for black-box detectors are also significantly influenced , causing a great performance drop , which is illustrated visually in Section 4.2 . RAD also attacks quite “ precisely ” , i.e. , the perturbation pattern is significantly focused on distinct areas and has a clear structure as shown in Fig . 4 . That is to say , RAD accurately locates the most discriminating parts of a sample and concentrates the perturbation on them , leading to a great transferability when the perturbations is equally bounded . 3.3 WHAT IS THE RELEVANCE MAPS FOR DETECTORS ? . We analyze the potential of RAD above , below we make it feasible by addressing three crucial issues . To conduct the relevance attack , we first need to know the relevance maps for detectors . Currently , there have been lots of methods to calculate the relevance maps for classifiers as described in Section 2 , but none of them are suitable for detectors . We take SGLRP ( Iwana et al . ( 2019 ) ) as an example to explain this and then to modify , because it excels in discriminating ability against irrelevant regions of a certain target node . SGLRP visualizes how the input contributes to one output node in a pixel-wise way by backpropagating the relevance from the output to the input based on Deep Taylor Decomposition ( DTD ) as illustrated in Appendix A. R ( L ) is the initial relevance in the output layer L and its nth component is calculated as R ( L ) n = { yn ( 1− yn ) n = t , −ynyt n 6= t , ( 1 ) where yn is the predicted probability of class n , and yt is that for the single-node target t. The pixel-wise relevance map h ( x , t ) for the single-node target t is calculated by back propagating the relevance R from the final layer to the input following rules specified in ( Iwana et al . ( 2019 ) ) . In detectors , we need the pixel-wise contributions from the input to m bounding boxes . This multi-node relevance map could not be directly calculated by ( 1 ) , so we naturally modify SGLRP as R ( L ) n = { yn ( 1− yn ) n ∈ T , − 1myn ∑m i=1 yti n /∈ T , ( 2 ) where yti is the predicted probabilities for one target node ti . T is the set containing all target nodes { t1 , t2 , ... , tm } . With iNNvestigate Library ( Alber et al . ( 2019 ) ) to implement Multi-Node SGLRP and Deep Learning platforms supporting auto-gradient , the gradients from RAD loss LRAD ( x ) = h ( x , T ) to sample x could be obtained according to the calculation rules of relevance maps in Appendix A . We illustrate the difference between SGLRP and our Multi-Node SGLRP in Fig . 5 . SGLRP only displays the relevance map for one bounding box , e.g. , “ TV ” , “ chair ” and “ bottle ” . Multi- Node SGLRP , in contrast , visualizes the overall relevance . | This paper presents a method for adversarial attacks on object detectors by exploiting relevance maps that are originally intended for model interpretation. Unlike most of the existing methods that attack detection scores directly, the proposed approach focuses on suppressing the relevance map associated with target objects by image perturbation. The idea is interesting and demonstrates good transferability on the tasks of object detection and segmentation. | SP:7414e95e25417652c729da914dff9d116c083282 |
CoCon: A Self-Supervised Approach for Controlled Text Generation | 1 INTRODUCTION . Transformer-based ( Vaswani et al. , 2017 ; Tay et al. , 2020 ) pretrained language models ( LMs ) have led a wave of new advances in natural language processing tasks as a means to extract contextualized word embeddings ( Devlin et al. , 2018 ; Dai et al. , 2019b ; Yang et al. , 2019 ) and as text generators ( Radford et al. , 2019 ; Brown et al. , 2020 ) . These LMs are trained on huge amounts of text corpora to predict next tokens through a log-likelihood objective . Given its remarkably fluent text generation , there is growing interest in controlling output texts of such LMs ( Keskar et al. , 2019 ; Dathathri et al. , 2019 ) . Approaches like training a modified LM from scratch to incorporate target text attributes ( Keskar et al. , 2019 ) can be expensive while finetuning pretrained LMs for specific attributes ( Ziegler et al. , 2019 ) limits the scope of text control . Without changing the architecture or weights of pretrained LMs , one promising approach ( PPLM ) ( Dathathri et al. , 2019 ) controls generated text through attribute models . Though effective in controlling high-level text attributes such as topic and sentiment , the same target attribute may generate text samples with vastly different content at the word- and phrase-levels , leaving a gap for more fine-grained control over the content of LM-generated texts . We conceptualize Content-Conditioner ( CoCon ) as an approach to narrow this gap by guiding pretrained LMs ’ text outputs through the incorporation of content input . This content input can take the form of a text sequence whose content we would like to condition on for text generation . Essentially , CoCon comprises two parts : 1 ) a pretrained LM and 2 ) a interleave CoCon layer . By employing a pretrained LM , CoCon incorporates the representations of a content input into the encoded text representations through the CoCon layer before passing the content-conditioned representations into LMβ for generation . To train the CoCon block , we propose a self-supervised learning approach where training data consist of text samples generated by the pretrained LM itself ( § 3.1 ) . By splitting each text sequence into two segments ( [ xa ; xb ] ) , CoCon learns through a self reconstruction objective to help the LM reconstruct missing latter segments ( xb ) by taking xb itself as the content input . We use content masking for CoCon and also propose other loss functions such as cycle reconstruction to condition content from divergent sources while producing high-quality texts . Since the CoCon block ’ s size is a small fraction of the LM and no finetuning is conducted on the LM ’ s weights , the training cost is significantly lower than training an LM from scratch . We show that CoCon ’ s fine-grained content control can be extended to also influence higher-level text attributes ∗Corresponding author : guoweial001 @ ntu.edu.sg 1Codes and models are available at : https : //github.com/alvinchangw/COCON ICLR2021 such as topic and sentiment in a zero-shot manner , and compare it with strong controlled generation baselines . Furthermore , CoCon is versatile in assimilating multiple content inputs , and its strength of content-conditioning can be flexibly adjusted through a content bias term during inference . In this paper , we demonstrate the CoCon approach with the GPT-2 345M model ( Radford et al. , 2019 ) as the pretrained LM . Given CoCon ’ s modular nature , it can be used with other Transformer-based LMs or even other controlled generation methods . All in all , the core contributions of this paper are : • We propose CoCon for content-conditioned language generation . • We introduce a self-supervised learning approach where CoCon learns to complete text sequences when given information about future tokens . • Through ablation studies and comparisons with strong baselines like PPLM and CTRL ( Keskar et al. , 2019 ) , we investigate how CoCon controls high-level attributes such as topic and sentiment while generating texts that have high content similarity to conditioning text . 2 RELATED WORK . There is a line of work that aims to generate output text of desired attributes with neural networks . Some of the earliest efforts involve conditional generative models ( Kikuchi et al. , 2016 ; Ficler & Goldberg , 2017 ) where the networks are trained on text data labeled with the target attributes . These models can be trained via reinforcement learning ( Ziegler et al. , 2019 ) or the generative adversarial network ( Yu et al. , 2017 ) framework . Unlike CoCon , the requirement of predetermined attributes in those methods limits the possible types of generated texts . CTRL ( Keskar et al. , 2019 ) is a recent approach that generated controlled fluent texts through the use of control codes which are meta-data prepended to the text during generation . Though it produces high-quality text with its GPT-2-like architecture , its control codes are also predetermined during the training . Closest to our work is Plug and Play Language Model ( PPLM ) ( Dathathri et al. , 2019 ) which seeks to control text on already pretrained LM without finetuning through relatively small ‘ pluggable ’ attribute models . While PPLM ’ s flexible design also enables controlled generation without retraining or finetuning the LM like in CoCon , our approach aims to control the generation at a content level , beyond high-level text attributes . Another core difference lies in the training where CoCon ’ s self-supervised learning absolves the need for labeled data , such as the ones employed to train PPLM ’ s attribute discriminator models . Weighted decoding ( Ghazvininejad et al. , 2017 ; Holtzman et al. , 2018 ) seeks to control the output text token by upweighting the probabilities of targeted words during the decoding step but has been shown to produce incoherent text ( See et al. , 2019 ) . Conditioning language generation has been used in question generation to enhance faithfulness by attending to textual context such as predicates , subject types or object types ( Elsahar et al. , 2018 ) rather than the content input used here in CoCon . Small adapter layers ( Bapna et al. , 2019 ) have been previously proposed for multilingual translation to also save on model size and training resources but differ from CoCon ’ s self-supervised training as they rely on annotated sentence pairs of different languages for training . Text style transfer is a related area that controls texts ’ attributes by translating text from one style to another ( Dai et al. , 2019a ) . A few of such studies employ auto-encoders to separate texts ’ style and non-style latent representation ( Shen et al. , 2017 ; Hu et al. , 2017 ; Yang et al. , 2018 ) . This disentanglement enables style changes to the text at the latent space while retaining most of its content . Another work identifies attribute markers ( Li et al. , 2018 ) which are n-grams correlated with a particular style in a text corpus and edit texts ’ style by substituting them . Essentially , style transfer alters existing texts rather than generating texts and requires predefined attributes . 3 CONTENT CONDITIONER ( COCON ) . In the following sections , we discuss the motivation for CoCon , its model architecture and how we train the CoCon block . Motivation In text generation with language models , given the prompt text x : t−1 = { x1 , . . . , xt−1 } , the following text { xt , . . . , xl } is generated in an auto-regressive manner ( Man- ning et al. , 1999 ; Bengio et al. , 2003 ) : p ( xt , . . . , xl|x1 , . . . , xt−1 ) = l∏ i=t p ( xi|x1 , . . . , xi−1 ) . ( 1 ) Previous studies on controlled text generation in LM showed that p ( x ) can be conditioned on target attributes ( Dathathri et al. , 2019 ) or control codes ( Keskar et al. , 2019 ) to control the text ’ s sentiment or topic , i.e. , p ( xt , . . . , xl|x1 , . . . , xt−1 ) = l∏ i=1 p ( xi|a , { x1 , . . . , xi−1 } ) , ( 2 ) where a is the target attribute . While these methods show that the generation is fluent and can be aligned with the target attribute well , the output texts { xt , . . . , xl } are controlled at a global attribute ( e.g. , sentiment/topic ) level rather than at a more local content ( e.g. , words/phrases ) level . Since there is a vast number of possible { xt , . . . , xl } candidates which would align well with both the prompt text and target attribute , this results in generated text samples that contain very different content during the stochastic token sampling process . This motivates an approach to condition on an content input c for more fine-grained control over text generation : p ( xt , . . . , xl|x1 , . . . , xt−1 ) = l∏ i=1 p ( xi|c , { x1 , . . . , xi−1 } ) , ( 3 ) where c can be a text sequence whose content we would like to condition on during text generation . Next , we propose the model architecture of Content-Conditioner ( CoCon ) as an approach for this control . Model Architecture Our proposed Content-Conditioner ( Figure 1 ) controls the content of the generated text while maintaining fluency by incorporating a pretrained Transformer-based language model ( LM ) , GPT-2 ( Radford et al. , 2019 ) in our experiments . Such LMs have shown remarkable natural text generation in the auto-regressive manner ( Eq . 1 ) where the next token xt is sampled based on the logits ot = LM ( x : t−1 ) . These LMs are essentially stacks of Transformer blocks , each consisting of layer normalization ( Ba et al. , 2016 ) , multi-head self-attention ( Vaswani et al. , 2017 ) and position-wise feed forward operations . An LM ’ s generation can be broken down into two separate parts : layers before the CoCon block ( LMα ) and layers after ( LMβ ) . The LMα acts as a feature extractor that takes in the input sequence ’ s embeddings and outputs its intermediate representation at a breakpoint , i.e. , h : t−1 = LMα ( x : t−1 ) . Subsequently , LMβ takes in this representation and outputs the logits for the next token , i.e. , ot = LMβ ( h : t−1 ) , yielding ot = LM ( x : t−1 ) = LMβ ( LMα ( x : t−1 ) ) = LMβ ( h : t−1 ) . ( 4 ) From Eq . 4 , we can see that the representation ( h ) is a medium to control next token logits ( o ) and hence the text generation process . Indeed , we transform h by conditioning it with the content input ( c ) through a CoCon block such that h′ : t−1 = CoCon ( h ( c ) : lc , h : t−1 ) , ( 5 ) where h ( c ) : lc = LMα ( c ) is the content representations and lc is the length of the content text sequence . We parameterize the CoCon block as a single Transformer block with an attention and position-wise feed-forward operation . Similar to a typical LM attention layer , the query ( Q ) , key ( K ) , value ( V ) matrices are computed through linear transformations on the representations h : t−1 , where Q , K , V ∈ R ( t−1 ) ×d and d is the representations ’ dimension . To attend to the content representations ( h ( c ) : lc ) , the content keys and values ( K ( c ) , V ( c ) ∈ Rlc×d ) are also computed , and concatenated to the original attention matrices before computing the CoCon attention output : K′ = [ K ( c ) ; K ] , V′ = [ V ( c ) ; V ] , A = Softmax ( QK′ > ) V′ = Softmax ( W ) V′ , ( 6 ) where A = { a1 , . . . , at−1 } and W ∈ R ( t−1 ) × ( lc+t−1 ) represents the attention weights . The final CoCon outputs are computed with a position-wise feed-forward layer . By concatenating to the representations prior to t − 1 and passing them to LMβ , the next logits , and consequently word token x̃t , is now conditioned on c : h′i = FF ( ai ) , õt = LMβ ( [ h : t−2 ; h ′ t−1 ] ) , pθ , ψ ( x̃t|c , x : t−1 ) = Softmax ( õt ) , ( 7 ) where θ and ψ are the paramterization of the CoCon block and LM respectively . Similar to a GPT-2 Transformer block , our CoCon block includes layer normalization before its multi-headed attention and feed-forward layers . Figure 1 summarizes the CoCon architecture which enables auto-regressive text generation by using x̃i as the token input ( xi ) to generate x̃i+1 where i ≥ t. Multiple Content Inputs CoCon ’ s flexible design enables multiple content inputs for a single generation . In the case where we have N content inputs ( c1 , . . . , cN ) , the output text can be conditioned by these contents through their attention keys and values , similar to Eq . 6 : K′ = [ K ( c 1 ) . . .K ( c N ) ; K ] , V′ = [ V ( c 1 ) . . .V ( c N ) ; V ] , A = Softmax ( QK′ > ) V′ . ( 8 ) Strength of Content Conditioning Within CoCon ’ s attention mechanism , we can vary the extent of content conditioning on the output text by biasing the attention weights in W ( Eq . 6 ) that correspond to the content input ( c ) . More specifically , the influence of c on the output text can be altered through the attention ’ s softmax weighting on the content values ( V ( c ) ) . During generation , a positive bias term ( τcontent ) can optionally be added to the content attention weights W : , : lc ∈ R ( t−1 ) ×lc to increase influence of V ( c ) , boosting content conditioning , while a negative term can conversely reduce the content-conditioning effect . We discuss examples of varying τcontent in § 4.4 . | The paper proposed a way to control the content output of a DNN-based language model (GPT-2 in the experiment, but not limited to it). It places an layer (CoCon) that can take an arbitrary phrase as the hint after generating the embedding but before generating the text. Experiments showed that the control is effective at directing the generated text. Examples confirmed that too. | SP:a6afe4079b1d42b36701f6c023b003b7a0e49a55 |
CoCon: A Self-Supervised Approach for Controlled Text Generation | 1 INTRODUCTION . Transformer-based ( Vaswani et al. , 2017 ; Tay et al. , 2020 ) pretrained language models ( LMs ) have led a wave of new advances in natural language processing tasks as a means to extract contextualized word embeddings ( Devlin et al. , 2018 ; Dai et al. , 2019b ; Yang et al. , 2019 ) and as text generators ( Radford et al. , 2019 ; Brown et al. , 2020 ) . These LMs are trained on huge amounts of text corpora to predict next tokens through a log-likelihood objective . Given its remarkably fluent text generation , there is growing interest in controlling output texts of such LMs ( Keskar et al. , 2019 ; Dathathri et al. , 2019 ) . Approaches like training a modified LM from scratch to incorporate target text attributes ( Keskar et al. , 2019 ) can be expensive while finetuning pretrained LMs for specific attributes ( Ziegler et al. , 2019 ) limits the scope of text control . Without changing the architecture or weights of pretrained LMs , one promising approach ( PPLM ) ( Dathathri et al. , 2019 ) controls generated text through attribute models . Though effective in controlling high-level text attributes such as topic and sentiment , the same target attribute may generate text samples with vastly different content at the word- and phrase-levels , leaving a gap for more fine-grained control over the content of LM-generated texts . We conceptualize Content-Conditioner ( CoCon ) as an approach to narrow this gap by guiding pretrained LMs ’ text outputs through the incorporation of content input . This content input can take the form of a text sequence whose content we would like to condition on for text generation . Essentially , CoCon comprises two parts : 1 ) a pretrained LM and 2 ) a interleave CoCon layer . By employing a pretrained LM , CoCon incorporates the representations of a content input into the encoded text representations through the CoCon layer before passing the content-conditioned representations into LMβ for generation . To train the CoCon block , we propose a self-supervised learning approach where training data consist of text samples generated by the pretrained LM itself ( § 3.1 ) . By splitting each text sequence into two segments ( [ xa ; xb ] ) , CoCon learns through a self reconstruction objective to help the LM reconstruct missing latter segments ( xb ) by taking xb itself as the content input . We use content masking for CoCon and also propose other loss functions such as cycle reconstruction to condition content from divergent sources while producing high-quality texts . Since the CoCon block ’ s size is a small fraction of the LM and no finetuning is conducted on the LM ’ s weights , the training cost is significantly lower than training an LM from scratch . We show that CoCon ’ s fine-grained content control can be extended to also influence higher-level text attributes ∗Corresponding author : guoweial001 @ ntu.edu.sg 1Codes and models are available at : https : //github.com/alvinchangw/COCON ICLR2021 such as topic and sentiment in a zero-shot manner , and compare it with strong controlled generation baselines . Furthermore , CoCon is versatile in assimilating multiple content inputs , and its strength of content-conditioning can be flexibly adjusted through a content bias term during inference . In this paper , we demonstrate the CoCon approach with the GPT-2 345M model ( Radford et al. , 2019 ) as the pretrained LM . Given CoCon ’ s modular nature , it can be used with other Transformer-based LMs or even other controlled generation methods . All in all , the core contributions of this paper are : • We propose CoCon for content-conditioned language generation . • We introduce a self-supervised learning approach where CoCon learns to complete text sequences when given information about future tokens . • Through ablation studies and comparisons with strong baselines like PPLM and CTRL ( Keskar et al. , 2019 ) , we investigate how CoCon controls high-level attributes such as topic and sentiment while generating texts that have high content similarity to conditioning text . 2 RELATED WORK . There is a line of work that aims to generate output text of desired attributes with neural networks . Some of the earliest efforts involve conditional generative models ( Kikuchi et al. , 2016 ; Ficler & Goldberg , 2017 ) where the networks are trained on text data labeled with the target attributes . These models can be trained via reinforcement learning ( Ziegler et al. , 2019 ) or the generative adversarial network ( Yu et al. , 2017 ) framework . Unlike CoCon , the requirement of predetermined attributes in those methods limits the possible types of generated texts . CTRL ( Keskar et al. , 2019 ) is a recent approach that generated controlled fluent texts through the use of control codes which are meta-data prepended to the text during generation . Though it produces high-quality text with its GPT-2-like architecture , its control codes are also predetermined during the training . Closest to our work is Plug and Play Language Model ( PPLM ) ( Dathathri et al. , 2019 ) which seeks to control text on already pretrained LM without finetuning through relatively small ‘ pluggable ’ attribute models . While PPLM ’ s flexible design also enables controlled generation without retraining or finetuning the LM like in CoCon , our approach aims to control the generation at a content level , beyond high-level text attributes . Another core difference lies in the training where CoCon ’ s self-supervised learning absolves the need for labeled data , such as the ones employed to train PPLM ’ s attribute discriminator models . Weighted decoding ( Ghazvininejad et al. , 2017 ; Holtzman et al. , 2018 ) seeks to control the output text token by upweighting the probabilities of targeted words during the decoding step but has been shown to produce incoherent text ( See et al. , 2019 ) . Conditioning language generation has been used in question generation to enhance faithfulness by attending to textual context such as predicates , subject types or object types ( Elsahar et al. , 2018 ) rather than the content input used here in CoCon . Small adapter layers ( Bapna et al. , 2019 ) have been previously proposed for multilingual translation to also save on model size and training resources but differ from CoCon ’ s self-supervised training as they rely on annotated sentence pairs of different languages for training . Text style transfer is a related area that controls texts ’ attributes by translating text from one style to another ( Dai et al. , 2019a ) . A few of such studies employ auto-encoders to separate texts ’ style and non-style latent representation ( Shen et al. , 2017 ; Hu et al. , 2017 ; Yang et al. , 2018 ) . This disentanglement enables style changes to the text at the latent space while retaining most of its content . Another work identifies attribute markers ( Li et al. , 2018 ) which are n-grams correlated with a particular style in a text corpus and edit texts ’ style by substituting them . Essentially , style transfer alters existing texts rather than generating texts and requires predefined attributes . 3 CONTENT CONDITIONER ( COCON ) . In the following sections , we discuss the motivation for CoCon , its model architecture and how we train the CoCon block . Motivation In text generation with language models , given the prompt text x : t−1 = { x1 , . . . , xt−1 } , the following text { xt , . . . , xl } is generated in an auto-regressive manner ( Man- ning et al. , 1999 ; Bengio et al. , 2003 ) : p ( xt , . . . , xl|x1 , . . . , xt−1 ) = l∏ i=t p ( xi|x1 , . . . , xi−1 ) . ( 1 ) Previous studies on controlled text generation in LM showed that p ( x ) can be conditioned on target attributes ( Dathathri et al. , 2019 ) or control codes ( Keskar et al. , 2019 ) to control the text ’ s sentiment or topic , i.e. , p ( xt , . . . , xl|x1 , . . . , xt−1 ) = l∏ i=1 p ( xi|a , { x1 , . . . , xi−1 } ) , ( 2 ) where a is the target attribute . While these methods show that the generation is fluent and can be aligned with the target attribute well , the output texts { xt , . . . , xl } are controlled at a global attribute ( e.g. , sentiment/topic ) level rather than at a more local content ( e.g. , words/phrases ) level . Since there is a vast number of possible { xt , . . . , xl } candidates which would align well with both the prompt text and target attribute , this results in generated text samples that contain very different content during the stochastic token sampling process . This motivates an approach to condition on an content input c for more fine-grained control over text generation : p ( xt , . . . , xl|x1 , . . . , xt−1 ) = l∏ i=1 p ( xi|c , { x1 , . . . , xi−1 } ) , ( 3 ) where c can be a text sequence whose content we would like to condition on during text generation . Next , we propose the model architecture of Content-Conditioner ( CoCon ) as an approach for this control . Model Architecture Our proposed Content-Conditioner ( Figure 1 ) controls the content of the generated text while maintaining fluency by incorporating a pretrained Transformer-based language model ( LM ) , GPT-2 ( Radford et al. , 2019 ) in our experiments . Such LMs have shown remarkable natural text generation in the auto-regressive manner ( Eq . 1 ) where the next token xt is sampled based on the logits ot = LM ( x : t−1 ) . These LMs are essentially stacks of Transformer blocks , each consisting of layer normalization ( Ba et al. , 2016 ) , multi-head self-attention ( Vaswani et al. , 2017 ) and position-wise feed forward operations . An LM ’ s generation can be broken down into two separate parts : layers before the CoCon block ( LMα ) and layers after ( LMβ ) . The LMα acts as a feature extractor that takes in the input sequence ’ s embeddings and outputs its intermediate representation at a breakpoint , i.e. , h : t−1 = LMα ( x : t−1 ) . Subsequently , LMβ takes in this representation and outputs the logits for the next token , i.e. , ot = LMβ ( h : t−1 ) , yielding ot = LM ( x : t−1 ) = LMβ ( LMα ( x : t−1 ) ) = LMβ ( h : t−1 ) . ( 4 ) From Eq . 4 , we can see that the representation ( h ) is a medium to control next token logits ( o ) and hence the text generation process . Indeed , we transform h by conditioning it with the content input ( c ) through a CoCon block such that h′ : t−1 = CoCon ( h ( c ) : lc , h : t−1 ) , ( 5 ) where h ( c ) : lc = LMα ( c ) is the content representations and lc is the length of the content text sequence . We parameterize the CoCon block as a single Transformer block with an attention and position-wise feed-forward operation . Similar to a typical LM attention layer , the query ( Q ) , key ( K ) , value ( V ) matrices are computed through linear transformations on the representations h : t−1 , where Q , K , V ∈ R ( t−1 ) ×d and d is the representations ’ dimension . To attend to the content representations ( h ( c ) : lc ) , the content keys and values ( K ( c ) , V ( c ) ∈ Rlc×d ) are also computed , and concatenated to the original attention matrices before computing the CoCon attention output : K′ = [ K ( c ) ; K ] , V′ = [ V ( c ) ; V ] , A = Softmax ( QK′ > ) V′ = Softmax ( W ) V′ , ( 6 ) where A = { a1 , . . . , at−1 } and W ∈ R ( t−1 ) × ( lc+t−1 ) represents the attention weights . The final CoCon outputs are computed with a position-wise feed-forward layer . By concatenating to the representations prior to t − 1 and passing them to LMβ , the next logits , and consequently word token x̃t , is now conditioned on c : h′i = FF ( ai ) , õt = LMβ ( [ h : t−2 ; h ′ t−1 ] ) , pθ , ψ ( x̃t|c , x : t−1 ) = Softmax ( õt ) , ( 7 ) where θ and ψ are the paramterization of the CoCon block and LM respectively . Similar to a GPT-2 Transformer block , our CoCon block includes layer normalization before its multi-headed attention and feed-forward layers . Figure 1 summarizes the CoCon architecture which enables auto-regressive text generation by using x̃i as the token input ( xi ) to generate x̃i+1 where i ≥ t. Multiple Content Inputs CoCon ’ s flexible design enables multiple content inputs for a single generation . In the case where we have N content inputs ( c1 , . . . , cN ) , the output text can be conditioned by these contents through their attention keys and values , similar to Eq . 6 : K′ = [ K ( c 1 ) . . .K ( c N ) ; K ] , V′ = [ V ( c 1 ) . . .V ( c N ) ; V ] , A = Softmax ( QK′ > ) V′ . ( 8 ) Strength of Content Conditioning Within CoCon ’ s attention mechanism , we can vary the extent of content conditioning on the output text by biasing the attention weights in W ( Eq . 6 ) that correspond to the content input ( c ) . More specifically , the influence of c on the output text can be altered through the attention ’ s softmax weighting on the content values ( V ( c ) ) . During generation , a positive bias term ( τcontent ) can optionally be added to the content attention weights W : , : lc ∈ R ( t−1 ) ×lc to increase influence of V ( c ) , boosting content conditioning , while a negative term can conversely reduce the content-conditioning effect . We discuss examples of varying τcontent in § 4.4 . | This paper tackles the problem of controlled text generation by converting it into a conditional text generation similar to (Keskar et al.19). It proposes an architectural modification to the transformer LM used in GPT2, Specifically, a CoCon layer is added as a separate transformer block in the middle allowing self-attention to be performed between the textual context representations LM_α(c) and the generations LM_α(x_{:t-1}) this is performed through concatenating the key and value matrices with the keys and values of the encoded textual context. Authors provide 4 different losses to train this additional layer. | SP:a6afe4079b1d42b36701f6c023b003b7a0e49a55 |
ChipNet: Budget-Aware Pruning with Heaviside Continuous Approximations | 1 INTRODUCTION . Convolution Neural Networks ( CNNs ) have resulted in several breakthroughs across various disciplines of deep learning , especially for their effectiveness in extracting complex features . However , these models demand significantly high computational power , making it hard to use them on lowmemory hardware platforms that require high-inference speed . Moreover , most of the existing deep networks are heavily over-parameterized resulting in high memory footprint ( Denil et al. , 2013 ; Frankle & Carbin , 2018 ) . Several strategies have been proposed to tackle this issue , that include network pruning ( Liu et al. , 2018 ) , neural architecture search using methods such as reinforcement learning ( Jaafra et al. , 2019 ) and vector quantization ( Gong et al. , 2014 ) , among others . Among the methods outlined above , network pruning has proved to be very effective in designing small resource-efficient architectures that perform at par with their dense counterparts . Network pruning refers to removal of unnecessary weights or filters from a given architecture without compromising its accuracy . It can broadly be classified into two categories : unstructured pruning and structured pruning . Unstructured pruning involves removal of neurons or the corresponding connection weights from the network to make it sparse . While this strategy reduces the number of parameters in the model , computational requirements are still the same ( Li et al. , 2017 ) . Structured pruning methods on the other hand remove the entire channels from the network . This strategy pre- ∗All authors contributed equally . 1Code is publicly available at https : //github.com/transmuteAI/ChipNet serves the regular structure , thereby taking advantage of the high degree of parallelism provided by modern hardware ( Liu et al. , 2017 ; Gordon et al. , 2018 ) . Several structured pruning approaches have been proposed in the recent literature . A general consensus is that variational approaches using sparsity prior loss and learnable dropout parameters outperform the deterministic methods ( Lemaire et al. , 2019 ) . Some of these methods learn sparsity as a part of pretraining , and have proved to perform better than the three stage pretrain-prune-finetune methods . However , since such approaches need to train the model from scratch with pruning-related variables embedded into the network , they can not benefit from off-the-shelf pretrained weights ( Liu et al. , 2017 ; Alvarez & Salzmann , 2017 ) . Others require choosing hyperparameters based on the choice of the network , and can not be easily adapted for new models ( Gordon et al. , 2018 ) . Further , with most of these methods , controlled pruning can not be performed , and a resource-usage constraint can only be satisfied through trial-and-error approach . Recently , Lemaire et al . ( 2019 ) presented a budget-aware pruning method that includes the budget constraint as a part of the training process . A major drawback of this approach and other recent methods is that they are unstable for very low resource budgets , and require additional tricks to work . Overall , a robust budget-aware pruning approach that can be coupled with different budget constraints as well as maintains stability for very low target budgets , is still missing in the existing literature . In this paper , we present ChipNet , a deterministic strategy for structured pruning that employs continuous Heaviside function and crispness loss to identify a highly sparse network out of an existing pretrained dense network . The abbreviation ‘ ChipNet ’ stands for Continuous Heaviside Pruning of Networks . Our pruning strategy draws inspiration from the field of design optimization , where the material distribution task is posed as a continuous optimization problem , but only discrete values ( 0 or 1 ) are practically feasible . Thus , only such values are produced as final outcomes through continuous Heaviside projections . We use a similar strategy to obtain the masks in our sparsity learning approach . The flexible design of ChipNet facilitates its use with different choices of budget constraints , such as restriction on the maximum number of parameters , FLOPs , channels or the volume of activations in the network . Through experiments , we show that ChipNet consistently outperforms state-of-the-art pruning methods for different choices of budget constraints . ChipNet is stable for even very low resource budgets , and we demonstrate this through experiments where network is pruned to as low as 1 % of its parameters . We show that for such extreme cases , ChipNet outperforms the respective baselines by remarkable margins , with a difference in accuracy of slightly beyond 16 % observed for one of the experiments . The masks learnt by ChipNet are transferable across datasets . We show that for certain cases , masks transferred from a model trained on feature-rich teacher dataset provide better performance on the student dataset than those obtained by directly pruning on the student data itself . 2 RELATED WORK . As has been stated in the hypothesis by Frankle & Carbin ( 2018 ) , most neural networks are overparameterized with a large portion ( as much as 90 % ) of the weights being of little significance to the output of the model . Clearly , there exists enormous scope to reduce the size of these networks . Several works have explored the efficiency of network pruning strategies for reducing storage requirements of these networks and accelerating inference speed ( LeCun et al. , 1990 ; Dong et al. , 2017 ) . Some early works by Han et al . ( 2015a ; c ) ; Zhu & Gupta ( 2017 ) involve removal of individual neurons from a network to make it sparse . This reduces the storage requirements of these networks , however , no improvement in inference speed is observed . Recently , several works have focused on structured network pruning , as it involves pruning the entire channel/filters or even layers to maintain the regular structure ( Luo et al. , 2017 ; Li et al. , 2017 ; Alvarez & Salzmann , 2016 ) . The focus of this paper is on structured network pruning , thus , we briefly discuss here the recent works related to this approach . The recent work by Li et al . ( 2017 ) identifies less important channels based on L1-norm . Luo et al . ( 2017 ) ; He et al . ( 2017 ) perform channel selection based on their influence on the activation values of the next layer . Liu et al . ( 2017 ) perform channel-level pruning by imposing LASSO regularization on the scaling terms in the batchnorm layers , and prune the model based on a global threshold . He et al . ( 2018b ) automatically learn the compression ratio of each layer with reinforcement learning . Louizos et al . ( 2017 ) ; Alvarez & Salzmann ( 2017 ; 2016 ) train and prune the network in a single stage strategy . The above mentioned approaches can not optimize networks for a pre-defined budget constraint . Adding budget constraint to the pruning process can provide a direct control on the size of the pruned network . For example , Morphnet imposes this budget by iteratively shrinking and expanding a network through a sparsifying regularizer and uniform layer wise width multiplier , respectively , and is adaptable to specific resource constraints ( Gordon et al. , 2018 ) . However , it requires a modelspecific hyperparameter grid search for choosing the regularization factor . Another approach is BAR ( Lemaire et al. , 2019 ) that uses a budget-constrained pruning approach based on variational method . A limitation of this approach is that for low resource budgets , it needs to explicitly ensure that at least one channel is active in the downsample layer to avoid fatal pruning . The approach proposed in this paper does not require any such tweaking , and is stable for even very low resource budgets . 3 PROPOSED APPROACH . 3.1 LEARNING SPARSITY MASKS . Sparsity learning forms the core of our approach . It refers to learning a set of sparsity masks for a dense convolutional neural network ( parent ) . When designing the smaller pruned network ( child ) , these masks identify the parts of the parent that are to be included in the child network . We first describe here the general idea of learning these masks in the context of our method . The proposed approach falls in the category of structured pruning where masks are designed for channels and not individual neurons . Let f : Rd → Rk denote a convolutional neural network with weights W ∈ Rm and a set of hidden channels H ∈ Rp . We define z ∈ Rp as a set of sparsity masks , where zi ∈ z refers to the mask associated with the feature map hi ∈ H. To apply the mask , zi is multiplied with all the entries of hi . The optimization problem can further be stated as min W , z L ( f ( z H ( W ) ; x ) , y ) s.t . V ( z ) = V0 , ( 1 ) where denotes elementwise multiplication and { x , y } ∈ D are data samples used to train the network f . The desired sparsity of the network is defined in terms of the equality constraint , where V ( · ) denotes the budget function and V0 is the maximum permissible budget . Our proposed formulation of pruning is independent from the choice of the budget function . We later show this through experiments with volume budget as in Lemaire et al . ( 2019 ) , channel budget similar to Liu et al . ( 2017 ) , and budget defined in terms of parameters and FLOPs as well . Originally , zi ∈ z would be defined such that zi ∈ { 0 , 1 } , and a discrete optimization problem is to be solved . For the sake of using gradient-based methods , we convert it to a continuous optimization problem , such that zi ∈ [ 0 , 1 ] . Such reformulation would lead to intermediate values of z occurring in the final optimized solution . Any intermediate value of z , for example z = 0.4 , would imply that a fraction of the respective channel is to be used , and clearly such a solution is practically infeasible . We propose to overcome this challenge through the use of simple nonlinear projections and a novel loss term , and these are discussed in detail in the next section . 3.2 CONTINUOUS HEAVISIDE APPROXIMATION AND LOGISTIC CURVES . At the backbone of our pruning strategy lies three important functions : the commonly used logistic curves , continuous Heaviside function and crispness loss term . Figure 1 presents a graphical representation of these functions . We further provide below a brief motivation for the choice of these functions as well as their significance in our pruning approach . Logistic curves . A commonly used function for adding nonlinearity to a neural network ( LeCun et al. , 1998 ) , logistic curve projects an input from the real space to a range of 0-1 ( Figure 1a ) , and can be mathematically stated as z̃ = 1 1 + e−β ( ψ−ψ0 ) , ( 2 ) where ψ denotes the optimization parameter corresponding to the mask z , ψ0 is the midpoint of the curve , and z̃ denotes the resultant intermediate projection . The additional parameter β is used to control the growth rate of the curve , and forms an important ingredient of our approach . While low values of β can produce an approximately linear curve between -1 and 1 , higher values turn it into a step function . During the initial stages of training , we propose to keep β very low , and increase it to higher values at later stages of the optimization process . With increased values of β , the values further from 0.5 are made more favorable for z̃ . In our experience , the logistic curve alone can not be used to obtain approximately discrete ( 0-1 ) solutions for z in a continuous optimization scheme . The nonlinearity introduced by this function can not sufficiently penalize the intermediate values between 0 and 1 , and optimization algorithm can easily identify values of ψ for which the projected values are far from both . An example experiment demonstrating this issue is presented in Appendix C.2 . To circumvent this issue , we add another nonlinear projection using a continuous approximation of the Heaviside function . Continuous Heaviside function . A continuous approximation to the Heaviside step function , referred as continuous Heaviside function in this paper , is a commonly used projection strategy to solve continuous versions of binary optimization ( 0-1 ) problems in the domain of design optimization ( Guest et al. , 2004 ; 2011 ) . The generalized form of this function can be stated as : z = 1− e−γz̃ + z̃e−γ , ( 3 ) where , the parameter γ dictates the curvature of the regularization . Figure 1b shows the continuous Heaviside function for several values of γ . We see that z is linear for γ = 0 and approaches the Heaviside step function for very large values of γ . The advantages of our projection function are twofold . First , during projection , the values close to 0 and 1 are not affected irrespective of the choice of γ . This implies that the masks identified with most confidence in the early stage of training are not directly impacted by the continuation applied on the value of γ , thus helping in the convergence of the training process . Here , ‘ continuation ’ refers to slowly adapting the value of γ during the course of training . Second , even the values of z̃ which are slightly greater than 0 are also nonlinearly projected to close to 1 , and this effect is more prominent for larger values of γ . The projection adds higher penalty on values between 0 and 1 , and makes them extremely unfavorable when higher values of γ are chosen . While the continuous Heaviside function helps to obtain approximately discrete masks , there is still no explicit constraint or penalty function that can regulate this . To overcome this problem , we tie the outputs of logistic and continuous Heaviside functions to define a novel loss term , referred as crispness loss . Crispness Loss . This novel loss term explicitly penalizes the model performance for intermediate values of z , and drives the convergence towards crisp ( 0-1 ) masks . It is defined as the squared L2 norm of the difference between z̃ and z , stated as Lc = ‖z̃ − z‖22 , and from Figure 1c , we see that Lc achieves its minima when either z̃ = z = 0 or z̃ = z = 1 . Further , the trend of this loss function with respect to ψ for different values of β and γ is shown in Figure 1d . It can be seen that for lower values of β and γ , the loss value is low , and the crispness function plays little to no role in driving the pruning process . When the value of γ slowly increases , the peak of the graph shifts upwards as well as towards the left , thereby increasing the penalty associated with values of ψ . This drives the values of ψ to move farther from the origin . The left shift in the graph adds higher penalty on the negative values , forcing them to become even more negative , thus forcing the respective z to move closer to 0 . The additional loss function associated with the model generally favors values towards 1 . For example , cross-entropy loss used for classification would prefer to set all values in z to 1 to be able to maximize the classification accuracy . With increasing values of γ forcing the masks towards 0 , a balance between the two is identified during the training process . The term β acts as a regularizer that to some extent counteracts the too abrupt impact of γ and regulates the convergence of the training process . | The paper provides a budget-aware regularizer method to train the network to be pruned. Existing methods based-on the regularizer method suffer from satisfying the user-specified constraints and resort to trial-and-error approach. The authors leverage logistic function and continuous heaviside function for continuous relaxation of the discrete variable to select the channels to be pruned. There are four types of budget constraints (channel, volume, parameter, FLOPs). | SP:22ec87bbcb57e40a3485af92cb5aa5f6ab8968f6 |
ChipNet: Budget-Aware Pruning with Heaviside Continuous Approximations | 1 INTRODUCTION . Convolution Neural Networks ( CNNs ) have resulted in several breakthroughs across various disciplines of deep learning , especially for their effectiveness in extracting complex features . However , these models demand significantly high computational power , making it hard to use them on lowmemory hardware platforms that require high-inference speed . Moreover , most of the existing deep networks are heavily over-parameterized resulting in high memory footprint ( Denil et al. , 2013 ; Frankle & Carbin , 2018 ) . Several strategies have been proposed to tackle this issue , that include network pruning ( Liu et al. , 2018 ) , neural architecture search using methods such as reinforcement learning ( Jaafra et al. , 2019 ) and vector quantization ( Gong et al. , 2014 ) , among others . Among the methods outlined above , network pruning has proved to be very effective in designing small resource-efficient architectures that perform at par with their dense counterparts . Network pruning refers to removal of unnecessary weights or filters from a given architecture without compromising its accuracy . It can broadly be classified into two categories : unstructured pruning and structured pruning . Unstructured pruning involves removal of neurons or the corresponding connection weights from the network to make it sparse . While this strategy reduces the number of parameters in the model , computational requirements are still the same ( Li et al. , 2017 ) . Structured pruning methods on the other hand remove the entire channels from the network . This strategy pre- ∗All authors contributed equally . 1Code is publicly available at https : //github.com/transmuteAI/ChipNet serves the regular structure , thereby taking advantage of the high degree of parallelism provided by modern hardware ( Liu et al. , 2017 ; Gordon et al. , 2018 ) . Several structured pruning approaches have been proposed in the recent literature . A general consensus is that variational approaches using sparsity prior loss and learnable dropout parameters outperform the deterministic methods ( Lemaire et al. , 2019 ) . Some of these methods learn sparsity as a part of pretraining , and have proved to perform better than the three stage pretrain-prune-finetune methods . However , since such approaches need to train the model from scratch with pruning-related variables embedded into the network , they can not benefit from off-the-shelf pretrained weights ( Liu et al. , 2017 ; Alvarez & Salzmann , 2017 ) . Others require choosing hyperparameters based on the choice of the network , and can not be easily adapted for new models ( Gordon et al. , 2018 ) . Further , with most of these methods , controlled pruning can not be performed , and a resource-usage constraint can only be satisfied through trial-and-error approach . Recently , Lemaire et al . ( 2019 ) presented a budget-aware pruning method that includes the budget constraint as a part of the training process . A major drawback of this approach and other recent methods is that they are unstable for very low resource budgets , and require additional tricks to work . Overall , a robust budget-aware pruning approach that can be coupled with different budget constraints as well as maintains stability for very low target budgets , is still missing in the existing literature . In this paper , we present ChipNet , a deterministic strategy for structured pruning that employs continuous Heaviside function and crispness loss to identify a highly sparse network out of an existing pretrained dense network . The abbreviation ‘ ChipNet ’ stands for Continuous Heaviside Pruning of Networks . Our pruning strategy draws inspiration from the field of design optimization , where the material distribution task is posed as a continuous optimization problem , but only discrete values ( 0 or 1 ) are practically feasible . Thus , only such values are produced as final outcomes through continuous Heaviside projections . We use a similar strategy to obtain the masks in our sparsity learning approach . The flexible design of ChipNet facilitates its use with different choices of budget constraints , such as restriction on the maximum number of parameters , FLOPs , channels or the volume of activations in the network . Through experiments , we show that ChipNet consistently outperforms state-of-the-art pruning methods for different choices of budget constraints . ChipNet is stable for even very low resource budgets , and we demonstrate this through experiments where network is pruned to as low as 1 % of its parameters . We show that for such extreme cases , ChipNet outperforms the respective baselines by remarkable margins , with a difference in accuracy of slightly beyond 16 % observed for one of the experiments . The masks learnt by ChipNet are transferable across datasets . We show that for certain cases , masks transferred from a model trained on feature-rich teacher dataset provide better performance on the student dataset than those obtained by directly pruning on the student data itself . 2 RELATED WORK . As has been stated in the hypothesis by Frankle & Carbin ( 2018 ) , most neural networks are overparameterized with a large portion ( as much as 90 % ) of the weights being of little significance to the output of the model . Clearly , there exists enormous scope to reduce the size of these networks . Several works have explored the efficiency of network pruning strategies for reducing storage requirements of these networks and accelerating inference speed ( LeCun et al. , 1990 ; Dong et al. , 2017 ) . Some early works by Han et al . ( 2015a ; c ) ; Zhu & Gupta ( 2017 ) involve removal of individual neurons from a network to make it sparse . This reduces the storage requirements of these networks , however , no improvement in inference speed is observed . Recently , several works have focused on structured network pruning , as it involves pruning the entire channel/filters or even layers to maintain the regular structure ( Luo et al. , 2017 ; Li et al. , 2017 ; Alvarez & Salzmann , 2016 ) . The focus of this paper is on structured network pruning , thus , we briefly discuss here the recent works related to this approach . The recent work by Li et al . ( 2017 ) identifies less important channels based on L1-norm . Luo et al . ( 2017 ) ; He et al . ( 2017 ) perform channel selection based on their influence on the activation values of the next layer . Liu et al . ( 2017 ) perform channel-level pruning by imposing LASSO regularization on the scaling terms in the batchnorm layers , and prune the model based on a global threshold . He et al . ( 2018b ) automatically learn the compression ratio of each layer with reinforcement learning . Louizos et al . ( 2017 ) ; Alvarez & Salzmann ( 2017 ; 2016 ) train and prune the network in a single stage strategy . The above mentioned approaches can not optimize networks for a pre-defined budget constraint . Adding budget constraint to the pruning process can provide a direct control on the size of the pruned network . For example , Morphnet imposes this budget by iteratively shrinking and expanding a network through a sparsifying regularizer and uniform layer wise width multiplier , respectively , and is adaptable to specific resource constraints ( Gordon et al. , 2018 ) . However , it requires a modelspecific hyperparameter grid search for choosing the regularization factor . Another approach is BAR ( Lemaire et al. , 2019 ) that uses a budget-constrained pruning approach based on variational method . A limitation of this approach is that for low resource budgets , it needs to explicitly ensure that at least one channel is active in the downsample layer to avoid fatal pruning . The approach proposed in this paper does not require any such tweaking , and is stable for even very low resource budgets . 3 PROPOSED APPROACH . 3.1 LEARNING SPARSITY MASKS . Sparsity learning forms the core of our approach . It refers to learning a set of sparsity masks for a dense convolutional neural network ( parent ) . When designing the smaller pruned network ( child ) , these masks identify the parts of the parent that are to be included in the child network . We first describe here the general idea of learning these masks in the context of our method . The proposed approach falls in the category of structured pruning where masks are designed for channels and not individual neurons . Let f : Rd → Rk denote a convolutional neural network with weights W ∈ Rm and a set of hidden channels H ∈ Rp . We define z ∈ Rp as a set of sparsity masks , where zi ∈ z refers to the mask associated with the feature map hi ∈ H. To apply the mask , zi is multiplied with all the entries of hi . The optimization problem can further be stated as min W , z L ( f ( z H ( W ) ; x ) , y ) s.t . V ( z ) = V0 , ( 1 ) where denotes elementwise multiplication and { x , y } ∈ D are data samples used to train the network f . The desired sparsity of the network is defined in terms of the equality constraint , where V ( · ) denotes the budget function and V0 is the maximum permissible budget . Our proposed formulation of pruning is independent from the choice of the budget function . We later show this through experiments with volume budget as in Lemaire et al . ( 2019 ) , channel budget similar to Liu et al . ( 2017 ) , and budget defined in terms of parameters and FLOPs as well . Originally , zi ∈ z would be defined such that zi ∈ { 0 , 1 } , and a discrete optimization problem is to be solved . For the sake of using gradient-based methods , we convert it to a continuous optimization problem , such that zi ∈ [ 0 , 1 ] . Such reformulation would lead to intermediate values of z occurring in the final optimized solution . Any intermediate value of z , for example z = 0.4 , would imply that a fraction of the respective channel is to be used , and clearly such a solution is practically infeasible . We propose to overcome this challenge through the use of simple nonlinear projections and a novel loss term , and these are discussed in detail in the next section . 3.2 CONTINUOUS HEAVISIDE APPROXIMATION AND LOGISTIC CURVES . At the backbone of our pruning strategy lies three important functions : the commonly used logistic curves , continuous Heaviside function and crispness loss term . Figure 1 presents a graphical representation of these functions . We further provide below a brief motivation for the choice of these functions as well as their significance in our pruning approach . Logistic curves . A commonly used function for adding nonlinearity to a neural network ( LeCun et al. , 1998 ) , logistic curve projects an input from the real space to a range of 0-1 ( Figure 1a ) , and can be mathematically stated as z̃ = 1 1 + e−β ( ψ−ψ0 ) , ( 2 ) where ψ denotes the optimization parameter corresponding to the mask z , ψ0 is the midpoint of the curve , and z̃ denotes the resultant intermediate projection . The additional parameter β is used to control the growth rate of the curve , and forms an important ingredient of our approach . While low values of β can produce an approximately linear curve between -1 and 1 , higher values turn it into a step function . During the initial stages of training , we propose to keep β very low , and increase it to higher values at later stages of the optimization process . With increased values of β , the values further from 0.5 are made more favorable for z̃ . In our experience , the logistic curve alone can not be used to obtain approximately discrete ( 0-1 ) solutions for z in a continuous optimization scheme . The nonlinearity introduced by this function can not sufficiently penalize the intermediate values between 0 and 1 , and optimization algorithm can easily identify values of ψ for which the projected values are far from both . An example experiment demonstrating this issue is presented in Appendix C.2 . To circumvent this issue , we add another nonlinear projection using a continuous approximation of the Heaviside function . Continuous Heaviside function . A continuous approximation to the Heaviside step function , referred as continuous Heaviside function in this paper , is a commonly used projection strategy to solve continuous versions of binary optimization ( 0-1 ) problems in the domain of design optimization ( Guest et al. , 2004 ; 2011 ) . The generalized form of this function can be stated as : z = 1− e−γz̃ + z̃e−γ , ( 3 ) where , the parameter γ dictates the curvature of the regularization . Figure 1b shows the continuous Heaviside function for several values of γ . We see that z is linear for γ = 0 and approaches the Heaviside step function for very large values of γ . The advantages of our projection function are twofold . First , during projection , the values close to 0 and 1 are not affected irrespective of the choice of γ . This implies that the masks identified with most confidence in the early stage of training are not directly impacted by the continuation applied on the value of γ , thus helping in the convergence of the training process . Here , ‘ continuation ’ refers to slowly adapting the value of γ during the course of training . Second , even the values of z̃ which are slightly greater than 0 are also nonlinearly projected to close to 1 , and this effect is more prominent for larger values of γ . The projection adds higher penalty on values between 0 and 1 , and makes them extremely unfavorable when higher values of γ are chosen . While the continuous Heaviside function helps to obtain approximately discrete masks , there is still no explicit constraint or penalty function that can regulate this . To overcome this problem , we tie the outputs of logistic and continuous Heaviside functions to define a novel loss term , referred as crispness loss . Crispness Loss . This novel loss term explicitly penalizes the model performance for intermediate values of z , and drives the convergence towards crisp ( 0-1 ) masks . It is defined as the squared L2 norm of the difference between z̃ and z , stated as Lc = ‖z̃ − z‖22 , and from Figure 1c , we see that Lc achieves its minima when either z̃ = z = 0 or z̃ = z = 1 . Further , the trend of this loss function with respect to ψ for different values of β and γ is shown in Figure 1d . It can be seen that for lower values of β and γ , the loss value is low , and the crispness function plays little to no role in driving the pruning process . When the value of γ slowly increases , the peak of the graph shifts upwards as well as towards the left , thereby increasing the penalty associated with values of ψ . This drives the values of ψ to move farther from the origin . The left shift in the graph adds higher penalty on the negative values , forcing them to become even more negative , thus forcing the respective z to move closer to 0 . The additional loss function associated with the model generally favors values towards 1 . For example , cross-entropy loss used for classification would prefer to set all values in z to 1 to be able to maximize the classification accuracy . With increasing values of γ forcing the masks towards 0 , a balance between the two is identified during the training process . The term β acts as a regularizer that to some extent counteracts the too abrupt impact of γ and regulates the convergence of the training process . | This paper presents a new method for structure pruning called ChipNet. The ChipNet employs continuous Heaviside function with commonly used logistic curve and crispness loss to estimate sparsity masks. A combination of above three components is helpful to obtain approximately discrete solutions for a continuous optimization scheme. As a result, it is possible to get a highly sparse network out of an existing pre-trained dense network. Experimentally, ChipNet outperforms other previous structured pruning methods by a large margin. | SP:22ec87bbcb57e40a3485af92cb5aa5f6ab8968f6 |
Consistent Instance Classification for Unsupervised Representation Learning | 1 INTRODUCTION . Learning good representations from unlabeled images is a land-standing and challenging problem . The mainstream methods include : generative modeling ( Hinton et al. , 2006 ; Kingma & Welling , 2014 ) , colorization ( Zhang et al. , 2016 ) , transformation or spatial relation prediction ( Doersch et al. , 2015 ; Noroozi & Favaro , 2016 ; Gidaris et al. , 2018 ) , and discriminative methods , such as instance classification ( Dosovitskiy et al. , 2016 ; He et al. , 2019 ) , and contrastive learning ( Chen et al. , 2020b ) . The instance discrimination methods show promising performance for downstream tasks . There are two basic objectives that are optimized ( He et al. , 2019 ; Chen et al. , 2020b ; Yu et al. , 2020 ; Wang & Isola , 2020 ) : contraction and separation . Contraction means that the features of the augmented views from the same instance should be as close as possible . Separation means that the features of the augmented views from one instance should lie in a region different from other instances . The instance classification framework , such as InstDisc ( Wu et al. , 2018 ) , and MoCo ( He et al. , 2019 ; Chen et al. , 2020c ) , adopts a prototype-based classifier , where the prototype is estimated as the moving average of the corresponding features of previous epoches Wu et al . ( 2018 ) or as the output of an moving-average network He et al . ( 2019 ) ; Chen et al . ( 2020c ) . The prototype-based schemes ease the optimization of the classification loss in the challenging case that there is over one million categories . BYOL ( Grill et al. , 2020 ) computes the prototype in a way similar to MoCo , and only aligns the feature of augmented views with its prototype leaving the separation objective implicitly optimized . The prototype , computed from a single view rather than many views and from networks with different parameters , might not be reliable enough , making the contraction and separation optimization quality not guaranteed . The contrastive learning framework1 , such as SimCLR ( Chen et al. , 2020b ) and Ye et al . ( 2019 ) , simultaneously maximizes the similarities between each view pair from the same instance and min- 1InstDisc ( Wu et al. , 2018 ) and MoCo ( He et al. , 2019 ; Chen et al. , 2020c ) are also closely related to contrastive learning and are regarded as contrastive learning methods by some researchers . imizes the similarities between the view pair from different instances . This framework directly compares the feature of one view to a different view other than to a prototype , avoiding the unreliability of the prototype estimation . It , however , requires large batch size for each SGD iteration to compare enough number of negative instances for imposing the separation constraint2 , increasing the difficulty in large batch training . We propose a simple unsupervised representation learning approach , consistent instance classification ( ConIC ) , to improve the optimization and feature quality . Our approach jointly minimizes two losses : instance classification loss and consistency loss . The instance classification loss is formulated by regarding each instance as a category . Its optimization encourages that different instances lie in different regions . The consistency loss is formulated to directly compares the features of the augmented views from the same instance and encourages high similarity between them . One benefit from the consistency optimization is to directly and explicitly make the features of the same instances compact and thus to accelerate the optimization of the classification loss . This is different from Wu et al . ( 2018 ) , He et al . ( 2019 ) , heuristically estimating the classifier weights using the prototypes and does not suffer from the prototype estimation reliability issue . On the other hand , our approach does not rely on large batch training , that is essential for SimCLR ( Chen et al. , 2020b ) , because the whole loss in our formulation can be decomposed as a sum of components each of which only depends on one instance . Furthermore , we observed that jointly optimizing the consistency and classification losses leads to that the representation is more focused on the textured region , as shown in Figure 1 . This implies that the learned representation is more capable of characterizing the objects , and thus potentially more helpful for downstream tasks like object detection and segmentation . We demonstrate the effectiveness of our approach in unsupervised representation learning on ImageNet . Our approach achieves competitive performance under the linear evaluation protocol . When finetuned on downstream tasks , such as object detection on VOC , object detection and instance segmentation on COCO , instance segmentation on Cityscapes and LVIS , as well as semantic segmentation on Citeyscapes , COCO Stuff , ADE and VOC , our approach performs better than InstDisc , MoCo and SimCLR , and competitively or superior compared to other methods with stronger training setting ( e.g. , InfoMin and SwAV ) . 2 RELATED WORK . Generative approaches . Generative models , such as auto-encoders ( Hinton et al. , 2006 ; Kingma & Welling , 2014 ; Vincent et al. , 2008 ) , context encoders ( Pathak et al. , 2016 ) , GANs ( Donahue & Simonyan , 2019 ) , and GPTs ( Chen et al. , 2020a ) , learn an unsupervised representation by faithfully reconstructing the pixels . Later self-supervised models , such as colorization ( Zhang et al. , 2016 ) and split-brain encoders ( Zhang et al. , 2017 ) , improve generative models by withholding some part of the data and predicting it . 2We will show one possible reason that it requires large batch . Spatial relation prediction . The representation is learned by solving pretext tasks related to image patch spatial relation prediction , such as predicting the spatial relation between two patches sampled from an image , e.g. , a patch is on the left of another patch , ( Doersch et al. , 2015 ) ; solving Jigsaw Puzzles and determining the spatial configuration for the shuffled ( typically 9 ) patches ( Noroozi & Favaro , 2016 ) ; and predicting the rotation ( Gidaris et al. , 2018 ) . Instance classification . Exemplar-CNN ( Dosovitskiy et al. , 2016 ) regards the views formed by augmenting each instance as a class , and formulates an instance classification problem . InstDisc ( Wu et al. , 2018 ) , MoCo ( He et al. , 2019 ) , CMC ( Tian et al. , 2019 ) and PIRL ( Misra & van der Maaten , 2019 ) generalize exemplar-CNN by heuristically estimating the classifier weights using prototypes for easing the optimization . Our proposed approach follows the instance classification approach , and exploit an additional consistency loss to help optimization . Instance clustering . Rather than regarding each instance as a category , the instance clustering frameworks ( Caron et al. , 2018 ; 2019 ; 2020 ; Asano et al. , 2020 ; Huang et al. , 2019 ; Xie et al. , 2016 ; Yan et al. , 2020 ; Yang et al. , 2016 ) learn representations in which the instances are well optimized . DeepCluster ( Caron et al. , 2018 ) simply adopt the k-means clustering method by simultaneously optimizing the network parameters , and uses k-means assignments as pseudo-labels to learn representations . SwAV ( Caron et al. , 2020 ) simultaneously clusters the data while enforcing consistency between cluster assignments for different views of the same instance . Contrastive learning . Contrastive predictive coding ( van den Oord et al. , 2018 ; Hénaff et al. , 2019 ) predicts the representations of patches below a certain position from those above it by optimizing contrastive loss . DIM ( Hjelm et al. , 2019 ) and ANDIM ( Bachman et al. , 2019 ) achieves global-tolocal/local-to-neighbor patch representation prediction ( overlapping ) across augmented views using the contrastive loss . The contrastive learning framework ( Ye et al. , 2019 ; Chen et al. , 2020b ) formulates a contrastive loss encouraging the high similarity between the augmented views from the same instance , and low similarity between the instance and other instances . Wang & Isola ( 2020 ) presents a novel formulation based on two measures : alignment and uniformity , and shows that it is an alternative of contrastive loss . Yu et al . ( 2020 ) connects contractive and contrastive learning , cross-entropy , and so on , and provides theoretical guarantees for learning diverse and discriminative features . Consistency in semi-supervised learning . Consistency regularization , enforcing the similarity between the predictions or features of different views for the same unlabeled instance , has been widely applied in semi-supervised learning , such as Π Model ( Laine & Aila , 2017 ) , Temporal Ensemble ( Laine & Aila , 2017 ) , and Mean Teacher ( Tarvainen & Valpola , 2017 ) . We exploit the consistency loss to help optimize the classification loss for unsupervised representation learning . 3 APPROACH . Given a set of image instances without any labels , I = { I1 , I2 , . . . , IN } , the goal is to learn a feature extractor ( a neural network ) x = f ( I ) . The discrimination approach expands each image In to a set of augmented views { I1n , I2n , . . . , IKn } , and formulates the problem in a way that the features of the augmented views of each instance are similar ( contraction ) and the features of different instances are distributed separately ( separation ) . In the following , we first review three related instance classification methods , then we introduce our approach and present the analysis . 3.1 INSTANCE CLASSIFICATION . Exemplar CNN . Exemplar-CNN ( Dosovitskiy et al. , 2016 ) formulates unsupervised representation learning as an instance classification problem . The augmented views from one instance are regarded as one category , and the augmented views from different instances are regarded as different categories . The softmax loss is used and written for the kth view of the nth instance : ` s ( x k n ) = − log ew > n x̃ k n/τ∑N j=1 e w > j x̃ k n/τ , ( 1 ) where τ is the temperature . Exemplar-CNN uses the standard backpropagation algorithm to learn the network f ( · ) and the classification weights { w1 , w2 , . . . , wN } . InstDisc . The InstDisc approach ( Wu et al. , 2018 ) optimizes the network parameters , and heuristically estimates the classifier weights { w1 , w2 , . . . , wN } in each epoch using a feature moving average scheme , i.e. , compute the exponential averages of the features of the corresponding instances ( stored in a memory bank ) in the previous epochs . The heuristic weight estimation scheme eases the network optimization . MoCo . MoCo ( He et al. , 2019 ) instead adopts a network moving average scheme . In each SGD iteration , MoCo updates a momentum network whose parameters are moving average of the previous network parameters . It computes the features from the momentum network as the classifier weights , which are further maintained by a queue . This leads to better classifier weight estimates . 3.2 CONSISTENT INSTANCE CLASSIFICATION . We introduce a consistency loss to explicitly penalize the dissimilarity between augmented views from the same instance . Let sim ( u , v ) = u > v/‖u‖‖v‖ denote the inner product between ` 2 normalized u and v , i.e . cosine similarity . The consistency loss for two views xin and x j n from the image In is formed as ` c ( x i n , x j n ) = ( 1− sim ( xin , xjn ) ) 2 = ( 1− x̃in > x̃jn ) 2 . ( 2 ) Here , we normalize the feature vector x̃ = x/‖x‖2 as done in InstDisc and MoCo . The consistency loss for the N images each with K augmented views is written as Lc = ∑N n=1 ∑K i , j=1 , i6=j ` c ( x i n , x j n ) = ∑N n=1 ∑K i , j=1 , i6=j ( 1− x̃in > x̃jn ) 2 . ( 3 ) The classification loss for the N images each with K augmented views is written as Ls = ∑N n=1 ∑K k=1 ` s ( x k n ) = − ∑N n=1 ∑K k=1 log ew > n x̃ k n/τ∑N j=1 e w > j x̃ k n/τ . ( 4 ) where we let the classifier weight be an ` 2-normalized vector : ‖w‖2 = 1 , which is similar to normalizing the prototype vector as done in InstDisc and MoCo . We combine the two losses together , L = Ls + αLc , ( 5 ) where α is a weight for the consistency loss to balance the two losses , avoiding over-optimizing the consistency loss or merely optimizing the classification loss . Consistency helps optimizing the classification loss . In general , when the features for each class are more compact , different classes are more easily separated and the softmax classification are more efficiently optimized . Our approach has the benefits : the feature distribution for the same instance is compact and the distributions for different instances are well separable , because of maximizing the consistency . Figure 2 ( a ) illustrates the benefit from simultaneously optimizing the consistency loss and the classification loss . Figure 2 ( b ) shows the insufficiency of only optimizing the classification loss . One can see that the distributions of different instances in Figure 2 ( a ) are better separated and the distribution for each instance is more compact . Let ’ s see how the consistency term makes the gradient of the classifier weight more effective . We have the gradient for the classification loss ` s ( xkn ) with respect to the classifier weight wn : ∂ ` s ( x k n ) ∂wn = ( P knn − 1 ) x̃kn , where P knn = e w > n x̃ k n/τ∑N r=1 e w > r x̃ k n/τ . The gradient from two views xin and x j n is gw = ∂ ` s ( x i n ) ∂wn + ∂ ` s ( x j n ) ∂wn = ( P inn − 1 ) x̃in + ( P jnn − 1 ) x̃jn . ( 6 ) According to the law of cosines , ‖x̃in‖2 = 1 and ‖x̃jn‖2 = 1 , we have ‖gw‖22 = ( P inn − 1 ) 2 + ( P jnn − 1 ) 2 + 2| ( P inn − 1 ) || ( P jnn − 1 ) |x̃in > x̃jn . ( 7 ) When the consistency term is included , x̃in and x̃ j n are very close , implying that x̃ i n > x̃jn is larger . In the case P inn and P j nn are not changed , the magnitude ‖gw‖2 is larger , and accordingly the classifier weight wn is updated effectively and quickly . In contrast , when the consistency term is not included , x̃in and x̃ j n might be very diverse as discussed ( see the discussion in “ Optimizing the classification loss is not direct to optimize the consistency loss. ” ) This results in that ‖gw‖2 is smaller , and thus the classifier weight wn is updated less effectively and less quickly . Figure 3 shows the final classification loss Ls and consistency loss Lc value with different consistency loss weights . We can see that increasing the consistency weight when smaller than 2.5 helps optimizing the classification loss , and when larger than 2.5 harms the classification loss optimization . In Appendix B , we discuss the reason : over-weighting the consistency loss could lead to a trivial solution . In our experiments , we set α to 2.5 in which case the training classification loss is minimum . Optimizing the classification loss is not direct to optimize the consistency loss . Optimizing the classification loss intuitively expects that each instance lies in a different region . We expect that the augmented views of an instance xn are assigned to the nth region and compactly distributed . We find that merely optimizing the classification loss Ls is not easy to make the features of the augmented views of the same instance contractive , consequently the features are not compactly distributed . The reason is that larger similarity between augmented views is not explicitly encouraged , and is implicitly imposed through the classifier weight . The angle between x̃in and x̃ j n , θ ( x̃ i n , x̃ j n ) ( reflecting the similarity between x̃in and x̃ j n , θ ( x̃ i n , x̃ j n ) ) , is upbounded : θ ( x̃in , x̃ j n ) ≤ θ ( x̃in , wn ) + θ ( wn , x̃jn ) . ( 8 ) Minimizing the classifier loss Ls if given wn , it is possible that the numerators ( e.g , w > n x̃in and w > n x̃ j n ) , are larger and accordingly the upbound θ ( x̃ i n , wn ) +θ ( wn , x̃ j n ) is smaller . However , we find that there exist many transformations R so that the upbound is the same : w > n ( R x̃ i n ) = w > n x̃ i n , and θ ( x̃in , wn ) = θ ( Rx̃ i n , wn ) . In this case , θ ( x̃ i n , x̃ j n ) is likely to be very different from θ ( Rx̃ i n , x̃ j n ) . This implies that there is still a gap between optimizing the upbound θ ( x̃in , wn ) + θ ( wn , x̃ j n ) and directly optimizing θ ( x̃in , x̃ j n ) . As a result , merely optimizing the classification loss is not easy to make the features for one instance compactly distributed in the corresponding region . Batch size . We present rough analysis showing that instance classification , including our approach , MoCo , and InstDisc , does not require large batch ( see He et al . ( 2019 ) and the empirical validation in Figure 4 for our approach ) . We rewrite the loss function in Equation 5 as L = ∑N n=1 [ α ∑K i , j=1 , i6=j ( 1− sim ( xin , xjn ) ) 2 + ∑K k=1 log ew > n x̃ k n/τ∑N j=1 e w > j x̃ k n/τ ] . ( 9 ) The reformulation indicates that the loss can be decomposed to the sum of components , where each component depends on a different instance . The separation between instances is got through the classifier weights each of which encodes the information of the corresponding instance . The decomposability property leads to that the optimization of L using SGD behaves similarly to the standard classification problem with SGD : large batch size is not necessary . Figure 4 shows that the performances with batch sizes 256 , 512 and 1024 are similar . In contrast , the contrastive loss over all the N instances in SimCLR , is L = ∑N n=1 ( log ex̃ 1 n > x̃2n/τ∑N j=1 e x̃1n > x̃1j/τ + ex̃ 1 n > x̃2j/τ + log ex̃ 2 n > x̃1n/τ∑N j=1 e x̃2n > x̃1j/τ + ex̃ 2 n > x̃2j/τ ) . ( 10 ) We can see that this can not be decomposed as a sum of components each of which depends on a different instance , which is a general requirement for SGD . Each instance depends on other instances . We believe that this is the reason why SimCLR needs large batch size ( Chen et al. , 2020b ) . | This paper proposes adding an additional loss term to instance classification, within the context of self-supervised pre-training. Specifically, in addition to the standard classification loss term that views each image (and its augmentation) as a separate category, a second loss term is added, which is 1 minus the inner product of the representations for two augmentation views of the same image. In a sense, this is incorporating an aspect of the contrasting learning approach, as two views of the same image are being explicitly pulled toward one another due to the consistency loss. | SP:28739f0fcb4a9fb3c661dee4008443d34c25d6d6 |
Consistent Instance Classification for Unsupervised Representation Learning | 1 INTRODUCTION . Learning good representations from unlabeled images is a land-standing and challenging problem . The mainstream methods include : generative modeling ( Hinton et al. , 2006 ; Kingma & Welling , 2014 ) , colorization ( Zhang et al. , 2016 ) , transformation or spatial relation prediction ( Doersch et al. , 2015 ; Noroozi & Favaro , 2016 ; Gidaris et al. , 2018 ) , and discriminative methods , such as instance classification ( Dosovitskiy et al. , 2016 ; He et al. , 2019 ) , and contrastive learning ( Chen et al. , 2020b ) . The instance discrimination methods show promising performance for downstream tasks . There are two basic objectives that are optimized ( He et al. , 2019 ; Chen et al. , 2020b ; Yu et al. , 2020 ; Wang & Isola , 2020 ) : contraction and separation . Contraction means that the features of the augmented views from the same instance should be as close as possible . Separation means that the features of the augmented views from one instance should lie in a region different from other instances . The instance classification framework , such as InstDisc ( Wu et al. , 2018 ) , and MoCo ( He et al. , 2019 ; Chen et al. , 2020c ) , adopts a prototype-based classifier , where the prototype is estimated as the moving average of the corresponding features of previous epoches Wu et al . ( 2018 ) or as the output of an moving-average network He et al . ( 2019 ) ; Chen et al . ( 2020c ) . The prototype-based schemes ease the optimization of the classification loss in the challenging case that there is over one million categories . BYOL ( Grill et al. , 2020 ) computes the prototype in a way similar to MoCo , and only aligns the feature of augmented views with its prototype leaving the separation objective implicitly optimized . The prototype , computed from a single view rather than many views and from networks with different parameters , might not be reliable enough , making the contraction and separation optimization quality not guaranteed . The contrastive learning framework1 , such as SimCLR ( Chen et al. , 2020b ) and Ye et al . ( 2019 ) , simultaneously maximizes the similarities between each view pair from the same instance and min- 1InstDisc ( Wu et al. , 2018 ) and MoCo ( He et al. , 2019 ; Chen et al. , 2020c ) are also closely related to contrastive learning and are regarded as contrastive learning methods by some researchers . imizes the similarities between the view pair from different instances . This framework directly compares the feature of one view to a different view other than to a prototype , avoiding the unreliability of the prototype estimation . It , however , requires large batch size for each SGD iteration to compare enough number of negative instances for imposing the separation constraint2 , increasing the difficulty in large batch training . We propose a simple unsupervised representation learning approach , consistent instance classification ( ConIC ) , to improve the optimization and feature quality . Our approach jointly minimizes two losses : instance classification loss and consistency loss . The instance classification loss is formulated by regarding each instance as a category . Its optimization encourages that different instances lie in different regions . The consistency loss is formulated to directly compares the features of the augmented views from the same instance and encourages high similarity between them . One benefit from the consistency optimization is to directly and explicitly make the features of the same instances compact and thus to accelerate the optimization of the classification loss . This is different from Wu et al . ( 2018 ) , He et al . ( 2019 ) , heuristically estimating the classifier weights using the prototypes and does not suffer from the prototype estimation reliability issue . On the other hand , our approach does not rely on large batch training , that is essential for SimCLR ( Chen et al. , 2020b ) , because the whole loss in our formulation can be decomposed as a sum of components each of which only depends on one instance . Furthermore , we observed that jointly optimizing the consistency and classification losses leads to that the representation is more focused on the textured region , as shown in Figure 1 . This implies that the learned representation is more capable of characterizing the objects , and thus potentially more helpful for downstream tasks like object detection and segmentation . We demonstrate the effectiveness of our approach in unsupervised representation learning on ImageNet . Our approach achieves competitive performance under the linear evaluation protocol . When finetuned on downstream tasks , such as object detection on VOC , object detection and instance segmentation on COCO , instance segmentation on Cityscapes and LVIS , as well as semantic segmentation on Citeyscapes , COCO Stuff , ADE and VOC , our approach performs better than InstDisc , MoCo and SimCLR , and competitively or superior compared to other methods with stronger training setting ( e.g. , InfoMin and SwAV ) . 2 RELATED WORK . Generative approaches . Generative models , such as auto-encoders ( Hinton et al. , 2006 ; Kingma & Welling , 2014 ; Vincent et al. , 2008 ) , context encoders ( Pathak et al. , 2016 ) , GANs ( Donahue & Simonyan , 2019 ) , and GPTs ( Chen et al. , 2020a ) , learn an unsupervised representation by faithfully reconstructing the pixels . Later self-supervised models , such as colorization ( Zhang et al. , 2016 ) and split-brain encoders ( Zhang et al. , 2017 ) , improve generative models by withholding some part of the data and predicting it . 2We will show one possible reason that it requires large batch . Spatial relation prediction . The representation is learned by solving pretext tasks related to image patch spatial relation prediction , such as predicting the spatial relation between two patches sampled from an image , e.g. , a patch is on the left of another patch , ( Doersch et al. , 2015 ) ; solving Jigsaw Puzzles and determining the spatial configuration for the shuffled ( typically 9 ) patches ( Noroozi & Favaro , 2016 ) ; and predicting the rotation ( Gidaris et al. , 2018 ) . Instance classification . Exemplar-CNN ( Dosovitskiy et al. , 2016 ) regards the views formed by augmenting each instance as a class , and formulates an instance classification problem . InstDisc ( Wu et al. , 2018 ) , MoCo ( He et al. , 2019 ) , CMC ( Tian et al. , 2019 ) and PIRL ( Misra & van der Maaten , 2019 ) generalize exemplar-CNN by heuristically estimating the classifier weights using prototypes for easing the optimization . Our proposed approach follows the instance classification approach , and exploit an additional consistency loss to help optimization . Instance clustering . Rather than regarding each instance as a category , the instance clustering frameworks ( Caron et al. , 2018 ; 2019 ; 2020 ; Asano et al. , 2020 ; Huang et al. , 2019 ; Xie et al. , 2016 ; Yan et al. , 2020 ; Yang et al. , 2016 ) learn representations in which the instances are well optimized . DeepCluster ( Caron et al. , 2018 ) simply adopt the k-means clustering method by simultaneously optimizing the network parameters , and uses k-means assignments as pseudo-labels to learn representations . SwAV ( Caron et al. , 2020 ) simultaneously clusters the data while enforcing consistency between cluster assignments for different views of the same instance . Contrastive learning . Contrastive predictive coding ( van den Oord et al. , 2018 ; Hénaff et al. , 2019 ) predicts the representations of patches below a certain position from those above it by optimizing contrastive loss . DIM ( Hjelm et al. , 2019 ) and ANDIM ( Bachman et al. , 2019 ) achieves global-tolocal/local-to-neighbor patch representation prediction ( overlapping ) across augmented views using the contrastive loss . The contrastive learning framework ( Ye et al. , 2019 ; Chen et al. , 2020b ) formulates a contrastive loss encouraging the high similarity between the augmented views from the same instance , and low similarity between the instance and other instances . Wang & Isola ( 2020 ) presents a novel formulation based on two measures : alignment and uniformity , and shows that it is an alternative of contrastive loss . Yu et al . ( 2020 ) connects contractive and contrastive learning , cross-entropy , and so on , and provides theoretical guarantees for learning diverse and discriminative features . Consistency in semi-supervised learning . Consistency regularization , enforcing the similarity between the predictions or features of different views for the same unlabeled instance , has been widely applied in semi-supervised learning , such as Π Model ( Laine & Aila , 2017 ) , Temporal Ensemble ( Laine & Aila , 2017 ) , and Mean Teacher ( Tarvainen & Valpola , 2017 ) . We exploit the consistency loss to help optimize the classification loss for unsupervised representation learning . 3 APPROACH . Given a set of image instances without any labels , I = { I1 , I2 , . . . , IN } , the goal is to learn a feature extractor ( a neural network ) x = f ( I ) . The discrimination approach expands each image In to a set of augmented views { I1n , I2n , . . . , IKn } , and formulates the problem in a way that the features of the augmented views of each instance are similar ( contraction ) and the features of different instances are distributed separately ( separation ) . In the following , we first review three related instance classification methods , then we introduce our approach and present the analysis . 3.1 INSTANCE CLASSIFICATION . Exemplar CNN . Exemplar-CNN ( Dosovitskiy et al. , 2016 ) formulates unsupervised representation learning as an instance classification problem . The augmented views from one instance are regarded as one category , and the augmented views from different instances are regarded as different categories . The softmax loss is used and written for the kth view of the nth instance : ` s ( x k n ) = − log ew > n x̃ k n/τ∑N j=1 e w > j x̃ k n/τ , ( 1 ) where τ is the temperature . Exemplar-CNN uses the standard backpropagation algorithm to learn the network f ( · ) and the classification weights { w1 , w2 , . . . , wN } . InstDisc . The InstDisc approach ( Wu et al. , 2018 ) optimizes the network parameters , and heuristically estimates the classifier weights { w1 , w2 , . . . , wN } in each epoch using a feature moving average scheme , i.e. , compute the exponential averages of the features of the corresponding instances ( stored in a memory bank ) in the previous epochs . The heuristic weight estimation scheme eases the network optimization . MoCo . MoCo ( He et al. , 2019 ) instead adopts a network moving average scheme . In each SGD iteration , MoCo updates a momentum network whose parameters are moving average of the previous network parameters . It computes the features from the momentum network as the classifier weights , which are further maintained by a queue . This leads to better classifier weight estimates . 3.2 CONSISTENT INSTANCE CLASSIFICATION . We introduce a consistency loss to explicitly penalize the dissimilarity between augmented views from the same instance . Let sim ( u , v ) = u > v/‖u‖‖v‖ denote the inner product between ` 2 normalized u and v , i.e . cosine similarity . The consistency loss for two views xin and x j n from the image In is formed as ` c ( x i n , x j n ) = ( 1− sim ( xin , xjn ) ) 2 = ( 1− x̃in > x̃jn ) 2 . ( 2 ) Here , we normalize the feature vector x̃ = x/‖x‖2 as done in InstDisc and MoCo . The consistency loss for the N images each with K augmented views is written as Lc = ∑N n=1 ∑K i , j=1 , i6=j ` c ( x i n , x j n ) = ∑N n=1 ∑K i , j=1 , i6=j ( 1− x̃in > x̃jn ) 2 . ( 3 ) The classification loss for the N images each with K augmented views is written as Ls = ∑N n=1 ∑K k=1 ` s ( x k n ) = − ∑N n=1 ∑K k=1 log ew > n x̃ k n/τ∑N j=1 e w > j x̃ k n/τ . ( 4 ) where we let the classifier weight be an ` 2-normalized vector : ‖w‖2 = 1 , which is similar to normalizing the prototype vector as done in InstDisc and MoCo . We combine the two losses together , L = Ls + αLc , ( 5 ) where α is a weight for the consistency loss to balance the two losses , avoiding over-optimizing the consistency loss or merely optimizing the classification loss . Consistency helps optimizing the classification loss . In general , when the features for each class are more compact , different classes are more easily separated and the softmax classification are more efficiently optimized . Our approach has the benefits : the feature distribution for the same instance is compact and the distributions for different instances are well separable , because of maximizing the consistency . Figure 2 ( a ) illustrates the benefit from simultaneously optimizing the consistency loss and the classification loss . Figure 2 ( b ) shows the insufficiency of only optimizing the classification loss . One can see that the distributions of different instances in Figure 2 ( a ) are better separated and the distribution for each instance is more compact . Let ’ s see how the consistency term makes the gradient of the classifier weight more effective . We have the gradient for the classification loss ` s ( xkn ) with respect to the classifier weight wn : ∂ ` s ( x k n ) ∂wn = ( P knn − 1 ) x̃kn , where P knn = e w > n x̃ k n/τ∑N r=1 e w > r x̃ k n/τ . The gradient from two views xin and x j n is gw = ∂ ` s ( x i n ) ∂wn + ∂ ` s ( x j n ) ∂wn = ( P inn − 1 ) x̃in + ( P jnn − 1 ) x̃jn . ( 6 ) According to the law of cosines , ‖x̃in‖2 = 1 and ‖x̃jn‖2 = 1 , we have ‖gw‖22 = ( P inn − 1 ) 2 + ( P jnn − 1 ) 2 + 2| ( P inn − 1 ) || ( P jnn − 1 ) |x̃in > x̃jn . ( 7 ) When the consistency term is included , x̃in and x̃ j n are very close , implying that x̃ i n > x̃jn is larger . In the case P inn and P j nn are not changed , the magnitude ‖gw‖2 is larger , and accordingly the classifier weight wn is updated effectively and quickly . In contrast , when the consistency term is not included , x̃in and x̃ j n might be very diverse as discussed ( see the discussion in “ Optimizing the classification loss is not direct to optimize the consistency loss. ” ) This results in that ‖gw‖2 is smaller , and thus the classifier weight wn is updated less effectively and less quickly . Figure 3 shows the final classification loss Ls and consistency loss Lc value with different consistency loss weights . We can see that increasing the consistency weight when smaller than 2.5 helps optimizing the classification loss , and when larger than 2.5 harms the classification loss optimization . In Appendix B , we discuss the reason : over-weighting the consistency loss could lead to a trivial solution . In our experiments , we set α to 2.5 in which case the training classification loss is minimum . Optimizing the classification loss is not direct to optimize the consistency loss . Optimizing the classification loss intuitively expects that each instance lies in a different region . We expect that the augmented views of an instance xn are assigned to the nth region and compactly distributed . We find that merely optimizing the classification loss Ls is not easy to make the features of the augmented views of the same instance contractive , consequently the features are not compactly distributed . The reason is that larger similarity between augmented views is not explicitly encouraged , and is implicitly imposed through the classifier weight . The angle between x̃in and x̃ j n , θ ( x̃ i n , x̃ j n ) ( reflecting the similarity between x̃in and x̃ j n , θ ( x̃ i n , x̃ j n ) ) , is upbounded : θ ( x̃in , x̃ j n ) ≤ θ ( x̃in , wn ) + θ ( wn , x̃jn ) . ( 8 ) Minimizing the classifier loss Ls if given wn , it is possible that the numerators ( e.g , w > n x̃in and w > n x̃ j n ) , are larger and accordingly the upbound θ ( x̃ i n , wn ) +θ ( wn , x̃ j n ) is smaller . However , we find that there exist many transformations R so that the upbound is the same : w > n ( R x̃ i n ) = w > n x̃ i n , and θ ( x̃in , wn ) = θ ( Rx̃ i n , wn ) . In this case , θ ( x̃ i n , x̃ j n ) is likely to be very different from θ ( Rx̃ i n , x̃ j n ) . This implies that there is still a gap between optimizing the upbound θ ( x̃in , wn ) + θ ( wn , x̃ j n ) and directly optimizing θ ( x̃in , x̃ j n ) . As a result , merely optimizing the classification loss is not easy to make the features for one instance compactly distributed in the corresponding region . Batch size . We present rough analysis showing that instance classification , including our approach , MoCo , and InstDisc , does not require large batch ( see He et al . ( 2019 ) and the empirical validation in Figure 4 for our approach ) . We rewrite the loss function in Equation 5 as L = ∑N n=1 [ α ∑K i , j=1 , i6=j ( 1− sim ( xin , xjn ) ) 2 + ∑K k=1 log ew > n x̃ k n/τ∑N j=1 e w > j x̃ k n/τ ] . ( 9 ) The reformulation indicates that the loss can be decomposed to the sum of components , where each component depends on a different instance . The separation between instances is got through the classifier weights each of which encodes the information of the corresponding instance . The decomposability property leads to that the optimization of L using SGD behaves similarly to the standard classification problem with SGD : large batch size is not necessary . Figure 4 shows that the performances with batch sizes 256 , 512 and 1024 are similar . In contrast , the contrastive loss over all the N instances in SimCLR , is L = ∑N n=1 ( log ex̃ 1 n > x̃2n/τ∑N j=1 e x̃1n > x̃1j/τ + ex̃ 1 n > x̃2j/τ + log ex̃ 2 n > x̃1n/τ∑N j=1 e x̃2n > x̃1j/τ + ex̃ 2 n > x̃2j/τ ) . ( 10 ) We can see that this can not be decomposed as a sum of components each of which depends on a different instance , which is a general requirement for SGD . Each instance depends on other instances . We believe that this is the reason why SimCLR needs large batch size ( Chen et al. , 2020b ) . | This paper studies the instance classification solution for an unsupervised representation learning problem. Particularly, this paper proposes an additional consistency loss that is simultaneously optimized with classification loss, in order to penalize feature dissimilarity between augmented views of the same instance. Such consistency loss makes classification loss optimization easier and avoids large batch size. Extensive experiments on downstream tasks, e.g., segmentation and detection, show the effectiveness of the proposed method. | SP:28739f0fcb4a9fb3c661dee4008443d34c25d6d6 |
ARMOURED: Adversarially Robust MOdels using Unlabeled data by REgularizing Diversity | Adversarial attacks pose a major challenge for modern deep neural networks . Recent advancements show that adversarially robust generalization requires a large amount of labeled data for training . If annotation becomes a burden , can unlabeled data help bridge the gap ? In this paper , we propose ARMOURED , an adversarially robust training method based on semi-supervised learning that consists of two components . The first component applies multi-view learning to simultaneously optimize multiple independent networks and utilizes unlabeled data to enforce labeling consistency . The second component reduces adversarial transferability among the networks via diversity regularizers inspired by determinantal point processes and entropy maximization . Experimental results show that under small perturbation budgets , ARMOURED is robust against strong adaptive adversaries . Notably , ARMOURED does not rely on generating adversarial samples during training . When used in combination with adversarial training , ARMOURED yields competitive performance with the state-of-the-art adversariallyrobust benchmarks on SVHN and outperforms them on CIFAR-10 , while offering higher clean accuracy . 1 INTRODUCTION . Modern deep neural networks have met or even surpassed human-level performance on a variety of image classification tasks . However , they are vulnerable to adversarial attacks , where small , calculated perturbations in the input sample can fool a network into making unintended behaviors , e.g. , misclassification . ( Szegedy et al. , 2014 ; Biggio et al. , 2013 ) . Such adversarial attacks have been found to transfer between different network architectures ( Papernot et al. , 2016 ) and are a serious concern , especially when neural networks are used in real-world applications . As a result , much work has been done to improve the robustness of neural networks against adversarial attacks ( Miller et al. , 2020 ) . Of these techniques , adversarial training ( AT ) ( Goodfellow et al. , 2015 ; Madry et al. , 2018 ) is widely used and has been found to provide the most robust models in recent evaluation studies ( Dong et al. , 2020 ; Croce & Hein , 2020 ) . Nonetheless , even models trained with AT have markedly reduced performance on adversarial samples in comparison to clean samples . Models trained with AT also have worse accuracy on clean samples when compared to models trained with standard classification losses . Schmidt et al . ( 2018 ) suggest that one reason for such reductions in model accuracy is that training adversarially robust models requires substantially more labeled data . Due to the high costs of obtaining such labeled data in real-world applications , recent work has explored semi-supervised AT-based approaches that are able to leverage unlabeled data instead ( Uesato et al. , 2019 ; Najafi et al. , 2019 ; Zhai et al. , 2019 ; Carmon et al. , 2019 ) . ∗Equal contribution . †Corresponding author . Orthogonal to AT-based approaches that focus on training robust single models , a few works have explored the use of diversity regularization for learning adversarially robust classifiers . These works rely on encouraging ensemble diversity through regularization terms , whether on model predictions ( Pang et al. , 2019 ) or model gradients ( Dabouei et al. , 2020 ) , guided by the intuition that diversity amongst the model ensemble will make it difficult for adversarial attacks to transfer between individual models , thus making the ensemble as a whole more resistant to attack . In this work , we propose ARMOURED : Adversarially Robust MOdels using Unlabeled data by REgularizing Diversity , a novel algorithm for adversarially robust model learning that elegantly unifies semi-supervised learning and diversity regularization through a multi-view learning framework . ARMOURED applies a pseudo-label filter similar to co-training ( Blum & Mitchell , 1998 ) to enforce consistency of different networks ’ predictions on the unlabeled data . In addition , we derive a regularization term inspired by determinantal point processes ( DPP ) ( Kulesza & Taskar , 2012 ) that encourages the two networks to predict differently for non-target classes . Lastly , ARMOURED maximizes the entropy of the combined multi-view output on the non-target classes . We show in empirical evaluations that ARMOURED achieves state-of-the-art robustness against strong adaptive adversaries as long as the perturbations are within small ` ∞ or ` 2 norm-bounded balls . Notably , unlike previous semi-supervised methods , ARMOURED does not use adversarial samples during training . When used in combination with AT , ARMOURED is competitive with the state-of-the-art methods on SVHN and outperforms them on CIFAR-10 , while offering higher clean accuracy . In summary , the major contributions of this work are as follows : 1 . We propose ARMOURED , a novel semi-supervised method based on multi-view learning and diversity regularization for training adversarially robust models . 2 . We perform an extensive comparison , including standard semi-supervised learning approaches in addition to methods for learning adversarially robust models . 3 . We show that ARMOURED+AT achieves state-of-the-art adversarial robustness while maintaining high accuracy on clean data . 2 RELATED WORK . To set the stage for ARMOURED , in this section , we briefly review adversarially robust learning and semi-supervised learning - two paradigms in the literature that are related to our work . 2.1 ADVERSARIALLY ROBUST LEARNING . Adversarial attacks : We consider attacks where adversarial samples stay within a ` p ball with fixed radius around the clean sample . In this setting , the two standard white-box attacks are the Fast Gradient Sign Method ( FGSM ) ( Goodfellow et al. , 2015 ) that computes a one-step perturbation that maximizes the cross entropy loss function , and Projected Gradient Descent ( PGD ) ( Madry et al. , 2018 ) , a stronger attack that performs multiple iterations of gradient updates to maximize the loss ; this may be seen as a multi-step version of FGSM . Auto-PGD attack ( APGD ) ( Croce & Hein , 2020 ) is a parameter-free , budget-aware variant of PGD which aims at better convergence . However , robustness against these gradient-based attacks may give a false sense of security due to gradient-masking . This phenomenon happens when the defense does not produce useful gradients to generate adversarial samples ( Athalye et al. , 2018 ) . Gradient-masking is known to affect PGD by preventing its convergence to the actual adversarial samples ( Tramèr & Boneh , 2019 ) . There exists gradient-based attacks such as Fast Adaptive Boundary attack ( Croce & Hein , 2019 ) ( FAB ) which is invariant to rescaling , thus is unaffected by gradient-masking . FAB minimizes the perturbation norm as long as misclassification is achieved . Black box attacks that rely on random search alone without gradient information , such as Square attack ( Andriushchenko et al. , 2020 ) , are also unaffected by gradient masking . Finally , AutoAttack ( Croce & Hein , 2020 ) is a strong ensemble adversary which applies four attacks sequentially ( APGD with cross entropy loss , followed by targeted APGD with difference-of-logits-ratio loss , targeted FAB , then Square ) . Adversarial training : Adversarial training ( AT ) is a popular approach that performs well in practice ( Dong et al. , 2020 ) . Madry et al . ( 2018 ) formulate AT as a min-max problem , where the model is trained with adversarial samples found via PGD . Variants of this method such as TRADES ( Zhang et al. , 2019b ) and ALP ( Kannan et al. , 2018 ) further decompose the error into natural error and boundary error for higher robustness . Zhang et al . ( 2019a ) ; Wang et al . ( 2019 ) theoretically prove the convergence of AT . Two drawbacks of AT are its slow training due to adversarial example generation requiring multiple gradient computations , and the significant reduction in model accuracy on clean samples . Several recent works have focused on speeding up AT ( Zhang et al. , 2019a ; Qin et al. , 2019 ; Shafahi et al. , 2019 ) ; ARMOURED addresses the second limitation , enabling significantly improved performance on clean samples . Semi-supervised adversarial training : Schmidt et al . ( 2018 ) showed that adversarial robust generalization requires much more labeled data . To relieve the annotation burden , several semi-supervised adversarially robust learning ( SSAR ) methods have been developed to exploit unlabeled data instead . Uesato et al . ( 2019 ) introduced unsupervised adversarial training , a simple self-training model which optimizes a smoothness loss and a classification loss using pseudo-labels . Carmon et al . ( 2019 ) revisited the Gaussian model by Schmidt et al . ( 2018 ) and introduced robust self-training ( RST ) , another self-training model that computes a regularization loss from unlabeled data , either via adversarial training or stability training . Zhai et al . ( 2019 ) applied a generalized virtual adversarial training to optimize the prediction stability of their model in the presence of perturbations . Najafi et al . ( 2019 ) proposed a semi-supervised extension of the distributionally robust optimization framework by Sinha et al . ( 2018 ) . They replace pseudo-labels with soft-labels for unlabeled data and train them together with labeled data . It is worth noting that all of these four state-of-the-art SSAR methods apply AT in their training procedure . Diversity regularization : Diversity regularization is an orthogonal direction to AT that has the potential to further improve the performance of AT . In earlier work , Pang et al . ( 2018 ) showed that for a single network , adversarial robustness can be improved when the features learned for different classes are diverse . Pang et al . ( 2019 ) further developed this concept by introducing Adaptive Promoting Diversity regularization ( ADP ) . Given an ensemble of neural network classifiers , ADP promotes diversity among non-target predictions of the networks . ADP is inspired by determinantal point processes ( Hough et al. , 2006 ) , an elegant statistical tool to model repulsive interactions among items of a fixed ground set ; applications to machine learning are reviewed in ( Kulesza & Taskar , 2012 ) . Dabouei et al . ( 2020 ) enforce diversity on the gradients of individual networks in the ensemble instead of their predictions . We note that unlike ARMOURED , the methods described here are developed for the fully-supervised setting , and are not able to utilize unlabeled data . 2.2 SEMI-SUPERVISED LEARNING . Semi-supervised learning : Semi-supervised learning ( SSL ) is an effective strategy to learn from low-cost unlabeled data . There is considerable recent work in this practically relevant and active research area ; we will not be able to cover all these works here . Existing SSL methods can be broadly categorized into three groups : consistency-based , graph-based , and generative models . Recent methods , such as Mean Teacher ( Tarvainen & Valpola , 2017 ) and MixMatch ( Berthelot et al. , 2019 ) , are consistency-based as this approach can be adapted to generic problems and have superior performance in practice . The key idea behind consistency-based methods is that model predictions on different augmentations of the same input should be consistent . Multi-view learning : Multi-view learning is a SSL paradigm that is capable of representing diversity in addition to consistency . A dataset is considered to have multiple views when its data samples are represented by more than one set of features and each set is sufficient for the learning task . In this setting , a multi-view method assigns one modeling function to each view and jointly optimizes the functions to improve generalization performance ( Zhao et al. , 2017 ) . By analyzing various multi-view algorithms , Xu et al . ( 2013 ) summarized consensus and complementary as the two underpinning principles of multi-view learning . The consensus principle states that a multiview technique must aim at maximizing the prediction agreement on different views , similar to the consistency-based SSL methods discussed above . The complementary principle states that in order to make improvement , each view must contain some information that the other views do not carry , that the views should be sufficiently diverse . This principle has been applied to boost generalization capability in regular SSL ( Qiao et al. , 2018 ) and learning with label noise ( Han et al. , 2018 ) . In this paper , we argue that multi-view complementarity also plays a critical role in improving adversarial robustness , by reducing the transferability of adversarial attacks across different views . | This paper considers training an adversarially robust model in a semi-supervised setting. The authors propose an ensemble-based algorithm for this goal. The algorithm uses a regularization term to induce diversity in the ensemble. The algorithm also leverages the idea of multi-view training in semi-supervised learning to make use of unlabeled data. The experimental results show that the proposed algorithm outperforms several baselines. | SP:99532b87b80a2915e725473a1feecff213def1f5 |
ARMOURED: Adversarially Robust MOdels using Unlabeled data by REgularizing Diversity | Adversarial attacks pose a major challenge for modern deep neural networks . Recent advancements show that adversarially robust generalization requires a large amount of labeled data for training . If annotation becomes a burden , can unlabeled data help bridge the gap ? In this paper , we propose ARMOURED , an adversarially robust training method based on semi-supervised learning that consists of two components . The first component applies multi-view learning to simultaneously optimize multiple independent networks and utilizes unlabeled data to enforce labeling consistency . The second component reduces adversarial transferability among the networks via diversity regularizers inspired by determinantal point processes and entropy maximization . Experimental results show that under small perturbation budgets , ARMOURED is robust against strong adaptive adversaries . Notably , ARMOURED does not rely on generating adversarial samples during training . When used in combination with adversarial training , ARMOURED yields competitive performance with the state-of-the-art adversariallyrobust benchmarks on SVHN and outperforms them on CIFAR-10 , while offering higher clean accuracy . 1 INTRODUCTION . Modern deep neural networks have met or even surpassed human-level performance on a variety of image classification tasks . However , they are vulnerable to adversarial attacks , where small , calculated perturbations in the input sample can fool a network into making unintended behaviors , e.g. , misclassification . ( Szegedy et al. , 2014 ; Biggio et al. , 2013 ) . Such adversarial attacks have been found to transfer between different network architectures ( Papernot et al. , 2016 ) and are a serious concern , especially when neural networks are used in real-world applications . As a result , much work has been done to improve the robustness of neural networks against adversarial attacks ( Miller et al. , 2020 ) . Of these techniques , adversarial training ( AT ) ( Goodfellow et al. , 2015 ; Madry et al. , 2018 ) is widely used and has been found to provide the most robust models in recent evaluation studies ( Dong et al. , 2020 ; Croce & Hein , 2020 ) . Nonetheless , even models trained with AT have markedly reduced performance on adversarial samples in comparison to clean samples . Models trained with AT also have worse accuracy on clean samples when compared to models trained with standard classification losses . Schmidt et al . ( 2018 ) suggest that one reason for such reductions in model accuracy is that training adversarially robust models requires substantially more labeled data . Due to the high costs of obtaining such labeled data in real-world applications , recent work has explored semi-supervised AT-based approaches that are able to leverage unlabeled data instead ( Uesato et al. , 2019 ; Najafi et al. , 2019 ; Zhai et al. , 2019 ; Carmon et al. , 2019 ) . ∗Equal contribution . †Corresponding author . Orthogonal to AT-based approaches that focus on training robust single models , a few works have explored the use of diversity regularization for learning adversarially robust classifiers . These works rely on encouraging ensemble diversity through regularization terms , whether on model predictions ( Pang et al. , 2019 ) or model gradients ( Dabouei et al. , 2020 ) , guided by the intuition that diversity amongst the model ensemble will make it difficult for adversarial attacks to transfer between individual models , thus making the ensemble as a whole more resistant to attack . In this work , we propose ARMOURED : Adversarially Robust MOdels using Unlabeled data by REgularizing Diversity , a novel algorithm for adversarially robust model learning that elegantly unifies semi-supervised learning and diversity regularization through a multi-view learning framework . ARMOURED applies a pseudo-label filter similar to co-training ( Blum & Mitchell , 1998 ) to enforce consistency of different networks ’ predictions on the unlabeled data . In addition , we derive a regularization term inspired by determinantal point processes ( DPP ) ( Kulesza & Taskar , 2012 ) that encourages the two networks to predict differently for non-target classes . Lastly , ARMOURED maximizes the entropy of the combined multi-view output on the non-target classes . We show in empirical evaluations that ARMOURED achieves state-of-the-art robustness against strong adaptive adversaries as long as the perturbations are within small ` ∞ or ` 2 norm-bounded balls . Notably , unlike previous semi-supervised methods , ARMOURED does not use adversarial samples during training . When used in combination with AT , ARMOURED is competitive with the state-of-the-art methods on SVHN and outperforms them on CIFAR-10 , while offering higher clean accuracy . In summary , the major contributions of this work are as follows : 1 . We propose ARMOURED , a novel semi-supervised method based on multi-view learning and diversity regularization for training adversarially robust models . 2 . We perform an extensive comparison , including standard semi-supervised learning approaches in addition to methods for learning adversarially robust models . 3 . We show that ARMOURED+AT achieves state-of-the-art adversarial robustness while maintaining high accuracy on clean data . 2 RELATED WORK . To set the stage for ARMOURED , in this section , we briefly review adversarially robust learning and semi-supervised learning - two paradigms in the literature that are related to our work . 2.1 ADVERSARIALLY ROBUST LEARNING . Adversarial attacks : We consider attacks where adversarial samples stay within a ` p ball with fixed radius around the clean sample . In this setting , the two standard white-box attacks are the Fast Gradient Sign Method ( FGSM ) ( Goodfellow et al. , 2015 ) that computes a one-step perturbation that maximizes the cross entropy loss function , and Projected Gradient Descent ( PGD ) ( Madry et al. , 2018 ) , a stronger attack that performs multiple iterations of gradient updates to maximize the loss ; this may be seen as a multi-step version of FGSM . Auto-PGD attack ( APGD ) ( Croce & Hein , 2020 ) is a parameter-free , budget-aware variant of PGD which aims at better convergence . However , robustness against these gradient-based attacks may give a false sense of security due to gradient-masking . This phenomenon happens when the defense does not produce useful gradients to generate adversarial samples ( Athalye et al. , 2018 ) . Gradient-masking is known to affect PGD by preventing its convergence to the actual adversarial samples ( Tramèr & Boneh , 2019 ) . There exists gradient-based attacks such as Fast Adaptive Boundary attack ( Croce & Hein , 2019 ) ( FAB ) which is invariant to rescaling , thus is unaffected by gradient-masking . FAB minimizes the perturbation norm as long as misclassification is achieved . Black box attacks that rely on random search alone without gradient information , such as Square attack ( Andriushchenko et al. , 2020 ) , are also unaffected by gradient masking . Finally , AutoAttack ( Croce & Hein , 2020 ) is a strong ensemble adversary which applies four attacks sequentially ( APGD with cross entropy loss , followed by targeted APGD with difference-of-logits-ratio loss , targeted FAB , then Square ) . Adversarial training : Adversarial training ( AT ) is a popular approach that performs well in practice ( Dong et al. , 2020 ) . Madry et al . ( 2018 ) formulate AT as a min-max problem , where the model is trained with adversarial samples found via PGD . Variants of this method such as TRADES ( Zhang et al. , 2019b ) and ALP ( Kannan et al. , 2018 ) further decompose the error into natural error and boundary error for higher robustness . Zhang et al . ( 2019a ) ; Wang et al . ( 2019 ) theoretically prove the convergence of AT . Two drawbacks of AT are its slow training due to adversarial example generation requiring multiple gradient computations , and the significant reduction in model accuracy on clean samples . Several recent works have focused on speeding up AT ( Zhang et al. , 2019a ; Qin et al. , 2019 ; Shafahi et al. , 2019 ) ; ARMOURED addresses the second limitation , enabling significantly improved performance on clean samples . Semi-supervised adversarial training : Schmidt et al . ( 2018 ) showed that adversarial robust generalization requires much more labeled data . To relieve the annotation burden , several semi-supervised adversarially robust learning ( SSAR ) methods have been developed to exploit unlabeled data instead . Uesato et al . ( 2019 ) introduced unsupervised adversarial training , a simple self-training model which optimizes a smoothness loss and a classification loss using pseudo-labels . Carmon et al . ( 2019 ) revisited the Gaussian model by Schmidt et al . ( 2018 ) and introduced robust self-training ( RST ) , another self-training model that computes a regularization loss from unlabeled data , either via adversarial training or stability training . Zhai et al . ( 2019 ) applied a generalized virtual adversarial training to optimize the prediction stability of their model in the presence of perturbations . Najafi et al . ( 2019 ) proposed a semi-supervised extension of the distributionally robust optimization framework by Sinha et al . ( 2018 ) . They replace pseudo-labels with soft-labels for unlabeled data and train them together with labeled data . It is worth noting that all of these four state-of-the-art SSAR methods apply AT in their training procedure . Diversity regularization : Diversity regularization is an orthogonal direction to AT that has the potential to further improve the performance of AT . In earlier work , Pang et al . ( 2018 ) showed that for a single network , adversarial robustness can be improved when the features learned for different classes are diverse . Pang et al . ( 2019 ) further developed this concept by introducing Adaptive Promoting Diversity regularization ( ADP ) . Given an ensemble of neural network classifiers , ADP promotes diversity among non-target predictions of the networks . ADP is inspired by determinantal point processes ( Hough et al. , 2006 ) , an elegant statistical tool to model repulsive interactions among items of a fixed ground set ; applications to machine learning are reviewed in ( Kulesza & Taskar , 2012 ) . Dabouei et al . ( 2020 ) enforce diversity on the gradients of individual networks in the ensemble instead of their predictions . We note that unlike ARMOURED , the methods described here are developed for the fully-supervised setting , and are not able to utilize unlabeled data . 2.2 SEMI-SUPERVISED LEARNING . Semi-supervised learning : Semi-supervised learning ( SSL ) is an effective strategy to learn from low-cost unlabeled data . There is considerable recent work in this practically relevant and active research area ; we will not be able to cover all these works here . Existing SSL methods can be broadly categorized into three groups : consistency-based , graph-based , and generative models . Recent methods , such as Mean Teacher ( Tarvainen & Valpola , 2017 ) and MixMatch ( Berthelot et al. , 2019 ) , are consistency-based as this approach can be adapted to generic problems and have superior performance in practice . The key idea behind consistency-based methods is that model predictions on different augmentations of the same input should be consistent . Multi-view learning : Multi-view learning is a SSL paradigm that is capable of representing diversity in addition to consistency . A dataset is considered to have multiple views when its data samples are represented by more than one set of features and each set is sufficient for the learning task . In this setting , a multi-view method assigns one modeling function to each view and jointly optimizes the functions to improve generalization performance ( Zhao et al. , 2017 ) . By analyzing various multi-view algorithms , Xu et al . ( 2013 ) summarized consensus and complementary as the two underpinning principles of multi-view learning . The consensus principle states that a multiview technique must aim at maximizing the prediction agreement on different views , similar to the consistency-based SSL methods discussed above . The complementary principle states that in order to make improvement , each view must contain some information that the other views do not carry , that the views should be sufficiently diverse . This principle has been applied to boost generalization capability in regular SSL ( Qiao et al. , 2018 ) and learning with label noise ( Han et al. , 2018 ) . In this paper , we argue that multi-view complementarity also plays a critical role in improving adversarial robustness , by reducing the transferability of adversarial attacks across different views . | This work introduces ARMOURED, a new method for learning models that are robust against adversarial attacks. The method uses **multi-view**-learning (as in using multiple models with different parameters to cast their votes/views on a given sample), semi-supervised learning to pseudo-label new data based on a consensus, and a diversity regularizer. The approach is evaluated in CIFAR-10 and SVHN against recent baselines in the presence of white-box attacks. The results yield by ARMOURED in these scenarios are superior. | SP:99532b87b80a2915e725473a1feecff213def1f5 |
HalentNet: Multimodal Trajectory Forecasting with Hallucinative Intents | 1 INTRODUCTION . The ability to forecast trajectories of dynamic agents is essential for a variety of autonomous systems such as self-driving vehicles and social robots . It enables an autonomous system to foresee adverse situations and adjust motion planning accordingly to prefer better alternatives . Because agents can make different decisions at any given time , future motion distribution is inherently multi-modal . Due to incomplete coverage of different modes in real data and interacting agents ’ combinatorial nature , trajectory forecasting is challenging . Several existing works focus on formulating the multi-modal future prediction only from training data ( e.g. , ( Tang & Salakhutdinov , 2019 ; Alahi et al. , 2016 ; Casas et al. , 2019 ; Deo & Trivedi , 2018 ; Sadeghian et al. , 2018 ; Casas et al. , 2019 ; Salzmann et al. , 2020 ) ) . This severely limits the ability of these models to predict modes that are not covered beyond the training data distribution , and some of these learned modes could be spurious especially where the real predictive spaces are not or inadequately covered by the training data . To improve the multimodal prediction quality , our goal is to enrich the coverage of these less explored spaces , while encouraging plausible behavior . Properly designing this exploratory learning process for motion forecasting as an implicit data augmentation approach is at the heart of this paper . ∗Work done prior to Amazon . Most data augmentation methods are geometric and operate on raw data . They also have been mostly studied on discrete label spaces like classification tasks ( e.g. , ( Zhang et al. , 2017 ; Yun et al. , 2019 ; Wang et al. , 2019 ; Cubuk et al. , 2019 ; Ho et al. , 2019 ; Antoniou et al. , 2017 ; Elhoseiny & Elfeki , 2019 ; Mikołajczyk & Grochowski , 2019 ; Ratner et al. , 2017 ) ) . In contrast , we focus on a multi-agent future forecasting task where label space for each agent is spatial-temporal . To our knowledge , augmentation techniques are far less explored for this task . Our work builds on recent advances in trajectory prediction problem ( e.g. , Tang & Salakhutdinov ( 2019 ) ; Salzmann et al . ( 2020 ) ) , that leverage discrete latent variables to represent driving behavior/intents ( e.g . Turn left , speed up ) . Inspired by these advances , we propose HalentNet , a sequential probabilistic latent variable generative model that learns from both real and implicitly augmented multi-agent trajectory data . More concretely , we model driving intents with discrete latent variables z . Then , our method hallucinates new intents by mixing different discrete latent variables up in the temporal dimension to generate trajectories that are realistic-looking but different from training data judged by discriminator Dis to implicitly augment the behaviors/intents . The nature of our augmentation approach is different from existing methods since it operates on the latent space that represents the agent ’ s behavior . The training of these latent variables is guided by a collaboration between discriminative and hallucinative learning signals . The discriminative loss increases the separation between intent modes ; we impose this as a classification loss that recognizes the one-hot latent intents corresponding to the predicted trajectories . We call these discriminative latent intents as classified intents since they are easy to classify to an existing one-hot latent intent ( i.e. , low entropy ) . This discriminative loss expands the predictive intent space that we then encourage to explore by our hallucinated intents ’ loss . As we detail later , we define hallucinated intents as a mixture of the one-hot classified latent intents . We encourage the predictions of trajectories corresponding to hallcuinated intents to be hard to classify to the one-hot discrete latent intents by hallucinative loss but , in the meantime , be realistic with a real/fake loss that we impose . The classification , hallucinative , and real/fake losses are all defined on top of a Discriminator Dis , whose input is the predicted motion trajectories and the map information . We show that all these three components are necessary to achieve good performance , where we also ablate our design choices . Our contributions are summarized as follows . • We introduce a new framework that enables multi-modal trajectory forecasting to learn dynamically complementary augmented agent behaviors . • We introduce the notion of classified intents and hallucinated intents in motion forecasting that can be captured by discrete latent variables z . We introduce two complementary learning mechanism for each to better model latent behavior intentions and encourage the novelty of augmented agent behaviors and hence improve the generalization . The classified intents ẑ is defined not to change over time and are encouraged to be well separated from other classified intents with a classification loss . The hallucinated intents ẑh , on the other hand , changes over the prediction horizon and are encouraged to deviate from the classified intents as augmented agent behaviors . • Our experiments demonstrate at most 26 % better results measured by average FDE compared to other state-of-the-art methods on motion forecasting datasets , which verifies the effectiveness of our methods . We also conducted human evaluation experiments showing that our forecasted motion is considered 39 % safer than the runner-up approach . Codes , pretrained models and preprocessed datasets are available at https : //github.com/ Vision-CAIR/HalentNet 2 RELATED WORK . Trajectory Forecasting Trajectory forecasting of dynamic agents has received increasing attention recently because it is a core problem to a number of applications such as autonomous driving and social robots . Human motion is inherently multi-modal , recent work ( Lee et al. , 2017 ; Cui et al. , 2018 ; Chai et al. , 2019 ; Rhinehart et al. , 2019 ; Kosaraju et al. , 2019 ; Tang & Salakhutdinov , 2019 ; Ridel et al. , 2020 ; Salzmann et al. , 2020 ; Huang et al. , 2019 ; Mercat et al. , 2019 ) has focused on learning the distribution from multi-agent trajectory data . ( Cui et al. , 2018 ; Chai et al. , 2019 ; Ridel et al. , 2020 ; Mercat et al. , 2019 ) predicts multiple future trajectories without learning low dimensional latent agent behaviors . ( Lee et al. , 2017 ; Kosaraju et al. , 2019 ; Rhinehart et al. , 2019 ; Huang et al. , 2019 ) encodes agent behaviors in continuous low dimensional latent space while ( Tang & Salakhutdinov , 2019 ; Salzmann et al. , 2020 ) uses discrete latent variables . Discrete latent variables succinctly capture semantically meaningful modes such as turn left , turn right . ( Tang & Salakhutdinov , 2019 ; Salzmann et al. , 2020 ) learns discrete latent variables without explicit labels . Built on top of these recent work , we hallucinate possible future behaviors by changing agent intents . As the forecast horizon is a few seconds , these are highly plausible . We use a discriminator to encourage augmented trajectories to look real . Data augmentation Data augmentation is a popular technique to mitigate overfitting and improve generalization in training deep networks ( Shorten & Khoshgoftaar , 2019 ) . New data is typically generated by transforming real data samples in the original input space . These transformations range from simple techniques ( e.g . random flipping , mirroring for images , mixup ( Zhang et al. , 2017 ) and Cutmix ( Yun et al. , 2019 ) ) to automatic data augmentation techniques ( e.g . AutoAugment ( Cubuk et al. , 2019 ) ) and class-identity preserving semantic data augmentation techniques ( Ratner et al. , 2017 ) ( e.g . changing backgrounds of objects ) . Recently data augmentation via semantic transformation in deep feature space ( Liu et al. , 2018 ; Wang et al. , 2019 ; Li et al. , 2020a ) has also been proposed . ISDA ( Wang et al. , 2019 ) proposes a loss function to implicitly translate training samples along with semantic directions in the feature space . For example , a certain direction corresponds to the semantic translation of ” make-bespectacled. ” When a person ’ s feature without glasses is translated along this direction , the new feature may correspond to the same person but with glasses . MoEx ( Li et al. , 2020a ) proposes a new augmentation method that leverages the first and second moments extracted and re-injected by feature normalization . Specifically , it replaces the moments of the learned features of one training image by those of another and interpolates the target labels . Our data augmentation is also in the latent space , which represents agent behavior . Imaginative/Hallucinative models . GANs ( Goodfellow et al. , 2014 ; Radford et al. , 2015 ) are a powerful generative model , yet they are not explicitly trained to go beyond the training data to improve generalization . Inspired by the theory of human creativity ( Martindale , 1990 ) , recent approaches on generative models were proposed to encourage novel visual content generation in art and fashion designs . In ( Elgammal et al. , 2017 ) , the authors adapted GANs to generate unconditional creative content ( paintings ) by encouraging the model to deviate from existing painting styles . In the fashion domain , ( Sbai et al. , 2018 ) showed that their model is capable of producing a non-existing shape like “ pants to extended arm sleeves ” that some designers found interesting . The key mechanism in these methods is the addition of a deviation loss , which encourages the generator to produce novel content . More recently , ( Elhoseiny & Elfeki , 2019 ) proposed a method for understanding unseen classes , also known as zero-shot learning ( ZSL ) , by generating visual representations of synthesized unseen class descriptors . These visual representations are encouraged to deviate from seen classes , leading to better generalization compared to earlier generative ZSL methods . ( Zhang et al. , 2019 ) and ( Li et al. , 2020b ) introduced methods to generate additional data based on saliency maps and adversarial learning for few-shot learning task , respectively . In the field of navigation , ( Xiao et al. , 2020a ) and ( Xiao et al. , 2020b ) utilized geometric information to hallucinate new navigation training data . In contrast to these earlier methods , our work has two key differences . First , our work is a sequential probabilistic generative model focusing on motion forecasting requiring time-series prediction in continuous space . Second , the deviation signal in ( Elgammal et al. , 2017 ; Sbai et al. , 2018 ; Elhoseiny & Elfeki , 2019 ) is based on defining labeled discrete seen styles and seen classes , respectively . In contrast , we model the deviation from a discrete latent space guided by a deviation signal to help the model imagine driver intents without supervision signal . Similar to MoEx ( Li et al. , 2020a ) , augmented trajectories are dynamically generated during training . We believe we are the first to propose a data augmentation method in latent space for trajectory forecasting . 3 METHOD . Problem Formulation We are aiming at predicting the future trajectory ygt of a specified agent given the input states x , which contains the historical information like positions and heading angles of the agent itself and the surrounding agents , and a semantic map patch m , which offers context information like drivable region , by generating a distribution P ( y|x , m ) to model the distribution of real future trajectory ygt . Our Model Motion forecasting in the real world is a multi-modal task . There are usually multiple possible futures given the same state . To accurately model this diversity , we define a latent code z to represent different intents of the predicted agent inspired by literature ( e.g. , ( Tang & Salakhutdinov , 2019 ; Salzmann et al. , 2020 ) ) . We denote the input state as x , a local map as m , and the corresponding ground truth future as ygt . The possible behaviors are modeled by the distribution of latent code z conditioned on the input state and the map P ( z|x , m ) . Then , the predicted trajectory distribution is calculated by conditioning on both input state and the latent code P ( y|z , x , m ) . For motion forecasting tasks , we use maximum likelihood estimation ( MLE ) loss on the ground truth future as the learning objective L = − log P ( ygt|x , m ) . Note that we do not have the label for the latent code z in the dataset . Similar to ( Tang & Salakhutdinov , 2019 ; Salzmann et al. , 2020 ) , we represent latent code as a discrete random variable . The learning objective can be rewritten as follows . L = − log P ( ygt|x , m ) = − log ∑ i [ P ( zi|x , m ) P ( ygt|zi , x , m ) ] ( 1 ) Hence , we obtain an unsupervised latent code z that captures some uncertainty of the future without knowing its label . The distribution P ( z|x , m ) can be modeled by any model that outputs a categorical distribution . P ( y|z , x , m ) is usually modeled by models that output multivariate Gaussian distribution . An overview of our model can be found in Fig.1 . It consists of two sub-networks , a generator module and a discriminator module described in the following paragraphs . Generator The generator is the prediction model that produces the future trajectory distribution P ( y|x , m ) given agent states x and a local map m. As the possible future is multi-modal , the output distribution should model this uncertainty . As we discussed earlier , we model distribution P ( z|x , m ) and P ( y|z , x , m ) by neural networks . We use a discrete random variable to represent the latent code z . The uncertainty of the future trajectory can be factorized hierarchically into intent uncertainty and control uncertainty ( Chai et al. , 2019 ) . The intent uncertainty reflects different intents or behavior modes of the agent . Furthermore , the control uncertainty covers other minor noise . As the simple Gaussian distribution P ( y|z , x , m ) is not expressive enough to model the complex uncertainty of multi-modal behaviors , this framework encourages the latent code distribution P ( z|x , m ) to cover more the intent uncertainty . We denote the modules that generate the latent code distribution and the trajectory distribution as encoder Encθ and decoder Decφ with parameter θ and φ , respectively . In addition , Encθ also encodes agent states x and the local map m into a feature vector e , which is part of the decoder ’ s input . Note that our method does not introduce further restrictions for the model structure . Any model that fits this framework can be used as our generator like MFP ( Tang & Salakhutdinov , 2019 ) and Trajectron++ ( Salzmann et al. , 2020 ) . In our experiments , we select Trajectron++ as our generator . Its original learning objective Ltraj++ is shown in Appx.B . In summary , the process of the generator can be represented by the following equations . P ( z|x , m ) , e = Encθ ( x , m ) ẑ ∼ P ( z|x , m ) ( 2 ) P ( y|ẑ , x , m ) = Decφ ( ẑ , e ) Discriminator The discriminator Disψ with parameters ψ takes either a real trajectory ygt or a generated one ŷ sampled from our predicted distribution together with the local map m as input to judge whether the trajectory is real or generated following GAN framework ( Goodfellow et al. , 2014 ) . This helps the decoder inject map information into the learning signal and alleviate the violation of road boundaries in prediction . Besides , we add a classification head to the discriminator . When the input data is generated , this head needs to recognize the latent code ẑ the generator used for creating the input trajectory . In this way , the generator is forced to increase the difference among latent codes and give us more distinct and semantically meaningful driving strategies . This is further discussed in the following paragraphs . The following equation describes the function of our discriminator . D ( y ) , P ( z|y , m ) = Disψ ( y , m ) ( 3 ) Trajectory y is either the ground truth future ygt or the sample from predicted trajectory distribution ŷ . D ( y ) is the score to indicate whether y is real or synthetic . P ( z|y , m ) is the classified distribution . Our discriminator is modified from the one in DCGAN ( Radford et al. , 2015 ) by adding a fully-connected classification head at the end to classify the latent code . Trajectories y are transformed into the format that convolutional layers can handle via differentiable rasterizer trick ( Wang et al. , 2020 ) and stacked together with the local map m as the input for the discriminator as described in Appx.B . Learning Methods Our architecture can be trained by a GAN learning objective , together with the original learning loss of the generator module depends on the model we choose to combine with . To learn a better behavior representation and improve the quality of predicted trajectory distribution , we introduce two new methods Classified latent Intent Behavior and Hallucinative Latent Intent for training . Algorithm 1 : Training Process Initialize EncθE , DecθD , Disφ ; Initialize learning rate α , β ; while not converge do // discriminator ygt , x ∼ Dataset Sample normal prediction ŷ LD = ( 1−D ( ygt ) ) 2+ ( D ( ŷ ) ) 2+Lc φ = φ− α∇φLD // generator , x ∼ Dataset Generate hallucinated trajectory ŷh ∼ P ( y|ẑh , x , m ) LG , c = ( D ( ŷ ) − 1 ) 2 + Lc LG , h = ( D ( ŷh ) − 1 ) 2 + Lh θ = θ− β∇θ ( λLG , c + ( 1− λ ) LG , h ) ygt , x ∼ Dataset θ = θ − β∇θ ( Ltraj++ ) // Trajectron++ loss end Classified latent Intent Behavior In the real world , humans can recognize different behavior intents by looking at the trajectories . To encourage the latent code to contain more information about the intent uncertainty and less about the control uncertainty , we mimic this phenomenon and let the discriminator classify the latent code behind the generated trajectories . The classification function can be trained by a cross-entropy loss . Lc = − ∑ i ẑi log z̃i , where ẑ ∼ P ( z|x , m ) ( 4 ) zi denotes the i-th dimension of the vector z. ẑ is the latent code under the input trajectory , which is a one-hot vector sampled from the multinoulli distribution P ( z|x , m ) . z̃ denotes the classified categorical distribution generated by our discriminator . Minimizing this loss encourages the decoder to widen the difference among predictions from different z to reduce the classification difficulty for the discriminator . Therefore , we reduce the overlap among output distributions from different latent codes and sharpen them to increase accuracy . Since our model is trained to classify trajectory into ẑ , we name ẑ classified intent . Note that this loss is only applied for generated trajectories since we do not have the latent code for ground truth trajectory . Hallucinative Learning Latent codes z are trained to model intents in the training data . Each predicted trajectory ŷ is calculated from single latent code ẑ for all the prediction steps . Assume the predicted horizon is T , ŷ = [ ŷ1 , ŷ2 , ... , ŷT ] , ŷ∗ at each step is generated conditioned on the same ẑ . And our discriminator is trained to recognize ẑ given the synthetic trajectory ŷ by the classification loss . Besides , the MLE loss encourages synthetic trajectories to be similar to the training data . Therefore , the discriminator implicitly classifies the training data into one of the latent code z . We propose a novel way to utilize this property and learn beyond the training data by encouraging the model to generate trajectories from unfamiliar driving behaviors . This is done by first sampling a second different latent code ẑ′ in addition to the original one ẑ and randomly selecting a time step th . The prediction until time step th in this case ( [ ŷ1 , ... , ŷth ] ) is conditioned on the first latent code ẑ and we switch to ẑ′ for the remaining steps ( [ ŷth+1 , ... , ŷT ] ) . By this way , we hallucinate a new intent by stacking 2 learned intents in the temporal dimension . We denote this mixed hallucinated intent as ẑh and name it hallucinated intent . The predicted distribution from such a intent is denoted as P ( y|ẑh , x , m ) . We aim to encourage the hallucinative trajectories ŷh to be plausible but different from the training data . To achieve this , we minimize the cross entropy between the uniform distribution and our intent class distribution . Lh = − ∑ i 1 N log z̃i ( 5 ) N indicates the number of latent codes . z̃i is the i-th dimention of the classified distribution z̃ . It encourages the hallucinative trajectory to be hard to be classified into any latent code z , and therefore , to be different from the training data . The plausibility of the hallucinative trajectory is encouraged by the additional GAN loss . In this way , we implicitly apply data augmentation in the latent space to train a more powerful discriminator and improve the generator prediction quality . We call this method hallucinative learning inspired from literature ( e.g. , Hariharan & Girshick ( 2017 ) ) . Training We use LSGAN ( Mao et al. , 2017 ) loss with spectral normalization ( Miyato et al. , 2018 ) as our GAN learning objective . We also keep the original Trajectron++ learning loss Ltraj++ to maintain the performance in case Trajectron++ is our generator . The combination of GAN learning , training of the original generator , classified latent intent behavior , and hallucinative learning is demonstrated in Alg.2 ( Detailed version in Appx.F ) . We use a hyperparameter λ to balance the training between classification learning and hallucinative learning for the generator by adjusting the weighting of the learning loss . | The present work considers the problem of multi-agent trajectory prediction. Its main contribution is incorporating generative augmentation losses for improving the quality of a trajectory predictor. This is achieved by allowing trajetcory predictors to model intent as an unobserved latent variable in the model and using this to generate trajectories corresponding to different intentions. The work also proposes to use a descriminative loss encouraging diversity of the intents and an additional "hallucination" loss that allows for modelling mixed intents. | SP:202c1ae8c7f18f8cc234f8c8cc5d9f89ae9f43d0 |
HalentNet: Multimodal Trajectory Forecasting with Hallucinative Intents | 1 INTRODUCTION . The ability to forecast trajectories of dynamic agents is essential for a variety of autonomous systems such as self-driving vehicles and social robots . It enables an autonomous system to foresee adverse situations and adjust motion planning accordingly to prefer better alternatives . Because agents can make different decisions at any given time , future motion distribution is inherently multi-modal . Due to incomplete coverage of different modes in real data and interacting agents ’ combinatorial nature , trajectory forecasting is challenging . Several existing works focus on formulating the multi-modal future prediction only from training data ( e.g. , ( Tang & Salakhutdinov , 2019 ; Alahi et al. , 2016 ; Casas et al. , 2019 ; Deo & Trivedi , 2018 ; Sadeghian et al. , 2018 ; Casas et al. , 2019 ; Salzmann et al. , 2020 ) ) . This severely limits the ability of these models to predict modes that are not covered beyond the training data distribution , and some of these learned modes could be spurious especially where the real predictive spaces are not or inadequately covered by the training data . To improve the multimodal prediction quality , our goal is to enrich the coverage of these less explored spaces , while encouraging plausible behavior . Properly designing this exploratory learning process for motion forecasting as an implicit data augmentation approach is at the heart of this paper . ∗Work done prior to Amazon . Most data augmentation methods are geometric and operate on raw data . They also have been mostly studied on discrete label spaces like classification tasks ( e.g. , ( Zhang et al. , 2017 ; Yun et al. , 2019 ; Wang et al. , 2019 ; Cubuk et al. , 2019 ; Ho et al. , 2019 ; Antoniou et al. , 2017 ; Elhoseiny & Elfeki , 2019 ; Mikołajczyk & Grochowski , 2019 ; Ratner et al. , 2017 ) ) . In contrast , we focus on a multi-agent future forecasting task where label space for each agent is spatial-temporal . To our knowledge , augmentation techniques are far less explored for this task . Our work builds on recent advances in trajectory prediction problem ( e.g. , Tang & Salakhutdinov ( 2019 ) ; Salzmann et al . ( 2020 ) ) , that leverage discrete latent variables to represent driving behavior/intents ( e.g . Turn left , speed up ) . Inspired by these advances , we propose HalentNet , a sequential probabilistic latent variable generative model that learns from both real and implicitly augmented multi-agent trajectory data . More concretely , we model driving intents with discrete latent variables z . Then , our method hallucinates new intents by mixing different discrete latent variables up in the temporal dimension to generate trajectories that are realistic-looking but different from training data judged by discriminator Dis to implicitly augment the behaviors/intents . The nature of our augmentation approach is different from existing methods since it operates on the latent space that represents the agent ’ s behavior . The training of these latent variables is guided by a collaboration between discriminative and hallucinative learning signals . The discriminative loss increases the separation between intent modes ; we impose this as a classification loss that recognizes the one-hot latent intents corresponding to the predicted trajectories . We call these discriminative latent intents as classified intents since they are easy to classify to an existing one-hot latent intent ( i.e. , low entropy ) . This discriminative loss expands the predictive intent space that we then encourage to explore by our hallucinated intents ’ loss . As we detail later , we define hallucinated intents as a mixture of the one-hot classified latent intents . We encourage the predictions of trajectories corresponding to hallcuinated intents to be hard to classify to the one-hot discrete latent intents by hallucinative loss but , in the meantime , be realistic with a real/fake loss that we impose . The classification , hallucinative , and real/fake losses are all defined on top of a Discriminator Dis , whose input is the predicted motion trajectories and the map information . We show that all these three components are necessary to achieve good performance , where we also ablate our design choices . Our contributions are summarized as follows . • We introduce a new framework that enables multi-modal trajectory forecasting to learn dynamically complementary augmented agent behaviors . • We introduce the notion of classified intents and hallucinated intents in motion forecasting that can be captured by discrete latent variables z . We introduce two complementary learning mechanism for each to better model latent behavior intentions and encourage the novelty of augmented agent behaviors and hence improve the generalization . The classified intents ẑ is defined not to change over time and are encouraged to be well separated from other classified intents with a classification loss . The hallucinated intents ẑh , on the other hand , changes over the prediction horizon and are encouraged to deviate from the classified intents as augmented agent behaviors . • Our experiments demonstrate at most 26 % better results measured by average FDE compared to other state-of-the-art methods on motion forecasting datasets , which verifies the effectiveness of our methods . We also conducted human evaluation experiments showing that our forecasted motion is considered 39 % safer than the runner-up approach . Codes , pretrained models and preprocessed datasets are available at https : //github.com/ Vision-CAIR/HalentNet 2 RELATED WORK . Trajectory Forecasting Trajectory forecasting of dynamic agents has received increasing attention recently because it is a core problem to a number of applications such as autonomous driving and social robots . Human motion is inherently multi-modal , recent work ( Lee et al. , 2017 ; Cui et al. , 2018 ; Chai et al. , 2019 ; Rhinehart et al. , 2019 ; Kosaraju et al. , 2019 ; Tang & Salakhutdinov , 2019 ; Ridel et al. , 2020 ; Salzmann et al. , 2020 ; Huang et al. , 2019 ; Mercat et al. , 2019 ) has focused on learning the distribution from multi-agent trajectory data . ( Cui et al. , 2018 ; Chai et al. , 2019 ; Ridel et al. , 2020 ; Mercat et al. , 2019 ) predicts multiple future trajectories without learning low dimensional latent agent behaviors . ( Lee et al. , 2017 ; Kosaraju et al. , 2019 ; Rhinehart et al. , 2019 ; Huang et al. , 2019 ) encodes agent behaviors in continuous low dimensional latent space while ( Tang & Salakhutdinov , 2019 ; Salzmann et al. , 2020 ) uses discrete latent variables . Discrete latent variables succinctly capture semantically meaningful modes such as turn left , turn right . ( Tang & Salakhutdinov , 2019 ; Salzmann et al. , 2020 ) learns discrete latent variables without explicit labels . Built on top of these recent work , we hallucinate possible future behaviors by changing agent intents . As the forecast horizon is a few seconds , these are highly plausible . We use a discriminator to encourage augmented trajectories to look real . Data augmentation Data augmentation is a popular technique to mitigate overfitting and improve generalization in training deep networks ( Shorten & Khoshgoftaar , 2019 ) . New data is typically generated by transforming real data samples in the original input space . These transformations range from simple techniques ( e.g . random flipping , mirroring for images , mixup ( Zhang et al. , 2017 ) and Cutmix ( Yun et al. , 2019 ) ) to automatic data augmentation techniques ( e.g . AutoAugment ( Cubuk et al. , 2019 ) ) and class-identity preserving semantic data augmentation techniques ( Ratner et al. , 2017 ) ( e.g . changing backgrounds of objects ) . Recently data augmentation via semantic transformation in deep feature space ( Liu et al. , 2018 ; Wang et al. , 2019 ; Li et al. , 2020a ) has also been proposed . ISDA ( Wang et al. , 2019 ) proposes a loss function to implicitly translate training samples along with semantic directions in the feature space . For example , a certain direction corresponds to the semantic translation of ” make-bespectacled. ” When a person ’ s feature without glasses is translated along this direction , the new feature may correspond to the same person but with glasses . MoEx ( Li et al. , 2020a ) proposes a new augmentation method that leverages the first and second moments extracted and re-injected by feature normalization . Specifically , it replaces the moments of the learned features of one training image by those of another and interpolates the target labels . Our data augmentation is also in the latent space , which represents agent behavior . Imaginative/Hallucinative models . GANs ( Goodfellow et al. , 2014 ; Radford et al. , 2015 ) are a powerful generative model , yet they are not explicitly trained to go beyond the training data to improve generalization . Inspired by the theory of human creativity ( Martindale , 1990 ) , recent approaches on generative models were proposed to encourage novel visual content generation in art and fashion designs . In ( Elgammal et al. , 2017 ) , the authors adapted GANs to generate unconditional creative content ( paintings ) by encouraging the model to deviate from existing painting styles . In the fashion domain , ( Sbai et al. , 2018 ) showed that their model is capable of producing a non-existing shape like “ pants to extended arm sleeves ” that some designers found interesting . The key mechanism in these methods is the addition of a deviation loss , which encourages the generator to produce novel content . More recently , ( Elhoseiny & Elfeki , 2019 ) proposed a method for understanding unseen classes , also known as zero-shot learning ( ZSL ) , by generating visual representations of synthesized unseen class descriptors . These visual representations are encouraged to deviate from seen classes , leading to better generalization compared to earlier generative ZSL methods . ( Zhang et al. , 2019 ) and ( Li et al. , 2020b ) introduced methods to generate additional data based on saliency maps and adversarial learning for few-shot learning task , respectively . In the field of navigation , ( Xiao et al. , 2020a ) and ( Xiao et al. , 2020b ) utilized geometric information to hallucinate new navigation training data . In contrast to these earlier methods , our work has two key differences . First , our work is a sequential probabilistic generative model focusing on motion forecasting requiring time-series prediction in continuous space . Second , the deviation signal in ( Elgammal et al. , 2017 ; Sbai et al. , 2018 ; Elhoseiny & Elfeki , 2019 ) is based on defining labeled discrete seen styles and seen classes , respectively . In contrast , we model the deviation from a discrete latent space guided by a deviation signal to help the model imagine driver intents without supervision signal . Similar to MoEx ( Li et al. , 2020a ) , augmented trajectories are dynamically generated during training . We believe we are the first to propose a data augmentation method in latent space for trajectory forecasting . 3 METHOD . Problem Formulation We are aiming at predicting the future trajectory ygt of a specified agent given the input states x , which contains the historical information like positions and heading angles of the agent itself and the surrounding agents , and a semantic map patch m , which offers context information like drivable region , by generating a distribution P ( y|x , m ) to model the distribution of real future trajectory ygt . Our Model Motion forecasting in the real world is a multi-modal task . There are usually multiple possible futures given the same state . To accurately model this diversity , we define a latent code z to represent different intents of the predicted agent inspired by literature ( e.g. , ( Tang & Salakhutdinov , 2019 ; Salzmann et al. , 2020 ) ) . We denote the input state as x , a local map as m , and the corresponding ground truth future as ygt . The possible behaviors are modeled by the distribution of latent code z conditioned on the input state and the map P ( z|x , m ) . Then , the predicted trajectory distribution is calculated by conditioning on both input state and the latent code P ( y|z , x , m ) . For motion forecasting tasks , we use maximum likelihood estimation ( MLE ) loss on the ground truth future as the learning objective L = − log P ( ygt|x , m ) . Note that we do not have the label for the latent code z in the dataset . Similar to ( Tang & Salakhutdinov , 2019 ; Salzmann et al. , 2020 ) , we represent latent code as a discrete random variable . The learning objective can be rewritten as follows . L = − log P ( ygt|x , m ) = − log ∑ i [ P ( zi|x , m ) P ( ygt|zi , x , m ) ] ( 1 ) Hence , we obtain an unsupervised latent code z that captures some uncertainty of the future without knowing its label . The distribution P ( z|x , m ) can be modeled by any model that outputs a categorical distribution . P ( y|z , x , m ) is usually modeled by models that output multivariate Gaussian distribution . An overview of our model can be found in Fig.1 . It consists of two sub-networks , a generator module and a discriminator module described in the following paragraphs . Generator The generator is the prediction model that produces the future trajectory distribution P ( y|x , m ) given agent states x and a local map m. As the possible future is multi-modal , the output distribution should model this uncertainty . As we discussed earlier , we model distribution P ( z|x , m ) and P ( y|z , x , m ) by neural networks . We use a discrete random variable to represent the latent code z . The uncertainty of the future trajectory can be factorized hierarchically into intent uncertainty and control uncertainty ( Chai et al. , 2019 ) . The intent uncertainty reflects different intents or behavior modes of the agent . Furthermore , the control uncertainty covers other minor noise . As the simple Gaussian distribution P ( y|z , x , m ) is not expressive enough to model the complex uncertainty of multi-modal behaviors , this framework encourages the latent code distribution P ( z|x , m ) to cover more the intent uncertainty . We denote the modules that generate the latent code distribution and the trajectory distribution as encoder Encθ and decoder Decφ with parameter θ and φ , respectively . In addition , Encθ also encodes agent states x and the local map m into a feature vector e , which is part of the decoder ’ s input . Note that our method does not introduce further restrictions for the model structure . Any model that fits this framework can be used as our generator like MFP ( Tang & Salakhutdinov , 2019 ) and Trajectron++ ( Salzmann et al. , 2020 ) . In our experiments , we select Trajectron++ as our generator . Its original learning objective Ltraj++ is shown in Appx.B . In summary , the process of the generator can be represented by the following equations . P ( z|x , m ) , e = Encθ ( x , m ) ẑ ∼ P ( z|x , m ) ( 2 ) P ( y|ẑ , x , m ) = Decφ ( ẑ , e ) Discriminator The discriminator Disψ with parameters ψ takes either a real trajectory ygt or a generated one ŷ sampled from our predicted distribution together with the local map m as input to judge whether the trajectory is real or generated following GAN framework ( Goodfellow et al. , 2014 ) . This helps the decoder inject map information into the learning signal and alleviate the violation of road boundaries in prediction . Besides , we add a classification head to the discriminator . When the input data is generated , this head needs to recognize the latent code ẑ the generator used for creating the input trajectory . In this way , the generator is forced to increase the difference among latent codes and give us more distinct and semantically meaningful driving strategies . This is further discussed in the following paragraphs . The following equation describes the function of our discriminator . D ( y ) , P ( z|y , m ) = Disψ ( y , m ) ( 3 ) Trajectory y is either the ground truth future ygt or the sample from predicted trajectory distribution ŷ . D ( y ) is the score to indicate whether y is real or synthetic . P ( z|y , m ) is the classified distribution . Our discriminator is modified from the one in DCGAN ( Radford et al. , 2015 ) by adding a fully-connected classification head at the end to classify the latent code . Trajectories y are transformed into the format that convolutional layers can handle via differentiable rasterizer trick ( Wang et al. , 2020 ) and stacked together with the local map m as the input for the discriminator as described in Appx.B . Learning Methods Our architecture can be trained by a GAN learning objective , together with the original learning loss of the generator module depends on the model we choose to combine with . To learn a better behavior representation and improve the quality of predicted trajectory distribution , we introduce two new methods Classified latent Intent Behavior and Hallucinative Latent Intent for training . Algorithm 1 : Training Process Initialize EncθE , DecθD , Disφ ; Initialize learning rate α , β ; while not converge do // discriminator ygt , x ∼ Dataset Sample normal prediction ŷ LD = ( 1−D ( ygt ) ) 2+ ( D ( ŷ ) ) 2+Lc φ = φ− α∇φLD // generator , x ∼ Dataset Generate hallucinated trajectory ŷh ∼ P ( y|ẑh , x , m ) LG , c = ( D ( ŷ ) − 1 ) 2 + Lc LG , h = ( D ( ŷh ) − 1 ) 2 + Lh θ = θ− β∇θ ( λLG , c + ( 1− λ ) LG , h ) ygt , x ∼ Dataset θ = θ − β∇θ ( Ltraj++ ) // Trajectron++ loss end Classified latent Intent Behavior In the real world , humans can recognize different behavior intents by looking at the trajectories . To encourage the latent code to contain more information about the intent uncertainty and less about the control uncertainty , we mimic this phenomenon and let the discriminator classify the latent code behind the generated trajectories . The classification function can be trained by a cross-entropy loss . Lc = − ∑ i ẑi log z̃i , where ẑ ∼ P ( z|x , m ) ( 4 ) zi denotes the i-th dimension of the vector z. ẑ is the latent code under the input trajectory , which is a one-hot vector sampled from the multinoulli distribution P ( z|x , m ) . z̃ denotes the classified categorical distribution generated by our discriminator . Minimizing this loss encourages the decoder to widen the difference among predictions from different z to reduce the classification difficulty for the discriminator . Therefore , we reduce the overlap among output distributions from different latent codes and sharpen them to increase accuracy . Since our model is trained to classify trajectory into ẑ , we name ẑ classified intent . Note that this loss is only applied for generated trajectories since we do not have the latent code for ground truth trajectory . Hallucinative Learning Latent codes z are trained to model intents in the training data . Each predicted trajectory ŷ is calculated from single latent code ẑ for all the prediction steps . Assume the predicted horizon is T , ŷ = [ ŷ1 , ŷ2 , ... , ŷT ] , ŷ∗ at each step is generated conditioned on the same ẑ . And our discriminator is trained to recognize ẑ given the synthetic trajectory ŷ by the classification loss . Besides , the MLE loss encourages synthetic trajectories to be similar to the training data . Therefore , the discriminator implicitly classifies the training data into one of the latent code z . We propose a novel way to utilize this property and learn beyond the training data by encouraging the model to generate trajectories from unfamiliar driving behaviors . This is done by first sampling a second different latent code ẑ′ in addition to the original one ẑ and randomly selecting a time step th . The prediction until time step th in this case ( [ ŷ1 , ... , ŷth ] ) is conditioned on the first latent code ẑ and we switch to ẑ′ for the remaining steps ( [ ŷth+1 , ... , ŷT ] ) . By this way , we hallucinate a new intent by stacking 2 learned intents in the temporal dimension . We denote this mixed hallucinated intent as ẑh and name it hallucinated intent . The predicted distribution from such a intent is denoted as P ( y|ẑh , x , m ) . We aim to encourage the hallucinative trajectories ŷh to be plausible but different from the training data . To achieve this , we minimize the cross entropy between the uniform distribution and our intent class distribution . Lh = − ∑ i 1 N log z̃i ( 5 ) N indicates the number of latent codes . z̃i is the i-th dimention of the classified distribution z̃ . It encourages the hallucinative trajectory to be hard to be classified into any latent code z , and therefore , to be different from the training data . The plausibility of the hallucinative trajectory is encouraged by the additional GAN loss . In this way , we implicitly apply data augmentation in the latent space to train a more powerful discriminator and improve the generator prediction quality . We call this method hallucinative learning inspired from literature ( e.g. , Hariharan & Girshick ( 2017 ) ) . Training We use LSGAN ( Mao et al. , 2017 ) loss with spectral normalization ( Miyato et al. , 2018 ) as our GAN learning objective . We also keep the original Trajectron++ learning loss Ltraj++ to maintain the performance in case Trajectron++ is our generator . The combination of GAN learning , training of the original generator , classified latent intent behavior , and hallucinative learning is demonstrated in Alg.2 ( Detailed version in Appx.F ) . We use a hyperparameter λ to balance the training between classification learning and hallucinative learning for the generator by adjusting the weighting of the learning loss . | The paper designed a framework for motion forecasting (trajectory prediction), with emphasis on multimodal distribution modeling and generalization. Specifically, they use latent code to model agent's intents. This latent code combined with historical trajectories and map were used to generate future trajectories, which were further judged by a discriminator. Besides, they added latent code classification and hallucinative data augmentation for performance boosting. | SP:202c1ae8c7f18f8cc234f8c8cc5d9f89ae9f43d0 |
A Primal Approach to Constrained Policy Optimization: Global Optimality and Finite-Time Analysis | √ T ) convergence rate to the global optimal policy in the constrained policy set and an O ( 1/ √ T ) error bound on constraint satisfaction . This is the first finite-time analysis of SRL algorithms with global optimality guarantee . Our empirical results demonstrate that CRPO can outperform the existing primal-dual baseline algorithms significantly . 1 INTRODUCTION . Reinforcement learning ( RL ) has achieved great success in solving complex sequential decisionmaking and control problems such as Go Silver et al . ( 2017 ) , StarCraft DeepMind ( 2019 ) and recommendation system Zheng et al . ( 2018 ) , etc . In these settings , the agent is allowed to explore the entire state and action space to maximize the expected total reward . However , in safe RL , in addition to maximizing the reward , an agent needs to satisfy certain constraints . Examples include self-driving cars Fisac et al . ( 2018 ) , cellular network Julian et al . ( 2002 ) , and robot control Levine et al . ( 2016 ) . One standard model for safe RL is constrained Markov Decision Process ( CMDP ) Altman ( 1999 ) , which further requires the policy to satisfy the constraints on a number of accumulated costs . The global optimal policy in this setting is the one that maximizes the reward and at the same time satisfies the cost constraints . In general , it is very challenging to find the global optimal policy in CMDP , as both the objective and constraints are nonconvex functions . A commonly used approach to solve CMDP is the primal-dual method Chow et al . ( 2017 ) ; Tessler et al . ( 2018 ) ; Ding et al . ( 2020a ) ; Stooke et al . ( 2020 ) , in which the constrained problem is converted to an unconstrained one by augmenting the objective with a sum of constraints weighted by their corresponding Lagrange multipliers . Usually , Lagrange multipliers are updated in the dual space concurrently Tessler et al . ( 2018 ) . Although it has been observed that primal-dual methods always converge to the feasible set in the end Ray et al . ( 2019 ) , such an approach is sensitive to the initialization of Lagrange multipliers and the learning rate , thus can incur extensive cost in hyperparameter tuning Achiam et al . ( 2017 ) ; Chow et al . ( 2019 ) . Another baseline approach is constrained policy optimization ( CPO ) , in which a linearized constrained problem is solved from scratch at each iteration to obtain the policy in the next step . However , a successful implementation of CPO requires a feasible initialization , which by itself can be very difficult especially with multiple constraints Ray et al . ( 2019 ) . Other approaches such as Lyapunov method Chow et al . ( 2018 ; 2019 ) , safety layer method Dalal et al . ( 2018a ) and interior point method Liu et al . ( 2019b ) have also been proposed recently . However , these methods do not have clear guidance in hyperparameter tuning , and thus suffer from nontrivial cost to implement in practice Stooke et al . ( 2020 ) . Thus , one goal here is to design an easy-to-implement SRL algorithm that enjoys the ease as uncontrained problems and readily approaches feasible points from random initialization . In contrast to the extensive empirical studies of SRL algorithms , theoretical understanding of the convergence properties of SRL algorithms is very limited . Tessler et al . ( 2018 ) provided an asymptotic convergence analysis for primal-dual method and established a local convergence guarantee under certain stability assumptions . Paternain et al . ( 2019 ) showed that the primal-dual method achieves zero duality gap , which can imply the global optimality under certain assumptions . Recently , Ding et al . ( 2020a ) proposed a primal-dual type proximal policy optimization ( PPO ) and established the regret bound for linear CMDP . The convergence rate of primal-dual method is characterized in a concurrent work Ding et al . ( 2020b ) . So far , there exist no primal-type SRL algorithms that have been shown to enjoy global optimality guarantee under general CMDP . Further , the finite-time performance ( convergence rate ) has not been characterized for any primal-type SRL algorithm . Thus , the second goal here is to establish global optimality guarantee and the finite-time convergence rate for the proposed algorithm under general CMDP . 1.1 MAIN CONTRIBUTIONS . We propose a novel Constraint-Rectified Policy Optimization ( CRPO ) approach for CMDP , where all updates are taken in the primal domain . CRPO applies unconstrained policy maximization update w.r.t . the reward on the one hand , and if any constraint is violated , momentarily rectifies the policy back to the feasible set along the descent direction of the violated constraint also by applying unconstrained policy minimization update w.r.t . the constraint function . Hence , CRPO can be implemented as easy as unconstrained policy optimization algorithms . It does not introduce heavy hyperparameter tuning to enforce constraint satisfaction , nor does it require initialization to be feasible . CRPO provides a primal-type framework for solving SRL problems , and its optimization update can adopt various well-developed unconstrained policy optimization methods such as natural policy gradient ( NPG ) Kakade ( 2002 ) , trust region policy optimization ( TRPO ) Schulman et al . ( 2015 ) , PPO , etc . To provide the theoretical guarantee for CRPO , we adopt NPG as a representative optimizer and investigate the convergence of CRPO in two settings : tabular and function approximation , where in the function approximation setting the state space can be infinite . For both settings , we show that CRPO converges to a global optimum at a convergence rate ofO ( 1/ √ T ) . Furthermore , the constraint satisfaction error converges to zero at a rate of O ( 1/ √ T ) . To the best of our knowledge , CRPO is the first primal-type SRL algorithm that has provably global optimality guarantee . This work also provides the first finite-time analysis for SRL algorithm without restrictive assumptions on CMDP . Our experiments demonstrate that CRPO outperforms the baseline primal-dual algorithm with higher return reward and smaller constraint satisfaction error . 1.2 RELATED WORK . Safe RL and CMDP : Algorithms based on primal-dual methods have been widely adopted for solving constrained RL problems , such as PDO Chow et al . ( 2017 ) , RCPO Tessler et al . ( 2018 ) , OPDOP Ding et al . ( 2020a ) and CPPO Stooke et al . ( 2020 ) . The effectiveness of primal-dual methods is justified in Paternain et al . ( 2019 ) , in which zero duality gap is guaranteed under certain assumptions . Constrained policy optimization ( CPO ) Achiam et al . ( 2017 ) extends TRPO to handle constraints , and is later modified with a two-step projection method Yang et al . ( 2019a ) . Other methods have also been proposed . For example , Chow et al . ( 2018 ; 2019 ) leveraged Lyapunov functions to handle constraints . Yu et al . ( 2019 ) proposed a constrained policy gradient algorithm with convergence guarantee by solving a sequence of sub-problems . Dalal et al . ( 2018a ) proposed to add a safety layer to the policy network so that constraints can be satisfied at each state . Liu et al . ( 2019b ) developed an interior point method for safe RL , which augments the objective with logarithmic barrier functions . This paper proposes a CRPO algorithm , which can be implemented as easy as unconstrained policy optimization methods and has global optimality guarantee under general CMDP . Finite-Time Analysis of Policy Optimization : The finite-time analysis of various policy optimization algorithms have been well studied . The convergence rate of policy gradient ( PG ) and actor-critic ( AC ) algorithms have been established in Shen et al . ( 2019 ) ; Papini et al . ( 2017 ; 2018 ) ; Xu et al . ( 2020a ; 2019 ) ; Xiong et al . ( 2020 ) ; Zhang et al . ( 2019 ) and Xu et al . ( 2020b ) ; Wang et al . ( 2019 ) ; Yang et al . ( 2019b ) ; Kumar et al . ( 2019 ) ; Qiu et al . ( 2019 ) , respectively , in which PG or AC algorithm is shown to converge to a local optimal . In some special settings such as tabular and LQR , PG and AC can be shown to convergence to the global optimal Agarwal et al . ( 2019 ) ; Yang et al . ( 2019b ) ; Fazel et al . ( 2018 ) ; Malik et al . ( 2018 ) ; Tu & Recht ( 2018 ) ; Bhandari & Russo ( 2019 ; 2020 ) . Algorithms such as NPG , NAC , TRPO and PPO explore the second order information , and achieve great success in practice . These algorithms have been shown to converge to a global optimum in various settings , where the convergence rate has been established in Agarwal et al . ( 2019 ) ; Shani et al . ( 2019 ) ; Liu et al . ( 2019a ) ; Wang et al . ( 2019 ) ; Cen et al . ( 2020 ) ; Xu et al . ( 2020c ) . However , all the above studies only consider unconstrained MDP . A concurrent and independent work Ding et al . ( 2020b ) established the global convergence rate of primal-dual method for CMDP under weak Slater ’ s condition assumption . So far the finite-time performance of primal-type policy optimization in general CMDP settings has not been studied . Our work is the first one that establishes such a result . 2 PROBLEM FORMULATION AND PRELIMINARIES . 2.1 MARKOV DECISION PROCESS . A discounted Markov decision process ( MDP ) is a tuple ( S , A , c0 , P , ξ , γ ) , where S and A are state and action spaces ; c0 : S×A×S → R is the reward function ; P : S×A×S → [ 0 , 1 ] is the transition kernel , with P ( s′|s , a ) denoting the probability of transitioning to state s′ from previous state s given action a ; ξ : S → [ 0 , 1 ] is the initial state distribution ; and γ ∈ ( 0 , 1 ) is the discount factor . A policy π : S → P ( A ) is a mapping from the state space to the space of probability distributions over the actions , with π ( ·|s ) denoting the probability of selecting action a in state s. When the associated Markov chain P ( s′|s ) = ∑ A P ( s ′|s , a ) π ( a|s ) is ergodic , we denote µπ as the stationary distribution of this MDP , i.e . ∫ S P ( s ′|s ) µπ ( ds ) = µπ ( s′ ) . Moreover , we define the visitation measure induced by the police π as νπ ( s , a ) = ( 1− γ ) ∑∞ t=0 γ tP ( st = s , at = a ) . For a given policy π , we define the state value function as V 0π ( s ) = E [ ∑∞ t=0 γ tc0 ( st , at , st+1 ) |s0 = s , π ] , the state-action value function as Q0π ( s , a ) = E [ ∑∞ t=0 γ tc0 ( st , at , st+1 ) |s0 = s , a0 = a , π ] , and the advantage function as A0π ( s , a ) = Q 0 π ( s , a ) − V 0π ( s ) . In reinforcement learning , we aim to find an optimal policy that maximizes the expected total reward function defined as J0 ( π ) = E [ ∑∞ t=0 γ tc0 ( st , at , st+1 ) ] = Eξ [ V 0π ( s ) ] = Eξ·π [ Q0π ( s , a ) ] . | This paper considers safe RL through solving a constrained MDP in (1). The authors proposed a primal method which alternates between maximizing the reward and minimizing the constraint violation. The convergence rate of the algorithm is also provided under standard settings, e.g., bounded reward, iid samples, etc.. Interestingly, the authors also analyzed the case for using a 2-layer neural network (NN) function approximator for the policy and the actor. | SP:49ac2a2ac51be0f41d095bcdf204b6da967b98b2 |
A Primal Approach to Constrained Policy Optimization: Global Optimality and Finite-Time Analysis | √ T ) convergence rate to the global optimal policy in the constrained policy set and an O ( 1/ √ T ) error bound on constraint satisfaction . This is the first finite-time analysis of SRL algorithms with global optimality guarantee . Our empirical results demonstrate that CRPO can outperform the existing primal-dual baseline algorithms significantly . 1 INTRODUCTION . Reinforcement learning ( RL ) has achieved great success in solving complex sequential decisionmaking and control problems such as Go Silver et al . ( 2017 ) , StarCraft DeepMind ( 2019 ) and recommendation system Zheng et al . ( 2018 ) , etc . In these settings , the agent is allowed to explore the entire state and action space to maximize the expected total reward . However , in safe RL , in addition to maximizing the reward , an agent needs to satisfy certain constraints . Examples include self-driving cars Fisac et al . ( 2018 ) , cellular network Julian et al . ( 2002 ) , and robot control Levine et al . ( 2016 ) . One standard model for safe RL is constrained Markov Decision Process ( CMDP ) Altman ( 1999 ) , which further requires the policy to satisfy the constraints on a number of accumulated costs . The global optimal policy in this setting is the one that maximizes the reward and at the same time satisfies the cost constraints . In general , it is very challenging to find the global optimal policy in CMDP , as both the objective and constraints are nonconvex functions . A commonly used approach to solve CMDP is the primal-dual method Chow et al . ( 2017 ) ; Tessler et al . ( 2018 ) ; Ding et al . ( 2020a ) ; Stooke et al . ( 2020 ) , in which the constrained problem is converted to an unconstrained one by augmenting the objective with a sum of constraints weighted by their corresponding Lagrange multipliers . Usually , Lagrange multipliers are updated in the dual space concurrently Tessler et al . ( 2018 ) . Although it has been observed that primal-dual methods always converge to the feasible set in the end Ray et al . ( 2019 ) , such an approach is sensitive to the initialization of Lagrange multipliers and the learning rate , thus can incur extensive cost in hyperparameter tuning Achiam et al . ( 2017 ) ; Chow et al . ( 2019 ) . Another baseline approach is constrained policy optimization ( CPO ) , in which a linearized constrained problem is solved from scratch at each iteration to obtain the policy in the next step . However , a successful implementation of CPO requires a feasible initialization , which by itself can be very difficult especially with multiple constraints Ray et al . ( 2019 ) . Other approaches such as Lyapunov method Chow et al . ( 2018 ; 2019 ) , safety layer method Dalal et al . ( 2018a ) and interior point method Liu et al . ( 2019b ) have also been proposed recently . However , these methods do not have clear guidance in hyperparameter tuning , and thus suffer from nontrivial cost to implement in practice Stooke et al . ( 2020 ) . Thus , one goal here is to design an easy-to-implement SRL algorithm that enjoys the ease as uncontrained problems and readily approaches feasible points from random initialization . In contrast to the extensive empirical studies of SRL algorithms , theoretical understanding of the convergence properties of SRL algorithms is very limited . Tessler et al . ( 2018 ) provided an asymptotic convergence analysis for primal-dual method and established a local convergence guarantee under certain stability assumptions . Paternain et al . ( 2019 ) showed that the primal-dual method achieves zero duality gap , which can imply the global optimality under certain assumptions . Recently , Ding et al . ( 2020a ) proposed a primal-dual type proximal policy optimization ( PPO ) and established the regret bound for linear CMDP . The convergence rate of primal-dual method is characterized in a concurrent work Ding et al . ( 2020b ) . So far , there exist no primal-type SRL algorithms that have been shown to enjoy global optimality guarantee under general CMDP . Further , the finite-time performance ( convergence rate ) has not been characterized for any primal-type SRL algorithm . Thus , the second goal here is to establish global optimality guarantee and the finite-time convergence rate for the proposed algorithm under general CMDP . 1.1 MAIN CONTRIBUTIONS . We propose a novel Constraint-Rectified Policy Optimization ( CRPO ) approach for CMDP , where all updates are taken in the primal domain . CRPO applies unconstrained policy maximization update w.r.t . the reward on the one hand , and if any constraint is violated , momentarily rectifies the policy back to the feasible set along the descent direction of the violated constraint also by applying unconstrained policy minimization update w.r.t . the constraint function . Hence , CRPO can be implemented as easy as unconstrained policy optimization algorithms . It does not introduce heavy hyperparameter tuning to enforce constraint satisfaction , nor does it require initialization to be feasible . CRPO provides a primal-type framework for solving SRL problems , and its optimization update can adopt various well-developed unconstrained policy optimization methods such as natural policy gradient ( NPG ) Kakade ( 2002 ) , trust region policy optimization ( TRPO ) Schulman et al . ( 2015 ) , PPO , etc . To provide the theoretical guarantee for CRPO , we adopt NPG as a representative optimizer and investigate the convergence of CRPO in two settings : tabular and function approximation , where in the function approximation setting the state space can be infinite . For both settings , we show that CRPO converges to a global optimum at a convergence rate ofO ( 1/ √ T ) . Furthermore , the constraint satisfaction error converges to zero at a rate of O ( 1/ √ T ) . To the best of our knowledge , CRPO is the first primal-type SRL algorithm that has provably global optimality guarantee . This work also provides the first finite-time analysis for SRL algorithm without restrictive assumptions on CMDP . Our experiments demonstrate that CRPO outperforms the baseline primal-dual algorithm with higher return reward and smaller constraint satisfaction error . 1.2 RELATED WORK . Safe RL and CMDP : Algorithms based on primal-dual methods have been widely adopted for solving constrained RL problems , such as PDO Chow et al . ( 2017 ) , RCPO Tessler et al . ( 2018 ) , OPDOP Ding et al . ( 2020a ) and CPPO Stooke et al . ( 2020 ) . The effectiveness of primal-dual methods is justified in Paternain et al . ( 2019 ) , in which zero duality gap is guaranteed under certain assumptions . Constrained policy optimization ( CPO ) Achiam et al . ( 2017 ) extends TRPO to handle constraints , and is later modified with a two-step projection method Yang et al . ( 2019a ) . Other methods have also been proposed . For example , Chow et al . ( 2018 ; 2019 ) leveraged Lyapunov functions to handle constraints . Yu et al . ( 2019 ) proposed a constrained policy gradient algorithm with convergence guarantee by solving a sequence of sub-problems . Dalal et al . ( 2018a ) proposed to add a safety layer to the policy network so that constraints can be satisfied at each state . Liu et al . ( 2019b ) developed an interior point method for safe RL , which augments the objective with logarithmic barrier functions . This paper proposes a CRPO algorithm , which can be implemented as easy as unconstrained policy optimization methods and has global optimality guarantee under general CMDP . Finite-Time Analysis of Policy Optimization : The finite-time analysis of various policy optimization algorithms have been well studied . The convergence rate of policy gradient ( PG ) and actor-critic ( AC ) algorithms have been established in Shen et al . ( 2019 ) ; Papini et al . ( 2017 ; 2018 ) ; Xu et al . ( 2020a ; 2019 ) ; Xiong et al . ( 2020 ) ; Zhang et al . ( 2019 ) and Xu et al . ( 2020b ) ; Wang et al . ( 2019 ) ; Yang et al . ( 2019b ) ; Kumar et al . ( 2019 ) ; Qiu et al . ( 2019 ) , respectively , in which PG or AC algorithm is shown to converge to a local optimal . In some special settings such as tabular and LQR , PG and AC can be shown to convergence to the global optimal Agarwal et al . ( 2019 ) ; Yang et al . ( 2019b ) ; Fazel et al . ( 2018 ) ; Malik et al . ( 2018 ) ; Tu & Recht ( 2018 ) ; Bhandari & Russo ( 2019 ; 2020 ) . Algorithms such as NPG , NAC , TRPO and PPO explore the second order information , and achieve great success in practice . These algorithms have been shown to converge to a global optimum in various settings , where the convergence rate has been established in Agarwal et al . ( 2019 ) ; Shani et al . ( 2019 ) ; Liu et al . ( 2019a ) ; Wang et al . ( 2019 ) ; Cen et al . ( 2020 ) ; Xu et al . ( 2020c ) . However , all the above studies only consider unconstrained MDP . A concurrent and independent work Ding et al . ( 2020b ) established the global convergence rate of primal-dual method for CMDP under weak Slater ’ s condition assumption . So far the finite-time performance of primal-type policy optimization in general CMDP settings has not been studied . Our work is the first one that establishes such a result . 2 PROBLEM FORMULATION AND PRELIMINARIES . 2.1 MARKOV DECISION PROCESS . A discounted Markov decision process ( MDP ) is a tuple ( S , A , c0 , P , ξ , γ ) , where S and A are state and action spaces ; c0 : S×A×S → R is the reward function ; P : S×A×S → [ 0 , 1 ] is the transition kernel , with P ( s′|s , a ) denoting the probability of transitioning to state s′ from previous state s given action a ; ξ : S → [ 0 , 1 ] is the initial state distribution ; and γ ∈ ( 0 , 1 ) is the discount factor . A policy π : S → P ( A ) is a mapping from the state space to the space of probability distributions over the actions , with π ( ·|s ) denoting the probability of selecting action a in state s. When the associated Markov chain P ( s′|s ) = ∑ A P ( s ′|s , a ) π ( a|s ) is ergodic , we denote µπ as the stationary distribution of this MDP , i.e . ∫ S P ( s ′|s ) µπ ( ds ) = µπ ( s′ ) . Moreover , we define the visitation measure induced by the police π as νπ ( s , a ) = ( 1− γ ) ∑∞ t=0 γ tP ( st = s , at = a ) . For a given policy π , we define the state value function as V 0π ( s ) = E [ ∑∞ t=0 γ tc0 ( st , at , st+1 ) |s0 = s , π ] , the state-action value function as Q0π ( s , a ) = E [ ∑∞ t=0 γ tc0 ( st , at , st+1 ) |s0 = s , a0 = a , π ] , and the advantage function as A0π ( s , a ) = Q 0 π ( s , a ) − V 0π ( s ) . In reinforcement learning , we aim to find an optimal policy that maximizes the expected total reward function defined as J0 ( π ) = E [ ∑∞ t=0 γ tc0 ( st , at , st+1 ) ] = Eξ [ V 0π ( s ) ] = Eξ·π [ Q0π ( s , a ) ] . | This paper proposes a new method for constrained MDP. The proposed method does not require primal-dual formulation and is easy to implement given the availability of state-of-the-art policy optimization solvers. When the natural policy gradient is used as the policy optimizer, a sublinear global convergence rate is proved for both the tabular setting and the function approximation case. | SP:49ac2a2ac51be0f41d095bcdf204b6da967b98b2 |
Extract Local Inference Chains of Deep Neural Nets | 1 INTRODUCTION . Deep neural networks ( DNNs ) greatly reshape a variety of tasks — object classification , semantic segmentation , natural language processing , speech recognition , robotics , etc . Despite its success on a vast majority of clean data , DNNs are also well-known to be sensitive to small amounts of adversarial noises . The lack of sufficient interpretability about their success or failure is one major bottleneck of applying DNNs to important areas such as medical diagnosis , public health , transportation systems , financial analysis , etc . Interpretable machine learning has attracted growing interest in a variety of areas . The forms of interpretation vary across different methods . For example , attribution methods ( Bach et al. , 2015 ; Sundararajan et al. , 2017 ; Shrikumar et al. , 2017 ; Montavon et al. , 2017 ; Kindermans et al. , 2017 ; Smilkov et al. , 2017 ) produce the importance score of each input feature to the output prediction for an given sample , while some other methods ( Zeiler & Fergus , 2014 ; Simonyan et al. , 2013 ; Erhan et al. , 2009 ) aim to explain the general functionality of each neuron/filter or an individual layer regardless of the input sample . Another line of works ( Ribeiro et al. , 2016 ; Wu et al. , 2018 ; Hou & Zhou , 2018 ) explain DNNs in a local region of data space by training a shallow ( e.g. , linear ) and easily interpretable model to approximate the original DNN on some locally similar samples . Thereby , they reduces the problem to explaining the shallow model . These methods essentially reveal the neuron to neuron correlations ( e.g. , input to output , intermediate layer/neuron to output , etc ) , but they can not provide an overview of the whole inference process occurring inside the complicated structure of DNNs . In this paper , we study a more challenging problem : Can we unveil the major hidden steps of inference in DNNs and present them in a succinct and human-readable form ? Solving this problem helps to answer many significant questions , e.g. , which layer ( s ) /neuron ( s ) plays the most/least im- portant role in the inference process ? Do two similar samples really share most inference steps ? Do all samples need the same number of neurons/layers to locate the key information leading to their correct predictions ? How/when/where does a failure happen during the inference on a DNN ? Which neuron ( s ) /layer ( s ) /feature ( s ) are shared by different samples from the same region even when their labels differ ? Are DNNs using entirely different parts for data from different local regions ? Some of them are related to other problems such as network pruning ( Han et al. , 2015 ; Li et al. , 2016 ) and neural architecture search ( NAS ) ( Zoph & Le , 2017 ) . For example , are winning tickets ( Frankle & Carbin , 2018 ; Liu et al. , 2018 ) universal over different local regions and classes ? Does the weight sharing scheme in recent NAS methods ( Pham et al. , 2018 ; Liu et al. , 2019 ; Ying et al. , 2019 ) limit the searching space or quality ? We develop an efficient tool called NeuroChains to extract the underlying inference chains of a DNN for a given local data region . Specifically , we aim to extract a much smaller sub-network composed of a subset of neurons/filters exactly copied from the original DNN and whose output for data from the local region stays consistent with that of the original DNN . In experiments , we assume the data from the same classes reside in a local region . While the selected filters explain the key information captured by the original DNN when applied to data from the local region , the architecture of the sub-network stitches these information sequentially , i.e. , step by step and layer by layer , and thus recover the major steps of inference that lead to the final outputs . Despite its combinatorial nature , we parameterize the sub-network as the original DNN with an additional score multiplied to each filter/layer ’ s output featuremap . Thereby , we formulate the above problem of sub-network extraction as optimizing a differentiable sparse scoring of all the filters and layers in order to preserve the outputs on all given samples . The above problem can be solved by an efficient back-propagation that only updates the scores with fixed filter parameters . The objective is built upon the Kullback–Leibler ( KL ) divergence between the sub-network ’ s output distribution and that of the original DNN , along with an ` 1 regularization for sparse scores over filters . We further use a sigmoid gate per layer to choose whether removing the entire layer . The gate plays an important role in reducing the sub-network size since most local regions do not rely on all the layers . In practice , we further apply a thresholding to the sparse scores to obtain an even smaller sub-network and employ an additional fine-tuning to the filter scores on the sub-network . We illustrate the subnetwork ’ s architecture and visualize its filters and intermediate-layers ’ featuremaps by exist- ing methods ( Mundhenk et al. , 2019 ; Erhan et al. , 2009 ) . NeuroChains is a novel pruning technique specifically designed for interpreting the local inference chains of DNNs . As aforementioned , it potentially provides an efficient tool to study other problems in related tasks . However , it has several fundamental differences to network pruning and exist- ing interpretation tasks , which deter methods developed for these two problems from addressing our problem . Comparing to network pruning : ( 1 ) fine-tuning is not allowed in NeuroChains ; ( 2 ) it targets a much larger pruning rate for succinct visualization , e.g. , ≥ 95 % for VGG-19 and ≥ 99 % for ResNet-50 on ImageNet with ≤ 200 filters remained ; ( 3 ) it is for data from a local region instead of the whole data distribution . Comparing to mainstream interpretation tasks : ( 1 ) NeuroChains produces an interpretation of the entire inference process in a local region ( which may contain different classes ) rather than of one neuron/filter or output on/around a single sample ; ( 2 ) the sub-network ’ s architecture provides orthogonal information to the importance of individual neurons/filters . 2 RELATED WORKS . Interpretable machine learning methods can be mainly categorized into the ones aiming to evaluate the importance of each input feature of a single sample and the ones explaining individual neurons/filters . Approaches in the first category usually rely on certain back-propagation from the DNN ’ s output to derive an importance score for each input feature or hidden node . Earlier works are based on the back-propagated gradients , e.g. , deconvolution ( Zeiler & Fergus , 2014 ) , backpropagation ( Simonyan et al. , 2013 ) and guided back-propagation ( Springenberg et al. , 2014 ) . Sundararajan et al . ( 2017 ) proposed to ( approximately ) calculate the integral of the gradients along a path between a baseline point and the input sample , which ensures the sensitivity and implementation invariance lacking in some previous methods . More recent methods propose novel backpropagation rules to directly derive the attribution scores of neurons from output to input , e.g. , DeepLIFT ( Shrikumar et al. , 2017 ) , deep Taylor decomposition ( Montavon et al. , 2017 ) , and layerwise relevance propagation ( LRP ) ( Bach et al. , 2015 ) . Methods in the second class treat DNNs as black boxes and seek a simple model to explain how the DNN ’ s output changes in a local region . For example , they add perturbations to different parts of the input to evaluate how the perturbations change the output ( Ancona et al. , 2017 ) , which reflect the importance of different parts . Zeiler & Fergus ( 2014 ) covered different parts of the input image with a gray square , which led to different prediction probabilities on the true class . Instead , Zintgraf et al . ( 2017 ) replaced each patch in the input image with the surrounding patch and tracked the induced changes in the output . In LIME ( Ribeiro et al. , 2016 ) , Ribeiro et al . trained a sparse linear model on noisy input-output pairs as a local surrogate approximating the original DNNs , where the sparse weights are used to explain the importance of input features . As mentioned before , our main difference to the above methods are we explain DNNs for a local region of multiple samples and we further explain how DNNs step by step integrate the information of important filters/neurons . Network pruning ( Han et al. , 2015 ; Li et al. , 2016 ) remove redundant neurons/nodes or connections/weights from a pre-trained DNN and fine-tune the sub-network . Structural pruning removes whole layers/channels/filters/neurons according to a certain norm of the associated weights ( Li et al. , 2016 ) or sparsity ( Hu et al. , 2016 ) . In contrast , Frankle & Carbin ( 2018 ) ; Liu et al . ( 2018 ) prune a DNN during its training . Luo et al . ( 2017 ) apply pruning to two adjacent convolution layers at each time to take the dependency between the two layers into account . Several recent works empirically verify “ lottery ticket hypothesis ” , i.e. , there exists sub-networks ( i.e. , winning tickets ) that can reach comparable generalization performance as the original DNN if re-trained . In contrast , the sub-network extracted by NeuroChains can not be fully re-trained since it has to preserve the original DNN ’ s filters , and our goal is to retain the generalization performance only for a local region . 3 NEUROCHAINS . 3.1 PROBLEM : EXTRACT LOCAL INFERENCE CHAINS AS SUB-NETWORKS . Although the DNNs widely used nowadays are usually composed of hundreds of layers and millions to billions of hidden nodes . When applied to samples from a local region in data space , it is plausible that its inference process mainly relies on a small subset of layers/neurons/filters . In this paper , we verify this conjecture by developing an efficient and practical algorithm , i.e. , NeuroChains , to extract the subset and its underlying architecture as a sub-network whose weights/filters are selected and exactly copied from the original DNN while its outputs in a given local region retain the ones produced by the original DNN . Although DNNs are usually non-smooth in definition if using a nonsmooth piece-wise activation such as ReLU , when trained with the commonly used techniques , e.g. , data augmentation , mix-up , dropout , the resulted DNNs are relatively smooth in a sufficiently small local region . In order to preserve the original inference chains , we do not allow any fine-tuning or re-training on any filter or the the weight vector corresponding to any neuron : they can only be exactly copied from the original DNN . Let F ( · ; { W ` } ` =1 : L ) ( a mapping from input to output ) denote the original DNN , W ` represents the set of filters/weight vectors in layer- ` , and W ` [ i ] represents the ith filter/weight vector in layer- ` . Any sub-network fulfilling our above requirement can be defined and parameterized by an indicator vector M ` per layer , whose each entry is a { 0 , 1 } value indicating whether retaining the associated filter/neuron in W ` . We further define operator ◦ as ( W ` ◦M ` ) [ i ] , { W ` [ i ] , M ` [ i ] = 1 ; 0 , M ` [ i ] = 0 . ( 1 ) Thereby , { M ` } ` =1 : L defines a qualified sub-network for inference chain and its weights are { W ` ◦ M ` } ` =1 : L , where we extend the operator ◦ to make W ◦M = { W ` ◦M ` } ` =1 : L given the original DNN ’ s weights W = { W ` } ` =1 : L. Given a set of samples X drawn from a local region of data space , we can formulate the problem of finding an inference chain as the following combinatorial optimization , which aims to find the most sparse indicator M ( i.e. , the sub-network with the fewest filters retained ) that does not change the outputs of the original DNN for ∀x ∈ X , i.e. , min { M ` } ` =1 : L L∑ ` =1 ‖M ` ‖1 s.t . F ( x ; W ) = F ( x ; W ◦M ) , ∀x ∈ X . ( 2 ) However , directly solving this combinatorial optimization is impractical since the possible choices forM ` is of exponential number . In this paper , we relax the 0-1 indicator vectorM ` to a real-valued score vector S ` of the same size . We define an operator applied to W ` and its associated scores S ` as ( W ` S ` ) [ i ] , S ` [ i ] ·W ` [ i ] . ( 3 ) Note we do not limit entries in S ` within [ 0 , 1 ] due to the possible redundancy among filters in the original DNN , i.e. , there might be filters of similar functionality for the given samples and a preferred pruning should be able to only preserve one of them and multiply it by the number of those redundant filters in the sub-network . In addition , less constrains are easier to handle in optimization and helpful to find sub-network whose outputs are closer to that of the original DNN , since the class of sub-networks with parameters W S includes all the sub-networks with parameters W ◦M . Hence , we relax the challenging combinatorial optimization to the following unconstrained continuous optimization , i.e. , min { S ` } ` =1 : L 1 |X | ∑ x∈X l ( F ( x ; W ) , F ( x ; W S ) ) + λ L∑ ` =1 ‖S ` ‖1 , ( 4 ) where l ( · , · ) is a loss function aiming to minimize the distance between the original DNN ’ s output F ( x ; W ) and the sub-network ’ s output F ( x ; W S ) . In our experiments , for classification , we use KL-divergence between the output distributions over classes , where the two output distributions are computed by applying softmax to F ( x ; W ) and F ( x ; W S ) respectively , i.e. , l ( F ( x ; W ) , F ( x ; W S ) ) = DKL ( softmax ( F ( x ; W ) ) ||softmax ( F ( x ; W S ) ) ) . ( 5 ) In addition , empirical evidences ( Krueger et al. , 2017 ; Singh et al. , 2016 ) show that for most samples there exist some layers that can be entirely removed without changing the final prediction . Hence , only a few hard and confusing samples need more delicate features , while most other samples can be correctly classified based on simple patterns from shallower layers . Therefore , in NeuroChains , we apply a sigmoid function with input score α ` as a gate G ` determining whether removing the entire layer- ` during pruning , i.e. , G ` = 1/ [ 1 + exp ( −α ` /T ) ] , ( 6 ) where T is a temperature parameter . With a gate G ` applied after each layer- ` whose input and output has the same size ( which is common in many DNNs ) , we can recursively define the input H ` +1 ( · ) to the next layer- ( ` + 1 ) , i.e. , H ` +1 ( x ; { W ` ′ S ` ′ , α ` ′ } ` ′=1 : ` ) = { G ` · F ` ( H ` ; W ` S ` ) + ( 1−G ` ) ·H ` ( x ; { W ` ′ S ` ′ , α ` ′ } ` ′=1 : ` −1 ) , if input size = output size F ` ( H ` ; W ` S ` ) otherwise ( 7 ) where F ` ( H ` ; W ` S ` ) denotes the output of layer- ` . The reason to use a gate here is that we expect to either remove the whole layer or retain it without adding an extra shortcut ( which will change the original DNN ’ s architecture ) . We apply a T < 1 to sharpen the gate values . Since we prefer to remove non-informative layers , in the objective , we add another regularization α ` to encourage the removal of entire layers ( because decreasing α reduces G ` and thus increase the chance of layer removal ) . Therefore , the final optimization for NeuroChains is min { S ` , α ` } ` =1 : L 1 |X | ∑ x∈X l ( F ( x ; W ) , HL+1 ( x ; { W ` ′ S ` ′ , α ` ′ } ` ′=1 : L ) ) +λ L∑ ` =1 ‖S ` ‖1+λg L∑ ` =1 α ` , ( 8 ) Our objective above is similar to the one used in Network Slimming ( Liu et al. , 2017 ) but we optimize it for a local region ( so we can consider to remove layers ) and we do not allow fine tuning on weights W . 3.2 ALGORITHM Our algorithm is simply a standard back-propagation for the optimization problem in Eq . ( 8 ) , which produces sparse scores for filters and gate values for layers . Note the weights in W are fixed and the backpropagation only updates S. We initialize the filter scores S = 1 so W S = W at the beginning of optimization . We initialize the gate score α ` = 0 for all ` = 1 : L so G ` = 0.5 at the beginning , i.e. , the probabilities to remove or to retain a layer is equal . For classification , we set loss l ( · , · ) to be the KL-divergence between the output distributions of the original DNN and the sub-network . After convergence of the optimization , we then apply a simple thresholding to these scores to further remove more filters and layers : ( 1 ) we remove the filters with score under a threshold τ ; ( 2 ) we remove layer- ` if G ` < 0.5 . This yields a sufficiently small sub-network architecture but the scores might be sub-optimal in preserving the original DNN ’ s outputs within the local region . Therefore , we further fine-tune the nonzero scores in S ( note filters are always fixed ) , i.e , the scores for the retained filters/layers , by minimizing Eq . ( 8 ) without the two regularizations , if the first term in Eq . ( 8 ) exceeds a threshold t. Given a sub-network produced by NeuroChains , we then visualize its architecture and scores as the structure of the inference chains . Moreover , we visualize the retained filters and layers on the chains by their activation patterns and featuremaps , respectively , using existing interpretation methods ( Mundhenk et al. , 2019 ; Erhan et al. , 2009 ) . | The paper proposes a method called NeuroChains for extracting a sub-network from a deep neural network (DNN) that can accurately match the outputs of the full network for inputs in a small region of the input space. The goal is to be able to explain the important steps that a DNN takes to get from inputs in a small region of the input space, to its predictions for those inputs. NeuroChains initialises the sub-network as the original DNN except each weight/filter is multiplied with a real-valued score. The L1 norm of these scores is minimised while penalising any deviation of the output of the sub-network from the output of the original network. After the minimisation, weights/filters with a score below some threshold value are removed, leaving a sub-network. In the paper there are experiments that aim to verify three claims: (1) NeuroChains can find sub-networks containing less than 5% of the filters in a deep convolutional neural network while preserving its outputs in some small region of the input space; (2) every filter selected by NeuroChains is important for preserving the outputs and removing one of them leads to considerable drop in performance; (3) the sub-networks extracted for small regions of the input space can be generalized to unseen samples in nearby regions. | SP:351f676d2fa2b3b216ed7b5ebbb3b058eef5cb1c |
Extract Local Inference Chains of Deep Neural Nets | 1 INTRODUCTION . Deep neural networks ( DNNs ) greatly reshape a variety of tasks — object classification , semantic segmentation , natural language processing , speech recognition , robotics , etc . Despite its success on a vast majority of clean data , DNNs are also well-known to be sensitive to small amounts of adversarial noises . The lack of sufficient interpretability about their success or failure is one major bottleneck of applying DNNs to important areas such as medical diagnosis , public health , transportation systems , financial analysis , etc . Interpretable machine learning has attracted growing interest in a variety of areas . The forms of interpretation vary across different methods . For example , attribution methods ( Bach et al. , 2015 ; Sundararajan et al. , 2017 ; Shrikumar et al. , 2017 ; Montavon et al. , 2017 ; Kindermans et al. , 2017 ; Smilkov et al. , 2017 ) produce the importance score of each input feature to the output prediction for an given sample , while some other methods ( Zeiler & Fergus , 2014 ; Simonyan et al. , 2013 ; Erhan et al. , 2009 ) aim to explain the general functionality of each neuron/filter or an individual layer regardless of the input sample . Another line of works ( Ribeiro et al. , 2016 ; Wu et al. , 2018 ; Hou & Zhou , 2018 ) explain DNNs in a local region of data space by training a shallow ( e.g. , linear ) and easily interpretable model to approximate the original DNN on some locally similar samples . Thereby , they reduces the problem to explaining the shallow model . These methods essentially reveal the neuron to neuron correlations ( e.g. , input to output , intermediate layer/neuron to output , etc ) , but they can not provide an overview of the whole inference process occurring inside the complicated structure of DNNs . In this paper , we study a more challenging problem : Can we unveil the major hidden steps of inference in DNNs and present them in a succinct and human-readable form ? Solving this problem helps to answer many significant questions , e.g. , which layer ( s ) /neuron ( s ) plays the most/least im- portant role in the inference process ? Do two similar samples really share most inference steps ? Do all samples need the same number of neurons/layers to locate the key information leading to their correct predictions ? How/when/where does a failure happen during the inference on a DNN ? Which neuron ( s ) /layer ( s ) /feature ( s ) are shared by different samples from the same region even when their labels differ ? Are DNNs using entirely different parts for data from different local regions ? Some of them are related to other problems such as network pruning ( Han et al. , 2015 ; Li et al. , 2016 ) and neural architecture search ( NAS ) ( Zoph & Le , 2017 ) . For example , are winning tickets ( Frankle & Carbin , 2018 ; Liu et al. , 2018 ) universal over different local regions and classes ? Does the weight sharing scheme in recent NAS methods ( Pham et al. , 2018 ; Liu et al. , 2019 ; Ying et al. , 2019 ) limit the searching space or quality ? We develop an efficient tool called NeuroChains to extract the underlying inference chains of a DNN for a given local data region . Specifically , we aim to extract a much smaller sub-network composed of a subset of neurons/filters exactly copied from the original DNN and whose output for data from the local region stays consistent with that of the original DNN . In experiments , we assume the data from the same classes reside in a local region . While the selected filters explain the key information captured by the original DNN when applied to data from the local region , the architecture of the sub-network stitches these information sequentially , i.e. , step by step and layer by layer , and thus recover the major steps of inference that lead to the final outputs . Despite its combinatorial nature , we parameterize the sub-network as the original DNN with an additional score multiplied to each filter/layer ’ s output featuremap . Thereby , we formulate the above problem of sub-network extraction as optimizing a differentiable sparse scoring of all the filters and layers in order to preserve the outputs on all given samples . The above problem can be solved by an efficient back-propagation that only updates the scores with fixed filter parameters . The objective is built upon the Kullback–Leibler ( KL ) divergence between the sub-network ’ s output distribution and that of the original DNN , along with an ` 1 regularization for sparse scores over filters . We further use a sigmoid gate per layer to choose whether removing the entire layer . The gate plays an important role in reducing the sub-network size since most local regions do not rely on all the layers . In practice , we further apply a thresholding to the sparse scores to obtain an even smaller sub-network and employ an additional fine-tuning to the filter scores on the sub-network . We illustrate the subnetwork ’ s architecture and visualize its filters and intermediate-layers ’ featuremaps by exist- ing methods ( Mundhenk et al. , 2019 ; Erhan et al. , 2009 ) . NeuroChains is a novel pruning technique specifically designed for interpreting the local inference chains of DNNs . As aforementioned , it potentially provides an efficient tool to study other problems in related tasks . However , it has several fundamental differences to network pruning and exist- ing interpretation tasks , which deter methods developed for these two problems from addressing our problem . Comparing to network pruning : ( 1 ) fine-tuning is not allowed in NeuroChains ; ( 2 ) it targets a much larger pruning rate for succinct visualization , e.g. , ≥ 95 % for VGG-19 and ≥ 99 % for ResNet-50 on ImageNet with ≤ 200 filters remained ; ( 3 ) it is for data from a local region instead of the whole data distribution . Comparing to mainstream interpretation tasks : ( 1 ) NeuroChains produces an interpretation of the entire inference process in a local region ( which may contain different classes ) rather than of one neuron/filter or output on/around a single sample ; ( 2 ) the sub-network ’ s architecture provides orthogonal information to the importance of individual neurons/filters . 2 RELATED WORKS . Interpretable machine learning methods can be mainly categorized into the ones aiming to evaluate the importance of each input feature of a single sample and the ones explaining individual neurons/filters . Approaches in the first category usually rely on certain back-propagation from the DNN ’ s output to derive an importance score for each input feature or hidden node . Earlier works are based on the back-propagated gradients , e.g. , deconvolution ( Zeiler & Fergus , 2014 ) , backpropagation ( Simonyan et al. , 2013 ) and guided back-propagation ( Springenberg et al. , 2014 ) . Sundararajan et al . ( 2017 ) proposed to ( approximately ) calculate the integral of the gradients along a path between a baseline point and the input sample , which ensures the sensitivity and implementation invariance lacking in some previous methods . More recent methods propose novel backpropagation rules to directly derive the attribution scores of neurons from output to input , e.g. , DeepLIFT ( Shrikumar et al. , 2017 ) , deep Taylor decomposition ( Montavon et al. , 2017 ) , and layerwise relevance propagation ( LRP ) ( Bach et al. , 2015 ) . Methods in the second class treat DNNs as black boxes and seek a simple model to explain how the DNN ’ s output changes in a local region . For example , they add perturbations to different parts of the input to evaluate how the perturbations change the output ( Ancona et al. , 2017 ) , which reflect the importance of different parts . Zeiler & Fergus ( 2014 ) covered different parts of the input image with a gray square , which led to different prediction probabilities on the true class . Instead , Zintgraf et al . ( 2017 ) replaced each patch in the input image with the surrounding patch and tracked the induced changes in the output . In LIME ( Ribeiro et al. , 2016 ) , Ribeiro et al . trained a sparse linear model on noisy input-output pairs as a local surrogate approximating the original DNNs , where the sparse weights are used to explain the importance of input features . As mentioned before , our main difference to the above methods are we explain DNNs for a local region of multiple samples and we further explain how DNNs step by step integrate the information of important filters/neurons . Network pruning ( Han et al. , 2015 ; Li et al. , 2016 ) remove redundant neurons/nodes or connections/weights from a pre-trained DNN and fine-tune the sub-network . Structural pruning removes whole layers/channels/filters/neurons according to a certain norm of the associated weights ( Li et al. , 2016 ) or sparsity ( Hu et al. , 2016 ) . In contrast , Frankle & Carbin ( 2018 ) ; Liu et al . ( 2018 ) prune a DNN during its training . Luo et al . ( 2017 ) apply pruning to two adjacent convolution layers at each time to take the dependency between the two layers into account . Several recent works empirically verify “ lottery ticket hypothesis ” , i.e. , there exists sub-networks ( i.e. , winning tickets ) that can reach comparable generalization performance as the original DNN if re-trained . In contrast , the sub-network extracted by NeuroChains can not be fully re-trained since it has to preserve the original DNN ’ s filters , and our goal is to retain the generalization performance only for a local region . 3 NEUROCHAINS . 3.1 PROBLEM : EXTRACT LOCAL INFERENCE CHAINS AS SUB-NETWORKS . Although the DNNs widely used nowadays are usually composed of hundreds of layers and millions to billions of hidden nodes . When applied to samples from a local region in data space , it is plausible that its inference process mainly relies on a small subset of layers/neurons/filters . In this paper , we verify this conjecture by developing an efficient and practical algorithm , i.e. , NeuroChains , to extract the subset and its underlying architecture as a sub-network whose weights/filters are selected and exactly copied from the original DNN while its outputs in a given local region retain the ones produced by the original DNN . Although DNNs are usually non-smooth in definition if using a nonsmooth piece-wise activation such as ReLU , when trained with the commonly used techniques , e.g. , data augmentation , mix-up , dropout , the resulted DNNs are relatively smooth in a sufficiently small local region . In order to preserve the original inference chains , we do not allow any fine-tuning or re-training on any filter or the the weight vector corresponding to any neuron : they can only be exactly copied from the original DNN . Let F ( · ; { W ` } ` =1 : L ) ( a mapping from input to output ) denote the original DNN , W ` represents the set of filters/weight vectors in layer- ` , and W ` [ i ] represents the ith filter/weight vector in layer- ` . Any sub-network fulfilling our above requirement can be defined and parameterized by an indicator vector M ` per layer , whose each entry is a { 0 , 1 } value indicating whether retaining the associated filter/neuron in W ` . We further define operator ◦ as ( W ` ◦M ` ) [ i ] , { W ` [ i ] , M ` [ i ] = 1 ; 0 , M ` [ i ] = 0 . ( 1 ) Thereby , { M ` } ` =1 : L defines a qualified sub-network for inference chain and its weights are { W ` ◦ M ` } ` =1 : L , where we extend the operator ◦ to make W ◦M = { W ` ◦M ` } ` =1 : L given the original DNN ’ s weights W = { W ` } ` =1 : L. Given a set of samples X drawn from a local region of data space , we can formulate the problem of finding an inference chain as the following combinatorial optimization , which aims to find the most sparse indicator M ( i.e. , the sub-network with the fewest filters retained ) that does not change the outputs of the original DNN for ∀x ∈ X , i.e. , min { M ` } ` =1 : L L∑ ` =1 ‖M ` ‖1 s.t . F ( x ; W ) = F ( x ; W ◦M ) , ∀x ∈ X . ( 2 ) However , directly solving this combinatorial optimization is impractical since the possible choices forM ` is of exponential number . In this paper , we relax the 0-1 indicator vectorM ` to a real-valued score vector S ` of the same size . We define an operator applied to W ` and its associated scores S ` as ( W ` S ` ) [ i ] , S ` [ i ] ·W ` [ i ] . ( 3 ) Note we do not limit entries in S ` within [ 0 , 1 ] due to the possible redundancy among filters in the original DNN , i.e. , there might be filters of similar functionality for the given samples and a preferred pruning should be able to only preserve one of them and multiply it by the number of those redundant filters in the sub-network . In addition , less constrains are easier to handle in optimization and helpful to find sub-network whose outputs are closer to that of the original DNN , since the class of sub-networks with parameters W S includes all the sub-networks with parameters W ◦M . Hence , we relax the challenging combinatorial optimization to the following unconstrained continuous optimization , i.e. , min { S ` } ` =1 : L 1 |X | ∑ x∈X l ( F ( x ; W ) , F ( x ; W S ) ) + λ L∑ ` =1 ‖S ` ‖1 , ( 4 ) where l ( · , · ) is a loss function aiming to minimize the distance between the original DNN ’ s output F ( x ; W ) and the sub-network ’ s output F ( x ; W S ) . In our experiments , for classification , we use KL-divergence between the output distributions over classes , where the two output distributions are computed by applying softmax to F ( x ; W ) and F ( x ; W S ) respectively , i.e. , l ( F ( x ; W ) , F ( x ; W S ) ) = DKL ( softmax ( F ( x ; W ) ) ||softmax ( F ( x ; W S ) ) ) . ( 5 ) In addition , empirical evidences ( Krueger et al. , 2017 ; Singh et al. , 2016 ) show that for most samples there exist some layers that can be entirely removed without changing the final prediction . Hence , only a few hard and confusing samples need more delicate features , while most other samples can be correctly classified based on simple patterns from shallower layers . Therefore , in NeuroChains , we apply a sigmoid function with input score α ` as a gate G ` determining whether removing the entire layer- ` during pruning , i.e. , G ` = 1/ [ 1 + exp ( −α ` /T ) ] , ( 6 ) where T is a temperature parameter . With a gate G ` applied after each layer- ` whose input and output has the same size ( which is common in many DNNs ) , we can recursively define the input H ` +1 ( · ) to the next layer- ( ` + 1 ) , i.e. , H ` +1 ( x ; { W ` ′ S ` ′ , α ` ′ } ` ′=1 : ` ) = { G ` · F ` ( H ` ; W ` S ` ) + ( 1−G ` ) ·H ` ( x ; { W ` ′ S ` ′ , α ` ′ } ` ′=1 : ` −1 ) , if input size = output size F ` ( H ` ; W ` S ` ) otherwise ( 7 ) where F ` ( H ` ; W ` S ` ) denotes the output of layer- ` . The reason to use a gate here is that we expect to either remove the whole layer or retain it without adding an extra shortcut ( which will change the original DNN ’ s architecture ) . We apply a T < 1 to sharpen the gate values . Since we prefer to remove non-informative layers , in the objective , we add another regularization α ` to encourage the removal of entire layers ( because decreasing α reduces G ` and thus increase the chance of layer removal ) . Therefore , the final optimization for NeuroChains is min { S ` , α ` } ` =1 : L 1 |X | ∑ x∈X l ( F ( x ; W ) , HL+1 ( x ; { W ` ′ S ` ′ , α ` ′ } ` ′=1 : L ) ) +λ L∑ ` =1 ‖S ` ‖1+λg L∑ ` =1 α ` , ( 8 ) Our objective above is similar to the one used in Network Slimming ( Liu et al. , 2017 ) but we optimize it for a local region ( so we can consider to remove layers ) and we do not allow fine tuning on weights W . 3.2 ALGORITHM Our algorithm is simply a standard back-propagation for the optimization problem in Eq . ( 8 ) , which produces sparse scores for filters and gate values for layers . Note the weights in W are fixed and the backpropagation only updates S. We initialize the filter scores S = 1 so W S = W at the beginning of optimization . We initialize the gate score α ` = 0 for all ` = 1 : L so G ` = 0.5 at the beginning , i.e. , the probabilities to remove or to retain a layer is equal . For classification , we set loss l ( · , · ) to be the KL-divergence between the output distributions of the original DNN and the sub-network . After convergence of the optimization , we then apply a simple thresholding to these scores to further remove more filters and layers : ( 1 ) we remove the filters with score under a threshold τ ; ( 2 ) we remove layer- ` if G ` < 0.5 . This yields a sufficiently small sub-network architecture but the scores might be sub-optimal in preserving the original DNN ’ s outputs within the local region . Therefore , we further fine-tune the nonzero scores in S ( note filters are always fixed ) , i.e , the scores for the retained filters/layers , by minimizing Eq . ( 8 ) without the two regularizations , if the first term in Eq . ( 8 ) exceeds a threshold t. Given a sub-network produced by NeuroChains , we then visualize its architecture and scores as the structure of the inference chains . Moreover , we visualize the retained filters and layers on the chains by their activation patterns and featuremaps , respectively , using existing interpretation methods ( Mundhenk et al. , 2019 ; Erhan et al. , 2009 ) . | The submission considers the task of extracting a small sub-network of a pre-trained neural network that can explain a local region of the data space (a small number of the same classes). The resulting sub-network can be interpreted as the inference path moving from the input to the prediction and the filters and associated weights along this path can be visualised. The key of the proposed approach is to apply a multiplicative weight to each filter and layer in the network and enforce these weights to be sparse. The subnetwork is then selected by thresholding the weights. Some quantitative and qualitative analyses were provided. | SP:351f676d2fa2b3b216ed7b5ebbb3b058eef5cb1c |
MSFM: Multi-Scale Fusion Module for Object Detection | Feature fusion is beneficial to object detection tasks in two folds . On one hand , detail and position information can be combined with semantic information when high and low-resolution features from shallow and deep layers are fused . On the other hand , objects can be detected in different scales , which improves the robustness of the framework . In this work , we present a Multi-Scale Fusion Module ( MSFM ) that extracts both detail and semantical information from a single input but at different scales within the same layer . Specifically , the input of the module will be resized into different scales on which position and semantic information will be processed , and then they will be rescaled back and combined with the module input . The MSFM is lightweight and can be used as a drop-in layer to many existing object detection frameworks . Experiments show that MSFM can bring +2.5 % mAP improvement with only 2.4M extra parameters on Faster R-CNN with ResNet-50 FPN backbone on COCO Object Detection minival set , outperforming that with ResNet-101 FPN backbone without the module which obtains +2.0 % mAP with 19.0M extra parameters . The best resulting model achieves a 45.7 % mAP on test-dev set . Code will be available . 1 INTRODUCTION . Object detection is one of the fundamental tasks in computer vision . It requires the detector to localize the objects in the image using bounding boxes and assign the correct category to each of them . In recent years , deep convolutional neural networks ( CNNs ) have seen great success in object detection , which can be divided into two categories : two-stage detectors , e.g. , Faster R-CNN ( Ren et al. , 2015 ) , and one-stage detectors , e.g. , SSD ( Liu et al. , 2016 ) . Two-stage detectors have high localization and recognition accuracy , while one-stage detectors achieve high inference speed ( Jiao et al. , 2019 ) . A typical two-stage detector consists of a backbone , a neck , a Region Proposal Network ( RPN ) , and a Region of Interest ( ROI ) head ( Chen et al. , 2019 ) . A backbone is a feature extractor usually pre-trained on ImageNet dataset ( Deng et al. , 2009 ) . A neck could be a Feature Pyramid Network ( FPN ) ( Lin et al. , 2017a ) that fuses the features from multiple layers . A RPN proposes candidate object bounding boxes , and a ROI head is for box regression and classification ( Ren et al. , 2015 ) . Compared to two-stage detectors , one-stage detectors propose predicted bounding boxes directly from the input image without the region proposal step , thus being more efficient ( Jiao et al. , 2019 ) . One of the key challenges in object detection is to solve the two subtasks , namely localization and classification , coordinately . Localization requires the network to capture the object position accurately , while classification expects the network to extract the semantic information of the objects . Due to the layered structure of the CNNs , detail and position-accurate information resides in shallow but high-resolution layers ; however , high-level and semantically strong information exists in deep but low-resolution layers ( Long et al. , 2014 ) . Another key challenge is scale invariance that the detector is expected to be capable of handling different object scales ( Liu et al. , 2016 ) . Feature Fusion is beneficial to object detectors in solving the two challenges . On one hand , through multi-layer fusion ( Chen et al. , 2020 ) , detail and position information can be combined with semantic information when high and low-resolution features from shallow and deep layers are fused . On the other hand , by fusing the results from different receptive fields ( Yu & Koltun , 2016 ) or scales ( Li et al. , 2019 ) via dilated convolutions or different kernel sizes ( Szegedy et al. , 2014 ) , objects can be detected in different scales , which improves the robustness of the model . In this paper , we present a Multi-Scale Fusion Module ( MSFM ) that extracts both detail and semantical information from a single input but at different scales within the same layer . Specifically , the input of the module will be resized into different scales on which position and semantic information will be processed , and then they will be rescaled back and combined with the module input . The MSFM is lightweight and can be used as a drop-in layer to many existing object detection frameworks , complementing shallow and deep layers with semantic and position information . Experiments show that MSFM can bring +2.5 % mAP improvement with only 2.4M extra parameters on Faster R-CNN with ResNet-50 FPN backbone on COCO Object Detection ( Lin et al. , 2014 ) minival set , outperforming that with ResNet-101 FPN backbone without the module which obtains +2.0 % mAP with 19.0M extra parameters . When applied on other frameworks , it also shows about +2.0 % mAP improvement , which show its generalizability . The best resulting model achieves a 45.7 % mAP on test-dev set . 2 RELATED WORK . 2.1 MULTI-LAYER FEATURE FUSION . FPN ( Lin et al. , 2017a ) is the de facto multi-layer feature fusion module in modern CNNs to compensate for the position information loss in the deep layer and lack of semantic information in shallow layers . By upsampling the deep features and fusing them with shallow features through a top-down path , it enables the model to coordinate the heterogenous information and enhances the robustness . NAS-FPN ( Ghiasi et al. , 2019 ) designs a NAS ( Zoph & Le , 2017 ) search space that covers all possible cross-layer connections , the result of which is a laterally repeatable FPN structure sharing the same dimensions between its input and output . FPG ( Chen et al. , 2020 ) proposes a multi-pathway feature pyramid , representing the feature scale-space as a regular grid of parallel bottom-up pathways fused by multi-directional lateral connections . EfficientDet ( Tan et al. , 2020 ) adopts a weighted bi-directional feature pyramid network for multi-layer feature fusion . M2Det ( Zhao et al. , 2018 ) presents a multi-level feature pyramid network , fusing the features with the same depth and dimension from multiple sequentially connected hourglass-like modules to generate multi-scale feature groups for prediction . Similar structures can also be seen in DSSD ( Fu et al. , 2017 ) , TDM ( Shrivastava et al. , 2016 ) , YOLOv3 ( Redmon & Farhadi , 2018 ) , and RefineDet ( Zhang et al. , 2017 ) . 2.2 MULTI-BRANCH FEATURE FUSION . In Inception ( Szegedy et al. , 2014 ) , kernels on Inception Module branches have different sizes , which makes the output of the module contain different receptive fields . However , a large kernel contains a large number of parameters . Instead , dilated convolution allows a kernel to have an enlarged receptive field while keeping the parameter size unchanged . MCA ( Yu & Koltun , 2016 ) utilizes dilated convolutions to systematically aggregate multi-scale contextual information . Going even further , TridentNet ( Li et al. , 2019 ) lets multiple convolutions share the same weight but with different dilation rates to explore a uniform representational capability . 3 MULTI-SCALE FUSION MODULE . In this section , we present our Multi-Scale Fusion Module ( MSFM ) and the possible configurations when inserting it into existing frameworks . 3.1 MODULE DEFINITION . An instantiation of MSFM is shown in Figure 1a . It can be formulated as follows : M ( x ) = x+ U { C [ F1 ( S ( x ) ) , F2 ( S ( x ) ) , ... , Fn ( S ( x ) ) ] } where x is the module input , M ( x ) is the module output , S ( ) is the squeeze module that makes the input x thinner , Fn ( ) is the operation on n-th branch , C ( ) is the combination function , and U ( ) is the unsqueeze module which will restore the depth of the branch output to make it the same as x . The branch operation Fn ( ) can be represented as below : Fn ( a ) = R −1 n ( CGNn , i ( CGNn , i−1 ( ... ( CGNn,1 ( Rn ( a ) ) ) ) ) ) where a = S ( x ) is the result of squeeze module , Rn ( ) is the resize function on n-th branch , CGNn , i is the i-th { Conv2D ⇒ GroupNormalization ⇒ NonLinearity } operation on n-th branch , R−1n is the resize function to restore the feature dimension ( height and width ) . To make the module lightweight , we utilize a bottleneck-like ( He et al. , 2015 ) structure where the module input will first be thinned channel-wise , then fed into the branches . Branch input is resized using bilinear interpolation , and the same method is used when resizing the feature back to its original size . All the 3x3 convolutions on the branches have the padding=1 to keep the spatial dimension unchanged , and the number of the output channel is the same as that of the input channel as well . We choose ReLU as the nonlinearity activation in the MSFM . By default , MSFM is inserted in stages 2 , 3 , and 4 for ResNet backbones ( He et al. , 2015 ) . 3.2 CONFIGURATIONS . MSFM acts as a drop-in layer to existing frameworks . To show several possible configurations when inserting it into an object detector , we take as an example inserting it into a ResNet backbone . A Residual Bottleneck ( He et al. , 2015 ) in ResNet ( He et al. , 2016 ) is shown in Figure 1b . Some tunable hyperparameters we can configure are listed in Table 1 . 4 EXPERIMENTS . To evaluate the proposed module , we carry out experiments on object detection and instance segmentation tasks on COCO ( Lin et al. , 2014 ) . Experimental results demonstrate that the MSFM can enhance the performance of common two-stage object detection frameworks with very light computational overhead . 4.1 EXPERIMENTS SETUP . We perform hyperparameter tuning on Faster R-CNN with ResNet-50 FPN backbone ( Ren et al. , 2015 ) . Unless otherwise stated , the backbone of the framework being mentioned is ResNet-50 FPN . To test the generalizability of MSFM , experiments are also conducted on Faster R-CNN with ResNet-101 FPN backbone ( Ren et al. , 2015 ) , Mask R-CNN ( He et al. , 2017 ) , Cascade R-CNN ( Cai & Vasconcelos , 2017 ) , Grid R-CNN ( Lu et al. , 2018 ) , Dynamic R-CNN ( Zhang et al. , 2020 ) , RetinaNet ( Lin et al. , 2017b ) , Reppoints ( Yang et al. , 2019 ) , and Faster R-CNN with ResNet-50 FPN and Deformable Convolution on c3-c5 ( Dai et al. , 2017 ) . We carry out our experiments on object detection and instance segmentation tasks on COCO ( Lin et al. , 2014 ) , whose train set contains 118k images , minival set 5k images , and test-dev set 20k images . Mean average-precision ( mAP ) scores at different boxes and mask IoUs are adopted as the metrics when evaluating object detection and instance segmentation tasks . Our experiments are implemented with PyTorch ( Paszke et al. , 2019 ) and MMDetection ( Chen et al. , 2019 ) . The input images are resized such that the shorter side is no longer than 800 pixels . and the longer side is no longer than 1333 pixels . All the models are trained on 8 GPUs with 2 images per GPU . The backbone of all models are pretrained on ImageNet classification dataset ( Deng et al. , 2009 ) . Unless otherwise stated , all models are trained for 12 epochs using SGD with a weight decay of 0.0001 , and a momentum of 0.9 . The learning rate is set to 0.02 initially and decays by a factor of 10 at the 8th and 11th epochs . Learning rate linear warmup is adopted for first 500 steps with a warmup ratio of 0.001 . | In this paper, the authors study the problem of scale-friendly feature fusion for object detection. Specifically, the authors propose to process features at each layer of a feature pyramid network at multiple scales and fuse them back into a single scale. To be specific, they resize features at a layer into multiple scales, process these rescaled features independently, rescale them back into the original scale and combine them with the original features. | SP:81704b6fef077ebf35d792cdb2104722c207bb06 |
MSFM: Multi-Scale Fusion Module for Object Detection | Feature fusion is beneficial to object detection tasks in two folds . On one hand , detail and position information can be combined with semantic information when high and low-resolution features from shallow and deep layers are fused . On the other hand , objects can be detected in different scales , which improves the robustness of the framework . In this work , we present a Multi-Scale Fusion Module ( MSFM ) that extracts both detail and semantical information from a single input but at different scales within the same layer . Specifically , the input of the module will be resized into different scales on which position and semantic information will be processed , and then they will be rescaled back and combined with the module input . The MSFM is lightweight and can be used as a drop-in layer to many existing object detection frameworks . Experiments show that MSFM can bring +2.5 % mAP improvement with only 2.4M extra parameters on Faster R-CNN with ResNet-50 FPN backbone on COCO Object Detection minival set , outperforming that with ResNet-101 FPN backbone without the module which obtains +2.0 % mAP with 19.0M extra parameters . The best resulting model achieves a 45.7 % mAP on test-dev set . Code will be available . 1 INTRODUCTION . Object detection is one of the fundamental tasks in computer vision . It requires the detector to localize the objects in the image using bounding boxes and assign the correct category to each of them . In recent years , deep convolutional neural networks ( CNNs ) have seen great success in object detection , which can be divided into two categories : two-stage detectors , e.g. , Faster R-CNN ( Ren et al. , 2015 ) , and one-stage detectors , e.g. , SSD ( Liu et al. , 2016 ) . Two-stage detectors have high localization and recognition accuracy , while one-stage detectors achieve high inference speed ( Jiao et al. , 2019 ) . A typical two-stage detector consists of a backbone , a neck , a Region Proposal Network ( RPN ) , and a Region of Interest ( ROI ) head ( Chen et al. , 2019 ) . A backbone is a feature extractor usually pre-trained on ImageNet dataset ( Deng et al. , 2009 ) . A neck could be a Feature Pyramid Network ( FPN ) ( Lin et al. , 2017a ) that fuses the features from multiple layers . A RPN proposes candidate object bounding boxes , and a ROI head is for box regression and classification ( Ren et al. , 2015 ) . Compared to two-stage detectors , one-stage detectors propose predicted bounding boxes directly from the input image without the region proposal step , thus being more efficient ( Jiao et al. , 2019 ) . One of the key challenges in object detection is to solve the two subtasks , namely localization and classification , coordinately . Localization requires the network to capture the object position accurately , while classification expects the network to extract the semantic information of the objects . Due to the layered structure of the CNNs , detail and position-accurate information resides in shallow but high-resolution layers ; however , high-level and semantically strong information exists in deep but low-resolution layers ( Long et al. , 2014 ) . Another key challenge is scale invariance that the detector is expected to be capable of handling different object scales ( Liu et al. , 2016 ) . Feature Fusion is beneficial to object detectors in solving the two challenges . On one hand , through multi-layer fusion ( Chen et al. , 2020 ) , detail and position information can be combined with semantic information when high and low-resolution features from shallow and deep layers are fused . On the other hand , by fusing the results from different receptive fields ( Yu & Koltun , 2016 ) or scales ( Li et al. , 2019 ) via dilated convolutions or different kernel sizes ( Szegedy et al. , 2014 ) , objects can be detected in different scales , which improves the robustness of the model . In this paper , we present a Multi-Scale Fusion Module ( MSFM ) that extracts both detail and semantical information from a single input but at different scales within the same layer . Specifically , the input of the module will be resized into different scales on which position and semantic information will be processed , and then they will be rescaled back and combined with the module input . The MSFM is lightweight and can be used as a drop-in layer to many existing object detection frameworks , complementing shallow and deep layers with semantic and position information . Experiments show that MSFM can bring +2.5 % mAP improvement with only 2.4M extra parameters on Faster R-CNN with ResNet-50 FPN backbone on COCO Object Detection ( Lin et al. , 2014 ) minival set , outperforming that with ResNet-101 FPN backbone without the module which obtains +2.0 % mAP with 19.0M extra parameters . When applied on other frameworks , it also shows about +2.0 % mAP improvement , which show its generalizability . The best resulting model achieves a 45.7 % mAP on test-dev set . 2 RELATED WORK . 2.1 MULTI-LAYER FEATURE FUSION . FPN ( Lin et al. , 2017a ) is the de facto multi-layer feature fusion module in modern CNNs to compensate for the position information loss in the deep layer and lack of semantic information in shallow layers . By upsampling the deep features and fusing them with shallow features through a top-down path , it enables the model to coordinate the heterogenous information and enhances the robustness . NAS-FPN ( Ghiasi et al. , 2019 ) designs a NAS ( Zoph & Le , 2017 ) search space that covers all possible cross-layer connections , the result of which is a laterally repeatable FPN structure sharing the same dimensions between its input and output . FPG ( Chen et al. , 2020 ) proposes a multi-pathway feature pyramid , representing the feature scale-space as a regular grid of parallel bottom-up pathways fused by multi-directional lateral connections . EfficientDet ( Tan et al. , 2020 ) adopts a weighted bi-directional feature pyramid network for multi-layer feature fusion . M2Det ( Zhao et al. , 2018 ) presents a multi-level feature pyramid network , fusing the features with the same depth and dimension from multiple sequentially connected hourglass-like modules to generate multi-scale feature groups for prediction . Similar structures can also be seen in DSSD ( Fu et al. , 2017 ) , TDM ( Shrivastava et al. , 2016 ) , YOLOv3 ( Redmon & Farhadi , 2018 ) , and RefineDet ( Zhang et al. , 2017 ) . 2.2 MULTI-BRANCH FEATURE FUSION . In Inception ( Szegedy et al. , 2014 ) , kernels on Inception Module branches have different sizes , which makes the output of the module contain different receptive fields . However , a large kernel contains a large number of parameters . Instead , dilated convolution allows a kernel to have an enlarged receptive field while keeping the parameter size unchanged . MCA ( Yu & Koltun , 2016 ) utilizes dilated convolutions to systematically aggregate multi-scale contextual information . Going even further , TridentNet ( Li et al. , 2019 ) lets multiple convolutions share the same weight but with different dilation rates to explore a uniform representational capability . 3 MULTI-SCALE FUSION MODULE . In this section , we present our Multi-Scale Fusion Module ( MSFM ) and the possible configurations when inserting it into existing frameworks . 3.1 MODULE DEFINITION . An instantiation of MSFM is shown in Figure 1a . It can be formulated as follows : M ( x ) = x+ U { C [ F1 ( S ( x ) ) , F2 ( S ( x ) ) , ... , Fn ( S ( x ) ) ] } where x is the module input , M ( x ) is the module output , S ( ) is the squeeze module that makes the input x thinner , Fn ( ) is the operation on n-th branch , C ( ) is the combination function , and U ( ) is the unsqueeze module which will restore the depth of the branch output to make it the same as x . The branch operation Fn ( ) can be represented as below : Fn ( a ) = R −1 n ( CGNn , i ( CGNn , i−1 ( ... ( CGNn,1 ( Rn ( a ) ) ) ) ) ) where a = S ( x ) is the result of squeeze module , Rn ( ) is the resize function on n-th branch , CGNn , i is the i-th { Conv2D ⇒ GroupNormalization ⇒ NonLinearity } operation on n-th branch , R−1n is the resize function to restore the feature dimension ( height and width ) . To make the module lightweight , we utilize a bottleneck-like ( He et al. , 2015 ) structure where the module input will first be thinned channel-wise , then fed into the branches . Branch input is resized using bilinear interpolation , and the same method is used when resizing the feature back to its original size . All the 3x3 convolutions on the branches have the padding=1 to keep the spatial dimension unchanged , and the number of the output channel is the same as that of the input channel as well . We choose ReLU as the nonlinearity activation in the MSFM . By default , MSFM is inserted in stages 2 , 3 , and 4 for ResNet backbones ( He et al. , 2015 ) . 3.2 CONFIGURATIONS . MSFM acts as a drop-in layer to existing frameworks . To show several possible configurations when inserting it into an object detector , we take as an example inserting it into a ResNet backbone . A Residual Bottleneck ( He et al. , 2015 ) in ResNet ( He et al. , 2016 ) is shown in Figure 1b . Some tunable hyperparameters we can configure are listed in Table 1 . 4 EXPERIMENTS . To evaluate the proposed module , we carry out experiments on object detection and instance segmentation tasks on COCO ( Lin et al. , 2014 ) . Experimental results demonstrate that the MSFM can enhance the performance of common two-stage object detection frameworks with very light computational overhead . 4.1 EXPERIMENTS SETUP . We perform hyperparameter tuning on Faster R-CNN with ResNet-50 FPN backbone ( Ren et al. , 2015 ) . Unless otherwise stated , the backbone of the framework being mentioned is ResNet-50 FPN . To test the generalizability of MSFM , experiments are also conducted on Faster R-CNN with ResNet-101 FPN backbone ( Ren et al. , 2015 ) , Mask R-CNN ( He et al. , 2017 ) , Cascade R-CNN ( Cai & Vasconcelos , 2017 ) , Grid R-CNN ( Lu et al. , 2018 ) , Dynamic R-CNN ( Zhang et al. , 2020 ) , RetinaNet ( Lin et al. , 2017b ) , Reppoints ( Yang et al. , 2019 ) , and Faster R-CNN with ResNet-50 FPN and Deformable Convolution on c3-c5 ( Dai et al. , 2017 ) . We carry out our experiments on object detection and instance segmentation tasks on COCO ( Lin et al. , 2014 ) , whose train set contains 118k images , minival set 5k images , and test-dev set 20k images . Mean average-precision ( mAP ) scores at different boxes and mask IoUs are adopted as the metrics when evaluating object detection and instance segmentation tasks . Our experiments are implemented with PyTorch ( Paszke et al. , 2019 ) and MMDetection ( Chen et al. , 2019 ) . The input images are resized such that the shorter side is no longer than 800 pixels . and the longer side is no longer than 1333 pixels . All the models are trained on 8 GPUs with 2 images per GPU . The backbone of all models are pretrained on ImageNet classification dataset ( Deng et al. , 2009 ) . Unless otherwise stated , all models are trained for 12 epochs using SGD with a weight decay of 0.0001 , and a momentum of 0.9 . The learning rate is set to 0.02 initially and decays by a factor of 10 at the 8th and 11th epochs . Learning rate linear warmup is adopted for first 500 steps with a warmup ratio of 0.001 . | The paper proposes a multi-scale feature fusion block and inserts the block into ResNet backbones for object detection. It is very similar to the inception block in IneceptionNets. The only difference is the proposed feature fusion contains feature map upsampling and downsampling (resize and resize^{-1}) for different branches. The paper has some merits as follows. | SP:81704b6fef077ebf35d792cdb2104722c207bb06 |
Adaptive Universal Generalized PageRank Graph Neural Network | 1 INTRODUCTION . Graph-centered machine learning has received significant interest in recent years due to the ubiquity of graph-structured data and its importance in solving numerous real-world problems such as semisupervised node classification and graph classification ( Zhu , 2005 ; Shervashidze et al. , 2011 ; Lü & Zhou , 2011 ) . Usually , the data at hand contains two sources of information : Node features and graph topology . As an example , in social networks , nodes represent users that have different combinations of interests and properties captured by their corresponding feature vectors ; edges on the other hand document observable friendship and collaboration relations that may or may not depend on the node features . Hence , learning methods that are able to simultaneously and adaptively exploit node features and the graph topology are highly desirable as they make use of their latent connections and thereby improve learning on graphs . Graph neural networks ( GNN ) leverage their representational power to provide state-of-the-art performance when addressing the above described application domains . Many GNNs use message ∗equal contribution 1https : //github.com/jianhao2016/GPRGNN passing ( Gilmer et al. , 2017 ; Battaglia et al. , 2018 ) to manipulate node features and graph topology . They are constructed by stacking ( graph ) neural network layers which essentially propagate and transform node features over the given graph topology . Different types of layers have been proposed and used in practice , including graph convolutional layers ( GCN ) ( Bruna et al. , 2014 ; Kipf & Welling , 2017 ) , graph attention layers ( GAT ) ( Velickovic et al. , 2018 ) and many others ( Hamilton et al. , 2017 ; Wijesinghe & Wang , 2019 ; Zeng et al. , 2020 ; Abu-El-Haija et al. , 2019 ) . However , most of the existing GNN architectures have two fundamental weaknesses which restrict their learning ability on general graph-structured data . First , most of them seem to be tailor-made to work on homophilic ( associative ) graphs . The homophily principle ( McPherson et al. , 2001 ) in the context of node classification asserts that nodes from the same class tend to form edges . Homophily is also a common assumption in graph clustering ( Von Luxburg , 2007 ; Tsourakakis , 2015 ; Dau & Milenkovic , 2017 ) and in many GNNs design ( Klicpera et al. , 2018 ) . Methods developed for homophilic graphs are nonuniversal in so far that they fail to properly solve learning problems on heterophilic ( disassortative ) graphs ( Pei et al. , 2019 ; Bojchevski et al. , 2019 ; 2020 ) . In heterophilic graphs , nodes with distinct labels are more likely to link together ( For example , many people tend to preferentially connect with people of the opposite sex in dating graphs , different classes of amino acids are more likely to connect within many protein structures ( Zhu et al. , 2020 ) etc ) . GNNs model the homophily principle by aggregating node features within graph neighborhoods . For this purpose , they use different mechanisms such as averaging in each network layer . Neighborhood aggregation is problematic and significantly more difficult for heterophilic graphs ( Jia & Benson , 2020 ) . Second , most of the existing GNNs fail to be “ deep enough ” . Although in principle an arbitrary number of layers may be stacked , practical models are usually shallow ( including 2-4 layers ) as these architectures are known to achieve better empirical performance than deep networks . A widely accepted explanation for the performance degradation of GNNs with increasing depth is feature-oversmoothing , which may be intuitively explained as follows . The process of GNN feature propagating represents a form of random walks on “ feature graphs , ” and under proper conditions , such random walks converge with exponential rate to their stationary points . This essentially levels the expressive power of the features and renders them nondiscriminative . This intuitive reasoning was first described for linear settings in Li et al . ( 2018 ) and has been recently studied in Oono & Suzuki ( 2020 ) for a setting involving nonlinear rectifiers . We address these two described weaknesses by combining GNNs with Generalized PageRank techniques ( GPR ) within a new model termed GPR-GNN . The GPR-GNN architecture is designed to first learn the hidden features and then to propagate them via GPR techniques . The focal component of the network is the GPR procedure that associates each step of feature propagation with a learnable weight . The weights depend on the contributions of different steps during the information propagation procedure , and they can be both positive and negative . This departures from common nonnegativity assumptions ( Klicpera et al. , 2018 ) allows for the signs of the weights to adapt to the homophily/heterophily structure of the underlying graphs . The amplitudes of the weights trade-off the degree of smoothing of node features and the aggregation power of topological features . These traits do not change with the choice of the initialization procedure and elucidate the process used to combine node features and the graph structure so as to achieve ( near ) -optimal predictions . In summary , the GPR-GNN method can simultaneously learn the node label patterns of disparate classes of graphs and prevent feature over-smoothing . The excellent performance of GPR-GNN is demonstrated empirically , on real world datasets , and further supported through a number of theoretical findings . In the latter setting , we show that the GPR procedure relates to general polynomial graph filtering , which can naturally deal with both high and low frequency parts of the graph signals . In contrast , recent GNN models that utilize Personalized PageRanks ( PPR ) with fixed weights ( Wu et al. , 2019 ; Klicpera et al. , 2018 ; 2019 ) inevitably act as low-pass filters . Thus , they fail to learn the labels of heterophilic graphs . We also establish that GPR-GNN can provably mitigate the feature-over-smoothing issue in an adaptive manner even after large-step propagation ( i.e. , after a large number of propagation steps ) . Hence , the method is able to make use of informative large-step propagation . To test the performance of GPR-GNN on homophilic and heterophilic node label patterns and determine the trade-off between node and topological feature exploration , we first describe the recently proposed contextual stochastic block model ( cSBM ) ( Deshpande et al. , 2018 ) . The cSBM allows for smoothly controlling the “ informativeness ratio ” between node features and graph topology , where the graph can vary from being highly homophilic to highly heterophilic . We show that GPRGNN outperforms all other baseline methods for the task of semi-supervised node classification on the cSBM consistently from strong homophily to strong heterophily . We then proceed to show that GPR-GNN offers state-of-the-art performance on node-classification benchmark real-world datasets which contain both homophilic and heterophilic graphs . Due to the space limit , we put all proofs , formal theorem statements , and the conclusion section in the Supplement . 2 PRELIMINARIES . Let G = ( V , E ) be an undirected graph with nodes V and edges E. Let n denote the number of nodes , assumed to belong to one of C ≥ 2 classes . The nodes are associated with the node feature matrix X ∈ Rn×f , where f denotes the number of features per node . Throughout the paper , we use Xi : to indicate the ith row and X : j to indicate the jth column of the matrix X , respectively . The symbol δij is reserved for the Kronecker delta function . The graph G is described by the adjacency matrix A , while à stands for the adjacency matrix for a graph with added self-loops . We let D̃ be the diagonal degree matrix of à and Ãsym = D̃−1/2ÃD̃−1/2 denote the symmetric normalized adjacency matrix with self-loops . 3 GPR-GNNS : MOTIVATION AND CONTRIBUTIONS . Generalized PageRanks . Generalized PageRank ( GPR ) methods were first used in the context of unsupervised graph clustering where they showed significant performance improvements over Personalized PageRank ( Kloumann et al. , 2017 ; Li et al. , 2019 ) . The operational principles of GPRs can be succinctly described as follows . Given a seed node s ∈ V in some cluster of the graph , a one-dimensional feature vector H ( 0 ) ∈ Rn×1 is initialized according to H ( 0 ) v : = δvs . The GPR score is defined as ∑∞ k=0 γkà k symH ( 0 ) = ∑∞ k=0 γkH ( k ) , where the parameters γk ∈ R , k = 0 , 1 , 2 , . . . , are referred to as the GPR weights . Clustering of the graph is performed locally by thresholding the GPR score . Certain PangRank methods , such as Personalized PageRank or heat-kernel PageRank ( Chung , 2007 ) , are associated with specific choices of GPR weights ( Li et al. , 2019 ) . For an excellent in-depth discussion of PageRank methods , the interested reader is referred to ( Gleich , 2015 ) . The work in Li et al . ( 2019 ) recently introduced and theoretically analyzed a special form of GPR termed Inverse PR ( IPR ) and showed that long random walk paths are more beneficial for clustering then previously assumed , provided that the GPR weights are properly selected ( Note that IPR was developed for homophilic graphs and optimal GPR weights for heterophilic graphs are not currently known ) . Equivalence of the GPR method and polynomial graph filtering . If we truncate the infinite sum in the definition of GPR at some natural number K , ∑K k=0 γkà k sym corresponds to a polynomial graph filter of orderK . Thus , learning the optimal GPR weights is equivalent to learning the optimal polynomial graph filter . Note that one can approximate any graph filter using a polynomial graph filter ( Shuman et al. , 2013 ) and hence the GPR method is able to deal with a large range of different node label patterns . Also , increasing K allows one to better approximate the underlying optimal graph filter . This once again shows that large-step propagation is beneficial . Universality with respect to node label patterns : Homophily versus heterophily . In their recent work , Pei et al . ( 2019 ) proposed an index to measure the level of homophily of nodes in a graph H ( G ) = 1|V | ∑ v∈V Number of neighbors of v ∈ V that have the same label as v Number of neighbors of v . Note that H ( G ) → 1 corresponds to strong homophily while H ( G ) → 0 indicates strong heterophily . Figures 1 ( b ) and ( c ) plot the GPR weights learnt by our GPR-GNN method on a homophilic ( Cora ) and heterophilic ( Texas ) dataset . The learnt GPR weights from Cora match the behavior of IPR ( Li et al. , 2019 ) , which verifies that large-step propagation is indeed of great importance for homophilic graphs . The GPR weights learnt from Texas behave significantly differently from all known PR variants , taking a number of negative values . These differences in weight patterns are observed under random initialization , demonstrating that the weights are actually learned by the network and not forced by specific initialization . Furthermore , the large difference in the GPR weights for these two graph models illustrates the learning power of GPR-GNN and their universal adaptability . The over-smoothing problem . One of the key components in most GNN models is the graph convolutional layer , described by H ( k ) GCN = ReLU ( ÃsymH ( k−1 ) GCN W ( k ) ) , P̂GCN = softmax ( ÃsymH ( K−1 ) GCN W ( k ) ) , where H ( 0 ) GCN = X and W ( k ) represents the trainable weight matrix for the kth layer . The key issue that limits stacking multiple layers is the over-smoothing phenomenon : If one were to remove ReLU in the above expression , limk→∞ ÃksymH ( 0 ) = H ( ∞ ) , where each row of H ( ∞ ) only depends on the degree of the corresponding node , provided that the graph is irreducible and aperiodic . This shows that the model looses discriminative information provided by the node features as the number of layers increases . Mitigating graph heterophily and over-smoothing issues with the GPR-GNN model . GPRGNN first extracts hidden state features for each node and then uses GPR to propagate them . The GPR-GNN process can be mathematically described as : P̂ = softmax ( Z ) , Z = K∑ k=0 γkH ( k ) , H ( k ) = ÃsymH ( k−1 ) , H ( 0 ) i : = fθ ( Xi : ) , ( 1 ) where fθ ( . ) represents a neural network with parameter set { θ } that generates the hidden state features H ( 0 ) . The GPR weights γk are trained together with { θ } in an end-to-end fashion . The GPRGNN model is easy to interpret : As already pointed out , GPR-GNN has the ability to adaptively control the contribution of each propagation step and adjust it to the node label pattern . Examining the learnt GPR weights also helps with elucidating the properties of the topological information of a graph ( i.e. , determining the optimal polynomial graph filter ) , as illustrated in Figure 1 ( b ) and ( c ) . Placing GPR-GNNs in the context of related prior work . Among the methods that differ from repeated stacking of GCN layers , APPNP ( Klicpera et al. , 2018 ) represents one of the state-of-theart GNNs that is related to our GPR-GNN approach . It can be easily seen that APPNP as well as SGC ( Wu et al. , 2019 ) are special cases of our model since APPNP fixes γk = α ( 1−α ) k , γK = ( 1− α ) K , while SGC removes all nonlinearities with γk = δkK , respectively . These two weight choices correspond to Personalized PageRank ( PPR ) ( Jeh & Widom , 2003 ) , which is known to be suboptimal compared to the IPR framework when applied to homophilic node classification ( Li et al. , 2019 ) . Fixing the GPR weights makes the model unable to adaptively learn the optimal propagation rules which is of crucial importance : As we will show in Section 4 , the fixed PPR weights corresponds to low-pass graph filters which makes them inadequate for learning on heterophilic graphs . The recent work ( Klicpera et al. , 2018 ) showed that fixed PPR weights ( APPNP ) can also provably resolve the over-smoothing problem . However , the way APPNP prevents over-smoothing is independent on the node label information . In contrast , the escape of GPR-GNN from over-smoothing is guided by the node label information ( Theorem 4.2 ) . A detailed discussion of this phenomena along with illustrative examples is delegated to the Supplement . Among the GCN-like models , JK-Net ( Xu et al. , 2018 ) exhibits some similarities with GPR-GNN . It also aggregates the outputs of different GCN layers to arrive at the final output . On the other hand , the GCN-Cheby method ( Defferrard et al. , 2016 ; Kipf & Welling , 2017 ) is related to polynomial graph filtering , where each convolutional layer propagates multiple steps and the graph filter is related to Chebyshev polynomials . In both cases , the depth of the models is limited in practice ( Klicpera et al. , 2018 ) and they are not easy to interpret as our GPR-GNN method . Some prior work also emphasizes adaptively learning the importance of different steps ( Abu-El-Haija et al. , 2018 ; Berberidis et al. , 2018 ) . Nevertheless , none of the above works is applicable for semisupervised learning with GNNs and considers heterophilic graphs . | In this paper, the authors proposed a generalized pagerank version of a graph neural network (GNN). The authors learn a weighted combination of higher powers of the graph adjacency matrix, with the weights themselves being learnable. This allows their method to generalize existing GNN methods that work well when there's graph homophily, but not in the case of heterophily. The proposed method reduces to existing cases under certain weight settings, but in other cases, the learned weights allow for the GNN to act as a "high pass filter", which existing methods do not do. By learning these weights, the authors can also go deeper in the graph, and aggregate information from several hops away. Experiments on several standard datasets show that the proposed method outperforms multiple baselines. | SP:ffa69b99230ed18f02cbb7acb37cf3cd801ec908 |
Adaptive Universal Generalized PageRank Graph Neural Network | 1 INTRODUCTION . Graph-centered machine learning has received significant interest in recent years due to the ubiquity of graph-structured data and its importance in solving numerous real-world problems such as semisupervised node classification and graph classification ( Zhu , 2005 ; Shervashidze et al. , 2011 ; Lü & Zhou , 2011 ) . Usually , the data at hand contains two sources of information : Node features and graph topology . As an example , in social networks , nodes represent users that have different combinations of interests and properties captured by their corresponding feature vectors ; edges on the other hand document observable friendship and collaboration relations that may or may not depend on the node features . Hence , learning methods that are able to simultaneously and adaptively exploit node features and the graph topology are highly desirable as they make use of their latent connections and thereby improve learning on graphs . Graph neural networks ( GNN ) leverage their representational power to provide state-of-the-art performance when addressing the above described application domains . Many GNNs use message ∗equal contribution 1https : //github.com/jianhao2016/GPRGNN passing ( Gilmer et al. , 2017 ; Battaglia et al. , 2018 ) to manipulate node features and graph topology . They are constructed by stacking ( graph ) neural network layers which essentially propagate and transform node features over the given graph topology . Different types of layers have been proposed and used in practice , including graph convolutional layers ( GCN ) ( Bruna et al. , 2014 ; Kipf & Welling , 2017 ) , graph attention layers ( GAT ) ( Velickovic et al. , 2018 ) and many others ( Hamilton et al. , 2017 ; Wijesinghe & Wang , 2019 ; Zeng et al. , 2020 ; Abu-El-Haija et al. , 2019 ) . However , most of the existing GNN architectures have two fundamental weaknesses which restrict their learning ability on general graph-structured data . First , most of them seem to be tailor-made to work on homophilic ( associative ) graphs . The homophily principle ( McPherson et al. , 2001 ) in the context of node classification asserts that nodes from the same class tend to form edges . Homophily is also a common assumption in graph clustering ( Von Luxburg , 2007 ; Tsourakakis , 2015 ; Dau & Milenkovic , 2017 ) and in many GNNs design ( Klicpera et al. , 2018 ) . Methods developed for homophilic graphs are nonuniversal in so far that they fail to properly solve learning problems on heterophilic ( disassortative ) graphs ( Pei et al. , 2019 ; Bojchevski et al. , 2019 ; 2020 ) . In heterophilic graphs , nodes with distinct labels are more likely to link together ( For example , many people tend to preferentially connect with people of the opposite sex in dating graphs , different classes of amino acids are more likely to connect within many protein structures ( Zhu et al. , 2020 ) etc ) . GNNs model the homophily principle by aggregating node features within graph neighborhoods . For this purpose , they use different mechanisms such as averaging in each network layer . Neighborhood aggregation is problematic and significantly more difficult for heterophilic graphs ( Jia & Benson , 2020 ) . Second , most of the existing GNNs fail to be “ deep enough ” . Although in principle an arbitrary number of layers may be stacked , practical models are usually shallow ( including 2-4 layers ) as these architectures are known to achieve better empirical performance than deep networks . A widely accepted explanation for the performance degradation of GNNs with increasing depth is feature-oversmoothing , which may be intuitively explained as follows . The process of GNN feature propagating represents a form of random walks on “ feature graphs , ” and under proper conditions , such random walks converge with exponential rate to their stationary points . This essentially levels the expressive power of the features and renders them nondiscriminative . This intuitive reasoning was first described for linear settings in Li et al . ( 2018 ) and has been recently studied in Oono & Suzuki ( 2020 ) for a setting involving nonlinear rectifiers . We address these two described weaknesses by combining GNNs with Generalized PageRank techniques ( GPR ) within a new model termed GPR-GNN . The GPR-GNN architecture is designed to first learn the hidden features and then to propagate them via GPR techniques . The focal component of the network is the GPR procedure that associates each step of feature propagation with a learnable weight . The weights depend on the contributions of different steps during the information propagation procedure , and they can be both positive and negative . This departures from common nonnegativity assumptions ( Klicpera et al. , 2018 ) allows for the signs of the weights to adapt to the homophily/heterophily structure of the underlying graphs . The amplitudes of the weights trade-off the degree of smoothing of node features and the aggregation power of topological features . These traits do not change with the choice of the initialization procedure and elucidate the process used to combine node features and the graph structure so as to achieve ( near ) -optimal predictions . In summary , the GPR-GNN method can simultaneously learn the node label patterns of disparate classes of graphs and prevent feature over-smoothing . The excellent performance of GPR-GNN is demonstrated empirically , on real world datasets , and further supported through a number of theoretical findings . In the latter setting , we show that the GPR procedure relates to general polynomial graph filtering , which can naturally deal with both high and low frequency parts of the graph signals . In contrast , recent GNN models that utilize Personalized PageRanks ( PPR ) with fixed weights ( Wu et al. , 2019 ; Klicpera et al. , 2018 ; 2019 ) inevitably act as low-pass filters . Thus , they fail to learn the labels of heterophilic graphs . We also establish that GPR-GNN can provably mitigate the feature-over-smoothing issue in an adaptive manner even after large-step propagation ( i.e. , after a large number of propagation steps ) . Hence , the method is able to make use of informative large-step propagation . To test the performance of GPR-GNN on homophilic and heterophilic node label patterns and determine the trade-off between node and topological feature exploration , we first describe the recently proposed contextual stochastic block model ( cSBM ) ( Deshpande et al. , 2018 ) . The cSBM allows for smoothly controlling the “ informativeness ratio ” between node features and graph topology , where the graph can vary from being highly homophilic to highly heterophilic . We show that GPRGNN outperforms all other baseline methods for the task of semi-supervised node classification on the cSBM consistently from strong homophily to strong heterophily . We then proceed to show that GPR-GNN offers state-of-the-art performance on node-classification benchmark real-world datasets which contain both homophilic and heterophilic graphs . Due to the space limit , we put all proofs , formal theorem statements , and the conclusion section in the Supplement . 2 PRELIMINARIES . Let G = ( V , E ) be an undirected graph with nodes V and edges E. Let n denote the number of nodes , assumed to belong to one of C ≥ 2 classes . The nodes are associated with the node feature matrix X ∈ Rn×f , where f denotes the number of features per node . Throughout the paper , we use Xi : to indicate the ith row and X : j to indicate the jth column of the matrix X , respectively . The symbol δij is reserved for the Kronecker delta function . The graph G is described by the adjacency matrix A , while à stands for the adjacency matrix for a graph with added self-loops . We let D̃ be the diagonal degree matrix of à and Ãsym = D̃−1/2ÃD̃−1/2 denote the symmetric normalized adjacency matrix with self-loops . 3 GPR-GNNS : MOTIVATION AND CONTRIBUTIONS . Generalized PageRanks . Generalized PageRank ( GPR ) methods were first used in the context of unsupervised graph clustering where they showed significant performance improvements over Personalized PageRank ( Kloumann et al. , 2017 ; Li et al. , 2019 ) . The operational principles of GPRs can be succinctly described as follows . Given a seed node s ∈ V in some cluster of the graph , a one-dimensional feature vector H ( 0 ) ∈ Rn×1 is initialized according to H ( 0 ) v : = δvs . The GPR score is defined as ∑∞ k=0 γkà k symH ( 0 ) = ∑∞ k=0 γkH ( k ) , where the parameters γk ∈ R , k = 0 , 1 , 2 , . . . , are referred to as the GPR weights . Clustering of the graph is performed locally by thresholding the GPR score . Certain PangRank methods , such as Personalized PageRank or heat-kernel PageRank ( Chung , 2007 ) , are associated with specific choices of GPR weights ( Li et al. , 2019 ) . For an excellent in-depth discussion of PageRank methods , the interested reader is referred to ( Gleich , 2015 ) . The work in Li et al . ( 2019 ) recently introduced and theoretically analyzed a special form of GPR termed Inverse PR ( IPR ) and showed that long random walk paths are more beneficial for clustering then previously assumed , provided that the GPR weights are properly selected ( Note that IPR was developed for homophilic graphs and optimal GPR weights for heterophilic graphs are not currently known ) . Equivalence of the GPR method and polynomial graph filtering . If we truncate the infinite sum in the definition of GPR at some natural number K , ∑K k=0 γkà k sym corresponds to a polynomial graph filter of orderK . Thus , learning the optimal GPR weights is equivalent to learning the optimal polynomial graph filter . Note that one can approximate any graph filter using a polynomial graph filter ( Shuman et al. , 2013 ) and hence the GPR method is able to deal with a large range of different node label patterns . Also , increasing K allows one to better approximate the underlying optimal graph filter . This once again shows that large-step propagation is beneficial . Universality with respect to node label patterns : Homophily versus heterophily . In their recent work , Pei et al . ( 2019 ) proposed an index to measure the level of homophily of nodes in a graph H ( G ) = 1|V | ∑ v∈V Number of neighbors of v ∈ V that have the same label as v Number of neighbors of v . Note that H ( G ) → 1 corresponds to strong homophily while H ( G ) → 0 indicates strong heterophily . Figures 1 ( b ) and ( c ) plot the GPR weights learnt by our GPR-GNN method on a homophilic ( Cora ) and heterophilic ( Texas ) dataset . The learnt GPR weights from Cora match the behavior of IPR ( Li et al. , 2019 ) , which verifies that large-step propagation is indeed of great importance for homophilic graphs . The GPR weights learnt from Texas behave significantly differently from all known PR variants , taking a number of negative values . These differences in weight patterns are observed under random initialization , demonstrating that the weights are actually learned by the network and not forced by specific initialization . Furthermore , the large difference in the GPR weights for these two graph models illustrates the learning power of GPR-GNN and their universal adaptability . The over-smoothing problem . One of the key components in most GNN models is the graph convolutional layer , described by H ( k ) GCN = ReLU ( ÃsymH ( k−1 ) GCN W ( k ) ) , P̂GCN = softmax ( ÃsymH ( K−1 ) GCN W ( k ) ) , where H ( 0 ) GCN = X and W ( k ) represents the trainable weight matrix for the kth layer . The key issue that limits stacking multiple layers is the over-smoothing phenomenon : If one were to remove ReLU in the above expression , limk→∞ ÃksymH ( 0 ) = H ( ∞ ) , where each row of H ( ∞ ) only depends on the degree of the corresponding node , provided that the graph is irreducible and aperiodic . This shows that the model looses discriminative information provided by the node features as the number of layers increases . Mitigating graph heterophily and over-smoothing issues with the GPR-GNN model . GPRGNN first extracts hidden state features for each node and then uses GPR to propagate them . The GPR-GNN process can be mathematically described as : P̂ = softmax ( Z ) , Z = K∑ k=0 γkH ( k ) , H ( k ) = ÃsymH ( k−1 ) , H ( 0 ) i : = fθ ( Xi : ) , ( 1 ) where fθ ( . ) represents a neural network with parameter set { θ } that generates the hidden state features H ( 0 ) . The GPR weights γk are trained together with { θ } in an end-to-end fashion . The GPRGNN model is easy to interpret : As already pointed out , GPR-GNN has the ability to adaptively control the contribution of each propagation step and adjust it to the node label pattern . Examining the learnt GPR weights also helps with elucidating the properties of the topological information of a graph ( i.e. , determining the optimal polynomial graph filter ) , as illustrated in Figure 1 ( b ) and ( c ) . Placing GPR-GNNs in the context of related prior work . Among the methods that differ from repeated stacking of GCN layers , APPNP ( Klicpera et al. , 2018 ) represents one of the state-of-theart GNNs that is related to our GPR-GNN approach . It can be easily seen that APPNP as well as SGC ( Wu et al. , 2019 ) are special cases of our model since APPNP fixes γk = α ( 1−α ) k , γK = ( 1− α ) K , while SGC removes all nonlinearities with γk = δkK , respectively . These two weight choices correspond to Personalized PageRank ( PPR ) ( Jeh & Widom , 2003 ) , which is known to be suboptimal compared to the IPR framework when applied to homophilic node classification ( Li et al. , 2019 ) . Fixing the GPR weights makes the model unable to adaptively learn the optimal propagation rules which is of crucial importance : As we will show in Section 4 , the fixed PPR weights corresponds to low-pass graph filters which makes them inadequate for learning on heterophilic graphs . The recent work ( Klicpera et al. , 2018 ) showed that fixed PPR weights ( APPNP ) can also provably resolve the over-smoothing problem . However , the way APPNP prevents over-smoothing is independent on the node label information . In contrast , the escape of GPR-GNN from over-smoothing is guided by the node label information ( Theorem 4.2 ) . A detailed discussion of this phenomena along with illustrative examples is delegated to the Supplement . Among the GCN-like models , JK-Net ( Xu et al. , 2018 ) exhibits some similarities with GPR-GNN . It also aggregates the outputs of different GCN layers to arrive at the final output . On the other hand , the GCN-Cheby method ( Defferrard et al. , 2016 ; Kipf & Welling , 2017 ) is related to polynomial graph filtering , where each convolutional layer propagates multiple steps and the graph filter is related to Chebyshev polynomials . In both cases , the depth of the models is limited in practice ( Klicpera et al. , 2018 ) and they are not easy to interpret as our GPR-GNN method . Some prior work also emphasizes adaptively learning the importance of different steps ( Abu-El-Haija et al. , 2018 ; Berberidis et al. , 2018 ) . Nevertheless , none of the above works is applicable for semisupervised learning with GNNs and considers heterophilic graphs . | The paper proposes a new GNN architecture based on Generalized PageRank to handle two weakness in some existing GNNs: the difficulty of neighborhood aggregation on heterophilic graphs, and the oversmoothing problem when stacking GNN layers. The proposed GPR-GNN can be viewed as an extension of the Personalized PageRank-based GNNs, such as APPNP and SGC, which also aimed to handle oversmoothing problem. Pros: The paper highlights and clearly explains why optimizing the proposed layerwise GPR weights in GNN could tackle the two challenges. Although the final GPR-GNN architecture is simple, the ideas behind are significant. The paper is technically sound. The paper clearly analyzes the differences and relationships between related prior works and the proposed approach. In experiment, datasets are sufficient, including both homophilic and heterophilic graphs (both synthetic datasets and 10 real benchmarks are sufficient) which proves that GPR-GNN can achieve state-of-the-art performances especially on heterophilic graphs. | SP:ffa69b99230ed18f02cbb7acb37cf3cd801ec908 |
TwinDNN: A Tale of Two Deep Neural Networks | 1 INTRODUCTION . Machine learning is one of the most popular fields in the current era . It is used in various ways , such as speech recognition , face recognition , medical diagnosis , etc . However , the problem is that the neural networks for machine learning applications Krizhevsky et al . ( 2012 ) ; He et al . ( 2016a ; b ) are becoming too large and slow to be on a small chip for real-time systems . As a result , there has been a significant amount of research to reduce the size of the neural networks so that their inference latencies are low enough to handle real-time inputs Zhang et al . ( 2020 ) ; Zhou et al . ( 2016 ) ; Zhang et al . ( 2018 ) . There are quite a few approaches to compress existing neural networks , but for field-programmable gate arrays ( FPGAs ) , quantization of network is the most popular and effective method to reduce the size and inference latency at the same time Han et al . ( 2016 ) . In particular , extremely low bit-width networks on FPGAs , such as binary or ternary neural networks have been studied recently Wang et al . ( 2018 ) ; Courbariaux & Bengio ( 2016 ) ; Courbariaux et al . ( 2015 ) ; Zhao et al . ( 2017 ) ; Yao Chen & Chen ( 2019 ) ; Li & Liu ( 2016 ) ; Blott et al . ( 2018 ) . These networks provide an extra benefit that normal quantized networks do not provide in terms of multiplier ( DSP ) utilization . The idea is that extremely low bit-width weights allow multiplications to be done in conditional logic , which can be implemented by logic gates , without using a special hardware for multiplication ( DSP ) . This fact can allow developers to utilize additional DSPs in other ways where DSPs can be useful . However , this benefit is not free , of course . One major downside of these low bit-width networks is that they tend to have even more accuracy drop than regular quantized neural networks , as a result of further reduced precision . Therefore , it is more difficult to use binary or ternary neural networks as they are , especially in the fields such as surveillance or medical diagnosis systems , where the cost of that accuracy drop is much larger than the latency improvement . The goal of this study is to accelerate neural network inferences by using an extremely low bitwidth network implementations on FPGAs , while maintaining the accuracy of the original network by using relatively high precision network concurrently , without having to develop a single DNN accelerator that meets both accuracy and latency requirements . The main contribution is to find a mechanism to choose the right network to infer for specific inputs , and this is done by creating a hierarchical structure of two different compressed networks and utilizing the output of the initial inference to determine the need of extra verification . In summary , we propose a system that consists of two distinct networks : one extremely low bit-width network that is focused on latency , and the other moderately quantized network that is focused on accuracy . In this paper , extremely low bit-width network will be called a compressed network , and moderately quantized network will be called an original network . These two networks work in a way that can exploit advantages in both latency and accuracy at the same time . The overall mechanism is similar to the one presented in Mocerino & Calimera ( 2014 ) . However , there has not been any study of this concept in FPGA accelerators for deep neural networks . This represents a novel direction in neural network research , to pair compressed network and original network in parallel in order to improve latency while maintaining the original accuracy . Our main contributions are as follows : • Accelerators that are designed and optimized to exploit low bit-width networks , with pipelined and parallelized computation engines that use a minimum number of DSPs as possible . • A software solution that allows two accelerators to be run in hierarchical fashion , utilizing confidence of a compressed network prediction . • For ImageNet and ResNet-18 , our TwinDNN solution can deliver up to 1.9× latency improvement with only 3 % of extra DSPs used for compressed network , and up to 95 % of accuracy loss is recovered during hierarchical inference . In Section 2 , some background information related to this work will be introduced . In Section 3 , design flow of our implementation and experiment will be explained . In Section 4 , the results of our experiments will be described . Section 5 will conclude the paper with future explorations . 2 BACKGROUND . 2.1 EXTREMELY LOW BIT-WIDTH NEURAL NETWORKS . Recent researches have succeeded in binarizing or ternarizing parts of layers in neural networks Wang et al . ( 2018 ) ; Courbariaux & Bengio ( 2016 ) ; Courbariaux et al . ( 2015 ) ; Zhao et al . ( 2017 ) ; Yao Chen & Chen ( 2019 ) . Many experiments claim that these compression methods are very effective in terms of latency reduction with some accuracy drops . As one would expect , as the number of bits used to represent either weights or feature maps decreases , accuracy drops more significantly . Because the goal of our study is to compensate for the accuracy loss caused by compression , we can forgive moderate accuracy loss , as long as the benefit of using those networks is significant . The following equations : wb = { −wscale if b = 0 +wscale if b = 1 wt = { −wscale if t = −1 +wscale if t = 1 0 if t = 0 ( 1 ) show how these extremely low bit-width weights are used in computation . b is a 1-bit value that can be either 0 or 1 , and t is a 2-bit value that can take either -1 , 0 , or 1 . The key idea here is that wscale value is the same across the weights . The bits are only used in sign representations . In binary , as an example , a single bit of 0 represents negative and 1 represents positive , and this logic can be implemented in a simple condition , or a multiplexer in FPGAs . wscale value is stored separately , and the same wscale value is multiplied over all binary weights to get the actual weight values . However , we do not need to perform all of these multiplications separately . Consider b1 = 0 and b2 = 1 for the binary case . a stands for activation , or feature map , then we can express a very simple neural network computation as follows : anext = wb1 × a1 + wb2 × a2 = −wscale × a1 + wscale × a2 = wscale × ( −a1 + a2 ) ( 2 ) This shows how binary and ternary weight computations can be handled with a single multiplication . Reducing the number of actual multiplications reduces the need of DSPs , and indeed makes the overall computation faster . For ternary , the only difference is that two bits now represent positive , negative , and zero . Therefore , the main benefit of using extremely low bit-width neural networks is more effective and balanced resource utilization , specifically on FPGAs . For a typical DNN implementation on FPGAs , DSP is the one that directly determines the performance , and so is the limiting factor of the performance . Therefore , typical DNN implementations on FPGAs utilize nearly all the DSPs available , and other resources are left under-utilized . Extremely low bit-width networks , on the other hand , only uses a minimal number of DSPs , and mainly utilizes look-up tables ( LUTs ) , which are generally left unused for computation ( e.g. , only used for control logic ) . In this study , we instantiate both typical DNN ( original DNN ) and extremely low bit-width DNN ( compressed DNN ) at the same time , in a way that original DNN uses most of the DSPs available on the board , and compressed DNN uses extra LUTs that were not used by original DNN . This method allows us to utilize both DSP and LUT resources as much as possible to ultimately reduce the overall latency . 2.2 FINAL LAYER OUTPUTS IN NEURAL NETWORK . In neural network image classifications , output of the final layer is a list of values for each class , and the class with the highest final layer output is typically chosen as a prediction . Here , each value represents how possible is that image in the class , and we will call these values probabilities for convenience . Note that in order to compute the actual probabilities , we need to apply a softmax function to these values . However , we do not apply a softmax function here , because we only need to find the class with the highest value . Anyways , the point is that the output of a neural network provides more information than just a prediction . Specifically , it provides information about all probabilities of predictions that the input can be classified as . It is definitely possible to utilize this additional information to enhance the prediction . In this study , we will make use of the probability of the second most possible label . From compressed network inference output , along with the prediction itself , we also need to find out whether to infer the original network or not . The probability of the second most possible label is used here to determine if the prediction of compressed network is confident enough to be used as an actual output without verification from the original network . Here is an example of how we can utilize this information during inference . For handwritten digit recognition , let ’ s define Out ( x ) as final output value for label x . There is no problem if Out ( 0 ) = 0.9 and Out ( 1 ) , . . . , Out ( 9 ) < 0.1 , because the network is almost sure that the digit is 0 . However , in case where Out ( 1 ) = 0.5 and Out ( 2 ) = 0.4 , although Out ( 1 ) is greater than Out ( 2 ) , we can not guarantee that 1 is actually a correct label , because that 0.1 difference could have been resulted from the noise of using a low precision network . This is what we use as a confidence of the prediction . Instead of just finding a label with maximum probability , the system will now find two labels with first and second maximum probabilities , and compute the difference between those two probabilities . If the difference is large ( i.e. , beyond a threshold determined empirically ) , it means that the label with highest probability dominates other labels , so compressed network prediction can be considered confident . If the difference is small , it means that two labels with highest probabilities both have potentials to become a true label , so the prediction is considered not confident . In this case , the input needs additional verification from the original network that is designed to have maximum accuracy . 3 IMPLEMENTATION . Our implementation flow consists of three parts : creating original network and compressed network models , implementing high-level-synthesis ( HLS ) accelerator intellectual properties ( IPs ) for those networks , and creating a software system for hierarchical inference . | The paper at hand discusses a compressed network inference scheme, where two networks are trained to solve a give classification task. One network aims at achieving a high accuracy, whereas the other network is a highly compressed network which is able to highly speed-up inference. The compression of the network is performed by quantizing the parameters of the network to two or to three different values. The approach of the authors consists of estimating the uncertainty of the highly-compressed network by thresholding the scores. In the case that one score does not exceed the other scores by the pre-defined threshold, the sample will additionally be feed into the high-accuracy network. Experiments are performed on the CIFAR-10 and the ImageNet dataset using a convolutional neural network, a ResNet and a MobileNetV2 network. The speed-up is evaluated with respect to specialized hardware (FPGAs). | SP:d90cf59a526832aad0436f9b6e168cb9c08568f8 |
TwinDNN: A Tale of Two Deep Neural Networks | 1 INTRODUCTION . Machine learning is one of the most popular fields in the current era . It is used in various ways , such as speech recognition , face recognition , medical diagnosis , etc . However , the problem is that the neural networks for machine learning applications Krizhevsky et al . ( 2012 ) ; He et al . ( 2016a ; b ) are becoming too large and slow to be on a small chip for real-time systems . As a result , there has been a significant amount of research to reduce the size of the neural networks so that their inference latencies are low enough to handle real-time inputs Zhang et al . ( 2020 ) ; Zhou et al . ( 2016 ) ; Zhang et al . ( 2018 ) . There are quite a few approaches to compress existing neural networks , but for field-programmable gate arrays ( FPGAs ) , quantization of network is the most popular and effective method to reduce the size and inference latency at the same time Han et al . ( 2016 ) . In particular , extremely low bit-width networks on FPGAs , such as binary or ternary neural networks have been studied recently Wang et al . ( 2018 ) ; Courbariaux & Bengio ( 2016 ) ; Courbariaux et al . ( 2015 ) ; Zhao et al . ( 2017 ) ; Yao Chen & Chen ( 2019 ) ; Li & Liu ( 2016 ) ; Blott et al . ( 2018 ) . These networks provide an extra benefit that normal quantized networks do not provide in terms of multiplier ( DSP ) utilization . The idea is that extremely low bit-width weights allow multiplications to be done in conditional logic , which can be implemented by logic gates , without using a special hardware for multiplication ( DSP ) . This fact can allow developers to utilize additional DSPs in other ways where DSPs can be useful . However , this benefit is not free , of course . One major downside of these low bit-width networks is that they tend to have even more accuracy drop than regular quantized neural networks , as a result of further reduced precision . Therefore , it is more difficult to use binary or ternary neural networks as they are , especially in the fields such as surveillance or medical diagnosis systems , where the cost of that accuracy drop is much larger than the latency improvement . The goal of this study is to accelerate neural network inferences by using an extremely low bitwidth network implementations on FPGAs , while maintaining the accuracy of the original network by using relatively high precision network concurrently , without having to develop a single DNN accelerator that meets both accuracy and latency requirements . The main contribution is to find a mechanism to choose the right network to infer for specific inputs , and this is done by creating a hierarchical structure of two different compressed networks and utilizing the output of the initial inference to determine the need of extra verification . In summary , we propose a system that consists of two distinct networks : one extremely low bit-width network that is focused on latency , and the other moderately quantized network that is focused on accuracy . In this paper , extremely low bit-width network will be called a compressed network , and moderately quantized network will be called an original network . These two networks work in a way that can exploit advantages in both latency and accuracy at the same time . The overall mechanism is similar to the one presented in Mocerino & Calimera ( 2014 ) . However , there has not been any study of this concept in FPGA accelerators for deep neural networks . This represents a novel direction in neural network research , to pair compressed network and original network in parallel in order to improve latency while maintaining the original accuracy . Our main contributions are as follows : • Accelerators that are designed and optimized to exploit low bit-width networks , with pipelined and parallelized computation engines that use a minimum number of DSPs as possible . • A software solution that allows two accelerators to be run in hierarchical fashion , utilizing confidence of a compressed network prediction . • For ImageNet and ResNet-18 , our TwinDNN solution can deliver up to 1.9× latency improvement with only 3 % of extra DSPs used for compressed network , and up to 95 % of accuracy loss is recovered during hierarchical inference . In Section 2 , some background information related to this work will be introduced . In Section 3 , design flow of our implementation and experiment will be explained . In Section 4 , the results of our experiments will be described . Section 5 will conclude the paper with future explorations . 2 BACKGROUND . 2.1 EXTREMELY LOW BIT-WIDTH NEURAL NETWORKS . Recent researches have succeeded in binarizing or ternarizing parts of layers in neural networks Wang et al . ( 2018 ) ; Courbariaux & Bengio ( 2016 ) ; Courbariaux et al . ( 2015 ) ; Zhao et al . ( 2017 ) ; Yao Chen & Chen ( 2019 ) . Many experiments claim that these compression methods are very effective in terms of latency reduction with some accuracy drops . As one would expect , as the number of bits used to represent either weights or feature maps decreases , accuracy drops more significantly . Because the goal of our study is to compensate for the accuracy loss caused by compression , we can forgive moderate accuracy loss , as long as the benefit of using those networks is significant . The following equations : wb = { −wscale if b = 0 +wscale if b = 1 wt = { −wscale if t = −1 +wscale if t = 1 0 if t = 0 ( 1 ) show how these extremely low bit-width weights are used in computation . b is a 1-bit value that can be either 0 or 1 , and t is a 2-bit value that can take either -1 , 0 , or 1 . The key idea here is that wscale value is the same across the weights . The bits are only used in sign representations . In binary , as an example , a single bit of 0 represents negative and 1 represents positive , and this logic can be implemented in a simple condition , or a multiplexer in FPGAs . wscale value is stored separately , and the same wscale value is multiplied over all binary weights to get the actual weight values . However , we do not need to perform all of these multiplications separately . Consider b1 = 0 and b2 = 1 for the binary case . a stands for activation , or feature map , then we can express a very simple neural network computation as follows : anext = wb1 × a1 + wb2 × a2 = −wscale × a1 + wscale × a2 = wscale × ( −a1 + a2 ) ( 2 ) This shows how binary and ternary weight computations can be handled with a single multiplication . Reducing the number of actual multiplications reduces the need of DSPs , and indeed makes the overall computation faster . For ternary , the only difference is that two bits now represent positive , negative , and zero . Therefore , the main benefit of using extremely low bit-width neural networks is more effective and balanced resource utilization , specifically on FPGAs . For a typical DNN implementation on FPGAs , DSP is the one that directly determines the performance , and so is the limiting factor of the performance . Therefore , typical DNN implementations on FPGAs utilize nearly all the DSPs available , and other resources are left under-utilized . Extremely low bit-width networks , on the other hand , only uses a minimal number of DSPs , and mainly utilizes look-up tables ( LUTs ) , which are generally left unused for computation ( e.g. , only used for control logic ) . In this study , we instantiate both typical DNN ( original DNN ) and extremely low bit-width DNN ( compressed DNN ) at the same time , in a way that original DNN uses most of the DSPs available on the board , and compressed DNN uses extra LUTs that were not used by original DNN . This method allows us to utilize both DSP and LUT resources as much as possible to ultimately reduce the overall latency . 2.2 FINAL LAYER OUTPUTS IN NEURAL NETWORK . In neural network image classifications , output of the final layer is a list of values for each class , and the class with the highest final layer output is typically chosen as a prediction . Here , each value represents how possible is that image in the class , and we will call these values probabilities for convenience . Note that in order to compute the actual probabilities , we need to apply a softmax function to these values . However , we do not apply a softmax function here , because we only need to find the class with the highest value . Anyways , the point is that the output of a neural network provides more information than just a prediction . Specifically , it provides information about all probabilities of predictions that the input can be classified as . It is definitely possible to utilize this additional information to enhance the prediction . In this study , we will make use of the probability of the second most possible label . From compressed network inference output , along with the prediction itself , we also need to find out whether to infer the original network or not . The probability of the second most possible label is used here to determine if the prediction of compressed network is confident enough to be used as an actual output without verification from the original network . Here is an example of how we can utilize this information during inference . For handwritten digit recognition , let ’ s define Out ( x ) as final output value for label x . There is no problem if Out ( 0 ) = 0.9 and Out ( 1 ) , . . . , Out ( 9 ) < 0.1 , because the network is almost sure that the digit is 0 . However , in case where Out ( 1 ) = 0.5 and Out ( 2 ) = 0.4 , although Out ( 1 ) is greater than Out ( 2 ) , we can not guarantee that 1 is actually a correct label , because that 0.1 difference could have been resulted from the noise of using a low precision network . This is what we use as a confidence of the prediction . Instead of just finding a label with maximum probability , the system will now find two labels with first and second maximum probabilities , and compute the difference between those two probabilities . If the difference is large ( i.e. , beyond a threshold determined empirically ) , it means that the label with highest probability dominates other labels , so compressed network prediction can be considered confident . If the difference is small , it means that two labels with highest probabilities both have potentials to become a true label , so the prediction is considered not confident . In this case , the input needs additional verification from the original network that is designed to have maximum accuracy . 3 IMPLEMENTATION . Our implementation flow consists of three parts : creating original network and compressed network models , implementing high-level-synthesis ( HLS ) accelerator intellectual properties ( IPs ) for those networks , and creating a software system for hierarchical inference . | This paper proposes a framework to accelerate DNN inference on small embedding systems using an extremely low bit network and a moderately quantized network jointly. The mechanism of the proposed work is to first compute the difference using top2 prediction scores from the compressed network to determine if the inference is further needed for the original network. The proposed framework is evaluated on both CIFAR10 and ImageNet with different network structures and the empirical results indicate better accuracy and latency over baselines. | SP:d90cf59a526832aad0436f9b6e168cb9c08568f8 |
Rethinking Uncertainty in Deep Learning: Whether and How it Improves Robustness | 1 INTRODUCTION . Deep neural networks ( DNNs ) have achieved great success in image recognition ( Russakovsky et al. , 2015 ) , audio recognition ( Graves & Jaitly , 2014 ) , etc . However , as shown by ( Szegedy et al. , 2013 ) , DNNs are vulnerable to adversarial attacks , where slightly perturbed adversarial examples can easily fool DNN classifiers . The ubiquitous existence of adversarial examples ( Kurakin et al. , 2016 ) casts doubts on real-world DNN applications . Therefore , many techniques are proposed to enhance the robustness of DNNs to adversarial attacks ( Papernot et al. , 2016 ; Kannan et al. , 2018 ) . Regarding defenses to adversarial attacks , adversarial training ( AT ) ( Goodfellow et al. , 2014 ; Madry et al. , 2017 ) is commonly recognized as the most effective defense . However , it illustrates poor performance on clean examples and under attacks stronger than what they are trained on ( Song et al. , 2018 ) . Recent works ( Rice et al. , 2020 ) attribute such shortcomings to overfitting , but solutions , or even mitigation to them remain open problems . Meanwhile , many regularization techniques are proposed to improve robustness , among which two closely related regularizers , entropy maximization ( EntM ) and label smoothing ( LS ) show performance improvements under weak attacks ( Pang et al. , 2019 ; Shafahi et al. , 2019 ) without compromising accuracy on clean examples . However , as stated by ( Uesato et al. , 2018 ; Athalye et al. , 2018 ) , strong and various kinds of attacks should be used to better approximate the adversarial risk of a defense . Therefore , it remains doubtful how they perform under stronger attacks by themselves and how their adversarial risk is . One appealing property of both EntM and LS is that they both penalize over-confident predictions and promote prediction uncertainty ( Pereyra et al. , 2017 ; Szegedy et al. , 2016 ) . Therefore , both of them are used as regularizers that mitigate overfitting in multiple applications ( Müller et al. , 2019 ) . However , it remains unclear whether EntM and LS can effectively regularize AT , where many other regularizers are ineffective ( Rice et al. , 2020 ) . Therefore , in this paper , we perform an extensive empirical study on uncertainty promotion regularizers , i.e . entropy maximization and label smoothing , in the domain of adversarial machine learning . We carry out experiments on both regularizers , with and without AT , on multiple datasets and under various adversarial settings . We found out that , although neither EntM and LS are able to provide consistent robustness by themselves , both regular- izers complement AT and improve its performances consistently . Specifically , we observe not only better accuracy on clean examples , but also better robustness , especially under attacks with larger perturbations ( e.g . 9 % improvement under perturbation ε = 16/255 for models trained with 8/255 AT . See Table 1 and 3 ) . In addition , we investigate the underlying mechanisms about how EntM and LS complement AT , and attribute the improvements to the shrunken norm of Jacobian matrix ‖∇Xf ( X ; θ ) ‖ ( ∼10 times . See Sect . 6 ) , which indicates better numerical stability and hence better adversarial robustness than AT . To summarize , we make the following contributions : 1 . We carry out an extensive empirical study about whether uncertainty promotion regularizers , i.e . entropy maximization ( EntM ) and label smoothing ( LS ) , provide better robustness , and find out that while neither of them provides consistent robustness under strong attacks alone , both techniques serve as effective regularizers that improve the performance of AT consistently on multiple datasets , especially under large perturbations . 2 . We provide further analysis on uncertainty promotion regularizers from the perspective of Jacobian matrices , and find out that by applying such regularizers , the norm of Jacobian matrix ‖∇Xf ( X ; θ ) ‖ is significantly shrunken , leading to better numerical stability and adversarial robustness . 2 RELATED WORK AND DISCUSSIONS . Adversarial Attacks and Defenses . ( Szegedy et al. , 2013 ; Goodfellow et al. , 2014 ) pointed out the vulnerability of DNNs to adversarial examples , and proposed an efficient attack , the FGSM , to generate such examples . Since then , as increasingly strong adversaries Carlini & Wagner ( 2017 ) are proposed , AT ( Madry et al. , 2017 ) is considered as the most effective defense remaining . More recently , Zhang et al . ( 2019 ) proposes TRADES , extending AT and showing better robustness than Madry et al . ( 2017 ) . We refer readers to ( Yuan et al. , 2019 ; Biggio & Roli , 2018 ) for more comprehensive surveys on adversarial attacks and defenses . However , all AT methods illustrate common drawbacks . Specifically , Rice et al . ( 2020 ) shows that AT suffers from severe overfitting that can not be easily mitigated , which leads to multiple undesirable consequences . For example , AT performs poorly on clean examples , and Song et al . ( 2018 ) shows that AT overfits on the adversary it is trained on and performs poorly under other attacks . Uncertainty Promotion Techniques in Machine Learning . The principle of maximum entropy is widely accepted in not only physics , but also machine learning , such as reinforcement learning ( Ziebart et al. , 2008 ; Haarnoja et al. , 2018 ) . In supervised learning , uncertainty promotion techniques , including entropy maximization ( Pereyra et al. , 2017 ) and label smoothing ( Szegedy et al. , 2016 ) act on model outputs and can improve generalization in many applications , such as image classification and language modeling ( Pereyra et al. , 2017 ; Müller et al. , 2019 ; Szegedy et al. , 2016 ) . There are only several works that study uncertainty promotion techniques in the field of adversarial machine learning . ADP ( Pang et al. , 2019 ) claims that diversity promotion in ensembles can promote robustness , for which entropy maximization is used . Essentially , ADP consists of multiple mutually independent models that in total mimic the behavior of entropy maximization . However , ADP only shows improvements under weak attacks , e.g . PGD with 10 iterations . Shafahi et al . ( 2019 ) claims that label smoothing can improve robustness beyond AT by itself , yet the claim remains to be further investigated under a wider range of adversaries , e.g . adaptive attacks and black-box attacks . As stated by ( Uesato et al. , 2018 ; Athalye et al. , 2018 ) that , one should use strong and various attackers for better approximation of the adversarial risk ( Uesato et al. , 2018 ) , it remains unknown how much robustness EntM or LS alone can provide under strong and diverse attacks . Moreover , neither of these works study the relationship between AT and uncertainty promotion , which is an important open problem since many regularizers fail to mitigate the overfitting of AT ( Rice et al. , 2020 ) . We also discuss knowledge distillation ( KD ) ( Hinton et al. , 2015 ) as another line of work that introduces uncertainty . KD is a procedure that trains a student model to fit the outputs of a teacher network , which are also ’ soft ’ labels and introduce uncertainty . However , KD alone has been shown not to improve robustness ( Carlini & Wagner , 2016 ) . Also , while ( Goldblum et al. , 2020 ) proposed adversarially robust distillation ( ARD ) , combining AT and KD , ARD primarily aims to build robust models upon robust pre-trained teacher models , while we primarily study uncertainty and do not rely on pre-trained teacher models . Therefore we consider ARD to be orthogonal to our work . 3 PRELIMINARIES . Notations . We denote a dataset D = { X ( i ) , y ( i ) } ni=1 , where X ( i ) ∈ Rd are input data , y ( i ) ∈ RC are one-hot vectors for labels . We denote a DNN parameterized by θ as f ( X ; θ ) : Rd → RC , which outputs logits on C classes . We denote fσ ( X ; θ ) = σ ◦ f ( X ; θ ) , the network followed by softmax activation . We denote the cross entropy loss as CE ( ŷ , y ) = − ∑C i=1 yi log ŷi , the Shannon entropy as H ( p ) = − ∑C i=1 pi log pi and the Kullback-Leibler divergence as DKL ( p‖q ) = ∑C i=1 pi log pi qi . Adversarial Attacks and Adversarial Training . Given a data-label pair ( X , y ) and a neural network f ( X ; θ ) , adversarial attacks aim to craft an adversarial example X ( adv ) , ‖X ( adv ) −X‖ ≤ ε , so as to fool f ( X ; θ ) . Such goal can be formulated as the problem : X ( adv ) = argmax X′ Latk ( fσ ( X ′ ; θ ) , y ) , subject to‖X ′ −X‖ ≤ ε . ( 1 ) whereLatk is some loss function , generally taken as CE . Eqn . 1 can generally be solved via iterative optimization , such as Projected Gradient Descent ( PGD ) ( Madry et al. , 2017 ) . Adversarial Training ( AT ) is generally considered the most effective defense against adversarial attacks , where the training set consists of both clean examples and adversarial examples , and the following objective is minimized ( Goodfellow et al. , 2014 ) , min θ E ( X , y ) ∼D [ αCE ( fσ ( X ; θ ) , y ) + ( 1− α ) max ‖X ( adv ) −X‖≤ε CE ( fσ ( X ( adv ) ; θ ) , y ) ] , ( 2 ) where the inner maximization is commonly solved via PGD . We specifically denote AT which uses PGD to solve the inner problem as PAT ( Madry et al. , 2017 ) . TRADES ( Zhang et al. , 2019 ) extends PAT by optimizing Eqn . 3 in similar min-max styles , leading to better robustness than PAT . min θ E ( X , y ) ∼D [ CE ( fσ ( X ; θ ) , y ) + β max ‖X ( adv ) −X‖≤ε DKL ( fσ ( X ( adv ) ; θ ) ‖fσ ( X ; θ ) ) ] . ( 3 ) 4 METHODOLOGY . 4.1 ENTROPY MAXIMIZATION . Given an example ( X , y ) and a neural network f ( X ; θ ) , the proposed entropy maximization ( EntM ) minimizes the cross entropy loss , while maximizing the Shannon entropy of the output probability . Lentm ( X , y ) = CE ( fσ ( X ; θ ) , y ) − λH ( fσ ( X ; θ ) ) , ( 4 ) where λ is a hyperparameter controlling the strength of entropy maximization . For normal training , we minimize over E ( X , y ) ∼D [ Lentm ( X , y ) ] ; for AT , such as PAT and TRADES , we replace CE with Lentm in Eqn . 2 , which for PAT yields Eqn . 5 , and similarly for TRADES : min θ E ( X , y ) ∼D [ αLentm ( fσ ( X ; θ ) , y ) + ( 1− α ) max ‖X ( adv ) −X‖≤ε Lentm ( fσ ( X ( adv ) ; θ ) , y ) ] , ( 5 ) The entropy maximization term penalizes for over-confident outputs and encourages uncertain predictions , which is different from CE encouraging one-hot outputs . Such a formulation is also seen in ( Pereyra et al. , 2017 ; Dubey et al. , 2018 ) in general deep learning and fine-grained classification . | The authors combine adversarial training with two methods that increase the entropy of the output distribution of neural networks (label smoothing and entropy maximization). The authors find that this combination of ideas increases adversarial robustness on standard benchmarks, especially in the regime of large perturbation budgets (e.g., 16/255 on CIFAR-10). The authors also investigate the effect of their methods on the classification margin to understand the increase in adversarial accuracy. | SP:a727adb9f6aec44cd84d176e54d7578ed9ab023a |
Rethinking Uncertainty in Deep Learning: Whether and How it Improves Robustness | 1 INTRODUCTION . Deep neural networks ( DNNs ) have achieved great success in image recognition ( Russakovsky et al. , 2015 ) , audio recognition ( Graves & Jaitly , 2014 ) , etc . However , as shown by ( Szegedy et al. , 2013 ) , DNNs are vulnerable to adversarial attacks , where slightly perturbed adversarial examples can easily fool DNN classifiers . The ubiquitous existence of adversarial examples ( Kurakin et al. , 2016 ) casts doubts on real-world DNN applications . Therefore , many techniques are proposed to enhance the robustness of DNNs to adversarial attacks ( Papernot et al. , 2016 ; Kannan et al. , 2018 ) . Regarding defenses to adversarial attacks , adversarial training ( AT ) ( Goodfellow et al. , 2014 ; Madry et al. , 2017 ) is commonly recognized as the most effective defense . However , it illustrates poor performance on clean examples and under attacks stronger than what they are trained on ( Song et al. , 2018 ) . Recent works ( Rice et al. , 2020 ) attribute such shortcomings to overfitting , but solutions , or even mitigation to them remain open problems . Meanwhile , many regularization techniques are proposed to improve robustness , among which two closely related regularizers , entropy maximization ( EntM ) and label smoothing ( LS ) show performance improvements under weak attacks ( Pang et al. , 2019 ; Shafahi et al. , 2019 ) without compromising accuracy on clean examples . However , as stated by ( Uesato et al. , 2018 ; Athalye et al. , 2018 ) , strong and various kinds of attacks should be used to better approximate the adversarial risk of a defense . Therefore , it remains doubtful how they perform under stronger attacks by themselves and how their adversarial risk is . One appealing property of both EntM and LS is that they both penalize over-confident predictions and promote prediction uncertainty ( Pereyra et al. , 2017 ; Szegedy et al. , 2016 ) . Therefore , both of them are used as regularizers that mitigate overfitting in multiple applications ( Müller et al. , 2019 ) . However , it remains unclear whether EntM and LS can effectively regularize AT , where many other regularizers are ineffective ( Rice et al. , 2020 ) . Therefore , in this paper , we perform an extensive empirical study on uncertainty promotion regularizers , i.e . entropy maximization and label smoothing , in the domain of adversarial machine learning . We carry out experiments on both regularizers , with and without AT , on multiple datasets and under various adversarial settings . We found out that , although neither EntM and LS are able to provide consistent robustness by themselves , both regular- izers complement AT and improve its performances consistently . Specifically , we observe not only better accuracy on clean examples , but also better robustness , especially under attacks with larger perturbations ( e.g . 9 % improvement under perturbation ε = 16/255 for models trained with 8/255 AT . See Table 1 and 3 ) . In addition , we investigate the underlying mechanisms about how EntM and LS complement AT , and attribute the improvements to the shrunken norm of Jacobian matrix ‖∇Xf ( X ; θ ) ‖ ( ∼10 times . See Sect . 6 ) , which indicates better numerical stability and hence better adversarial robustness than AT . To summarize , we make the following contributions : 1 . We carry out an extensive empirical study about whether uncertainty promotion regularizers , i.e . entropy maximization ( EntM ) and label smoothing ( LS ) , provide better robustness , and find out that while neither of them provides consistent robustness under strong attacks alone , both techniques serve as effective regularizers that improve the performance of AT consistently on multiple datasets , especially under large perturbations . 2 . We provide further analysis on uncertainty promotion regularizers from the perspective of Jacobian matrices , and find out that by applying such regularizers , the norm of Jacobian matrix ‖∇Xf ( X ; θ ) ‖ is significantly shrunken , leading to better numerical stability and adversarial robustness . 2 RELATED WORK AND DISCUSSIONS . Adversarial Attacks and Defenses . ( Szegedy et al. , 2013 ; Goodfellow et al. , 2014 ) pointed out the vulnerability of DNNs to adversarial examples , and proposed an efficient attack , the FGSM , to generate such examples . Since then , as increasingly strong adversaries Carlini & Wagner ( 2017 ) are proposed , AT ( Madry et al. , 2017 ) is considered as the most effective defense remaining . More recently , Zhang et al . ( 2019 ) proposes TRADES , extending AT and showing better robustness than Madry et al . ( 2017 ) . We refer readers to ( Yuan et al. , 2019 ; Biggio & Roli , 2018 ) for more comprehensive surveys on adversarial attacks and defenses . However , all AT methods illustrate common drawbacks . Specifically , Rice et al . ( 2020 ) shows that AT suffers from severe overfitting that can not be easily mitigated , which leads to multiple undesirable consequences . For example , AT performs poorly on clean examples , and Song et al . ( 2018 ) shows that AT overfits on the adversary it is trained on and performs poorly under other attacks . Uncertainty Promotion Techniques in Machine Learning . The principle of maximum entropy is widely accepted in not only physics , but also machine learning , such as reinforcement learning ( Ziebart et al. , 2008 ; Haarnoja et al. , 2018 ) . In supervised learning , uncertainty promotion techniques , including entropy maximization ( Pereyra et al. , 2017 ) and label smoothing ( Szegedy et al. , 2016 ) act on model outputs and can improve generalization in many applications , such as image classification and language modeling ( Pereyra et al. , 2017 ; Müller et al. , 2019 ; Szegedy et al. , 2016 ) . There are only several works that study uncertainty promotion techniques in the field of adversarial machine learning . ADP ( Pang et al. , 2019 ) claims that diversity promotion in ensembles can promote robustness , for which entropy maximization is used . Essentially , ADP consists of multiple mutually independent models that in total mimic the behavior of entropy maximization . However , ADP only shows improvements under weak attacks , e.g . PGD with 10 iterations . Shafahi et al . ( 2019 ) claims that label smoothing can improve robustness beyond AT by itself , yet the claim remains to be further investigated under a wider range of adversaries , e.g . adaptive attacks and black-box attacks . As stated by ( Uesato et al. , 2018 ; Athalye et al. , 2018 ) that , one should use strong and various attackers for better approximation of the adversarial risk ( Uesato et al. , 2018 ) , it remains unknown how much robustness EntM or LS alone can provide under strong and diverse attacks . Moreover , neither of these works study the relationship between AT and uncertainty promotion , which is an important open problem since many regularizers fail to mitigate the overfitting of AT ( Rice et al. , 2020 ) . We also discuss knowledge distillation ( KD ) ( Hinton et al. , 2015 ) as another line of work that introduces uncertainty . KD is a procedure that trains a student model to fit the outputs of a teacher network , which are also ’ soft ’ labels and introduce uncertainty . However , KD alone has been shown not to improve robustness ( Carlini & Wagner , 2016 ) . Also , while ( Goldblum et al. , 2020 ) proposed adversarially robust distillation ( ARD ) , combining AT and KD , ARD primarily aims to build robust models upon robust pre-trained teacher models , while we primarily study uncertainty and do not rely on pre-trained teacher models . Therefore we consider ARD to be orthogonal to our work . 3 PRELIMINARIES . Notations . We denote a dataset D = { X ( i ) , y ( i ) } ni=1 , where X ( i ) ∈ Rd are input data , y ( i ) ∈ RC are one-hot vectors for labels . We denote a DNN parameterized by θ as f ( X ; θ ) : Rd → RC , which outputs logits on C classes . We denote fσ ( X ; θ ) = σ ◦ f ( X ; θ ) , the network followed by softmax activation . We denote the cross entropy loss as CE ( ŷ , y ) = − ∑C i=1 yi log ŷi , the Shannon entropy as H ( p ) = − ∑C i=1 pi log pi and the Kullback-Leibler divergence as DKL ( p‖q ) = ∑C i=1 pi log pi qi . Adversarial Attacks and Adversarial Training . Given a data-label pair ( X , y ) and a neural network f ( X ; θ ) , adversarial attacks aim to craft an adversarial example X ( adv ) , ‖X ( adv ) −X‖ ≤ ε , so as to fool f ( X ; θ ) . Such goal can be formulated as the problem : X ( adv ) = argmax X′ Latk ( fσ ( X ′ ; θ ) , y ) , subject to‖X ′ −X‖ ≤ ε . ( 1 ) whereLatk is some loss function , generally taken as CE . Eqn . 1 can generally be solved via iterative optimization , such as Projected Gradient Descent ( PGD ) ( Madry et al. , 2017 ) . Adversarial Training ( AT ) is generally considered the most effective defense against adversarial attacks , where the training set consists of both clean examples and adversarial examples , and the following objective is minimized ( Goodfellow et al. , 2014 ) , min θ E ( X , y ) ∼D [ αCE ( fσ ( X ; θ ) , y ) + ( 1− α ) max ‖X ( adv ) −X‖≤ε CE ( fσ ( X ( adv ) ; θ ) , y ) ] , ( 2 ) where the inner maximization is commonly solved via PGD . We specifically denote AT which uses PGD to solve the inner problem as PAT ( Madry et al. , 2017 ) . TRADES ( Zhang et al. , 2019 ) extends PAT by optimizing Eqn . 3 in similar min-max styles , leading to better robustness than PAT . min θ E ( X , y ) ∼D [ CE ( fσ ( X ; θ ) , y ) + β max ‖X ( adv ) −X‖≤ε DKL ( fσ ( X ( adv ) ; θ ) ‖fσ ( X ; θ ) ) ] . ( 3 ) 4 METHODOLOGY . 4.1 ENTROPY MAXIMIZATION . Given an example ( X , y ) and a neural network f ( X ; θ ) , the proposed entropy maximization ( EntM ) minimizes the cross entropy loss , while maximizing the Shannon entropy of the output probability . Lentm ( X , y ) = CE ( fσ ( X ; θ ) , y ) − λH ( fσ ( X ; θ ) ) , ( 4 ) where λ is a hyperparameter controlling the strength of entropy maximization . For normal training , we minimize over E ( X , y ) ∼D [ Lentm ( X , y ) ] ; for AT , such as PAT and TRADES , we replace CE with Lentm in Eqn . 2 , which for PAT yields Eqn . 5 , and similarly for TRADES : min θ E ( X , y ) ∼D [ αLentm ( fσ ( X ; θ ) , y ) + ( 1− α ) max ‖X ( adv ) −X‖≤ε Lentm ( fσ ( X ( adv ) ; θ ) , y ) ] , ( 5 ) The entropy maximization term penalizes for over-confident outputs and encourages uncertain predictions , which is different from CE encouraging one-hot outputs . Such a formulation is also seen in ( Pereyra et al. , 2017 ; Dubey et al. , 2018 ) in general deep learning and fine-grained classification . | This paper investigates the complementary mechanisms of adversarial training and uncertainty promoting regularizers. In the field of adversarial machine learning, adversarial training as proposed by Madry et al. 2017 has been the common method. In the field of uncertainty regularization, maximum entropy and label smoothing have been the accepted methods. However, the combination of both has not been investigated before. The paper provides extensive experiments on these methods. The final section gives insights in the theory behind adversarial training and uncertainty promoting regularization, where they show that the combined method increases a notion of normalized margin and a notion of adversarial robustness. | SP:a727adb9f6aec44cd84d176e54d7578ed9ab023a |
A Representational Model of Grid Cells' Path Integration Based on Matrix Lie Algebras | 1 INTRODUCTION . Imagine walking in the darkness . Purely based on your sense of self-motion , you can gain a sense of self-position by integrating the self movement - a process often referred to as path integration ( Darwin , 1873 ; Etienne & Jeffery , 2004 ; Hafting et al. , 2005 ; Fiete et al. , 2008 ; McNaughton et al. , 2006 ) . While the exact neural underpinning of path integration remains unclear , it has been hypothesized that the grid cells ( Hafting et al. , 2005 ; Fyhn et al. , 2008 ; Yartsev et al. , 2011 ; Killian et al. , 2012 ; Jacobs et al. , 2013 ; Doeller et al. , 2010 ) in the mammalian medial entorhinal cortex ( mEC ) may be involved in this process ( Gil et al. , 2018 ; Ridler et al. , 2019 ; Horner et al. , 2016 ) . The grid cells are so named because individual neurons exhibit striking firing patterns that form hexagonal grid patterns when the agent ( such as a rat ) navigates in a 2D open field ( Fyhn et al. , 2004 ; Hafting et al. , 2005 ; Fuhs & Touretzky , 2006 ; Burak & Fiete , 2009 ; Sreenivasan & Fiete , 2011 ; Blair et al. , 2007 ; Couey et al. , 2013 ; de Almeida et al. , 2009 ; Pastoll et al. , 2013 ; Agmon & Burak , 2020 ) . The grid cells interact with the place cells in the hippocampus ( O ’ Keefe , 1979 ) . Unlike a grid cell that fires at the vertices of a lattice , a place cell often fires at a single or a few locations . The purpose of this paper is to understand how the grid cells may perform path integration ( or “ path integration calculations ” ) . We propose a representational model in which the self-position is represented by the population activity vector formed by grid cells , and the self-motion is represented by the rotation of this vector . Specifically , our model consists of two coupled systems : ( 1 ) When the agent moves along a certain direction , the vector is rotated by a generator matrix of a Lie algebra . ( 2 ) When the agent changes movement direction , the generator matrix itself is rotated by yet another generator matrix of a different Lie algebra . Our numerical experiments demonstrate that our model learns hexagon grid patterns which share many properties of the grid cells in the rodent brain . Furthermore , the learned model is capable of near exact path integration , and it is also capable of error correction . Our model is novel and simple , with explicit geometric and algebraic structures . The population activity vector formed by the grid cells rotates in the “ mental ” or neural space , monitoring the egocentric self-motion of the agent in the physical space . This model also connects naturally to the basis expansion model that decomposes the response maps of place cells as linear expansions of response maps of grid cells ( Dordek et al. , 2016 ; Sorscher et al. , 2019 ) . Overall , our model provides a new conceptual framework to study the grid cell systems in the brain by considering the structure of the intrinsic symmetry ( through Lie algebra ) of the task which the path integration system is solving . 2 REPRESENTATIONAL MODEL FOR PATH INTEGRATION . Consider an agent navigating within a squared domain ( theoretically the domain can be R2 ) . Let x = ( x1 , x2 ) be the self-position of the agent in a 2D environment . At self-position x , if the agent makes a displacement δr along the direction θ ∈ [ 0 , 2π ] , then the self-position is changed to x + δx , where δx = ( δx1 , δx2 ) = ( δr cos θ , δr sin θ ) . In our model , we use a polar coordinate system ( see figure 1a , b ) by directly using ( θ , δr ) , while only keeping ( δx1 , δx2 ) implicit . ( θ , δr ) is the biologically plausible egocentric representation of self-motion . We assume that the location x in the 2D environment is encoded by the response pattern of a population of d neurons ( e.g. , d = 200 ) , which correspond to a d-dimensional vector v ( x ) = ( vi ( x ) , i = 1 , ... , d ) > , with each element representing the firing rate of one neuron when the animal is at location x . From the embedding point of view , essentially we embed the 2D domain in R2 as a 2D manifold in a higher dimensional space Rd . Locally we embed the 2D local polar system centered at x ( see figure 1a , b ) into Rd so that it becomes a local system around v ( x ) ( see figure 1c ) . 2.1 THE PROPOSED REPRESENTATIONAL MODEL : COUPLING TWO ROTATION SYSTEMS . Assuming δr to be infinitesimal , we propose the following model v ( x + δx ) = ( I + B ( θ ) δr ) v ( x ) + o ( δr ) , ( 1 ) which parameterizes a recurrent neural network ( Hochreiter & Schmidhuber , 1997 ) , where I is the identity matrix , and B ( θ ) is a d-dimensional matrix depending on the direction θ , which will need to be learned . Rotation . We assume B ( θ ) = −B ( θ ) > , i.e. , skew-symmetric , so that I + B ( θ ) δr is a rotation or orthogonal matrix , due to that ( I + B ( θ ) δr ) ( I + B ( θ ) δr ) > = I +O ( δr2 ) . Because the upper triangle part of B ( θ ) is the negative of the transpose of the lower triangle part ( the diagonal elements are zeros ) , in fact we only need to learn its lower triangle part . The geometric interpretation is that , if the agent moves along the direction θ , the vector v ( x ) is rotated by the matrix B ( θ ) , while the ` 2 norm ‖v ( x ) ‖2 remains stable ( figure 1c ) . We may interpret ‖v ( x ) ‖2 = ∑d i=1 vi ( x ) 2 as the total energy of grid cells , which is stable across different locations . From embedding point of view , the local polar system in figure 1a is embedded into a d-dimensional sphere in neural response space . When the agent makes an infinitesimal change of direction from θ to θ + δθ , B ( θ ) is changed to B ( θ + δθ ) . We assume B ( θ + δθ ) = ( I + Cδθ ) B ( θ ) + o ( δθ ) , ( 2 ) where C is a d-dimensional matrix , which is also to be learned . We again assumes C = −C > , so that I + Cδθ is a rotation matrix . The geometric interpretation is that if the agent changes direction , B ( θ ) is rotated by C. Equations ( 1 ) and ( 2 ) together define our proposed model for path integration , which couples two rotation systems . 2.2 A MIRROR OF EGOCENTRIC MOTION : PRESERVING LOCAL GEOMETRIC RELATIONS . As a representational model , equations ( 1 ) and ( 2 ) form a mirror in the d-dimensional “ mental ” ( or neural ) space for the egocentric motion in the 2D physical space . Importantly , the embedding preserves the local geometric relations of the local polar system . Let δθv ( x ) = v ( x + δx ) − v ( x ) be the displacement of v ( x ) when the agent moves from x by δr along direction θ . It follows from equation ( 1 ) that δθv ( x ) = ( B ( θ ) δr + o ( δr ) ) v ( x ) . Ignoring high order terms , we obtain δθ+δθv ( x ) = ( I + Cδθ ) δθv ( x ) . That is , with δr fixed , the local change of v ( x ) along different θ are rotated versions of each other , mirroring the local polar system at x . See figure 1 for an illustration . As for the angle between v ( x ) and v ( x + δx ) , i.e. , how much the vector v rotates in the neural space as the agent moves in 2D physical space by δr , we have Proposition 1 In the above notation , let δα be the angle between v ( x ) and v ( x + δx ) , we have δα = βδr +O ( δr2 ) , where δr = ‖δx‖ , and β = ‖B ( θ ) v ( x ) ‖2/‖v ( x ) ‖2 is independent of θ . See Supplementary A.1 for a proof . That means , the angle δα in the d-dimensional neural space is proportional to the Euclidean distance δr in the 2D space , and more importantly the angle δα is independent of direction θ , i.e. , β is isotropic . 2.3 HEXAGON GRID PATTERNS . For the learned model , β can be much bigger than 1 , so that the vector v ( x ) will rotate back to itself in a short distance , causing the periodic patterns of v ( x ) . Moreover , β does not depend on the direction of self-motion , and this isotropic property appears to underly the emergent hexagonal periodic patterns , as suggested by the following result . The hexagon grid patterns can be created by linearly mixing three Fourier plane waves whose directions are 2π/3 apart . In the following , we state a theoretical result adapted from Gao et al . ( 2018 ) that connects such linearly mixed Fourier waves to the geometric property in Proposition 1 in the previous subsection . Proposition 2 Let e ( x ) = ( exp ( i〈aj , x〉 ) , j = 1 , 2 , 3 ) > , where ( aj , j = 1 , 2 , 3 ) are three 2D vectors of equal norm , and the angle between every pair of them is 2π/3 . Let v ( x ) = Ue ( x ) , where U is an arbitrary unitary matrix , i.e. , U∗U = I . Let δα be the angle between v ( x ) and v ( x + δx ) , we have δα = βδr + O ( δr2 ) , where δr = ‖δx‖ , and β ∝ ‖aj‖ is independent of the direction of δx . See Supplementary A.1 for a proof , which relies on the fact that ( aj , j = 1 , 2 , 3 ) forms a tight frame in 2D . Proposition 2 says that the geometric property that emerges from our model as elucidated by Proposition 1 is satisfied by the orthogonal mixing of three Fourier plane waves that creates hexagonal grid patterns . We are currently pursuing a more general analysis of our model , i.e. , equations ( 1 ) and ( 2 ) . | The authors develop a model for learning the observed responses of grid cells (GC) in the entorhinal cortex from the animal movement vectors. Their key assumption is that the GC activity vector rotates with the movement magnitude according to the Lie group formalism and the corresponding Lie group generator is also rotated by the change in movement orientation. Their claim is supported by a numerical optimization of the objective function reflecting these assumptions as well as the projection onto the place cell representation in the hippocampus. | SP:ed01a0233c76094bf814ffeb5fcc10548a26e4bd |
A Representational Model of Grid Cells' Path Integration Based on Matrix Lie Algebras | 1 INTRODUCTION . Imagine walking in the darkness . Purely based on your sense of self-motion , you can gain a sense of self-position by integrating the self movement - a process often referred to as path integration ( Darwin , 1873 ; Etienne & Jeffery , 2004 ; Hafting et al. , 2005 ; Fiete et al. , 2008 ; McNaughton et al. , 2006 ) . While the exact neural underpinning of path integration remains unclear , it has been hypothesized that the grid cells ( Hafting et al. , 2005 ; Fyhn et al. , 2008 ; Yartsev et al. , 2011 ; Killian et al. , 2012 ; Jacobs et al. , 2013 ; Doeller et al. , 2010 ) in the mammalian medial entorhinal cortex ( mEC ) may be involved in this process ( Gil et al. , 2018 ; Ridler et al. , 2019 ; Horner et al. , 2016 ) . The grid cells are so named because individual neurons exhibit striking firing patterns that form hexagonal grid patterns when the agent ( such as a rat ) navigates in a 2D open field ( Fyhn et al. , 2004 ; Hafting et al. , 2005 ; Fuhs & Touretzky , 2006 ; Burak & Fiete , 2009 ; Sreenivasan & Fiete , 2011 ; Blair et al. , 2007 ; Couey et al. , 2013 ; de Almeida et al. , 2009 ; Pastoll et al. , 2013 ; Agmon & Burak , 2020 ) . The grid cells interact with the place cells in the hippocampus ( O ’ Keefe , 1979 ) . Unlike a grid cell that fires at the vertices of a lattice , a place cell often fires at a single or a few locations . The purpose of this paper is to understand how the grid cells may perform path integration ( or “ path integration calculations ” ) . We propose a representational model in which the self-position is represented by the population activity vector formed by grid cells , and the self-motion is represented by the rotation of this vector . Specifically , our model consists of two coupled systems : ( 1 ) When the agent moves along a certain direction , the vector is rotated by a generator matrix of a Lie algebra . ( 2 ) When the agent changes movement direction , the generator matrix itself is rotated by yet another generator matrix of a different Lie algebra . Our numerical experiments demonstrate that our model learns hexagon grid patterns which share many properties of the grid cells in the rodent brain . Furthermore , the learned model is capable of near exact path integration , and it is also capable of error correction . Our model is novel and simple , with explicit geometric and algebraic structures . The population activity vector formed by the grid cells rotates in the “ mental ” or neural space , monitoring the egocentric self-motion of the agent in the physical space . This model also connects naturally to the basis expansion model that decomposes the response maps of place cells as linear expansions of response maps of grid cells ( Dordek et al. , 2016 ; Sorscher et al. , 2019 ) . Overall , our model provides a new conceptual framework to study the grid cell systems in the brain by considering the structure of the intrinsic symmetry ( through Lie algebra ) of the task which the path integration system is solving . 2 REPRESENTATIONAL MODEL FOR PATH INTEGRATION . Consider an agent navigating within a squared domain ( theoretically the domain can be R2 ) . Let x = ( x1 , x2 ) be the self-position of the agent in a 2D environment . At self-position x , if the agent makes a displacement δr along the direction θ ∈ [ 0 , 2π ] , then the self-position is changed to x + δx , where δx = ( δx1 , δx2 ) = ( δr cos θ , δr sin θ ) . In our model , we use a polar coordinate system ( see figure 1a , b ) by directly using ( θ , δr ) , while only keeping ( δx1 , δx2 ) implicit . ( θ , δr ) is the biologically plausible egocentric representation of self-motion . We assume that the location x in the 2D environment is encoded by the response pattern of a population of d neurons ( e.g. , d = 200 ) , which correspond to a d-dimensional vector v ( x ) = ( vi ( x ) , i = 1 , ... , d ) > , with each element representing the firing rate of one neuron when the animal is at location x . From the embedding point of view , essentially we embed the 2D domain in R2 as a 2D manifold in a higher dimensional space Rd . Locally we embed the 2D local polar system centered at x ( see figure 1a , b ) into Rd so that it becomes a local system around v ( x ) ( see figure 1c ) . 2.1 THE PROPOSED REPRESENTATIONAL MODEL : COUPLING TWO ROTATION SYSTEMS . Assuming δr to be infinitesimal , we propose the following model v ( x + δx ) = ( I + B ( θ ) δr ) v ( x ) + o ( δr ) , ( 1 ) which parameterizes a recurrent neural network ( Hochreiter & Schmidhuber , 1997 ) , where I is the identity matrix , and B ( θ ) is a d-dimensional matrix depending on the direction θ , which will need to be learned . Rotation . We assume B ( θ ) = −B ( θ ) > , i.e. , skew-symmetric , so that I + B ( θ ) δr is a rotation or orthogonal matrix , due to that ( I + B ( θ ) δr ) ( I + B ( θ ) δr ) > = I +O ( δr2 ) . Because the upper triangle part of B ( θ ) is the negative of the transpose of the lower triangle part ( the diagonal elements are zeros ) , in fact we only need to learn its lower triangle part . The geometric interpretation is that , if the agent moves along the direction θ , the vector v ( x ) is rotated by the matrix B ( θ ) , while the ` 2 norm ‖v ( x ) ‖2 remains stable ( figure 1c ) . We may interpret ‖v ( x ) ‖2 = ∑d i=1 vi ( x ) 2 as the total energy of grid cells , which is stable across different locations . From embedding point of view , the local polar system in figure 1a is embedded into a d-dimensional sphere in neural response space . When the agent makes an infinitesimal change of direction from θ to θ + δθ , B ( θ ) is changed to B ( θ + δθ ) . We assume B ( θ + δθ ) = ( I + Cδθ ) B ( θ ) + o ( δθ ) , ( 2 ) where C is a d-dimensional matrix , which is also to be learned . We again assumes C = −C > , so that I + Cδθ is a rotation matrix . The geometric interpretation is that if the agent changes direction , B ( θ ) is rotated by C. Equations ( 1 ) and ( 2 ) together define our proposed model for path integration , which couples two rotation systems . 2.2 A MIRROR OF EGOCENTRIC MOTION : PRESERVING LOCAL GEOMETRIC RELATIONS . As a representational model , equations ( 1 ) and ( 2 ) form a mirror in the d-dimensional “ mental ” ( or neural ) space for the egocentric motion in the 2D physical space . Importantly , the embedding preserves the local geometric relations of the local polar system . Let δθv ( x ) = v ( x + δx ) − v ( x ) be the displacement of v ( x ) when the agent moves from x by δr along direction θ . It follows from equation ( 1 ) that δθv ( x ) = ( B ( θ ) δr + o ( δr ) ) v ( x ) . Ignoring high order terms , we obtain δθ+δθv ( x ) = ( I + Cδθ ) δθv ( x ) . That is , with δr fixed , the local change of v ( x ) along different θ are rotated versions of each other , mirroring the local polar system at x . See figure 1 for an illustration . As for the angle between v ( x ) and v ( x + δx ) , i.e. , how much the vector v rotates in the neural space as the agent moves in 2D physical space by δr , we have Proposition 1 In the above notation , let δα be the angle between v ( x ) and v ( x + δx ) , we have δα = βδr +O ( δr2 ) , where δr = ‖δx‖ , and β = ‖B ( θ ) v ( x ) ‖2/‖v ( x ) ‖2 is independent of θ . See Supplementary A.1 for a proof . That means , the angle δα in the d-dimensional neural space is proportional to the Euclidean distance δr in the 2D space , and more importantly the angle δα is independent of direction θ , i.e. , β is isotropic . 2.3 HEXAGON GRID PATTERNS . For the learned model , β can be much bigger than 1 , so that the vector v ( x ) will rotate back to itself in a short distance , causing the periodic patterns of v ( x ) . Moreover , β does not depend on the direction of self-motion , and this isotropic property appears to underly the emergent hexagonal periodic patterns , as suggested by the following result . The hexagon grid patterns can be created by linearly mixing three Fourier plane waves whose directions are 2π/3 apart . In the following , we state a theoretical result adapted from Gao et al . ( 2018 ) that connects such linearly mixed Fourier waves to the geometric property in Proposition 1 in the previous subsection . Proposition 2 Let e ( x ) = ( exp ( i〈aj , x〉 ) , j = 1 , 2 , 3 ) > , where ( aj , j = 1 , 2 , 3 ) are three 2D vectors of equal norm , and the angle between every pair of them is 2π/3 . Let v ( x ) = Ue ( x ) , where U is an arbitrary unitary matrix , i.e. , U∗U = I . Let δα be the angle between v ( x ) and v ( x + δx ) , we have δα = βδr + O ( δr2 ) , where δr = ‖δx‖ , and β ∝ ‖aj‖ is independent of the direction of δx . See Supplementary A.1 for a proof , which relies on the fact that ( aj , j = 1 , 2 , 3 ) forms a tight frame in 2D . Proposition 2 says that the geometric property that emerges from our model as elucidated by Proposition 1 is satisfied by the orthogonal mixing of three Fourier plane waves that creates hexagonal grid patterns . We are currently pursuing a more general analysis of our model , i.e. , equations ( 1 ) and ( 2 ) . | The authors propose a simple recurrent network as a model of spatial navigation in the MEC/Hippocampal network. This model assumes that grid cells only regularly receive egocentric movement information, an important aspect for understanding the origin of these functional cell types in-vitro. Overall, this article should be of interest for any ICLR members interested in biological spatial navigation. | SP:ed01a0233c76094bf814ffeb5fcc10548a26e4bd |
DeeperGCN: Training Deeper GCNs with Generalized Aggregation Functions | 1 INTRODUCTION . The rise of availability of non-Euclidean data ( Bronstein et al. , 2017 ) has recently shed interest into the topic of Graph Convolutional Networks ( GCNs ) . GCNs provide powerful deep learning architectures for irregular data , like point clouds and graphs . GCNs have proven valuable for applications in social networks ( Tang & Liu , 2009 ) , drug discovery ( Zitnik & Leskovec , 2017 ; Wale et al. , 2008 ) , recommendation engines ( Monti et al. , 2017b ; Ying et al. , 2018 ) , and point clouds ( Wang et al. , 2018 ; Li et al. , 2019b ) . Recent works looked at frameworks to train deeper GCN architectures ( Li et al. , 2019b ; a ) . These works demonstrate how increased depth leads to state-of-the-art performance on tasks like point cloud classification and segmentation , and protein interaction prediction . The power of deep models become more evident with the introduction of more challenging and largescale graph datasets . Such datasets were recently introduced in the Open Graph Benchmark ( OGB ) ( Hu et al. , 2020 ) , for tasks of node classification , link prediction , and graph classification . Graph convolutions in GCNs are based on the notion of message passing ( Gilmer et al. , 2017 ) . To compute a new node feature at each GCN layer , information is aggregated from the node and its connected neighbors . Given the nature of graphs , aggregation functions must be permutation invariant . This property guarantees invariance/equivariance to isomorphic graphs ( Battaglia et al. , 2018 ; Xu et al. , 2019b ; Maron et al. , 2019a ) . Popular choices for aggregation functions are mean ( Kipf & Welling , 2016 ) , max ( Hamilton et al. , 2017 ) , and sum ( Xu et al. , 2019b ) . Recent works suggest different aggregations have different performance impact depending on the task . For example , mean and sum perform best in node classification ( Kipf & Welling , 2016 ) , while max is favorable for dealing with 3D point clouds ( Qi et al. , 2017 ; Wang et al. , 2019 ) . Currently , all works rely on empirical analysis to choose aggregation functions . In DeepGCNs ( Li et al . ( 2019b ) ) , the authors complement aggregation functions with residual and dense connections , and dilated convolutions , in order to train very deep GCNs . Equipped with these new modules , GCNs with more than 100 layers can be reliably trained . Despite the potential of these new modules ( Kipf & Welling , 2016 ; Hamilton et al. , 2017 ; Veličković et al. , 2018 ; Xu et al. , 2019a ) , it is still unclear if they are the ideal choice for DeepGCNs when handling large-scale graphs . In this work , we analyze the performance of GCNs on large-scale graphs . In particular , we look at the effect of aggregation functions in performance . We unify aggregation functions by proposing a novel Generalized Aggregation Function ( Figure 1 ) suited for graph convolutions . We show how our function covers all commonly used aggregations ( mean , max , and sum ) , and its parameters can be tuned to learn customized functions for different tasks . Our novel aggregation is fully differentiable and can be learned in an end-to-end fashion in a deep GCN framework . In our experiments , we show the performance of baseline aggregations in various large-scale graph datasets . We then introduce our generalized aggregation and observe improved performance with the correct choice of aggregation parameters . Finally , we demonstrate how learning the parameters of our generalized aggregation , in an end-to-end fashion , leads to state-of-the-art performance in several OGB benchmarks . Our analysis indicates the choice of suitable aggregations is imperative to the performance of different tasks . A differentiable generalized aggregation function ensures the correct aggregation is used for each learning scenario . We summarize our contributions as two-fold : ( 1 ) We propose a novel Generalized Aggregation Function . This new function is suitable for GCNs , as it enjoys a permutation invariant property . We show how our generalized aggregation covers commonly used functions such as mean , max , and sum in graph convolutions . Additionally , we show how its parameters can be tuned to improve performance on diverse GCN tasks . Since this new function is fully differentiable , we show how its parameters can be learned in an end-to-end fashion . ( 2 ) We run extensive experiments on seven datasets from the Open Graph Benchmark ( OGB ) . Our results show that combining depth with our generalized aggregation function achieves state-of-the-art in several of these benchmarks . 2 RELATED WORK . Graph Convolutional Networks ( GCNs ) . Current GCN algorithms can be divided into two categories : spectral-based and spatial-based . Based on spectral graph theory , Bruna et al . ( 2013 ) firstly developed graph convolutions using the Fourier basis of a given graph in the spectral domain . Later , many methods proposed to apply improvements , extensions , and approximations on spectral-based GCNs ( Kipf & Welling , 2016 ; Defferrard et al. , 2016 ; Henaff et al. , 2015 ; Levie et al. , 2018 ; Li et al. , 2018 ; Wu et al. , 2019 ) . Spatial-based GCNs ( Scarselli et al. , 2008 ; Hamilton et al. , 2017 ; Monti et al. , 2017a ; Niepert et al. , 2016 ; Gao et al. , 2018 ; Xu et al. , 2019b ; Veličković et al. , 2018 ) define graph convolution operations directly on the graph by aggregating information from neighbor nodes . To address the scalability issue of GCNs on large-scale graphs , two main categories of algorithms exist : sampling-based ( Hamilton et al. , 2017 ; Chen et al. , 2018b ; Li et al. , 2018 ; Chen et al. , 2018a ; Zeng et al. , 2020 ) and clustering-based ( Chiang et al. , 2019 ) . Training Deep GCNs . Despite the rapid and fruitful progress of GCNs , most prior work employs shallow GCNs . Several works attempt different ways of training deeper GCNs ( Hamilton et al. , 2017 ; Armeni et al. , 2017 ; Rahimi et al. , 2018 ; Xu et al. , 2018 ) . However , all these approaches are limited to 10 layers of depth , after which GCN performance would degrade because of vanishing gradient and over-smoothingLi et al . ( 2018 ) . Inspired by the merits of training deep CNN-based networks ( He et al. , 2016a ; Huang et al. , 2017 ; Yu & Koltun , 2016 ) , DeepGCNs ( Li et al. , 2019b ) propose to train very deep GCNs ( 56 layers ) by adapting residual/dense connections ( ResGCN/DenseGCN ) and dilated convolutions to GCNs . DeepGCN variants achieve state-of-the art results on S3DIS point cloud semantic segmentation ( Armeni et al. , 2017 ) and the PPI dataset . Many recent works focus on further addressing this phenomenon ( Klicpera et al. , 2019 ; Rong et al. , 2020 ; Zhao & Akoglu , 2020 ; Chen et al. , 2020 ; Gong et al. , 2020 ; Rossi et al. , 2020 ) . In particular , Klicpera et al . ( 2019 ) propose a PageRank-based message passing mechanism involving the root node in the loop . Alternatively , DropEdge ( Rong et al. , 2020 ) randomly removes edges from the graph , and PairNorm ( Zhao & Akoglu , 2020 ) develops a novel normalization layer . We find that the choice of aggregation may also limit the power of deep GCNs . In this work , we thoroughly study the important relation between aggregation functions and deep GCN architectures . Aggregation Functions for GCNs . GCNs update a node ’ s feature vector by aggregating feature information from its neighbors in the graph . Many different neighborhood aggregation functions that possess a permutation invariant property have been proposed ( Hamilton et al. , 2017 ; Veličković et al. , 2018 ; Xu et al. , 2019b ) . Specifically , Hamilton et al . ( 2017 ) examine mean , max , and LSTM aggregators , and they empirically find that max and LSTM achieve the best performance . Graph attention networks ( GATs ) ( Veličković et al. , 2018 ) employ the attention mechanism ( Bahdanau et al. , 2015 ) to obtain different and trainable weights for neighbor nodes by learning the attention between their feature vectors and that of the central node . Thus , the aggregator in GATs operates like a learnable weighted mean . Furthermore , Xu et al . ( 2019b ) propose a GCN architecture , denoted Graph Isomorphism Network ( GIN ) , with a sum aggregation that has been shown to have high discriminative power according to the Weisfeiler-Lehman ( WL ) graph isomorphism test ( Weisfeiler & Lehman , 1968 ) . In this work , we propose generalized message aggregation functions , a new family of aggregation functions , that generalizes conventional aggregators including mean , max and sum . With the nature of differentiablity and continuity , generalized message aggregation functions provide a new perspective for designing GCN architectures . 3 REPRESENTATION LEARNING ON GRAPHS . Graph Representation . A graph G is usually defined as a tuple of two sets G = ( V , E ) , where V = { v1 , v2 , ... , vN } and E ⊆ V × V are the sets of vertices and edges , respectively . If an edge eij = ( vi , vj ) ∈ E for an undirected graph , eij is an edge connecting vertices vi and vj ; for a directed graph , eij is an edge directed from vi to vj . Usually , a vertex v and an edge e in the graph are associated with vertex features hv ∈ RD and edge features he ∈ RC respectively.1 GCNs for Learning Graph Representation . We define a general graph representation learning operator F , which takes as input a graph G and outputs a transformed graph G′ , i.e . G′ = F ( G ) . The features or even the topology of the graph can be learned or updated after the transformation F . Typical graph representation learning operators usually learn latent features or representations for graphs such as DeepWalk ( Perozzi et al. , 2014 ) , Planetoid ( Yang et al. , 2016 ) , Node2Vec ( Grover & Leskovec , 2016 ) , Chebyshev graph CNN ( Defferrard et al. , 2016 ) , GCN ( Kipf & Welling , 2016 ) , Neural Message Passing Network ( MPNN ) ( Gilmer et al. , 2017 ) , GraphSage ( Hamilton et al. , 2017 ) , GAT ( Veličković et al. , 2018 ) and GIN ( Xu et al. , 2019b ) . In this work , we focus on the GCN family and its message passing framework ( Gilmer et al. , 2017 ; Battaglia et al. , 2018 ) . To be specific , message passing based on the GCN operator F operating on vertex v ∈ V at the l-th layer is defined as follows : m ( l ) vu = ρ ( l ) ( h ( l ) v , h ( l ) u , h ( l ) evu ) , ∀u ∈ N ( v ) ( 1 ) m ( l ) v = ζ ( l ) ( { m ( l ) vu | u ∈ N ( v ) } ) ( 2 ) h ( l+1 ) v = φ ( l ) ( h ( l ) v , m ( l ) v ) , ( 3 ) where ρ ( l ) , ζ ( l ) , and φ ( l ) are all learnable or differentiable functions for message construction , message aggregation , and vertex update at the l-th layer , respectively . For simplicity , we only consider the case where vertex features are updated at each layer . It is straightforward to extend it to edge features . Message construction function ρ ( l ) is applied to vertex features h ( l ) v of v , its neighbor ’ s features h ( l ) u , and the corresponding edge features hevu to construct an individual message m ( l ) vu for 1In some cases , vertex features or edge features are absent . each neighbor u ∈ N ( v ) . Message aggregation function ζ ( l ) is commonly a permutation invariant set function that takes as input a countable unordered message set { m ( l ) vu | u ∈ N ( v ) } , where m ( l ) vu ∈ RD , and outputs a reduced or aggregated message m ( l ) v ∈ RD . The permutation invariance of ζ ( l ) guarantees the invariance/equivariance to isomorphic graphs ( Battaglia et al. , 2018 ) . ζ ( l ) can simply be a symmetric function such as mean ( Kipf & Welling , 2016 ) , max ( Hamilton et al. , 2017 ) , or sum ( Xu et al. , 2019b ) . Vertex update function φ ( l ) combines the original vertex features h ( l ) v and the aggregated message m ( l ) v to obtain the transformed vertex features h ( l+1 ) v . | The authors propose a generalized neighborhood message aggregation function for GNNs. The proposed choice of generalized aggregation functions is SoftMax and PowerMean, which generalizes Max and Mean functions and interpolates them. Additionally, they propose a variant of these two methods, which can also encompass the Sum function. By making the components of these generalized aggregator functions differentiable, the GNNs can choose an approximate instantiation of the aggregation function that best optimizes the task. | SP:f6277acaa779b79d58b41fdcbd2a5dc02697cc3f |
DeeperGCN: Training Deeper GCNs with Generalized Aggregation Functions | 1 INTRODUCTION . The rise of availability of non-Euclidean data ( Bronstein et al. , 2017 ) has recently shed interest into the topic of Graph Convolutional Networks ( GCNs ) . GCNs provide powerful deep learning architectures for irregular data , like point clouds and graphs . GCNs have proven valuable for applications in social networks ( Tang & Liu , 2009 ) , drug discovery ( Zitnik & Leskovec , 2017 ; Wale et al. , 2008 ) , recommendation engines ( Monti et al. , 2017b ; Ying et al. , 2018 ) , and point clouds ( Wang et al. , 2018 ; Li et al. , 2019b ) . Recent works looked at frameworks to train deeper GCN architectures ( Li et al. , 2019b ; a ) . These works demonstrate how increased depth leads to state-of-the-art performance on tasks like point cloud classification and segmentation , and protein interaction prediction . The power of deep models become more evident with the introduction of more challenging and largescale graph datasets . Such datasets were recently introduced in the Open Graph Benchmark ( OGB ) ( Hu et al. , 2020 ) , for tasks of node classification , link prediction , and graph classification . Graph convolutions in GCNs are based on the notion of message passing ( Gilmer et al. , 2017 ) . To compute a new node feature at each GCN layer , information is aggregated from the node and its connected neighbors . Given the nature of graphs , aggregation functions must be permutation invariant . This property guarantees invariance/equivariance to isomorphic graphs ( Battaglia et al. , 2018 ; Xu et al. , 2019b ; Maron et al. , 2019a ) . Popular choices for aggregation functions are mean ( Kipf & Welling , 2016 ) , max ( Hamilton et al. , 2017 ) , and sum ( Xu et al. , 2019b ) . Recent works suggest different aggregations have different performance impact depending on the task . For example , mean and sum perform best in node classification ( Kipf & Welling , 2016 ) , while max is favorable for dealing with 3D point clouds ( Qi et al. , 2017 ; Wang et al. , 2019 ) . Currently , all works rely on empirical analysis to choose aggregation functions . In DeepGCNs ( Li et al . ( 2019b ) ) , the authors complement aggregation functions with residual and dense connections , and dilated convolutions , in order to train very deep GCNs . Equipped with these new modules , GCNs with more than 100 layers can be reliably trained . Despite the potential of these new modules ( Kipf & Welling , 2016 ; Hamilton et al. , 2017 ; Veličković et al. , 2018 ; Xu et al. , 2019a ) , it is still unclear if they are the ideal choice for DeepGCNs when handling large-scale graphs . In this work , we analyze the performance of GCNs on large-scale graphs . In particular , we look at the effect of aggregation functions in performance . We unify aggregation functions by proposing a novel Generalized Aggregation Function ( Figure 1 ) suited for graph convolutions . We show how our function covers all commonly used aggregations ( mean , max , and sum ) , and its parameters can be tuned to learn customized functions for different tasks . Our novel aggregation is fully differentiable and can be learned in an end-to-end fashion in a deep GCN framework . In our experiments , we show the performance of baseline aggregations in various large-scale graph datasets . We then introduce our generalized aggregation and observe improved performance with the correct choice of aggregation parameters . Finally , we demonstrate how learning the parameters of our generalized aggregation , in an end-to-end fashion , leads to state-of-the-art performance in several OGB benchmarks . Our analysis indicates the choice of suitable aggregations is imperative to the performance of different tasks . A differentiable generalized aggregation function ensures the correct aggregation is used for each learning scenario . We summarize our contributions as two-fold : ( 1 ) We propose a novel Generalized Aggregation Function . This new function is suitable for GCNs , as it enjoys a permutation invariant property . We show how our generalized aggregation covers commonly used functions such as mean , max , and sum in graph convolutions . Additionally , we show how its parameters can be tuned to improve performance on diverse GCN tasks . Since this new function is fully differentiable , we show how its parameters can be learned in an end-to-end fashion . ( 2 ) We run extensive experiments on seven datasets from the Open Graph Benchmark ( OGB ) . Our results show that combining depth with our generalized aggregation function achieves state-of-the-art in several of these benchmarks . 2 RELATED WORK . Graph Convolutional Networks ( GCNs ) . Current GCN algorithms can be divided into two categories : spectral-based and spatial-based . Based on spectral graph theory , Bruna et al . ( 2013 ) firstly developed graph convolutions using the Fourier basis of a given graph in the spectral domain . Later , many methods proposed to apply improvements , extensions , and approximations on spectral-based GCNs ( Kipf & Welling , 2016 ; Defferrard et al. , 2016 ; Henaff et al. , 2015 ; Levie et al. , 2018 ; Li et al. , 2018 ; Wu et al. , 2019 ) . Spatial-based GCNs ( Scarselli et al. , 2008 ; Hamilton et al. , 2017 ; Monti et al. , 2017a ; Niepert et al. , 2016 ; Gao et al. , 2018 ; Xu et al. , 2019b ; Veličković et al. , 2018 ) define graph convolution operations directly on the graph by aggregating information from neighbor nodes . To address the scalability issue of GCNs on large-scale graphs , two main categories of algorithms exist : sampling-based ( Hamilton et al. , 2017 ; Chen et al. , 2018b ; Li et al. , 2018 ; Chen et al. , 2018a ; Zeng et al. , 2020 ) and clustering-based ( Chiang et al. , 2019 ) . Training Deep GCNs . Despite the rapid and fruitful progress of GCNs , most prior work employs shallow GCNs . Several works attempt different ways of training deeper GCNs ( Hamilton et al. , 2017 ; Armeni et al. , 2017 ; Rahimi et al. , 2018 ; Xu et al. , 2018 ) . However , all these approaches are limited to 10 layers of depth , after which GCN performance would degrade because of vanishing gradient and over-smoothingLi et al . ( 2018 ) . Inspired by the merits of training deep CNN-based networks ( He et al. , 2016a ; Huang et al. , 2017 ; Yu & Koltun , 2016 ) , DeepGCNs ( Li et al. , 2019b ) propose to train very deep GCNs ( 56 layers ) by adapting residual/dense connections ( ResGCN/DenseGCN ) and dilated convolutions to GCNs . DeepGCN variants achieve state-of-the art results on S3DIS point cloud semantic segmentation ( Armeni et al. , 2017 ) and the PPI dataset . Many recent works focus on further addressing this phenomenon ( Klicpera et al. , 2019 ; Rong et al. , 2020 ; Zhao & Akoglu , 2020 ; Chen et al. , 2020 ; Gong et al. , 2020 ; Rossi et al. , 2020 ) . In particular , Klicpera et al . ( 2019 ) propose a PageRank-based message passing mechanism involving the root node in the loop . Alternatively , DropEdge ( Rong et al. , 2020 ) randomly removes edges from the graph , and PairNorm ( Zhao & Akoglu , 2020 ) develops a novel normalization layer . We find that the choice of aggregation may also limit the power of deep GCNs . In this work , we thoroughly study the important relation between aggregation functions and deep GCN architectures . Aggregation Functions for GCNs . GCNs update a node ’ s feature vector by aggregating feature information from its neighbors in the graph . Many different neighborhood aggregation functions that possess a permutation invariant property have been proposed ( Hamilton et al. , 2017 ; Veličković et al. , 2018 ; Xu et al. , 2019b ) . Specifically , Hamilton et al . ( 2017 ) examine mean , max , and LSTM aggregators , and they empirically find that max and LSTM achieve the best performance . Graph attention networks ( GATs ) ( Veličković et al. , 2018 ) employ the attention mechanism ( Bahdanau et al. , 2015 ) to obtain different and trainable weights for neighbor nodes by learning the attention between their feature vectors and that of the central node . Thus , the aggregator in GATs operates like a learnable weighted mean . Furthermore , Xu et al . ( 2019b ) propose a GCN architecture , denoted Graph Isomorphism Network ( GIN ) , with a sum aggregation that has been shown to have high discriminative power according to the Weisfeiler-Lehman ( WL ) graph isomorphism test ( Weisfeiler & Lehman , 1968 ) . In this work , we propose generalized message aggregation functions , a new family of aggregation functions , that generalizes conventional aggregators including mean , max and sum . With the nature of differentiablity and continuity , generalized message aggregation functions provide a new perspective for designing GCN architectures . 3 REPRESENTATION LEARNING ON GRAPHS . Graph Representation . A graph G is usually defined as a tuple of two sets G = ( V , E ) , where V = { v1 , v2 , ... , vN } and E ⊆ V × V are the sets of vertices and edges , respectively . If an edge eij = ( vi , vj ) ∈ E for an undirected graph , eij is an edge connecting vertices vi and vj ; for a directed graph , eij is an edge directed from vi to vj . Usually , a vertex v and an edge e in the graph are associated with vertex features hv ∈ RD and edge features he ∈ RC respectively.1 GCNs for Learning Graph Representation . We define a general graph representation learning operator F , which takes as input a graph G and outputs a transformed graph G′ , i.e . G′ = F ( G ) . The features or even the topology of the graph can be learned or updated after the transformation F . Typical graph representation learning operators usually learn latent features or representations for graphs such as DeepWalk ( Perozzi et al. , 2014 ) , Planetoid ( Yang et al. , 2016 ) , Node2Vec ( Grover & Leskovec , 2016 ) , Chebyshev graph CNN ( Defferrard et al. , 2016 ) , GCN ( Kipf & Welling , 2016 ) , Neural Message Passing Network ( MPNN ) ( Gilmer et al. , 2017 ) , GraphSage ( Hamilton et al. , 2017 ) , GAT ( Veličković et al. , 2018 ) and GIN ( Xu et al. , 2019b ) . In this work , we focus on the GCN family and its message passing framework ( Gilmer et al. , 2017 ; Battaglia et al. , 2018 ) . To be specific , message passing based on the GCN operator F operating on vertex v ∈ V at the l-th layer is defined as follows : m ( l ) vu = ρ ( l ) ( h ( l ) v , h ( l ) u , h ( l ) evu ) , ∀u ∈ N ( v ) ( 1 ) m ( l ) v = ζ ( l ) ( { m ( l ) vu | u ∈ N ( v ) } ) ( 2 ) h ( l+1 ) v = φ ( l ) ( h ( l ) v , m ( l ) v ) , ( 3 ) where ρ ( l ) , ζ ( l ) , and φ ( l ) are all learnable or differentiable functions for message construction , message aggregation , and vertex update at the l-th layer , respectively . For simplicity , we only consider the case where vertex features are updated at each layer . It is straightforward to extend it to edge features . Message construction function ρ ( l ) is applied to vertex features h ( l ) v of v , its neighbor ’ s features h ( l ) u , and the corresponding edge features hevu to construct an individual message m ( l ) vu for 1In some cases , vertex features or edge features are absent . each neighbor u ∈ N ( v ) . Message aggregation function ζ ( l ) is commonly a permutation invariant set function that takes as input a countable unordered message set { m ( l ) vu | u ∈ N ( v ) } , where m ( l ) vu ∈ RD , and outputs a reduced or aggregated message m ( l ) v ∈ RD . The permutation invariance of ζ ( l ) guarantees the invariance/equivariance to isomorphic graphs ( Battaglia et al. , 2018 ) . ζ ( l ) can simply be a symmetric function such as mean ( Kipf & Welling , 2016 ) , max ( Hamilton et al. , 2017 ) , or sum ( Xu et al. , 2019b ) . Vertex update function φ ( l ) combines the original vertex features h ( l ) v and the aggregated message m ( l ) v to obtain the transformed vertex features h ( l+1 ) v . | This work proposes a generalized aggregation function for graph neural networks. This generalized aggregation function can cover commonly used aggregation functions (i.e., mean, max, and sum) by particular setting of hyperparameters. Also, these hyperparameters can be learned with model in an end-to-end fashion instead of being predefined manually. The experimental results on OGB is impressive and can demonstrate the effectiveness of the proposed approaches. | SP:f6277acaa779b79d58b41fdcbd2a5dc02697cc3f |
Model information as an analysis tool in deep learning | 1 INTRODUCTION . The ultimate goal of many deep learning research has been improving performance on specific datasets , for example , aiming for superior classification accuracy on the ILSVRC challenge . We have witnessed super-human performance on tasks in vision and language processing , but we are still far from understanding how the learning process works and whether they resemble the learning of human . This is partially due to the metric we use providing too little information on the dynamics of learning . Besides , performance on the test set as a sole goal can sometimes even lead to undesirable outcomes or misleading conclusions ( Lipton & Steinhardt , 2019 ) . Recently , several works propose to use the description length of a model ( or surrogate estimations thereof ) to understand the behavior of learning . In this paper , we refer to such measures of the amount of information content in a model as model information . Blier & Ollivier ( 2018 ) first demonstrated efficiently encoding a deep neural network with prequential coding technique . Zhang et al . ( 2020 ) then proposed an approximation of model information and utilized model information to analyze the information content in a task . They also used model information to explain phenomenons in transfer learning and continual learning . They showed that model information provides a different perspective than performance , directly characterizing the information transfer in the learning process . Voita & Titov ( 2020 ) used model information as a probe to analyze what kind of information is present in a text representation model . They claim that model information is more informative and stable than performance metrics when used as a probe . Model information can provide an informational perspective to learning . It can potentially help to answer questions about learning dynamics , such as how much information exists in a dataset or model , or how much information is transferred in a learning step . Furthermore , we can also reformulate existing problems into problems about information , for example , similarity and capacity , as we will show in this paper . Comparing model information with model performance , model information not only accounts for how good a model can perform but also how fast it learns to perform well ( in the sense of sample efficiency , a discussion is given by Yogatama et al . ( 2019 ) ) . The latter can be interpreted as related to the quantity of information transferred in model training . In this paper , we try to illustrate that model information can provide a framework for analyzing and understanding phenomena in deep learning . In the next section , we provide a general definition of model information , independent of how model information is estimated . We then unify the analysis of fundamental elements of deep learning under the framework of model information . In the following sections , we use several common problems as examples to show how to use the model information framework as an analysis tool . 2 AN INFORMATIONAL PERSPECTIVE TO ELEMENTS OF DEEP LEARNING . To measure the amount of information in a model , Voita & Titov ( 2020 ) use the codelength of a dataset subtracting the cross-entropy of the final model : L = Lpreqθinit ( y1 : N |x1 : N ) + N∑ i log pθN ( yi|xi ) . ( 1 ) Zhang et al . ( 2020 ) propose to estimate model information by subtracting codelength of k examples ( the k examples are independent and different from the training set of size N ) with an initial model and a final model , and show that it is more reliable than ( 1 ) : L = Lpreqθinit ( y1 : k|x1 : k ) − L preq θN ( y1 : k|x1 : k ) . ( 2 ) Both methods share an idea that model information can be derived by comparing the codelength of encoding the model and data together , with the codelength of encoding the data alone . This is essentially an approximation to the Kolmogorov complexity of the “ generalizable knowledge ” in model M ( in Zhang et al . ( 2020 ) , this is denoted by K ( M ) − K ( M |T ) ) . Throughout this paper , we use D to denote a dataset including examples sampled from task T , and use MD to denote a model M that has been trained to converge on D. Assume labels y in task T have an underlying generation mechanism f : yi = f ( xi , i ) ( where i is i.i.d . noise ) , then the “ generalizable knowledge ” in T is K ( f ) , and generalizable knowledge in MD is at most K ( f ) . We denote the amount of generalizable information a model M contains about a dataset D as L ( M , D ) . Then L ( MD , D ) is the “ model information ” : the amount of generalizable information a trained model MD contains about dataset D. Ideally , if learning is “ perfectly efficient ” , then we can expect L ( MD , D ) = K ( MD ) −K ( MD|T ) = K ( f ) . In this paper , we investigate what can be achieved with a model information measure L. We found that model information is a powerful tool for analyzing and understanding many phenomenons in deep learning . This covers the fundamental elements of machine learning : task , data , model , and algorithm . In Table 1 , we list problems as examples for each domain and summarize how model information can be used to perform analysis of the corresponding problem . As we shall see , model information can enable attacking some of the above problems from a neat and theoretically-sound perspective . Table 1 is not an exhaustive list but just examples of what one can do with model information . In the following sections , we detail the application of model information to perform analysis of each problem and explain how it can lead to useful insights . For following experiments in this paper , we use ( 2 ) to estimate model information and set the encoding set size k=10000 , unless otherwise stated . 3 TASK : DIFFICULTY . The success of deep learning is marked by its superior performance at solving difficult tasks , like large-scale visual classification and question answering . For evaluating the capability of algorithms , label : 3 label : 3 label : 3 label : 3 label : 3 label : 4 Image noise Label noise missing pixels missing objects massart noise Figure 2 : Injecting three kinds of noise on MNIST . it is important to understand the difficulty of the tasks and the datasets we have . Human definitions of difficulty are mostly subjective , for example , difficulty scoring , task performance , and time needed to complete the task ( Ionescu et al. , 2016 ) . Several metrics have been proposed for measuring the difficulty of a task . Many focus on the complexity of the data . For images , difficulty is linked with image quality , objectiveness , and clutter-ness ( Ionescu et al. , 2016 ) . For text , the relevant factors include perplexity , reading ease , and diversity ( Collins et al. , 2018 ) . For general real-valued data , one can measure the distribution of feature value , class separability , and the geometry of class manifolds ( Ho & Basu , 2002 ) . There are also other factors that affect the difficulty of a task , for example , class balance and class ambiguity . As pointed out by Collins et al . ( 2018 ) , these characteristics all describe some aspect of the task , and difficulty can not be described by any one of them alone . Complexity measures of input data can sometimes have little impact on task difficulty . An important line of work defines the difficulty of a classification problem by the complexity of the optimal decision boundary ( Ho & Basu , 2002 ) . The complexity of the boundary can be characterized by its Kolmogorov complexity or its minimum description length . This coincidences with the idea of the model information . While for simple tasks , one can directly characterize the geometry of the decision boundary , for complex tasks that use a neural network to model the decision boundary , the description length can only be approximated . With description length , the difficulty of a task can be interpreted as the amount of information needed to solve the task . This amount of information is at most K ( f ) , which is the complexity of the input-output relationship of the task . We measure the model information L ( MD , D ) of a trained model , and use it as a measure of the information content in dataset D. In Figure 1 , we use five 10-class classification tasks to illustrate the idea . The results show that the datasets vary greatly in information content : For classifying digits , SVHN ( Netzer et al. , 2011 ) requires more information than MNIST ( LeCun et al. , 1998 ) or EMNIST ( Cohen et al. , 2017 ) , meaning classifying digits in street view is more difficult than in standardized MNIST images . CIFAR-10 ( Krizhevsky & Hinton , 2009 ) is even richer in information content and therefore more difficult , as natural objects are more complex than digits . There is also a general trend that the more difficult the task , the lower the performance and the confidence of the model . However , performance and confidence are not only determined by task complexity , they are also affected by noise present in the task . Next we want to disentangle the two factors : task complexity ( measured by information ) and noise . We apply three kinds of noise on MNIST to represent different forms of noise present in a dataset ( Figure 2 ) . There are two kinds of image noise : missing pixels , where a small random block of pixels is missing in the image , missing objects , where a large portion of the digit is missing , and one form of label noise : massart noise , where a small ratio of labels are replaced by random labels . To see how different kinds of noise affect model behavior , we plot model information , model accuracy , and confidence in Figure 3 . What we observe is that information complexity and noise are two independent dimensions that affect performance on a task . Pixels missing from the image will make the task more complex and require more information to correctly classify the digits . This is because one must learn more features corresponding to each digit , as any of the features could be absent at any time . However , the model can still perform well after learning enough information about the task . Missing objects and wrong labels , on the other hand , are pure noise that does not affect the information complexity of the task . They effectively make some of the examples uninformative and simply confusing , which makes the model less confident in its predictions . 4 DATA : DOMAIN SIMILARITY . Understanding the data is a fundamental element of understanding learning . Labeled data for deep learning comes from many sources and domains , and people seek to train models that can adapt well to a new domain , generalize to unseen domains , or be independent to domains ( Gulrajani & Lopez-Paz , 2020 ) . However , few attempts to understand the data before using them to train the model . Similarity is a fundamental concept for understanding the relationship between different data . In deep learning , we are more concerned about similarity on semantic level . Semantically similar images can sometimes differ very much in the RGB space . The informational similarity measure proposed by Lin ( 1998 ) measures the similarity between A and B by the ratio of the amount of information needed to describe the commonality between A and B and the amount information needed to describe A together with B : sim ( A , B ) = I ( common ( A , B ) ) I ( description ( A , B ) ) = K ( fB ) −K ( fB |fA ) K ( fA , fB ) . ( 3 ) It is the Jaccard similarity between A and B measured with information . A property of the informational similarity measure is universality : it does not depend on a particular representation ( or modeling ) of A and B . We can use model information to estimate the information terms in ( 3 ) , and turn the similarity measure into ( 4 ) : ( using approximations L ( MA , A ) ≈ K ( fA ) and L ( MA , B ) ≈ K ( fB ) −K ( fB |fA ) ) , see discussion on the symmetricity of S in Appendix A.3 ) S ( A , B ) = L ( MA , B ) L ( MA , A ) + L ( MB , B ) − L ( MA , B ) . ( 4 ) Another benefit of information similarity is that the similarity can be measured with respect to one side , resulting in a unidirectional similarity measure : Suni ( A , B ) = I ( common ( A , B ) I ( description ( B ) = L ( MA , B ) L ( MB , B ) . ( 5 ) Note that generally Suni ( A , B ) 6= Suni ( B , A ) . The unidirectional similarity measure is useful for depicting the relationship between A and B . For example , if Suni ( A , B ) < 1 and Suni ( B , A ) = 1 , then one can tell that A is a subset of B . We perform experiments on two commonly-used domain adaptation datasets : Office-31 ( Saenko et al. , 2010 ) and Office-Home ( Venkateswara et al. , 2017 ) . They each have 3 and 4 different domains for images of the same set of classes ( Figure 4 ) . We calculate information similarity S and unidirectional information similarity Suni for each pair of domains in each dataset . The baseline we use for comparison is the distance of first-order and second-order statistics in the feature space produced by ResNet-56 ( He et al. , 2016b ) pretrained on ImageNet ( Russakovsky et al. , 2015 ) ( see Appendix for details ) . This is inspired by the Maximum Mean Discrepancy ( MMD ) ( Gretton et al. , 2006 ) method for comparing data distributions . In domain adaptation literature , one often aims to minimize such distances to match domains ( Pan et al. , 2009 ) . As illustrated in Figure 5 , information similarity measure give a similarity score between 0 and 1 , which is intuitive and comparable across datasets . S and Suni largely agree with feature distances , but the latter is not comparable across datasets . For instance , dslr and webcam in Office-31 are much more similar than any other pair in the two datasets , which is reflected in S but not in feature distance . S is also more faithful within dataset for corresponding to visual similarities . Unidirectional information similarity Suni gives extra information , for instance , Suni ( amazon , dslr ) > Suni ( dslr , amazon ) shows that amazon contains more distinct information than dslr . This can be explained that each category in amazon has images for 90 different objects , while each category in dslr only has images for 5 objects . | The paper examines different use-cases of a quantity proposed in prior works which is said to capture the model information. It shows that this quantity behaves as expected overall. Quantifying the amount of information a deep neural network is a very interesting question for the community with both theoretical and practical appeal (from an analytical perspective but also from a model selection perspective, for example). | SP:b7632acf4753f9670c244597cc702fcab680982e |
Model information as an analysis tool in deep learning | 1 INTRODUCTION . The ultimate goal of many deep learning research has been improving performance on specific datasets , for example , aiming for superior classification accuracy on the ILSVRC challenge . We have witnessed super-human performance on tasks in vision and language processing , but we are still far from understanding how the learning process works and whether they resemble the learning of human . This is partially due to the metric we use providing too little information on the dynamics of learning . Besides , performance on the test set as a sole goal can sometimes even lead to undesirable outcomes or misleading conclusions ( Lipton & Steinhardt , 2019 ) . Recently , several works propose to use the description length of a model ( or surrogate estimations thereof ) to understand the behavior of learning . In this paper , we refer to such measures of the amount of information content in a model as model information . Blier & Ollivier ( 2018 ) first demonstrated efficiently encoding a deep neural network with prequential coding technique . Zhang et al . ( 2020 ) then proposed an approximation of model information and utilized model information to analyze the information content in a task . They also used model information to explain phenomenons in transfer learning and continual learning . They showed that model information provides a different perspective than performance , directly characterizing the information transfer in the learning process . Voita & Titov ( 2020 ) used model information as a probe to analyze what kind of information is present in a text representation model . They claim that model information is more informative and stable than performance metrics when used as a probe . Model information can provide an informational perspective to learning . It can potentially help to answer questions about learning dynamics , such as how much information exists in a dataset or model , or how much information is transferred in a learning step . Furthermore , we can also reformulate existing problems into problems about information , for example , similarity and capacity , as we will show in this paper . Comparing model information with model performance , model information not only accounts for how good a model can perform but also how fast it learns to perform well ( in the sense of sample efficiency , a discussion is given by Yogatama et al . ( 2019 ) ) . The latter can be interpreted as related to the quantity of information transferred in model training . In this paper , we try to illustrate that model information can provide a framework for analyzing and understanding phenomena in deep learning . In the next section , we provide a general definition of model information , independent of how model information is estimated . We then unify the analysis of fundamental elements of deep learning under the framework of model information . In the following sections , we use several common problems as examples to show how to use the model information framework as an analysis tool . 2 AN INFORMATIONAL PERSPECTIVE TO ELEMENTS OF DEEP LEARNING . To measure the amount of information in a model , Voita & Titov ( 2020 ) use the codelength of a dataset subtracting the cross-entropy of the final model : L = Lpreqθinit ( y1 : N |x1 : N ) + N∑ i log pθN ( yi|xi ) . ( 1 ) Zhang et al . ( 2020 ) propose to estimate model information by subtracting codelength of k examples ( the k examples are independent and different from the training set of size N ) with an initial model and a final model , and show that it is more reliable than ( 1 ) : L = Lpreqθinit ( y1 : k|x1 : k ) − L preq θN ( y1 : k|x1 : k ) . ( 2 ) Both methods share an idea that model information can be derived by comparing the codelength of encoding the model and data together , with the codelength of encoding the data alone . This is essentially an approximation to the Kolmogorov complexity of the “ generalizable knowledge ” in model M ( in Zhang et al . ( 2020 ) , this is denoted by K ( M ) − K ( M |T ) ) . Throughout this paper , we use D to denote a dataset including examples sampled from task T , and use MD to denote a model M that has been trained to converge on D. Assume labels y in task T have an underlying generation mechanism f : yi = f ( xi , i ) ( where i is i.i.d . noise ) , then the “ generalizable knowledge ” in T is K ( f ) , and generalizable knowledge in MD is at most K ( f ) . We denote the amount of generalizable information a model M contains about a dataset D as L ( M , D ) . Then L ( MD , D ) is the “ model information ” : the amount of generalizable information a trained model MD contains about dataset D. Ideally , if learning is “ perfectly efficient ” , then we can expect L ( MD , D ) = K ( MD ) −K ( MD|T ) = K ( f ) . In this paper , we investigate what can be achieved with a model information measure L. We found that model information is a powerful tool for analyzing and understanding many phenomenons in deep learning . This covers the fundamental elements of machine learning : task , data , model , and algorithm . In Table 1 , we list problems as examples for each domain and summarize how model information can be used to perform analysis of the corresponding problem . As we shall see , model information can enable attacking some of the above problems from a neat and theoretically-sound perspective . Table 1 is not an exhaustive list but just examples of what one can do with model information . In the following sections , we detail the application of model information to perform analysis of each problem and explain how it can lead to useful insights . For following experiments in this paper , we use ( 2 ) to estimate model information and set the encoding set size k=10000 , unless otherwise stated . 3 TASK : DIFFICULTY . The success of deep learning is marked by its superior performance at solving difficult tasks , like large-scale visual classification and question answering . For evaluating the capability of algorithms , label : 3 label : 3 label : 3 label : 3 label : 3 label : 4 Image noise Label noise missing pixels missing objects massart noise Figure 2 : Injecting three kinds of noise on MNIST . it is important to understand the difficulty of the tasks and the datasets we have . Human definitions of difficulty are mostly subjective , for example , difficulty scoring , task performance , and time needed to complete the task ( Ionescu et al. , 2016 ) . Several metrics have been proposed for measuring the difficulty of a task . Many focus on the complexity of the data . For images , difficulty is linked with image quality , objectiveness , and clutter-ness ( Ionescu et al. , 2016 ) . For text , the relevant factors include perplexity , reading ease , and diversity ( Collins et al. , 2018 ) . For general real-valued data , one can measure the distribution of feature value , class separability , and the geometry of class manifolds ( Ho & Basu , 2002 ) . There are also other factors that affect the difficulty of a task , for example , class balance and class ambiguity . As pointed out by Collins et al . ( 2018 ) , these characteristics all describe some aspect of the task , and difficulty can not be described by any one of them alone . Complexity measures of input data can sometimes have little impact on task difficulty . An important line of work defines the difficulty of a classification problem by the complexity of the optimal decision boundary ( Ho & Basu , 2002 ) . The complexity of the boundary can be characterized by its Kolmogorov complexity or its minimum description length . This coincidences with the idea of the model information . While for simple tasks , one can directly characterize the geometry of the decision boundary , for complex tasks that use a neural network to model the decision boundary , the description length can only be approximated . With description length , the difficulty of a task can be interpreted as the amount of information needed to solve the task . This amount of information is at most K ( f ) , which is the complexity of the input-output relationship of the task . We measure the model information L ( MD , D ) of a trained model , and use it as a measure of the information content in dataset D. In Figure 1 , we use five 10-class classification tasks to illustrate the idea . The results show that the datasets vary greatly in information content : For classifying digits , SVHN ( Netzer et al. , 2011 ) requires more information than MNIST ( LeCun et al. , 1998 ) or EMNIST ( Cohen et al. , 2017 ) , meaning classifying digits in street view is more difficult than in standardized MNIST images . CIFAR-10 ( Krizhevsky & Hinton , 2009 ) is even richer in information content and therefore more difficult , as natural objects are more complex than digits . There is also a general trend that the more difficult the task , the lower the performance and the confidence of the model . However , performance and confidence are not only determined by task complexity , they are also affected by noise present in the task . Next we want to disentangle the two factors : task complexity ( measured by information ) and noise . We apply three kinds of noise on MNIST to represent different forms of noise present in a dataset ( Figure 2 ) . There are two kinds of image noise : missing pixels , where a small random block of pixels is missing in the image , missing objects , where a large portion of the digit is missing , and one form of label noise : massart noise , where a small ratio of labels are replaced by random labels . To see how different kinds of noise affect model behavior , we plot model information , model accuracy , and confidence in Figure 3 . What we observe is that information complexity and noise are two independent dimensions that affect performance on a task . Pixels missing from the image will make the task more complex and require more information to correctly classify the digits . This is because one must learn more features corresponding to each digit , as any of the features could be absent at any time . However , the model can still perform well after learning enough information about the task . Missing objects and wrong labels , on the other hand , are pure noise that does not affect the information complexity of the task . They effectively make some of the examples uninformative and simply confusing , which makes the model less confident in its predictions . 4 DATA : DOMAIN SIMILARITY . Understanding the data is a fundamental element of understanding learning . Labeled data for deep learning comes from many sources and domains , and people seek to train models that can adapt well to a new domain , generalize to unseen domains , or be independent to domains ( Gulrajani & Lopez-Paz , 2020 ) . However , few attempts to understand the data before using them to train the model . Similarity is a fundamental concept for understanding the relationship between different data . In deep learning , we are more concerned about similarity on semantic level . Semantically similar images can sometimes differ very much in the RGB space . The informational similarity measure proposed by Lin ( 1998 ) measures the similarity between A and B by the ratio of the amount of information needed to describe the commonality between A and B and the amount information needed to describe A together with B : sim ( A , B ) = I ( common ( A , B ) ) I ( description ( A , B ) ) = K ( fB ) −K ( fB |fA ) K ( fA , fB ) . ( 3 ) It is the Jaccard similarity between A and B measured with information . A property of the informational similarity measure is universality : it does not depend on a particular representation ( or modeling ) of A and B . We can use model information to estimate the information terms in ( 3 ) , and turn the similarity measure into ( 4 ) : ( using approximations L ( MA , A ) ≈ K ( fA ) and L ( MA , B ) ≈ K ( fB ) −K ( fB |fA ) ) , see discussion on the symmetricity of S in Appendix A.3 ) S ( A , B ) = L ( MA , B ) L ( MA , A ) + L ( MB , B ) − L ( MA , B ) . ( 4 ) Another benefit of information similarity is that the similarity can be measured with respect to one side , resulting in a unidirectional similarity measure : Suni ( A , B ) = I ( common ( A , B ) I ( description ( B ) = L ( MA , B ) L ( MB , B ) . ( 5 ) Note that generally Suni ( A , B ) 6= Suni ( B , A ) . The unidirectional similarity measure is useful for depicting the relationship between A and B . For example , if Suni ( A , B ) < 1 and Suni ( B , A ) = 1 , then one can tell that A is a subset of B . We perform experiments on two commonly-used domain adaptation datasets : Office-31 ( Saenko et al. , 2010 ) and Office-Home ( Venkateswara et al. , 2017 ) . They each have 3 and 4 different domains for images of the same set of classes ( Figure 4 ) . We calculate information similarity S and unidirectional information similarity Suni for each pair of domains in each dataset . The baseline we use for comparison is the distance of first-order and second-order statistics in the feature space produced by ResNet-56 ( He et al. , 2016b ) pretrained on ImageNet ( Russakovsky et al. , 2015 ) ( see Appendix for details ) . This is inspired by the Maximum Mean Discrepancy ( MMD ) ( Gretton et al. , 2006 ) method for comparing data distributions . In domain adaptation literature , one often aims to minimize such distances to match domains ( Pan et al. , 2009 ) . As illustrated in Figure 5 , information similarity measure give a similarity score between 0 and 1 , which is intuitive and comparable across datasets . S and Suni largely agree with feature distances , but the latter is not comparable across datasets . For instance , dslr and webcam in Office-31 are much more similar than any other pair in the two datasets , which is reflected in S but not in feature distance . S is also more faithful within dataset for corresponding to visual similarities . Unidirectional information similarity Suni gives extra information , for instance , Suni ( amazon , dslr ) > Suni ( dslr , amazon ) shows that amazon contains more distinct information than dslr . This can be explained that each category in amazon has images for 90 different objects , while each category in dslr only has images for 5 objects . | The central concept of this paper is model information, a description length of a discriminative model. The authors advocate usage of model information for analyzing several aspects in deep learning. In particular, they show how model information can be used to judge about difficulty of supervised tasks, domain similarity, model capacity, roles of different network components, and knowledge distillation. All of these are important topics and are relevant to the ICLR community. While most of the definitions and interpretations seem intuitive and valid, there are a few concerns and questions, and in some cases, it is hard to decide whether the conclusions of the interpretations should be trusted. | SP:b7632acf4753f9670c244597cc702fcab680982e |
Constraining Latent Space to Improve Deep Self-Supervised e-Commerce Products Embeddings for Downstream Tasks | The representation of products in a e-commerce marketplace is a key aspect to be exploited when trying to improve the user experience on the site . A well known example of the importance of a good product representation are tasks such as product search or product recommendation . There is however a multitude of lesser known tasks relevant to the business , examples are the detection of counterfeit items , the estimation of package sizes or the categorization of products , among others . It is in this setting that good vector representations of products that can be reused on different tasks are very valuable . Past years have seen a major increase in research in the area of latent representations for products in e-Commerce . Examples of this are models like Prod2Vec or Meta-Prod2Vec which leverage from the information of a user session in order to generate vectors of the products that can be used in product recommendations . This work proposes a novel deep encoder model for learning product embeddings to be applied in several downstream tasks . The model uses pairs of products that appear together in a browsing session of the users and adds a proximity constraint to the final latent space in order to project the embeddings of similar products close to each other . This has a regularization effect which gives better features representations to use across multiple downstream tasks , we explore such effect in our experimentation by assessing its impact on the performance of the tasks . Our experiments show effectiveness in transfer learning scenarios comparable to several industrial baselines . 1 INTRODUCTION . The e-Commerce environment has been growing at a fast rate in recent years . As such , new tasks propose new challenges to be resolved . Some key tasks like product search and recommendation usually have large amounts of data available and dedicated teams to work on them . On the other hand , some lesser known but still valuable tasks have less quality annotated data available and the main goal is to resolve them with a small investment . Examples of the latter are counterfeit/forbidden product detection , package size estimation , etc . For these scenarios , the use of complex systems is discouraged in favor of industry proven baselines like bag-of-words or fastText ( Joulin et al. , 2016 ) . In particular , with the advent of “ Feature Stores ” ( Li et al. , 2017 ) , industrial applications are seeing a rise in the adoption of organization-wide representations of business entities ( customers , products , etc. ) . These are needed in order to speed up the process of building machine learning pipelines to enable both batch training and real-time predictions with as low effort as possible . In the present work we explore the representation learning of marketplace products to apply in downstream tasks . More specifically we aim to train an encoder that that can transform products into embeddings to be used as features of a linear classifier for a specific task , thus avoiding feature engineering for the task . The encoder model training is done is a self-supervised fashion by leveraging browsing session data of users in our marketplace . Using product metadata and an architecture inspired on the recent work of Grill et al . ( 2020 ) , we explore how the use of pairs of products in a session can enable transfer learning into several downstream tasks . As we discuss further in Section 3 , we extend on the work of Grill et al . ( 2020 ) with a new objective function that combines their original idea with a cross entropy objective . Our experiments show that the added objective helps the model converge to better representations for our tasks . We also show , through experimental evaluation , that the encoder model learns good representations that achieve comparable results with several strong baselines including fastText ( Joulin et al. , 2016 ) , Meta-Prod2Vec ( Vasile et al. , 2016 ) , Text Convolutional Networks ( Kim , 2014 ) and BERT ( Devlin et al. , 2018 ) in a set of downstream tasks that come from some of our industrial datasets . This paper is structured as follows : Section 2 presents other works in the area of product representation and also the works we take inspiration to design the encoder model and establish how our approach differs from the previous literature . Section 3 describes in detail all the components of our proposed architecture . Section 4 lists our experimental evaluation setup . Section 5 shows the results of our experimentation . Finally , in Section 6 we summarize our findings and delimit our line of future work . 2 BACKGROUND . Recent years have seen a dramatic increase of latent representations , which have proven to be more relevant in transfer learning scenarios in Computer Vision with the aid of large pre-trained models ( Raina et al. , 2007 ; Huh et al. , 2016 ) ; and , more recently , with the aid of architectures for training unsupervised language models like LSTMs ( Merity et al. , 2017 ) or the attention mechanism ( Vaswani et al. , 2017 ) , transfer learning has seen an explosion of applications in Natural Language Processing ( Howard & Ruder , 2018 ; Devlin et al. , 2018 ; Radford et al. , 2018 ) . For the case of the e-commerce environment , there is extensive research work in the area of latent representation for some of the main tasks . In the area of recommender systems there is a very large body of work in which the idea is to use information of the user shopping session to generate latent representations of the products . The Prod2Vec algorithm ( Grbovic et al. , 2015 ) proposed the use of word2vec ( Mikolov et al. , 2013 ) in a sequence of product receipts coming from emails . The Meta-Prod2Vec algorithm ( Vasile et al. , 2016 ) extended upon Prod2Vec by adding information on the metadata of a user shopping session . Using metadata of the products during a stream of user clicks is explored with the aid of parallel recurrent neural networks ( Hidasi et al. , 2016 ) where the authors use images and text of an product to expand in order to have richer features to model the products in the session . Other works that uses more metadata , in this case the user review of an product , is DeepCoNN ( Zheng et al. , 2017 ) , which consists of two parallel neural networks coupled in the last layers . One network learns user behaviour and the other learns product properties , based on the reviews written . There is also work in the area of modelling information on session-aware recommender systems ( Twardowski , 2016 ) , where the user information is not present and the focus of the task is leaning towards using the session information to recommend products . This extensive research of representation learning for marketplace products is heavily influenced with the end goal of recommendation . Many of them also leverage from the unsupervised information available such as sessions , reviews , metadata , etc . In this work the end goal of the representations is not recommendations , but different downstream tasks that we have available from challenges we face in our marketplace . For that we propose a deep encoder architecture that follows the work presented in “ Bootstrap Your Own Latent ” ( BYOL ) ( Grill et al. , 2020 ) with the intended objective of learning embeddings of products of the same session close to each other in the latent space . However , our experiments showed that this was not enough to ensure the transfer of knowledge , as such we extended the learning objective of BYOL to have a cross entropy objective using the product category as target and we explore how the correct combination of each part of the objective function impacts on the quality of the final embeddings . The main contributions of our paper are the following : 1 ) a novel deep encoder architecture that can be trained on pairs of products found in user browsing sessions , 2 ) a study of how this architecture performs for downstream tasks compared to some strong proposed baselines , 3 ) an extension to the BYOL architecture to a different domain from the proposed by Grill et al . ( 2020 ) and how it impacts on the final results . 3 METHOD . 3.1 BROWSING SESSION DATA . The data needed to train our Product Embeddings are browsing sessions of different users in the marketplace . Each product a user visits ( i.e . check the details ) is part of the browsing session of the user . A session ends when at least T minutes have passed without new visits . More formally , given a sequence of products s = ( p1 , ... , pn ) where pi is an product and T ( pi ) is the timestamp of the accessed product , we have that T ( pi+1 ) − T ( pi ) ≤ T for a fixed time window T in minutes . Each product pj in the session is represented by two attributes : the title t ( pj ) and the category c ( pj ) . The title of the product is written by the user of the marketplace . It contains a brief description of the product with some information such as brand , model , measures , etc . It depends on the product itself , and the same product can appear with different titles . Some products have an associated id to identify that they are the same product sold by different users , but that is not always the case . As the language of our marketplace is Spanish , the titles are normalized by stripping accents , removing stopwords and punctuation , lowercase of words and whitespace normalization . The category of the product is selected by the user from a list of fixed categories . These make both attributes susceptible to noise as are driven by the user ’ s actions ( e.g . are spelling errors on the title or missing categories for one-of-a-kind products ) . We use the titles of these products as their appear in the sessions to build a sentence piece tokenizer ( SPM ) ( Kudo & Richardson , 2018 ) . This same tokenizer is applied to the titles to reduce out-ofvocabulary related issues . The titles are finally represented to the model as a sequence of sub-word tokens from the SPM . We see all the possible combinations without replacement with two products between all the products of a session . Each product pair is what we feed to our model . The main concept here is that we are interested in products that are part of the same session , regardless of the order they were accessed by the user . We also remove all duplicate products in a single session ( since it is common for the user to access the same product more than once in the time frame ) . 3.2 PROPOSED MODEL . We are interested in finding an encoder to map the product title to a latent space that minimizes the distance of embeddings of a product in the same session while maximizes the distance between products of different sessions . Once we have the encoder function , it is used on the product titles of downstream tasks where the session information is not available . We transfer knowledge from the sessions into the tasks and train a linear model for the task . More formally , given an encoding function fθ we use the information of the browsing session to calculate the parameters θ . Then given a task dataset S = { ( x1 , y1 ) , ... , ( xn , yn ) } , we use fθ to encode { fθ ( x1 ) , ... , fθ ( xn ) } and use those features to train a linear classifier gω on the weights ω while freezing the weights θ . | The authors study the problem of representation learning of marketplace products to apply in downstream tasks. More specifically, the authors extend the work of BYOL with a new objective function by adding a cross-entropy objective. The main hypothesis of this paper is that different products of the same browsing session can be thought of as different augmentations of the same session. | SP:433a47ed8978997d213bc7072f66a4d62e2e92e3 |
Constraining Latent Space to Improve Deep Self-Supervised e-Commerce Products Embeddings for Downstream Tasks | The representation of products in a e-commerce marketplace is a key aspect to be exploited when trying to improve the user experience on the site . A well known example of the importance of a good product representation are tasks such as product search or product recommendation . There is however a multitude of lesser known tasks relevant to the business , examples are the detection of counterfeit items , the estimation of package sizes or the categorization of products , among others . It is in this setting that good vector representations of products that can be reused on different tasks are very valuable . Past years have seen a major increase in research in the area of latent representations for products in e-Commerce . Examples of this are models like Prod2Vec or Meta-Prod2Vec which leverage from the information of a user session in order to generate vectors of the products that can be used in product recommendations . This work proposes a novel deep encoder model for learning product embeddings to be applied in several downstream tasks . The model uses pairs of products that appear together in a browsing session of the users and adds a proximity constraint to the final latent space in order to project the embeddings of similar products close to each other . This has a regularization effect which gives better features representations to use across multiple downstream tasks , we explore such effect in our experimentation by assessing its impact on the performance of the tasks . Our experiments show effectiveness in transfer learning scenarios comparable to several industrial baselines . 1 INTRODUCTION . The e-Commerce environment has been growing at a fast rate in recent years . As such , new tasks propose new challenges to be resolved . Some key tasks like product search and recommendation usually have large amounts of data available and dedicated teams to work on them . On the other hand , some lesser known but still valuable tasks have less quality annotated data available and the main goal is to resolve them with a small investment . Examples of the latter are counterfeit/forbidden product detection , package size estimation , etc . For these scenarios , the use of complex systems is discouraged in favor of industry proven baselines like bag-of-words or fastText ( Joulin et al. , 2016 ) . In particular , with the advent of “ Feature Stores ” ( Li et al. , 2017 ) , industrial applications are seeing a rise in the adoption of organization-wide representations of business entities ( customers , products , etc. ) . These are needed in order to speed up the process of building machine learning pipelines to enable both batch training and real-time predictions with as low effort as possible . In the present work we explore the representation learning of marketplace products to apply in downstream tasks . More specifically we aim to train an encoder that that can transform products into embeddings to be used as features of a linear classifier for a specific task , thus avoiding feature engineering for the task . The encoder model training is done is a self-supervised fashion by leveraging browsing session data of users in our marketplace . Using product metadata and an architecture inspired on the recent work of Grill et al . ( 2020 ) , we explore how the use of pairs of products in a session can enable transfer learning into several downstream tasks . As we discuss further in Section 3 , we extend on the work of Grill et al . ( 2020 ) with a new objective function that combines their original idea with a cross entropy objective . Our experiments show that the added objective helps the model converge to better representations for our tasks . We also show , through experimental evaluation , that the encoder model learns good representations that achieve comparable results with several strong baselines including fastText ( Joulin et al. , 2016 ) , Meta-Prod2Vec ( Vasile et al. , 2016 ) , Text Convolutional Networks ( Kim , 2014 ) and BERT ( Devlin et al. , 2018 ) in a set of downstream tasks that come from some of our industrial datasets . This paper is structured as follows : Section 2 presents other works in the area of product representation and also the works we take inspiration to design the encoder model and establish how our approach differs from the previous literature . Section 3 describes in detail all the components of our proposed architecture . Section 4 lists our experimental evaluation setup . Section 5 shows the results of our experimentation . Finally , in Section 6 we summarize our findings and delimit our line of future work . 2 BACKGROUND . Recent years have seen a dramatic increase of latent representations , which have proven to be more relevant in transfer learning scenarios in Computer Vision with the aid of large pre-trained models ( Raina et al. , 2007 ; Huh et al. , 2016 ) ; and , more recently , with the aid of architectures for training unsupervised language models like LSTMs ( Merity et al. , 2017 ) or the attention mechanism ( Vaswani et al. , 2017 ) , transfer learning has seen an explosion of applications in Natural Language Processing ( Howard & Ruder , 2018 ; Devlin et al. , 2018 ; Radford et al. , 2018 ) . For the case of the e-commerce environment , there is extensive research work in the area of latent representation for some of the main tasks . In the area of recommender systems there is a very large body of work in which the idea is to use information of the user shopping session to generate latent representations of the products . The Prod2Vec algorithm ( Grbovic et al. , 2015 ) proposed the use of word2vec ( Mikolov et al. , 2013 ) in a sequence of product receipts coming from emails . The Meta-Prod2Vec algorithm ( Vasile et al. , 2016 ) extended upon Prod2Vec by adding information on the metadata of a user shopping session . Using metadata of the products during a stream of user clicks is explored with the aid of parallel recurrent neural networks ( Hidasi et al. , 2016 ) where the authors use images and text of an product to expand in order to have richer features to model the products in the session . Other works that uses more metadata , in this case the user review of an product , is DeepCoNN ( Zheng et al. , 2017 ) , which consists of two parallel neural networks coupled in the last layers . One network learns user behaviour and the other learns product properties , based on the reviews written . There is also work in the area of modelling information on session-aware recommender systems ( Twardowski , 2016 ) , where the user information is not present and the focus of the task is leaning towards using the session information to recommend products . This extensive research of representation learning for marketplace products is heavily influenced with the end goal of recommendation . Many of them also leverage from the unsupervised information available such as sessions , reviews , metadata , etc . In this work the end goal of the representations is not recommendations , but different downstream tasks that we have available from challenges we face in our marketplace . For that we propose a deep encoder architecture that follows the work presented in “ Bootstrap Your Own Latent ” ( BYOL ) ( Grill et al. , 2020 ) with the intended objective of learning embeddings of products of the same session close to each other in the latent space . However , our experiments showed that this was not enough to ensure the transfer of knowledge , as such we extended the learning objective of BYOL to have a cross entropy objective using the product category as target and we explore how the correct combination of each part of the objective function impacts on the quality of the final embeddings . The main contributions of our paper are the following : 1 ) a novel deep encoder architecture that can be trained on pairs of products found in user browsing sessions , 2 ) a study of how this architecture performs for downstream tasks compared to some strong proposed baselines , 3 ) an extension to the BYOL architecture to a different domain from the proposed by Grill et al . ( 2020 ) and how it impacts on the final results . 3 METHOD . 3.1 BROWSING SESSION DATA . The data needed to train our Product Embeddings are browsing sessions of different users in the marketplace . Each product a user visits ( i.e . check the details ) is part of the browsing session of the user . A session ends when at least T minutes have passed without new visits . More formally , given a sequence of products s = ( p1 , ... , pn ) where pi is an product and T ( pi ) is the timestamp of the accessed product , we have that T ( pi+1 ) − T ( pi ) ≤ T for a fixed time window T in minutes . Each product pj in the session is represented by two attributes : the title t ( pj ) and the category c ( pj ) . The title of the product is written by the user of the marketplace . It contains a brief description of the product with some information such as brand , model , measures , etc . It depends on the product itself , and the same product can appear with different titles . Some products have an associated id to identify that they are the same product sold by different users , but that is not always the case . As the language of our marketplace is Spanish , the titles are normalized by stripping accents , removing stopwords and punctuation , lowercase of words and whitespace normalization . The category of the product is selected by the user from a list of fixed categories . These make both attributes susceptible to noise as are driven by the user ’ s actions ( e.g . are spelling errors on the title or missing categories for one-of-a-kind products ) . We use the titles of these products as their appear in the sessions to build a sentence piece tokenizer ( SPM ) ( Kudo & Richardson , 2018 ) . This same tokenizer is applied to the titles to reduce out-ofvocabulary related issues . The titles are finally represented to the model as a sequence of sub-word tokens from the SPM . We see all the possible combinations without replacement with two products between all the products of a session . Each product pair is what we feed to our model . The main concept here is that we are interested in products that are part of the same session , regardless of the order they were accessed by the user . We also remove all duplicate products in a single session ( since it is common for the user to access the same product more than once in the time frame ) . 3.2 PROPOSED MODEL . We are interested in finding an encoder to map the product title to a latent space that minimizes the distance of embeddings of a product in the same session while maximizes the distance between products of different sessions . Once we have the encoder function , it is used on the product titles of downstream tasks where the session information is not available . We transfer knowledge from the sessions into the tasks and train a linear model for the task . More formally , given an encoding function fθ we use the information of the browsing session to calculate the parameters θ . Then given a task dataset S = { ( x1 , y1 ) , ... , ( xn , yn ) } , we use fθ to encode { fθ ( x1 ) , ... , fθ ( xn ) } and use those features to train a linear classifier gω on the weights ω while freezing the weights θ . | This paper studies representation learning in an e-commerce setting. In particular, the paper explores the use of the recently proposed Bootstrap Your Own Latent (BYOL) framework to learn product representations. Rather than using different views of the same entity (as is done in the image domain), different products within a single shopping session are used. Experiments show that the unsupervised BYOL alone does not perform well in this setting. To remedy this issue, the objective is modified by adding a supervised product category prediction loss. Experimental comparisons are made to several baselines on four downstream supervised learning tasks. | SP:433a47ed8978997d213bc7072f66a4d62e2e92e3 |
Differentially Private Generative Models Through Optimal Transport | 1 INTRODUCTION . As the full value of data comes to fruition through a growing number of data-centric applications ( e.g . recommender systems ( Gomez-Uribe & Hunt , 2016 ) , personalized medicine ( Ho et al. , 2020 ) , face recognition ( Wang & Deng , 2020 ) , speech synthesis ( Oord et al. , 2016 ) , etc . ) , the importance of privacy protection has become apparent to both the public and academia . At the same time , recent Machine Learning ( ML ) algorithms and applications are increasingly data hungry and the use of personal data will eventually be a necessity . Differential Privacy ( DP ) is a rigorous definition of privacy that quantifies the amount of information leaked by a user participating in any data release ( Dwork et al. , 2006 ; Dwork & Roth , 2014 ) . DP was originally designed for answering queries to statistical databases . In a typical setting , a data analyst ( party wanting to use data , such as a healthcare or marketing company ) sends a query to a data curator ( party in charge of safekeeping the database , such as a hospital ) , who makes the query on the database and replies with a semi-random answer that preserves privacy . Differentially Private Stochastic Gradient Descent ( DPSGD ) 1 ( Abadi et al. , 2016 ) is the most popular method for training general machine learning models with DP guarantees . DPSGD involves large numbers of queries , in the form of gradient computations , to be answered quickly by the curator . This requires technology transfer of model design from analyst to curator , and strong computational capacity be present at the curator . Furthermore , if the analyst wants to train on multiple tasks , the curator must subdivide the privacy budget to spend on each task . As few institutions have simultaneous access to private data , computational resources , and expertise in machine learning , these requirements significantly limit adoption of DPSGD for learning with privacy guarantees . To address this challenge , generative models—models with the capacity to synthesize new data— can be applied as a general medium for data-sharing ( Xie et al. , 2018 ; Augenstein et al. , 2020 ) . The 1Including any variants that use gradient perturbation for ensuring privacy . curator first encodes private data into a generative model ; then , the model is used by the analysts to synthesize similar yet different data that can train other ML applications . So long as the generative model is learned ” privately ” , the user can protect their privacy by controlling how specific the generative model is to their own data . Differentially private learning of generative models has been studied mostly under the Generative Adversarial Networks ( GAN ) framework ( Xie et al. , 2018 ; Torkzadehmahani et al. , 2019 ; Frigerio et al. , 2019 ; Yoon et al. , 2019 ; Chen et al. , 2020 ) . While GANs in the non-private setting have demonstrated the ability to synthesize complex data like high definition images ( Brock et al. , 2019 ; Karras et al. , 2020 ) , their application in the private setting is more challenging . This is in part because GANs suffer from training instability problems ( Arjovsky & Bottou , 2017 ; Mescheder et al. , 2018 ) , which can be exacerbated when adding noise to the network ’ s gradients during training , a common technique to implement DP . Because of that , GANs typically require careful hyperparameter tuning and supervision during training to avoid model collapse . This goes against the principle of privacy , where repeated interactions with data need to be avoided ( Chaudhuri & Vinterbo , 2013 ) . Optimal Transport ( OT ) is another method to train generative models . In the optimal transport setting , the problem of learning a generative model is framed as minimizing the optimal transport distance , a type of Wasserstein distance , between the generator-induced distribution and the real data distribution ( Bousquet et al. , 2017 ; Peyré & Cuturi , 2019 ) . Unfortunately , exactly computing the OT distance is generally expensive . Nevertheless , Wasserstein distance-based objectives are actually widely used to train GANs ( Arjovsky et al. , 2017 ; Gulrajani et al. , 2017b ) . However , these approaches typically estimate a Wasserstein distance using an adversarially trained discriminator . Hence , training instabilities remain ( Mescheder et al. , 2018 ) . An alternative to adversarial-based OT estimation is provided by the Sinkhorn divergence ( Genevay et al. , 2016 ; Feydy et al. , 2019 ; Genevay et al. , 2018 ) . The Sinkhorn divergence is an entropyregularized version of the exact OT distance , for which the optimal transport plan can be computed efficiently via the Sinkhorn algorithm ( Cuturi , 2013 ) . In this paper , we propose DP-Sinkhorn , a novel method to train differentially private generative models using the Sinkhorn divergence as objective . Since the Sinkhorn approach does not intrinsically rely on adversarial components , it avoids any potential training instabilities and removes the need for early stopping . This makes our method easy to train and deploy in practice . As a side , we also develop a simple yet effective way to perform conditional generation in the Sinkhorn framework , by forcing the optimal transport plan to couple same-label data closer together . To the best of our knowledge , DP-Sinkhorn is the first fully OT-based approach for differentially private generative modeling . Experimentally , despite its simplicity DP-Sinkhorn achieves state-of-the-art results on image-based classification benchmarks that use data generated under differential privacy for training . We can also generate informative RGB images , which , to the best of our knowledge , has not been demonstrated by any generative models trained with differential privacy and without auxiliary public data . We make the following contributions : ( i ) We propose DP-Sinkhorn , a flexible and robust optimal transport-based framework for training differentially private generative models . ( ii ) We introduce a simple technique to perform label-conditional synthesis in the Sinkhorn framework . ( iii ) We achieve state-of-the-art performance on widely used image modeling benchmarks . ( iv ) We present informative RGB images generated under strict differential privacy without the use of public data . 2 BACKGROUND . 2.1 NOTATIONS AND SETTING . Let X denote a sample space , P ( X ) all possible measures on X , and Z ⊆ Rd the latent space . We are interested in training a generative model g : Z 7→ X such that its induced distribution µ = g ◦ ξ with noise source ξ ∈ P ( Z ) is similar to observed ν through an independently sampled finite sized set of observations D = { y } N . In our case , g is a trainable parametric function with parameters θ . 2.2 GENERATIVE LEARNING WITH OPTIMAL TRANSPORT . Optimal Transport-based generative learning considers minimizing variants of the Wasserstein distance between real and generated distributions ( Bousquet et al. , 2017 ; Peyré & Cuturi , 2019 ) . Two key advantages of the Wasserstein distance over standard GANs , which optimize the JensenShannon divergence ( Goodfellow et al. , 2014 ) , are its definiteness on distributions with nonoverlapping supports , and its weak metrization of probability spaces ( Arjovsky et al. , 2017 ) . This prevents collapse during training caused by discriminators that are overfit to the training examples . Methods implementing the OT framework use either the primal or the dual formulation . For generative learning , the dual formulation has been more popular . Under the dual formulation , the distance between the generator-induced and the data distribution is computed as the expectation of potential functions over the sample space . In WGAN and variants ( Arjovsky et al. , 2017 ; Gulrajani et al. , 2017a ; Miyato et al. , 2018 ) , the dual potential is approximated by an adversarially trained discriminator network . While theoretically sound , these methods still encounter instabilities during training since the non-optimality of the discriminator can produce arbitrarily large biases in the generator gradient ( Bousquet et al. , 2017 ) . The primal formulation involves solving for the optimal transport plan—a joint distribution over the real and generated sample spaces . The distance between the two distributions is then measured as the expectation of a point-wise cost function between pairs of samples as distributed according to the transport plan . Thus , the properties of the point-wise cost function are of great importance . In practice , sufficiently convex cost functions allow for an efficient optimization of the generator . It is also possible to learn cost functions adversarially ( Szabó & Sriperumbudur , 2017 ) . However , as discussed earlier , adversarial training often comes with additional challenges , which can be especially problematic in the differentially private setting . In general , finding the optimal transport plan is a difficult optimization problem due to the constraints of equality between its marginals and the real and generated distributions . Entropy Regularized Wasserstein Distance ( ERWD ) imposes a strongly convex regularization term on the Wasserstein distance , making the OT problem between finite samples solvable in linear time ( Peyré et al. , 2019 ) . Given a positive cost function c : X × X 7→ R+ and ≥ 0 , the EERWD is defined as : Wc , ( µ , ν ) = min π∈Π ∫ c ( x , y ) π ( x , y ) + ∫ log π ( x , y ) dµ ( x ) dν ( y ) dπ ( x , y ) ( 1 ) where Π = { π ( x , y ) ∈ P ( X × X ) | ∫ π ( x , · ) dx = ν , ∫ π ( · , y ) dy = µ } . Sinkhorn divergence uses cross correlation terms to cancel out the entropic bias introduced by ERWD . This results in faithful matching between the generator and real distributions . In this paper , we use the Sinkhorn divergence as defined in Feydy et al . ( 2019 ) . Definition 2.1 ( Sinkhorn Divergence ) The Sinkhorn divergence between measures µ and ν is defined as : Sc , ( µ , ν ) = 2Wc , ( µ , ν ) −Wc , ( µ , µ ) −Wc , ( ν , ν ) ( 2 ) Works on the efficient computation of the Sinkhorn divergence have yielded algorithms that converge to the optimal transport plan within tens of iterations ( Cuturi , 2013 ; Feydy et al. , 2019 ) . Gradient computation follows by taking the Jacobian vector product between the cost matrix Jacobian and the transport weights , which is implemented in many auto-differentiation frameworks . When compared to WGAN , learning with the Sinkhorn divergence has distinct differences . First , the Sinkhorn divergence is computed under the primal formulation of OT , whereas WGAN ’ s loss is computed under the dual formulation . While both are approximations to the exact Wasserstein distance , the source of the approximation error differs . The Sinkhorn divergence uses entropic regularization to ensure linear convergence when finding the optimal transport plan π ( Cuturi , 2013 ) . Its two sources of error are the suboptimality of the transport plan and bias introduced by entropic regularization . With the guarantee of linear convergence , π can converge to optimality by using enough iterations , thereby allowing control of the first error . The second source of error can be controlled by using small values of , which we found to work well in practice . In contrast , WGAN ’ s source of error lies in the sub-optimality of the dual potential function . Since this potential function is parameterized by an adversarially trained deep neural network , it enjoys neither convergence guarantees nor feasibility guarantees . Furthermore , the adversarial training scheme can produce oscillatory behavior , where the discriminator and generator change abruptly every iteration to counter the strategy of the other player from the previous iteration ( Mescheder et al. , 2017 ) . These shortcomings contribute to WGAN ’ s problems of non-convergence , which in turn can lead to mode dropping . In contrast , training with the Sinkhorn divergence does not involve any adversarial training at all , converges more stably , and reaps the benefits of OT metrics at covering modes . | This paper presents a differentially private method for training a generative model. The proposed method takes advantage of the Sinkhorn divergence to achieve robustness against the hyperparameters' choices. The authors also introduce a cost function enabling the generative model to generate images associated with a specific class label. The experimental results show that the proposed method outperforms the existing methods for learning a generative model in a differentially private manner. Furthermore, such a high accuracy can be achieved without the use of publicity available data. | SP:3286b16b5791520a5d0e11bb42a8f3f5e5b8604d |
Differentially Private Generative Models Through Optimal Transport | 1 INTRODUCTION . As the full value of data comes to fruition through a growing number of data-centric applications ( e.g . recommender systems ( Gomez-Uribe & Hunt , 2016 ) , personalized medicine ( Ho et al. , 2020 ) , face recognition ( Wang & Deng , 2020 ) , speech synthesis ( Oord et al. , 2016 ) , etc . ) , the importance of privacy protection has become apparent to both the public and academia . At the same time , recent Machine Learning ( ML ) algorithms and applications are increasingly data hungry and the use of personal data will eventually be a necessity . Differential Privacy ( DP ) is a rigorous definition of privacy that quantifies the amount of information leaked by a user participating in any data release ( Dwork et al. , 2006 ; Dwork & Roth , 2014 ) . DP was originally designed for answering queries to statistical databases . In a typical setting , a data analyst ( party wanting to use data , such as a healthcare or marketing company ) sends a query to a data curator ( party in charge of safekeeping the database , such as a hospital ) , who makes the query on the database and replies with a semi-random answer that preserves privacy . Differentially Private Stochastic Gradient Descent ( DPSGD ) 1 ( Abadi et al. , 2016 ) is the most popular method for training general machine learning models with DP guarantees . DPSGD involves large numbers of queries , in the form of gradient computations , to be answered quickly by the curator . This requires technology transfer of model design from analyst to curator , and strong computational capacity be present at the curator . Furthermore , if the analyst wants to train on multiple tasks , the curator must subdivide the privacy budget to spend on each task . As few institutions have simultaneous access to private data , computational resources , and expertise in machine learning , these requirements significantly limit adoption of DPSGD for learning with privacy guarantees . To address this challenge , generative models—models with the capacity to synthesize new data— can be applied as a general medium for data-sharing ( Xie et al. , 2018 ; Augenstein et al. , 2020 ) . The 1Including any variants that use gradient perturbation for ensuring privacy . curator first encodes private data into a generative model ; then , the model is used by the analysts to synthesize similar yet different data that can train other ML applications . So long as the generative model is learned ” privately ” , the user can protect their privacy by controlling how specific the generative model is to their own data . Differentially private learning of generative models has been studied mostly under the Generative Adversarial Networks ( GAN ) framework ( Xie et al. , 2018 ; Torkzadehmahani et al. , 2019 ; Frigerio et al. , 2019 ; Yoon et al. , 2019 ; Chen et al. , 2020 ) . While GANs in the non-private setting have demonstrated the ability to synthesize complex data like high definition images ( Brock et al. , 2019 ; Karras et al. , 2020 ) , their application in the private setting is more challenging . This is in part because GANs suffer from training instability problems ( Arjovsky & Bottou , 2017 ; Mescheder et al. , 2018 ) , which can be exacerbated when adding noise to the network ’ s gradients during training , a common technique to implement DP . Because of that , GANs typically require careful hyperparameter tuning and supervision during training to avoid model collapse . This goes against the principle of privacy , where repeated interactions with data need to be avoided ( Chaudhuri & Vinterbo , 2013 ) . Optimal Transport ( OT ) is another method to train generative models . In the optimal transport setting , the problem of learning a generative model is framed as minimizing the optimal transport distance , a type of Wasserstein distance , between the generator-induced distribution and the real data distribution ( Bousquet et al. , 2017 ; Peyré & Cuturi , 2019 ) . Unfortunately , exactly computing the OT distance is generally expensive . Nevertheless , Wasserstein distance-based objectives are actually widely used to train GANs ( Arjovsky et al. , 2017 ; Gulrajani et al. , 2017b ) . However , these approaches typically estimate a Wasserstein distance using an adversarially trained discriminator . Hence , training instabilities remain ( Mescheder et al. , 2018 ) . An alternative to adversarial-based OT estimation is provided by the Sinkhorn divergence ( Genevay et al. , 2016 ; Feydy et al. , 2019 ; Genevay et al. , 2018 ) . The Sinkhorn divergence is an entropyregularized version of the exact OT distance , for which the optimal transport plan can be computed efficiently via the Sinkhorn algorithm ( Cuturi , 2013 ) . In this paper , we propose DP-Sinkhorn , a novel method to train differentially private generative models using the Sinkhorn divergence as objective . Since the Sinkhorn approach does not intrinsically rely on adversarial components , it avoids any potential training instabilities and removes the need for early stopping . This makes our method easy to train and deploy in practice . As a side , we also develop a simple yet effective way to perform conditional generation in the Sinkhorn framework , by forcing the optimal transport plan to couple same-label data closer together . To the best of our knowledge , DP-Sinkhorn is the first fully OT-based approach for differentially private generative modeling . Experimentally , despite its simplicity DP-Sinkhorn achieves state-of-the-art results on image-based classification benchmarks that use data generated under differential privacy for training . We can also generate informative RGB images , which , to the best of our knowledge , has not been demonstrated by any generative models trained with differential privacy and without auxiliary public data . We make the following contributions : ( i ) We propose DP-Sinkhorn , a flexible and robust optimal transport-based framework for training differentially private generative models . ( ii ) We introduce a simple technique to perform label-conditional synthesis in the Sinkhorn framework . ( iii ) We achieve state-of-the-art performance on widely used image modeling benchmarks . ( iv ) We present informative RGB images generated under strict differential privacy without the use of public data . 2 BACKGROUND . 2.1 NOTATIONS AND SETTING . Let X denote a sample space , P ( X ) all possible measures on X , and Z ⊆ Rd the latent space . We are interested in training a generative model g : Z 7→ X such that its induced distribution µ = g ◦ ξ with noise source ξ ∈ P ( Z ) is similar to observed ν through an independently sampled finite sized set of observations D = { y } N . In our case , g is a trainable parametric function with parameters θ . 2.2 GENERATIVE LEARNING WITH OPTIMAL TRANSPORT . Optimal Transport-based generative learning considers minimizing variants of the Wasserstein distance between real and generated distributions ( Bousquet et al. , 2017 ; Peyré & Cuturi , 2019 ) . Two key advantages of the Wasserstein distance over standard GANs , which optimize the JensenShannon divergence ( Goodfellow et al. , 2014 ) , are its definiteness on distributions with nonoverlapping supports , and its weak metrization of probability spaces ( Arjovsky et al. , 2017 ) . This prevents collapse during training caused by discriminators that are overfit to the training examples . Methods implementing the OT framework use either the primal or the dual formulation . For generative learning , the dual formulation has been more popular . Under the dual formulation , the distance between the generator-induced and the data distribution is computed as the expectation of potential functions over the sample space . In WGAN and variants ( Arjovsky et al. , 2017 ; Gulrajani et al. , 2017a ; Miyato et al. , 2018 ) , the dual potential is approximated by an adversarially trained discriminator network . While theoretically sound , these methods still encounter instabilities during training since the non-optimality of the discriminator can produce arbitrarily large biases in the generator gradient ( Bousquet et al. , 2017 ) . The primal formulation involves solving for the optimal transport plan—a joint distribution over the real and generated sample spaces . The distance between the two distributions is then measured as the expectation of a point-wise cost function between pairs of samples as distributed according to the transport plan . Thus , the properties of the point-wise cost function are of great importance . In practice , sufficiently convex cost functions allow for an efficient optimization of the generator . It is also possible to learn cost functions adversarially ( Szabó & Sriperumbudur , 2017 ) . However , as discussed earlier , adversarial training often comes with additional challenges , which can be especially problematic in the differentially private setting . In general , finding the optimal transport plan is a difficult optimization problem due to the constraints of equality between its marginals and the real and generated distributions . Entropy Regularized Wasserstein Distance ( ERWD ) imposes a strongly convex regularization term on the Wasserstein distance , making the OT problem between finite samples solvable in linear time ( Peyré et al. , 2019 ) . Given a positive cost function c : X × X 7→ R+ and ≥ 0 , the EERWD is defined as : Wc , ( µ , ν ) = min π∈Π ∫ c ( x , y ) π ( x , y ) + ∫ log π ( x , y ) dµ ( x ) dν ( y ) dπ ( x , y ) ( 1 ) where Π = { π ( x , y ) ∈ P ( X × X ) | ∫ π ( x , · ) dx = ν , ∫ π ( · , y ) dy = µ } . Sinkhorn divergence uses cross correlation terms to cancel out the entropic bias introduced by ERWD . This results in faithful matching between the generator and real distributions . In this paper , we use the Sinkhorn divergence as defined in Feydy et al . ( 2019 ) . Definition 2.1 ( Sinkhorn Divergence ) The Sinkhorn divergence between measures µ and ν is defined as : Sc , ( µ , ν ) = 2Wc , ( µ , ν ) −Wc , ( µ , µ ) −Wc , ( ν , ν ) ( 2 ) Works on the efficient computation of the Sinkhorn divergence have yielded algorithms that converge to the optimal transport plan within tens of iterations ( Cuturi , 2013 ; Feydy et al. , 2019 ) . Gradient computation follows by taking the Jacobian vector product between the cost matrix Jacobian and the transport weights , which is implemented in many auto-differentiation frameworks . When compared to WGAN , learning with the Sinkhorn divergence has distinct differences . First , the Sinkhorn divergence is computed under the primal formulation of OT , whereas WGAN ’ s loss is computed under the dual formulation . While both are approximations to the exact Wasserstein distance , the source of the approximation error differs . The Sinkhorn divergence uses entropic regularization to ensure linear convergence when finding the optimal transport plan π ( Cuturi , 2013 ) . Its two sources of error are the suboptimality of the transport plan and bias introduced by entropic regularization . With the guarantee of linear convergence , π can converge to optimality by using enough iterations , thereby allowing control of the first error . The second source of error can be controlled by using small values of , which we found to work well in practice . In contrast , WGAN ’ s source of error lies in the sub-optimality of the dual potential function . Since this potential function is parameterized by an adversarially trained deep neural network , it enjoys neither convergence guarantees nor feasibility guarantees . Furthermore , the adversarial training scheme can produce oscillatory behavior , where the discriminator and generator change abruptly every iteration to counter the strategy of the other player from the previous iteration ( Mescheder et al. , 2017 ) . These shortcomings contribute to WGAN ’ s problems of non-convergence , which in turn can lead to mode dropping . In contrast , training with the Sinkhorn divergence does not involve any adversarial training at all , converges more stably , and reaps the benefits of OT metrics at covering modes . | The paper proposes a method for training OT GANs using differentially private sinkhorn algorithm. The idea is very simple - train GANs with sinkhorn divergences and add Gaussian noise to the gradient of output wrt generated samples. So, the novelty by itself is minimal as sinkhorn GANs have previously been proposed. The method merely adds Gaussian noise to gradients. The DP analysis is also not very different. | SP:3286b16b5791520a5d0e11bb42a8f3f5e5b8604d |
Neural Architecture Search on ImageNet in Four GPU Hours: A Theoretically Inspired Perspective | 1 INTRODUCTION . The recent development of deep networks significantly contributes to the success of computer vision . Thanks to many efforts by human designers , the performance of deep networks have been significantly boosted ( Krizhevsky et al. , 2012 ; Simonyan & Zisserman , 2014 ; Szegedy et al. , 2015 ; He et al. , 2016 ; Xie et al. , 2017 ) . However , the manual creation of new network architectures not only costs enormous time and resources due to trial-and-error , but also depends on the design experience that does not always scale up . To reduce the human efforts and costs , neural architecture search ( NAS ) has recently amassed explosive interests , leading to principled and automated discovery for good architectures in a given search space of candidates ( Zoph & Le , 2016 ; Brock et al. , 2017 ; Pham et al. , 2018 ; Liu et al. , 2018a ; Chen et al. , 2018 ; Bender et al. , 2018 ; Gong et al. , 2019 ; Chen et al. , 2020a ; Fu et al. , 2020 ) . As an optimization problem , NAS faces two core questions : 1 ) “ how to evaluate ” , i.e . the objective function that defines what are good architectures we want ; 2 ) “ how to optimize ” , i.e . by what means we could effectively optimize the objective function . These two questions are entangled and highly non-trivial , since the search spaces are of extremely high dimension , and the generalization ability of architectures can not be easily inferred ( Dong & Yang , 2020 ; Dong et al. , 2020 ) . Existing NAS methods mainly leverage the validation set and conduct accuracy-driven architecture optimization . They either formulate the search space as a super-network ( “ supernet ” ) and make the training loss differentiable through the architecture parameters ( Liu et al. , 2018b ) , or treat the architecture selection as a sequential decision making process ( Zoph & Le , 2016 ) or evolution of genetics ( Real et al. , 2019 ) . However , these NAS algorithms suffer from heavy consumption of both time and GPU resources . Training a supernet till convergence is extremely slow , even with many effective heuristics for sampling or channel approximations ( Dong & Yang , 2019 ; Xu et al. , 2019 ) . Approximated proxy inference such as truncated training/early stopping can accelerate the search , but is well known to introduce search bias to the inaccurate results obtained ( Pham et al. , 2018 ; Liang et al. , 2019 ; Tan et al. , 2020 ) . The heavy search cost not only slows down the discovery of novel architectures , but also blocks us from more meaningfully understanding the NAS behaviors . On the other hand , the analysis of neural network ’ s trainability ( how effective a network can be optimized via gradient descent ) and expressivity ( how complex the function a network can represent ) has witnessed exciting development recently in the deep learning theory fields . By formulating neural networks as a Gaussian Process ( no training involved ) , the gradient descent training dynamics can be characterized by the Neural Tangent Kernel ( NTK ) of infinite ( Lee et al. , 2019 ) or finite ( Yang , 2019 ) width networks , from which several useful measures can be derived to depict the network trainability at the initialization . Hanin & Rolnick ( 2019a ; b ) ; Xiong et al . ( 2020 ) describe another measure of network expressivity , also without any training , by counting the number of unique linear regions that a neural network can divide in its input space . We are therefore inspired to ask : • How to optimize NAS at network ’ s initialization without involving any training , thus significantly eliminating a heavy portion of the search cost ? • Can we define how to evaluate in NAS by analyzing the trainability and expressivity of architectures , and further benefit our understanding of the search process ? Our answers are yes to both questions . In this work , we propose TE-NAS , a framework for trainingfree neural architecture search . We leverage two indicators , the condition number of NTK and the number of linear regions , that can decouple and effectively characterize the trainability and expressivity of architectures respectively in complex NAS search spaces . Most importantly , these two indicators can be measured in a training-free and label-free manner , thus largely accelerates the NAS search process and benefits the understanding of discovered architectures . To our best knowledge , TE-NAS makes the first attempt to bridge the theoretical findings of deep neural networks and real-world NAS applications . While we intend not to claim that the two indicators we use are the only nor the best options , we hope our work opens a door to theoretically-inspired NAS and inspires the discovery of more deep network indicators . Our contributions are summarized as below : • We identify and investigate two training-free and label-free indicators to rank the quality of deep architectures : the spectrum of their NTKs , and the number of linear regions in their input space . Our study finds that they reliably indicate the trainability and expressivity of a deep network respectively , and are strongly correlated with the network ’ s test accuracy . • We leverage the above two theoretically-inspired indicators to establish a training-free NAS framework , TE-NAS , therefore eliminating a drastic portion of the search cost . We further introduce a pruning-based mechanism , to boost search efficiency and to more flexibly trade-off between trainability and expressivity . • In NAS-Bench-201/DARTS search spaces , TE-NAS discovers architectures with a strong performance at remarkably lower search costs , compared to previous efforts . With just one 1080Ti , it only costs 0.5 GPU hours to search on CIFAR10 , and 4 GPU hours on ImageNet , respectively , setting the new record for ultra-efficient yet high-quality NAS . 2 RELATED WORKS . Neural architecture search ( NAS ) is recently proposed to accelerate the principled and automated discovery of high-performance networks . However , most works suffer from heavy search cost , for both weight-sharing based methods ( Liu et al. , 2018b ; Dong & Yang , 2019 ; Liu et al. , 2019 ; Yu et al. , 2020a ; Li et al. , 2020a ; Yang et al. , 2020a ) and single-path sampling-based methods ( Pham et al. , 2018 ; Guo et al. , 2019 ; Real et al. , 2019 ; Tan et al. , 2020 ; Li et al. , 2020c ; Yang et al. , 2020b ) . A one-shot super network can share its parameters to sampled sub-networks and accelerate the architecture evaluations , but it is very heavy and hard to optimize and suffers from a poor correlation between its accuracy and those of the sub-networks ( Yu et al. , 2020c ) . Sampling-based methods achieve more accurate architecture evaluations , but their truncated training still imposes bias to the performance ranking since this is based on the results of early training stages . Instead of estimating architecture performance by direct training , people also try to predict network ’ s accuracy ( or ranking ) , called predictor based NAS methods ( Liu et al. , 2018a ; Luo et al. , 2018 ; Dai et al. , 2019 ; Luo et al. , 2020 ) . Graph neural network ( GNN ) is a popular choice as the predictor model ( Wen et al. , 2019 ; Chen et al. , 2020b ) . Siems et al . ( 2020 ) even propose the first large-scale surrogate benchmark , where most of the architectures ’ accuracies are predicted by a pretrained GNN predictor . The learned predictor can achieve highly accurate performance evaluation . However , the data collection step - sampling representative architectures and train them till converge - still requires extremely high cost . People have to sample and train 2,000 to 50,000 architectures to serve as the training data for the predictor . Moreover , none of these works can demonstrate the cross-space transferability of their predictors . This means one has to repeat the data collection and predictor training whenever facing an unseen search space , which is highly nonscalable . The heavy cost of architecture evaluation hinders the understanding of the NAS search process . Recent pioneer works like Shu et al . ( 2019 ) observed that DARTS and ENAS tend to favor architectures with wide and shallow cell structures due to their smooth loss landscape . Siems et al . ( 2020 ) studied the distribution of test error for different cell depths and numbers of parameter-free operators . Chen & Hsieh ( 2020 ) for the first time regularizes the Hessian norm of the validation loss and visualizes the smoother loss landscape of the supernet . Li et al . ( 2020b ) proposed to approximate the validation loss landscape by learning a mapping from neural architectures to their corresponding validate losses . Still , these analyses can not be directly leveraged to guide the design of network architectures . Mellor et al . ( 2020 ) recently proposed a NAS framework that does not involve training , which shares the same motivation with us towards training-free architecture search at initialization . They empirically find that the correlation between sample-wise input-output Jacobian can indicate the architecture ’ s test performance . However , why does the Jacobian work is not well explained and demonstrated . Their search performance on NAS-Bench-201 is still left behind by the state-of-the-art NAS works , and they did not extend to DARTs space . Meanwhile , we see the evolving development of deep learning theory on neural networks . NTK ( neural tangent kernel ) is proposed to characterize the gradient descent training dynamics of infinite wide ( Jacot et al. , 2018 ) or finite wide deep networks ( Hanin & Nica , 2019 ) . Wide networks are also proved to evolve as linear models under gradient descent ( Lee et al. , 2019 ) . This is further leveraged to decouple the trainability and generalization of networks ( Xiao et al. , 2019 ) . Besides , a natural measure of ReLU network ’ s expressivity is the number of linear regions it can separate in its input space ( Raghu et al. , 2017 ; Montúfar , 2017 ; Serra et al. , 2018 ; Hanin & Rolnick , 2019a ; b ; Xiong et al. , 2020 ) . In our work , we for the first time discover two important indicators that can effectively rank architectures , thus bridging the theoretic findings and real-world NAS applications . Instead of claiming the two indicators we discover are the best , we believe there are more meaningful properties of deep networks that can benefit the architecture search process . We leave them as open questions and encourage the community to study . 3 METHODS . The core motivation of our TE-NAS framework is to achieve architecture evaluation without involving any training , to significantly accelerate the NAS search process and reduce the search cost . In section 3.1 we present our study on two important indicators that reflect the trainability and expressivity of a neural network , and in section 3.2 we design a novel pruning-based method that can achieve a superior trade-off between the two indicators . 3.1 ANALYZING TRAINABILITY AND EXPRESSIVITY OF DEEP NETWORKS . Trainability and expressivity are distinct notions regarding a neural network ( Xiao et al. , 2019 ) . A network can achieve high performance only if the function it can represent is complex enough and at the same time , it can be effectively trained by gradient descent . | Training-free NAS is a promising direction. This work demonstrates that two theoretically inspired indicators: the spectrum of NTK and number of linear regions, strongly correlate with the network’s performance, and can be leveraged to reduce the search cost and decouple the analysis of the network’s trainability and expressivity. The authors thus proposed TE-NAS to rank architectures by analyzing the two indicators. Without involving any training, TE-NAS can achieve competitive NAS performance within minimum search time. | SP:bb6716468d3bd92b5e7de774aa89d5d52df461cb |
Neural Architecture Search on ImageNet in Four GPU Hours: A Theoretically Inspired Perspective | 1 INTRODUCTION . The recent development of deep networks significantly contributes to the success of computer vision . Thanks to many efforts by human designers , the performance of deep networks have been significantly boosted ( Krizhevsky et al. , 2012 ; Simonyan & Zisserman , 2014 ; Szegedy et al. , 2015 ; He et al. , 2016 ; Xie et al. , 2017 ) . However , the manual creation of new network architectures not only costs enormous time and resources due to trial-and-error , but also depends on the design experience that does not always scale up . To reduce the human efforts and costs , neural architecture search ( NAS ) has recently amassed explosive interests , leading to principled and automated discovery for good architectures in a given search space of candidates ( Zoph & Le , 2016 ; Brock et al. , 2017 ; Pham et al. , 2018 ; Liu et al. , 2018a ; Chen et al. , 2018 ; Bender et al. , 2018 ; Gong et al. , 2019 ; Chen et al. , 2020a ; Fu et al. , 2020 ) . As an optimization problem , NAS faces two core questions : 1 ) “ how to evaluate ” , i.e . the objective function that defines what are good architectures we want ; 2 ) “ how to optimize ” , i.e . by what means we could effectively optimize the objective function . These two questions are entangled and highly non-trivial , since the search spaces are of extremely high dimension , and the generalization ability of architectures can not be easily inferred ( Dong & Yang , 2020 ; Dong et al. , 2020 ) . Existing NAS methods mainly leverage the validation set and conduct accuracy-driven architecture optimization . They either formulate the search space as a super-network ( “ supernet ” ) and make the training loss differentiable through the architecture parameters ( Liu et al. , 2018b ) , or treat the architecture selection as a sequential decision making process ( Zoph & Le , 2016 ) or evolution of genetics ( Real et al. , 2019 ) . However , these NAS algorithms suffer from heavy consumption of both time and GPU resources . Training a supernet till convergence is extremely slow , even with many effective heuristics for sampling or channel approximations ( Dong & Yang , 2019 ; Xu et al. , 2019 ) . Approximated proxy inference such as truncated training/early stopping can accelerate the search , but is well known to introduce search bias to the inaccurate results obtained ( Pham et al. , 2018 ; Liang et al. , 2019 ; Tan et al. , 2020 ) . The heavy search cost not only slows down the discovery of novel architectures , but also blocks us from more meaningfully understanding the NAS behaviors . On the other hand , the analysis of neural network ’ s trainability ( how effective a network can be optimized via gradient descent ) and expressivity ( how complex the function a network can represent ) has witnessed exciting development recently in the deep learning theory fields . By formulating neural networks as a Gaussian Process ( no training involved ) , the gradient descent training dynamics can be characterized by the Neural Tangent Kernel ( NTK ) of infinite ( Lee et al. , 2019 ) or finite ( Yang , 2019 ) width networks , from which several useful measures can be derived to depict the network trainability at the initialization . Hanin & Rolnick ( 2019a ; b ) ; Xiong et al . ( 2020 ) describe another measure of network expressivity , also without any training , by counting the number of unique linear regions that a neural network can divide in its input space . We are therefore inspired to ask : • How to optimize NAS at network ’ s initialization without involving any training , thus significantly eliminating a heavy portion of the search cost ? • Can we define how to evaluate in NAS by analyzing the trainability and expressivity of architectures , and further benefit our understanding of the search process ? Our answers are yes to both questions . In this work , we propose TE-NAS , a framework for trainingfree neural architecture search . We leverage two indicators , the condition number of NTK and the number of linear regions , that can decouple and effectively characterize the trainability and expressivity of architectures respectively in complex NAS search spaces . Most importantly , these two indicators can be measured in a training-free and label-free manner , thus largely accelerates the NAS search process and benefits the understanding of discovered architectures . To our best knowledge , TE-NAS makes the first attempt to bridge the theoretical findings of deep neural networks and real-world NAS applications . While we intend not to claim that the two indicators we use are the only nor the best options , we hope our work opens a door to theoretically-inspired NAS and inspires the discovery of more deep network indicators . Our contributions are summarized as below : • We identify and investigate two training-free and label-free indicators to rank the quality of deep architectures : the spectrum of their NTKs , and the number of linear regions in their input space . Our study finds that they reliably indicate the trainability and expressivity of a deep network respectively , and are strongly correlated with the network ’ s test accuracy . • We leverage the above two theoretically-inspired indicators to establish a training-free NAS framework , TE-NAS , therefore eliminating a drastic portion of the search cost . We further introduce a pruning-based mechanism , to boost search efficiency and to more flexibly trade-off between trainability and expressivity . • In NAS-Bench-201/DARTS search spaces , TE-NAS discovers architectures with a strong performance at remarkably lower search costs , compared to previous efforts . With just one 1080Ti , it only costs 0.5 GPU hours to search on CIFAR10 , and 4 GPU hours on ImageNet , respectively , setting the new record for ultra-efficient yet high-quality NAS . 2 RELATED WORKS . Neural architecture search ( NAS ) is recently proposed to accelerate the principled and automated discovery of high-performance networks . However , most works suffer from heavy search cost , for both weight-sharing based methods ( Liu et al. , 2018b ; Dong & Yang , 2019 ; Liu et al. , 2019 ; Yu et al. , 2020a ; Li et al. , 2020a ; Yang et al. , 2020a ) and single-path sampling-based methods ( Pham et al. , 2018 ; Guo et al. , 2019 ; Real et al. , 2019 ; Tan et al. , 2020 ; Li et al. , 2020c ; Yang et al. , 2020b ) . A one-shot super network can share its parameters to sampled sub-networks and accelerate the architecture evaluations , but it is very heavy and hard to optimize and suffers from a poor correlation between its accuracy and those of the sub-networks ( Yu et al. , 2020c ) . Sampling-based methods achieve more accurate architecture evaluations , but their truncated training still imposes bias to the performance ranking since this is based on the results of early training stages . Instead of estimating architecture performance by direct training , people also try to predict network ’ s accuracy ( or ranking ) , called predictor based NAS methods ( Liu et al. , 2018a ; Luo et al. , 2018 ; Dai et al. , 2019 ; Luo et al. , 2020 ) . Graph neural network ( GNN ) is a popular choice as the predictor model ( Wen et al. , 2019 ; Chen et al. , 2020b ) . Siems et al . ( 2020 ) even propose the first large-scale surrogate benchmark , where most of the architectures ’ accuracies are predicted by a pretrained GNN predictor . The learned predictor can achieve highly accurate performance evaluation . However , the data collection step - sampling representative architectures and train them till converge - still requires extremely high cost . People have to sample and train 2,000 to 50,000 architectures to serve as the training data for the predictor . Moreover , none of these works can demonstrate the cross-space transferability of their predictors . This means one has to repeat the data collection and predictor training whenever facing an unseen search space , which is highly nonscalable . The heavy cost of architecture evaluation hinders the understanding of the NAS search process . Recent pioneer works like Shu et al . ( 2019 ) observed that DARTS and ENAS tend to favor architectures with wide and shallow cell structures due to their smooth loss landscape . Siems et al . ( 2020 ) studied the distribution of test error for different cell depths and numbers of parameter-free operators . Chen & Hsieh ( 2020 ) for the first time regularizes the Hessian norm of the validation loss and visualizes the smoother loss landscape of the supernet . Li et al . ( 2020b ) proposed to approximate the validation loss landscape by learning a mapping from neural architectures to their corresponding validate losses . Still , these analyses can not be directly leveraged to guide the design of network architectures . Mellor et al . ( 2020 ) recently proposed a NAS framework that does not involve training , which shares the same motivation with us towards training-free architecture search at initialization . They empirically find that the correlation between sample-wise input-output Jacobian can indicate the architecture ’ s test performance . However , why does the Jacobian work is not well explained and demonstrated . Their search performance on NAS-Bench-201 is still left behind by the state-of-the-art NAS works , and they did not extend to DARTs space . Meanwhile , we see the evolving development of deep learning theory on neural networks . NTK ( neural tangent kernel ) is proposed to characterize the gradient descent training dynamics of infinite wide ( Jacot et al. , 2018 ) or finite wide deep networks ( Hanin & Nica , 2019 ) . Wide networks are also proved to evolve as linear models under gradient descent ( Lee et al. , 2019 ) . This is further leveraged to decouple the trainability and generalization of networks ( Xiao et al. , 2019 ) . Besides , a natural measure of ReLU network ’ s expressivity is the number of linear regions it can separate in its input space ( Raghu et al. , 2017 ; Montúfar , 2017 ; Serra et al. , 2018 ; Hanin & Rolnick , 2019a ; b ; Xiong et al. , 2020 ) . In our work , we for the first time discover two important indicators that can effectively rank architectures , thus bridging the theoretic findings and real-world NAS applications . Instead of claiming the two indicators we discover are the best , we believe there are more meaningful properties of deep networks that can benefit the architecture search process . We leave them as open questions and encourage the community to study . 3 METHODS . The core motivation of our TE-NAS framework is to achieve architecture evaluation without involving any training , to significantly accelerate the NAS search process and reduce the search cost . In section 3.1 we present our study on two important indicators that reflect the trainability and expressivity of a neural network , and in section 3.2 we design a novel pruning-based method that can achieve a superior trade-off between the two indicators . 3.1 ANALYZING TRAINABILITY AND EXPRESSIVITY OF DEEP NETWORKS . Trainability and expressivity are distinct notions regarding a neural network ( Xiao et al. , 2019 ) . A network can achieve high performance only if the function it can represent is complex enough and at the same time , it can be effectively trained by gradient descent . | This paper introduces a searching framework of neural architectures ranking the candidates with two different metrics: the spectrum of NTK and the number of linear regions in the input space. These two metrics do not require the training of neural networks lightening the computational burdensome. Authors support their method by providing results from CIFAR-10, ImageNet, and NAS-Bench-201 benchmark (Dong & Yang). | SP:bb6716468d3bd92b5e7de774aa89d5d52df461cb |
Quickest change detection for multi-task problems under unknown parameters | 1 INTRODUCTION . Quickest Change Detection ( QCD ) problems arise naturally in settings where a latent state controls observable signals ( Basseville et al. , 1993 ) . In biology , it is applied in genomic sequencing ( Caron et al. , 2012 ) and in reliable healthcare monitoring ( Salem et al. , 2014 ) . In industry , it finds application in faulty machinery detection ( Lu et al. , 2017 ; Martí et al. , 2015 ) and in leak surveillance ( Wang et al. , 2014 ) . It also has environmental applications such as traffic-related pollutants detection ( Carslaw et al. , 2006 ) . Any autonomous agent designed to interact with the world and achieve multiple goals must be able to detect relevant changes in the signals it is sensing in order to adapt its behaviour accordingly . This is particularly true for reinforcement learning based agents in multi-task settings as their policy is conditioned to some task parameter ( Gupta et al. , 2018 ; Teh et al. , 2017 ) . In order for the agent to be truly autonomous , it needs to identify the task at hand according to the environment requirement . For example , a robot built to assist cooks in the kitchen should be able to recognise the task being executed ( chopping vegetables , cutting meat , .. ) without external help to assist them efficiently . Otherwise , the agent requires a higher intelligence ( one of the cooks for instance ) to control it ( by stating the task to be executed ) . In the general case , the current task is unknown and has to be identified sequentially from external sensory signals . The agent must track the changes as quickly as possible to adapt to its environment . However , current solutions for the QCD problem when task parameters are unknown , either do not scale or impose restrictive conditions on the setting . ( i.i.d . observations , exponential family distributions , partial knowledge of the parameters , etc. ) . In this paper , we construct a scalable algorithm with similar performances to optimal solutions . For this purpose , we use the change detection delay under known parameters as a lower bound for the delay in the unknown case . This improves our estimations of the parameters and thus improves our change point detection . We consider the case where the data is generated by some Markovian processes as in reinforcement learning . We assess our algorithm performances on synthetic data generated using distributions parameterised with neural networks in order to match the complexity level of real life applications . We also evaluate our algorithm on standard reinforcement learning environment . 2 QUICKEST CHANGE DETECTION PROBLEMS . Formally , consider a sequence of random observations ( Xt ) where each Xt belongs to some observation space X ( say , an Euclidean space for simplicity ) and is drawn from fθt ( .|Xt−1 ) , where the parameter θt belongs to some task parameter space Θ and { fθ , θ ∈ Θ } is a parametric probability distribution family ( non trivial , in the sense that all fθ are different ) . The main idea is that , at almost all stages , θt+1 = θt but there are some “ change points ” where those two parameters differ . Let us denote by tk the different change points and , with a slight abuse of notations , by θk the different values of the parameters . Formally , the data generating process is therefore : Xt ∼ ∑K k=0 fθk ( .|Xt−1 ) 1tk≤. < tk+1 ( t ) . The overarching objective is to identify as quickly as possible the change points tk and the associated parameters θk , based on the observations ( Xt ) . Typical procedures propose to tackle iteratively the simple change point detection problem , and for this reason we will focus mainly on the simpler setting of a single change point , where K = 2 , t0 = 0 , t1 = λ and t2 = ∞ , where λ is unknown and must be estimated . For a formal description of the model and the different metrics , we will also assume that the parameters ( θ0 , θ1 ) are drawn from some distribution F over Θ . As a consequence , the data generating process we consider boils down to the following system 1 : θ0 , θ1 ∼ F and { Xt+1 ∼ fθ0 ( .|Xt ) if t ≤ λ Xt+1 ∼ fθ1 ( .|Xt ) if t > λ . ( 1 ) 2.1 CRITERIA DEFINITIONS . As mentioned , the objective is to detect change points as quickly as possible while controlling the errors . There exist different metrics to evaluate algorithm performances ; they basically all minimise some delay measurements while keeping the rate of type I errors ( false positive change detection ) under a certain level . We will describe later on different existing definitions of these criteria ( type I error and delay ) . In order to evaluate a probability of error and an expected delay , we obviously need to define relevant probability measures first . Traditionally , there are two antagonistic ways to construct them : the MIN-MAX and the BAYESIAN settings ( Veeravalli & Banerjee , 2014 ) . First , we denote by Pn ( resp . En ) the data probability distribution ( resp . the expectation ) conditioned to the change point happening at λ = n. This last event happens with some probability µ ( λ = n ) – with the notation that bold characters designate random variables– , and we denote by Pµ ( resp . Eµ ) the data probability distribution ( resp . the expectation ) , integrated over µ , i.e. , for any event Ω , it holds that Pµ ( Ω ) = ∑ n µ ( λ = n ) Pn ( Ω ) . In the following , we describe the major existing formulations of the QCD problem where the goal is to identify an optimal stopping time τ : BAYESIAN formulation : In this formulation , the error is the Probability of False Alarms ( PFA ) with respect to Pµ . The delay is evaluated as the Average Detection Delay ( ADD ) with respect to Eµ . PFA ( τ ) = Pµ ( τ < λ ) and ADD ( τ ) = Eµ [ ( τ − λ ) |τ > λ ] In this setting , the goal is to minimise ADD while keeping PFA below a certain level α ( as in Shiryaev formulation ( Shiryaev , 1963 ) ) . Formally , this rewrites into : ( SHIRYAEV ) { να = arg minτ∈∆α ADD ( τ ) ∆α = { τ : PFA ( τ ) < α } ( 2 ) Min-Max formulation : The MIN-MAX formulation disregards prior distribution over the change point . As a consequence , the error is measured as the False Alarm Rate ( FAR ) with respect to the worst case scenario where no change occurs ( P∞ ) . As for the delay , two possibilities are studied : the Worst Average Detection Delay ( WADD ) and the Conditional Average Detection Delay ( CADD ) . WADD evaluates this delay with respect to the worst scenario in terms of both the change point and the observations . CADD is a less pessimistic evaluation as it only considers the worst scenario in terms of change point . Mathematically they are defined as : FAR ( τ ) = 1 E∞ [ τ ] and { WADD ( τ ) = supn esssupXn En [ ( τ − n ) +|Xn ] CADD ( τ ) = supnEn [ ( τ − n ) |τ > λ ] where Xn designates all observation up to the nth one . In this setting , the goal is to minimise either WADD ( Lorden formulation ( Lorden et al. , 1971 ) ) ; or CADD ( Pollak formulation ( Pollak , 1985 ) ) while keeping FAR below a certain level α . Formally , these problems are written as follows : ( LORDEN ) { να = arg minτ∈∆α WADD ( τ ) ∆α = { τ : FAR ( τ ) < α } and ( POLLAK ) { να = arg minτ∈∆α CADD ( τ ) ∆α = { τ : FAR ( τ ) < α } ( 3 ) 3 TEMPORAL WEIGHT REDISTRIBUTION . Under known parameters , optimal solutions for the QCD consist in computing some statistics , denoted by Sθ0 , θ1n along with a threshold Bα . The stopping time να is the first time S θ0 , θ1 n exceeds Bα . We provide a more detailed description in Appendix A.1 . 3.1 ASYMPTOTIC BEHAVIOUR OF THE SOLUTION TO THE BAYESIAN FORMULATION . The SHIRYAEV algorithm ( Shiryaev , 1963 ) is asymptotically optimal in the i.i.d . case ( Tartakovsky & Veeravalli , 2005 ) . This result is extended to the non i.i.d . case under the following assumption : Hypothesis 1 Given fθ0 and fθ1 , there exists q ∈ R and r ∈ N such that for any k ∈ N : 1 n ∑k+n t=k fθ1 ( Xt+1|Xt ) fθ0 ( Xt+1|Xt ) r-quickly−→ n→+∞ q ( 4 ) Under Hypothesis 1 , and with exponential or heavy tail prior , the SHIRYAEV algorithm is asymptotically optimal ( Tartakovsky & Veeravalli , 2005 ) . In addition , the moments of ADD satisfy the following property for all m ≤ r ( Tartakovsky & Veeravalli , 2005 ) : Eµ [ ( να − λ ) m|τ > λ ] α→0∼ Eµ [ ( νSα − λ ) m ] α→0∼ ( | log ( α ) | q+d ) m ( 5 ) where νSα is the SHIRYAEV algorithm stopping rule and d = − limn→∞ logP ( λ > n+ 1 ) /n . Our approach to the QCD problem under unknown parameters relies on the asymptotic behaviour from Equation ( 5 ) up to the second order ( r = 2 ) . We use it as a lower bound for the detection delay , providing a natural segmentation to our data when approximating the parameters . We will discuss this more in details in what follows . 3.2 RATIONAL FOR TEMPORAL WEIGHT REDISTRIBUTION . In the following , we denote the true parameters by θ∗0 and θ ∗ 1 and the corresponding stationary distributions by Π∗0 and Π ∗ 1 ( that are well defined for irreducible Markov Chain ) . The purpose of this section is to devise an algorithm learning the parameters θ∗0 and θ ∗ 1 using the asymptotic behaviour of the detection delay under known parameters . The delay predicted in Equation ( 5 ) is a performance lower bound in our setting ( otherwise it would contradict the optimality of the SHIRYAEV algorithm ) . Intuitively , the idea is to learn θ∗1 using the last | log ( α ) | q+d observation and to learn θ ∗ 0 using previous observation . This simple technique happens to be efficient and computationally simple . Parameters optimisation : The optimal Sθ0 , θ1t – called the SHIRYAEV statistic – has a specific form ( see Equation ( 12 ) in Appendix ) and the QCD problem under unknown parameters is equivalent to : να = arg mint { t|S θ0 , θ1 t > Bα } where { θ0 = arg minθ f0 ( θ , θ 1 ) θ1 = arg maxθ f1 ( θ 0 , θ ) , ( 6 ) and ( θ0 , θ1 ) are random initialisation parameters , f0 ( θ0 , θ1 ) = E0 [ log fθ1 ( Xt+1|Xt ) fθ0 ( Xt+1|Xt ) ] , f1 ( θ0 , θ1 ) = E1 [ log fθ1 ( Xt+1|Xt ) fθ0 ( Xt+1|Xt ) ] , and Ek∈ { 0,1 } is the expectation with respect to the probability distribution Pk ( Xt , Xt+1 ) = Π ∗ k ( Xt ) fθ∗k ( Xt+1|Xt ) . In fact , the solution να to Equation ( 6 ) is the optimal stopping time under the true parameters . This is a consequence of the following Lemma 1 : Lemma 1 θ∗0 and θ∗1 verifies the following for any θ0 , θ1 : θ∗0 = arg minθ f0 ( θ , θ1 ) and θ ∗ 1 = arg maxθ f1 ( θ0 , θ ) ( 7 ) In order to solve the equivalent QCD problem of Equation ( 6 ) , a good approximation of the functions f0 and f1 given the observations ( Xt ) n0 is required . This implies the ability to distinguish pre-change samples from post-change samples and this is precisely why optimal solutions are intractable . They compute the statistics for any possible change point and consider the worst case scenario . Previous approximate solutions simplify the setting by using domain knowledge to infer the pre-change distribution and by using a sliding window to evaluate the post-change distribution . The window size w is an irreducible cost in the expected delay . With known parameters , optimal algorithms have an average detection delay proportional to the error threshold α and to the inverse of the KL divergence between the pre and post change distributions . Given the optimal stopping time να , it ’ s possible to evaluate the posterior distribution of the change point P ( λ = t|να = n ) , which in turn is a good classifier of the pre and post change observation : P ( Xt ∼ fθ0 |να = n ) ∝ P ( λ > t|να = n ) ; P ( Xt ∼ fθ1 |να = n ) ∝ P ( λ < t|να = n ) . ( 8 ) The objective of this section is to exploit this classifier to construct a family of functions that approximate well f0 and f1 . Consider the following family of functions : fn0 ( θ0 , θ1 ) = E n 0 [ log ( fθ1 fθ0 ) ( Xτ+1|Xτ ) ] and fn1 ( θ0 , θ1 ) = E n 1 [ log ( fθ1 fθ0 ) ( Xτ+1|Xτ ) ] , where both the observations Xt and the indicies τ are random variables . The observations are generated using Equation ( 1 ) with a finite horizon t2 . The indicies are sampled with respect to τ ∼ P ( λ > τ |να = n ) / ∑t2 i=0P ( λ > i|να = n ) in En0 while they are sampled with respect to τ ∼ P ( λ < τ |να = n ) / ∑t2 i=0P ( λ < i|να = n ) in En1 . The family of functions fnk are a re-weighted expectation of the log-likelihood ratio of the observations using P ( λ|να = n ) . Basically , under the assumption that the optimal detection happens at t = n , we associate to each observation Xτ a weight proportional to P ( λ > τ |να = n ) when estimating f0 ( and respectively proportional to P ( λ < τ |να = n ) when estimating f1 ) . In addition , this family of functions is practical as we can approximate asymptotically P ( λ|να = n ) using the theoretical delay behaviour of the SHIRYAEV algorithms presented in Equation ( 5 ) . Lemma 2 For any given parameters ( θ0 , θ1 ) , the following convergences hold : If λ =∞ , then : limn , t2→∞ |fn0 ( θ0 , θ1 ) − f0 ( θ0 , θ1 ) | = limn , t2→∞ |fn1 ( θ0 , θ1 ) − f0 ( θ0 , θ1 ) | = 0 If λ < ∞ , then : { limn , t2→∞ |fn0 ( θ0 , θ1 ) − f1 ( θ0 , θ1 ) | = 0 limn , t2→∞ |fn1 ( θ0 , θ1 ) − f1 ( θ0 , θ1 ) | = 0 limt2→∞ |f να 1 ( θ0 , θ1 ) − f1 ( θ0 , θ1 ) | = 0 For any integer n ∈ N , if t2 = λ+ n , then : limλ , t2→∞ |f να 0 − f0| = 0 . A major implication of Lemma 2 is that with enough observations , fνα0 and f να 1 will eventually converge to the functions f0 and f1 . In fact , f t0 approaches f0 up to να and then start degrading ( as it ends up converging to f1 ) whereas f t1 becomes a better and better approximation of f1 around να and improves asymptotically . As such , we are going to consider the following problem as proxy to the original QCD problem ( Equation ( 6 ) ) . ν̂α = arg mint { t|S θt0 , θ t 1 t > Bα } where { θt0 = arg minθ f t 0 ( θ , θ t−1 1 ) θt1 = arg maxθ f t 1 ( θ t−1 0 , θ ) . ( 9 ) The rational behind this choice is that around the change point , Sθ t 0 , θ t 1 t converges to S θ∗0 , θ ∗ 1 t . Having access to a perfect evaluation of the functions f0 and f1 guarantees the fastest possible detection . In fact , να – the optimal stopping time under known parameters – is a lower bound to the detection delay in this setting . In practice , only the first t observation are accessible to evaluate f t0 and f t 1 . This introduces approximation errors to the estimates θt0 and θ t 1 , thus delaying the detection . However , this is not detrimental to the evaluation of the stopping time . Indeed : Before να : θt0 is a good estimator of θ∗0 and θt1 is a bad estimator of θ∗1 . In fact , the fraction of prechange observations used to learn θ∗1 is of the order of min ( 1 , λ/t ) . This helps maintaining a low log-likelihood ratio ( equivalently maintain Sθ t 0 , θ t 1 t below the cutting threshold ) , as the estimation of θ∗1 will converge to a parameter close to θ ∗ 0 . After να : θt1 is a good approximation of θ∗1 , but θt0 is a noisy estimation of θ∗0 ( as post-change observations are used to learn it ) . The fraction of the data generated using θ∗1 but used to learn θ∗0 is proportional to t−να t . This favours – up to a certain horizon – higher log- likelihood ratio estimates ( equivalently an incremental behaviour of the sequence Sθ t 0 , θ t 1 t ) . We will discuss further the performance issues of solving Equation ( 9 ) in the following . Distribution Approximation : In order to exploit the previously introduced results , we need a good approximation of P ( λ|να = n ) . If the observation satisfy Hypothesis 1 , then the moments of P ( λ|να = n ) up to the rth order satisfy Equation ( 5 ) . When r =∞ , this is equivalent to the Hausdorff moment problem , which admits a unique solution . The generalised method of moments can be used to approximate this distribution . In the remaining of this paper , we will restrict ourselves to the case where r = 2 . There is an infinite number of distributions that satisfy Equation ( 5 ) in this case ; however , given a parametric family , we can compute analytically a solution of the problem so we consider the Logistic distribution . For a given θ0 , θ1 , we approximate P ( λ|να = n ) with fθ0 , θ1n = Logistic ( µ , s ) where µ = n− | log ( α ) | DKL ( fθ0 |fθ1 ) +d and s = √ 3 | log ( α ) |π ( DKL ( fθ0 |fθ1 ) +d ) . Verifying that fθ0 , θ1n satisfies Equation ( 5 ) for m ≤ 2 is straightforward . As a consequence , P ( τ > t|τ ∼ fθ0 , θ1n ) is a fair approximation of P ( λ > t|να = n ) . Limitations : Solving the problem given by Equation ( 9 ) unfortunately yields poor performances for extreme values of the error threshold α . This is due to a degraded log likelihood estimation both before λ and as t→∞ . In fact , the log-likelihood ratios Lt and L∗t defined as : Lt ( Xt+1|Xt ) = log fθt1 fθt0 ( Xt+1|Xt ) and L∗t ( Xt+1|Xt ) = log fθ∗1 fθ∗0 ( Xt+1|Xt ) , satisfy the following lemma : Lemma 3 The log-likelihood ratio Lt and L∗t admit the following asymptotic behaviours : lim λ→∞ Eλ [ L ∗ λ ] < 0 but Lλ a.s−→ λ→+∞ 0 ; lim t→∞ Eλ [ L ∗ t |λ < ∞ ] > 0 but Lt a.s−→ t→+∞ 0 ( 10 ) Practically , this means that before the change point , the log likelihood ratio is over-estimated ( as it should be smaller than 0 ) , while after the change point , the log likelihood ratio is eventually under-estimated ( as it should exceed 0 ) . This is a consequence of Lemma 2 . In fact , for t λ ( respectively for t ≤ λ ) , both functions f t0 and f t1 are approaching f1 ( respectively f0 ) . Thus in both cases θt0 and θ t 1 converge to the same value . However , combined with the behaviour of f t 0 and f t 1 around να from Lemma 2 , we can expect the Kullback–Leibler ( KL ) divergence DKL ( fθt0‖fθt1 ) to converge to 0 before and after the change point while peaking around the optimal stopping time . We exploit this observation to mitigate the problems highlighted with Lemma 3 . Annealing : The under-estimation of L∗t after the change point is due to the use of post change observations ( drawn from fθ∗1 ) when estimating θ ∗ 0 . In practice , this is particularly problematic when the error rate must be controlled under a low threshold α ( equivalently a high cutting threshold Bα ) or when the pre and post change distributions are very similar . When t approaches the optimal stopping time ( t ≈ να ) , the minimising argument of f t0 is converging to θ∗0 . As t grows , the approximation f t0 is degraded , while f t 1 is becoming a better approximation , thus θ t 1 starts converging to θ ∗ 1 . This leads to an increase in the KL divergence . Our proposition is to keep optimising the version of f t0 that coincides with this increase ( which in turn is fνα0 : the best candidate to identify θ ∗ 0 ) . As a fix , we propose : 1- to shift the probability P ( λ > τ |νSα = n ) by replacing it with P ( λ > τ −∆|νSα = n ) ( where ∆ is the ‘ delay ’ of the detection with respect to the Shiryaev stopping time : ( n−νSα ) + ) , and 2- anneal the optimisation steps of θt0 as the KL divergence increases . These tweaks correct the objective function used to learn θ∗0 and stop its optimisation when the observations start to deviate from the learned pre-change distribution . The delay can be formally introduced by replacing f t0 with f t−∆ 0 in Equation ( 9 ) . In practice , ∆ is a delay heuristic that increases as the KL divergence increases . This reduces the noise when learning θ∗0 . The second idea is to use a probability p0 = 1−∆ of executing a gradient step when learning the pre-change parameter . This anneals the optimisation of θ∗0 . Penalisation : The over-estimation of L∗t before the change point , is due to the exclusive use of pre change observation when estimating θ∗1 . This is particularly problematic for application where a high error threshold is tolerable ( equivalently a low cutting threshold for the used statistic ) . This is also an issue when the pre and post change distribution are very different . As a solution , we penalise the log-likelihood using the inverse KL divergence . Before the change point , both parameters converge to θ∗0 : this means that the KL divergence between the estimated distributions is around 0 . Inversely , after the change point , if the optimisation of θt0 is annealed , the KL divergence between the estimated parameters must hover around DKL ( fθ∗0‖fθ∗1 ) . Formally , penalising the log likelihood can be seen as using L̂t when computing the statistics Sn where L̂t = Lt − c/DKL ( fθt0‖fθt1 ) for some real c > 0 . We provide in the appendix an ablation analysis as well as experimental proof of the effectiveness of both annealing and penalisation . Algorithm : In practice , only the first t observations are available in order to evaluate the parameters ( θ∗0 , θ ∗ 1 ) . Hence , we design a stochastic gradient descent ( SGD ) based algorithm to solve Equation ( 9 ) . Consider the following loss functions , where I is a set of time indices : Ln0 ( I , θ0 , θ1 ) = ∑ t∈I P ( τ < t|τ ∼ fθ0 , θ1n ) log ( fθ1 fθ0 ) ( Xt+1|Xt ) Ln1 ( I , θ0 , θ1 ) = ∑ t∈I P ( τ > t|τ ∼ fθ0 , θ1n ) log ( fθ1 fθ0 ) ( Xt+1|Xt ) ( 11 ) The quantity Ltk is an estimator of f tk using the observations ( Xt ) t∈I . The rational previously discussed implies that by re-weighting random samples from the observations we can approximate the functions fk using the familly of functions f tk . A good approximation of θt0 and θ t 1 can be obtained with few SGD steps . These parameters are used to update the SHIRYAEV or the CUSUM statistic . The change point is declared once the threshold Bα is exceeded . The proposed procedure is described in Algorithm 1 . In addition to the classical SGD hyper-parameters ( number of epochs , gradient step size , momentum , . . . ) , we propose to control the penalisation and the annealing procedure using the coefficients c , ≥ 0 respectively . Algorithm 1 Temporal Weight Redistribution 1 : Procedure : TWR ( θ0 , θ1 , ( Xt ) t2t=0 , Ne , Bα , , c ) 2 : Initialise S ← 0 ; θ0 , θ1 ← θ0 , θ1 ; ∆← 0 ; and p0 ← 1 3 : for t ∈ [ 1 , t2 ] do 4 : for e ∈ [ 1 , Ne ] do 5 : Randomly sample I : a set of indices from [ 0 , t ] 6 : θ0 ← gradient update rule ( θ0 , ∇θ0Lt−∆0 ( I , θ0 , θ1 ) ) with probability p0 7 : θ1 ← gradient update rule ( θ1 , −∇θ1Lt1 ( I , θ0 , θ1 ) ) 8 : end for 9 : S ← statistic update rule ( S , fθ1fθ0 ( Xt+1|Xt ) − c DKL ( fθ0 |fθ1 ) 10 : If S > Bα then declare change point and break 11 : If DKL ( fθ0 |fθ1 ) > D̄ then ∆← ∆ + 1 and p0 ← p0 − 12 : D̄ ← t−1t D̄ + 1 tDKL ( fθ0 |fθ1 ) 13 : end for | This paper studies the quickest change detection for Markovian data, when both the parameters of pre- and post-change distributions are unknown. The main contribution is a scalable algorithm that sequentially estimates the unknown parameters and plug-in to classical detection schemes to get the stopping rule. A notable feature is that this is a joint estimation and detection framework. And the authors incorporate several tools, like SGD, annealing, penalization, into the detection task, which turns out to have good performance compared with existing benchmarks. | SP:834881c613fe0577da917a8eb0104a37cb65a6bb |
Quickest change detection for multi-task problems under unknown parameters | 1 INTRODUCTION . Quickest Change Detection ( QCD ) problems arise naturally in settings where a latent state controls observable signals ( Basseville et al. , 1993 ) . In biology , it is applied in genomic sequencing ( Caron et al. , 2012 ) and in reliable healthcare monitoring ( Salem et al. , 2014 ) . In industry , it finds application in faulty machinery detection ( Lu et al. , 2017 ; Martí et al. , 2015 ) and in leak surveillance ( Wang et al. , 2014 ) . It also has environmental applications such as traffic-related pollutants detection ( Carslaw et al. , 2006 ) . Any autonomous agent designed to interact with the world and achieve multiple goals must be able to detect relevant changes in the signals it is sensing in order to adapt its behaviour accordingly . This is particularly true for reinforcement learning based agents in multi-task settings as their policy is conditioned to some task parameter ( Gupta et al. , 2018 ; Teh et al. , 2017 ) . In order for the agent to be truly autonomous , it needs to identify the task at hand according to the environment requirement . For example , a robot built to assist cooks in the kitchen should be able to recognise the task being executed ( chopping vegetables , cutting meat , .. ) without external help to assist them efficiently . Otherwise , the agent requires a higher intelligence ( one of the cooks for instance ) to control it ( by stating the task to be executed ) . In the general case , the current task is unknown and has to be identified sequentially from external sensory signals . The agent must track the changes as quickly as possible to adapt to its environment . However , current solutions for the QCD problem when task parameters are unknown , either do not scale or impose restrictive conditions on the setting . ( i.i.d . observations , exponential family distributions , partial knowledge of the parameters , etc. ) . In this paper , we construct a scalable algorithm with similar performances to optimal solutions . For this purpose , we use the change detection delay under known parameters as a lower bound for the delay in the unknown case . This improves our estimations of the parameters and thus improves our change point detection . We consider the case where the data is generated by some Markovian processes as in reinforcement learning . We assess our algorithm performances on synthetic data generated using distributions parameterised with neural networks in order to match the complexity level of real life applications . We also evaluate our algorithm on standard reinforcement learning environment . 2 QUICKEST CHANGE DETECTION PROBLEMS . Formally , consider a sequence of random observations ( Xt ) where each Xt belongs to some observation space X ( say , an Euclidean space for simplicity ) and is drawn from fθt ( .|Xt−1 ) , where the parameter θt belongs to some task parameter space Θ and { fθ , θ ∈ Θ } is a parametric probability distribution family ( non trivial , in the sense that all fθ are different ) . The main idea is that , at almost all stages , θt+1 = θt but there are some “ change points ” where those two parameters differ . Let us denote by tk the different change points and , with a slight abuse of notations , by θk the different values of the parameters . Formally , the data generating process is therefore : Xt ∼ ∑K k=0 fθk ( .|Xt−1 ) 1tk≤. < tk+1 ( t ) . The overarching objective is to identify as quickly as possible the change points tk and the associated parameters θk , based on the observations ( Xt ) . Typical procedures propose to tackle iteratively the simple change point detection problem , and for this reason we will focus mainly on the simpler setting of a single change point , where K = 2 , t0 = 0 , t1 = λ and t2 = ∞ , where λ is unknown and must be estimated . For a formal description of the model and the different metrics , we will also assume that the parameters ( θ0 , θ1 ) are drawn from some distribution F over Θ . As a consequence , the data generating process we consider boils down to the following system 1 : θ0 , θ1 ∼ F and { Xt+1 ∼ fθ0 ( .|Xt ) if t ≤ λ Xt+1 ∼ fθ1 ( .|Xt ) if t > λ . ( 1 ) 2.1 CRITERIA DEFINITIONS . As mentioned , the objective is to detect change points as quickly as possible while controlling the errors . There exist different metrics to evaluate algorithm performances ; they basically all minimise some delay measurements while keeping the rate of type I errors ( false positive change detection ) under a certain level . We will describe later on different existing definitions of these criteria ( type I error and delay ) . In order to evaluate a probability of error and an expected delay , we obviously need to define relevant probability measures first . Traditionally , there are two antagonistic ways to construct them : the MIN-MAX and the BAYESIAN settings ( Veeravalli & Banerjee , 2014 ) . First , we denote by Pn ( resp . En ) the data probability distribution ( resp . the expectation ) conditioned to the change point happening at λ = n. This last event happens with some probability µ ( λ = n ) – with the notation that bold characters designate random variables– , and we denote by Pµ ( resp . Eµ ) the data probability distribution ( resp . the expectation ) , integrated over µ , i.e. , for any event Ω , it holds that Pµ ( Ω ) = ∑ n µ ( λ = n ) Pn ( Ω ) . In the following , we describe the major existing formulations of the QCD problem where the goal is to identify an optimal stopping time τ : BAYESIAN formulation : In this formulation , the error is the Probability of False Alarms ( PFA ) with respect to Pµ . The delay is evaluated as the Average Detection Delay ( ADD ) with respect to Eµ . PFA ( τ ) = Pµ ( τ < λ ) and ADD ( τ ) = Eµ [ ( τ − λ ) |τ > λ ] In this setting , the goal is to minimise ADD while keeping PFA below a certain level α ( as in Shiryaev formulation ( Shiryaev , 1963 ) ) . Formally , this rewrites into : ( SHIRYAEV ) { να = arg minτ∈∆α ADD ( τ ) ∆α = { τ : PFA ( τ ) < α } ( 2 ) Min-Max formulation : The MIN-MAX formulation disregards prior distribution over the change point . As a consequence , the error is measured as the False Alarm Rate ( FAR ) with respect to the worst case scenario where no change occurs ( P∞ ) . As for the delay , two possibilities are studied : the Worst Average Detection Delay ( WADD ) and the Conditional Average Detection Delay ( CADD ) . WADD evaluates this delay with respect to the worst scenario in terms of both the change point and the observations . CADD is a less pessimistic evaluation as it only considers the worst scenario in terms of change point . Mathematically they are defined as : FAR ( τ ) = 1 E∞ [ τ ] and { WADD ( τ ) = supn esssupXn En [ ( τ − n ) +|Xn ] CADD ( τ ) = supnEn [ ( τ − n ) |τ > λ ] where Xn designates all observation up to the nth one . In this setting , the goal is to minimise either WADD ( Lorden formulation ( Lorden et al. , 1971 ) ) ; or CADD ( Pollak formulation ( Pollak , 1985 ) ) while keeping FAR below a certain level α . Formally , these problems are written as follows : ( LORDEN ) { να = arg minτ∈∆α WADD ( τ ) ∆α = { τ : FAR ( τ ) < α } and ( POLLAK ) { να = arg minτ∈∆α CADD ( τ ) ∆α = { τ : FAR ( τ ) < α } ( 3 ) 3 TEMPORAL WEIGHT REDISTRIBUTION . Under known parameters , optimal solutions for the QCD consist in computing some statistics , denoted by Sθ0 , θ1n along with a threshold Bα . The stopping time να is the first time S θ0 , θ1 n exceeds Bα . We provide a more detailed description in Appendix A.1 . 3.1 ASYMPTOTIC BEHAVIOUR OF THE SOLUTION TO THE BAYESIAN FORMULATION . The SHIRYAEV algorithm ( Shiryaev , 1963 ) is asymptotically optimal in the i.i.d . case ( Tartakovsky & Veeravalli , 2005 ) . This result is extended to the non i.i.d . case under the following assumption : Hypothesis 1 Given fθ0 and fθ1 , there exists q ∈ R and r ∈ N such that for any k ∈ N : 1 n ∑k+n t=k fθ1 ( Xt+1|Xt ) fθ0 ( Xt+1|Xt ) r-quickly−→ n→+∞ q ( 4 ) Under Hypothesis 1 , and with exponential or heavy tail prior , the SHIRYAEV algorithm is asymptotically optimal ( Tartakovsky & Veeravalli , 2005 ) . In addition , the moments of ADD satisfy the following property for all m ≤ r ( Tartakovsky & Veeravalli , 2005 ) : Eµ [ ( να − λ ) m|τ > λ ] α→0∼ Eµ [ ( νSα − λ ) m ] α→0∼ ( | log ( α ) | q+d ) m ( 5 ) where νSα is the SHIRYAEV algorithm stopping rule and d = − limn→∞ logP ( λ > n+ 1 ) /n . Our approach to the QCD problem under unknown parameters relies on the asymptotic behaviour from Equation ( 5 ) up to the second order ( r = 2 ) . We use it as a lower bound for the detection delay , providing a natural segmentation to our data when approximating the parameters . We will discuss this more in details in what follows . 3.2 RATIONAL FOR TEMPORAL WEIGHT REDISTRIBUTION . In the following , we denote the true parameters by θ∗0 and θ ∗ 1 and the corresponding stationary distributions by Π∗0 and Π ∗ 1 ( that are well defined for irreducible Markov Chain ) . The purpose of this section is to devise an algorithm learning the parameters θ∗0 and θ ∗ 1 using the asymptotic behaviour of the detection delay under known parameters . The delay predicted in Equation ( 5 ) is a performance lower bound in our setting ( otherwise it would contradict the optimality of the SHIRYAEV algorithm ) . Intuitively , the idea is to learn θ∗1 using the last | log ( α ) | q+d observation and to learn θ ∗ 0 using previous observation . This simple technique happens to be efficient and computationally simple . Parameters optimisation : The optimal Sθ0 , θ1t – called the SHIRYAEV statistic – has a specific form ( see Equation ( 12 ) in Appendix ) and the QCD problem under unknown parameters is equivalent to : να = arg mint { t|S θ0 , θ1 t > Bα } where { θ0 = arg minθ f0 ( θ , θ 1 ) θ1 = arg maxθ f1 ( θ 0 , θ ) , ( 6 ) and ( θ0 , θ1 ) are random initialisation parameters , f0 ( θ0 , θ1 ) = E0 [ log fθ1 ( Xt+1|Xt ) fθ0 ( Xt+1|Xt ) ] , f1 ( θ0 , θ1 ) = E1 [ log fθ1 ( Xt+1|Xt ) fθ0 ( Xt+1|Xt ) ] , and Ek∈ { 0,1 } is the expectation with respect to the probability distribution Pk ( Xt , Xt+1 ) = Π ∗ k ( Xt ) fθ∗k ( Xt+1|Xt ) . In fact , the solution να to Equation ( 6 ) is the optimal stopping time under the true parameters . This is a consequence of the following Lemma 1 : Lemma 1 θ∗0 and θ∗1 verifies the following for any θ0 , θ1 : θ∗0 = arg minθ f0 ( θ , θ1 ) and θ ∗ 1 = arg maxθ f1 ( θ0 , θ ) ( 7 ) In order to solve the equivalent QCD problem of Equation ( 6 ) , a good approximation of the functions f0 and f1 given the observations ( Xt ) n0 is required . This implies the ability to distinguish pre-change samples from post-change samples and this is precisely why optimal solutions are intractable . They compute the statistics for any possible change point and consider the worst case scenario . Previous approximate solutions simplify the setting by using domain knowledge to infer the pre-change distribution and by using a sliding window to evaluate the post-change distribution . The window size w is an irreducible cost in the expected delay . With known parameters , optimal algorithms have an average detection delay proportional to the error threshold α and to the inverse of the KL divergence between the pre and post change distributions . Given the optimal stopping time να , it ’ s possible to evaluate the posterior distribution of the change point P ( λ = t|να = n ) , which in turn is a good classifier of the pre and post change observation : P ( Xt ∼ fθ0 |να = n ) ∝ P ( λ > t|να = n ) ; P ( Xt ∼ fθ1 |να = n ) ∝ P ( λ < t|να = n ) . ( 8 ) The objective of this section is to exploit this classifier to construct a family of functions that approximate well f0 and f1 . Consider the following family of functions : fn0 ( θ0 , θ1 ) = E n 0 [ log ( fθ1 fθ0 ) ( Xτ+1|Xτ ) ] and fn1 ( θ0 , θ1 ) = E n 1 [ log ( fθ1 fθ0 ) ( Xτ+1|Xτ ) ] , where both the observations Xt and the indicies τ are random variables . The observations are generated using Equation ( 1 ) with a finite horizon t2 . The indicies are sampled with respect to τ ∼ P ( λ > τ |να = n ) / ∑t2 i=0P ( λ > i|να = n ) in En0 while they are sampled with respect to τ ∼ P ( λ < τ |να = n ) / ∑t2 i=0P ( λ < i|να = n ) in En1 . The family of functions fnk are a re-weighted expectation of the log-likelihood ratio of the observations using P ( λ|να = n ) . Basically , under the assumption that the optimal detection happens at t = n , we associate to each observation Xτ a weight proportional to P ( λ > τ |να = n ) when estimating f0 ( and respectively proportional to P ( λ < τ |να = n ) when estimating f1 ) . In addition , this family of functions is practical as we can approximate asymptotically P ( λ|να = n ) using the theoretical delay behaviour of the SHIRYAEV algorithms presented in Equation ( 5 ) . Lemma 2 For any given parameters ( θ0 , θ1 ) , the following convergences hold : If λ =∞ , then : limn , t2→∞ |fn0 ( θ0 , θ1 ) − f0 ( θ0 , θ1 ) | = limn , t2→∞ |fn1 ( θ0 , θ1 ) − f0 ( θ0 , θ1 ) | = 0 If λ < ∞ , then : { limn , t2→∞ |fn0 ( θ0 , θ1 ) − f1 ( θ0 , θ1 ) | = 0 limn , t2→∞ |fn1 ( θ0 , θ1 ) − f1 ( θ0 , θ1 ) | = 0 limt2→∞ |f να 1 ( θ0 , θ1 ) − f1 ( θ0 , θ1 ) | = 0 For any integer n ∈ N , if t2 = λ+ n , then : limλ , t2→∞ |f να 0 − f0| = 0 . A major implication of Lemma 2 is that with enough observations , fνα0 and f να 1 will eventually converge to the functions f0 and f1 . In fact , f t0 approaches f0 up to να and then start degrading ( as it ends up converging to f1 ) whereas f t1 becomes a better and better approximation of f1 around να and improves asymptotically . As such , we are going to consider the following problem as proxy to the original QCD problem ( Equation ( 6 ) ) . ν̂α = arg mint { t|S θt0 , θ t 1 t > Bα } where { θt0 = arg minθ f t 0 ( θ , θ t−1 1 ) θt1 = arg maxθ f t 1 ( θ t−1 0 , θ ) . ( 9 ) The rational behind this choice is that around the change point , Sθ t 0 , θ t 1 t converges to S θ∗0 , θ ∗ 1 t . Having access to a perfect evaluation of the functions f0 and f1 guarantees the fastest possible detection . In fact , να – the optimal stopping time under known parameters – is a lower bound to the detection delay in this setting . In practice , only the first t observation are accessible to evaluate f t0 and f t 1 . This introduces approximation errors to the estimates θt0 and θ t 1 , thus delaying the detection . However , this is not detrimental to the evaluation of the stopping time . Indeed : Before να : θt0 is a good estimator of θ∗0 and θt1 is a bad estimator of θ∗1 . In fact , the fraction of prechange observations used to learn θ∗1 is of the order of min ( 1 , λ/t ) . This helps maintaining a low log-likelihood ratio ( equivalently maintain Sθ t 0 , θ t 1 t below the cutting threshold ) , as the estimation of θ∗1 will converge to a parameter close to θ ∗ 0 . After να : θt1 is a good approximation of θ∗1 , but θt0 is a noisy estimation of θ∗0 ( as post-change observations are used to learn it ) . The fraction of the data generated using θ∗1 but used to learn θ∗0 is proportional to t−να t . This favours – up to a certain horizon – higher log- likelihood ratio estimates ( equivalently an incremental behaviour of the sequence Sθ t 0 , θ t 1 t ) . We will discuss further the performance issues of solving Equation ( 9 ) in the following . Distribution Approximation : In order to exploit the previously introduced results , we need a good approximation of P ( λ|να = n ) . If the observation satisfy Hypothesis 1 , then the moments of P ( λ|να = n ) up to the rth order satisfy Equation ( 5 ) . When r =∞ , this is equivalent to the Hausdorff moment problem , which admits a unique solution . The generalised method of moments can be used to approximate this distribution . In the remaining of this paper , we will restrict ourselves to the case where r = 2 . There is an infinite number of distributions that satisfy Equation ( 5 ) in this case ; however , given a parametric family , we can compute analytically a solution of the problem so we consider the Logistic distribution . For a given θ0 , θ1 , we approximate P ( λ|να = n ) with fθ0 , θ1n = Logistic ( µ , s ) where µ = n− | log ( α ) | DKL ( fθ0 |fθ1 ) +d and s = √ 3 | log ( α ) |π ( DKL ( fθ0 |fθ1 ) +d ) . Verifying that fθ0 , θ1n satisfies Equation ( 5 ) for m ≤ 2 is straightforward . As a consequence , P ( τ > t|τ ∼ fθ0 , θ1n ) is a fair approximation of P ( λ > t|να = n ) . Limitations : Solving the problem given by Equation ( 9 ) unfortunately yields poor performances for extreme values of the error threshold α . This is due to a degraded log likelihood estimation both before λ and as t→∞ . In fact , the log-likelihood ratios Lt and L∗t defined as : Lt ( Xt+1|Xt ) = log fθt1 fθt0 ( Xt+1|Xt ) and L∗t ( Xt+1|Xt ) = log fθ∗1 fθ∗0 ( Xt+1|Xt ) , satisfy the following lemma : Lemma 3 The log-likelihood ratio Lt and L∗t admit the following asymptotic behaviours : lim λ→∞ Eλ [ L ∗ λ ] < 0 but Lλ a.s−→ λ→+∞ 0 ; lim t→∞ Eλ [ L ∗ t |λ < ∞ ] > 0 but Lt a.s−→ t→+∞ 0 ( 10 ) Practically , this means that before the change point , the log likelihood ratio is over-estimated ( as it should be smaller than 0 ) , while after the change point , the log likelihood ratio is eventually under-estimated ( as it should exceed 0 ) . This is a consequence of Lemma 2 . In fact , for t λ ( respectively for t ≤ λ ) , both functions f t0 and f t1 are approaching f1 ( respectively f0 ) . Thus in both cases θt0 and θ t 1 converge to the same value . However , combined with the behaviour of f t 0 and f t 1 around να from Lemma 2 , we can expect the Kullback–Leibler ( KL ) divergence DKL ( fθt0‖fθt1 ) to converge to 0 before and after the change point while peaking around the optimal stopping time . We exploit this observation to mitigate the problems highlighted with Lemma 3 . Annealing : The under-estimation of L∗t after the change point is due to the use of post change observations ( drawn from fθ∗1 ) when estimating θ ∗ 0 . In practice , this is particularly problematic when the error rate must be controlled under a low threshold α ( equivalently a high cutting threshold Bα ) or when the pre and post change distributions are very similar . When t approaches the optimal stopping time ( t ≈ να ) , the minimising argument of f t0 is converging to θ∗0 . As t grows , the approximation f t0 is degraded , while f t 1 is becoming a better approximation , thus θ t 1 starts converging to θ ∗ 1 . This leads to an increase in the KL divergence . Our proposition is to keep optimising the version of f t0 that coincides with this increase ( which in turn is fνα0 : the best candidate to identify θ ∗ 0 ) . As a fix , we propose : 1- to shift the probability P ( λ > τ |νSα = n ) by replacing it with P ( λ > τ −∆|νSα = n ) ( where ∆ is the ‘ delay ’ of the detection with respect to the Shiryaev stopping time : ( n−νSα ) + ) , and 2- anneal the optimisation steps of θt0 as the KL divergence increases . These tweaks correct the objective function used to learn θ∗0 and stop its optimisation when the observations start to deviate from the learned pre-change distribution . The delay can be formally introduced by replacing f t0 with f t−∆ 0 in Equation ( 9 ) . In practice , ∆ is a delay heuristic that increases as the KL divergence increases . This reduces the noise when learning θ∗0 . The second idea is to use a probability p0 = 1−∆ of executing a gradient step when learning the pre-change parameter . This anneals the optimisation of θ∗0 . Penalisation : The over-estimation of L∗t before the change point , is due to the exclusive use of pre change observation when estimating θ∗1 . This is particularly problematic for application where a high error threshold is tolerable ( equivalently a low cutting threshold for the used statistic ) . This is also an issue when the pre and post change distribution are very different . As a solution , we penalise the log-likelihood using the inverse KL divergence . Before the change point , both parameters converge to θ∗0 : this means that the KL divergence between the estimated distributions is around 0 . Inversely , after the change point , if the optimisation of θt0 is annealed , the KL divergence between the estimated parameters must hover around DKL ( fθ∗0‖fθ∗1 ) . Formally , penalising the log likelihood can be seen as using L̂t when computing the statistics Sn where L̂t = Lt − c/DKL ( fθt0‖fθt1 ) for some real c > 0 . We provide in the appendix an ablation analysis as well as experimental proof of the effectiveness of both annealing and penalisation . Algorithm : In practice , only the first t observations are available in order to evaluate the parameters ( θ∗0 , θ ∗ 1 ) . Hence , we design a stochastic gradient descent ( SGD ) based algorithm to solve Equation ( 9 ) . Consider the following loss functions , where I is a set of time indices : Ln0 ( I , θ0 , θ1 ) = ∑ t∈I P ( τ < t|τ ∼ fθ0 , θ1n ) log ( fθ1 fθ0 ) ( Xt+1|Xt ) Ln1 ( I , θ0 , θ1 ) = ∑ t∈I P ( τ > t|τ ∼ fθ0 , θ1n ) log ( fθ1 fθ0 ) ( Xt+1|Xt ) ( 11 ) The quantity Ltk is an estimator of f tk using the observations ( Xt ) t∈I . The rational previously discussed implies that by re-weighting random samples from the observations we can approximate the functions fk using the familly of functions f tk . A good approximation of θt0 and θ t 1 can be obtained with few SGD steps . These parameters are used to update the SHIRYAEV or the CUSUM statistic . The change point is declared once the threshold Bα is exceeded . The proposed procedure is described in Algorithm 1 . In addition to the classical SGD hyper-parameters ( number of epochs , gradient step size , momentum , . . . ) , we propose to control the penalisation and the annealing procedure using the coefficients c , ≥ 0 respectively . Algorithm 1 Temporal Weight Redistribution 1 : Procedure : TWR ( θ0 , θ1 , ( Xt ) t2t=0 , Ne , Bα , , c ) 2 : Initialise S ← 0 ; θ0 , θ1 ← θ0 , θ1 ; ∆← 0 ; and p0 ← 1 3 : for t ∈ [ 1 , t2 ] do 4 : for e ∈ [ 1 , Ne ] do 5 : Randomly sample I : a set of indices from [ 0 , t ] 6 : θ0 ← gradient update rule ( θ0 , ∇θ0Lt−∆0 ( I , θ0 , θ1 ) ) with probability p0 7 : θ1 ← gradient update rule ( θ1 , −∇θ1Lt1 ( I , θ0 , θ1 ) ) 8 : end for 9 : S ← statistic update rule ( S , fθ1fθ0 ( Xt+1|Xt ) − c DKL ( fθ0 |fθ1 ) 10 : If S > Bα then declare change point and break 11 : If DKL ( fθ0 |fθ1 ) > D̄ then ∆← ∆ + 1 and p0 ← p0 − 12 : D̄ ← t−1t D̄ + 1 tDKL ( fθ0 |fθ1 ) 13 : end for | The author(s) propose a quickest change detection technique under known parameter scenario. They use a Markovian dynamics to generate the pre and post change-point distributions and use a Shirayev test-statistic based on the asymptotic behavior of the optimal delay under know parameters. The proposed methodology is validated on synthetic data and a multitask reinforcement learning example. There are several issues which restricts the paper to reach an optimal level. These are highlighted below | SP:834881c613fe0577da917a8eb0104a37cb65a6bb |
Unpacking Information Bottlenecks: Surrogate Objectives for Deep Learning | 1 Introduction The Information Bottleneck ( IB ) principle , introduced by Tishby et al . ( 2000 ) , proposes that training and generalization in deep neural networks ( DNNs ) can be explained by information-theoretic principles ( Tishby and Zaslavsky , 2015 ; Shwartz-Ziv and Tishby , 2017 ; Achille and Soatto , 2018a ) . This is attractive as the success of DNNs remains largely unexplained by tools from computational learning theory ( Zhang et al. , 2016 ; Bengio et al. , 2009 ) . The IB principle suggests that learning consists of two competing objectives : maximizing the mutual information between the latent representation and the label to promote accuracy , while at the same time minimizing the mutual information between the latent representation and the input to promote generalization . Following this principle , many variations of IB objectives have been proposed ( Alemi et al. , 2016 ; Strouse and Schwab , 2017 ; Fischer and Alemi , 2020 ; Fischer , 2020 ; Fisher , 2019 ; Gondek and Hofmann , 2003 ; Achille and Soatto , 2018a ) , which , in supervised learning , have been demonstrated to benefit robustness to adversarial attacks ( Alemi et al. , 2016 ; Fisher , 2019 ) and generalization and regularization against overfitting to random labels ( Fisher , 2019 ) . Whether the benefits of training with IB objectives are due to the IB principle , or some other unrelated mechanism , remains unclear ( Saxe et al. , 2019 ; Amjad and Geiger , 2019 ; Tschannen et al. , 2019 ) , suggesting that although recent work has also tied the principle to successful results in both unsupervised and self-supervised learning ( Oord et al. , 2018 ; Belghazi et al. , 2018 ; Zhang et al. , 2018 ; Burgess et al. , 2018 , among others ) , our understanding of how IB objectives affect representation learning remains unclear . Critical to studying this question is the computation of the information-theoretic quantities1 used . While progress has been made in developing mutual information estimators for DNNs ( Poole et al. , 2019 ; Belghazi et al. , 2018 ; Noshad et al. , 2019 ; McAllester and Stratos , 2018 ; Kraskov et al. , 2004 ) , current methods still face many limitations when concerned with high-dimensional random variables ( McAllester and Stratos , 2018 ) and rely on complex estimators or generative models . This presents a challenge to training with IB objectives . In this paper , we analyze information quantities and relate them to surrogate objectives for the IB principle which are more friendly to optimization , showing that complex or intractable IB objectives can be replaced with simple , easy-to-compute surrogates that produce similar performance and similar 1We shorten these to information quantities from now on . behaviour of information quantities over training . Sections 2 & 3 review commonly-used information quantities for which we provide mathematically grounded intuition via information diagrams and unify different IB objectives by identifying two key information quantities , Decoder Uncertainty H [ Y | Z ] and Reverse Decoder Uncertainty H [ Z | Y ] which act as the main loss and regularization terms in our unified IB objective . In particular , Section 3.2 demonstrates that using the Decoder Uncertainty as a training objective can minimize the training error , and shows how to estimate an upper bound on it efficiently for well-known DNN architectures . We expand on the findings of Alemi et al . ( 2016 ) in their variational IB approximation and demonstrate that this upper bound is equal to the commonly-used cross-entropy loss2 under dropout regularization . Section 3.3 examines pathologies of differential entropies that hinder optimization and proposes adding Gaussian noise to force differential entropies to become non-negative , which leads to new surrogate terms to optimize the Reverse Decoder Uncertainty . Altogether this leads to simple and tractable surrogate IB objectives such as the following , which uses dropout , adds Gaussian noise over the feature vectors f ( x ; η ) , and uses an L2 penalty over the noisy feature vectors : min θ E x , y∼p̂ ( x , y ) , ∼N η∼dropout mask [ − log p ( Ŷ = y | z = fθ ( x ; η ) + ) + γ ‖ fθ ( x ; η ) + ‖22 ] . ( 1 ) Section 4 describes experiments that validate our insights qualitatively and quantitatively on MNIST , CIFAR-10 and Imagenette , and shows that with objectives like the one in equation ( 1 ) we obtain information plane plots ( as in figure 1 ) similar to those predicted by Tishby and Zaslavsky ( 2015 ) . Our simple surrogate objectives thus induce the desired behavior of IB objectives while scaling to large , high-dimensional datasets . We present evaluations on CIFAR-10 and Imagenette images3 . Compared to existing work , we show that we can optimize IB objectives for well-known DNN architectures using standard optimizers , losses and simple regularizers , without needing complex estimators , generative models , or variational approximations . This will allow future research to make better use of IB objectives and study the IB principle more thoroughly . 2 Background Information quantities & information diagrams . We denote entropy H [ · ] , joint entropy H [ · , · ] , conditional entropy H [ · | · ] , mutual information I [ · ; · ] and Shannon ’ s information content h ( · ) ( Cover and Thomas , 2012 ; MacKay , 2003 ; Shannon , 1948 ) . We will further require the Kullback-Leibler divergence DKL ( · || · ) and cross-entropy H ( · || · ) . The definitions can be found in section A.1 . We will use differential entropies interchangeably with entropies : equalities between them are preserved in the differential setting , and inequalities will be covered in section 3.3 . 2This connection was assumed without proof by Achille and Soatto ( 2018a ; b ) . 3Recently , Fischer and Alemi ( 2020 ) report results on CIFAR-10 and ImageNet , see section F.4 . Information diagrams ( I-diagrams ) , like the one depicted in figure 2 , clarify the relationship between information quantities : similar to Venn diagrams , a quantity equals the sum of its parts in the diagram . Importantly , they offer a grounded intuition as Yeung ( 1991 ) show that we can define a signed measure µ * such that information quantities map to abstract sets and are consistent with set operations . We provide details on how to use I-diagrams and what to watch out for in section A.2 . Probabilistic model . We will focus on a supervised classification task that makes prediction Ŷ given data X using a latent encoding Z , while the provided target is Y . We assume categorical Y and Ŷ , and continuous X . Our probabilistic model based on these assumptions is as follows : p ( x , y , z , ŷ ) = p̂ ( x , y ) pθ ( z | x ) pθ ( ŷ | z ) . ( 2 ) Thus , Z and Y are independent given X , and Ŷ is independent of X and Y given Z . The data distribution p̂ ( x , y ) is only available to us as an empirical sample distribution . θ are the parameters we would like to learn . pθ ( z | x ) is the encoder from data X to latent Z , and pθ ( ŷ | z ) the decoder from latent Z to prediction Ŷ . Together , pθ ( z | x ) and pθ ( ŷ | z ) form the discriminative model pθ ( ŷ | x ) : pθ ( ŷ | x ) = Epθ ( z|x ) pθ ( ŷ | z ) . ( 3 ) We can derive the cross-entropy loss H ( p̂ ( y | x ) || pθ ( Ŷ = y | x ) ) ( Solla et al. , 1988 ; Hinton , 1990 ) by minimizing the Kullback-Leibler divergence between the empirical sample distribution p̂ ( x , y ) and the parameterized distribution pθ ( x ) pθ ( ŷ | x ) , where we set pθ ( x ) = p̂ ( x ) . See section D.1 . Mickey Mouse I-diagram . The corresponding I-diagram for X , Y , and Z is depicted in figure 2 . As some of the quantities have been labelled before , we try to follow conventions and come up with consistent names otherwise . Section B.1 provides intuitions for these quantities , and section B.2 lists all definitions and equivalences explicitly . For categorical Z , all the quantities in the diagram are positive , which allows us to read off inequalities from the diagram : only I [ X ; Y ; Z ] could be negative , but as Y and Z are independent given X , we have I [ Y ; Z|X ] = 0 , and I [ X ; Y ; Z ] = I [ Y ; Z ] −I [ Y ; Z|X ] = I [ Y ; Z ] ≥ 0 . Section 3.3 investigates how to preserve inequalities for continuous Z . 3 Surrogate IB & DIB objectives 3.1 IB Objectives Tishby et al . ( 2000 ) introduce the IB objective as a relaxation of a constrained optimization problem : minimize the mutual information between the input X and its latent representation Z while still accurately predicting Y from Z . An analogous objective which yields deterministic Z , the Deterministic Information Bottleneck ( DIB ) was proposed by Strouse and Schwab ( 2017 ) . Letting β be a Lagrange multiplier , we arrive at the IB and DIB objectives : min I [ X ; Z ] − βI [ Y ; Z ] for IB , and min H [ Z ] − βI [ Y ; Z ] for DIB . ( 4 ) This principle can be recast as a generalization of finding minimal sufficient statistics for the labels given the data ( Shamir et al. , 2010 ; Tishby and Zaslavsky , 2015 ; Fisher , 2019 ) : it strives for minimality and sufficiency of the latent Z. Minimality is achieved by minimizing the Preserved Information I [ X ; Z ] ; while sufficiency is achieved by maximizing the Preserved Relevant Information I [ Y ; Z ] . We defer an in-depth discussion of the IB principle to the appendix Section C.1 . We discuss the several variants of IB objectives , and justify our focus on IB and DIB , in Section C.2 . The information quantities that appear in the IB objective are not tractable to compute for the representations learned by many function classes of interest , including neural networks ; for example , Strouse and Schwab ( 2017 ) only obtain an analytical solution to their Deterministic Information Bottleneck ( DIB ) method for the tabular setting . Alemi et al . ( 2016 ) address this challenge by constructing a variational approximation of the IB objective , but their approach has not been applied to more complex datasets than MNIST variants . Belghazi et al . ( 2018 ) use a separate statistics network to approximate the mutual information , a computationally expensive strategy that does not easily lend itself to optimization . In this section , we introduce and justify tractable surrogate losses that are easier to apply in common deep learning pipelines , and which can be scaled to large and high-dimensional datasets . We begin by proposing the following reformulation of IB and DIB objectives . Proposition 1 . For IB , we obtain arg min I [ X ; Z ] − βI [ Y ; Z ] = arg min H [ Y | Z ] + β′ I [ X ; Z | Y ] ︸ ︷︷ ︸ =H [ Z|Y ] −H [ Z|X ] , ( 5 ) and , for DIB , arg min H [ Z ] − βI [ Y ; Z ] = arg min H [ Y | Z ] + β′H [ Z | Y ] = arg min H [ Y | Z ] + β′′H [ Z ] ( 6 ) with β′ : = 1 β−1 ∈ [ 0 , ∞ ) and β′′ : = 1 β ∈ [ 0 , 1 ) . The derivation can be found in section C.3 . In the next sections , we show that Decoder Uncertainty H [ Y | Z ] provides a loss term , which minimizes the training error , and DIB ’ s Reverse Decoder Uncertainty H [ Z | Y ] and IB ’ s Redundant Information I [ X ; Z | Y ] , respectively , provide a regularization term , which helps generalization . Another perspective can be found by relating the objectives to the Entropy Distance Metric introduced by MacKay ( 2003 ) , which we detail in section C.4 . 3.2 Decoder Uncertainty H [ Y | Z ] The Decoder Uncertainty H [ Y | Z ] is the first term in our reformulated IB and DIB objectives , and captures the data fit component of the IB principle . This quantity is not easy to compute directly for arbitrary representations Z , so we turn our attention to two related entities instead , where we use θ as subscript to mark dependence on the model : the Prediction Cross-Entropy , denoted Hθ [ Y | X ] ( more commonly known as the model ’ s cross-entropy loss ; see section D.1 ) , and the Decoder Cross-Entropy , denoted Hθ [ Y | Z ] . Noting that h ( x ) = − ln x , we define these terms as follows : Hθ [ Y | X ] : = H ( p̂ ( y | x ) || pθ ( Ŷ = y | x ) ) = Ep̂ ( x , y ) h ( Epθ ( z|x ) pθ ( Ŷ = y | z ) ) ( 7 ) Hθ [ Y | Z ] : = H ( p ( y | z ) || pθ ( Ŷ = y | z ) ) = Ep̂ ( x , y ) Epθ ( z|x ) h ( pθ ( Ŷ = y | z ) ) . ( 8 ) Jensen ’ s inequality yields Hθ [ Y | X ] ≤ Hθ [ Y | Z ] , with equality iff Z is a deterministic function of X . The notational similarity4 between Hθ [ Y | Z ] and H [ Y | Z ] is deliberately suggestive : this cross-entropy bounds the conditional entropy H [ Y | Z ] , as characterized in the following proposition . Proposition 2 . The Decoder Cross-Entropy provides an upper bound on the Decoder Uncertainty : H [ Y | Z ] ≤ H [ Y | Z ] + DKL ( p ( y | z ) || pθ ( ŷ | z ) ) = Hθ [ Y | Z ] , ( 9 ) and further bounds the training error : p ( “ Ŷ is wrong ” ) ≤ 1 − e−Hθ [ Y|Z ] = 1 − e− ( H [ Y|Z ] +DKL ( p ( y|z ) ||pθ ( ŷ|z ) ) ) . ( 10 ) Likewise , for Hθ [ Y | X ] and H [ Y | X ] . See section D.2 for a derivation . Hence , by bounding DKL ( p ( y | z ) || pθ ( ŷ | z ) ) , we can obtain a bound for the training error in terms of H [ Y | Z ] . We examine one way of doing so by using optimal decoders pθ ( ŷ | z ) : = p ( Y = ŷ | z ) for the case of categorical Z in section E. Alemi et al . ( 2016 ) use the Decoder Cross-Entropy bound in equation ( 9 ) to variationally approximate p ( y | z ) . We make this explicit by applying the reparameterization trick to rewrite the latent z as a parametric function of its input x and some independent auxiliary random variable η , i.e . fθ ( x , η ) D = z ∼ pθ ( z | x ) , yielding H [ Y | Z ] ≤ Hθ [ Y | Z ] = Ep̂ ( x , y ) Ep ( η ) h ( pθ ( Ŷ = y | z = fθ ( x ; η ) ) ) . ( 11 ) Equation ( 11 ) can be applied to many forms of stochastic regularization that turn deterministic models into stochastic ones , in particular dropout . This allows us to use modern DNN architectures as stochastic encoders . Dropout regularization When we interpret η as a sampled dropout mask for a DNN , DNNs that use dropout regularization ( Srivastava et al. , 2014 ) , or variants like DropConnect ( Wan et al. , 2013a ) , fit the equation above as stochastic encoders . Monte-Carlo dropout ( Gal and Ghahramani , 2016 ) , for example , even specifically estimates the predictive mean pθ ( ŷ | x ) from equation ( 3 ) . The following result extends the observation by Burda et al . ( 2015 ) that sampling yields an unbiased estimator for the Decoder Cross-Entropy Hθ [ Y | Z ] , while it only yields a biased estimator for the Prediction Cross-Entropy Hθ [ Y | X ] ( which it upper-bounds ) . 4This notation is compatible withV-Entropy introduced by Xu et al . ( 2020 ) . Corollary 1 . Let x , y , z and fθ be defined as previously , with η a sampled stochastic dropout mask . Then h ( pθ ( Ŷ = y | z = fθ ( x ; η ) ) ) evaluated for a single sample η is an unbiased estimator of the Decoder Cross-Entropy Hθ [ Y | Z ] , and an estimator of an upper bound on the Prediction CrossEntropy Hθ [ Y | X ] . This distinction between the Decoder Cross-Entropy and the Prediction Cross-Entropy has been observed in passing in the literature , but not made explicit . Multi-sample approaches like Multi-Sample Dropout ( Inoue , 2019 ) , for example , optimize Hθ [ Y | Z ] , while Importance Weighted Stochastic Gradient Descent ( Noh et al. , 2017 ) optimizes Hθ [ Y | X ] . Dusenberry et al . ( 2020 ) observe empirically in the different context of rank-1 Bayesian Neural Networks that optimizing Hθ [ Y | Z ] instead of Hθ [ Y | X ] is both easier and also yields better generalization performance ( NLL , accuracy , and ECE ) , while they also put forward an argument for why the stochastic gradients for Hθ [ Y | Z ] might benefit from lower variance . We empirically compare training with either cross-entropy in section G.3.3 and show results in figure G.11 in the appendix . We conclude this section by highlighting that H [ Y | Z ] is therefore already minimized in modern DNN architectures that use dropout together with a cross-entropy loss . This means that , at least for one half of our reformulation of the IB objective , we can apply off-the-shelf , scalable objectives and optimizers for its minimization . 3.3 Surrogates for the regularization terms In the previous section , we have examined how to tractably estimate the error minimization term H [ Y | Z ] . In this section , we will examine tractable optimization of the regularization terms H [ Z | Y ] and I [ X ; Z | Y ] , respectively . We discuss how to minimize entropies meaningfully and show how this unifies DIB and IB via the inequality I [ X ; Z | Y ] ≤ H [ Z | Y ] ≤ H [ Z ] before providing tractable upper-bounds for H [ Z | Y ] and H [ Z ] . Differential entropies In most cases , the latent Z is a continuous random variable in many dimensions . Unlike entropies on discrete probability spaces , differential entropies defined on continuous spaces are not bounded from below . This means that the DIB objective is not guaranteed to have an optimal solution and allows for pathological optimization trajectories in which the variance of the latent Z can be scaled to be arbitrarily small , achieving arbitrarily high-magnitude negative entropy . We provide a toy experiment demonstrating this in section G.4 . Intuitively , one can interpret this issue as being allowed to encode information in an arbitrarily-small real number using infinite precision , similar to arithmetic coding ( MacKay , 2003 ; Shwartz-Ziv and Tishby , 2017 ) 5 . In practice , due to floating point constraints , optimizing DIB naively will invariably end in garbage predictions and underflow as activations approach zero . It is therefore not desirable 5Conversely , MacKay ( 2003 ) notes that without upper-bounding the “ power '' Ep ( z ) Z2 , all information could be encoded in a single very large integer . for training . This is why Strouse and Schwab ( 2017 ) only consider analytical solutions to DIB by evaluating a limit for the tabular case . MacKay ( 2003 ) proposes the introduction of noise to solve this issue in the application of continuous communication channels . However , here we propose adding specific noise to the latent representation to lower-bound the conditional entropy of Z , which allows us to enforce non-negativity across all IB information quantities as in the discrete case and transport inequalities to the continuous case : for a continuous Ẑ ∈ Rk and independent noise , we set Z : = Ẑ+ ; the differential entropy then satisfies H [ Z ] = H [ Ẑ+ ] ≥ H [ ] ; and by using zero-entropy noise ∼ N ( 0 , 12πe Ik ) specifically , we obtain H [ Z ] ≥ H [ ] = 0 . Proposition 3 . After adding zero-entropy noise , the inequality I [ X ; Z | Y ] ≤ H [ Z | Y ] ≤ H [ Z ] also holds for continuous Z , and we can minimize I [ X ; Z | Y ] in the IB objective by minimizing H [ Z | Y ] or H [ Z ] , similarly to the DIB objective . Strictly speaking , zero-entropy noise is not necessary for optimizing the bounds : any Gaussian noise is sufficient , but zero-entropy noise is aesthetically appealing as it preserves inequalities from the discrete setting . In a sense , this propostion bounds the IB objective by the DIB objective . However , adding noise changes the optimal solutions : whereas DIB in Strouse and Schwab ( 2017 ) leads to hard clustering in the limit , adding noise leads to soft clustering when optimizing the DIB objective , as is the case with the IB objective . We show in section F.6 that minimizing the DIB objective with noise leads to soft clustering ( for the case of an otherwise deterministic encoder ) . Altogether , in addition to Shwartz-Ziv and Tishby ( 2017 ) , we argue that noise is essential to obtain meaningful differential entropies and to avoid other pathological cases as described further in section F.7 . It is not generally possible to compute H [ Z | Y ] exactly for continuous latent representations Z , but we can derive an upper bound . The maximum-entropy distribution for a given covariance matrix Σ is a Gaussian with the same covariance . Proposition 4 . The Reverse Decoder Uncertainty can be approximately bounded using the empirical variance V̂ar [ Zi | y ] : H [ Z | Y ] ≤ Ep̂ ( y ) ∑ i 1 2 ln ( 2πe Var [ Zi | y ] ) ≈ Ep̂ ( y ) ∑ i 1 2 ln ( 2πe V̂ar [ Zi | y ] ) , ( 12 ) where Zi are the individual components of Z. H [ Z ] can be bounded similarly . More generally , we can create an even looser upper bound by bounding the mean squared norm of the latent : E ‖Z‖2 ≤ C′ ⇒ H [ Z | Y ] ≤ H [ Z ] ≤ C , ( 13 ) with C′ : = ke 2C/k 2πe for Z ∈ Rk . See section F.2 for proof . Surrogate objectives These surrogate terms provide us with three different upper-bounds that we can use as surrogate regularizers . We refer to them as : conditional log-variance regularizer ( log Var [ Z | Y ] ) , log-variance regularizer ( log Var [ Z ] ) and activation L2 regularizer ( E ‖Z‖2 ) . We can now propose the main results of this paper : IB surrogate objectives that reduce to an almost trivial implementation using the cross-entropy loss and one of the regularizers above while adding zero-entropy noise to the latent Z. Theorem 1 . Let Z be obtained by adding a single sample of zero-entropy noise to a single sample of the output z of the stochastic encoder . Then each of the following objectives is an estimator of an upper bound on the IB objective . In particular , for the surrogate objective E ‖Z‖2 , we obtain : min H ( p ( y | z ) || pθ ( Ŷ = y | z ) ) + γ‖z‖2 ; ( 14 ) for log Var [ Z | Y ] : min H ( p ( y | z ) || pθ ( Ŷ = y | z ) ) + γEp̂ ( y ) ∑ i 1 2 ln ( 2πe V̂ar [ Zi | y ] ) ; ( 15 ) and for log Var [ Z ] : min H ( p ( y | z ) || pθ ( Ŷ = y | z ) ) + γ ∑ i 1 2 ln ( 2πe V̂ar [ Zi ] ) . ( 16 ) For the latter two surrogate regularizers , we can relate their coefficient γ to β′ , β′′ and β from section 3 . However , as regularizing E ‖Z‖2 does not approximate an entropy directly , its coefficient does not relate to the Lagrange multiplier of any fixed IB objective . We compare the performance of these objectives in section 4 . 0.001 0.01 0.1 1 0 0.25 0.50 0.75 1 A cc u ra cy EZ2 γ 10−6 10−4 10−2 1 0.001 0.01 0.1 1 Epsilon Weight Decay R o b u stn ess 0.001 0.01 0.1 1 0 0.25 0.50 0.75 1 A cc u ra cy EZ2 γ 10−6 10−4 10−2 1 0.001 0.01 0.1 1 Epsilon Weight Decay R o b u stn ess ( a ) Robustness for different attack strengths . The dashed black line represents a model trained only with cross-entropy and no noise injection . We see that models trained with the surrogate IB objective ( colored by γ ) see improved robustness over a model trained only to minimize the cross-entropy training objective ( shown in black ) while the models regularized with weight-decay actually perform worse . 50 100 300 0 0.25 0.50 0.75 1 A cc u ra cy EZ2 γ 10−6 10−4 10−2 1 50 100 300 Preserved Information I [ X ; Z ] Weight Decay ( b ) Average robustness over ∈ [ 0 , 0.1 ] compared to n rmal accuracy for different amounts of Preserved Information . ◦ markers show robustness . × markers show the normal accuracy . We see that robustness depends on the Preserved Information . If the latent is compressesed too much , robustness ( and accuracy ) are low . If the latent is not compressed enough , robustness and thus generalization suffer . Figure 5 : Adversarial robustness of ResNet18 models trained on CIFAR-10 with surrogate objectives in comparison to regularization with L2 weight-decay as non-IB method . The robustness is evaluated using FGSM , PGD , DeepFool and BasicIterative attacks of varying values . 4 Experiments We now provide empirical verification of the claims made in the previous sections . Our goal in this section is to highlight two main findings : first , that our surrogate objectives obtain similar behavior to what we expect of exact IB objectives with respect to their effect on robustness to adversarial examples . In particular , we show that our surrogate IB objectives improve adversarial robustness compared to models trained only on the cross-entropy loss , consistent with the findings of Alemi et al . ( 2016 ) . Second , we show the effect of our surrogate objectives on information quantities during training by plotting information plane diagrams , demonstrating that models trained with our objectives trade off between I [ X ; Z ] and I [ Y ; Z ] as expected . We show this by recovering information plane plots similar to the ones in Tishby and Zaslavsky ( 2015 ) and qualitatively examine the optimization behavior of the networks through their training trajectories . We demonstrate the scalability of our surrogate objectives by applying our surrogate IB objectives to the CIFAR-10 and Imagenette datasets , high-dimensional image datasets . For details about our experiment setup , DNN architectures , hyperparameters and additional insights , see section G. In particular , empirical quantification of our observations on the relationship between the Decoder Cross-Entropy loss and the Prediction Cross-Entropy are deferred to the appendix due to space limitations as well as the description of the toy experiment that shows that minimizing H [ Z | Y ] for continuous latent Z without adding noise does not constrain information meaningfully and that adding noise solves the issue as detailed in section 3.3 . Robustness to adversarial attacks Alemi et al . ( 2016 ) and Fischer and Alemi ( 2020 ) observe that their IB objectives lead to improved adversarial robustness over standard training objectives . We perform a similar evaluation to see whether our surrogate objectives also see improved robustness . We train a fully-connected residual network on CIFAR-10 for a range of regularization coefficients γ using our E ‖Z‖2 surrogate objective ; we then compare against a similar regularization method that does not have an information-theoretic interpretation : L2 weight-decay . We inject zero-entropy noise in both cases . After training , we evaluate the models on adversarially perturbed images using the FGSM ( Szegedy et al. , 2013 ) , PGD ( Madry et al. , 2018 ) , BasicIterative ( Kurakin et al. , 2017 ) and DeepFool ( Moosavi-Dezfooli et al. , 2016 ) attacks for varying levels of the perturbation magnitude parameter . We also compare to a simple unregularized cross-entropy baseline ( black dashed line ) . To compute overall robustness , we use each attack in turn and only count a sample as robust if it defeats them all . As depicted in figure 5 , we find that our surrogate objectives yield significantly more robust models while obtaining similar test accuracy on the unperturbed data whereas weight-decay regularization reduces robustness against adversarial attacks . Plots for the other two regularizers can be found in the appendix in figure G.13 and figure G.14 . Information plane plots for CIFAR-10 To compare the different surrogate regularizers , we again use a ResNet18 model on CIFAR-10 with zero-entropy noise added to the final layer activations Z , with K = 256 dimensions , as an encoder and add a single K × 10 linear unit as a decoder . We train with the surrogate objectives from section 3.3 for various γ , chosen in logspace from different ranges to compensate for their relationship to β as noted in section 3.3 : for log Var [ Z ] , γ ∈ [ 10−5 , 1 ] ; for log Var [ Z | Y ] , γ ∈ [ 10−5 , 10 ] ; and for E ‖Z‖2 , by trial and error , γ ∈ [ 10−6 , 10 ] . We estimate information quantities using the method of Kraskov et al . ( 2004 ) . Figure 6 shows an information plane plot for regularizing with E ‖Z‖2 for different γ over different epochs for the training set . Similar to Shwartz-Ziv and Tishby ( 2017 ) , we observe that there is an initial expansion phase followed by compression . The jumps in performance ( reduction of the Residual Information ) are due to drops in the learning rate . In figure 4 , we can see that the saturation curves for all 3 surrogate objectives qualitatively match the predicted curve from Tishby and Zaslavsky ( 2015 ) . Figure G.1 shows the difference between the regularizers more clearly , and figure G.3 shows the training trajectories for all three regularizers . More details in section G.3.1 . Information plane plots for Imagenette To show that our surrogate objectives also scale up to larger datasets , we run a similar experiment on Imagenette ( Howard , 2019 ) , which is a subset of ImageNet with 10 classes with 224 × 224 × 3 = 1.5 × 105 input dimensions , and on which we obtain 90 % test accuracy . See the figure 1 , which shows the trajectories on the test set . We obtain similar plots to the ones obtained for CIFAR-10 , showing that our surrogate objectives scale well to higher-dimensional datasets despite their simplicity . 5 Conclusion The contributions of this paper have been threefold : First , we have proposed simple , tractable training objectives which capture many of the desirable properties of IB methods while also scaling to problems of interest in deep learning . For this we have introduced implicit stochastic encoders , e.g . using dropout , and compared multi-sample dropout approaches to identify the one that approximates the Decoder Uncertainty Hθ [ Y | Z ] , relating them to the cross-entropy loss that is commonly used for classification problems . This widens the range of DNN architectures that can be used with IB objectives considerably . We have demonstrated that our objectives perform well for practical DNNs without cumbersome density models . Second , we have motivated our objectives by providing insight into limitations of IB training , demonstrating how to avoid pathological behavior in IB objectives , and by endeavouring to provide a unifying view on IB approaches . Third , we have provided mathematically grounded intuition by using I-diagrams for the information quantities involved in IB , shown common pitfalls when using information quantities and how to avoid them , and examined how the quantities relate to each other . Future work investigating the practical constraints on the expressivity of a given neural network may provide further insight into how to measure compression in neural networks . Moreover , the connection to Bayesian Neural Networks remains to be explored . References Alessandro Achille and Stefano Soatto . Emergence of invariance and disentanglement in deep representations . The Journal of Machine Learning Research , 19 ( 1 ) :1947–1980 , 2018a . Alessandro Achille and Stefano Soatto . Information dropout : Learning optimal representations through noisy computation . IEEE transactions on pattern analysis and machine intelligence , 40 ( 12 ) :2897–2905 , 2018b . Alexander A Alemi , Ian Fischer , Joshua V Dillon , and Kevin Murphy . Deep variational information bottleneck . arXiv preprint arXiv:1612.00410 , 2016 . Rana Ali Amjad and Bernhard Claus Geiger . Learning representations for neural network-based classification using the information bottleneck principle . IEEE Transactions on Pattern Analysis and Machine Intelligence , 2019 . Mohamed Ishmael Belghazi , Aristide Baratin , Sai Rajeshwar , Sherjil Ozair , Yoshua Bengio , Aaron Courville , and Devon Hjelm . Mutual information neural estimation . In International Conference on Machine Learning , pages 531–540 , 2018 . Yoshua Bengio et al . Learning deep architectures for ai . Foundations and trends R© in Machine Learning , 2 ( 1 ) :1–127 , 2009 . J-F Bercher and Christophe Vignat . A renyi entropy convolution inequality with application . In 2002 11th European Signal Processing Conference , pages 1–4 . IEEE , 2002 . Yuri Burda , Roger Grosse , and Ruslan Salakhutdinov . Importance weighted autoencoders . arXiv preprint arXiv:1509.00519 , 2015 . Christopher P. Burgess , Irina Higgins , Arka Pal , Loic Matthey , Nick Watters , Guillaume Desjardins , and Alexander Lerchner . Understanding disentangling in β-vae . arXiv preprint arXiv:1804.03599 , 2018 . Thomas M Cover and Joy A Thomas . Elements of information theory . John Wiley & Sons , 2012 . Michael W Dusenberry , Ghassen Jerfel , Yeming Wen , Yi-an Ma , Jasper Snoek , Katherine Heller , Balaji Lakshminarayanan , and Dustin Tran . Efficient and scalable bayesian neural nets with rank-1 factors . arXiv preprint arXiv:2005.07186 , 2020 . Ian Fischer . The conditional entropy bottleneck . arXiv preprint arXiv:2002.05379 , 2020 . Ian Fischer and Alexander A. Alemi . Ceb improves model robustness . Entropy , 22 ( 10 ) :1081 , Sep 2020 . ISSN 1099-4300. doi : 10.3390/e22101081 . URL http : //dx.doi.org/10.3390/ e22101081 . Ian Fisher . The Conditional Entropy Bottleneck . Submission to ICLR 2019 , International Conference on Learning Representations , 2019 . Yarin Gal and Zoubin Ghahramani . Dropout as a bayesian approximation : Representing model uncertainty in deep learning . In international conference on machine learning , pages 1050–1059 , 2016 . Partha Ghosh , Mehdi SM Sajjadi , Antonio Vergari , Michael Black , and Bernhard Schölkopf . From variational to deterministic autoencoders . arXiv preprint arXiv:1903.12436 , 2019 . David Gondek and Thomas Hofmann . Conditional information bottleneck clustering . In 3rd ieee international conference on data mining , workshop on clustering large data sets , pages 36–42 . Citeseer , 2003 . Ian J Goodfellow , Mehdi Mirza , Da Xiao , Aaron Courville , and Yoshua Bengio . An empirical investigation of catastrophic forgetting in gradient-based neural networks . arXiv preprint arXiv:1312.6211 , 2013 . Kaiming He , Xiangyu Zhang , Shaoqing Ren , and Jian Sun . Deep residual learning for image recognition . In Proceedings of the IEEE conference on computer vision and pattern recognition , pages 770–778 , 2016a . Kaiming He , Xiangyu Zhang , Shaoqing Ren , and Jian Sun . Identity mappings in deep residual networks . Lecture Notes in Computer Science , page 630–645 , 2016b . Irina Higgins , Loic Matthey , Arka Pal , Christopher Burgess , Xavier Glorot , Matthew Botvinick , Shakir Mohamed , and Alexander Lerchner . beta-vae : Learning basic visual concepts with a constrained variational framework . 2016 . Geoffrey E Hinton . Connectionist learning procedures . In Machine learning , pages 555–610 . Elsevier , 1990 . Neil Houlsby , Ferenc Huszár , Zoubin Ghahramani , and Máté Lengyel . Bayesian active learning for classification and preference learning . arXiv preprint arXiv:1112.5745 , 2011 . Jeremy Howard . Imagewang . 2019 . URL https : //github.com/fastai/imagenette/ . Hiroshi Inoue . Multi-sample dropout for accelerated training and better generalization . arXiv preprint arXiv:1905.09788 , 2019 . Morris A. Jette , Andy B. Yoo , and Mark Grondona . Slurm : Simple linux utility for resource management . In In Lecture Notes in Computer Science : Proceedings of Job Scheduling Strategies for Parallel Processing ( JSSPP ) 2003 , pages 44–60 . Springer-Verlag , 2002 . Diederik P Kingma and Jimmy Ba . Adam : A method for stochastic optimization . arXiv preprint arXiv:1412.6980 , 2014 . Diederik P Kingma and Max Welling . Auto-encoding variational bayes . arXiv preprint arXiv:1312.6114 , 2013 . Andreas Kirsch , Joost van Amersfoort , and Yarin Gal . Batchbald : Efficient and diverse batch acquisition for deep bayesian active learning . In Advances in Neural Information Processing Systems , pages 7024–7035 , 2019 . Alexander Kraskov , Harald Stögbauer , and Peter Grassberger . Estimating mutual information . Physical review E , 69 ( 6 ) :066138 , 2004 . Alex Krizhevsky , Geoffrey Hinton , et al . Learning multiple layers of features from tiny images . 2009 . Alexey Kurakin , Ian J Goodfellow , and Samy Bengio . Adversarial machine learning at scale . 2017 . Y. Lecun , L. Bottou , Y. Bengio , and P. Haffner . Gradient-based learning applied to document recognition . Proceedings of the IEEE , 86 ( 11 ) :2278–2324 , 1998 . David J. C. MacKay . Information Theory , Inference , and Learning Algorithms . Cambridge University Press , 2003 . Aleksander Madry , Aleksandar Makelov , Ludwig Schmidt , Dimitris Tsipras , and Adrian Vladu . Towards deep learning models resistant to adversarial attacks . In International Conference on Learning Representations , 2018 . David McAllester and Karl Stratos . Formal limitations on the measurement of mutual information . arXiv preprint arXiv:1811.04251 , 2018 . William McGill . Multivariate information transmission . Transactions of the IRE Professional Group on Information Theory , 4 ( 4 ) :93–111 , 1954 . Seyed-Mohsen Moosavi-Dezfooli , Alhussein Fawzi , and Pascal Frossard . Deepfool : a simple and accurate method to fool deep neural networks . In Proceedings of the IEEE conference on computer vision and pattern recognition , pages 2574–2582 , 2016 . Hyeonwoo Noh , Tackgeun You , Jonghwan Mun , and Bohyung Han . Regularizing deep neural networks by noise : Its interpretation and optimization . In Advances in Neural Information Processing Systems , pages 5109–5118 , 2017 . Morteza Noshad , Yu Zeng , and Alfred O Hero . Scalable mutual information estimation using dependence graphs . In ICASSP 2019-2019 IEEE International Conference on Acoustics , Speech and Signal Processing ( ICASSP ) , pages 2962–2966 . IEEE , 2019 . Aaron van den Oord , Yazhe Li , and Oriol Vinyals . Representation learning with contrastive predictive coding . arXiv preprint arXiv:1807.03748 , 2018 . Adam Paszke , Sam Gross , Francisco Massa , Adam Lerer , James Bradbury , Gregory Chanan , Trevor Killeen , Zeming Lin , Natalia Gimelshein , Luca Antiga , et al . Pytorch : An imperative style , high-performance deep learning library . In Advances in Neural Information Processing Systems , pages 8024–8035 , 2019 . Boris T Polyak and Anatoli B Juditsky . Acceleration of stochastic approximation by averaging . SIAM journal on control and optimization , 30 ( 4 ) :838–855 , 1992 . Ben Poole , Sherjil Ozair , Aaron van den Oord , Alexander A Alemi , and George Tucker . On variational bounds of mutual information . arXiv preprint arXiv:1905.06922 , 2019 . Andrew M Saxe , Yamini Bansal , Joel Dapello , Madhu Advani , Artemy Kolchinsky , Brendan D Tracey , and David D Cox . On the information bottleneck theory of deep learning . Journal of Statistical Mechanics : Theory and Experiment , 2019 ( 12 ) :124020 , 2019 . Ohad Shamir , Sivan Sabato , and Naftali Tishby . Learning and generalization with the information bottleneck . Theoretical Computer Science , 411 ( 29-30 ) :2696–2711 , 2010 . Claude E Shannon . A mathematical theory of communication . Bell system technical journal , 27 ( 3 ) : 379–423 , 1948 . Ravid Shwartz-Ziv and Naftali Tishby . Opening the black box of deep neural networks via information . arXiv preprint arXiv:1703.00810 , 2017 . Sara A. Solla , Esther Levin , and Michael Fleisher . Accelerated learning in layered neural networks . Complex Systems , 2 , 1988 . Nitish Srivastava , Geoffrey Hinton , Alex Krizhevsky , Ilya Sutskever , and Ruslan Salakhutdinov . Dropout : a simple way to prevent neural networks from overfitting . The journal of machine learning research , 15 ( 1 ) :1929–1958 , 2014 . DJ Strouse and David J Schwab . The deterministic information bottleneck . Neural computation , 29 ( 6 ) :1611–1630 , 2017 . Christian Szegedy , Wojciech Zaremba , Ilya Sutskever , Joan Bruna , Dumitru Erhan , Ian Goodfellow , and Rob Fergus . Intriguing properties of neural networks . arXiv preprint arXiv:1312.6199 , 2013 . Naftali Tishby and Noga Zaslavsky . Deep learning and the information bottleneck principle . In 2015 IEEE Information Theory Workshop ( ITW ) , pages 1–5 . IEEE , 2015 . Naftali Tishby , Fernando C Pereira , and William Bialek . The information bottleneck method . arXiv preprint physics/0004057 , 2000 . Michael Tschannen , Josip Djolonga , Paul K Rubenstein , Sylvain Gelly , and Mario Lucic . On mutual information maximization for representation learning . arXiv preprint arXiv:1907.13625 , 2019 . Li Wan , Matthew Zeiler , Sixin Zhang , Yann Le Cun , and Rob Fergus . Regularization of neural networks using dropconnect . In International conference on machine learning , pages 1058–1066 , 2013a . Li Wan , Matthew Zeiler , Sixin Zhang , Yann Le Cun , and Rob Fergus . Regularization of neural networks using dropconnect . In International conference on machine learning , pages 1058–1066 , 2013b . Yilun Xu , Shengjia Zhao , Jiaming Song , Russell Stewart , and Stefano Ermon . A theory of usable information under computational constraints . arXiv preprint arXiv:2002.10689 , 2020 . Raymond W Yeung . A new outlook on shannon ’ s information measures . IEEE transactions on information theory , 37 ( 3 ) :466–474 , 1991 . Chiyuan Zhang , Samy Bengio , Moritz Hardt , Benjamin Recht , and Oriol Vinyals . Understanding deep learning requires rethinking generalization . arXiv preprint arXiv:1611.03530 , 2016 . Ying Zhang , Tao Xiang , Timothy M Hospedales , and Huchuan Lu . Deep mutual learning . In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition , pages 4320– 4328 , 2018 . A Information quantities & information diagrams Here we introduce notation and terminology in greater detail than in the main paper . We review well-known information quantities and provide more details on using information diagrams ( Yeung , 1991 ) . A.1 Information quantities We denote entropy H [ · ] , joint entropy H [ · , · ] , conditional entropy H [ · | · ] , mutual information I [ · ; · ] and Shannon ’ s information content h ( · ) following Cover and Thomas ( 2012 ) ; MacKay ( 2003 ) ; Shannon ( 1948 ) : h ( x ) = − ln x H [ X ] = Ep ( x ) h ( p ( x ) ) H [ X , Y ] = Ep ( x , y ) h ( p ( x , y ) ) H [ X | Y ] = H [ X , Y ] − H [ Y ] = Ep ( y ) H [ X | y ] = Ep ( x , y ) h ( p ( x | y ) ) I [ X ; Y ] = H [ X ] + H [ Y ] − H [ X , Y ] = Ep ( x , y ) h ( p ( x ) p ( y ) p ( x , y ) ) I [ X ; Y | Z ] = H [ X | Z ] + H [ Y | Z ] − H [ X , Y | Z ] , where X , Y , Z are random variables and x , y , z are outcomes these random variables can take . We use differential entropies interchangeably with entropies . We can do so because equalities between them hold as can be verified by symbolic expansions . For example , H [ X , Y ] = H [ X | Y ] + H [ Y ] ⇔Ep ( x , y ) h ( p ( x , y ) ) = Ep ( x , y ) [ h ( p ( x | y ) ) + h ( p ( y ) ) ] = Ep ( x , y ) [ h ( p ( x | y ) ) ] +Ep ( y ) h ( p ( y ) ) , which is valid in both the discrete and continuous case ( if the integrals all exist ) . The question of how to transfer inequalities in the discrete case to the continuous case is dealt with in section 3.3 . We will further require the Kullback-Leibler divergence DKL ( · || · ) and cross-entropy H ( · || · ) : H ( p ( x ) || q ( x ) ) = Ep ( x ) h ( q ( x ) ) DKL ( p ( x ) || q ( x ) ) = Ep ( x ) h ( q ( x ) p ( x ) ) H ( p ( y | x ) || q ( y | x ) ) = Ep ( x ) Ep ( y|x ) h ( q ( y | x ) ) = Ep ( x , y ) h ( q ( y | x ) ) DKL ( p ( y | x ) || q ( y | x ) ) = Ep ( x , y ) h ( q ( y|x ) p ( y|x ) ) A.2 Information diagrams Information diagrams ( I-diagrams ) , like the one depicted in figure 2 ( or figure H.1 for a bigger version ) , visualize the relationship between information quantities : Yeung ( 1991 ) shows that we can define a signed measure µ * such that these well-known quantities map to abstract sets and are consistent with set operations . H [ A ] = µ * ( A ) H [ A1 , . . . , An ] = µ * ( ∪iAi ) H [ A1 , . . . , An | B1 , . . . , Bn ] = µ * ( ∪iAi − ∪iBi ) I [ A1 ; . . . ; An ] = µ * ( ∩iAi ) I [ A1 ; . . . ; An | B1 , . . . , Bn ] = µ * ( ∩iAi − ∪iBi ) Note that interaction information ( McGill , 1954 ) follows as canonical generalization of the mutual information to multiple variables from that work , whereas total correlation does not . In other words , equalities can be read off directly from I-diagrams : an information quantity is the sum of its parts in the corresponding I-diagram . This is similar to Venn diagrams . The sets used in I-diagrams are just abstract symbolic objects , however . An important distinction between I-diagrams and Venn diagrams is that while we can always read off inequalities in Venn diagrams , this is not true for I-diagrams in general because mutual information terms in more than two variables can be negative . In Venn diagrams , a set is always larger or equal any subset . However , if we show that all information quantities are non-negative , we can read off inequalities again . We do this for figure 2 at the end of section 2 for categorical Z and expand this to continuous Z in section 3.3 . Thus , we can treat the Mickey Mouse I-diagram like a Venn diagram to read off equalities and inequalities . Nevertheless , caution is warranted sometimes . As the signed measure can be negative , µ * ( X ∩ Y ) = 0 does not imply X ∩ Y = ∅ : deducing that a mutual information term is 0 does not imply that one can simply remove the corresponding area in the I-diagram . There could be Z with µ * ( ( X ∩ Y ) ∩ Z ) < 0 , such that µ * ( X ∩ Y ) = µ * ( X ∩ Y ∩ Z ) + µ * ( X ∩ Y − Z ) = 0 but X ∩ Y , ∅ . This also means that we can not drop the term from expressions when performing symbolic manipulations . This is of particular importance because a mutual information of zero means two random variables are independent , which might invite one drawing them as disjoint areas . The only time where one can safely remove an area from the diagram is for atomic quantities , which are quantities which reference all the available random variables ( Yeung , 1991 ) . For example , when we only have three variables X , Y , Z , I [ X ; Y ; Z ] and I [ X ; Y | Z ] are atomic quantities . We can safely remove atomic quantities from I-diagrams when they are 0 as there are no random variables left to apply that could lead to the problem explored above . Continuing the example , 0 = I [ X ; Y ; Z ] = µ * ( X ∩ Y ∩ Z ) would imply X ∩ Y ∩ Z = ∅ , and we could remove it from the diagram without loss of generality . Moreover , atomic I [ X ; Y |Z ] = µ * ( X∩Y−Z ) = 0 then and could be removed from the diagram as well . We only use I-diagrams for the three variable case , but they supply us with tools to easily come up with equalities and inequalities for information quantities . In the general case with multiple variables , they can be difficult to draw , but for Markov chains they can be of great use . B MickeyMouse I-diagram B.1 Intuition for theMickeyMouse information quantities We base the names of information quantities on existing conventions and come up with sensible extensions . For example , the name Preserved Relevant Information for I [ Y ; Z ] was introduced by Tishby and Zaslavsky ( 2015 ) . It can be seen as the intersection of I [ X ; Z ] and I [ X ; Y ] in the I-diagram , and hence we denote I [ X ; Z ] Preserved Information and I [ X ; Y ] Relevant Information , which are sensible names as we detail below . We identify the following six atomic quantities : Label Uncertainty H [ Y | X ] quantifies the uncertainty in our labels . If we have multiple labels for the same data sample , it will be > 0 . It is 0 otherwise . Encoding Uncertainty H [ Z | X ] quantifies the uncertainty in our latent encoding given a sample . When using a Bayesian model with random variable ω for the weights , one can further split this term into H [ Z | X ] = I [ Z ; ω | X ] + H [ Z | X , ω ] , so uncertainty stemming from weight uncertainty and independent noise ( Houlsby et al. , 2011 ; Kirsch et al. , 2019 ) . Preserved Relevant Information I [ Y ; Z ] quantifies information in the latent that is relevant for our task of predicting the labels ( Tishby and Zaslavsky , 2015 ) . Intuitively , we want to maximize it for good predictive performance . Residual Information I [ X ; Y | Z ] quantifies information for the labels that is not captured by the latent ( Tishby and Zaslavsky , 2015 ) but would be useful to be captured . Redundant Information I [ X ; Z | Y ] quantifies information in the latent that is not needed for predicting the labels6 . We also identify the following composite information quantities : Relevant Information I [ X ; Y ] = I [ X ; Y | Z ] + I [ Y ; Z ] quantifies the information in the data that is relevant for the labels and which our model needs to capture to be able to predict the labels . Preserved Information I [ X ; Z ] = I [ X ; Z | Y ] + I [ Y ; Z ] quantifies information from the data that is preserved in the latent . Decoder Uncertainty H [ Y | Z ] = I [ X ; Y | Z ] + H [ Y | X ] quantifies the uncertainty about the labels after learning about the latent Z . If H [ Y | Z ] reaches 0 , it means that no additional information is needed to infer the correct label Y from the latent Z : the optimal decoder can be a deterministic mapping . Intuitively , we want to minimize this quantity for good predictive performance . Reverse Decoder Uncertainty H [ Z | Y ] = I [ X ; Z | Y ] + H [ Z | X ] quantifies the uncertainty about the latent Z given the label Y . We can imagine training a new model to predict Z given Y and minimizing H [ Z | Y ] to 0 would allow for a deterministic decoder from the latent to given the label . Nuisance7 H [ X | Y ] = H [ X | Y , Z ] + I [ X ; Z ] quantifies the information in the data that is not relevant for the task ( Achille and Soatto , 2018a ) . B.2 Definitions & equivalences The following equalities can be read off from figure 2 . For completeness and to provide a handy reference , we list them explicitly here . They can also be verified using symbolic manipulations and the properties of information quantities . Equalities for composite quantities : I [ X ; Y ] = I [ X ; Y | Z ] + I [ Y ; Z ] ( 17 ) I [ X ; Z ] = I [ X ; Z | Y ] + I [ Y ; Z ] ( 18 ) H [ Y | Z ] = I [ X ; Y | Z ] + H [ Y | X ] ( 19 ) H [ Z | Y ] = I [ X ; Z | Y ] + H [ Z | X ] ( 20 ) H [ X | Y ] = H [ X | Y , Z ] + I [ X ; Z ] ( 21 ) We can combine the atomic quantities into the overall Label Entropy and Encoding Entropy : H [ Y ] = H [ Y | X ] + I [ Y ; Z ] + I [ X ; Y | Z ] ( 22 ) H [ Z ] = H [ Z | X ] + I [ Y ; Z ] + I [ X ; Z | Y ] . ( 23 ) We can express the Relevant Information I [ X ; Y ] , Residual Information I [ X ; Y | Z ] , Redundant Information I [ X ; Z | Y ] and Preserved Information I [ X ; Z ] without X on the left-hand side : I [ X ; Y ] = H [ Y ] − H [ Y | X ] , ( 24 ) I [ X ; Z ] = H [ Z ] − H [ Z | X ] , ( 25 ) I [ X ; Y | Z ] = H [ Y | Z ] − H [ Y | X ] , ( 26 ) I [ X ; Z | Y ] = H [ Z | Y ] − H [ Z | X ] . ( 27 ) This simplifies estimating these expressions as X is usually much higher-dimensional and irregular than the labels or latent encodings . We also can rewrite the Preserved Relevant Information I [ Y ; Z ] as : I [ Y ; Z ] = H [ Y ] − H [ Y | Z ] ( 28 ) I [ Y ; Z ] = H [ Z ] − H [ Z | Y ] ( 29 ) 6Fisher ( 2019 ) uses the term “ Residual Information ” for this , which conflicts with Tishby and Zaslavsky ( 2015 ) . 7Not depicted in figure 2 . C Information bottleneck & related works C.1 Goals & motivation The IB principle from Tishby et al . ( 2000 ) can be recast as a generalization of finding minimal sufficient statistics for the labels given the data ( Shamir et al. , 2010 ; Tishby and Zaslavsky , 2015 ; Fisher , 2019 ) : it strives for minimality and sufficiency of the latent Z. Minimality is about minimizing amount of information necessary of X for the task , so minimizing the Preserved Information I [ X ; Z ] ; while sufficiency is about preserving the information to solve the task , so maximizing the Preserved Relevant Information I [ Y ; Z ] . From figure 2 , we can read off the definitions of Relevant Information and Preserved Information : I [ X ; Y ] = I [ Y ; Z ] + I [ X ; Y | Z ] ( 30 ) I [ X ; Z ] = I [ Y ; Z ] + I [ X ; Z | Y ] , ( 31 ) and see that maximizing the Preserved Relevant Information I [ Y ; Z ] is equivalent to minimizing the Residual Information I [ X ; Y | Z ] , while minimizing the Preserved Information I [ X ; Z ] at the same time means minimizing the Redundant Information I [ X ; Z | Y ] , too , as I [ X ; Y ] is constant for the given dataset8 . Moreover , we also see that the Preserved Relevant Information I [ Y ; Z ] is upper-bounded by Relevant Information I [ X ; Y ] , so to capture all relevant information in our latent , we want I [ X ; Y ] = I [ Y ; Z ] . Using the diagram , we can also see that minimizing the Residual Information is the same as minimizing the Decoder Uncertainty H [ Y | Z ] : I [ X ; Y | Z ] = H [ Y | Z ] − H [ Y | X ] . Ideally , we also want to minimize the Encoding Uncertainty H [ Z | X ] to find the most deterministic latent encoding Z . Minimizing the Encoding Uncertainty and the Redundant Information I [ X ; Z | Y ] together is the same as minimizing the Reverse Decoder Uncertainty H [ Z | Y ] . All in all , we want to minimize both the Decoder Uncertainty H [ Y | Z ] and the Reverse Decoder Uncertainty H [ Z | Y ] . C.2 IB objectives “ The Information BottleneckMethod ” ( IB ) Tishby et al . ( 2000 ) introduce MI ( X ; X̂ ) − βMI ( X̂ ; Y ) as optimization objective for the Information Bottleneck . We can relate this to our notation by renaming X̂ = Z , such that the objective becomes “ min I [ X ; Z ] − βI [ Y ; Z ] ” . The IB objective minimizes the Preserved Information I [ X ; Z ] and trades it off with maximizing the Preserved Relevant Information I [ Y ; Z ] . Tishby and Zaslavsky ( 2015 ) mention that the IB objective is equivalent to minimizing I [ X ; Z ] + βI [ X ; Y | Z ] , see our discussion above . Tishby et al . ( 2000 ) provide an optimal algorithm for the tabular case , when X , Y and Z are all categorical . This has spawned additional research to optimize the objective for other cases and specifically for DNNs . “ Deterministic Information Bottleneck ” ( DIB ) Strouse and Schwab ( 2017 ) introduce as objective “ min H [ Z ] − βI [ Y ; Z ] ” . Compared to the IB objective , this also minimizes H [ Z | X ] and encourages determinism . Vice-versa , for deterministic encoders , H [ Z | X ] = 0 , and their objective matches the IB objective . Like Tishby et al . ( 2000 ) , they provide an algorithm for the tabular case . To do so , they examine an analytical solution for their objective as it is unbounded : H [ Z | X ] → −∞ for the optimal solution . As we discuss in section 3.3 , it does not easily translate to a continuous latent representation . “ Deep Variational Information Bottleneck ” Alemi et al . ( 2016 ) rewrite the terms in the bottleneck as maximization problem “ max I [ Y ; Z ] − βI [ X ; Z ] ” and swap the β parameter . Their β would be 1/β in IB above , which emphasizes that I [ Y ; Z ] is important for performance and I [ X ; Z ] acts as regularizer . 8That is , it does not depend on θ . The paper derives the following variational approximation to the IB objective , where z = fθ ( x , ) denotes a stochastic latent embedding with distribution pθ ( z | x ) , pθ ( ŷ | z ) denotes the decoder , and r ( z ) is some fixed prior distribution on the latent embedding : minEp̂ ( x , y ) E ∼p ( ) [ − log pθ ( Ŷ = y | z = fθ ( xn , ) ) + γDKL ( p ( z|xn ) ||r ( z ) ) ] . ( 32 ) In principle , the distributions pθ ( ŷ | z ) and pθ ( z | x ) could be given by arbitrary parameterizations and function approximators . In practice , the implementation of DVIB presented by Alemi et al . ( 2016 ) constructs pθ ( z | x ) as a multivariate Gaussian with parameterized mean and parameterized diagonal covariance using a neural network , and then uses a simple logistic regression to obtain pθ ( ŷ | z ) , while arbitrarily setting r ( z ) to be a unit Gaussian around the origin . The requirement for pθ ( z | x ) to have a closed-form Kullback-Leibler divergence limits the applicability of the DVIB objective . The DVIB objective can be written more concisely as min Hθ [ Y | Z ] + γDKL ( p ( z | x ) || r ( z ) ) in the notation introduced in section 3 . We discuss the regularizer in more detail in section F.3 . “ Conditional Entropy Bottleneck ” In a preprint , Fisher ( 2019 ) introduce their Conditional Entropy Bottleneck as “ min I [ X ; Z | Y ] − I [ Y ; Z ] ” . We can rewrite the objective as I [ X ; Z | Y ] + I [ X ; Y | Z ] − I [ X ; Y ] , using equations ( 30 ) and ( 31 ) . The last term is constant for the dataset and can thus be dropped . Likewise , the IB objective can be rewritten as minimizing I [ X ; Z | Y ] + ( β − 1 ) I [ X ; Y | Z ] . The two match for β = 2 . Fisher ( 2019 ) provides experimental results that favorably compare to Alemi et al . ( 2016 ) , possibly due to additional flexibility as Fisher ( 2019 ) do not constrain p ( z ) to be a unit Gaussian and employ variational approximations for all terms . We relate CEB to Entropy Distance Metric in section C.4 . “ Conditional Entropy Bottleneck ” ( 2020 ) In a substantial revision of the preprint , Fischer ( 2020 ) change their Conditional Entropy Bottleneck to include a Lagrange multiplier : “ min I [ X ; Z | Y ] − γI [ Y ; Z ] ” . Their VCEB objective can be written more concisely as min Hθ [ Y | Z ] + γ ( Hθ [ Z | Y ] − Hθ [ Z | X ] ) , where , without writing down the probabilistic model , we introduce variational approximations for the Reverse Decoder Uncertainty and the Encoding Uncertainty . They are the first to report results on CIFAR-10 . It is not clear how they parameterize the model they use for CIFAR-10 . They use one Gaussian per class to model Hθ [ Z | Y ] . “ CEB ImprovesModel Robustness ” Fischer and Alemi ( 2020 ) take CEB and switch to a deterministic model which they turn it into a stochastic encoder by adding unit Gaussian noise . They use Gaussians of fixed variance to variationally approximate q ( y | z ) : for each class , q ( y | z ) is modelled as a separate Gaussian . They are the first to report results on ImageNet and report good rebustness against adversarial attacks without adversarial training . C.3 Canonical IB & DIB objectives We expand the IB and DIB objectives into “ disjoint ” terms and drop constant ones to find a more canonical form . This leads us to focus on the optimization of the Decoder Uncertainty H [ Y | Z ] along with additional regularization terms . In section 3.2 , we discuss the properties of H [ Y | Z ] , and in section 3.3 we examine the regularization terms . Proposition . For IB , we obtain arg min I [ X ; Z ] − βI [ Y ; Z ] = arg min H [ Y | Z ] + β′ I [ X ; Z | Y ] ︸ ︷︷ ︸ =H [ Z|Y ] −H [ Z|X ] , ( 33 ) and , for DIB , arg min H [ Z ] − βI [ Y ; Z ] = arg min H [ Y | Z ] + β′H [ Z | Y ] = arg min H [ Y | Z ] + β′′H [ Z ] ( 34 ) with β′ : = 1 β−1 ∈ [ 0 , ∞ ) and β′′ : = 1 β ∈ [ 0 , 1 ) . Proof . For the steps marked with * , we make use of β > 1 . For IB , we obtain arg min I [ X ; Z ] − βI [ Y ; Z ] = arg min I [ X ; Z | Y ] + ( β − 1 ) H [ Y | Z ] ( * ) = arg min H [ Y | Z ] + β′ I [ X ; Z | Y ] arg min H [ Y | Z ] + β′ ( H [ Z | Y ] − H [ Z | X ] ) , ( IB ) and , for DIB , arg min H [ Z ] − βI [ Y ; Z ] = arg min H [ Z | Y ] + ( β − 1 ) H [ Y | Z ] ( * ) = arg min H [ Y | Z ] + β′H [ Z | Y ] , ( DIB ) with β′ : = 1 β−1 ∈ [ 0 , ∞ ) . Similarly , we show for DIB arg min H [ Z ] − βI [ Y ; Z ] = arg min H [ Z ] + βH [ Y | Z ] ( * ) = arg min H [ Y | Z ] + β′′H [ Z ] , with β′′ : = 1 β ∈ [ 0 , 1 ) , which is relevant in section 3.3 . We limit ourselves to β > 1 , because , for β < 1 , we would be maximizing the Decoder Uncertainty , which does not make sense : the obvious solution to this is one where Z contains no information on Y , that is p ( y | z ) is uniform . In the case of DIB , it is to map every input deterministically to a single latent ; whereas for IB , we only minimize the Redundant Information , and the solution is free to contain noise . For β = 1 , we would not care about Decoder Uncertainty and only minimize Redundant Information and Reverse Decoder Uncertainty , respectively , which allows for arbitrarily bad predictions . We note that we have β′ = β ′′ 1−β′′ using the relations above . C.4 IB objectives and the Entropy DistanceMetric Another perspective on the IB objectives is by expressing them using the Entropy Distance Metric . MacKay ( 2003 , p. 140 ) introduces the entropy distance EDM ( Y , Z ) = H [ Y | Z ] + H [ Z | Y ] . ( 35 ) as a metric when we identify random variables up to permutations of the labels for categorical variables : if the entropy distance is 0 , Y and Z are the same distribution up to a consistent permutation of the labels ( independent of X ) . If the entropy distance becomes 0 , both H [ Y | Z ] = 0 = H [ Z | Y ] , and we can find a bijective map from Z to Y.9 We can express the Reverse Decoder Uncertainty H [ Z | Y ] using the Decoder Uncertainty H [ Y | Z ] and the entropies : H [ Z | Y ] + H [ Y ] = H [ Y | Z ] + H [ Z ] , and rewrite equation ( 35 ) as EDM ( Y , Z ) = 2H [ Y | Z ] + H [ Z ] − H [ Y ] . For optimization purposes , we can drop constant terms and rearrange : arg min EDM ( Y , Z ) = arg min H [ Y | Z ] + 12 H [ Z ] . C.4.1 Rewriting IB and DIB using the Entropy DistanceMetric For β ≥ 1 , we can rewrite equations ( IB ) and ( DIB ) as : arg min EDM ( Y , Z ) + γ ( H [ Y | Z ] − H [ Z | Y ] ) + ( γ − 1 ) H [ Z | X ] ( 36 ) for IB , and arg min EDM ( Y , Z ) + γ ( H [ Y | Z ] − H [ Z | Y ] ) ( 37 ) 9The argument for continuous variables is the same . We need to identify distributions up to “ isentropic ” bijections . for DIB and replace β with γ = 1 − 2 β ∈ [ −1 , 1 ] which allows for a linear mix between H [ Y | Z ] and H [ Z | Y ] . DIB will encourage the model to match both distributions for γ = 0 ( β = 2 ) , as we obtain a term that matches the Entropy Distance Metric from section C.4 , and otherwise trades off Decoder Uncertainty and Reverse Decoder Uncertainty . IB behaves similarly but tends to maximize Encoding Uncertainty as γ − 1 ∈ [ −2 , 0 ] . Fisher ( 2019 ) argues for picking this configuration similar to the arguments in section C.1 . DIB will force both distributions to become exactly the same , which would turn the decoder into a permutation matrix for categorical variables . D Decoder Uncertainty H [ Y | Z ] D.1 Cross-entropy loss The cross-entropy loss features prominently in section 3.2 . We can derive the usual cross-entropy loss for our model by minimizing the Kullback-Leibler divergence between the empirical sample distribution p̂ ( x , y ) and the parameterized distribution pθ ( x ) pθ ( ŷ | x ) . For discriminative models , we are only interested in pθ ( ŷ | x ) , and can simply set pθ ( x ) = p̂ ( x ) : arg min θ DKL ( p̂ ( x , y ) || pθ ( x ) pθ ( Ŷ = y | x ) ) = arg min θ DKL ( p̂ ( y | x ) || pθ ( Ŷ = y | x ) ) + DKL ( p̂ ( x ) || pθ ( x ) ) ︸ ︷︷ ︸ =0 = arg min θ H ( p̂ ( y | x ) || pθ ( Ŷ = y | x ) ) − H [ Y | X ] ︸ ︷︷ ︸ const . = arg min θ H ( p̂ ( y | x ) || pθ ( Ŷ = y | x ) ) . In section 3.2 , we introduce the shorthand Hθ [ Y | X ] for H ( p̂ ( y | x ) || pθ ( Ŷ = y | x ) ) and refer to it as Prediction Cross-Entropy . D.2 Upper bounds & training error minimization To motivate that H [ Y | Z ] ( or Hθ [ Y | Z ] ) can be used as main loss term , we show that it can bound the ( training ) error probability since accuracy is often the true objective when machine learning models are deployed on real-world problems10 . Proposition . The Decoder Cross-Entropy provides an upper bound on the Decoder Uncertainty : H [ Y | Z ] ≤ H [ Y | Z ] + DKL ( p ( y | z ) || pθ ( ŷ | z ) ) = Hθ [ Y | Z ] , and further bounds the training error : p ( “ Ŷ is wrong ” ) ≤ 1 − e−Hθ [ Y|Z ] = 1 − e− ( H [ Y|Z ] +DKL ( p ( y|z ) ||pθ ( ŷ|z ) ) ) . Likewise , for the Prediction Cross-Entropy Hθ [ Y | X ] and the Label Uncertainty H [ Y | X ] . Proof . The upper bounds for Decoder Uncertainty H [ Y | Z ] and Label Uncertainty H [ Y | X ] follow from the non-negativity of the Kullback-Leibler divergence , for example : 0 ≤ DKL ( p ( y | z ) || pθ ( ŷ | z ) ) = Hθ [ Y | Z ] − H [ Y | Z ] , 0 ≤ DKL ( p̂ ( y | x ) || pθ ( ŷ | x ) ) = Hθ [ Y | X ] − H [ Y | X ] . The derivation for the training error probability is as follows : p ( “ Ŷ is correct ” ) = Ep̂ ( x , y ) p ( “ Ŷ is correct ” | x , y ) = Ep̂ ( x , y ) Epθ ( z|x ) pθ ( Ŷ = y | z ) = Ep ( y , z ) pθ ( Ŷ = y | z ) . We can then apply Jensen ’ s inequality using convex h ( x ) = − ln x : h ( Ep ( y , z ) pθ ( Ŷ = y | z ) ) ≤ Ep ( y , z ) h ( pθ ( Ŷ = y | z ) ) 10As we only take into account the empirical distribution p̂ ( x , y ) available for training , the following derivation refers only to the empirical risk , and not to the expected risk of the estimator Ŷ . ⇔ p ( “ Ŷ is correct ” ) ≥ e−H ( p ( y|z ) ||pθ ( Ŷ=y|z ) ) ⇔ p ( “ Ŷ is wrong ” ) ≤ 1 − e−Hθ [ Y|Z ] . For small Hθ [ Y | Z ] , we note that one can use the approximation ex ≈ 1 + x to obtain : p ( “ Ŷ is wrong ” ) / Hθ [ Y | Z ] . ( 38 ) Finally , we split the Decoder Cross-Entropy into the Decoder Uncertainty and a Kullback-Leibler divergence : Hθ [ Y | Z ] = H [ Y | Z ] + DKL ( p ( y | z ) || pθ ( Ŷ = y | z ) ) . If we upper-bound DKL ( p ( y | z ) ||pθ ( Ŷ = y | z ) ) , minimizing the Decoder Uncertainty H [ Y | Z ] becomes a sensible minimization objective as it reduces the probability of misclassification . We can similarly show that the training error is bounded by the Prediction Cross-Entropy Hθ [ Y | X ] . In the next section , we examine categorical Z for which optimal decoders can be constructed and DKL ( p ( y | z ) || pθ ( Ŷ = y | z ) ) becomes zero . E Categorical Z For categorical Z , p ( y | z ) can be computed exactly for a given encoder pθ ( z | x ) by using the empirical data distribution , which , in turn , allows us to compute H [ Y | Z ] 11 . This is similar to computing a confusion matrix between Y and Z but using information content instead of probabilities . Moreover , if we set pθ ( ŷ | z ) : = p ( Y = ŷ | z ) to have an optimal decoder , we obtain equality in equation ( 9 ) , and obtain Hθ [ Y | X ] ≤ Hθ [ Y | Z ] = H [ Y | Z ] . If the encoder were also deterministic , we would obtain Hθ [ Y | X ] = Hθ [ Y | Z ] = H [ Y | Z ] . We can minimize H [ Y | Z ] directly using gradient descent . d dθH [ Y | Z ] only depends on p ( y | z ) and d dθ pθ ( z | x ) : d dθ H [ Y | Z ] = Ep ( x , z ) [ d dθ [ ln pθ ( z | x ) ] Ep̂ ( y|x ) h ( p ( y | z ) ) ] . Proof . d dθ H [ Y | Z ] = d dθ Ep ( y , z ) h ( p ( y | z ) ) = d dθ Ep ( x , y , z ) h ( p ( y | z ) ) = Ep̂ ( x , y ) ddθ Epθ ( z|x ) h ( p ( y | z ) ) = Epθ ( z|x ) Ep̂ ( x , y ) d dθ [ h ( p ( y | z ) ) ] + h ( p ( y | z ) ) d dθ [ ln pθ ( z | x ) ] = Ep ( x , y , z ) d dθ [ h ( p ( y | z ) ) ] + h ( p ( y | z ) ) d dθ [ ln pθ ( z | x ) ] . And now we show that Ep ( x , y , z ) ddθ [ h ( p ( y | z ) ) ] = 0 : Ep ( x , y , z ) d dθ [ h ( p ( y | z ) ) ] = Ep ( y , z ) ddθ [ h ( p ( y | z ) ) ] = Ep ( y , z ) −1p ( y | z ) ddθ p ( y | z ) = − ∫ p ( y , z ) p ( y | z ) d dθ p ( y | z ) dy dz = − ∫ p ( z ) ∫ d dθ p ( y | z ) dy dz = − ∫ p ( z ) d dθ [ ∫ p ( y | z ) dy︸ ︷︷ ︸ =1 ] dz = 0 . Splitting the expectation and reordering ofEp ( x , y , z ) h ( p ( y | z ) ) ddθ [ ln pθ ( z | x ) ] , we obtain the result . The same holds for Reverse Decoder Uncertainty H [ Z | Y ] and for the other quantities as can be verified easily . If we minimize H [ Y | Z ] directly , we can compute p ( y | z ) after every training epoch and fix pθ ( ŷ | z ) : = p ( Y = ŷ | z ) to create the discriminative model pθ ( ŷ | x ) . This is a different perspective on the self-consistent equations from Tishby et al . ( 2000 ) ; Gondek and Hofmann ( 2003 ) . 11p ( y | z ) depends on θ through pθ ( z | x ) : p ( y | z ) = ∑ x p̂ ( x , y ) pθ ( z|x ) ∑ x p̂ ( x ) pθ ( z|x ) . 0 20 40 60 0.5 1 1.5 N at s/ P ro b ab ili ty Permutation MNIST Objective minH [ Y |Z ] minHθ [ Y |Z ] minHθ [ Y |X ] Metric H [ Y |Z ] Hθ [ Y |Z ] Hθ [ Y |X ] 0 20 40 60 Epoch 1 2 CIFAR10 Figure E.1 : Decoder Uncertainty , Decoder Cross-Entropy and Prediction Cross-Entropy for Permutation-MNIST and CIFAR-10 with a categorical Z . C = 100 categories are used for Z . We optimize with different minimization objectives in turn and plot the metrics . DKL ( p ( y | z ) || pθ ( Ŷ = y | z ) ) is small when training with Hθ [ Y | Z ] or H [ Y | Z ] . When training with Hθ [ Y | X ] on CIFAR-10 , DKL ( p ( y | z ) || pθ ( Ŷ = y | z ) ) remains quite large . We run 8 trials each and plot the median with confidence bounds ( 25 % and 75 % quartiles ) . See section E.1 for more details . E.1 Empirical evaluation of DKL ( p ( y | z ) || pθ ( Ŷ = y | z ) ) during training We examine the size of the gap between Decoder Uncertainty and Decoder Cross-Entropy and the training behavior of the two cross-entropies with categorical latent Z on Permutation MNIST and CIFAR-10 . For Permutation MNIST ( Goodfellow et al. , 2013 ) , we use the common fully-connected ReLU 784 − 1024 − 1024 −C encoder architecture , with C = 100 categories for Z . For CIFAR-10 ( Krizhevsky et al. , 2009 ) , we use a standard ResNet18 model with C many output classes as encoder ( He et al. , 2016a ) . See section G for more details about the hyperparameters . Even though a C × 10 matrix and a SoftMax would suffice to describe the decoder matrix pθ ( ŷ | z ) 12 , we have found that over-parameterization using a separate DNN benefits optimization a lot . Thus , to parameterize the decoder matrix , we use fully-connected ReLUs C − 1024 − 1024 − 10 with a final SoftMax layer . We compute it once per batch during training and back-propagate into it . Figure E.1 shows the three metrics as we train with each of them in turn . Our results do not achieve SOTA accuracy on the test set—we impose a harder optimization problem as Z is categorical , and we are essentially solving a hard-clustering problem first and then map these clusters to Ŷ . Results are provided for the training set in order to compare with the optimal decoder . As predicted , the Decoder Cross-Entropy upper-bounds both the Decoder Uncertainty H [ Y | Z ] and the Prediction Cross-Entropy in all cases . Likewise , the gap between Hθ [ Y | Z ] and H [ Y | Z ] is tiny when we minimize Hθ [ Y | Z ] . On the other hand , minimizing Prediction Cross-Entropy can lead to large gaps between Hθ [ Y | Z ] and H [ Y | Z ] , as can be seen for CIFAR-10 . Very interestingly , on MNIST Decoder Cross-Entropy provides a better training objective whereas on CIFAR-10 Prediction Cross-Entropy trains lower . Decoder Uncertainty does not train very well on CIFAR-10 , and Prediction Cross-Entropy does not train well on Permutation MNIST at all . We suspect DNN architectures in the literature have evolved to train well with cross-entropies , but we are surprised by the heterogeneity of the results for the two datasets and models . F Surrogates for regularization terms F.1 Differential entropies Proposition . After adding zero-entropy noise , the inequality I [ X ; Z | Y ] ≤ H [ Z | Y ] ≤ H [ Z ] also holds in the continuous case , and we can minimize I [ X ; Z | Y ] in the IB objective by minimizing H [ Z | Y ] or H [ Z ] , similarly to the DIB objective . We present a formal proof in section F.1 . Theorem 2 . For random variables A , B , we have H [ A + B ] ≥ H [ B ] . 12For categorical Z , pθ ( ŷ | z ) is a stochastic matrix which sums to 1 along the Ŷ dimension . Proof . See Bercher and Vignat ( 2002 , section 2.2 ) . Proposition 1 . Let Y , Z and X be random variables satisfying the independence property Z ⊥ Y |X , and F a possibly stochastic function such that Z = F ( X ) + , with independent noise satisfying ⊥ F ( X ) , ⊥ Y and H ( ) = 0 . Then the following holds whenever I [ Y ; Z ] is well-defined . I [ X ; Z | Y ] ≤ H [ Z | Y ] ≤ H [ Z ] . Proof . First , we note that H [ Z | X ] = H [ F ( X ) + | X ] ≥ H [ | X ] = H [ ] with theorem 2 , as is independent of X , and thus H [ Z | X ] ≥ 0 . We have H [ Z | X ] = H [ Z | X , Y ] by the conditional independence assumption , and by the non-negativity of mutual information , I [ Y ; Z ] ≥ 0 . Then : I [ X ; Z | Y ] + H [ Z | X ] ︸ ︷︷ ︸ ≥0 = H [ Z | Y ] H [ Z | Y ] + I [ Y ; Z ] ︸ ︷︷ ︸ ≥0 = H [ Z ] The probabilistic model from section 2 fulfills the conditions exactly , and the two statements motivate our proposition . It is important to note that while zero-entropy noise is necessary for preserving inequalities like I [ X ; Z | Y ] ≤ H [ Z | Y ] ≤ H [ Z ] in the continuous case , any Gaussian noise will suffice for optimization purposes : we optimize via pushing down an upper bound , and constant offsets will not affect this . Thus , if we had H [ ] , 0 , even though I [ X ; Z | Y ] + H [ Z | X ] 6≤ H [ Z | Y ] , we could instead use I [ X ; Z | Y ] + H [ Z | X ] − H [ ] ≤ H [ Z | Y ] − H [ ] as upper bound to minimize . The gradients remain the same . This also points to the nature of differential entropies as lacking a proper point of origin by themselves . We choose one by fixing H [ ] . Just like other literature usually only considers mutual information as meaningful , we consider H [ Z | X ] − H [ ] as more meaningful than H [ Z | X ] . However , we can side-step this discussion conveniently by picking a canonical noise as point of origin in the form of zero-entropy noise H [ ] = 0 . F.2 Upper bounds We derive this result as follows : H [ Z | Y ] = Ep̂ ( y ) H [ Z | y ] ≤ Ep̂ ( y ) 12 ln det ( 2πe Cov [ Z | y ] ) ≤ Ep̂ ( y ) ∑ i 1 2 ln ( 2πe Var [ Zi | y ] ) ≈ Ep̂ ( y ) ∑ i 1 2 ln ( 2πe V̂ar [ Zi | y ] ) , Theorem 3 . Given a k-dimensional random variable X = ( Xi ) ki=1 with Var [ Xi ] > 0 for all i , H [ X ] ≤ 12 ln det ( 2πe Cov [ X ] ) ≤ ∑ i 1 2 ln ( 2πe Var [ Xi ] ) . Proof . First , the multivariate normal distribution with same covariance is the maximum entropy distribution for that covariance , and thus H [ X ] ≤ ln det ( 2πe Cov [ X ] ) , when we substitute the differential entropy for a multivariate normal distribution with covariance Cov [ X ] . Let Σ0 : = Cov [ X ] be the covariance matrix and Σ1 : = diag ( Var [ Xi ] ) i the matrix that only contains the diagonal . Because we add independent noise , Var [ Xi ] > 0 and thus Σ−11 exists . It is clear that tr ( Σ −1 1 Σ0 ) = k. Then , we can use the KL-Divergence between two multivariate normal distributions N0 , N1 with same mean 0 and covariances Σ0 and Σ1 to show that ln det Σ0 ≤ ln det Σ1 : 0 ≤ DKL ( N0 || N1 ) = 12 ( tr ( Σ−11 Σ0 ) − k + ln ( det Σ1 det Σ0 ) ) ⇔ 0 ≤ 12 ln ( det Σ1 det Σ0 ) ⇔ 12 ln det Σ0 ≤ 1 2 ln det Σ1 . We substitute the definitions of Σ0 and Σ1 , and obtain the second inequality after adding k ln ( 2πe ) on both sides . Theorem 4 . Given a k-dimensional real-valued random variable X = ( Xi ) ki=1 ∈ Rk , we can bound the entropy by the mean squared norm of the latent : E ‖X‖2 ≤ C′ ⇒ H [ X ] ≤ C , ( 39 ) with C′ : = ke 2C/k 2πe . Proof . We begin with the previous bound : H [ X ] ≤ ∑ i 1 2 ln ( 2πe Var [ Xi ] ) = k 2 ln 2πe + 1 2 ln ∏ i Var [ Xi ] ≤ k2 ln 2πe + 1 2 ln 1k ∑ i Var [ Xi ] k = k2 ln 2πek ∑ i Var [ Xi ] ≤ k2 ln 2πe k E ‖X‖ 2 , where we use the AM-GM inequality : ∏ i Var [ Xi ] 1 k ≤ 1k ∑ i Var [ Xi ] and the monotony of the logarithm with : ∑ i Var [ Xi ] = ∑ i E [ X2i ] −E [ Xi ] 2 ≤ ∑ i E [ X2i ] = E ‖X‖2 Bounding using E ‖X‖2 ≤ C′ , we obtain H [ X ] ≤ k2 ln 2πe k C ′ = C , and solving for C′ yields the statement . This theorem provides justification for the use of lnE ‖Z‖2 as a regularizer , but does not justify the use of E ‖Z‖2 directly . Here , we give two motivations . We first observe that ln x ≤ x − 1 due to ln ’ s strict convexity and ln 1 = 0 , and thus : H [ X ] ≤ k2 ln 2πe k E ‖X‖ 2 = k2 ( ln 2πk E ‖X‖ 2 − 1 ) ≤ πE ‖X‖2 . We can also take a step back and remind ourselves that IB objectives are actually Lagrangians , and β in min I [ X ; Z ] − βI [ Y ; Z ] is introduced as Lagrangian multiplier for the constrained objective : min I [ X ; Z ] s.t . I [ Y ; Z ] ≥ C. We can similarly write our canonical DIB objective H [ Y | Z ] + β′′H [ Z ] as constrained objective min H [ Y | Z ] s.t . H [ Z ] ≤ C , and use above statement to find the approximate form min H [ Y | Z ] s.t . E ‖Z‖2 ≤ C′ . Reintroducing a Lagrangian multiplier recovers our reguralized E ‖Z‖2 objective : min H [ Y | Z ] + γE ‖Z‖2 . F.3 “ Deep Variational Information Bottleneck ” and E ‖Z‖2 Alemi et al . ( 2016 ) model pθ ( z | x ) explicitly as multivariate Gaussian with parameterized mean and parameterized diagonal covariance in their encoder and regularize it to become close to N ( 0 , Ik ) by minimizing the Kullback-Leibler divergence DKL ( pθ ( z | x ) || N ( 0 , Ik ) ) alongside the cross-entropy : min Hθ [ Y | Z ] + γDKL ( p ( z | x ) || r ( z ) ) , as detailed in section C.2 . We can expand the regularization term to DKL ( p ( z | x ) || N ( 0 , Ik ) ) = Ep̂ ( x ) Ep ( z|x ) h ( ( 2π ) − k 2 e− 1 2 ‖Z‖2 | ) − H [ Z | X ] = Ep ( z ) [ k 2 ln ( 2π ) + 1 2 ‖Z‖2 ] − H [ Z | X ] . After dropping constant terms ( as they don ’ t matter for optimization purposes ) , we obtain = 1 2 E ‖Z‖2 − H [ Z | X ] . When we inject zero-entropy noise into the latent Z , we have H [ Z | X ] ≥ 0 and thus E ‖Z‖2 − H [ Z | X ] ≤ E ‖Z‖2 . Thus , the E ‖Z‖2 regularizer also upper-bounds DVIB ’ s regularizer in this case . In particular , we have equality when we use a deterministic encoder . When we inject zero-entropy noise and use a deterministic encoder , we are optimizing the DVIB objective function when we use the E ‖Z‖2 regularizer . In other words , in this particular case , we could reinterpret “ min Hθ [ Y | Z ] + γE ‖Z‖2 ” as optimizing the DVIB objective from Alemi et al . ( 2016 ) if they were using a constant covariance instead of parameterizing it in their encoder . This does not hold for stochastic encoders . We empirically compare DVIB and the surrogate objectives from section 3.3 in section G.5 . In the corresponding plot in figure G.15 , we can indeed note thatE ‖Z‖2 and DVIB are separated by a factor of 2 in the Lagrange multiplier . F.4 Detailed Comparison to CEB , VCEB & DVIB In Fisher ( 2019 ) , the introduced CEB objective `` min I [ X ; Z | Y ] − γI [ Y ; Z ] '' is rewritten to `` min γH [ Y | Z ] + H [ Z | Y ] − H [ Z | X ] '' similar to the IB objective in proposition 1 in section 3.1 . However , these atomic quantities are not separately examined in detail . Both Alemi et al . ( 2016 ) and Fischer ( 2020 ) focus on the application of variational approximations to these quantities . Using a slight abuse of notation to denote all variational approximations , we can write the VCEB objective13 ( Fischer , 2020 ) and the DVIB objective ( Alemi et al. , 2016 ) more concisely as VCEB ≡ min θ Hθ [ Y | Z ] + β′ ( Hθ [ Z | Y ] − Hθ [ Z | X ] ) , DVIB ≡ min θ Hθ [ Y | Z ] + β′′ ( Hθ [ Z ] − Hθ [ Z | X ] ) . DVIB does not specify how to choose stochastic encoders and picks the variational marginal q ( z ) to be a unit Gaussian . We relate how this choice of marginal relates to the E ‖Z‖2 surrogate objective in section F.3 . Alemi et al . ( 2016 ) use VAE-like encoders that output mean and standard deviation for latents that are then sampled from a multivariate Gaussian distribution with diagonal covariance in their experiments . They run experiments on MNIST and on features extracted from the penultimate layer of pretrained models on ImageNet . While VCEB as introduced in Fisher ( 2019 ) is agnostic to the choice of stochastic encoder , Fischer ( 2020 ) mention that stochastic encoders can be similar to encoders and decoders in VAEs ( Kingma and Welling , 2013 ) or like in DVIB mentioned above . Both VAEs and DVIB explicitly parameterize the distribution of the latent to sample from it before passing samples to the decoder . Fischer and Alemi ( 2020 ) use an existing classifier architecture to output means for a Gaussian distribution with unit diagonal covariance . They further parameterize the variational approximation for the Reverse Decoder Uncertainty q ( y | z ) with one Gaussian of fixed variance per class and learn this reverse decoder during training as well . Fischer and Alemi ( 2020 ) report results on CIFAR-10 and ImageNet that show good robustness against adversarial attacks without adversarial training , similar to the results in this paper . 13We will not examine the original objective without Lagrange multipliers from Fisher ( 2019 ) here . This specific ( and not motivated ) instantiation of the VCEB objective in Fischer and Alemi ( 2020 ) is similar to the log Var [ Z | Y ] surrogate objective introduced in section 3.3 with a deterministic encoder and zero-entropy noise injection . However , the latter uses minibatch statistics instead of learning a reverse decoder , trading variational tightness for ease of computation and optimization . Compared to this prior literature , this paper examines the usage of implicit stochastic encoders ( for example when using dropout ) and presents three different simple surrogate objectives together with a principled motivation for zero-entropy noise injection , which has a dual use in enforcing meaningful compression and in simplifying the estimation of information quantities . Moreover , multi-sample approaches are examined to differentiate between Decoder Cross-Entropy and Prediction CrossEntropy . In particular , implicit stochastic encoders together with zero-entropy noise and simple surrogates make it easier to use IB objectives in practice compared to using explicitly parameterized stochastic encoders and variational approaches . F.5 An information-theoretic approach to VAEs While Alemi et al . ( 2016 ) draw a general connection to β-VAEs ( Higgins et al. , 2016 ) , we can use the insights from this paper to derive a simple VAE objective . Taking the view that VAEs learn latent representations that compress input samples , we can approach them as entropy estimators . Using H [ X ] + H [ Z | X ] = H [ X | Z ] + H [ Z ] , we obtain the ELBO H [ X ] = H [ X | Z ] + H [ Z ] − H [ Z | X ] ( 1 ) ≤ Hθ [ X | Z ] + H [ Z ] − H [ Z | X ] ( 2 ) ≤ Hθ [ X | Z ] + H [ Z ] . ( 40 ) We can also put eq . ( 40 ) into words : we want to find latent representations such that the reconstruction cross-entropy H [ X | Z ] and the latent entropy H [ Z ] , which tell us about the length encoding an input sample , become minimal and approach the true entropy as average optimal encoding length of the dataset distribution . The first inequality ( 1 ) stems from introducing a cross-entropy approximation Hθ [ X | Z ] for the conditional entropy H [ X | Z ] . The second inequality ( 2 ) stems from injection of zero-entropy noise with a stochastic encoder . For a deterministic encoder , we would have equality . We also note that ( 1 ) is the DVIB objective for a VAE with β = 1 , and ( 2 ) is the DIB objective for a VAE . Finally , we can use one of the surrogates introduced in section 3.3 to upper bound H [ Z ] . For optimization purposes , we can substitute the L2 activation regularizer E ‖Z‖2 from proposition 4 and obtain as objective min θ Hθ [ X | Z ] +E ‖Z‖2 . It turns out that this objective is examined amongst others in the recently published Ghosh et al . ( 2019 ) as a CV-VAE , which uses a deterministic encoder and noise injection with constant variance . The paper derives this objective by noticing that the explicit parameterizations that are commonly used for VAEs are cumbersome , and the actual latent distribution does often not necessarily match the induced distribution ( commonly a unit Gaussian ) which causes sampling to generate out-of-distribution data . It fits a separate density estimator on p ( z ) after training for sampling . The paper goes on to then examine other methods of regularization , but also provides experimental results on CV-VAE , which are in line with VAEs and WAEs . The derivation and motivation in the paper is different and makes no use of information-theoretic principles . Our short derivation above shows the power of using the insights from section 3.2 and 3.3 for applications outside of supervised learning . F.6 Soft clustering by entropyMinimization with Gaussian noise Consider the problem of minimizing H [ Z | Y ] and H [ Y | Z ] , in the setting where Z = fθ ( X ) + ∼ N ( 0 , σ2 ) —i.e . the embedding Z is obtained by adding Gaussian noise to a deterministic function of the input . Let the training set be enumerated x1 , . . . , xn , with µi = fθ ( xi ) . Then the distribution of Z is given by a mixture of Gaussians with the following density , where d ( x , µi ) : = ‖x − µi‖/σ2 . p ( z ) ∝ 1 n n∑ i=1 exp ( −d ( z , µi ) ) Assuming that each xi has a deterministic label yi , we then find that the conditional distributions p ( y | z ) and p ( z | y ) are given as follows : p ( z | y ) ∝ 1 ny ∑ i : yi=y exp ( −d ( z , µi ) ) p ( y | z ) = ∑ i : yi=y p ( µi | z ) = ∑ i : yi=y p ( z | µi ) p ( µi ) p ( z ) = ∑ i : yi=y p ( z | µi ) ∑n k=1 p ( z | µk ) = ∑ i : yi=y exp ( −d ( z , µi ) ) ∑n k=1 exp ( −d ( z , µk ) ) , where ny is the number of xi with class yi = y . Thus , the conditional Z|Y can be interpreted as a mixture of Gaussians and Y |Z as a Softmax marginal with respect to the distances between Z and the mean embeddings . We observe that H [ Z | Y ] is lower-bounded by the entropy of the random noise added to the embeddings : H [ Z | Y ] ≥ H [ fθ ( X ) + | Y ] ≥ H [ ] with equality when the distribution of fθ ( X ) |Y is deterministic – that is fθ is constant for each equivalence class . Further , the entropy H [ Y | Z ] is minimized when H [ Z ] is large compared to H [ Z | Y ] as we have the decomposition H [ Y | Z ] = H [ Z | Y ] − H [ Z ] + H [ Y ] . In particular , when fθ is constant over equivalence classes of the input , then H [ Y | Z ] is minimized when the entropy H [ fθ ( X ) + ] is large – i.e . the values of fθ ( xi ) for each equivalence class are distant from each other and there is minimal overlap between the clusters . Therefore , the optima of the information bottleneck objective under Gaussian noise share similar properties to the optima of geometric clustering of the inputs according to their output class . To gain a better understanding of local optimization behavior , we decompose the objective terms as follows : H [ Z | Y ] = Ep̂ ( y ) H ( p ( z | y ) || p ( z | y ) ) = Ep̂ ( x , y ) H ( p ( z | x ) || p ( z | y ) ) = Ep̂ ( x , y ) DKL ( p ( z | x ) || p ( z | y ) ) + H [ Z | x ] = Ep̂ ( x , y ) DKL ( p ( z | x ) || p ( z | y ) ) + H [ Z | X ] ︸ ︷︷ ︸ =const . To examine how the mean embedding µk of a single datapoint xk affects this entropy term , we look at the derivative of this expression with respect to µk = fθ ( xk ) . We obtain : d dµk H [ Z | Y ] = d dµk H [ Z | yk ] = d dµk Ep ( x|yk ) DKL ( p ( z | x ) || p ( z | y ) ) = ∑ i , i : yi=yk 1 nyk d dµk DKL ( p ( z | xi ) || p ( z | yk ) ) + 1 nyk d dµk DKL ( p ( z | xk ) || p ( z | yk ) ) . While these derivatives do not have a simple analytic form , we can use known properties of the KL divergence to develop an intuition on how the gradient will behave . We observe that in the left-hand sum µk only affects the distribution of Z|Y ( that is we are differentiating a sum of terms that look like a reverse KL ) , whereas it has greater influence on p ( z | xk ) in the right-hand term , and so its gradient will more closely resemble that of the forward KL . The left-hand-side term will therefore push µk towards the centroid of the means of inputs mapping to y , whereas the right-hand side term is mode-seeking . F.7 A note on differential and discrete entropies The mutual information between two random variables can be defined in terms of the KL divergence between the product of their marginals and their joint distribution . However , the KL divergence is only well-defined when the Radon-Nikodym derivative of the density of the joint with respect to the product exists . Mixing continuous and discrete distributions—and thus differential and continuous entropies—can violate this requirement , and so lead to negative values of the “ mutual information ” . This is particularly worrying in the setting of training stochastic neural networks , as we often assume that an stochastic embedding is generated as a deterministic transformation of an input from a finite dataset to which a continuous perturbation is added . We provide an examples where naive computation without ensuring that the product and joint distributions of the two random variables have a well-defined Radon-Nikodym derivative yields negative mutual information . Let X ∼ U ( [ 0 , 0.1 ] ) , Z = X + R with R ∼ U ( { 0 , 1 } ) . Then I [ X ; Z ] = H [ X ] = log 110 ≤ 0 . Generally , given X as above and an invertible function f such that Z = f ( X ) , I [ X ; Z ] = H [ X ] and can thus be negative . In a way , these cases can be reduced to ( degenerate ) expressions of the form I [ X ; X ] = H [ X ] . We can avoid these cases by adding independent continuous noise . These examples show that not adding noise can lead to unexpected results . While they still yield finite quantities that bear a relation to the entropies of the random variables , they violate some of the core assumptions we have such that mutual information is always positive . G Experiment details G.1 DNN architectures and hyperparameters For our experiments , we use PyTorch ( Paszke et al. , 2019 ) and the Adam optimizer ( Kingma and Ba , 2014 ) . In general , we use an initial learning rate of 0.5 × 10−3 and multiply the learning rate by √ 0.1 whenever the loss plateaus for more than 10 epochs for CIFAR-10 . For MNIST and Permutation MNIST , we use an initial learning rate of 10−4 and multiply the learning rate by 0.8 whenever the loss plateaus for more than 3 epochs . Sadly , we deviate from this in the following experiments : when optimizing the decoder uncertainty for categorical Z for CIFAR-10 , we used 5 epochs patience for the decoder uncertainty objective and a initial learning rate of 10−4 . We do not expect this difference to affect the qualitative results mentioned in section E when comparing to other objectives . We also only used 5 epochs patience when comparing the two cross-entropies on CIFAR-10 in section 3.2 . As this was used for both sets of experiments , it does not matter . We train the experiments for creating the information plane plots for 150 epochs . The toy experiment ( figure 3 ) is trained for 20 epochs . All other experiments train for 100 epochs . We use a batchsize of 128 for most experiments . We use a batchsize of 32 for comparing the crossentropies for CIFAR-10 ( where we take 8 dropout samples each ) , and a batchsize of 16 for MNIST ( where we take 64 dropout samples each ) . For MNIST , we use a standard dropout CNN , following https : //github.com/pytorch/ examples/blob/master/mnist/main.py . For Permutation MNIST , we use a fully-connected model ( for experiments with categorical Z in section E ) : 784 × 1024 × 1024 ×C . For CIFAR-10 , we use a regular deterministic ResNet18 model ( He et al. , 2016a ) for the experiments in section E. ( As the model outputs a categorical distribution it becomes stochastic through that and we don ’ t need stochasticity in the weights . ) For the other experiments as well as the Imagenette experiments , we use a ResNet18v2 ( He et al. , 2016b ) . When we need a stochastic model for CIFAR-10 ( for continuous Z ) , we add DropConnect ( Wan et al. , 2013b ) with rate 0.1 to all but the first convolutional layers and dropout with rate 0.1 before the final fully-connected layer . Because of memory issues , we reuse the dropout masks within one batch . The model trains to 94 % accuracy on CIFAR-10 . For CIFAR-10 , we always remove the maximum pooling layer and change the first convolutional layer to have kernel size 3 with stride 1 and padding 1 . We also use dataset augmentation during training , but not during evaluation on the training set and test set for purposes of computing metrics . We crop randomly after the padding the training images by 4 pixels in every direction and randomly flip images horizontally . We generally sample 30 values of γ for the information plane plots from the specified ranges , using a log scale . For the ablation studies mentioned below , we sample 10 values of γ each . We always sample γ = 0 separately and run a trial with it . Baselines were tuned by hand ( without regularization ) using grad-student descent and small grid searches . G.2 Cluster setup & used resources We make use of a local SLURM cluster ( Jette et al. , 2002 ) . We run our experiments on GPUs ( Geforce RTX 2080 Ti ) . We estimate reproducing all results would take 94 GPU days . G.3 Comparison of the surrogate objectives 0 0.5 1 1.5 2 H θ [ Y |Z ] I [ Y ; X |Z ] log Var [ Z ] log Var [ Z | Y ] EZ2 T rain S et 50 100 300 0 0.5 1 1.5 2 50 100 300 50 100 300 Preserved Information I [ X ; Z ] T est S et Figure G.1 : Information Plane Plot of the latent Z similar to Tishby and Zaslavsky ( 2015 ) but using a ResNet18 model on CIFAR-10 using the different regularizes from section 3.3 ( without dropout , but with zero-entropy noise ) . The dots are colored by γ . See section 4 for more details . As can be seen in figure G.2 , the different surrogate regularizers have very similar effects on H [ Z ] and H [ Z | Y ] . Regularizing with E ‖Z‖2 shows a stronger initial regularization effect , but is difficult to compare quantitatively as its hyperparameter does not map to an equivalent β , unlike regularizing using entropy estimates . Overall , we find log Var [ Z ] to provide stable training trajectories ( and expected visualizations ) while also having a more meaningful hyperparameter than E ‖Z‖2 , though E ‖Z‖2 is trivial to implement and communicate14 . log Var [ Z | Y ] performs worse which we hypothesize is due to the increased variance ( given equal batch sizes ) from conditioning on Y . It further does not minimize the Preserved Information I [ X ; Z ] as strongly as the other regularizers . G.3.1 Measurement of information quantities Measuring information quantities can be challenging . As mentionend in the introduction , there are many complex ways of measuring entropies and mutual information terms . We can side-step the issue by making use of the bounds we have established and the zero-entropy noise we are injecting , and design experiments around that . First , to estimate the Preserved Information I [ X ; Z ] , we note that when we use a deterministic model as encoder and only inject zero-entropy noise , we have H [ Z | X ] = 0 and I [ X ; Z ] = I [ X ; Z ] + H [ Z | X ] = H [ Z ] . We use the entropy estimator from Kraskov et al . ( 2004 , equation ( 20 ) ) to estimate the Encoding Entropy H [ Z ] and thus I [ X ; Z ] . 14Which is the reason why we showcase it in figure 1 and in equation ( 1 ) . 100 150 200 250 log Var [ Z ] γ 10−6 10−4 10−2 1 log Var [ Z | Y ] EZ2 H [ Z ] 0 50 100 150 500 1000 1500 2000 0 50 100 1500 50 100 150 Epoch E Z 2 Figure G.2 : Entropy estimates while training with different γ and with different surrogate regularizers on CIFAR-10 with a ResNet18 model . Entropies are estimated on training data based on Kraskov et al . ( 2004 ) . Qualitatively all three regularizers push H [ Z ] and H [ Z | Y ] down . H [ Z | Y ] is not shown here because it always stays very close to H [ Z ] . E ‖Z‖2 tends to regularize entropies more strongly for small γ . See section 4 for more details . To estimate the Residual Information I [ X ; Y | Z ] , we similarly note that I [ X ; Y | Z ] = I [ X ; Y | Z ] + H [ Y | X ] = H [ Y | Z ] . Instead of estimating the entropy using Kraskov et al . ( 2004 ) , we can use the Decoder Cross-Entropy Hθ [ Y | Z ] which provides a tighter bound as long as we also minimize Hθ [ Y | Z ] as part of the training objective . When we use stochastic models as encoder , we can not easily compute I [ X ; Z ] anymore . In the ablation study in the next section , we thus change the X axis accordingly . Similarly , when we look at the trajectories on the test set instead of the training set , for example in figure G.4 , we change the Y axis to signify the Decoder Uncertainty Hθ [ Y | Z ] . It is still an upper-bound , but we do not minimize it directly anymore . For the plots in figure 6 , we retrained the decoder on the test set to obtain a tighter bound on H [ Y | Z ] ( while keeping the encoder fixed ) . We then sampled the latent using the test set to estimate the trajectories . We only did this for the CIFAR-10 model without dropout . For our ablations , we did not retrain the decoder and thus only present plots on the test and training set , respectively . At this point , it is important to recall that the Decoder Uncertainty is also the negative log-likelihood ( when training with a single dropout sample ) , which provides a different perspective on the plots . It makes it clear that we can see how much a model overfits by comparing the best and final epochs of a trajectory in the plot ( marked by a circle and a square , respectively ) . G.3.2 Ablation study We perform an ablation study to determine whether injecting noise is necessary . Furthermore , we investigate the more interesting case of using a stochastic model as encoder , and if we can use a stochastic model without injecting zero-entropy noise . We also investigate whether log Var [ Z | Y ] performs better when we increase batchsize as we hypothesized that a batchsize of 128 does not suffice as it leaves only ≈ 13 samples per class to approximate H [ Z | Y ] ) . Figure G.3 shows a larger version of figure 6 for all three regularizers and also training trajectories on the test set . As described in the previous section , this allows us to validate that the regularizers prevent overfitting on the training set : with increasing γ , the model overfits less . Figure G.6 and figure G.5 shows that injecting noise is necessary independently of whether we use dropout or not . Regularizing with E ‖Z‖2 still has a very weak effect . We hypothesize that , similar to the toy experiment depicted in figure 3 , floating-point precision issues might provide a natural noise source eventually . This would change the effectiveness of γ and might require much higher values to observe similar regularization effects as when we do inject zero-entropy noise . Figure G.4 shows trajectories for a stochastic encoder ( as described above with DropConnect/dropout rate 0.1 ) . It overfits less than a deterministic one . Figure G.7 shows the effects of using higher dropout rates ( using DropConnect/dropout rates of 0.3/0.5 ) . It overfits less than model with DropConnect/dropout rates of 0.1/0.1 . The plots in figure G.10 show the effects of different γ with different regularizers more clearly . On both training and test set , one can clearly see the effects of regularization . Overall , log Var [ Z | Y ] performs worse as a regularizer . In figure G.8 , we compare the effect of doubling batchsize . Indeed , log Var [ Z | Y ] performs better with higher batchsize and looks closer to log Var [ Z ] . G.3.3 Comparison between Decoder Cross-Entropy and Prediction Cross-Entropy When training deterministic models or dropout models with a single sample ( as one usually does ) , the estimators for both the Decoder Cross-Entropy Hθ [ Y | Z ] and the Prediction Cross-Entropy Hθ [ Y | X ] coincide . In section 3.2 , we discuss the differences from a theoretical perspective . Here , we empirically evaluate the difference between optimizing the estimators for each of the two crossentropy losses , for which we will draw multiple dropout samples during training and inference . We examine models with continuous Z on MNIST and CIFAR-10 ( Lecun et al. , 1998 ; Krizhevsky et al. , 2009 ) . Specifically , we use a standard dropout CNN as an encoder for MNIST , and a modified ResNet18 to which we add DropConnect in each layer for CIFAR-10 . We use K = 100 dimensions for the continuous latent Z in the last fully-connected layer , and use a linear decoder to obtain the final 10-dimensional output of class logits . For MNIST , we compute the cross-entropies using 64 dropout samples ; for CIFAR-10 , we use 8 . For the purpose of this examination of training behavior , it is not necessary to achieve SOTA accuracy : our models obtain 99.2 % accuracy on MNIST and 93.6 % on CIFAR-10 . Figure G.11 shows the training error probability as well as the value of each cross-entropy loss for models trained either with the Decoder Cross-Entropy or the Prediction Cross-Entropy . The Decoder Cross-Entropy Hθ [ Y | Z ] outperforms Prediction Cross-Entropy Hθ [ Y | X ] as a training objective : the training error probability and both cross-entropies are lower when minimizing Hθ [ Y | Z ] compared to minimizing Hθ [ Y | X ] . We compare only the training , rather than the test , losses of the models to isolate the effect of each loss term on training performance ; we leave the prevention of overfitting to the regularization terms considered later . Recently , Dusenberry et al . ( 2020 ) also observed empirically that the Decoder Cross-Entropy Hθ [ Y | Z ] as an objective is both easier to optimize and provides better generalization performance . G.4 Differential entropies and noise We demonstrate the importance of adding noise to continuous latents by constructing a pathological sequence of parameters which attain monotonically improving and unbounded regularized objective values ( H [ Z ] ) while all computing the same function . We use MNIST with a standard dropout CNN as encoder , with K = 128 continuous dimensions in Z , and a K × 10 linear layer as decoder . After every training epoch , we decrease the entropy of the latent by normalizing and then scaling the latent to bound the entropy . We multiply the weights of the decoder to not change the overall function . As can be seen in figure 3 , without noise , entropy can decrease freely during training without change in error rate until it is affected by floating-point issues ; while when adding zero-entropy noise , the error rate starts increasing gradually and meaningfully as the entropy starts to approach zero . We conclude that entropy regularization is meaningful only when noise is added to the latent . G.5 Comparison between DVIB and surrogate objectives on Permutation-MNIST Comparing DVIB and our surrogate objectives is not straightforward because DVIB uses a VAE-like model that explicitly parameterize mean and standard deviation of the latent whereas the stochastic models we focus on in section 3.2 and beyond are implicit by using dropout . For this comparison , we use the same architecture and optimization strategy for DVIB as described in Alemi et al . ( 2016 ) : the encoder is a ReLU-MLP of the form 796 − 1024 − 1024 − 2K with K=256 latent dimensions that outputs mean and standard deviation explicitly and separately . For the standard deviation , we use a softplus transform with a bias of −5 . We use Polyak averaging with a decay constant of 0.999 ( Polyak and Juditsky , 1992 ) . We train the model for 200 epochs with Adam with learning rate 10−4 , β1 = 0.5 , β2 = −.999 ( Kingma and Ba , 2014 ) and decay the learning rate by 0.97 every 2 epochs . The marginal is fixed to a unit Gaussian around the origin . We use a softmax layer as decoder . We use 12 latent samples during training and test time . For our surrogate objectives , we use a similar ReLU-MLP of the form 796 − 1024 − 1024 − K with K=256 latent dimensions and dropout layers of rate 0.3 after the first and second layer . We use also 12 dropout samples during training and test time . We train for 75 epochs with Adam and learning rate 0.5 × 10−4 . We half the learning rate every time the loss does not decrease for 13 epochs . We run 5 trials for each experiments . We were not able to reproduce the baseline of an error of 1.13 % for β = 10−3 from Alemi et al . ( 2016 ) . We show a comparison in figure G.15 . Our methods do reach an error of 1.13 % overall though , so the simpler surrogate objectives perform as well good or better than DVIB . From section F.3 , we know that DVIB ’ s β would have to be twice the γ frm our section 3.3 . We can see this correspondence in the plot . This also implies that DVIB ’ s β is not related to the IB objective ’ s β from section 3 . This makes sense as DVIB arbitrarily fixes the marginal to be a unit Gaussian . 1 0 − 4 1 0 − 3 1 0 − 2 1 0 − 11 DecoderCross-EntropyHθ [ Y|Z ] ResidualInformationI [ X ; Y|Z ] lo g V a r [ Z ] γ 1 0 − 6 1 0 − 4 1 0 − 2 1 E p o ch 0 5 0 1 0 0 1 5 0 lo g V a r [ Z |Y ] E Z 2 W ei g h t D ec ay Train Set 0 .31 3 .0 Test Set 5 0 1 0 0 3 0 0 0 .3 0 .51 5 0 1 0 0 3 0 0 5 0 1 0 0 3 0 0 5 0 1 0 0 3 0 0 P re se rv ed In fo rm at io n I [ X ; Z ] IP Fi gu re G .3 : W ith ou td ro po ut bu tw ith ze ro -e nt ro py no is e : In fo rm at io n P la ne P lo to ft ra in in g tr aj ec to ri es fo r R es N et 18 m od el s on C IF A R -1 0 an d di ff er en tr eg ul ar iz er s. Th e tra je ct or ie s ar e co lo re d by th ei rr es pe ct iv e γ ; t he ir tra ns pa re nc y ch an ge s by ep oc h. C om pr es si on ( P re se rv ed In fo rm at io n ↓ ) tra de soff w ith pe rf or m an ce ( R es id ua l In fo rm at io n ↓ ) .S ee se ct io n 4 . T he ci rc le m ar ks th e fin al ep oc h of a tr aj ec to ry .T he sq ua re m ar ks th e be st ep oc h ( R es id ua lI nf or m at io n ) . 1 0 − 2 1 0 − 11 DecoderCross-EntropyHθ [ Y|Z ] ResidualInformationI [ Y ; X|Z ] lo g V a r [ Z ] γ 1 0 − 6 1 0 − 4 1 0 − 2 1 E p o ch 0 5 0 1 0 0 1 5 0 lo g V a r [ Z |Y ] E Z 2 Train Set 5 0 1 0 0 3 0 0 0 .3 0 .51 1 0 0 2 0 0 3 0 0 5 0 1 0 0 3 0 0 E n co d in g E n tr o py H [ Z ] Test Set Fi gu re G .4 : W ith dr op ou ta nd w ith ze ro -e nt ro py no is e : In fo rm at io n P la ne P lo to ft ra in in g tr aj ec to ri es fo r R es N et 18 m od el s on C IF A R -1 0 an d di ff er en tr eg ul ar iz er s. Th e tra je ct or ie s ar e co lo re d by th ei rr es pe ct iv e γ ; t he ir tra ns pa re nc y ch an ge s by ep oc h. C om pr es si on ( P re se rv ed In fo rm at io n ↓ ) tra de soff w ith pe rf or m an ce ( R es id ua l In fo rm at io n ↓ ) .S ee se ct io n 4 . T he ci rc le m ar ks th e fin al ep oc h of a tr aj ec to ry .T he sq ua re m ar ks th e be st ep oc h ( R es id ua lI nf or m at io n ) . 1 0 − 2 1 0 − 11 DecoderCross-EntropyHθ [ Y|Z ] ResidualInformationI [ Y ; X|Z ] lo g V a r [ Z ] γ 1 0 − 6 1 0 − 4 1 0 − 2 1 E p o ch 0 5 0 1 0 0 1 5 0 lo g V a r [ Z |Y ] E Z 2 Train Set -4 0 0 -2 0 0 0 2 0 0 0 .3 0 .51 -4 0 0 -2 0 0 0 2 0 0 -1 5 0 0 -1 0 0 0 -5 0 0 0 E n co d in g E n tr o py H [ Z ] Test Set Fi gu re G .5 : W ith dr op ou tb ut w ith ou tz er o- en tro py no is e : In fo rm at io n P la ne P lo to ft ra in in g tr aj ec to ri es fo r R es N et 18 m od el s on C IF A R -1 0 an d di ff er en tr eg ul ar iz er s. Th e tra je ct or ie s ar e co lo re d by th ei rr es pe ct iv e γ ; t he ir tra ns pa re nc y ch an ge s by ep oc h. C om pr es si on ( P re se rv ed In fo rm at io n ↓ ) tra de soff w ith pe rf or m an ce ( R es id ua l In fo rm at io n ↓ ) .S ee se ct io n 4 . T he ci rc le m ar ks th e fin al ep oc h of a tr aj ec to ry .T he sq ua re m ar ks th e be st ep oc h ( R es id ua lI nf or m at io n ) . 1 0 − 4 1 0 − 3 1 0 − 2 1 0 − 11 DecoderCross-EntropyHθ [ Y|Z ] ResidualInformationI [ Y ; X|Z ] lo g V a r [ Z ] γ 1 0 − 6 1 0 − 4 1 0 − 2 1 E p o ch 0 5 0 1 0 0 1 5 0 lo g V a r [ Z |Y ] E Z 2 Train Set -5 0 0 -2 5 0 0 2 5 0 0 .3 0 .51 -4 0 0 -2 0 0 0 2 0 0 -2 0 0 0 -1 5 0 0 -1 0 0 0 -5 0 0 0 P re se rv ed In fo rm at io n I [ X ; Z ] Test Set Fi gu re G .6 : W ith ou td ro po ut an d w ith ou tz er oen tr op y no is e : In fo rm at io n P la ne P lo to ft ra in in g tr aj ec to ri es fo r R es N et 18 m od el s on C IF A R -1 0 an d di ff er en t re gu la ri ze rs . T he tr aj ec to ri es ar e co lo re d by th ei r re sp ec tiv e γ ; th ei r tr an sp ar en cy ch an ge s by ep oc h. C om pr es si on ( P re se rv ed In fo rm at io n ↓ ) tr ad es -o ff w ith pe rf or m an ce ( R es id ua lI nf or m at io n ↓ ) .S ee se ct io n 4 . T he ci rc le m ar ks th e fin al ep oc h of a tr aj ec to ry .T he sq ua re m ar ks th e be st ep oc h ( R es id ua lI nf or m at io n ) . 0 .0 3 1 0 − 1 0 .31 DecoderCross-EntropyHθ [ Y|Z ] ResidualInformationI [ Y ; X|Z ] lo g V a r [ Z ] γ 1 0 − 6 1 0 − 4 1 0 − 2 1 E p o ch 0 5 0 1 0 0 1 5 0 lo g V a r [ Z |Y ] E Z 2 Train Set 5 0 1 0 0 3 0 0 0 .51 2 .0 1 0 0 2 0 0 3 0 0 5 0 1 0 0 3 0 0 E n co d in g E n tr o py H [ Z ] Test Set Fi gu re G .7 : W ith m or e dr op ou ta nd ze ro -e nt ro py no is e : In fo rm at io n P la ne P lo to ft ra in in g tr aj ec to ri es fo r R es N et 18 m od el s on C IF A R -1 0 an d lo g V ar [ Z |Y ] re gu la ri ze r w ith ba tc hs iz es 12 8 an d 25 6 . Th e tra je ct or ie s ar e co lo re d by th ei rr es pe ct iv e γ ; t he ir tra ns pa re nc y ch an ge s by ep oc h. C om pr es si on ( P re se rv ed In fo rm at io n ↓ ) tr ad es -o ff w ith pe rf or m an ce ( R es id ua lI nf or m at io n ↓ ) .S ee se ct io n 4 . T he ci rc le m ar ks th e fin al ep oc h of a tr aj ec to ry .T he sq ua re m ar ks th e be st ep oc h ( R es id ua l In fo rm at io n ) . A D ro pC on ne ct ra te of 0 . 3 an d dr op ou tr at e of 0 . 4 w er e us ed in st ea d of 0 . 1 fo re ac h. 1e-4 1e-3 1e-2 1e-1 1 D ec o d er C ro ss -E n tr o py H θ [ Y |Z ] R es id u al In fo rm at io n I [ Y ; X |Z ] log Var [ Z | Y ] ( Batchsize 128 ) γ 10−5 10−3 10−1 101 Epoch 0 50 100 150 log Var [ Z | Y ] ( Batchsize 256 ) T rain S et 50 100 300 0.3 1 3 100 200 300 Preserved Information I [ X ; Z ] T est S et Figure G.8 : Without dropout but with zero-entropy noise : Information Plane Plot of training trajectories for ResNet18 models on CIFAR-10 and log Var [ Z | Y ] regularizer with batchsizes 128 and 256 . The trajectories are colored by their respective γ ; their transparency changes by epoch . Compression ( Preserved Information ↓ ) trades-off with performance ( Residual Information ↓ ) . See section 4 . The circle marks the final epoch of a trajectory . The square marks the best epoch ( Residual Information ) . 0 0.5 1 1.5 2 H θ [ Y |Z ] I [ Y ; X |Z ] log Var [ Z ] log Var [ Z | Y ] EZ2 T rain S et 50 100 300 0 0.5 1 1.5 2 50 100 300 50 100 300 Encoding Entropy H [ Z ] T est S et Figure G.9 : Information Plane Plot of the latent Z similar to Tishby and Zaslavsky ( 2015 ) but using a ResNet18 model on CIFAR-10 using the different regularizes from section 3.3 ( with dropout and zero-entropy noise ) . The dots are colored by γ . See section 4 for more details . 0.01 0.1 1 10 100 N at s log Var [ Z ] Information Quantities Decoder Cross-Entropy Hθ [ Y |Z ] Encoding Entropy H [ Z ] log Var [ Z | Y ] EZ2 T rain S et 10−4 10−2 1 1 10 100 10−4 10−2 1 10−5 10−3 10−1 101 γ T est S et ( a ) With dropout and zero-entropy noise . 0.001 0.1 10 N at s log Var [ Z ] Information Quantities Decoder Cross-Entropy Hθ [ Y |Z ] Preserved Information I [ X ; Z ] log Var [ Z | Y ] EZ2 T rain S et 10−4 10−2 1 1 10 100 10−4 10−2 1 10−5 10−3 10−1 101 γ T est S et ( b ) Without dropout but with zero-entropy noise . -2000 -1500 -1000 -500 0 N at s log Var [ Z ] Information Quantities Decoder Cross-Entropy Hθ [ Y |Z ] Preserved Information I [ X ; Z ] log Var [ Z | Y ] EZ2 T rain S et 10−4 10−2 1 -1500 -1000 -500 0 10−4 10−2 1 10−5 10−3 10−1 γ T est S et ( c ) Without dropout and without zero-entropy noise . Figure G.10 : Information quantites for different γ at the end of training for ResNet18 models on CIFAR-10 and log Var [ Z | Y ] regularizer with batchsizes 128 and 256 . Compression ( Preserved Information ↓ ) trades-off with performance ( Residual Information ↓ ) . See section 4 . 1e-4 1e-3 1e-2 1e-1 N at s/ E rr or Test Set Objective minHθ [ Y |Z ] minHθ [ Y |X ] Metric Ep̂ ( x , y ) p ( ŷ 6= y ) Hθ [ Y |Z ] Hθ [ Y |X ] Train Set M N IS T 1e-6 1e-4 1e-2 P erm u tatio n M N IS T 0 25 50 75 100 0.001 0.01 0.1 1 0 25 50 75 100 Epoch C IFA R 1 0 Figure G.11 : Training error probability , Decoder Cross-Entropy Hθ [ Y | Z ] and Prediction CrossEntropy Hθ [ Y | X ] with continuous Z. K = 100 dimensions are used for Z , and we use dropout to obtain stochastic models . Minimizing Hθ [ Y | Z ] ( solid ) leads to smaller cross-entropies and lower training error probability than minimizing Hθ [ Y | X ] ( dashed ) . This suggests a better data fit , which is what we desire for a loss term . We run 8 trials each and plot the median with confidence bounds ( 25 % and 75 % quartiles ) . See section 3.2 and G.3.3 for more details . 0.03 10−1 0.3 1 D ec o d er C ro ss -E n tr o py H θ [ Y |Z ] R es id u al In fo rm at io n I [ Y ; X |Z ] EZ2 T rain S et γ 10−6 10−4 10−2 1 Epoch 0 50 100 150 70 100 200 Encoding Entropy H [ Z ] 0.3 0.5 1 T est S et Imagenette Figure G.12 : Information Plane Plot of the latent Z similar to Tishby and Zaslavsky ( 2015 ) but using a ResNet18v2 model on Imagenette using the E ‖Z‖2 surrogate obejctive from section 3.3 ( with dropout and zero-entropy noise ) . The dots are colored by γ . 0 0.25 0.50 0.75 1 A cc u ra cy log Var [ Z ] γ 10−6 10−4 10−2 1 log Var [ Z | Y ] EZ2 Weight Decay B asicIterative 0 0.25 0.50 0.75 1 D eep F o o l 0 0.25 0.50 0.75 1 F G S M 0 0.25 0.50 0.75 1 P G D 0.001 0.01 0.1 1 0 0.25 0.50 0.75 1 0.001 0.01 0.1 1 0.001 0.01 0.1 1 0.001 0.01 0.1 1 Epsilon R o b u stn ess Figure G.13 : Adversarial robustness of ResNet18 models trained on CIFAR-10 with surrogate objectives in comparison to regularization with L2 weight-decay as non-IB method for different attack strengths . The robustness is evaluated using FGSM , PGD , DeepFool and BasicIterative attacks of varying values . The dashed black line represents a model trained only with cross-entropy and no noise injection . We see that models trained with the surrogate IB objective ( colored by γ ) see improved robustness over a model trained only to minimize the cross-entropy training objective ( shown in black ) while the models regularized with weight-decay actually perform worse . 0 0 .2 5 0 .5 0 0 .7 51 Accuracy lo g V a r [ Z ] γ 1 0 − 6 1 0 − 4 1 0 − 2 1 lo g V a r [ Z |Y ] E Z 2 W ei g h t D ec ay BasicIterative 0 0 .2 5 0 .5 0 0 .7 51 DeepFool 0 0 .2 5 0 .5 0 0 .7 51 FGSM 0 0 .2 5 0 .5 0 0 .7 51 PGD 5 0 1 0 0 3 0 0 0 0 .2 5 0 .5 0 0 .7 51 5 0 1 0 0 3 0 0 5 0 1 0 0 3 0 0 5 0 1 0 0 3 0 0 P re se rv ed In fo rm at io n I [ X ; Z ] Robustness Fi gu re G .1 4 : Av er ag e ad ve rs ar ia lr ob us tn es s ov er ∈ [ 0 ,0 .1 ] o fR es N et 18 m od el s tr ai ne d on C IF A R -1 0 w ith su rr og at e ob je ct iv es in or L2 w ei gh t- de ca y ( a s no nIB m et ho d ) co m pa re d to no rm al ac cu ra cy fo r di ff er en ta m ou nt s of P re se rv ed In fo rm at io n. ◦ m ar ke rs sh ow ro bu st ne ss .× m ar ke rs sh ow th e no rm al ac cu ra cy .W e se e th at ro bu st ne ss de pe nd s on th e Pr es er ve d In fo rm at io n. If th e la te nt is co m pr es se se d to o m uc h , ro bu st ne ss ( a nd ac cu ra cy ) a re lo w .I ft he la te nt is no tc om pr es se d en ou gh , ro bu st ne ss an d th us ge ne ra liz at io n su ff er . 10−4 10−2 1 γ 10−2 10−1 1 T es t E rr or Regularizer log Var [ Z ] log Var [ Z | Y ] EZ2 DVIB Figure G.15 : Comparison of test error for different Lagrange multiplier for DVIB and surrogate objectives from section 3.3 on Permutation-MNIST . The purple strongly dashed line shows the test error reported for DVIB in Alemi et al . ( 2016 ) . 5 trials with 95 % confidence interval shown . Even though we could not reproduce the baseline reported in that paper , the simpler surrogate objective reach at least a similar test error as reported there . We also see that DVIB behaves similar to E ‖Z‖2 , but shifted by a factor 2 in γ , as predicted by section F.3 . H L a r g e V e r si o n o f t h e M ic k e y M o u se ID ia g r a m H ( Y |X ) Lab elU nce rta inty H ( Z|X ) En co din g U nc er ta int y I ( Y ; Z ) Pr es er ve d Re le va nt In fo rm at io n I ( X ; Y |Z ) Re sid ua l In fo rm at io n I ( X ; Z |Y ) Re du nd an t In fo rm at io n H ( Y| Z ) De co de r Un ce rta in ty H ( Z| Y ) Re ve rs e De co de r Un ce rta in ty H ( X| Y , Z ) I ( X ; Y ) Re le va nt In fo rm at io n I ( X ; Z ) Pr es er ve d In fo rm at io n Fi gu re H .1 : M ic ke y M ou se Idi ag ra m .S ee fig ur e 2 fo rd et ai ls . | The authors review the information bottleneck (IB) in the context of deep learning. They discuss the obstacles to applying the IB (and a deterministic variant, the DIB) to modern datasets, review approaches to doing so, and introduce their own scalable approach. Their approach introduces practical surrogate objectives for the information regularizer term, and uses dropout as the source of stochasticity. They take advantage of the scalability of their method to train a ResNet with (D)IB on MNIST, CIFAR-10, and ImageNette and study adversarial robustness and evolution in the information plane. | SP:387bec1eff17597a83cf7174a59e8082cd1b32ba |
Unpacking Information Bottlenecks: Surrogate Objectives for Deep Learning | 1 Introduction The Information Bottleneck ( IB ) principle , introduced by Tishby et al . ( 2000 ) , proposes that training and generalization in deep neural networks ( DNNs ) can be explained by information-theoretic principles ( Tishby and Zaslavsky , 2015 ; Shwartz-Ziv and Tishby , 2017 ; Achille and Soatto , 2018a ) . This is attractive as the success of DNNs remains largely unexplained by tools from computational learning theory ( Zhang et al. , 2016 ; Bengio et al. , 2009 ) . The IB principle suggests that learning consists of two competing objectives : maximizing the mutual information between the latent representation and the label to promote accuracy , while at the same time minimizing the mutual information between the latent representation and the input to promote generalization . Following this principle , many variations of IB objectives have been proposed ( Alemi et al. , 2016 ; Strouse and Schwab , 2017 ; Fischer and Alemi , 2020 ; Fischer , 2020 ; Fisher , 2019 ; Gondek and Hofmann , 2003 ; Achille and Soatto , 2018a ) , which , in supervised learning , have been demonstrated to benefit robustness to adversarial attacks ( Alemi et al. , 2016 ; Fisher , 2019 ) and generalization and regularization against overfitting to random labels ( Fisher , 2019 ) . Whether the benefits of training with IB objectives are due to the IB principle , or some other unrelated mechanism , remains unclear ( Saxe et al. , 2019 ; Amjad and Geiger , 2019 ; Tschannen et al. , 2019 ) , suggesting that although recent work has also tied the principle to successful results in both unsupervised and self-supervised learning ( Oord et al. , 2018 ; Belghazi et al. , 2018 ; Zhang et al. , 2018 ; Burgess et al. , 2018 , among others ) , our understanding of how IB objectives affect representation learning remains unclear . Critical to studying this question is the computation of the information-theoretic quantities1 used . While progress has been made in developing mutual information estimators for DNNs ( Poole et al. , 2019 ; Belghazi et al. , 2018 ; Noshad et al. , 2019 ; McAllester and Stratos , 2018 ; Kraskov et al. , 2004 ) , current methods still face many limitations when concerned with high-dimensional random variables ( McAllester and Stratos , 2018 ) and rely on complex estimators or generative models . This presents a challenge to training with IB objectives . In this paper , we analyze information quantities and relate them to surrogate objectives for the IB principle which are more friendly to optimization , showing that complex or intractable IB objectives can be replaced with simple , easy-to-compute surrogates that produce similar performance and similar 1We shorten these to information quantities from now on . behaviour of information quantities over training . Sections 2 & 3 review commonly-used information quantities for which we provide mathematically grounded intuition via information diagrams and unify different IB objectives by identifying two key information quantities , Decoder Uncertainty H [ Y | Z ] and Reverse Decoder Uncertainty H [ Z | Y ] which act as the main loss and regularization terms in our unified IB objective . In particular , Section 3.2 demonstrates that using the Decoder Uncertainty as a training objective can minimize the training error , and shows how to estimate an upper bound on it efficiently for well-known DNN architectures . We expand on the findings of Alemi et al . ( 2016 ) in their variational IB approximation and demonstrate that this upper bound is equal to the commonly-used cross-entropy loss2 under dropout regularization . Section 3.3 examines pathologies of differential entropies that hinder optimization and proposes adding Gaussian noise to force differential entropies to become non-negative , which leads to new surrogate terms to optimize the Reverse Decoder Uncertainty . Altogether this leads to simple and tractable surrogate IB objectives such as the following , which uses dropout , adds Gaussian noise over the feature vectors f ( x ; η ) , and uses an L2 penalty over the noisy feature vectors : min θ E x , y∼p̂ ( x , y ) , ∼N η∼dropout mask [ − log p ( Ŷ = y | z = fθ ( x ; η ) + ) + γ ‖ fθ ( x ; η ) + ‖22 ] . ( 1 ) Section 4 describes experiments that validate our insights qualitatively and quantitatively on MNIST , CIFAR-10 and Imagenette , and shows that with objectives like the one in equation ( 1 ) we obtain information plane plots ( as in figure 1 ) similar to those predicted by Tishby and Zaslavsky ( 2015 ) . Our simple surrogate objectives thus induce the desired behavior of IB objectives while scaling to large , high-dimensional datasets . We present evaluations on CIFAR-10 and Imagenette images3 . Compared to existing work , we show that we can optimize IB objectives for well-known DNN architectures using standard optimizers , losses and simple regularizers , without needing complex estimators , generative models , or variational approximations . This will allow future research to make better use of IB objectives and study the IB principle more thoroughly . 2 Background Information quantities & information diagrams . We denote entropy H [ · ] , joint entropy H [ · , · ] , conditional entropy H [ · | · ] , mutual information I [ · ; · ] and Shannon ’ s information content h ( · ) ( Cover and Thomas , 2012 ; MacKay , 2003 ; Shannon , 1948 ) . We will further require the Kullback-Leibler divergence DKL ( · || · ) and cross-entropy H ( · || · ) . The definitions can be found in section A.1 . We will use differential entropies interchangeably with entropies : equalities between them are preserved in the differential setting , and inequalities will be covered in section 3.3 . 2This connection was assumed without proof by Achille and Soatto ( 2018a ; b ) . 3Recently , Fischer and Alemi ( 2020 ) report results on CIFAR-10 and ImageNet , see section F.4 . Information diagrams ( I-diagrams ) , like the one depicted in figure 2 , clarify the relationship between information quantities : similar to Venn diagrams , a quantity equals the sum of its parts in the diagram . Importantly , they offer a grounded intuition as Yeung ( 1991 ) show that we can define a signed measure µ * such that information quantities map to abstract sets and are consistent with set operations . We provide details on how to use I-diagrams and what to watch out for in section A.2 . Probabilistic model . We will focus on a supervised classification task that makes prediction Ŷ given data X using a latent encoding Z , while the provided target is Y . We assume categorical Y and Ŷ , and continuous X . Our probabilistic model based on these assumptions is as follows : p ( x , y , z , ŷ ) = p̂ ( x , y ) pθ ( z | x ) pθ ( ŷ | z ) . ( 2 ) Thus , Z and Y are independent given X , and Ŷ is independent of X and Y given Z . The data distribution p̂ ( x , y ) is only available to us as an empirical sample distribution . θ are the parameters we would like to learn . pθ ( z | x ) is the encoder from data X to latent Z , and pθ ( ŷ | z ) the decoder from latent Z to prediction Ŷ . Together , pθ ( z | x ) and pθ ( ŷ | z ) form the discriminative model pθ ( ŷ | x ) : pθ ( ŷ | x ) = Epθ ( z|x ) pθ ( ŷ | z ) . ( 3 ) We can derive the cross-entropy loss H ( p̂ ( y | x ) || pθ ( Ŷ = y | x ) ) ( Solla et al. , 1988 ; Hinton , 1990 ) by minimizing the Kullback-Leibler divergence between the empirical sample distribution p̂ ( x , y ) and the parameterized distribution pθ ( x ) pθ ( ŷ | x ) , where we set pθ ( x ) = p̂ ( x ) . See section D.1 . Mickey Mouse I-diagram . The corresponding I-diagram for X , Y , and Z is depicted in figure 2 . As some of the quantities have been labelled before , we try to follow conventions and come up with consistent names otherwise . Section B.1 provides intuitions for these quantities , and section B.2 lists all definitions and equivalences explicitly . For categorical Z , all the quantities in the diagram are positive , which allows us to read off inequalities from the diagram : only I [ X ; Y ; Z ] could be negative , but as Y and Z are independent given X , we have I [ Y ; Z|X ] = 0 , and I [ X ; Y ; Z ] = I [ Y ; Z ] −I [ Y ; Z|X ] = I [ Y ; Z ] ≥ 0 . Section 3.3 investigates how to preserve inequalities for continuous Z . 3 Surrogate IB & DIB objectives 3.1 IB Objectives Tishby et al . ( 2000 ) introduce the IB objective as a relaxation of a constrained optimization problem : minimize the mutual information between the input X and its latent representation Z while still accurately predicting Y from Z . An analogous objective which yields deterministic Z , the Deterministic Information Bottleneck ( DIB ) was proposed by Strouse and Schwab ( 2017 ) . Letting β be a Lagrange multiplier , we arrive at the IB and DIB objectives : min I [ X ; Z ] − βI [ Y ; Z ] for IB , and min H [ Z ] − βI [ Y ; Z ] for DIB . ( 4 ) This principle can be recast as a generalization of finding minimal sufficient statistics for the labels given the data ( Shamir et al. , 2010 ; Tishby and Zaslavsky , 2015 ; Fisher , 2019 ) : it strives for minimality and sufficiency of the latent Z. Minimality is achieved by minimizing the Preserved Information I [ X ; Z ] ; while sufficiency is achieved by maximizing the Preserved Relevant Information I [ Y ; Z ] . We defer an in-depth discussion of the IB principle to the appendix Section C.1 . We discuss the several variants of IB objectives , and justify our focus on IB and DIB , in Section C.2 . The information quantities that appear in the IB objective are not tractable to compute for the representations learned by many function classes of interest , including neural networks ; for example , Strouse and Schwab ( 2017 ) only obtain an analytical solution to their Deterministic Information Bottleneck ( DIB ) method for the tabular setting . Alemi et al . ( 2016 ) address this challenge by constructing a variational approximation of the IB objective , but their approach has not been applied to more complex datasets than MNIST variants . Belghazi et al . ( 2018 ) use a separate statistics network to approximate the mutual information , a computationally expensive strategy that does not easily lend itself to optimization . In this section , we introduce and justify tractable surrogate losses that are easier to apply in common deep learning pipelines , and which can be scaled to large and high-dimensional datasets . We begin by proposing the following reformulation of IB and DIB objectives . Proposition 1 . For IB , we obtain arg min I [ X ; Z ] − βI [ Y ; Z ] = arg min H [ Y | Z ] + β′ I [ X ; Z | Y ] ︸ ︷︷ ︸ =H [ Z|Y ] −H [ Z|X ] , ( 5 ) and , for DIB , arg min H [ Z ] − βI [ Y ; Z ] = arg min H [ Y | Z ] + β′H [ Z | Y ] = arg min H [ Y | Z ] + β′′H [ Z ] ( 6 ) with β′ : = 1 β−1 ∈ [ 0 , ∞ ) and β′′ : = 1 β ∈ [ 0 , 1 ) . The derivation can be found in section C.3 . In the next sections , we show that Decoder Uncertainty H [ Y | Z ] provides a loss term , which minimizes the training error , and DIB ’ s Reverse Decoder Uncertainty H [ Z | Y ] and IB ’ s Redundant Information I [ X ; Z | Y ] , respectively , provide a regularization term , which helps generalization . Another perspective can be found by relating the objectives to the Entropy Distance Metric introduced by MacKay ( 2003 ) , which we detail in section C.4 . 3.2 Decoder Uncertainty H [ Y | Z ] The Decoder Uncertainty H [ Y | Z ] is the first term in our reformulated IB and DIB objectives , and captures the data fit component of the IB principle . This quantity is not easy to compute directly for arbitrary representations Z , so we turn our attention to two related entities instead , where we use θ as subscript to mark dependence on the model : the Prediction Cross-Entropy , denoted Hθ [ Y | X ] ( more commonly known as the model ’ s cross-entropy loss ; see section D.1 ) , and the Decoder Cross-Entropy , denoted Hθ [ Y | Z ] . Noting that h ( x ) = − ln x , we define these terms as follows : Hθ [ Y | X ] : = H ( p̂ ( y | x ) || pθ ( Ŷ = y | x ) ) = Ep̂ ( x , y ) h ( Epθ ( z|x ) pθ ( Ŷ = y | z ) ) ( 7 ) Hθ [ Y | Z ] : = H ( p ( y | z ) || pθ ( Ŷ = y | z ) ) = Ep̂ ( x , y ) Epθ ( z|x ) h ( pθ ( Ŷ = y | z ) ) . ( 8 ) Jensen ’ s inequality yields Hθ [ Y | X ] ≤ Hθ [ Y | Z ] , with equality iff Z is a deterministic function of X . The notational similarity4 between Hθ [ Y | Z ] and H [ Y | Z ] is deliberately suggestive : this cross-entropy bounds the conditional entropy H [ Y | Z ] , as characterized in the following proposition . Proposition 2 . The Decoder Cross-Entropy provides an upper bound on the Decoder Uncertainty : H [ Y | Z ] ≤ H [ Y | Z ] + DKL ( p ( y | z ) || pθ ( ŷ | z ) ) = Hθ [ Y | Z ] , ( 9 ) and further bounds the training error : p ( “ Ŷ is wrong ” ) ≤ 1 − e−Hθ [ Y|Z ] = 1 − e− ( H [ Y|Z ] +DKL ( p ( y|z ) ||pθ ( ŷ|z ) ) ) . ( 10 ) Likewise , for Hθ [ Y | X ] and H [ Y | X ] . See section D.2 for a derivation . Hence , by bounding DKL ( p ( y | z ) || pθ ( ŷ | z ) ) , we can obtain a bound for the training error in terms of H [ Y | Z ] . We examine one way of doing so by using optimal decoders pθ ( ŷ | z ) : = p ( Y = ŷ | z ) for the case of categorical Z in section E. Alemi et al . ( 2016 ) use the Decoder Cross-Entropy bound in equation ( 9 ) to variationally approximate p ( y | z ) . We make this explicit by applying the reparameterization trick to rewrite the latent z as a parametric function of its input x and some independent auxiliary random variable η , i.e . fθ ( x , η ) D = z ∼ pθ ( z | x ) , yielding H [ Y | Z ] ≤ Hθ [ Y | Z ] = Ep̂ ( x , y ) Ep ( η ) h ( pθ ( Ŷ = y | z = fθ ( x ; η ) ) ) . ( 11 ) Equation ( 11 ) can be applied to many forms of stochastic regularization that turn deterministic models into stochastic ones , in particular dropout . This allows us to use modern DNN architectures as stochastic encoders . Dropout regularization When we interpret η as a sampled dropout mask for a DNN , DNNs that use dropout regularization ( Srivastava et al. , 2014 ) , or variants like DropConnect ( Wan et al. , 2013a ) , fit the equation above as stochastic encoders . Monte-Carlo dropout ( Gal and Ghahramani , 2016 ) , for example , even specifically estimates the predictive mean pθ ( ŷ | x ) from equation ( 3 ) . The following result extends the observation by Burda et al . ( 2015 ) that sampling yields an unbiased estimator for the Decoder Cross-Entropy Hθ [ Y | Z ] , while it only yields a biased estimator for the Prediction Cross-Entropy Hθ [ Y | X ] ( which it upper-bounds ) . 4This notation is compatible withV-Entropy introduced by Xu et al . ( 2020 ) . Corollary 1 . Let x , y , z and fθ be defined as previously , with η a sampled stochastic dropout mask . Then h ( pθ ( Ŷ = y | z = fθ ( x ; η ) ) ) evaluated for a single sample η is an unbiased estimator of the Decoder Cross-Entropy Hθ [ Y | Z ] , and an estimator of an upper bound on the Prediction CrossEntropy Hθ [ Y | X ] . This distinction between the Decoder Cross-Entropy and the Prediction Cross-Entropy has been observed in passing in the literature , but not made explicit . Multi-sample approaches like Multi-Sample Dropout ( Inoue , 2019 ) , for example , optimize Hθ [ Y | Z ] , while Importance Weighted Stochastic Gradient Descent ( Noh et al. , 2017 ) optimizes Hθ [ Y | X ] . Dusenberry et al . ( 2020 ) observe empirically in the different context of rank-1 Bayesian Neural Networks that optimizing Hθ [ Y | Z ] instead of Hθ [ Y | X ] is both easier and also yields better generalization performance ( NLL , accuracy , and ECE ) , while they also put forward an argument for why the stochastic gradients for Hθ [ Y | Z ] might benefit from lower variance . We empirically compare training with either cross-entropy in section G.3.3 and show results in figure G.11 in the appendix . We conclude this section by highlighting that H [ Y | Z ] is therefore already minimized in modern DNN architectures that use dropout together with a cross-entropy loss . This means that , at least for one half of our reformulation of the IB objective , we can apply off-the-shelf , scalable objectives and optimizers for its minimization . 3.3 Surrogates for the regularization terms In the previous section , we have examined how to tractably estimate the error minimization term H [ Y | Z ] . In this section , we will examine tractable optimization of the regularization terms H [ Z | Y ] and I [ X ; Z | Y ] , respectively . We discuss how to minimize entropies meaningfully and show how this unifies DIB and IB via the inequality I [ X ; Z | Y ] ≤ H [ Z | Y ] ≤ H [ Z ] before providing tractable upper-bounds for H [ Z | Y ] and H [ Z ] . Differential entropies In most cases , the latent Z is a continuous random variable in many dimensions . Unlike entropies on discrete probability spaces , differential entropies defined on continuous spaces are not bounded from below . This means that the DIB objective is not guaranteed to have an optimal solution and allows for pathological optimization trajectories in which the variance of the latent Z can be scaled to be arbitrarily small , achieving arbitrarily high-magnitude negative entropy . We provide a toy experiment demonstrating this in section G.4 . Intuitively , one can interpret this issue as being allowed to encode information in an arbitrarily-small real number using infinite precision , similar to arithmetic coding ( MacKay , 2003 ; Shwartz-Ziv and Tishby , 2017 ) 5 . In practice , due to floating point constraints , optimizing DIB naively will invariably end in garbage predictions and underflow as activations approach zero . It is therefore not desirable 5Conversely , MacKay ( 2003 ) notes that without upper-bounding the “ power '' Ep ( z ) Z2 , all information could be encoded in a single very large integer . for training . This is why Strouse and Schwab ( 2017 ) only consider analytical solutions to DIB by evaluating a limit for the tabular case . MacKay ( 2003 ) proposes the introduction of noise to solve this issue in the application of continuous communication channels . However , here we propose adding specific noise to the latent representation to lower-bound the conditional entropy of Z , which allows us to enforce non-negativity across all IB information quantities as in the discrete case and transport inequalities to the continuous case : for a continuous Ẑ ∈ Rk and independent noise , we set Z : = Ẑ+ ; the differential entropy then satisfies H [ Z ] = H [ Ẑ+ ] ≥ H [ ] ; and by using zero-entropy noise ∼ N ( 0 , 12πe Ik ) specifically , we obtain H [ Z ] ≥ H [ ] = 0 . Proposition 3 . After adding zero-entropy noise , the inequality I [ X ; Z | Y ] ≤ H [ Z | Y ] ≤ H [ Z ] also holds for continuous Z , and we can minimize I [ X ; Z | Y ] in the IB objective by minimizing H [ Z | Y ] or H [ Z ] , similarly to the DIB objective . Strictly speaking , zero-entropy noise is not necessary for optimizing the bounds : any Gaussian noise is sufficient , but zero-entropy noise is aesthetically appealing as it preserves inequalities from the discrete setting . In a sense , this propostion bounds the IB objective by the DIB objective . However , adding noise changes the optimal solutions : whereas DIB in Strouse and Schwab ( 2017 ) leads to hard clustering in the limit , adding noise leads to soft clustering when optimizing the DIB objective , as is the case with the IB objective . We show in section F.6 that minimizing the DIB objective with noise leads to soft clustering ( for the case of an otherwise deterministic encoder ) . Altogether , in addition to Shwartz-Ziv and Tishby ( 2017 ) , we argue that noise is essential to obtain meaningful differential entropies and to avoid other pathological cases as described further in section F.7 . It is not generally possible to compute H [ Z | Y ] exactly for continuous latent representations Z , but we can derive an upper bound . The maximum-entropy distribution for a given covariance matrix Σ is a Gaussian with the same covariance . Proposition 4 . The Reverse Decoder Uncertainty can be approximately bounded using the empirical variance V̂ar [ Zi | y ] : H [ Z | Y ] ≤ Ep̂ ( y ) ∑ i 1 2 ln ( 2πe Var [ Zi | y ] ) ≈ Ep̂ ( y ) ∑ i 1 2 ln ( 2πe V̂ar [ Zi | y ] ) , ( 12 ) where Zi are the individual components of Z. H [ Z ] can be bounded similarly . More generally , we can create an even looser upper bound by bounding the mean squared norm of the latent : E ‖Z‖2 ≤ C′ ⇒ H [ Z | Y ] ≤ H [ Z ] ≤ C , ( 13 ) with C′ : = ke 2C/k 2πe for Z ∈ Rk . See section F.2 for proof . Surrogate objectives These surrogate terms provide us with three different upper-bounds that we can use as surrogate regularizers . We refer to them as : conditional log-variance regularizer ( log Var [ Z | Y ] ) , log-variance regularizer ( log Var [ Z ] ) and activation L2 regularizer ( E ‖Z‖2 ) . We can now propose the main results of this paper : IB surrogate objectives that reduce to an almost trivial implementation using the cross-entropy loss and one of the regularizers above while adding zero-entropy noise to the latent Z. Theorem 1 . Let Z be obtained by adding a single sample of zero-entropy noise to a single sample of the output z of the stochastic encoder . Then each of the following objectives is an estimator of an upper bound on the IB objective . In particular , for the surrogate objective E ‖Z‖2 , we obtain : min H ( p ( y | z ) || pθ ( Ŷ = y | z ) ) + γ‖z‖2 ; ( 14 ) for log Var [ Z | Y ] : min H ( p ( y | z ) || pθ ( Ŷ = y | z ) ) + γEp̂ ( y ) ∑ i 1 2 ln ( 2πe V̂ar [ Zi | y ] ) ; ( 15 ) and for log Var [ Z ] : min H ( p ( y | z ) || pθ ( Ŷ = y | z ) ) + γ ∑ i 1 2 ln ( 2πe V̂ar [ Zi ] ) . ( 16 ) For the latter two surrogate regularizers , we can relate their coefficient γ to β′ , β′′ and β from section 3 . However , as regularizing E ‖Z‖2 does not approximate an entropy directly , its coefficient does not relate to the Lagrange multiplier of any fixed IB objective . We compare the performance of these objectives in section 4 . 0.001 0.01 0.1 1 0 0.25 0.50 0.75 1 A cc u ra cy EZ2 γ 10−6 10−4 10−2 1 0.001 0.01 0.1 1 Epsilon Weight Decay R o b u stn ess 0.001 0.01 0.1 1 0 0.25 0.50 0.75 1 A cc u ra cy EZ2 γ 10−6 10−4 10−2 1 0.001 0.01 0.1 1 Epsilon Weight Decay R o b u stn ess ( a ) Robustness for different attack strengths . The dashed black line represents a model trained only with cross-entropy and no noise injection . We see that models trained with the surrogate IB objective ( colored by γ ) see improved robustness over a model trained only to minimize the cross-entropy training objective ( shown in black ) while the models regularized with weight-decay actually perform worse . 50 100 300 0 0.25 0.50 0.75 1 A cc u ra cy EZ2 γ 10−6 10−4 10−2 1 50 100 300 Preserved Information I [ X ; Z ] Weight Decay ( b ) Average robustness over ∈ [ 0 , 0.1 ] compared to n rmal accuracy for different amounts of Preserved Information . ◦ markers show robustness . × markers show the normal accuracy . We see that robustness depends on the Preserved Information . If the latent is compressesed too much , robustness ( and accuracy ) are low . If the latent is not compressed enough , robustness and thus generalization suffer . Figure 5 : Adversarial robustness of ResNet18 models trained on CIFAR-10 with surrogate objectives in comparison to regularization with L2 weight-decay as non-IB method . The robustness is evaluated using FGSM , PGD , DeepFool and BasicIterative attacks of varying values . 4 Experiments We now provide empirical verification of the claims made in the previous sections . Our goal in this section is to highlight two main findings : first , that our surrogate objectives obtain similar behavior to what we expect of exact IB objectives with respect to their effect on robustness to adversarial examples . In particular , we show that our surrogate IB objectives improve adversarial robustness compared to models trained only on the cross-entropy loss , consistent with the findings of Alemi et al . ( 2016 ) . Second , we show the effect of our surrogate objectives on information quantities during training by plotting information plane diagrams , demonstrating that models trained with our objectives trade off between I [ X ; Z ] and I [ Y ; Z ] as expected . We show this by recovering information plane plots similar to the ones in Tishby and Zaslavsky ( 2015 ) and qualitatively examine the optimization behavior of the networks through their training trajectories . We demonstrate the scalability of our surrogate objectives by applying our surrogate IB objectives to the CIFAR-10 and Imagenette datasets , high-dimensional image datasets . For details about our experiment setup , DNN architectures , hyperparameters and additional insights , see section G. In particular , empirical quantification of our observations on the relationship between the Decoder Cross-Entropy loss and the Prediction Cross-Entropy are deferred to the appendix due to space limitations as well as the description of the toy experiment that shows that minimizing H [ Z | Y ] for continuous latent Z without adding noise does not constrain information meaningfully and that adding noise solves the issue as detailed in section 3.3 . Robustness to adversarial attacks Alemi et al . ( 2016 ) and Fischer and Alemi ( 2020 ) observe that their IB objectives lead to improved adversarial robustness over standard training objectives . We perform a similar evaluation to see whether our surrogate objectives also see improved robustness . We train a fully-connected residual network on CIFAR-10 for a range of regularization coefficients γ using our E ‖Z‖2 surrogate objective ; we then compare against a similar regularization method that does not have an information-theoretic interpretation : L2 weight-decay . We inject zero-entropy noise in both cases . After training , we evaluate the models on adversarially perturbed images using the FGSM ( Szegedy et al. , 2013 ) , PGD ( Madry et al. , 2018 ) , BasicIterative ( Kurakin et al. , 2017 ) and DeepFool ( Moosavi-Dezfooli et al. , 2016 ) attacks for varying levels of the perturbation magnitude parameter . We also compare to a simple unregularized cross-entropy baseline ( black dashed line ) . To compute overall robustness , we use each attack in turn and only count a sample as robust if it defeats them all . As depicted in figure 5 , we find that our surrogate objectives yield significantly more robust models while obtaining similar test accuracy on the unperturbed data whereas weight-decay regularization reduces robustness against adversarial attacks . Plots for the other two regularizers can be found in the appendix in figure G.13 and figure G.14 . Information plane plots for CIFAR-10 To compare the different surrogate regularizers , we again use a ResNet18 model on CIFAR-10 with zero-entropy noise added to the final layer activations Z , with K = 256 dimensions , as an encoder and add a single K × 10 linear unit as a decoder . We train with the surrogate objectives from section 3.3 for various γ , chosen in logspace from different ranges to compensate for their relationship to β as noted in section 3.3 : for log Var [ Z ] , γ ∈ [ 10−5 , 1 ] ; for log Var [ Z | Y ] , γ ∈ [ 10−5 , 10 ] ; and for E ‖Z‖2 , by trial and error , γ ∈ [ 10−6 , 10 ] . We estimate information quantities using the method of Kraskov et al . ( 2004 ) . Figure 6 shows an information plane plot for regularizing with E ‖Z‖2 for different γ over different epochs for the training set . Similar to Shwartz-Ziv and Tishby ( 2017 ) , we observe that there is an initial expansion phase followed by compression . The jumps in performance ( reduction of the Residual Information ) are due to drops in the learning rate . In figure 4 , we can see that the saturation curves for all 3 surrogate objectives qualitatively match the predicted curve from Tishby and Zaslavsky ( 2015 ) . Figure G.1 shows the difference between the regularizers more clearly , and figure G.3 shows the training trajectories for all three regularizers . More details in section G.3.1 . Information plane plots for Imagenette To show that our surrogate objectives also scale up to larger datasets , we run a similar experiment on Imagenette ( Howard , 2019 ) , which is a subset of ImageNet with 10 classes with 224 × 224 × 3 = 1.5 × 105 input dimensions , and on which we obtain 90 % test accuracy . See the figure 1 , which shows the trajectories on the test set . We obtain similar plots to the ones obtained for CIFAR-10 , showing that our surrogate objectives scale well to higher-dimensional datasets despite their simplicity . 5 Conclusion The contributions of this paper have been threefold : First , we have proposed simple , tractable training objectives which capture many of the desirable properties of IB methods while also scaling to problems of interest in deep learning . For this we have introduced implicit stochastic encoders , e.g . using dropout , and compared multi-sample dropout approaches to identify the one that approximates the Decoder Uncertainty Hθ [ Y | Z ] , relating them to the cross-entropy loss that is commonly used for classification problems . This widens the range of DNN architectures that can be used with IB objectives considerably . We have demonstrated that our objectives perform well for practical DNNs without cumbersome density models . Second , we have motivated our objectives by providing insight into limitations of IB training , demonstrating how to avoid pathological behavior in IB objectives , and by endeavouring to provide a unifying view on IB approaches . Third , we have provided mathematically grounded intuition by using I-diagrams for the information quantities involved in IB , shown common pitfalls when using information quantities and how to avoid them , and examined how the quantities relate to each other . Future work investigating the practical constraints on the expressivity of a given neural network may provide further insight into how to measure compression in neural networks . Moreover , the connection to Bayesian Neural Networks remains to be explored . References Alessandro Achille and Stefano Soatto . Emergence of invariance and disentanglement in deep representations . The Journal of Machine Learning Research , 19 ( 1 ) :1947–1980 , 2018a . Alessandro Achille and Stefano Soatto . Information dropout : Learning optimal representations through noisy computation . IEEE transactions on pattern analysis and machine intelligence , 40 ( 12 ) :2897–2905 , 2018b . Alexander A Alemi , Ian Fischer , Joshua V Dillon , and Kevin Murphy . Deep variational information bottleneck . arXiv preprint arXiv:1612.00410 , 2016 . Rana Ali Amjad and Bernhard Claus Geiger . Learning representations for neural network-based classification using the information bottleneck principle . IEEE Transactions on Pattern Analysis and Machine Intelligence , 2019 . Mohamed Ishmael Belghazi , Aristide Baratin , Sai Rajeshwar , Sherjil Ozair , Yoshua Bengio , Aaron Courville , and Devon Hjelm . Mutual information neural estimation . In International Conference on Machine Learning , pages 531–540 , 2018 . Yoshua Bengio et al . Learning deep architectures for ai . Foundations and trends R© in Machine Learning , 2 ( 1 ) :1–127 , 2009 . J-F Bercher and Christophe Vignat . A renyi entropy convolution inequality with application . In 2002 11th European Signal Processing Conference , pages 1–4 . IEEE , 2002 . Yuri Burda , Roger Grosse , and Ruslan Salakhutdinov . Importance weighted autoencoders . arXiv preprint arXiv:1509.00519 , 2015 . Christopher P. Burgess , Irina Higgins , Arka Pal , Loic Matthey , Nick Watters , Guillaume Desjardins , and Alexander Lerchner . Understanding disentangling in β-vae . arXiv preprint arXiv:1804.03599 , 2018 . Thomas M Cover and Joy A Thomas . Elements of information theory . John Wiley & Sons , 2012 . Michael W Dusenberry , Ghassen Jerfel , Yeming Wen , Yi-an Ma , Jasper Snoek , Katherine Heller , Balaji Lakshminarayanan , and Dustin Tran . Efficient and scalable bayesian neural nets with rank-1 factors . arXiv preprint arXiv:2005.07186 , 2020 . Ian Fischer . The conditional entropy bottleneck . arXiv preprint arXiv:2002.05379 , 2020 . Ian Fischer and Alexander A. Alemi . Ceb improves model robustness . Entropy , 22 ( 10 ) :1081 , Sep 2020 . ISSN 1099-4300. doi : 10.3390/e22101081 . URL http : //dx.doi.org/10.3390/ e22101081 . Ian Fisher . The Conditional Entropy Bottleneck . Submission to ICLR 2019 , International Conference on Learning Representations , 2019 . Yarin Gal and Zoubin Ghahramani . Dropout as a bayesian approximation : Representing model uncertainty in deep learning . In international conference on machine learning , pages 1050–1059 , 2016 . Partha Ghosh , Mehdi SM Sajjadi , Antonio Vergari , Michael Black , and Bernhard Schölkopf . From variational to deterministic autoencoders . arXiv preprint arXiv:1903.12436 , 2019 . David Gondek and Thomas Hofmann . Conditional information bottleneck clustering . In 3rd ieee international conference on data mining , workshop on clustering large data sets , pages 36–42 . Citeseer , 2003 . Ian J Goodfellow , Mehdi Mirza , Da Xiao , Aaron Courville , and Yoshua Bengio . An empirical investigation of catastrophic forgetting in gradient-based neural networks . arXiv preprint arXiv:1312.6211 , 2013 . Kaiming He , Xiangyu Zhang , Shaoqing Ren , and Jian Sun . Deep residual learning for image recognition . In Proceedings of the IEEE conference on computer vision and pattern recognition , pages 770–778 , 2016a . Kaiming He , Xiangyu Zhang , Shaoqing Ren , and Jian Sun . Identity mappings in deep residual networks . Lecture Notes in Computer Science , page 630–645 , 2016b . Irina Higgins , Loic Matthey , Arka Pal , Christopher Burgess , Xavier Glorot , Matthew Botvinick , Shakir Mohamed , and Alexander Lerchner . beta-vae : Learning basic visual concepts with a constrained variational framework . 2016 . Geoffrey E Hinton . Connectionist learning procedures . In Machine learning , pages 555–610 . Elsevier , 1990 . Neil Houlsby , Ferenc Huszár , Zoubin Ghahramani , and Máté Lengyel . Bayesian active learning for classification and preference learning . arXiv preprint arXiv:1112.5745 , 2011 . Jeremy Howard . Imagewang . 2019 . URL https : //github.com/fastai/imagenette/ . Hiroshi Inoue . Multi-sample dropout for accelerated training and better generalization . arXiv preprint arXiv:1905.09788 , 2019 . Morris A. Jette , Andy B. Yoo , and Mark Grondona . Slurm : Simple linux utility for resource management . In In Lecture Notes in Computer Science : Proceedings of Job Scheduling Strategies for Parallel Processing ( JSSPP ) 2003 , pages 44–60 . Springer-Verlag , 2002 . Diederik P Kingma and Jimmy Ba . Adam : A method for stochastic optimization . arXiv preprint arXiv:1412.6980 , 2014 . Diederik P Kingma and Max Welling . Auto-encoding variational bayes . arXiv preprint arXiv:1312.6114 , 2013 . Andreas Kirsch , Joost van Amersfoort , and Yarin Gal . Batchbald : Efficient and diverse batch acquisition for deep bayesian active learning . In Advances in Neural Information Processing Systems , pages 7024–7035 , 2019 . Alexander Kraskov , Harald Stögbauer , and Peter Grassberger . Estimating mutual information . Physical review E , 69 ( 6 ) :066138 , 2004 . Alex Krizhevsky , Geoffrey Hinton , et al . Learning multiple layers of features from tiny images . 2009 . Alexey Kurakin , Ian J Goodfellow , and Samy Bengio . Adversarial machine learning at scale . 2017 . Y. Lecun , L. Bottou , Y. Bengio , and P. Haffner . Gradient-based learning applied to document recognition . Proceedings of the IEEE , 86 ( 11 ) :2278–2324 , 1998 . David J. C. MacKay . Information Theory , Inference , and Learning Algorithms . Cambridge University Press , 2003 . Aleksander Madry , Aleksandar Makelov , Ludwig Schmidt , Dimitris Tsipras , and Adrian Vladu . Towards deep learning models resistant to adversarial attacks . In International Conference on Learning Representations , 2018 . David McAllester and Karl Stratos . Formal limitations on the measurement of mutual information . arXiv preprint arXiv:1811.04251 , 2018 . William McGill . Multivariate information transmission . Transactions of the IRE Professional Group on Information Theory , 4 ( 4 ) :93–111 , 1954 . Seyed-Mohsen Moosavi-Dezfooli , Alhussein Fawzi , and Pascal Frossard . Deepfool : a simple and accurate method to fool deep neural networks . In Proceedings of the IEEE conference on computer vision and pattern recognition , pages 2574–2582 , 2016 . Hyeonwoo Noh , Tackgeun You , Jonghwan Mun , and Bohyung Han . Regularizing deep neural networks by noise : Its interpretation and optimization . In Advances in Neural Information Processing Systems , pages 5109–5118 , 2017 . Morteza Noshad , Yu Zeng , and Alfred O Hero . Scalable mutual information estimation using dependence graphs . In ICASSP 2019-2019 IEEE International Conference on Acoustics , Speech and Signal Processing ( ICASSP ) , pages 2962–2966 . IEEE , 2019 . Aaron van den Oord , Yazhe Li , and Oriol Vinyals . Representation learning with contrastive predictive coding . arXiv preprint arXiv:1807.03748 , 2018 . Adam Paszke , Sam Gross , Francisco Massa , Adam Lerer , James Bradbury , Gregory Chanan , Trevor Killeen , Zeming Lin , Natalia Gimelshein , Luca Antiga , et al . Pytorch : An imperative style , high-performance deep learning library . In Advances in Neural Information Processing Systems , pages 8024–8035 , 2019 . Boris T Polyak and Anatoli B Juditsky . Acceleration of stochastic approximation by averaging . SIAM journal on control and optimization , 30 ( 4 ) :838–855 , 1992 . Ben Poole , Sherjil Ozair , Aaron van den Oord , Alexander A Alemi , and George Tucker . On variational bounds of mutual information . arXiv preprint arXiv:1905.06922 , 2019 . Andrew M Saxe , Yamini Bansal , Joel Dapello , Madhu Advani , Artemy Kolchinsky , Brendan D Tracey , and David D Cox . On the information bottleneck theory of deep learning . Journal of Statistical Mechanics : Theory and Experiment , 2019 ( 12 ) :124020 , 2019 . Ohad Shamir , Sivan Sabato , and Naftali Tishby . Learning and generalization with the information bottleneck . Theoretical Computer Science , 411 ( 29-30 ) :2696–2711 , 2010 . Claude E Shannon . A mathematical theory of communication . Bell system technical journal , 27 ( 3 ) : 379–423 , 1948 . Ravid Shwartz-Ziv and Naftali Tishby . Opening the black box of deep neural networks via information . arXiv preprint arXiv:1703.00810 , 2017 . Sara A. Solla , Esther Levin , and Michael Fleisher . Accelerated learning in layered neural networks . Complex Systems , 2 , 1988 . Nitish Srivastava , Geoffrey Hinton , Alex Krizhevsky , Ilya Sutskever , and Ruslan Salakhutdinov . Dropout : a simple way to prevent neural networks from overfitting . The journal of machine learning research , 15 ( 1 ) :1929–1958 , 2014 . DJ Strouse and David J Schwab . The deterministic information bottleneck . Neural computation , 29 ( 6 ) :1611–1630 , 2017 . Christian Szegedy , Wojciech Zaremba , Ilya Sutskever , Joan Bruna , Dumitru Erhan , Ian Goodfellow , and Rob Fergus . Intriguing properties of neural networks . arXiv preprint arXiv:1312.6199 , 2013 . Naftali Tishby and Noga Zaslavsky . Deep learning and the information bottleneck principle . In 2015 IEEE Information Theory Workshop ( ITW ) , pages 1–5 . IEEE , 2015 . Naftali Tishby , Fernando C Pereira , and William Bialek . The information bottleneck method . arXiv preprint physics/0004057 , 2000 . Michael Tschannen , Josip Djolonga , Paul K Rubenstein , Sylvain Gelly , and Mario Lucic . On mutual information maximization for representation learning . arXiv preprint arXiv:1907.13625 , 2019 . Li Wan , Matthew Zeiler , Sixin Zhang , Yann Le Cun , and Rob Fergus . Regularization of neural networks using dropconnect . In International conference on machine learning , pages 1058–1066 , 2013a . Li Wan , Matthew Zeiler , Sixin Zhang , Yann Le Cun , and Rob Fergus . Regularization of neural networks using dropconnect . In International conference on machine learning , pages 1058–1066 , 2013b . Yilun Xu , Shengjia Zhao , Jiaming Song , Russell Stewart , and Stefano Ermon . A theory of usable information under computational constraints . arXiv preprint arXiv:2002.10689 , 2020 . Raymond W Yeung . A new outlook on shannon ’ s information measures . IEEE transactions on information theory , 37 ( 3 ) :466–474 , 1991 . Chiyuan Zhang , Samy Bengio , Moritz Hardt , Benjamin Recht , and Oriol Vinyals . Understanding deep learning requires rethinking generalization . arXiv preprint arXiv:1611.03530 , 2016 . Ying Zhang , Tao Xiang , Timothy M Hospedales , and Huchuan Lu . Deep mutual learning . In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition , pages 4320– 4328 , 2018 . A Information quantities & information diagrams Here we introduce notation and terminology in greater detail than in the main paper . We review well-known information quantities and provide more details on using information diagrams ( Yeung , 1991 ) . A.1 Information quantities We denote entropy H [ · ] , joint entropy H [ · , · ] , conditional entropy H [ · | · ] , mutual information I [ · ; · ] and Shannon ’ s information content h ( · ) following Cover and Thomas ( 2012 ) ; MacKay ( 2003 ) ; Shannon ( 1948 ) : h ( x ) = − ln x H [ X ] = Ep ( x ) h ( p ( x ) ) H [ X , Y ] = Ep ( x , y ) h ( p ( x , y ) ) H [ X | Y ] = H [ X , Y ] − H [ Y ] = Ep ( y ) H [ X | y ] = Ep ( x , y ) h ( p ( x | y ) ) I [ X ; Y ] = H [ X ] + H [ Y ] − H [ X , Y ] = Ep ( x , y ) h ( p ( x ) p ( y ) p ( x , y ) ) I [ X ; Y | Z ] = H [ X | Z ] + H [ Y | Z ] − H [ X , Y | Z ] , where X , Y , Z are random variables and x , y , z are outcomes these random variables can take . We use differential entropies interchangeably with entropies . We can do so because equalities between them hold as can be verified by symbolic expansions . For example , H [ X , Y ] = H [ X | Y ] + H [ Y ] ⇔Ep ( x , y ) h ( p ( x , y ) ) = Ep ( x , y ) [ h ( p ( x | y ) ) + h ( p ( y ) ) ] = Ep ( x , y ) [ h ( p ( x | y ) ) ] +Ep ( y ) h ( p ( y ) ) , which is valid in both the discrete and continuous case ( if the integrals all exist ) . The question of how to transfer inequalities in the discrete case to the continuous case is dealt with in section 3.3 . We will further require the Kullback-Leibler divergence DKL ( · || · ) and cross-entropy H ( · || · ) : H ( p ( x ) || q ( x ) ) = Ep ( x ) h ( q ( x ) ) DKL ( p ( x ) || q ( x ) ) = Ep ( x ) h ( q ( x ) p ( x ) ) H ( p ( y | x ) || q ( y | x ) ) = Ep ( x ) Ep ( y|x ) h ( q ( y | x ) ) = Ep ( x , y ) h ( q ( y | x ) ) DKL ( p ( y | x ) || q ( y | x ) ) = Ep ( x , y ) h ( q ( y|x ) p ( y|x ) ) A.2 Information diagrams Information diagrams ( I-diagrams ) , like the one depicted in figure 2 ( or figure H.1 for a bigger version ) , visualize the relationship between information quantities : Yeung ( 1991 ) shows that we can define a signed measure µ * such that these well-known quantities map to abstract sets and are consistent with set operations . H [ A ] = µ * ( A ) H [ A1 , . . . , An ] = µ * ( ∪iAi ) H [ A1 , . . . , An | B1 , . . . , Bn ] = µ * ( ∪iAi − ∪iBi ) I [ A1 ; . . . ; An ] = µ * ( ∩iAi ) I [ A1 ; . . . ; An | B1 , . . . , Bn ] = µ * ( ∩iAi − ∪iBi ) Note that interaction information ( McGill , 1954 ) follows as canonical generalization of the mutual information to multiple variables from that work , whereas total correlation does not . In other words , equalities can be read off directly from I-diagrams : an information quantity is the sum of its parts in the corresponding I-diagram . This is similar to Venn diagrams . The sets used in I-diagrams are just abstract symbolic objects , however . An important distinction between I-diagrams and Venn diagrams is that while we can always read off inequalities in Venn diagrams , this is not true for I-diagrams in general because mutual information terms in more than two variables can be negative . In Venn diagrams , a set is always larger or equal any subset . However , if we show that all information quantities are non-negative , we can read off inequalities again . We do this for figure 2 at the end of section 2 for categorical Z and expand this to continuous Z in section 3.3 . Thus , we can treat the Mickey Mouse I-diagram like a Venn diagram to read off equalities and inequalities . Nevertheless , caution is warranted sometimes . As the signed measure can be negative , µ * ( X ∩ Y ) = 0 does not imply X ∩ Y = ∅ : deducing that a mutual information term is 0 does not imply that one can simply remove the corresponding area in the I-diagram . There could be Z with µ * ( ( X ∩ Y ) ∩ Z ) < 0 , such that µ * ( X ∩ Y ) = µ * ( X ∩ Y ∩ Z ) + µ * ( X ∩ Y − Z ) = 0 but X ∩ Y , ∅ . This also means that we can not drop the term from expressions when performing symbolic manipulations . This is of particular importance because a mutual information of zero means two random variables are independent , which might invite one drawing them as disjoint areas . The only time where one can safely remove an area from the diagram is for atomic quantities , which are quantities which reference all the available random variables ( Yeung , 1991 ) . For example , when we only have three variables X , Y , Z , I [ X ; Y ; Z ] and I [ X ; Y | Z ] are atomic quantities . We can safely remove atomic quantities from I-diagrams when they are 0 as there are no random variables left to apply that could lead to the problem explored above . Continuing the example , 0 = I [ X ; Y ; Z ] = µ * ( X ∩ Y ∩ Z ) would imply X ∩ Y ∩ Z = ∅ , and we could remove it from the diagram without loss of generality . Moreover , atomic I [ X ; Y |Z ] = µ * ( X∩Y−Z ) = 0 then and could be removed from the diagram as well . We only use I-diagrams for the three variable case , but they supply us with tools to easily come up with equalities and inequalities for information quantities . In the general case with multiple variables , they can be difficult to draw , but for Markov chains they can be of great use . B MickeyMouse I-diagram B.1 Intuition for theMickeyMouse information quantities We base the names of information quantities on existing conventions and come up with sensible extensions . For example , the name Preserved Relevant Information for I [ Y ; Z ] was introduced by Tishby and Zaslavsky ( 2015 ) . It can be seen as the intersection of I [ X ; Z ] and I [ X ; Y ] in the I-diagram , and hence we denote I [ X ; Z ] Preserved Information and I [ X ; Y ] Relevant Information , which are sensible names as we detail below . We identify the following six atomic quantities : Label Uncertainty H [ Y | X ] quantifies the uncertainty in our labels . If we have multiple labels for the same data sample , it will be > 0 . It is 0 otherwise . Encoding Uncertainty H [ Z | X ] quantifies the uncertainty in our latent encoding given a sample . When using a Bayesian model with random variable ω for the weights , one can further split this term into H [ Z | X ] = I [ Z ; ω | X ] + H [ Z | X , ω ] , so uncertainty stemming from weight uncertainty and independent noise ( Houlsby et al. , 2011 ; Kirsch et al. , 2019 ) . Preserved Relevant Information I [ Y ; Z ] quantifies information in the latent that is relevant for our task of predicting the labels ( Tishby and Zaslavsky , 2015 ) . Intuitively , we want to maximize it for good predictive performance . Residual Information I [ X ; Y | Z ] quantifies information for the labels that is not captured by the latent ( Tishby and Zaslavsky , 2015 ) but would be useful to be captured . Redundant Information I [ X ; Z | Y ] quantifies information in the latent that is not needed for predicting the labels6 . We also identify the following composite information quantities : Relevant Information I [ X ; Y ] = I [ X ; Y | Z ] + I [ Y ; Z ] quantifies the information in the data that is relevant for the labels and which our model needs to capture to be able to predict the labels . Preserved Information I [ X ; Z ] = I [ X ; Z | Y ] + I [ Y ; Z ] quantifies information from the data that is preserved in the latent . Decoder Uncertainty H [ Y | Z ] = I [ X ; Y | Z ] + H [ Y | X ] quantifies the uncertainty about the labels after learning about the latent Z . If H [ Y | Z ] reaches 0 , it means that no additional information is needed to infer the correct label Y from the latent Z : the optimal decoder can be a deterministic mapping . Intuitively , we want to minimize this quantity for good predictive performance . Reverse Decoder Uncertainty H [ Z | Y ] = I [ X ; Z | Y ] + H [ Z | X ] quantifies the uncertainty about the latent Z given the label Y . We can imagine training a new model to predict Z given Y and minimizing H [ Z | Y ] to 0 would allow for a deterministic decoder from the latent to given the label . Nuisance7 H [ X | Y ] = H [ X | Y , Z ] + I [ X ; Z ] quantifies the information in the data that is not relevant for the task ( Achille and Soatto , 2018a ) . B.2 Definitions & equivalences The following equalities can be read off from figure 2 . For completeness and to provide a handy reference , we list them explicitly here . They can also be verified using symbolic manipulations and the properties of information quantities . Equalities for composite quantities : I [ X ; Y ] = I [ X ; Y | Z ] + I [ Y ; Z ] ( 17 ) I [ X ; Z ] = I [ X ; Z | Y ] + I [ Y ; Z ] ( 18 ) H [ Y | Z ] = I [ X ; Y | Z ] + H [ Y | X ] ( 19 ) H [ Z | Y ] = I [ X ; Z | Y ] + H [ Z | X ] ( 20 ) H [ X | Y ] = H [ X | Y , Z ] + I [ X ; Z ] ( 21 ) We can combine the atomic quantities into the overall Label Entropy and Encoding Entropy : H [ Y ] = H [ Y | X ] + I [ Y ; Z ] + I [ X ; Y | Z ] ( 22 ) H [ Z ] = H [ Z | X ] + I [ Y ; Z ] + I [ X ; Z | Y ] . ( 23 ) We can express the Relevant Information I [ X ; Y ] , Residual Information I [ X ; Y | Z ] , Redundant Information I [ X ; Z | Y ] and Preserved Information I [ X ; Z ] without X on the left-hand side : I [ X ; Y ] = H [ Y ] − H [ Y | X ] , ( 24 ) I [ X ; Z ] = H [ Z ] − H [ Z | X ] , ( 25 ) I [ X ; Y | Z ] = H [ Y | Z ] − H [ Y | X ] , ( 26 ) I [ X ; Z | Y ] = H [ Z | Y ] − H [ Z | X ] . ( 27 ) This simplifies estimating these expressions as X is usually much higher-dimensional and irregular than the labels or latent encodings . We also can rewrite the Preserved Relevant Information I [ Y ; Z ] as : I [ Y ; Z ] = H [ Y ] − H [ Y | Z ] ( 28 ) I [ Y ; Z ] = H [ Z ] − H [ Z | Y ] ( 29 ) 6Fisher ( 2019 ) uses the term “ Residual Information ” for this , which conflicts with Tishby and Zaslavsky ( 2015 ) . 7Not depicted in figure 2 . C Information bottleneck & related works C.1 Goals & motivation The IB principle from Tishby et al . ( 2000 ) can be recast as a generalization of finding minimal sufficient statistics for the labels given the data ( Shamir et al. , 2010 ; Tishby and Zaslavsky , 2015 ; Fisher , 2019 ) : it strives for minimality and sufficiency of the latent Z. Minimality is about minimizing amount of information necessary of X for the task , so minimizing the Preserved Information I [ X ; Z ] ; while sufficiency is about preserving the information to solve the task , so maximizing the Preserved Relevant Information I [ Y ; Z ] . From figure 2 , we can read off the definitions of Relevant Information and Preserved Information : I [ X ; Y ] = I [ Y ; Z ] + I [ X ; Y | Z ] ( 30 ) I [ X ; Z ] = I [ Y ; Z ] + I [ X ; Z | Y ] , ( 31 ) and see that maximizing the Preserved Relevant Information I [ Y ; Z ] is equivalent to minimizing the Residual Information I [ X ; Y | Z ] , while minimizing the Preserved Information I [ X ; Z ] at the same time means minimizing the Redundant Information I [ X ; Z | Y ] , too , as I [ X ; Y ] is constant for the given dataset8 . Moreover , we also see that the Preserved Relevant Information I [ Y ; Z ] is upper-bounded by Relevant Information I [ X ; Y ] , so to capture all relevant information in our latent , we want I [ X ; Y ] = I [ Y ; Z ] . Using the diagram , we can also see that minimizing the Residual Information is the same as minimizing the Decoder Uncertainty H [ Y | Z ] : I [ X ; Y | Z ] = H [ Y | Z ] − H [ Y | X ] . Ideally , we also want to minimize the Encoding Uncertainty H [ Z | X ] to find the most deterministic latent encoding Z . Minimizing the Encoding Uncertainty and the Redundant Information I [ X ; Z | Y ] together is the same as minimizing the Reverse Decoder Uncertainty H [ Z | Y ] . All in all , we want to minimize both the Decoder Uncertainty H [ Y | Z ] and the Reverse Decoder Uncertainty H [ Z | Y ] . C.2 IB objectives “ The Information BottleneckMethod ” ( IB ) Tishby et al . ( 2000 ) introduce MI ( X ; X̂ ) − βMI ( X̂ ; Y ) as optimization objective for the Information Bottleneck . We can relate this to our notation by renaming X̂ = Z , such that the objective becomes “ min I [ X ; Z ] − βI [ Y ; Z ] ” . The IB objective minimizes the Preserved Information I [ X ; Z ] and trades it off with maximizing the Preserved Relevant Information I [ Y ; Z ] . Tishby and Zaslavsky ( 2015 ) mention that the IB objective is equivalent to minimizing I [ X ; Z ] + βI [ X ; Y | Z ] , see our discussion above . Tishby et al . ( 2000 ) provide an optimal algorithm for the tabular case , when X , Y and Z are all categorical . This has spawned additional research to optimize the objective for other cases and specifically for DNNs . “ Deterministic Information Bottleneck ” ( DIB ) Strouse and Schwab ( 2017 ) introduce as objective “ min H [ Z ] − βI [ Y ; Z ] ” . Compared to the IB objective , this also minimizes H [ Z | X ] and encourages determinism . Vice-versa , for deterministic encoders , H [ Z | X ] = 0 , and their objective matches the IB objective . Like Tishby et al . ( 2000 ) , they provide an algorithm for the tabular case . To do so , they examine an analytical solution for their objective as it is unbounded : H [ Z | X ] → −∞ for the optimal solution . As we discuss in section 3.3 , it does not easily translate to a continuous latent representation . “ Deep Variational Information Bottleneck ” Alemi et al . ( 2016 ) rewrite the terms in the bottleneck as maximization problem “ max I [ Y ; Z ] − βI [ X ; Z ] ” and swap the β parameter . Their β would be 1/β in IB above , which emphasizes that I [ Y ; Z ] is important for performance and I [ X ; Z ] acts as regularizer . 8That is , it does not depend on θ . The paper derives the following variational approximation to the IB objective , where z = fθ ( x , ) denotes a stochastic latent embedding with distribution pθ ( z | x ) , pθ ( ŷ | z ) denotes the decoder , and r ( z ) is some fixed prior distribution on the latent embedding : minEp̂ ( x , y ) E ∼p ( ) [ − log pθ ( Ŷ = y | z = fθ ( xn , ) ) + γDKL ( p ( z|xn ) ||r ( z ) ) ] . ( 32 ) In principle , the distributions pθ ( ŷ | z ) and pθ ( z | x ) could be given by arbitrary parameterizations and function approximators . In practice , the implementation of DVIB presented by Alemi et al . ( 2016 ) constructs pθ ( z | x ) as a multivariate Gaussian with parameterized mean and parameterized diagonal covariance using a neural network , and then uses a simple logistic regression to obtain pθ ( ŷ | z ) , while arbitrarily setting r ( z ) to be a unit Gaussian around the origin . The requirement for pθ ( z | x ) to have a closed-form Kullback-Leibler divergence limits the applicability of the DVIB objective . The DVIB objective can be written more concisely as min Hθ [ Y | Z ] + γDKL ( p ( z | x ) || r ( z ) ) in the notation introduced in section 3 . We discuss the regularizer in more detail in section F.3 . “ Conditional Entropy Bottleneck ” In a preprint , Fisher ( 2019 ) introduce their Conditional Entropy Bottleneck as “ min I [ X ; Z | Y ] − I [ Y ; Z ] ” . We can rewrite the objective as I [ X ; Z | Y ] + I [ X ; Y | Z ] − I [ X ; Y ] , using equations ( 30 ) and ( 31 ) . The last term is constant for the dataset and can thus be dropped . Likewise , the IB objective can be rewritten as minimizing I [ X ; Z | Y ] + ( β − 1 ) I [ X ; Y | Z ] . The two match for β = 2 . Fisher ( 2019 ) provides experimental results that favorably compare to Alemi et al . ( 2016 ) , possibly due to additional flexibility as Fisher ( 2019 ) do not constrain p ( z ) to be a unit Gaussian and employ variational approximations for all terms . We relate CEB to Entropy Distance Metric in section C.4 . “ Conditional Entropy Bottleneck ” ( 2020 ) In a substantial revision of the preprint , Fischer ( 2020 ) change their Conditional Entropy Bottleneck to include a Lagrange multiplier : “ min I [ X ; Z | Y ] − γI [ Y ; Z ] ” . Their VCEB objective can be written more concisely as min Hθ [ Y | Z ] + γ ( Hθ [ Z | Y ] − Hθ [ Z | X ] ) , where , without writing down the probabilistic model , we introduce variational approximations for the Reverse Decoder Uncertainty and the Encoding Uncertainty . They are the first to report results on CIFAR-10 . It is not clear how they parameterize the model they use for CIFAR-10 . They use one Gaussian per class to model Hθ [ Z | Y ] . “ CEB ImprovesModel Robustness ” Fischer and Alemi ( 2020 ) take CEB and switch to a deterministic model which they turn it into a stochastic encoder by adding unit Gaussian noise . They use Gaussians of fixed variance to variationally approximate q ( y | z ) : for each class , q ( y | z ) is modelled as a separate Gaussian . They are the first to report results on ImageNet and report good rebustness against adversarial attacks without adversarial training . C.3 Canonical IB & DIB objectives We expand the IB and DIB objectives into “ disjoint ” terms and drop constant ones to find a more canonical form . This leads us to focus on the optimization of the Decoder Uncertainty H [ Y | Z ] along with additional regularization terms . In section 3.2 , we discuss the properties of H [ Y | Z ] , and in section 3.3 we examine the regularization terms . Proposition . For IB , we obtain arg min I [ X ; Z ] − βI [ Y ; Z ] = arg min H [ Y | Z ] + β′ I [ X ; Z | Y ] ︸ ︷︷ ︸ =H [ Z|Y ] −H [ Z|X ] , ( 33 ) and , for DIB , arg min H [ Z ] − βI [ Y ; Z ] = arg min H [ Y | Z ] + β′H [ Z | Y ] = arg min H [ Y | Z ] + β′′H [ Z ] ( 34 ) with β′ : = 1 β−1 ∈ [ 0 , ∞ ) and β′′ : = 1 β ∈ [ 0 , 1 ) . Proof . For the steps marked with * , we make use of β > 1 . For IB , we obtain arg min I [ X ; Z ] − βI [ Y ; Z ] = arg min I [ X ; Z | Y ] + ( β − 1 ) H [ Y | Z ] ( * ) = arg min H [ Y | Z ] + β′ I [ X ; Z | Y ] arg min H [ Y | Z ] + β′ ( H [ Z | Y ] − H [ Z | X ] ) , ( IB ) and , for DIB , arg min H [ Z ] − βI [ Y ; Z ] = arg min H [ Z | Y ] + ( β − 1 ) H [ Y | Z ] ( * ) = arg min H [ Y | Z ] + β′H [ Z | Y ] , ( DIB ) with β′ : = 1 β−1 ∈ [ 0 , ∞ ) . Similarly , we show for DIB arg min H [ Z ] − βI [ Y ; Z ] = arg min H [ Z ] + βH [ Y | Z ] ( * ) = arg min H [ Y | Z ] + β′′H [ Z ] , with β′′ : = 1 β ∈ [ 0 , 1 ) , which is relevant in section 3.3 . We limit ourselves to β > 1 , because , for β < 1 , we would be maximizing the Decoder Uncertainty , which does not make sense : the obvious solution to this is one where Z contains no information on Y , that is p ( y | z ) is uniform . In the case of DIB , it is to map every input deterministically to a single latent ; whereas for IB , we only minimize the Redundant Information , and the solution is free to contain noise . For β = 1 , we would not care about Decoder Uncertainty and only minimize Redundant Information and Reverse Decoder Uncertainty , respectively , which allows for arbitrarily bad predictions . We note that we have β′ = β ′′ 1−β′′ using the relations above . C.4 IB objectives and the Entropy DistanceMetric Another perspective on the IB objectives is by expressing them using the Entropy Distance Metric . MacKay ( 2003 , p. 140 ) introduces the entropy distance EDM ( Y , Z ) = H [ Y | Z ] + H [ Z | Y ] . ( 35 ) as a metric when we identify random variables up to permutations of the labels for categorical variables : if the entropy distance is 0 , Y and Z are the same distribution up to a consistent permutation of the labels ( independent of X ) . If the entropy distance becomes 0 , both H [ Y | Z ] = 0 = H [ Z | Y ] , and we can find a bijective map from Z to Y.9 We can express the Reverse Decoder Uncertainty H [ Z | Y ] using the Decoder Uncertainty H [ Y | Z ] and the entropies : H [ Z | Y ] + H [ Y ] = H [ Y | Z ] + H [ Z ] , and rewrite equation ( 35 ) as EDM ( Y , Z ) = 2H [ Y | Z ] + H [ Z ] − H [ Y ] . For optimization purposes , we can drop constant terms and rearrange : arg min EDM ( Y , Z ) = arg min H [ Y | Z ] + 12 H [ Z ] . C.4.1 Rewriting IB and DIB using the Entropy DistanceMetric For β ≥ 1 , we can rewrite equations ( IB ) and ( DIB ) as : arg min EDM ( Y , Z ) + γ ( H [ Y | Z ] − H [ Z | Y ] ) + ( γ − 1 ) H [ Z | X ] ( 36 ) for IB , and arg min EDM ( Y , Z ) + γ ( H [ Y | Z ] − H [ Z | Y ] ) ( 37 ) 9The argument for continuous variables is the same . We need to identify distributions up to “ isentropic ” bijections . for DIB and replace β with γ = 1 − 2 β ∈ [ −1 , 1 ] which allows for a linear mix between H [ Y | Z ] and H [ Z | Y ] . DIB will encourage the model to match both distributions for γ = 0 ( β = 2 ) , as we obtain a term that matches the Entropy Distance Metric from section C.4 , and otherwise trades off Decoder Uncertainty and Reverse Decoder Uncertainty . IB behaves similarly but tends to maximize Encoding Uncertainty as γ − 1 ∈ [ −2 , 0 ] . Fisher ( 2019 ) argues for picking this configuration similar to the arguments in section C.1 . DIB will force both distributions to become exactly the same , which would turn the decoder into a permutation matrix for categorical variables . D Decoder Uncertainty H [ Y | Z ] D.1 Cross-entropy loss The cross-entropy loss features prominently in section 3.2 . We can derive the usual cross-entropy loss for our model by minimizing the Kullback-Leibler divergence between the empirical sample distribution p̂ ( x , y ) and the parameterized distribution pθ ( x ) pθ ( ŷ | x ) . For discriminative models , we are only interested in pθ ( ŷ | x ) , and can simply set pθ ( x ) = p̂ ( x ) : arg min θ DKL ( p̂ ( x , y ) || pθ ( x ) pθ ( Ŷ = y | x ) ) = arg min θ DKL ( p̂ ( y | x ) || pθ ( Ŷ = y | x ) ) + DKL ( p̂ ( x ) || pθ ( x ) ) ︸ ︷︷ ︸ =0 = arg min θ H ( p̂ ( y | x ) || pθ ( Ŷ = y | x ) ) − H [ Y | X ] ︸ ︷︷ ︸ const . = arg min θ H ( p̂ ( y | x ) || pθ ( Ŷ = y | x ) ) . In section 3.2 , we introduce the shorthand Hθ [ Y | X ] for H ( p̂ ( y | x ) || pθ ( Ŷ = y | x ) ) and refer to it as Prediction Cross-Entropy . D.2 Upper bounds & training error minimization To motivate that H [ Y | Z ] ( or Hθ [ Y | Z ] ) can be used as main loss term , we show that it can bound the ( training ) error probability since accuracy is often the true objective when machine learning models are deployed on real-world problems10 . Proposition . The Decoder Cross-Entropy provides an upper bound on the Decoder Uncertainty : H [ Y | Z ] ≤ H [ Y | Z ] + DKL ( p ( y | z ) || pθ ( ŷ | z ) ) = Hθ [ Y | Z ] , and further bounds the training error : p ( “ Ŷ is wrong ” ) ≤ 1 − e−Hθ [ Y|Z ] = 1 − e− ( H [ Y|Z ] +DKL ( p ( y|z ) ||pθ ( ŷ|z ) ) ) . Likewise , for the Prediction Cross-Entropy Hθ [ Y | X ] and the Label Uncertainty H [ Y | X ] . Proof . The upper bounds for Decoder Uncertainty H [ Y | Z ] and Label Uncertainty H [ Y | X ] follow from the non-negativity of the Kullback-Leibler divergence , for example : 0 ≤ DKL ( p ( y | z ) || pθ ( ŷ | z ) ) = Hθ [ Y | Z ] − H [ Y | Z ] , 0 ≤ DKL ( p̂ ( y | x ) || pθ ( ŷ | x ) ) = Hθ [ Y | X ] − H [ Y | X ] . The derivation for the training error probability is as follows : p ( “ Ŷ is correct ” ) = Ep̂ ( x , y ) p ( “ Ŷ is correct ” | x , y ) = Ep̂ ( x , y ) Epθ ( z|x ) pθ ( Ŷ = y | z ) = Ep ( y , z ) pθ ( Ŷ = y | z ) . We can then apply Jensen ’ s inequality using convex h ( x ) = − ln x : h ( Ep ( y , z ) pθ ( Ŷ = y | z ) ) ≤ Ep ( y , z ) h ( pθ ( Ŷ = y | z ) ) 10As we only take into account the empirical distribution p̂ ( x , y ) available for training , the following derivation refers only to the empirical risk , and not to the expected risk of the estimator Ŷ . ⇔ p ( “ Ŷ is correct ” ) ≥ e−H ( p ( y|z ) ||pθ ( Ŷ=y|z ) ) ⇔ p ( “ Ŷ is wrong ” ) ≤ 1 − e−Hθ [ Y|Z ] . For small Hθ [ Y | Z ] , we note that one can use the approximation ex ≈ 1 + x to obtain : p ( “ Ŷ is wrong ” ) / Hθ [ Y | Z ] . ( 38 ) Finally , we split the Decoder Cross-Entropy into the Decoder Uncertainty and a Kullback-Leibler divergence : Hθ [ Y | Z ] = H [ Y | Z ] + DKL ( p ( y | z ) || pθ ( Ŷ = y | z ) ) . If we upper-bound DKL ( p ( y | z ) ||pθ ( Ŷ = y | z ) ) , minimizing the Decoder Uncertainty H [ Y | Z ] becomes a sensible minimization objective as it reduces the probability of misclassification . We can similarly show that the training error is bounded by the Prediction Cross-Entropy Hθ [ Y | X ] . In the next section , we examine categorical Z for which optimal decoders can be constructed and DKL ( p ( y | z ) || pθ ( Ŷ = y | z ) ) becomes zero . E Categorical Z For categorical Z , p ( y | z ) can be computed exactly for a given encoder pθ ( z | x ) by using the empirical data distribution , which , in turn , allows us to compute H [ Y | Z ] 11 . This is similar to computing a confusion matrix between Y and Z but using information content instead of probabilities . Moreover , if we set pθ ( ŷ | z ) : = p ( Y = ŷ | z ) to have an optimal decoder , we obtain equality in equation ( 9 ) , and obtain Hθ [ Y | X ] ≤ Hθ [ Y | Z ] = H [ Y | Z ] . If the encoder were also deterministic , we would obtain Hθ [ Y | X ] = Hθ [ Y | Z ] = H [ Y | Z ] . We can minimize H [ Y | Z ] directly using gradient descent . d dθH [ Y | Z ] only depends on p ( y | z ) and d dθ pθ ( z | x ) : d dθ H [ Y | Z ] = Ep ( x , z ) [ d dθ [ ln pθ ( z | x ) ] Ep̂ ( y|x ) h ( p ( y | z ) ) ] . Proof . d dθ H [ Y | Z ] = d dθ Ep ( y , z ) h ( p ( y | z ) ) = d dθ Ep ( x , y , z ) h ( p ( y | z ) ) = Ep̂ ( x , y ) ddθ Epθ ( z|x ) h ( p ( y | z ) ) = Epθ ( z|x ) Ep̂ ( x , y ) d dθ [ h ( p ( y | z ) ) ] + h ( p ( y | z ) ) d dθ [ ln pθ ( z | x ) ] = Ep ( x , y , z ) d dθ [ h ( p ( y | z ) ) ] + h ( p ( y | z ) ) d dθ [ ln pθ ( z | x ) ] . And now we show that Ep ( x , y , z ) ddθ [ h ( p ( y | z ) ) ] = 0 : Ep ( x , y , z ) d dθ [ h ( p ( y | z ) ) ] = Ep ( y , z ) ddθ [ h ( p ( y | z ) ) ] = Ep ( y , z ) −1p ( y | z ) ddθ p ( y | z ) = − ∫ p ( y , z ) p ( y | z ) d dθ p ( y | z ) dy dz = − ∫ p ( z ) ∫ d dθ p ( y | z ) dy dz = − ∫ p ( z ) d dθ [ ∫ p ( y | z ) dy︸ ︷︷ ︸ =1 ] dz = 0 . Splitting the expectation and reordering ofEp ( x , y , z ) h ( p ( y | z ) ) ddθ [ ln pθ ( z | x ) ] , we obtain the result . The same holds for Reverse Decoder Uncertainty H [ Z | Y ] and for the other quantities as can be verified easily . If we minimize H [ Y | Z ] directly , we can compute p ( y | z ) after every training epoch and fix pθ ( ŷ | z ) : = p ( Y = ŷ | z ) to create the discriminative model pθ ( ŷ | x ) . This is a different perspective on the self-consistent equations from Tishby et al . ( 2000 ) ; Gondek and Hofmann ( 2003 ) . 11p ( y | z ) depends on θ through pθ ( z | x ) : p ( y | z ) = ∑ x p̂ ( x , y ) pθ ( z|x ) ∑ x p̂ ( x ) pθ ( z|x ) . 0 20 40 60 0.5 1 1.5 N at s/ P ro b ab ili ty Permutation MNIST Objective minH [ Y |Z ] minHθ [ Y |Z ] minHθ [ Y |X ] Metric H [ Y |Z ] Hθ [ Y |Z ] Hθ [ Y |X ] 0 20 40 60 Epoch 1 2 CIFAR10 Figure E.1 : Decoder Uncertainty , Decoder Cross-Entropy and Prediction Cross-Entropy for Permutation-MNIST and CIFAR-10 with a categorical Z . C = 100 categories are used for Z . We optimize with different minimization objectives in turn and plot the metrics . DKL ( p ( y | z ) || pθ ( Ŷ = y | z ) ) is small when training with Hθ [ Y | Z ] or H [ Y | Z ] . When training with Hθ [ Y | X ] on CIFAR-10 , DKL ( p ( y | z ) || pθ ( Ŷ = y | z ) ) remains quite large . We run 8 trials each and plot the median with confidence bounds ( 25 % and 75 % quartiles ) . See section E.1 for more details . E.1 Empirical evaluation of DKL ( p ( y | z ) || pθ ( Ŷ = y | z ) ) during training We examine the size of the gap between Decoder Uncertainty and Decoder Cross-Entropy and the training behavior of the two cross-entropies with categorical latent Z on Permutation MNIST and CIFAR-10 . For Permutation MNIST ( Goodfellow et al. , 2013 ) , we use the common fully-connected ReLU 784 − 1024 − 1024 −C encoder architecture , with C = 100 categories for Z . For CIFAR-10 ( Krizhevsky et al. , 2009 ) , we use a standard ResNet18 model with C many output classes as encoder ( He et al. , 2016a ) . See section G for more details about the hyperparameters . Even though a C × 10 matrix and a SoftMax would suffice to describe the decoder matrix pθ ( ŷ | z ) 12 , we have found that over-parameterization using a separate DNN benefits optimization a lot . Thus , to parameterize the decoder matrix , we use fully-connected ReLUs C − 1024 − 1024 − 10 with a final SoftMax layer . We compute it once per batch during training and back-propagate into it . Figure E.1 shows the three metrics as we train with each of them in turn . Our results do not achieve SOTA accuracy on the test set—we impose a harder optimization problem as Z is categorical , and we are essentially solving a hard-clustering problem first and then map these clusters to Ŷ . Results are provided for the training set in order to compare with the optimal decoder . As predicted , the Decoder Cross-Entropy upper-bounds both the Decoder Uncertainty H [ Y | Z ] and the Prediction Cross-Entropy in all cases . Likewise , the gap between Hθ [ Y | Z ] and H [ Y | Z ] is tiny when we minimize Hθ [ Y | Z ] . On the other hand , minimizing Prediction Cross-Entropy can lead to large gaps between Hθ [ Y | Z ] and H [ Y | Z ] , as can be seen for CIFAR-10 . Very interestingly , on MNIST Decoder Cross-Entropy provides a better training objective whereas on CIFAR-10 Prediction Cross-Entropy trains lower . Decoder Uncertainty does not train very well on CIFAR-10 , and Prediction Cross-Entropy does not train well on Permutation MNIST at all . We suspect DNN architectures in the literature have evolved to train well with cross-entropies , but we are surprised by the heterogeneity of the results for the two datasets and models . F Surrogates for regularization terms F.1 Differential entropies Proposition . After adding zero-entropy noise , the inequality I [ X ; Z | Y ] ≤ H [ Z | Y ] ≤ H [ Z ] also holds in the continuous case , and we can minimize I [ X ; Z | Y ] in the IB objective by minimizing H [ Z | Y ] or H [ Z ] , similarly to the DIB objective . We present a formal proof in section F.1 . Theorem 2 . For random variables A , B , we have H [ A + B ] ≥ H [ B ] . 12For categorical Z , pθ ( ŷ | z ) is a stochastic matrix which sums to 1 along the Ŷ dimension . Proof . See Bercher and Vignat ( 2002 , section 2.2 ) . Proposition 1 . Let Y , Z and X be random variables satisfying the independence property Z ⊥ Y |X , and F a possibly stochastic function such that Z = F ( X ) + , with independent noise satisfying ⊥ F ( X ) , ⊥ Y and H ( ) = 0 . Then the following holds whenever I [ Y ; Z ] is well-defined . I [ X ; Z | Y ] ≤ H [ Z | Y ] ≤ H [ Z ] . Proof . First , we note that H [ Z | X ] = H [ F ( X ) + | X ] ≥ H [ | X ] = H [ ] with theorem 2 , as is independent of X , and thus H [ Z | X ] ≥ 0 . We have H [ Z | X ] = H [ Z | X , Y ] by the conditional independence assumption , and by the non-negativity of mutual information , I [ Y ; Z ] ≥ 0 . Then : I [ X ; Z | Y ] + H [ Z | X ] ︸ ︷︷ ︸ ≥0 = H [ Z | Y ] H [ Z | Y ] + I [ Y ; Z ] ︸ ︷︷ ︸ ≥0 = H [ Z ] The probabilistic model from section 2 fulfills the conditions exactly , and the two statements motivate our proposition . It is important to note that while zero-entropy noise is necessary for preserving inequalities like I [ X ; Z | Y ] ≤ H [ Z | Y ] ≤ H [ Z ] in the continuous case , any Gaussian noise will suffice for optimization purposes : we optimize via pushing down an upper bound , and constant offsets will not affect this . Thus , if we had H [ ] , 0 , even though I [ X ; Z | Y ] + H [ Z | X ] 6≤ H [ Z | Y ] , we could instead use I [ X ; Z | Y ] + H [ Z | X ] − H [ ] ≤ H [ Z | Y ] − H [ ] as upper bound to minimize . The gradients remain the same . This also points to the nature of differential entropies as lacking a proper point of origin by themselves . We choose one by fixing H [ ] . Just like other literature usually only considers mutual information as meaningful , we consider H [ Z | X ] − H [ ] as more meaningful than H [ Z | X ] . However , we can side-step this discussion conveniently by picking a canonical noise as point of origin in the form of zero-entropy noise H [ ] = 0 . F.2 Upper bounds We derive this result as follows : H [ Z | Y ] = Ep̂ ( y ) H [ Z | y ] ≤ Ep̂ ( y ) 12 ln det ( 2πe Cov [ Z | y ] ) ≤ Ep̂ ( y ) ∑ i 1 2 ln ( 2πe Var [ Zi | y ] ) ≈ Ep̂ ( y ) ∑ i 1 2 ln ( 2πe V̂ar [ Zi | y ] ) , Theorem 3 . Given a k-dimensional random variable X = ( Xi ) ki=1 with Var [ Xi ] > 0 for all i , H [ X ] ≤ 12 ln det ( 2πe Cov [ X ] ) ≤ ∑ i 1 2 ln ( 2πe Var [ Xi ] ) . Proof . First , the multivariate normal distribution with same covariance is the maximum entropy distribution for that covariance , and thus H [ X ] ≤ ln det ( 2πe Cov [ X ] ) , when we substitute the differential entropy for a multivariate normal distribution with covariance Cov [ X ] . Let Σ0 : = Cov [ X ] be the covariance matrix and Σ1 : = diag ( Var [ Xi ] ) i the matrix that only contains the diagonal . Because we add independent noise , Var [ Xi ] > 0 and thus Σ−11 exists . It is clear that tr ( Σ −1 1 Σ0 ) = k. Then , we can use the KL-Divergence between two multivariate normal distributions N0 , N1 with same mean 0 and covariances Σ0 and Σ1 to show that ln det Σ0 ≤ ln det Σ1 : 0 ≤ DKL ( N0 || N1 ) = 12 ( tr ( Σ−11 Σ0 ) − k + ln ( det Σ1 det Σ0 ) ) ⇔ 0 ≤ 12 ln ( det Σ1 det Σ0 ) ⇔ 12 ln det Σ0 ≤ 1 2 ln det Σ1 . We substitute the definitions of Σ0 and Σ1 , and obtain the second inequality after adding k ln ( 2πe ) on both sides . Theorem 4 . Given a k-dimensional real-valued random variable X = ( Xi ) ki=1 ∈ Rk , we can bound the entropy by the mean squared norm of the latent : E ‖X‖2 ≤ C′ ⇒ H [ X ] ≤ C , ( 39 ) with C′ : = ke 2C/k 2πe . Proof . We begin with the previous bound : H [ X ] ≤ ∑ i 1 2 ln ( 2πe Var [ Xi ] ) = k 2 ln 2πe + 1 2 ln ∏ i Var [ Xi ] ≤ k2 ln 2πe + 1 2 ln 1k ∑ i Var [ Xi ] k = k2 ln 2πek ∑ i Var [ Xi ] ≤ k2 ln 2πe k E ‖X‖ 2 , where we use the AM-GM inequality : ∏ i Var [ Xi ] 1 k ≤ 1k ∑ i Var [ Xi ] and the monotony of the logarithm with : ∑ i Var [ Xi ] = ∑ i E [ X2i ] −E [ Xi ] 2 ≤ ∑ i E [ X2i ] = E ‖X‖2 Bounding using E ‖X‖2 ≤ C′ , we obtain H [ X ] ≤ k2 ln 2πe k C ′ = C , and solving for C′ yields the statement . This theorem provides justification for the use of lnE ‖Z‖2 as a regularizer , but does not justify the use of E ‖Z‖2 directly . Here , we give two motivations . We first observe that ln x ≤ x − 1 due to ln ’ s strict convexity and ln 1 = 0 , and thus : H [ X ] ≤ k2 ln 2πe k E ‖X‖ 2 = k2 ( ln 2πk E ‖X‖ 2 − 1 ) ≤ πE ‖X‖2 . We can also take a step back and remind ourselves that IB objectives are actually Lagrangians , and β in min I [ X ; Z ] − βI [ Y ; Z ] is introduced as Lagrangian multiplier for the constrained objective : min I [ X ; Z ] s.t . I [ Y ; Z ] ≥ C. We can similarly write our canonical DIB objective H [ Y | Z ] + β′′H [ Z ] as constrained objective min H [ Y | Z ] s.t . H [ Z ] ≤ C , and use above statement to find the approximate form min H [ Y | Z ] s.t . E ‖Z‖2 ≤ C′ . Reintroducing a Lagrangian multiplier recovers our reguralized E ‖Z‖2 objective : min H [ Y | Z ] + γE ‖Z‖2 . F.3 “ Deep Variational Information Bottleneck ” and E ‖Z‖2 Alemi et al . ( 2016 ) model pθ ( z | x ) explicitly as multivariate Gaussian with parameterized mean and parameterized diagonal covariance in their encoder and regularize it to become close to N ( 0 , Ik ) by minimizing the Kullback-Leibler divergence DKL ( pθ ( z | x ) || N ( 0 , Ik ) ) alongside the cross-entropy : min Hθ [ Y | Z ] + γDKL ( p ( z | x ) || r ( z ) ) , as detailed in section C.2 . We can expand the regularization term to DKL ( p ( z | x ) || N ( 0 , Ik ) ) = Ep̂ ( x ) Ep ( z|x ) h ( ( 2π ) − k 2 e− 1 2 ‖Z‖2 | ) − H [ Z | X ] = Ep ( z ) [ k 2 ln ( 2π ) + 1 2 ‖Z‖2 ] − H [ Z | X ] . After dropping constant terms ( as they don ’ t matter for optimization purposes ) , we obtain = 1 2 E ‖Z‖2 − H [ Z | X ] . When we inject zero-entropy noise into the latent Z , we have H [ Z | X ] ≥ 0 and thus E ‖Z‖2 − H [ Z | X ] ≤ E ‖Z‖2 . Thus , the E ‖Z‖2 regularizer also upper-bounds DVIB ’ s regularizer in this case . In particular , we have equality when we use a deterministic encoder . When we inject zero-entropy noise and use a deterministic encoder , we are optimizing the DVIB objective function when we use the E ‖Z‖2 regularizer . In other words , in this particular case , we could reinterpret “ min Hθ [ Y | Z ] + γE ‖Z‖2 ” as optimizing the DVIB objective from Alemi et al . ( 2016 ) if they were using a constant covariance instead of parameterizing it in their encoder . This does not hold for stochastic encoders . We empirically compare DVIB and the surrogate objectives from section 3.3 in section G.5 . In the corresponding plot in figure G.15 , we can indeed note thatE ‖Z‖2 and DVIB are separated by a factor of 2 in the Lagrange multiplier . F.4 Detailed Comparison to CEB , VCEB & DVIB In Fisher ( 2019 ) , the introduced CEB objective `` min I [ X ; Z | Y ] − γI [ Y ; Z ] '' is rewritten to `` min γH [ Y | Z ] + H [ Z | Y ] − H [ Z | X ] '' similar to the IB objective in proposition 1 in section 3.1 . However , these atomic quantities are not separately examined in detail . Both Alemi et al . ( 2016 ) and Fischer ( 2020 ) focus on the application of variational approximations to these quantities . Using a slight abuse of notation to denote all variational approximations , we can write the VCEB objective13 ( Fischer , 2020 ) and the DVIB objective ( Alemi et al. , 2016 ) more concisely as VCEB ≡ min θ Hθ [ Y | Z ] + β′ ( Hθ [ Z | Y ] − Hθ [ Z | X ] ) , DVIB ≡ min θ Hθ [ Y | Z ] + β′′ ( Hθ [ Z ] − Hθ [ Z | X ] ) . DVIB does not specify how to choose stochastic encoders and picks the variational marginal q ( z ) to be a unit Gaussian . We relate how this choice of marginal relates to the E ‖Z‖2 surrogate objective in section F.3 . Alemi et al . ( 2016 ) use VAE-like encoders that output mean and standard deviation for latents that are then sampled from a multivariate Gaussian distribution with diagonal covariance in their experiments . They run experiments on MNIST and on features extracted from the penultimate layer of pretrained models on ImageNet . While VCEB as introduced in Fisher ( 2019 ) is agnostic to the choice of stochastic encoder , Fischer ( 2020 ) mention that stochastic encoders can be similar to encoders and decoders in VAEs ( Kingma and Welling , 2013 ) or like in DVIB mentioned above . Both VAEs and DVIB explicitly parameterize the distribution of the latent to sample from it before passing samples to the decoder . Fischer and Alemi ( 2020 ) use an existing classifier architecture to output means for a Gaussian distribution with unit diagonal covariance . They further parameterize the variational approximation for the Reverse Decoder Uncertainty q ( y | z ) with one Gaussian of fixed variance per class and learn this reverse decoder during training as well . Fischer and Alemi ( 2020 ) report results on CIFAR-10 and ImageNet that show good robustness against adversarial attacks without adversarial training , similar to the results in this paper . 13We will not examine the original objective without Lagrange multipliers from Fisher ( 2019 ) here . This specific ( and not motivated ) instantiation of the VCEB objective in Fischer and Alemi ( 2020 ) is similar to the log Var [ Z | Y ] surrogate objective introduced in section 3.3 with a deterministic encoder and zero-entropy noise injection . However , the latter uses minibatch statistics instead of learning a reverse decoder , trading variational tightness for ease of computation and optimization . Compared to this prior literature , this paper examines the usage of implicit stochastic encoders ( for example when using dropout ) and presents three different simple surrogate objectives together with a principled motivation for zero-entropy noise injection , which has a dual use in enforcing meaningful compression and in simplifying the estimation of information quantities . Moreover , multi-sample approaches are examined to differentiate between Decoder Cross-Entropy and Prediction CrossEntropy . In particular , implicit stochastic encoders together with zero-entropy noise and simple surrogates make it easier to use IB objectives in practice compared to using explicitly parameterized stochastic encoders and variational approaches . F.5 An information-theoretic approach to VAEs While Alemi et al . ( 2016 ) draw a general connection to β-VAEs ( Higgins et al. , 2016 ) , we can use the insights from this paper to derive a simple VAE objective . Taking the view that VAEs learn latent representations that compress input samples , we can approach them as entropy estimators . Using H [ X ] + H [ Z | X ] = H [ X | Z ] + H [ Z ] , we obtain the ELBO H [ X ] = H [ X | Z ] + H [ Z ] − H [ Z | X ] ( 1 ) ≤ Hθ [ X | Z ] + H [ Z ] − H [ Z | X ] ( 2 ) ≤ Hθ [ X | Z ] + H [ Z ] . ( 40 ) We can also put eq . ( 40 ) into words : we want to find latent representations such that the reconstruction cross-entropy H [ X | Z ] and the latent entropy H [ Z ] , which tell us about the length encoding an input sample , become minimal and approach the true entropy as average optimal encoding length of the dataset distribution . The first inequality ( 1 ) stems from introducing a cross-entropy approximation Hθ [ X | Z ] for the conditional entropy H [ X | Z ] . The second inequality ( 2 ) stems from injection of zero-entropy noise with a stochastic encoder . For a deterministic encoder , we would have equality . We also note that ( 1 ) is the DVIB objective for a VAE with β = 1 , and ( 2 ) is the DIB objective for a VAE . Finally , we can use one of the surrogates introduced in section 3.3 to upper bound H [ Z ] . For optimization purposes , we can substitute the L2 activation regularizer E ‖Z‖2 from proposition 4 and obtain as objective min θ Hθ [ X | Z ] +E ‖Z‖2 . It turns out that this objective is examined amongst others in the recently published Ghosh et al . ( 2019 ) as a CV-VAE , which uses a deterministic encoder and noise injection with constant variance . The paper derives this objective by noticing that the explicit parameterizations that are commonly used for VAEs are cumbersome , and the actual latent distribution does often not necessarily match the induced distribution ( commonly a unit Gaussian ) which causes sampling to generate out-of-distribution data . It fits a separate density estimator on p ( z ) after training for sampling . The paper goes on to then examine other methods of regularization , but also provides experimental results on CV-VAE , which are in line with VAEs and WAEs . The derivation and motivation in the paper is different and makes no use of information-theoretic principles . Our short derivation above shows the power of using the insights from section 3.2 and 3.3 for applications outside of supervised learning . F.6 Soft clustering by entropyMinimization with Gaussian noise Consider the problem of minimizing H [ Z | Y ] and H [ Y | Z ] , in the setting where Z = fθ ( X ) + ∼ N ( 0 , σ2 ) —i.e . the embedding Z is obtained by adding Gaussian noise to a deterministic function of the input . Let the training set be enumerated x1 , . . . , xn , with µi = fθ ( xi ) . Then the distribution of Z is given by a mixture of Gaussians with the following density , where d ( x , µi ) : = ‖x − µi‖/σ2 . p ( z ) ∝ 1 n n∑ i=1 exp ( −d ( z , µi ) ) Assuming that each xi has a deterministic label yi , we then find that the conditional distributions p ( y | z ) and p ( z | y ) are given as follows : p ( z | y ) ∝ 1 ny ∑ i : yi=y exp ( −d ( z , µi ) ) p ( y | z ) = ∑ i : yi=y p ( µi | z ) = ∑ i : yi=y p ( z | µi ) p ( µi ) p ( z ) = ∑ i : yi=y p ( z | µi ) ∑n k=1 p ( z | µk ) = ∑ i : yi=y exp ( −d ( z , µi ) ) ∑n k=1 exp ( −d ( z , µk ) ) , where ny is the number of xi with class yi = y . Thus , the conditional Z|Y can be interpreted as a mixture of Gaussians and Y |Z as a Softmax marginal with respect to the distances between Z and the mean embeddings . We observe that H [ Z | Y ] is lower-bounded by the entropy of the random noise added to the embeddings : H [ Z | Y ] ≥ H [ fθ ( X ) + | Y ] ≥ H [ ] with equality when the distribution of fθ ( X ) |Y is deterministic – that is fθ is constant for each equivalence class . Further , the entropy H [ Y | Z ] is minimized when H [ Z ] is large compared to H [ Z | Y ] as we have the decomposition H [ Y | Z ] = H [ Z | Y ] − H [ Z ] + H [ Y ] . In particular , when fθ is constant over equivalence classes of the input , then H [ Y | Z ] is minimized when the entropy H [ fθ ( X ) + ] is large – i.e . the values of fθ ( xi ) for each equivalence class are distant from each other and there is minimal overlap between the clusters . Therefore , the optima of the information bottleneck objective under Gaussian noise share similar properties to the optima of geometric clustering of the inputs according to their output class . To gain a better understanding of local optimization behavior , we decompose the objective terms as follows : H [ Z | Y ] = Ep̂ ( y ) H ( p ( z | y ) || p ( z | y ) ) = Ep̂ ( x , y ) H ( p ( z | x ) || p ( z | y ) ) = Ep̂ ( x , y ) DKL ( p ( z | x ) || p ( z | y ) ) + H [ Z | x ] = Ep̂ ( x , y ) DKL ( p ( z | x ) || p ( z | y ) ) + H [ Z | X ] ︸ ︷︷ ︸ =const . To examine how the mean embedding µk of a single datapoint xk affects this entropy term , we look at the derivative of this expression with respect to µk = fθ ( xk ) . We obtain : d dµk H [ Z | Y ] = d dµk H [ Z | yk ] = d dµk Ep ( x|yk ) DKL ( p ( z | x ) || p ( z | y ) ) = ∑ i , i : yi=yk 1 nyk d dµk DKL ( p ( z | xi ) || p ( z | yk ) ) + 1 nyk d dµk DKL ( p ( z | xk ) || p ( z | yk ) ) . While these derivatives do not have a simple analytic form , we can use known properties of the KL divergence to develop an intuition on how the gradient will behave . We observe that in the left-hand sum µk only affects the distribution of Z|Y ( that is we are differentiating a sum of terms that look like a reverse KL ) , whereas it has greater influence on p ( z | xk ) in the right-hand term , and so its gradient will more closely resemble that of the forward KL . The left-hand-side term will therefore push µk towards the centroid of the means of inputs mapping to y , whereas the right-hand side term is mode-seeking . F.7 A note on differential and discrete entropies The mutual information between two random variables can be defined in terms of the KL divergence between the product of their marginals and their joint distribution . However , the KL divergence is only well-defined when the Radon-Nikodym derivative of the density of the joint with respect to the product exists . Mixing continuous and discrete distributions—and thus differential and continuous entropies—can violate this requirement , and so lead to negative values of the “ mutual information ” . This is particularly worrying in the setting of training stochastic neural networks , as we often assume that an stochastic embedding is generated as a deterministic transformation of an input from a finite dataset to which a continuous perturbation is added . We provide an examples where naive computation without ensuring that the product and joint distributions of the two random variables have a well-defined Radon-Nikodym derivative yields negative mutual information . Let X ∼ U ( [ 0 , 0.1 ] ) , Z = X + R with R ∼ U ( { 0 , 1 } ) . Then I [ X ; Z ] = H [ X ] = log 110 ≤ 0 . Generally , given X as above and an invertible function f such that Z = f ( X ) , I [ X ; Z ] = H [ X ] and can thus be negative . In a way , these cases can be reduced to ( degenerate ) expressions of the form I [ X ; X ] = H [ X ] . We can avoid these cases by adding independent continuous noise . These examples show that not adding noise can lead to unexpected results . While they still yield finite quantities that bear a relation to the entropies of the random variables , they violate some of the core assumptions we have such that mutual information is always positive . G Experiment details G.1 DNN architectures and hyperparameters For our experiments , we use PyTorch ( Paszke et al. , 2019 ) and the Adam optimizer ( Kingma and Ba , 2014 ) . In general , we use an initial learning rate of 0.5 × 10−3 and multiply the learning rate by √ 0.1 whenever the loss plateaus for more than 10 epochs for CIFAR-10 . For MNIST and Permutation MNIST , we use an initial learning rate of 10−4 and multiply the learning rate by 0.8 whenever the loss plateaus for more than 3 epochs . Sadly , we deviate from this in the following experiments : when optimizing the decoder uncertainty for categorical Z for CIFAR-10 , we used 5 epochs patience for the decoder uncertainty objective and a initial learning rate of 10−4 . We do not expect this difference to affect the qualitative results mentioned in section E when comparing to other objectives . We also only used 5 epochs patience when comparing the two cross-entropies on CIFAR-10 in section 3.2 . As this was used for both sets of experiments , it does not matter . We train the experiments for creating the information plane plots for 150 epochs . The toy experiment ( figure 3 ) is trained for 20 epochs . All other experiments train for 100 epochs . We use a batchsize of 128 for most experiments . We use a batchsize of 32 for comparing the crossentropies for CIFAR-10 ( where we take 8 dropout samples each ) , and a batchsize of 16 for MNIST ( where we take 64 dropout samples each ) . For MNIST , we use a standard dropout CNN , following https : //github.com/pytorch/ examples/blob/master/mnist/main.py . For Permutation MNIST , we use a fully-connected model ( for experiments with categorical Z in section E ) : 784 × 1024 × 1024 ×C . For CIFAR-10 , we use a regular deterministic ResNet18 model ( He et al. , 2016a ) for the experiments in section E. ( As the model outputs a categorical distribution it becomes stochastic through that and we don ’ t need stochasticity in the weights . ) For the other experiments as well as the Imagenette experiments , we use a ResNet18v2 ( He et al. , 2016b ) . When we need a stochastic model for CIFAR-10 ( for continuous Z ) , we add DropConnect ( Wan et al. , 2013b ) with rate 0.1 to all but the first convolutional layers and dropout with rate 0.1 before the final fully-connected layer . Because of memory issues , we reuse the dropout masks within one batch . The model trains to 94 % accuracy on CIFAR-10 . For CIFAR-10 , we always remove the maximum pooling layer and change the first convolutional layer to have kernel size 3 with stride 1 and padding 1 . We also use dataset augmentation during training , but not during evaluation on the training set and test set for purposes of computing metrics . We crop randomly after the padding the training images by 4 pixels in every direction and randomly flip images horizontally . We generally sample 30 values of γ for the information plane plots from the specified ranges , using a log scale . For the ablation studies mentioned below , we sample 10 values of γ each . We always sample γ = 0 separately and run a trial with it . Baselines were tuned by hand ( without regularization ) using grad-student descent and small grid searches . G.2 Cluster setup & used resources We make use of a local SLURM cluster ( Jette et al. , 2002 ) . We run our experiments on GPUs ( Geforce RTX 2080 Ti ) . We estimate reproducing all results would take 94 GPU days . G.3 Comparison of the surrogate objectives 0 0.5 1 1.5 2 H θ [ Y |Z ] I [ Y ; X |Z ] log Var [ Z ] log Var [ Z | Y ] EZ2 T rain S et 50 100 300 0 0.5 1 1.5 2 50 100 300 50 100 300 Preserved Information I [ X ; Z ] T est S et Figure G.1 : Information Plane Plot of the latent Z similar to Tishby and Zaslavsky ( 2015 ) but using a ResNet18 model on CIFAR-10 using the different regularizes from section 3.3 ( without dropout , but with zero-entropy noise ) . The dots are colored by γ . See section 4 for more details . As can be seen in figure G.2 , the different surrogate regularizers have very similar effects on H [ Z ] and H [ Z | Y ] . Regularizing with E ‖Z‖2 shows a stronger initial regularization effect , but is difficult to compare quantitatively as its hyperparameter does not map to an equivalent β , unlike regularizing using entropy estimates . Overall , we find log Var [ Z ] to provide stable training trajectories ( and expected visualizations ) while also having a more meaningful hyperparameter than E ‖Z‖2 , though E ‖Z‖2 is trivial to implement and communicate14 . log Var [ Z | Y ] performs worse which we hypothesize is due to the increased variance ( given equal batch sizes ) from conditioning on Y . It further does not minimize the Preserved Information I [ X ; Z ] as strongly as the other regularizers . G.3.1 Measurement of information quantities Measuring information quantities can be challenging . As mentionend in the introduction , there are many complex ways of measuring entropies and mutual information terms . We can side-step the issue by making use of the bounds we have established and the zero-entropy noise we are injecting , and design experiments around that . First , to estimate the Preserved Information I [ X ; Z ] , we note that when we use a deterministic model as encoder and only inject zero-entropy noise , we have H [ Z | X ] = 0 and I [ X ; Z ] = I [ X ; Z ] + H [ Z | X ] = H [ Z ] . We use the entropy estimator from Kraskov et al . ( 2004 , equation ( 20 ) ) to estimate the Encoding Entropy H [ Z ] and thus I [ X ; Z ] . 14Which is the reason why we showcase it in figure 1 and in equation ( 1 ) . 100 150 200 250 log Var [ Z ] γ 10−6 10−4 10−2 1 log Var [ Z | Y ] EZ2 H [ Z ] 0 50 100 150 500 1000 1500 2000 0 50 100 1500 50 100 150 Epoch E Z 2 Figure G.2 : Entropy estimates while training with different γ and with different surrogate regularizers on CIFAR-10 with a ResNet18 model . Entropies are estimated on training data based on Kraskov et al . ( 2004 ) . Qualitatively all three regularizers push H [ Z ] and H [ Z | Y ] down . H [ Z | Y ] is not shown here because it always stays very close to H [ Z ] . E ‖Z‖2 tends to regularize entropies more strongly for small γ . See section 4 for more details . To estimate the Residual Information I [ X ; Y | Z ] , we similarly note that I [ X ; Y | Z ] = I [ X ; Y | Z ] + H [ Y | X ] = H [ Y | Z ] . Instead of estimating the entropy using Kraskov et al . ( 2004 ) , we can use the Decoder Cross-Entropy Hθ [ Y | Z ] which provides a tighter bound as long as we also minimize Hθ [ Y | Z ] as part of the training objective . When we use stochastic models as encoder , we can not easily compute I [ X ; Z ] anymore . In the ablation study in the next section , we thus change the X axis accordingly . Similarly , when we look at the trajectories on the test set instead of the training set , for example in figure G.4 , we change the Y axis to signify the Decoder Uncertainty Hθ [ Y | Z ] . It is still an upper-bound , but we do not minimize it directly anymore . For the plots in figure 6 , we retrained the decoder on the test set to obtain a tighter bound on H [ Y | Z ] ( while keeping the encoder fixed ) . We then sampled the latent using the test set to estimate the trajectories . We only did this for the CIFAR-10 model without dropout . For our ablations , we did not retrain the decoder and thus only present plots on the test and training set , respectively . At this point , it is important to recall that the Decoder Uncertainty is also the negative log-likelihood ( when training with a single dropout sample ) , which provides a different perspective on the plots . It makes it clear that we can see how much a model overfits by comparing the best and final epochs of a trajectory in the plot ( marked by a circle and a square , respectively ) . G.3.2 Ablation study We perform an ablation study to determine whether injecting noise is necessary . Furthermore , we investigate the more interesting case of using a stochastic model as encoder , and if we can use a stochastic model without injecting zero-entropy noise . We also investigate whether log Var [ Z | Y ] performs better when we increase batchsize as we hypothesized that a batchsize of 128 does not suffice as it leaves only ≈ 13 samples per class to approximate H [ Z | Y ] ) . Figure G.3 shows a larger version of figure 6 for all three regularizers and also training trajectories on the test set . As described in the previous section , this allows us to validate that the regularizers prevent overfitting on the training set : with increasing γ , the model overfits less . Figure G.6 and figure G.5 shows that injecting noise is necessary independently of whether we use dropout or not . Regularizing with E ‖Z‖2 still has a very weak effect . We hypothesize that , similar to the toy experiment depicted in figure 3 , floating-point precision issues might provide a natural noise source eventually . This would change the effectiveness of γ and might require much higher values to observe similar regularization effects as when we do inject zero-entropy noise . Figure G.4 shows trajectories for a stochastic encoder ( as described above with DropConnect/dropout rate 0.1 ) . It overfits less than a deterministic one . Figure G.7 shows the effects of using higher dropout rates ( using DropConnect/dropout rates of 0.3/0.5 ) . It overfits less than model with DropConnect/dropout rates of 0.1/0.1 . The plots in figure G.10 show the effects of different γ with different regularizers more clearly . On both training and test set , one can clearly see the effects of regularization . Overall , log Var [ Z | Y ] performs worse as a regularizer . In figure G.8 , we compare the effect of doubling batchsize . Indeed , log Var [ Z | Y ] performs better with higher batchsize and looks closer to log Var [ Z ] . G.3.3 Comparison between Decoder Cross-Entropy and Prediction Cross-Entropy When training deterministic models or dropout models with a single sample ( as one usually does ) , the estimators for both the Decoder Cross-Entropy Hθ [ Y | Z ] and the Prediction Cross-Entropy Hθ [ Y | X ] coincide . In section 3.2 , we discuss the differences from a theoretical perspective . Here , we empirically evaluate the difference between optimizing the estimators for each of the two crossentropy losses , for which we will draw multiple dropout samples during training and inference . We examine models with continuous Z on MNIST and CIFAR-10 ( Lecun et al. , 1998 ; Krizhevsky et al. , 2009 ) . Specifically , we use a standard dropout CNN as an encoder for MNIST , and a modified ResNet18 to which we add DropConnect in each layer for CIFAR-10 . We use K = 100 dimensions for the continuous latent Z in the last fully-connected layer , and use a linear decoder to obtain the final 10-dimensional output of class logits . For MNIST , we compute the cross-entropies using 64 dropout samples ; for CIFAR-10 , we use 8 . For the purpose of this examination of training behavior , it is not necessary to achieve SOTA accuracy : our models obtain 99.2 % accuracy on MNIST and 93.6 % on CIFAR-10 . Figure G.11 shows the training error probability as well as the value of each cross-entropy loss for models trained either with the Decoder Cross-Entropy or the Prediction Cross-Entropy . The Decoder Cross-Entropy Hθ [ Y | Z ] outperforms Prediction Cross-Entropy Hθ [ Y | X ] as a training objective : the training error probability and both cross-entropies are lower when minimizing Hθ [ Y | Z ] compared to minimizing Hθ [ Y | X ] . We compare only the training , rather than the test , losses of the models to isolate the effect of each loss term on training performance ; we leave the prevention of overfitting to the regularization terms considered later . Recently , Dusenberry et al . ( 2020 ) also observed empirically that the Decoder Cross-Entropy Hθ [ Y | Z ] as an objective is both easier to optimize and provides better generalization performance . G.4 Differential entropies and noise We demonstrate the importance of adding noise to continuous latents by constructing a pathological sequence of parameters which attain monotonically improving and unbounded regularized objective values ( H [ Z ] ) while all computing the same function . We use MNIST with a standard dropout CNN as encoder , with K = 128 continuous dimensions in Z , and a K × 10 linear layer as decoder . After every training epoch , we decrease the entropy of the latent by normalizing and then scaling the latent to bound the entropy . We multiply the weights of the decoder to not change the overall function . As can be seen in figure 3 , without noise , entropy can decrease freely during training without change in error rate until it is affected by floating-point issues ; while when adding zero-entropy noise , the error rate starts increasing gradually and meaningfully as the entropy starts to approach zero . We conclude that entropy regularization is meaningful only when noise is added to the latent . G.5 Comparison between DVIB and surrogate objectives on Permutation-MNIST Comparing DVIB and our surrogate objectives is not straightforward because DVIB uses a VAE-like model that explicitly parameterize mean and standard deviation of the latent whereas the stochastic models we focus on in section 3.2 and beyond are implicit by using dropout . For this comparison , we use the same architecture and optimization strategy for DVIB as described in Alemi et al . ( 2016 ) : the encoder is a ReLU-MLP of the form 796 − 1024 − 1024 − 2K with K=256 latent dimensions that outputs mean and standard deviation explicitly and separately . For the standard deviation , we use a softplus transform with a bias of −5 . We use Polyak averaging with a decay constant of 0.999 ( Polyak and Juditsky , 1992 ) . We train the model for 200 epochs with Adam with learning rate 10−4 , β1 = 0.5 , β2 = −.999 ( Kingma and Ba , 2014 ) and decay the learning rate by 0.97 every 2 epochs . The marginal is fixed to a unit Gaussian around the origin . We use a softmax layer as decoder . We use 12 latent samples during training and test time . For our surrogate objectives , we use a similar ReLU-MLP of the form 796 − 1024 − 1024 − K with K=256 latent dimensions and dropout layers of rate 0.3 after the first and second layer . We use also 12 dropout samples during training and test time . We train for 75 epochs with Adam and learning rate 0.5 × 10−4 . We half the learning rate every time the loss does not decrease for 13 epochs . We run 5 trials for each experiments . We were not able to reproduce the baseline of an error of 1.13 % for β = 10−3 from Alemi et al . ( 2016 ) . We show a comparison in figure G.15 . Our methods do reach an error of 1.13 % overall though , so the simpler surrogate objectives perform as well good or better than DVIB . From section F.3 , we know that DVIB ’ s β would have to be twice the γ frm our section 3.3 . We can see this correspondence in the plot . This also implies that DVIB ’ s β is not related to the IB objective ’ s β from section 3 . This makes sense as DVIB arbitrarily fixes the marginal to be a unit Gaussian . 1 0 − 4 1 0 − 3 1 0 − 2 1 0 − 11 DecoderCross-EntropyHθ [ Y|Z ] ResidualInformationI [ X ; Y|Z ] lo g V a r [ Z ] γ 1 0 − 6 1 0 − 4 1 0 − 2 1 E p o ch 0 5 0 1 0 0 1 5 0 lo g V a r [ Z |Y ] E Z 2 W ei g h t D ec ay Train Set 0 .31 3 .0 Test Set 5 0 1 0 0 3 0 0 0 .3 0 .51 5 0 1 0 0 3 0 0 5 0 1 0 0 3 0 0 5 0 1 0 0 3 0 0 P re se rv ed In fo rm at io n I [ X ; Z ] IP Fi gu re G .3 : W ith ou td ro po ut bu tw ith ze ro -e nt ro py no is e : In fo rm at io n P la ne P lo to ft ra in in g tr aj ec to ri es fo r R es N et 18 m od el s on C IF A R -1 0 an d di ff er en tr eg ul ar iz er s. Th e tra je ct or ie s ar e co lo re d by th ei rr es pe ct iv e γ ; t he ir tra ns pa re nc y ch an ge s by ep oc h. C om pr es si on ( P re se rv ed In fo rm at io n ↓ ) tra de soff w ith pe rf or m an ce ( R es id ua l In fo rm at io n ↓ ) .S ee se ct io n 4 . T he ci rc le m ar ks th e fin al ep oc h of a tr aj ec to ry .T he sq ua re m ar ks th e be st ep oc h ( R es id ua lI nf or m at io n ) . 1 0 − 2 1 0 − 11 DecoderCross-EntropyHθ [ Y|Z ] ResidualInformationI [ Y ; X|Z ] lo g V a r [ Z ] γ 1 0 − 6 1 0 − 4 1 0 − 2 1 E p o ch 0 5 0 1 0 0 1 5 0 lo g V a r [ Z |Y ] E Z 2 Train Set 5 0 1 0 0 3 0 0 0 .3 0 .51 1 0 0 2 0 0 3 0 0 5 0 1 0 0 3 0 0 E n co d in g E n tr o py H [ Z ] Test Set Fi gu re G .4 : W ith dr op ou ta nd w ith ze ro -e nt ro py no is e : In fo rm at io n P la ne P lo to ft ra in in g tr aj ec to ri es fo r R es N et 18 m od el s on C IF A R -1 0 an d di ff er en tr eg ul ar iz er s. Th e tra je ct or ie s ar e co lo re d by th ei rr es pe ct iv e γ ; t he ir tra ns pa re nc y ch an ge s by ep oc h. C om pr es si on ( P re se rv ed In fo rm at io n ↓ ) tra de soff w ith pe rf or m an ce ( R es id ua l In fo rm at io n ↓ ) .S ee se ct io n 4 . T he ci rc le m ar ks th e fin al ep oc h of a tr aj ec to ry .T he sq ua re m ar ks th e be st ep oc h ( R es id ua lI nf or m at io n ) . 1 0 − 2 1 0 − 11 DecoderCross-EntropyHθ [ Y|Z ] ResidualInformationI [ Y ; X|Z ] lo g V a r [ Z ] γ 1 0 − 6 1 0 − 4 1 0 − 2 1 E p o ch 0 5 0 1 0 0 1 5 0 lo g V a r [ Z |Y ] E Z 2 Train Set -4 0 0 -2 0 0 0 2 0 0 0 .3 0 .51 -4 0 0 -2 0 0 0 2 0 0 -1 5 0 0 -1 0 0 0 -5 0 0 0 E n co d in g E n tr o py H [ Z ] Test Set Fi gu re G .5 : W ith dr op ou tb ut w ith ou tz er o- en tro py no is e : In fo rm at io n P la ne P lo to ft ra in in g tr aj ec to ri es fo r R es N et 18 m od el s on C IF A R -1 0 an d di ff er en tr eg ul ar iz er s. Th e tra je ct or ie s ar e co lo re d by th ei rr es pe ct iv e γ ; t he ir tra ns pa re nc y ch an ge s by ep oc h. C om pr es si on ( P re se rv ed In fo rm at io n ↓ ) tra de soff w ith pe rf or m an ce ( R es id ua l In fo rm at io n ↓ ) .S ee se ct io n 4 . T he ci rc le m ar ks th e fin al ep oc h of a tr aj ec to ry .T he sq ua re m ar ks th e be st ep oc h ( R es id ua lI nf or m at io n ) . 1 0 − 4 1 0 − 3 1 0 − 2 1 0 − 11 DecoderCross-EntropyHθ [ Y|Z ] ResidualInformationI [ Y ; X|Z ] lo g V a r [ Z ] γ 1 0 − 6 1 0 − 4 1 0 − 2 1 E p o ch 0 5 0 1 0 0 1 5 0 lo g V a r [ Z |Y ] E Z 2 Train Set -5 0 0 -2 5 0 0 2 5 0 0 .3 0 .51 -4 0 0 -2 0 0 0 2 0 0 -2 0 0 0 -1 5 0 0 -1 0 0 0 -5 0 0 0 P re se rv ed In fo rm at io n I [ X ; Z ] Test Set Fi gu re G .6 : W ith ou td ro po ut an d w ith ou tz er oen tr op y no is e : In fo rm at io n P la ne P lo to ft ra in in g tr aj ec to ri es fo r R es N et 18 m od el s on C IF A R -1 0 an d di ff er en t re gu la ri ze rs . T he tr aj ec to ri es ar e co lo re d by th ei r re sp ec tiv e γ ; th ei r tr an sp ar en cy ch an ge s by ep oc h. C om pr es si on ( P re se rv ed In fo rm at io n ↓ ) tr ad es -o ff w ith pe rf or m an ce ( R es id ua lI nf or m at io n ↓ ) .S ee se ct io n 4 . T he ci rc le m ar ks th e fin al ep oc h of a tr aj ec to ry .T he sq ua re m ar ks th e be st ep oc h ( R es id ua lI nf or m at io n ) . 0 .0 3 1 0 − 1 0 .31 DecoderCross-EntropyHθ [ Y|Z ] ResidualInformationI [ Y ; X|Z ] lo g V a r [ Z ] γ 1 0 − 6 1 0 − 4 1 0 − 2 1 E p o ch 0 5 0 1 0 0 1 5 0 lo g V a r [ Z |Y ] E Z 2 Train Set 5 0 1 0 0 3 0 0 0 .51 2 .0 1 0 0 2 0 0 3 0 0 5 0 1 0 0 3 0 0 E n co d in g E n tr o py H [ Z ] Test Set Fi gu re G .7 : W ith m or e dr op ou ta nd ze ro -e nt ro py no is e : In fo rm at io n P la ne P lo to ft ra in in g tr aj ec to ri es fo r R es N et 18 m od el s on C IF A R -1 0 an d lo g V ar [ Z |Y ] re gu la ri ze r w ith ba tc hs iz es 12 8 an d 25 6 . Th e tra je ct or ie s ar e co lo re d by th ei rr es pe ct iv e γ ; t he ir tra ns pa re nc y ch an ge s by ep oc h. C om pr es si on ( P re se rv ed In fo rm at io n ↓ ) tr ad es -o ff w ith pe rf or m an ce ( R es id ua lI nf or m at io n ↓ ) .S ee se ct io n 4 . T he ci rc le m ar ks th e fin al ep oc h of a tr aj ec to ry .T he sq ua re m ar ks th e be st ep oc h ( R es id ua l In fo rm at io n ) . A D ro pC on ne ct ra te of 0 . 3 an d dr op ou tr at e of 0 . 4 w er e us ed in st ea d of 0 . 1 fo re ac h. 1e-4 1e-3 1e-2 1e-1 1 D ec o d er C ro ss -E n tr o py H θ [ Y |Z ] R es id u al In fo rm at io n I [ Y ; X |Z ] log Var [ Z | Y ] ( Batchsize 128 ) γ 10−5 10−3 10−1 101 Epoch 0 50 100 150 log Var [ Z | Y ] ( Batchsize 256 ) T rain S et 50 100 300 0.3 1 3 100 200 300 Preserved Information I [ X ; Z ] T est S et Figure G.8 : Without dropout but with zero-entropy noise : Information Plane Plot of training trajectories for ResNet18 models on CIFAR-10 and log Var [ Z | Y ] regularizer with batchsizes 128 and 256 . The trajectories are colored by their respective γ ; their transparency changes by epoch . Compression ( Preserved Information ↓ ) trades-off with performance ( Residual Information ↓ ) . See section 4 . The circle marks the final epoch of a trajectory . The square marks the best epoch ( Residual Information ) . 0 0.5 1 1.5 2 H θ [ Y |Z ] I [ Y ; X |Z ] log Var [ Z ] log Var [ Z | Y ] EZ2 T rain S et 50 100 300 0 0.5 1 1.5 2 50 100 300 50 100 300 Encoding Entropy H [ Z ] T est S et Figure G.9 : Information Plane Plot of the latent Z similar to Tishby and Zaslavsky ( 2015 ) but using a ResNet18 model on CIFAR-10 using the different regularizes from section 3.3 ( with dropout and zero-entropy noise ) . The dots are colored by γ . See section 4 for more details . 0.01 0.1 1 10 100 N at s log Var [ Z ] Information Quantities Decoder Cross-Entropy Hθ [ Y |Z ] Encoding Entropy H [ Z ] log Var [ Z | Y ] EZ2 T rain S et 10−4 10−2 1 1 10 100 10−4 10−2 1 10−5 10−3 10−1 101 γ T est S et ( a ) With dropout and zero-entropy noise . 0.001 0.1 10 N at s log Var [ Z ] Information Quantities Decoder Cross-Entropy Hθ [ Y |Z ] Preserved Information I [ X ; Z ] log Var [ Z | Y ] EZ2 T rain S et 10−4 10−2 1 1 10 100 10−4 10−2 1 10−5 10−3 10−1 101 γ T est S et ( b ) Without dropout but with zero-entropy noise . -2000 -1500 -1000 -500 0 N at s log Var [ Z ] Information Quantities Decoder Cross-Entropy Hθ [ Y |Z ] Preserved Information I [ X ; Z ] log Var [ Z | Y ] EZ2 T rain S et 10−4 10−2 1 -1500 -1000 -500 0 10−4 10−2 1 10−5 10−3 10−1 γ T est S et ( c ) Without dropout and without zero-entropy noise . Figure G.10 : Information quantites for different γ at the end of training for ResNet18 models on CIFAR-10 and log Var [ Z | Y ] regularizer with batchsizes 128 and 256 . Compression ( Preserved Information ↓ ) trades-off with performance ( Residual Information ↓ ) . See section 4 . 1e-4 1e-3 1e-2 1e-1 N at s/ E rr or Test Set Objective minHθ [ Y |Z ] minHθ [ Y |X ] Metric Ep̂ ( x , y ) p ( ŷ 6= y ) Hθ [ Y |Z ] Hθ [ Y |X ] Train Set M N IS T 1e-6 1e-4 1e-2 P erm u tatio n M N IS T 0 25 50 75 100 0.001 0.01 0.1 1 0 25 50 75 100 Epoch C IFA R 1 0 Figure G.11 : Training error probability , Decoder Cross-Entropy Hθ [ Y | Z ] and Prediction CrossEntropy Hθ [ Y | X ] with continuous Z. K = 100 dimensions are used for Z , and we use dropout to obtain stochastic models . Minimizing Hθ [ Y | Z ] ( solid ) leads to smaller cross-entropies and lower training error probability than minimizing Hθ [ Y | X ] ( dashed ) . This suggests a better data fit , which is what we desire for a loss term . We run 8 trials each and plot the median with confidence bounds ( 25 % and 75 % quartiles ) . See section 3.2 and G.3.3 for more details . 0.03 10−1 0.3 1 D ec o d er C ro ss -E n tr o py H θ [ Y |Z ] R es id u al In fo rm at io n I [ Y ; X |Z ] EZ2 T rain S et γ 10−6 10−4 10−2 1 Epoch 0 50 100 150 70 100 200 Encoding Entropy H [ Z ] 0.3 0.5 1 T est S et Imagenette Figure G.12 : Information Plane Plot of the latent Z similar to Tishby and Zaslavsky ( 2015 ) but using a ResNet18v2 model on Imagenette using the E ‖Z‖2 surrogate obejctive from section 3.3 ( with dropout and zero-entropy noise ) . The dots are colored by γ . 0 0.25 0.50 0.75 1 A cc u ra cy log Var [ Z ] γ 10−6 10−4 10−2 1 log Var [ Z | Y ] EZ2 Weight Decay B asicIterative 0 0.25 0.50 0.75 1 D eep F o o l 0 0.25 0.50 0.75 1 F G S M 0 0.25 0.50 0.75 1 P G D 0.001 0.01 0.1 1 0 0.25 0.50 0.75 1 0.001 0.01 0.1 1 0.001 0.01 0.1 1 0.001 0.01 0.1 1 Epsilon R o b u stn ess Figure G.13 : Adversarial robustness of ResNet18 models trained on CIFAR-10 with surrogate objectives in comparison to regularization with L2 weight-decay as non-IB method for different attack strengths . The robustness is evaluated using FGSM , PGD , DeepFool and BasicIterative attacks of varying values . The dashed black line represents a model trained only with cross-entropy and no noise injection . We see that models trained with the surrogate IB objective ( colored by γ ) see improved robustness over a model trained only to minimize the cross-entropy training objective ( shown in black ) while the models regularized with weight-decay actually perform worse . 0 0 .2 5 0 .5 0 0 .7 51 Accuracy lo g V a r [ Z ] γ 1 0 − 6 1 0 − 4 1 0 − 2 1 lo g V a r [ Z |Y ] E Z 2 W ei g h t D ec ay BasicIterative 0 0 .2 5 0 .5 0 0 .7 51 DeepFool 0 0 .2 5 0 .5 0 0 .7 51 FGSM 0 0 .2 5 0 .5 0 0 .7 51 PGD 5 0 1 0 0 3 0 0 0 0 .2 5 0 .5 0 0 .7 51 5 0 1 0 0 3 0 0 5 0 1 0 0 3 0 0 5 0 1 0 0 3 0 0 P re se rv ed In fo rm at io n I [ X ; Z ] Robustness Fi gu re G .1 4 : Av er ag e ad ve rs ar ia lr ob us tn es s ov er ∈ [ 0 ,0 .1 ] o fR es N et 18 m od el s tr ai ne d on C IF A R -1 0 w ith su rr og at e ob je ct iv es in or L2 w ei gh t- de ca y ( a s no nIB m et ho d ) co m pa re d to no rm al ac cu ra cy fo r di ff er en ta m ou nt s of P re se rv ed In fo rm at io n. ◦ m ar ke rs sh ow ro bu st ne ss .× m ar ke rs sh ow th e no rm al ac cu ra cy .W e se e th at ro bu st ne ss de pe nd s on th e Pr es er ve d In fo rm at io n. If th e la te nt is co m pr es se se d to o m uc h , ro bu st ne ss ( a nd ac cu ra cy ) a re lo w .I ft he la te nt is no tc om pr es se d en ou gh , ro bu st ne ss an d th us ge ne ra liz at io n su ff er . 10−4 10−2 1 γ 10−2 10−1 1 T es t E rr or Regularizer log Var [ Z ] log Var [ Z | Y ] EZ2 DVIB Figure G.15 : Comparison of test error for different Lagrange multiplier for DVIB and surrogate objectives from section 3.3 on Permutation-MNIST . The purple strongly dashed line shows the test error reported for DVIB in Alemi et al . ( 2016 ) . 5 trials with 95 % confidence interval shown . Even though we could not reproduce the baseline reported in that paper , the simpler surrogate objective reach at least a similar test error as reported there . We also see that DVIB behaves similar to E ‖Z‖2 , but shifted by a factor 2 in γ , as predicted by section F.3 . H L a r g e V e r si o n o f t h e M ic k e y M o u se ID ia g r a m H ( Y |X ) Lab elU nce rta inty H ( Z|X ) En co din g U nc er ta int y I ( Y ; Z ) Pr es er ve d Re le va nt In fo rm at io n I ( X ; Y |Z ) Re sid ua l In fo rm at io n I ( X ; Z |Y ) Re du nd an t In fo rm at io n H ( Y| Z ) De co de r Un ce rta in ty H ( Z| Y ) Re ve rs e De co de r Un ce rta in ty H ( X| Y , Z ) I ( X ; Y ) Re le va nt In fo rm at io n I ( X ; Z ) Pr es er ve d In fo rm at io n Fi gu re H .1 : M ic ke y M ou se Idi ag ra m .S ee fig ur e 2 fo rd et ai ls . | This paper provides several surrogates for the Information Bottleneck (IB) and Deterministic Information Bottleneck (DIB) loss functions that are more friendly to optimization. For the decoder uncertainty part, the authors show that using Dropout and cross-entropy loss provides an unbiased estimator for the decoder cross-entropy which upperbounds the decoder uncertainty. For the regularization terms in IB/DIB, the authors inject noises to the latent features to lower-bound the conditional entropy of latent representations, and further proposes three types of surrogate objectives for the regularziation terms. Emprical results on CIFAR/ImageNette (a subset of ImageNet of 10 classes) show that the proposed surrogates yield similar behaviours in terms of adversarial robustness and information plane and the scalability of the proposed method. | SP:387bec1eff17597a83cf7174a59e8082cd1b32ba |
Reinforcement Learning with Latent Flow | 1 Introduction . Reinforcement learning ( RL ) [ 41 ] holds the promise of enabling artificial agents to solve a diverse set of tasks in uncertain and unstructured environments . Recent developments in RL with deep neural networks have led to tremendous advances in autonomous decision making . Notable examples include classical board games [ 36 , 37 ] , video games [ 29 , 6 , 45 ] , and continuous control [ 34 , 28 ] . There has been a large body of research on extracting high quality features during the RL process , such as with auxiliary losses [ 20 , 27 , 35 ] or data augmentation [ 25 , 26 ] . However , another important component in RL representation learning has been largely overlooked : a more effective architecture to incorporate temporal features . This becomes especially crucial in an unstructured real-world setup like the home when compact state representations such as calibrated sensory inputs are unavailable . Motivated by this understanding , we explore architectural improvements to better utilize temporal features for the problem of efficient and effective deep RL from pixels . ∗Equal contribution 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . Current approaches in deep RL for learning temporal features are largely heuristic in nature . A commonly employed approach is to stack the most recent frames [ 29 ] as inputs to a convolutional neural network ( CNN ) . This can be interpreted as a form of early fusion [ 24 ] , where information from the recent time window is combined at the pixel level for input to the CNN . In contrast , modern video recognition systems use alternate architectures that employ optical flow and late fusion [ 38 ] , where frames are processed individually with CNN layers before fusion and downstream processing . Late fusion is typically beneficial due to better performance , fewer parameters , and the ability to use multi-modal data [ 8 , 21 ] . However , it is not straightforward how to directly extend such architectures to RL . Real-time computation of optical flow for action selection can be computationally infeasible for many applications with fast control loops like robotics . Furthermore , optical flow computation at training time can also be prohibitively expensive . In our experiments , we also observe that a naive late fusion architecture minus the optical flow yields poor results in RL settings ( see Section 6.3 ) . This observation is consistent with recent findings in related domains like visual navigation [ 46 ] . To overcome the above challenges , we develop Flow of Latents for Reinforcement Learning ( Flare ) , a new architecture for deep RL from pixels ( Figure 4 ) . Flare can be interpreted as a structured late fusion architecture . It processes each frame individually to compute latent vectors , similar to a standard late fusion approach . Subsequently , temporal differences between the latent feature vectors are computed and fused along with the latent vectors by concatenation for downstream processing . By incorporating this structure of temporal difference in latent feature space , we provide the learning agent with appropriate inductive bias . We highlight the main empirical contributions from Flare in the following2 : 1 . Flare recovers optimal performance in state-based RL without explicit access to the state velocity , solely with positional state information . 2 . Flare achieves state-of-the-art performance compared to model-free methods on several challenging pixel-based continuous control tasks within the DeepMind control benchmark suite [ 42 ] , while being the most sample efficient model-free pixel-based RL algorithm across these tasks , outperforming the prior model-free state-of-the-art RAD on the 500k and 1M environment step benchmarks respectively ( Figure 1 ) . A video demonstration of Flare achieving SOTA performance on Quadruped Walk is in the supplementary materials . 3 . When augmented over Rainbow DQN , Flare outperforms the baseline on 5 out of 8 challenging Atari games at 100M step benchmark . Notebly , Flare scores 1668 on Montezuma ’ s Revenge , a signifcant gain over the baseline Rainbow DQN ’ s 900 . 2 Related Work . Pixel-Based RL The ability of an agent to autonomously learn control policies from visual inputs can greatly expand the applicability of deep RL [ 10 , 32 ] . Prior works have used CNNs to extend RL algorithms like PPO [ 34 ] , SAC [ 14 ] , and Rainbow [ 19 ] to pixel-based tasks . Such direct extensions have typically required substantially larger number of environment interactions when compared to the state-based environments . In order to improve sample efficiency , recent efforts have studied the use of auxiliary tasks and loss functions [ 50 , 27 , 35 ] , data augmentation [ 26 , 25 ] , and latent space 2Code : https : //github.com/WendyShang/flare dynamics modeling [ 16 , 15 ] . Despite these advances , there is still a large gap between the learning efficiency in state-based and pixel-based environments in a number of challenging benchmark tasks . Our goal in this work is to identify where and how to improve pixel-based performance on this set of challenging control environments . Neural Network Architectures in RL Mnih et al . [ 29 ] combined Q-learning with CNNs to achieve human level performance in Atari games , wherein Mnih et al . [ 29 ] concatenate the most recent 4 frames and use a convolutional neural network to output the Q values . In 2016 , Mnih et al . [ 30 ] proposed to use a shared CNN among frames to extract visual features and aggregate the temporal information with LSTM . The same architectures have been adopted by most works to date [ 27 , 35 , 25 , 26 ] . Recently , new architectures for RL have been explored that explore dense connections [ 39 ] as well as residual connections and instance norm [ 49 ] . However , the development of new architectures to better capture temporal information in a stream of images has received little attention in deep RL , and our work fills this void . Perhaps the closest to our motivation is the work of Amiranashvili et al . [ 1 ] who explicitly use optical flow as an extra input to the RL policy . However , this approach requires additional information and supervision signal to train the flow estimator , which could be unavailable or inaccurate in practice . In contrast , our approach is a simple modification to existing deep RL architectures and does not require any additional auxiliary tasks or supervision signals . Two-Stream Video Classification In video classification tasks , such as activity recognition [ 40 ] , there are a large body of works on how to utilize temporal information [ 9 , 22 , 44 , 7 , 47 , 12 ] . Of particular relevance is the two-stream architecture of Simonyan and Zisserman [ 38 ] , where one CNN stream takes the usual RGB frames , while the other the optical flow computed from the RGB values . The features from both streams are then late-fused to predict the activity class . That the two-stream architecture yields a significant performance gain compared to the single RGB stream counterpart , indicating the explicit temporal information carried by the flow plays an essential role in video understanding . Instead of directly computing the optical flow , we propose to capture the motion information in latent space to avoid computational overheads and potential flow approximation errors . Our approach also could focus on domain-specific motions that might be overlooked in a generic optical flow representation . 3 Background . Soft Actor Critic ( SAC ) [ 14 ] is an off-policy actor-critic RL algorithm for continuous control with an entropy maximization term augmented to its score function to encourage exploration . SAC learns a policy network πψ ( at|ot ) and critic networks Qφ1 ( ot , at ) and Qφ2 ( ot , at ) to estimate state-action values . The critic Qφi ( ot , at ) is optimized to minimize the ( soft ) Bellman residual error : LQ ( φi ) =Eτ∼B [ ( Qφi ( ot , at ) − ( rt + γV ( ot+1 ) ) ) 2 ] , where r is the reward , γ the discount factor , τ = ( ot , at , ot+1 , rt ) is a transition sampled from replay buffer B , and V ( ot+1 ) is the ( soft ) target value estimated by : V ( ot+1 ) =min i Qφ̄i ( ot+1 , at+1 ) − α log πψ ( at+1|ot+1 ) ] , where α is the entropy maximization coefficient . For stability , Qφ̄i is the exponential moving average of Qφi ’ s over training iterations . The policy πψ is trained to maximize the expected return estimated by Q together with the entropy term Lπ ( ψ ) = −Eat∼π [ min i Qφi ( ot , at ) − α log πψ ( at|ot ) ] , where α is also a learnable parameter . Reinforcement Learning with Augmented Data , or RAD [ 26 ] , is a recently proposed training technique . In short , RAD pre-processes raw pixel observations by applying random data augmentations , such as random translation or cropping , for RL training . As simple as it is , RAD has taken many existing RL algorithms , including SAC , to the next level . For example , on many DMControl [ 42 ] benchmarks , while vanilla pixel-based SAC performs poorly , RAD-SAC—i.e . applying data augmentation to pixel-based SAC—achieves state-of-the-art results both in sample efficiency and final performance . In this work , we refer RAD to RAD-SAC and use random translation as data augmentation . Rainbow DQN is an extension of the Deep Q Network ( DQN ) [ 29 ] , which combines multiple follow-up improvements of DQN to a single algorithm [ 19 ] . In summary , DQN [ 29 ] is an off-policy RL algorithm that leverages deep neural networks ( DNN ) to estimate the Q value directly from the pixel space . The follow-up works Rainbow DQN bring together to enhance the original DQN include double Q learning [ 17 ] , prioritized experience replay [ 33 ] , dueling network [ 48 ] , noisy network [ 13 ] , distributional RL [ 5 ] and multi-step returns [ 41 ] . Rainbow DQN is one of the state-ofthe-art RL algorithms on the Atari 2600 benchmark [ 3 ] . We thus adopt an official implementation of Rainbow [ 31 ] as our baseline to directly augment Flare on top . 4 Motivation . We motivate Flare by investigating the importance of temporal information in state-based RL . Our investigation utilizes 5 diverse DMControl [ 42 ] tasks . The full state for these environments includes both the agent ’ s pose information , such as the joints ’ positions and angles , as well as temporal information , such as the joints ’ translational and angular velocities . First , we train two variants with SAC—one where the agent receives the full state as input ( full-state SAC ) , and the other with the temporal information masked out , i.e . the agent only receives the pose information as its input ( position-only SAC ) . The resulting learning curves are in Figure 2 . While the full-state SAC learns the optimal policy quickly , the position-only SAC learns much sub-optimal policies , which often fail entirely . Therefore , we conclude that effective policies can not be learned from positions alone , and that temporal information is crucial for efficient learning . While full-state SAC can receive velocity information from internal sensors in simulation , in the more general case such as learning from pixels , such information is often not readily available . For this reason , we attempt to approximate temporal information as the difference between two consecutive states ’ positions . Concretely , we compute the positional offset δt= ( s p t−spt−1 , spt−1−spt−2 , spt−2−spt−3 ) , and provide the fused vector ( spt , δt ) to the SAC agent . This procedure describes the state-based version of Flare . Results shown in Figure 2 demonstrate that state-based Flare significantly outperforms the position-only SAC . Furthermore , it achieves optimal asymptotic performance and a learning efficiency comparable to full-state SAC in most environments . Given that the position-only SAC utilizes spt compared to Flare that utilizes s p t and δt , we also investigate a variant ( stack SAC ) where the SAC agent takes consecutive positions ( spt , s p t−1 , s p t−2 , s p t−3 ) . Stack SAC reflects the frame-stack heuristic used in pixel-based RL . Results in Figure 3 show that Flare still significantly outperforms stack SAC . It suggests that the well-structured inductive bias in the form of temporal-position fusion is essential for efficient learning . Lastly , since a recurrent structure is an alternative approach to process temporal information , we implement an SAC variant with recurrent modules ( Recurrent SAC ) to compare with Flare . Specifically , we pass a sequence of poses spt , s p t−1 , s p t−2 , s p t−3 through an LSTM cell . The number of the LSTM hidden units h is set to be the same as the dimension of δt in Flare . The trainable parameters of the LSTM cell are updated to minimize the critic loss . Recurrent SAC is more complex to implement and requires longer wall-clock training time , but performs worse than Flare as shown in Figure 3 . Our findings from the state experiments in Figure 2 and Figure 3 suggest that ( i ) temporal information is crucial to learning effective policies in RL , ( ii ) using Flare to approximate temporal information in the absence of sensors that provide explicit measurements is sufficient in most cases , and ( iii ) to incorporate temporal information via naively staking position states or a recurrent module are less effective than Flare . In the next section , we carry over these insights to pixel-space RL . | This work presents a simple technique (Flare) to incorporate explicit temporal information to enable effective RL policy learning in challenging continuous control environments using pixel-based state representations. The approach is inspired from recent advances in the video recognition approaches which employ optical flow information and late fusion to incorporate temporal information. Typically, RL algorithms employ a frame-stacking heuristic to incorporate temporal information (early fusion). Though computing optical flow is slow and can been prohibitive for real-time applications, the authors present a simple alternative to using optical flow, i.e. difference of latent state vectors as a proxy for explicitly encoding motion information with latent vectors representing the observed state (late fusion). Experimental results on challenging continuous control tasks in the DMControl Suite show that Flare can achieve up to 1.9x higher scores than a baseline algorithm (RAD) which uses the frame-stacking heuristic to incorporate temporal information. | SP:94f20c8d3fe45e4943690240a38f325fb377bf3a |
Reinforcement Learning with Latent Flow | 1 Introduction . Reinforcement learning ( RL ) [ 41 ] holds the promise of enabling artificial agents to solve a diverse set of tasks in uncertain and unstructured environments . Recent developments in RL with deep neural networks have led to tremendous advances in autonomous decision making . Notable examples include classical board games [ 36 , 37 ] , video games [ 29 , 6 , 45 ] , and continuous control [ 34 , 28 ] . There has been a large body of research on extracting high quality features during the RL process , such as with auxiliary losses [ 20 , 27 , 35 ] or data augmentation [ 25 , 26 ] . However , another important component in RL representation learning has been largely overlooked : a more effective architecture to incorporate temporal features . This becomes especially crucial in an unstructured real-world setup like the home when compact state representations such as calibrated sensory inputs are unavailable . Motivated by this understanding , we explore architectural improvements to better utilize temporal features for the problem of efficient and effective deep RL from pixels . ∗Equal contribution 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . Current approaches in deep RL for learning temporal features are largely heuristic in nature . A commonly employed approach is to stack the most recent frames [ 29 ] as inputs to a convolutional neural network ( CNN ) . This can be interpreted as a form of early fusion [ 24 ] , where information from the recent time window is combined at the pixel level for input to the CNN . In contrast , modern video recognition systems use alternate architectures that employ optical flow and late fusion [ 38 ] , where frames are processed individually with CNN layers before fusion and downstream processing . Late fusion is typically beneficial due to better performance , fewer parameters , and the ability to use multi-modal data [ 8 , 21 ] . However , it is not straightforward how to directly extend such architectures to RL . Real-time computation of optical flow for action selection can be computationally infeasible for many applications with fast control loops like robotics . Furthermore , optical flow computation at training time can also be prohibitively expensive . In our experiments , we also observe that a naive late fusion architecture minus the optical flow yields poor results in RL settings ( see Section 6.3 ) . This observation is consistent with recent findings in related domains like visual navigation [ 46 ] . To overcome the above challenges , we develop Flow of Latents for Reinforcement Learning ( Flare ) , a new architecture for deep RL from pixels ( Figure 4 ) . Flare can be interpreted as a structured late fusion architecture . It processes each frame individually to compute latent vectors , similar to a standard late fusion approach . Subsequently , temporal differences between the latent feature vectors are computed and fused along with the latent vectors by concatenation for downstream processing . By incorporating this structure of temporal difference in latent feature space , we provide the learning agent with appropriate inductive bias . We highlight the main empirical contributions from Flare in the following2 : 1 . Flare recovers optimal performance in state-based RL without explicit access to the state velocity , solely with positional state information . 2 . Flare achieves state-of-the-art performance compared to model-free methods on several challenging pixel-based continuous control tasks within the DeepMind control benchmark suite [ 42 ] , while being the most sample efficient model-free pixel-based RL algorithm across these tasks , outperforming the prior model-free state-of-the-art RAD on the 500k and 1M environment step benchmarks respectively ( Figure 1 ) . A video demonstration of Flare achieving SOTA performance on Quadruped Walk is in the supplementary materials . 3 . When augmented over Rainbow DQN , Flare outperforms the baseline on 5 out of 8 challenging Atari games at 100M step benchmark . Notebly , Flare scores 1668 on Montezuma ’ s Revenge , a signifcant gain over the baseline Rainbow DQN ’ s 900 . 2 Related Work . Pixel-Based RL The ability of an agent to autonomously learn control policies from visual inputs can greatly expand the applicability of deep RL [ 10 , 32 ] . Prior works have used CNNs to extend RL algorithms like PPO [ 34 ] , SAC [ 14 ] , and Rainbow [ 19 ] to pixel-based tasks . Such direct extensions have typically required substantially larger number of environment interactions when compared to the state-based environments . In order to improve sample efficiency , recent efforts have studied the use of auxiliary tasks and loss functions [ 50 , 27 , 35 ] , data augmentation [ 26 , 25 ] , and latent space 2Code : https : //github.com/WendyShang/flare dynamics modeling [ 16 , 15 ] . Despite these advances , there is still a large gap between the learning efficiency in state-based and pixel-based environments in a number of challenging benchmark tasks . Our goal in this work is to identify where and how to improve pixel-based performance on this set of challenging control environments . Neural Network Architectures in RL Mnih et al . [ 29 ] combined Q-learning with CNNs to achieve human level performance in Atari games , wherein Mnih et al . [ 29 ] concatenate the most recent 4 frames and use a convolutional neural network to output the Q values . In 2016 , Mnih et al . [ 30 ] proposed to use a shared CNN among frames to extract visual features and aggregate the temporal information with LSTM . The same architectures have been adopted by most works to date [ 27 , 35 , 25 , 26 ] . Recently , new architectures for RL have been explored that explore dense connections [ 39 ] as well as residual connections and instance norm [ 49 ] . However , the development of new architectures to better capture temporal information in a stream of images has received little attention in deep RL , and our work fills this void . Perhaps the closest to our motivation is the work of Amiranashvili et al . [ 1 ] who explicitly use optical flow as an extra input to the RL policy . However , this approach requires additional information and supervision signal to train the flow estimator , which could be unavailable or inaccurate in practice . In contrast , our approach is a simple modification to existing deep RL architectures and does not require any additional auxiliary tasks or supervision signals . Two-Stream Video Classification In video classification tasks , such as activity recognition [ 40 ] , there are a large body of works on how to utilize temporal information [ 9 , 22 , 44 , 7 , 47 , 12 ] . Of particular relevance is the two-stream architecture of Simonyan and Zisserman [ 38 ] , where one CNN stream takes the usual RGB frames , while the other the optical flow computed from the RGB values . The features from both streams are then late-fused to predict the activity class . That the two-stream architecture yields a significant performance gain compared to the single RGB stream counterpart , indicating the explicit temporal information carried by the flow plays an essential role in video understanding . Instead of directly computing the optical flow , we propose to capture the motion information in latent space to avoid computational overheads and potential flow approximation errors . Our approach also could focus on domain-specific motions that might be overlooked in a generic optical flow representation . 3 Background . Soft Actor Critic ( SAC ) [ 14 ] is an off-policy actor-critic RL algorithm for continuous control with an entropy maximization term augmented to its score function to encourage exploration . SAC learns a policy network πψ ( at|ot ) and critic networks Qφ1 ( ot , at ) and Qφ2 ( ot , at ) to estimate state-action values . The critic Qφi ( ot , at ) is optimized to minimize the ( soft ) Bellman residual error : LQ ( φi ) =Eτ∼B [ ( Qφi ( ot , at ) − ( rt + γV ( ot+1 ) ) ) 2 ] , where r is the reward , γ the discount factor , τ = ( ot , at , ot+1 , rt ) is a transition sampled from replay buffer B , and V ( ot+1 ) is the ( soft ) target value estimated by : V ( ot+1 ) =min i Qφ̄i ( ot+1 , at+1 ) − α log πψ ( at+1|ot+1 ) ] , where α is the entropy maximization coefficient . For stability , Qφ̄i is the exponential moving average of Qφi ’ s over training iterations . The policy πψ is trained to maximize the expected return estimated by Q together with the entropy term Lπ ( ψ ) = −Eat∼π [ min i Qφi ( ot , at ) − α log πψ ( at|ot ) ] , where α is also a learnable parameter . Reinforcement Learning with Augmented Data , or RAD [ 26 ] , is a recently proposed training technique . In short , RAD pre-processes raw pixel observations by applying random data augmentations , such as random translation or cropping , for RL training . As simple as it is , RAD has taken many existing RL algorithms , including SAC , to the next level . For example , on many DMControl [ 42 ] benchmarks , while vanilla pixel-based SAC performs poorly , RAD-SAC—i.e . applying data augmentation to pixel-based SAC—achieves state-of-the-art results both in sample efficiency and final performance . In this work , we refer RAD to RAD-SAC and use random translation as data augmentation . Rainbow DQN is an extension of the Deep Q Network ( DQN ) [ 29 ] , which combines multiple follow-up improvements of DQN to a single algorithm [ 19 ] . In summary , DQN [ 29 ] is an off-policy RL algorithm that leverages deep neural networks ( DNN ) to estimate the Q value directly from the pixel space . The follow-up works Rainbow DQN bring together to enhance the original DQN include double Q learning [ 17 ] , prioritized experience replay [ 33 ] , dueling network [ 48 ] , noisy network [ 13 ] , distributional RL [ 5 ] and multi-step returns [ 41 ] . Rainbow DQN is one of the state-ofthe-art RL algorithms on the Atari 2600 benchmark [ 3 ] . We thus adopt an official implementation of Rainbow [ 31 ] as our baseline to directly augment Flare on top . 4 Motivation . We motivate Flare by investigating the importance of temporal information in state-based RL . Our investigation utilizes 5 diverse DMControl [ 42 ] tasks . The full state for these environments includes both the agent ’ s pose information , such as the joints ’ positions and angles , as well as temporal information , such as the joints ’ translational and angular velocities . First , we train two variants with SAC—one where the agent receives the full state as input ( full-state SAC ) , and the other with the temporal information masked out , i.e . the agent only receives the pose information as its input ( position-only SAC ) . The resulting learning curves are in Figure 2 . While the full-state SAC learns the optimal policy quickly , the position-only SAC learns much sub-optimal policies , which often fail entirely . Therefore , we conclude that effective policies can not be learned from positions alone , and that temporal information is crucial for efficient learning . While full-state SAC can receive velocity information from internal sensors in simulation , in the more general case such as learning from pixels , such information is often not readily available . For this reason , we attempt to approximate temporal information as the difference between two consecutive states ’ positions . Concretely , we compute the positional offset δt= ( s p t−spt−1 , spt−1−spt−2 , spt−2−spt−3 ) , and provide the fused vector ( spt , δt ) to the SAC agent . This procedure describes the state-based version of Flare . Results shown in Figure 2 demonstrate that state-based Flare significantly outperforms the position-only SAC . Furthermore , it achieves optimal asymptotic performance and a learning efficiency comparable to full-state SAC in most environments . Given that the position-only SAC utilizes spt compared to Flare that utilizes s p t and δt , we also investigate a variant ( stack SAC ) where the SAC agent takes consecutive positions ( spt , s p t−1 , s p t−2 , s p t−3 ) . Stack SAC reflects the frame-stack heuristic used in pixel-based RL . Results in Figure 3 show that Flare still significantly outperforms stack SAC . It suggests that the well-structured inductive bias in the form of temporal-position fusion is essential for efficient learning . Lastly , since a recurrent structure is an alternative approach to process temporal information , we implement an SAC variant with recurrent modules ( Recurrent SAC ) to compare with Flare . Specifically , we pass a sequence of poses spt , s p t−1 , s p t−2 , s p t−3 through an LSTM cell . The number of the LSTM hidden units h is set to be the same as the dimension of δt in Flare . The trainable parameters of the LSTM cell are updated to minimize the critic loss . Recurrent SAC is more complex to implement and requires longer wall-clock training time , but performs worse than Flare as shown in Figure 3 . Our findings from the state experiments in Figure 2 and Figure 3 suggest that ( i ) temporal information is crucial to learning effective policies in RL , ( ii ) using Flare to approximate temporal information in the absence of sensors that provide explicit measurements is sufficient in most cases , and ( iii ) to incorporate temporal information via naively staking position states or a recurrent module are less effective than Flare . In the next section , we carry over these insights to pixel-space RL . | The paper brings very little novelty or insight. It is unclear that the introduced architecture complexity worth marginal improvements (given high variance and only 5 random seeds) on 2 out of 11 tasks (5 from the main paper and 6 from appendix). This might be a good workshop paper but it clearly does not meet the high acceptance threshold of ICLR. | SP:94f20c8d3fe45e4943690240a38f325fb377bf3a |
PolarNet: Learning to Optimize Polar Keypoints for Keypoint Based Object Detection | 1 INTRODUCTION . Deep learning based object detection techniques have achieved remarkable success in many real-world applications ( Krizhevsky et al. , 2012 ; He et al. , 2016 ; Goodfellow et al. , 2016 ) . The mainstream stateof-the-art detectors are often based on the anchor-based detection methods ( Ren et al. , 2015 ; Girshick , 2015 ; Lin et al. , 2017b ) , which heavily rely on the design and selection of appropriate anchor boxes , namely a set of predefined bounding boxes of a certain height and width , to capture various scales and aspect ratios of different object classes for detection . Unlike the anchor-based detectors , the anchor-free detectors have emerged recently as a promising direction for object detection that eliminates the need of manually designing anchor boxes ( Zhu et al. , 2019 ; Tian et al. , 2019 ; Law & Deng , 2018 ; Duan et al. , 2019 ) . In literature , a variety of anchor-free object detectors have been proposed based on different object modeling strategies . Figure 1 ( a ) - ( e ) gives examples comparing five popular anchor-free detectors from the perspective of object modeling . For example , CornerNet ( Law & Deng , 2018 ) was proposed for detecting objects using a pair of corner points . Instead of using two corners , CenterNet ( Zhou et al. , 2019a ) proposed modeling an object as one center point of its bounding box . Besides these , there are also a number of other anchor-free detectors that extend these ideas of Corner-based or Centerness-based or various other keypoint design strategies to improve the detection performance . FSAF ( Zhu et al. , 2019 ) and FCOS ( Tian et al. , 2019 ) predict objects by learning the offsets to the boundary from sampled keypoints . FCOS ( Tian et al. , 2019 ) uses many keypoints by treating every pixel as a keypoint , while FSAF ( Zhu et al. , 2019 ) samples a set of multiple keypoints from the center region to eliminate points near the boundary . Among keypoint based object detection , two different strategies are commonly adopted . One is keypoint position based ( determining the bounding box by the position of the keypoints ) such CornerNet ( Law & Deng , 2018 ) and CenterNet ( Duan et al. , 2019 ) . The other is keypoint offsets based ( determining the bounding box by learning offsets from keypoints ) such as FSAF ( Zhu et al. , 2019 ) , CenterNet ( Zhou et al. , 2019a ) and FCOS ( Tian et al. , 2019 ) . Compared to the keypoint position based methods , keypoint offset based methods are able to better capture contextual information about the objects , and are thus more commonly used to design detectors . However , existing object modeling strategies for keypoint offset based methods may be sub-optimal . Most existing anchor-free detectors such as FCOS ( Tian et al. , 2019 ) are based on Cartesian coordinates , which learn offsets to the boundary of objects . However , this kind of design yields a lot of poor quality keypoints . These points are near the boundary with extremely large variance of offsets ( See Figure 1 ( e ) ) . Besides , the prediction heads are also based on the scale-sensitive features , which further increases the optimization difficulties . Our goal is to have an anchor-free detector , which can avoid poor quality keypoints , and is able to simultaneously learn scale-insensitive feature for object prediction . To achieve this goal , in this paper , we propose a new keypoint based object detector named “ PolarNet ” , which learns keypoints based on polar coordinates . Figure 1 ( f ) illustrates the idea of the proposed PolarNet compared to the other anchor-free detectors . The set of keypoints is represented by polar coordinates to avoid large variance of offsets . And the features of corner points in PolarNet are also used to localize objects , which is scale-invariant . The key contributions of this work are : • We introduce a unified view of keypoint based object detection for understanding popular anchor-free object detectors , in which many popular anchor-free object detectors can be viewed as a special case of keypoint based detectors with different object modeling strategies ; • We propose a new anchor-free object detector named “ PolarNet ” which presents keypoints based on polar coordinates which enables learning of better quality keypoints by reducing the variance of learned offsets compared to the existing approaches . • We conduct experiments to evaluate the performance of our PolarNet detector on the COCO benchmark , in which our results show that PolarNet outperforms all the existing anchor-free detectors , and is able to achieve highly competitive results better or on par with the stateof-the-art two-stage anchor-based detectors on COCO test-dev ( 47.8 % and 50.3 % AP with DCNv2-ResNeXt-101 backbone on COCO test-dev under single-model single-scale and multi-scale settings ) . The rest of this paper is organized as follows . Section 2 reviews two major categories of related work in deep-learning based object detection : popular anchor-based detectors and recent anchor-free detectors . Section 3 presents the proposed PolarNet detector in detail . Section 4 discusses our experimental results and analysis , and Section 5 concludes this paper . 2 RELATED WORK . In this section , we briefly review two major groups of related work in the literature of deep-learning based object detection approaches : the mainstream family of anchor-based object detection methods and the emerging family of anchor-free object detection methods . We refer readers to more extensive surveys of deep-learning based object detection studies in ( Liu et al. , 2020 ; Wu et al. , 2020 ) . 2.1 ANCHOR-BASED OBJECT DETECTION . The methods in this group represent the mainstream detectors widely used in many real-world applications . They can be broadly categorized into two groups : two-stage detectors ( Ren et al. , 2015 ; Girshick et al. , 2014 ; Girshick , 2015 ) and one-stage detectors ( Liu et al. , 2016 ; Zhang et al. , 2018 ; Lin et al. , 2017b ) . Two-stage detectors consist of two stages : ( i ) region proposal generation , and ( ii ) region proposal classification and regression . For example , one of most popular two-stage detectors is Faster R-CNN ( Ren et al. , 2015 ) that uses a Region Proposal Network ( RPN ) to generate regions of interest in the first stage and then sends the region proposals down the pipeline for object classification and bounding-box regression . Faster R-CNN has resulted in many various extensions and improvements in literature ( Lin et al. , 2017a ; Dai et al. , 2017 ; 2016 ) . Single-stage detectors , also known as single-shot detectors , do not need the proposal generation and simply treat object detection as a simple classification and regression problem by taking an input image and directly learning the class probabilities and bounding box coordinates of objects via convolutional networks . Popular single-stage detectors include YOLO ( Redmon et al. , 2016 ) , SSD ( Liu et al. , 2016 ) , and RetinaNet ( Lin et al. , 2017b ) . Typically , single-stage detectors are less accurate than two-stage detectors , but they are much faster and thus more amenable to real-time inference needs . In general , anchor-based detectors suffer from some critical limitations , including requiring heuristic design of anchors , poor alignment of anchors with ground truth objects , and incurring a large number of false positives when anchors are not carefully designed . 2.2 ANCHOR-FREE OBJECT DETECTION . Here , we view most anchor-free detectors from as keypoint based detectors . We can categorize the existing anchor-free object detection methods into two groups according to different bounding box prediction strategies : 1 ) Keypoint Position and 2 ) Keypoint Offsets based detectors . We review some representative works in each group below . Keypoint Position : This kind of anchor-free detectors predict bounding box via keypoint positions , such as corners . A representative detector is CornerNet ( Law & Deng , 2018 ) . CornerNet models each object by a pair of corner keypoints , which eliminates the need of anchor boxes and is perhaps the first anchor-free detector that achieved the state-of-the-art single-stage object detection accuracy . There have been some extensions of CornerNet to improve its efficiency towards real-time applications such as CornerNet-Lite ( Law et al. , 2019 ) . Based on CornerNet , CenterNet ( Duan et al. , 2019 ) , models an object by a triplet of keypoints , including one center and two corner keypoints . ExtremeNet ( Zhou et al. , 2019b ) models an object by a set of five keypoints , including one center and four extreme points ( top-most , leftmost , bottom-most , right-most ) of an object based on a standard keypoint estimation network . RPDet ( Yang et al. , 2019 ) represents an object by a fixed set of 9 keypoints learned from the center of an object which are refined progressively during the training process . RPNet V2 ( Chen et al. , 2020 ) fuses the corner and foreground features in into the original RPNet to detect objects . Their work is in parallel with ours and shares some similarities with our corner learning module . However , our PolarNet is mainly focused on the design of the polar representation to handle scale issues based on vanilla FCOS , and the corner learning module is an auxiliary module to further enhance the feature representation of the detector . Keypoint Offsets : This kind of anchor-free detectors predict bounding box via learning offsets based on keypoints . A representative anchor-free detector is CenterNet ( Zhou et al. , 2019a ) that models an object by the center point of its bounding box , and it uses keypoint estimation to find center points and regresses to all other object properties , such as size , 3D location , orientation , and even pose . Some approaches such as FSAS ( Zhu et al. , 2019 ) and FoveaBox ( Kong et al. , 2020 ) sample many keypoints from the center region of an object and learn to predict objects . Some approaches such as FCOS ( Tian et al. , 2019 ) and SAPD ( Zhu et al. , 2020 ) treat all the pixels within an object as candidate keypoints during training and improve them by a separate post-processing strategy . These keypoint based detectors all learn offsets to the boundary of the objects based on Cartesian coordinates , which yields a lot of poor quality keypoints . Some strategies are adopted to remove these bad points such as center sampling ( Kong et al. , 2020 ; Zhu et al. , 2019 ) or centerness score ( Tian et al. , 2019 ) . Unlike the above keypoint based detectors that learn keypoints based on Cartesian coordinates , our approach learns a set of keypoints based on polar coordinates which makes it easier to learn high quality keypoints . 3 POLARNET DETECTOR . 3.1 POLAR COORDINATES VS CARTESIAN COORDINATES Many popular keypoint based detectors represent keypoints based on Cartesian coordinates . This strategy yields a lot of keypoints with poor quality ( see Figure 1 ( e ) ) , making it difficult to optimize without manually designed strategies ( such as centerness ( Tian et al. , 2019 ) or center sampling ( Zhu et al. , 2019 ) ) . A better approach for keypoints representation is thus required to avoid poor quality keypoints ( such as points near the boundary ) . In order to overcome this challenge , we represent the keypoints with polar coordinates instead of vanilla Cartesian coordinates . We learn the offsets of each keypoints pointing to the corners , which significantly reduce the scale variance of keypoints . Furthermore , the features of corners are also used for scale-insensitive localization . For each keypoint , we predict offsets based on this point to generate the bounding box . Vanilla keypoint based detectors learn keypoints based on Cartesian coordinates , which learns 4D vectors ( t , l , b , r ) , corresponding to ( top , bottom , left , right ) pointing to the boundary of the objects ( See Figure 2 ( a ) ) . In PolarNet , for each object , we learn the offsets of keypoints which point to the corners ( In this paper we use top left ( tl ) and bottom right ( br ) as the target corner pair ) . And thus for each point ( x , y ) , we predict a pair of 4D vectors : ( θtl , ρtl , θbr , ρbr ) , which point to the corners of the object ( See Figure 2 ( b ) ) . Here ρ and θ denote the distance and sine value of angle of point ( x , y ) to corner . We defer the discussion for training the keypoint predictor later . For keypoint offsets based detectors , learning offsets with large variance yields unsatisfactory results . And thus in many existing methods , poor quality points will be removed ( Zhu et al. , 2019 ) or be suppressed ( Tian et al. , 2019 ) during training . Here we analyze the scale variance of the learned offsets of the keypoints in FCOS and in PolarNet during training . Assume in FCOS and PolarNet , the learned offsets of keypoint ( x , y ) are represented as Bx , y . To show the scale variance of learned offsets , We plot the heatmaps of scale variance of the learned offsets of FCOS and PolarNet in Figure 2 ( c ) and ( d ) respectively as : k = min { Bx , y } max { Bx , y } ( 1 ) where k is the value plotted in heatmaps . In Figure 2 ( c ) , nearly all the keypoints within the objects present a large scale variance except the ones within the central region . Specifically when the point is close to the boundary , the variance of learned offsets is very large . In Figure 2 ( d ) , the majority of the keypoints in PolarNet learn offsets with much smaller scale variance compared with Figure 2 ( c ) , which significantly reduce the optimization difficulties . | This paper proposes an anchor-free object detector that does bounding box regression in the polar coordinate instead of in the Cartesian coordinate. The motivation of doing this is because there are larger variance in offset vectors in the Cartesian coordinate (the extreme case when a point is on one of the four corners of the bounding box, the offset vector becomes [0, w, 0, h]). The authors propose a solution to regress to the pair of corners (either TL+BR or TR+BL) in the polar coordinate, and select the corner pair that gives the smallest variance during training. | SP:5fbdd9020e410152a667b9c6551cab9cc3f14af3 |
PolarNet: Learning to Optimize Polar Keypoints for Keypoint Based Object Detection | 1 INTRODUCTION . Deep learning based object detection techniques have achieved remarkable success in many real-world applications ( Krizhevsky et al. , 2012 ; He et al. , 2016 ; Goodfellow et al. , 2016 ) . The mainstream stateof-the-art detectors are often based on the anchor-based detection methods ( Ren et al. , 2015 ; Girshick , 2015 ; Lin et al. , 2017b ) , which heavily rely on the design and selection of appropriate anchor boxes , namely a set of predefined bounding boxes of a certain height and width , to capture various scales and aspect ratios of different object classes for detection . Unlike the anchor-based detectors , the anchor-free detectors have emerged recently as a promising direction for object detection that eliminates the need of manually designing anchor boxes ( Zhu et al. , 2019 ; Tian et al. , 2019 ; Law & Deng , 2018 ; Duan et al. , 2019 ) . In literature , a variety of anchor-free object detectors have been proposed based on different object modeling strategies . Figure 1 ( a ) - ( e ) gives examples comparing five popular anchor-free detectors from the perspective of object modeling . For example , CornerNet ( Law & Deng , 2018 ) was proposed for detecting objects using a pair of corner points . Instead of using two corners , CenterNet ( Zhou et al. , 2019a ) proposed modeling an object as one center point of its bounding box . Besides these , there are also a number of other anchor-free detectors that extend these ideas of Corner-based or Centerness-based or various other keypoint design strategies to improve the detection performance . FSAF ( Zhu et al. , 2019 ) and FCOS ( Tian et al. , 2019 ) predict objects by learning the offsets to the boundary from sampled keypoints . FCOS ( Tian et al. , 2019 ) uses many keypoints by treating every pixel as a keypoint , while FSAF ( Zhu et al. , 2019 ) samples a set of multiple keypoints from the center region to eliminate points near the boundary . Among keypoint based object detection , two different strategies are commonly adopted . One is keypoint position based ( determining the bounding box by the position of the keypoints ) such CornerNet ( Law & Deng , 2018 ) and CenterNet ( Duan et al. , 2019 ) . The other is keypoint offsets based ( determining the bounding box by learning offsets from keypoints ) such as FSAF ( Zhu et al. , 2019 ) , CenterNet ( Zhou et al. , 2019a ) and FCOS ( Tian et al. , 2019 ) . Compared to the keypoint position based methods , keypoint offset based methods are able to better capture contextual information about the objects , and are thus more commonly used to design detectors . However , existing object modeling strategies for keypoint offset based methods may be sub-optimal . Most existing anchor-free detectors such as FCOS ( Tian et al. , 2019 ) are based on Cartesian coordinates , which learn offsets to the boundary of objects . However , this kind of design yields a lot of poor quality keypoints . These points are near the boundary with extremely large variance of offsets ( See Figure 1 ( e ) ) . Besides , the prediction heads are also based on the scale-sensitive features , which further increases the optimization difficulties . Our goal is to have an anchor-free detector , which can avoid poor quality keypoints , and is able to simultaneously learn scale-insensitive feature for object prediction . To achieve this goal , in this paper , we propose a new keypoint based object detector named “ PolarNet ” , which learns keypoints based on polar coordinates . Figure 1 ( f ) illustrates the idea of the proposed PolarNet compared to the other anchor-free detectors . The set of keypoints is represented by polar coordinates to avoid large variance of offsets . And the features of corner points in PolarNet are also used to localize objects , which is scale-invariant . The key contributions of this work are : • We introduce a unified view of keypoint based object detection for understanding popular anchor-free object detectors , in which many popular anchor-free object detectors can be viewed as a special case of keypoint based detectors with different object modeling strategies ; • We propose a new anchor-free object detector named “ PolarNet ” which presents keypoints based on polar coordinates which enables learning of better quality keypoints by reducing the variance of learned offsets compared to the existing approaches . • We conduct experiments to evaluate the performance of our PolarNet detector on the COCO benchmark , in which our results show that PolarNet outperforms all the existing anchor-free detectors , and is able to achieve highly competitive results better or on par with the stateof-the-art two-stage anchor-based detectors on COCO test-dev ( 47.8 % and 50.3 % AP with DCNv2-ResNeXt-101 backbone on COCO test-dev under single-model single-scale and multi-scale settings ) . The rest of this paper is organized as follows . Section 2 reviews two major categories of related work in deep-learning based object detection : popular anchor-based detectors and recent anchor-free detectors . Section 3 presents the proposed PolarNet detector in detail . Section 4 discusses our experimental results and analysis , and Section 5 concludes this paper . 2 RELATED WORK . In this section , we briefly review two major groups of related work in the literature of deep-learning based object detection approaches : the mainstream family of anchor-based object detection methods and the emerging family of anchor-free object detection methods . We refer readers to more extensive surveys of deep-learning based object detection studies in ( Liu et al. , 2020 ; Wu et al. , 2020 ) . 2.1 ANCHOR-BASED OBJECT DETECTION . The methods in this group represent the mainstream detectors widely used in many real-world applications . They can be broadly categorized into two groups : two-stage detectors ( Ren et al. , 2015 ; Girshick et al. , 2014 ; Girshick , 2015 ) and one-stage detectors ( Liu et al. , 2016 ; Zhang et al. , 2018 ; Lin et al. , 2017b ) . Two-stage detectors consist of two stages : ( i ) region proposal generation , and ( ii ) region proposal classification and regression . For example , one of most popular two-stage detectors is Faster R-CNN ( Ren et al. , 2015 ) that uses a Region Proposal Network ( RPN ) to generate regions of interest in the first stage and then sends the region proposals down the pipeline for object classification and bounding-box regression . Faster R-CNN has resulted in many various extensions and improvements in literature ( Lin et al. , 2017a ; Dai et al. , 2017 ; 2016 ) . Single-stage detectors , also known as single-shot detectors , do not need the proposal generation and simply treat object detection as a simple classification and regression problem by taking an input image and directly learning the class probabilities and bounding box coordinates of objects via convolutional networks . Popular single-stage detectors include YOLO ( Redmon et al. , 2016 ) , SSD ( Liu et al. , 2016 ) , and RetinaNet ( Lin et al. , 2017b ) . Typically , single-stage detectors are less accurate than two-stage detectors , but they are much faster and thus more amenable to real-time inference needs . In general , anchor-based detectors suffer from some critical limitations , including requiring heuristic design of anchors , poor alignment of anchors with ground truth objects , and incurring a large number of false positives when anchors are not carefully designed . 2.2 ANCHOR-FREE OBJECT DETECTION . Here , we view most anchor-free detectors from as keypoint based detectors . We can categorize the existing anchor-free object detection methods into two groups according to different bounding box prediction strategies : 1 ) Keypoint Position and 2 ) Keypoint Offsets based detectors . We review some representative works in each group below . Keypoint Position : This kind of anchor-free detectors predict bounding box via keypoint positions , such as corners . A representative detector is CornerNet ( Law & Deng , 2018 ) . CornerNet models each object by a pair of corner keypoints , which eliminates the need of anchor boxes and is perhaps the first anchor-free detector that achieved the state-of-the-art single-stage object detection accuracy . There have been some extensions of CornerNet to improve its efficiency towards real-time applications such as CornerNet-Lite ( Law et al. , 2019 ) . Based on CornerNet , CenterNet ( Duan et al. , 2019 ) , models an object by a triplet of keypoints , including one center and two corner keypoints . ExtremeNet ( Zhou et al. , 2019b ) models an object by a set of five keypoints , including one center and four extreme points ( top-most , leftmost , bottom-most , right-most ) of an object based on a standard keypoint estimation network . RPDet ( Yang et al. , 2019 ) represents an object by a fixed set of 9 keypoints learned from the center of an object which are refined progressively during the training process . RPNet V2 ( Chen et al. , 2020 ) fuses the corner and foreground features in into the original RPNet to detect objects . Their work is in parallel with ours and shares some similarities with our corner learning module . However , our PolarNet is mainly focused on the design of the polar representation to handle scale issues based on vanilla FCOS , and the corner learning module is an auxiliary module to further enhance the feature representation of the detector . Keypoint Offsets : This kind of anchor-free detectors predict bounding box via learning offsets based on keypoints . A representative anchor-free detector is CenterNet ( Zhou et al. , 2019a ) that models an object by the center point of its bounding box , and it uses keypoint estimation to find center points and regresses to all other object properties , such as size , 3D location , orientation , and even pose . Some approaches such as FSAS ( Zhu et al. , 2019 ) and FoveaBox ( Kong et al. , 2020 ) sample many keypoints from the center region of an object and learn to predict objects . Some approaches such as FCOS ( Tian et al. , 2019 ) and SAPD ( Zhu et al. , 2020 ) treat all the pixels within an object as candidate keypoints during training and improve them by a separate post-processing strategy . These keypoint based detectors all learn offsets to the boundary of the objects based on Cartesian coordinates , which yields a lot of poor quality keypoints . Some strategies are adopted to remove these bad points such as center sampling ( Kong et al. , 2020 ; Zhu et al. , 2019 ) or centerness score ( Tian et al. , 2019 ) . Unlike the above keypoint based detectors that learn keypoints based on Cartesian coordinates , our approach learns a set of keypoints based on polar coordinates which makes it easier to learn high quality keypoints . 3 POLARNET DETECTOR . 3.1 POLAR COORDINATES VS CARTESIAN COORDINATES Many popular keypoint based detectors represent keypoints based on Cartesian coordinates . This strategy yields a lot of keypoints with poor quality ( see Figure 1 ( e ) ) , making it difficult to optimize without manually designed strategies ( such as centerness ( Tian et al. , 2019 ) or center sampling ( Zhu et al. , 2019 ) ) . A better approach for keypoints representation is thus required to avoid poor quality keypoints ( such as points near the boundary ) . In order to overcome this challenge , we represent the keypoints with polar coordinates instead of vanilla Cartesian coordinates . We learn the offsets of each keypoints pointing to the corners , which significantly reduce the scale variance of keypoints . Furthermore , the features of corners are also used for scale-insensitive localization . For each keypoint , we predict offsets based on this point to generate the bounding box . Vanilla keypoint based detectors learn keypoints based on Cartesian coordinates , which learns 4D vectors ( t , l , b , r ) , corresponding to ( top , bottom , left , right ) pointing to the boundary of the objects ( See Figure 2 ( a ) ) . In PolarNet , for each object , we learn the offsets of keypoints which point to the corners ( In this paper we use top left ( tl ) and bottom right ( br ) as the target corner pair ) . And thus for each point ( x , y ) , we predict a pair of 4D vectors : ( θtl , ρtl , θbr , ρbr ) , which point to the corners of the object ( See Figure 2 ( b ) ) . Here ρ and θ denote the distance and sine value of angle of point ( x , y ) to corner . We defer the discussion for training the keypoint predictor later . For keypoint offsets based detectors , learning offsets with large variance yields unsatisfactory results . And thus in many existing methods , poor quality points will be removed ( Zhu et al. , 2019 ) or be suppressed ( Tian et al. , 2019 ) during training . Here we analyze the scale variance of the learned offsets of the keypoints in FCOS and in PolarNet during training . Assume in FCOS and PolarNet , the learned offsets of keypoint ( x , y ) are represented as Bx , y . To show the scale variance of learned offsets , We plot the heatmaps of scale variance of the learned offsets of FCOS and PolarNet in Figure 2 ( c ) and ( d ) respectively as : k = min { Bx , y } max { Bx , y } ( 1 ) where k is the value plotted in heatmaps . In Figure 2 ( c ) , nearly all the keypoints within the objects present a large scale variance except the ones within the central region . Specifically when the point is close to the boundary , the variance of learned offsets is very large . In Figure 2 ( d ) , the majority of the keypoints in PolarNet learn offsets with much smaller scale variance compared with Figure 2 ( c ) , which significantly reduce the optimization difficulties . | This paper proposes a new key-point based object detector, PolarNet, which predicts the distances between key-points and corner pairs (such as top-left and bottom-right pair or top-right and bottom-left pair) on polar coordinates. This is different from other key-point based object detectors such as FCOS which predicts distances between key-points and bounding box boundaries on cartesian coordinates. The authors claim that the advantage of representing the offsets in the form of polar coordinates is this representation reduces the variance in the offsets, which makes learning easier. | SP:5fbdd9020e410152a667b9c6551cab9cc3f14af3 |
Masked Label Prediction: Unified Message Passing Model for Semi-Supervised Classification | Graph neural network ( GNN ) and label propagation algorithm ( LPA ) are both message passing algorithms , which have achieved superior performance in semisupervised classification . GNN performs feature propagation by a neural network to make predictions , while LPA uses label propagation across graph adjacency matrix to get results . However , there is still no good way to combine these two kinds of algorithms . In this paper , we proposed a new Unified Message Passaging Model ( UniMP ) that can incorporate feature propagation and label propagation with a shared message passing network , providing a better performance in semisupervised classification . First , we adopt a Graph Transformer jointly label embedding to propagate both the feature and label information . Second , to train UniMP without overfitting in self-loop label information , we propose a masked label prediction strategy , in which some percentage of training labels are simply masked at random , and then predicted . UniMP conceptually unifies feature propagation and label propagation and be empirically powerful . It obtains new state-of-the-art semi-supervised classification results in Open Graph Benchmark ( OGB ) . 1 INTRODUCTION . There are various scenarios in the world , e.g. , recommending related news and products , discovering new drugs , or predicting social relations , which can be described as graph structures . Many methods have been proposed to optimize these graph-based problems and achieved significant success in many related domains such as predicting the properties of nodes ( Yang et al. , 2016 ; Kipf & Welling , 2016 ) , links ( Grover & Leskovec , 2016 ; Battaglia et al. , 2018 ) , and graphs ( Duvenaud et al. , 2015 ; Niepert et al. , 2016 ; Bojchevski et al. , 2018 ) . In the task of semi-supervised node classification , we are required to learn with labeled examples and then make predictions for those unlabeled ones . To better classify the nodes ’ labels in the graph , based on the Laplacian smoothing assumption ( Li et al. , 2018 ; Xu et al. , 2018b ) , the message passing models were proposed to aggregate the information from its connected neighbors in the graph , acquiring enough facts to produce a more robust prediction for unlabeled nodes . Generally , there are two kinds of practical methods to implement message passing model , the Graph Neural Networks ( GNNs ) ( Kipf & Welling , 2016 ; Hamilton et al. , 2017 ; Xu et al. , 2018b ; Liao et al. , 2019 ; Xu et al. , 2018a ; Qu et al. , 2019 ) and the Label Propagation Algorithms ( LPAs ) ( Zhu , 2005 ; Zhu et al. , 2003 ; Zhang & Lee , 2007 ; Wang & Zhang , 2007 ; Karasuyama & Mamitsuka , 2013 ; Gong et al. , 2016 ; Liu et al. , 2019 ) . GNNs combine graph structures by propagating and aggregating nodes features through several neural layers , which get predictions from feature propagation . While LPAs make predictions for unlabeled instances by label propagation iteratively . Since GNN and LPA are based on the same assumption , making semi-supervised classifications by information propagation , there is an intuition that incorporating them together for boosting performance . Some superior studies have proposed their graph models based on it . For example , APPNP ( Klicpera et al. , 2019 ) and TPN ( Liu et al. , 2019 ) integrate GNN and LPA by concatenating them together , and GCN-LPA ( Wang & Leskovec , 2019 ) uses LPA to regularize their GCN model . How- ever , as shown in Tabel 1 , aforementioned methods still can not incorporate GNN and LPA within a message passing model , propagating feature and label in both training and prediction procedure . To unify the feature and label propagation , there are mainly two issues needed to be addressed : Aggregating feature and label information . Since node feature is represented by embeddings , while node label is a one-hot vector . They are not in the same vector space . In addition , there are different between their message passing ways , GNNs can propagate the information by diverse neural structures likes GraphSAGE ( Hamilton et al. , 2017 ) , GCN ( Kipf & Welling , 2016 ) and GAT ( Veličković et al. , 2017 ) . But LPAs can only pass the label message by graph adjacency matrix . Supervised training . Supervised training a model with feature and label propagation will overfit in self-loop label information inevitably , which makes the label leakage in training time and causes poor performance in prediction . In this work , inspired by several advantages developments ( Vaswani et al. , 2017 ; Wang et al. , 2018 ; Devlin et al. , 2018 ) in Natural Language Processing ( NLP ) , we propose a new Unified Message Passing model ( UniMP ) with masked label prediction that can settle the aforementioned issues . UniMP is a multi-layer Graph Transformer , jointly using label embedding to transform nodes labels into the same vector space as nodes features . It propagates nodes features like the previous attention based GNNs ( Veličković et al. , 2017 ; Zhang et al. , 2018 ) . Meanwhile , its multi-head attentions are used as the transition matrix for propagating labels vectors . Therefore , each node can aggregate both features and labels information from its neighbors . To supervised training UniMP without overfitting in self-loop label information , we draw lessons from masked word prediction in BERT ( Devlin et al. , 2018 ) and propose a masked label prediction strategy , which randomly masks some training instances ’ label embedding vectors and then predicts them . This training method perfectly simulates the procedure of transducing labels information from labeled to unlabeled examples in the graph . We conduct experiments on three semi-supervised classification datasets in the Open Graph Benchmark ( OGB ) , where our new methods achieve novel state-of-the-art results in all tasks , gaining 82.56 % ACC in ogbn-products , 86.42 % ROC-AUC in ogbn-proteins and 73.11 % ACC in ogbnarxiv . We also conduct the ablation studies for the models with different inputs to prove the effectiveness of our unified method . In addition , we make the most thorough analysis of how the label propagation boosts our model ’ s performance . 2 METHOD . We first introduce our notation about graph . We denote a graph as G = ( V , E ) , where V denotes the nodes in the graph with |V | = n and E denotes edges with |E| = m. The nodes are described by the feature matrix X ∈ Rn×f , which usually are dense vectors with f dimension , and the target class matrix Y ∈ Rn×c , with the number of classes c. The adjacency matrix A = [ ai , j ] ∈ Rn×n is used to describe graph G , and the diagonal degree matrix is denoted by D = diag ( d1 , d2 , ... , dn ) , where di = ∑ j aij is the degree of node i . A normalized adjacency matrix is defined as D −1A or D− 1 2AD− 1 2 , and we adopt the first definition in this paper . 2.1 FEATURE PROPAGATION AND LABEL PROPAGATION . In semi-supervised node classification , based on the Laplacian smoothing assumption , the GNN transforms and propagates nodes features X across the graph by several layers , including linear layers and nonlinear activation to build the approximation of the mapping : X → Y . The feature propagation scheme of GNN in layer l is : H ( l+1 ) = σ ( D−1AH ( l ) W ( l ) ) Y = fout ( H ( L ) ) ( 1 ) where the σ is an activation function , W ( l ) is the trainable weight in the l-th layer , and the H ( l ) is the l-th layer representations of nodes . H ( 0 ) is equal to node input featuresX . Finally , a fout output layer is applied on the final representation to make prediction for Y . As for LPA , it also assumes the labels between connected nodes are smoothing and propagates the labels iteratively across the graph . Given an initial label matrix Ŷ ( 0 ) , which consists of one-hot label indicator vectors ŷ0i for the labeled nodes or zeros vectors for the unlabeled . A simple iteration equation of LPA is formulated as following : Ŷ ( l+1 ) = D−1AŶ ( l ) ( 2 ) Labels are propagated from each other nodes through a normalized adjacency matrix D−1A . 2.2 UNIFIED MESSAGE PASSING MODEL . As shown in Figure 1 , we employ a Graph Transformer , jointly using label embedding to construct our unified message passing model for combining the aforementioned feature and label propagation together . Graph Transformer . Since Transformer ( Vaswani et al. , 2017 ) has been proved being powerful in NLP , we employ its vanilla multi-head attention into graph learning with taking into account the case of edge features . Specifically , given nodes features H ( l ) = { h ( l ) 1 , h ( l ) 2 , ... , h ( l ) n } , we calculate multi-head attention for each edge from j to i as following : q ( l ) c , i = W ( l ) c , qh ( l ) i + b ( l ) c , q k ( l ) c , j = W ( l ) c , kh ( l ) j + b ( l ) c , k ec , ij = Wc , eeij + bc , e α ( l ) c , ij = 〈q ( l ) c , i , k ( l ) c , j + ec , ij〉∑ u∈N ( i ) 〈q ( l ) c , i , k ( l ) c , u + ec , iu〉 ( 3 ) where 〈q , k〉 = exp ( qT k√ d ) is exponential scale dot-product function and d is the hidden size of each head . For the c-th head attention , we firstly transform the source feature h ( l ) i and distant feature h ( l ) j into query vector q ( l ) c , i ∈ Rdand key vector k ( l ) c , j ∈ Rd respectively using different trainable parameters W ( l ) c , q , W ( l ) c , k , b ( l ) c , q , b ( l ) c , k . The provided edge features eij will be encoded and added into key vector as additional information for each layer . After getting the graph multi-head attention , we make a message aggregation from the distant j to the source i : v ( l ) c , j = W ( l ) c , vh ( l ) j + b ( l ) c , v ĥ ( l ) i = ∥∥∥C c=1 [ ∑ j∈N ( i ) α ( l ) c , ij ( v ( l ) c , j + ec , ij ) ] r ( l ) i = W ( l ) r h ( l ) i + b ( l ) r β ( l ) i = sigmoid ( W ( l ) g [ ĥ ( l ) i ; r ( l ) i ; ĥ ( l ) i − r ( l ) i ] ) h ( l+1 ) i = ReLU ( LayerNorm ( ( 1− β ( l ) i ) ĥ ( l ) i + β ( l ) i r ( l ) i ) ) ( 4 ) where the ‖ is the concatenation operation for C head attention . Comparing with the Equation 1 , multi-head attention matrix replaces the original normalized adjacency matrix as transition matrix for message passing . The distant feature hj is transformed to vc , j ∈ Rd for weighted sum . In addition , inspired by ( Li et al. , 2019 ; Chen et al. , 2020 ) to prevent oversmoothing , we propose a gated residual connections between layers by ri ∈ Rd and β ( l ) i ∈ R1 . Specially , similar to GAT , if we apply the Graph Transformer on the output layer , we will employ averaging for multi-head output as following : ĥ ( l ) i = 1 C C∑ c=1 [ ∑ j∈N ( i ) α ( l ) c , ij ( v ( l ) c , j + e ( l ) c , ij ) ] h ( l+1 ) i = ( 1− β ( l ) i ) ĥ ( l ) i + β ( l ) i r ( l ) i ( 5 ) Label Embedding and Propagation . We propose to embed the partially observed labels information into the same space as nodes features : Ŷ ∈ Rn×c → Ŷe ∈ Rn×f , which consist of the label embedding vector for labeled nodes and zeros vectors for the unlabeled . And then , we combine the label propagation into Graph Transformer by simply adding the nodes features and labels features together as propagation features ( H0 = X + Ŷe ) ∈ Rn×f . We can prove that by mapping partiallylabeled Ŷ and nodes features X into the same space and adding them up , our model is unifying both label propagation and feature propagation within a shared message passing framework . Let ’ s take Ŷe = Ŷ We and A∗ to be normalized adjacency matrix D−1A or the attention matrix from our Graph Transformer like Equation 3 . Then we can find that : H ( 0 ) = X + Ŷ Wc H ( l+1 ) = σ ( ( ( 1− β ) A∗ + βI ) H ( l ) W ( l ) ) ( 6 ) where β can be the gated function like Equation 4 or a pre-defined hyper-parameters like APPNP ( Klicpera et al. , 2019 ) . For simplification , we let σ function as identity function , then we can get : H ( l ) = ( ( 1− β ) A∗ + βI ) l ( X + Ŷ Wc ) W ( 1 ) W ( 2 ) . . .W ( l ) = ( ( 1− β ) A∗ + βI ) lXW + ( ( 1− β ) A∗ + βI ) lŶ WcW ( 7 ) where W = W ( 1 ) W ( 2 ) . . .W ( l ) . Then we can find that our model can be approximately decomposed into feature propagation ( ( 1 − β ) A∗ + βI ) lXW and label propagation ( ( 1 − β ) A∗ + βI ) lŶ WcW . | The paper proposes a new Graph Transformer (UniMP) based model with the motive of combining two powerful semi-supervised node classification techniques, GNN and LPA. Proposed Graph Transformer unifies feature and label propagation in conjunction to provide a better performance in semi-supervised node property classification task. UniMP also benefits from a masked label prediction strategy which is inspired by [Devlin et al.](https://arxiv.org/abs/1810.04805) | SP:f0a5dede9342f691734c7279082a8898f54e9883 |
Masked Label Prediction: Unified Message Passing Model for Semi-Supervised Classification | Graph neural network ( GNN ) and label propagation algorithm ( LPA ) are both message passing algorithms , which have achieved superior performance in semisupervised classification . GNN performs feature propagation by a neural network to make predictions , while LPA uses label propagation across graph adjacency matrix to get results . However , there is still no good way to combine these two kinds of algorithms . In this paper , we proposed a new Unified Message Passaging Model ( UniMP ) that can incorporate feature propagation and label propagation with a shared message passing network , providing a better performance in semisupervised classification . First , we adopt a Graph Transformer jointly label embedding to propagate both the feature and label information . Second , to train UniMP without overfitting in self-loop label information , we propose a masked label prediction strategy , in which some percentage of training labels are simply masked at random , and then predicted . UniMP conceptually unifies feature propagation and label propagation and be empirically powerful . It obtains new state-of-the-art semi-supervised classification results in Open Graph Benchmark ( OGB ) . 1 INTRODUCTION . There are various scenarios in the world , e.g. , recommending related news and products , discovering new drugs , or predicting social relations , which can be described as graph structures . Many methods have been proposed to optimize these graph-based problems and achieved significant success in many related domains such as predicting the properties of nodes ( Yang et al. , 2016 ; Kipf & Welling , 2016 ) , links ( Grover & Leskovec , 2016 ; Battaglia et al. , 2018 ) , and graphs ( Duvenaud et al. , 2015 ; Niepert et al. , 2016 ; Bojchevski et al. , 2018 ) . In the task of semi-supervised node classification , we are required to learn with labeled examples and then make predictions for those unlabeled ones . To better classify the nodes ’ labels in the graph , based on the Laplacian smoothing assumption ( Li et al. , 2018 ; Xu et al. , 2018b ) , the message passing models were proposed to aggregate the information from its connected neighbors in the graph , acquiring enough facts to produce a more robust prediction for unlabeled nodes . Generally , there are two kinds of practical methods to implement message passing model , the Graph Neural Networks ( GNNs ) ( Kipf & Welling , 2016 ; Hamilton et al. , 2017 ; Xu et al. , 2018b ; Liao et al. , 2019 ; Xu et al. , 2018a ; Qu et al. , 2019 ) and the Label Propagation Algorithms ( LPAs ) ( Zhu , 2005 ; Zhu et al. , 2003 ; Zhang & Lee , 2007 ; Wang & Zhang , 2007 ; Karasuyama & Mamitsuka , 2013 ; Gong et al. , 2016 ; Liu et al. , 2019 ) . GNNs combine graph structures by propagating and aggregating nodes features through several neural layers , which get predictions from feature propagation . While LPAs make predictions for unlabeled instances by label propagation iteratively . Since GNN and LPA are based on the same assumption , making semi-supervised classifications by information propagation , there is an intuition that incorporating them together for boosting performance . Some superior studies have proposed their graph models based on it . For example , APPNP ( Klicpera et al. , 2019 ) and TPN ( Liu et al. , 2019 ) integrate GNN and LPA by concatenating them together , and GCN-LPA ( Wang & Leskovec , 2019 ) uses LPA to regularize their GCN model . How- ever , as shown in Tabel 1 , aforementioned methods still can not incorporate GNN and LPA within a message passing model , propagating feature and label in both training and prediction procedure . To unify the feature and label propagation , there are mainly two issues needed to be addressed : Aggregating feature and label information . Since node feature is represented by embeddings , while node label is a one-hot vector . They are not in the same vector space . In addition , there are different between their message passing ways , GNNs can propagate the information by diverse neural structures likes GraphSAGE ( Hamilton et al. , 2017 ) , GCN ( Kipf & Welling , 2016 ) and GAT ( Veličković et al. , 2017 ) . But LPAs can only pass the label message by graph adjacency matrix . Supervised training . Supervised training a model with feature and label propagation will overfit in self-loop label information inevitably , which makes the label leakage in training time and causes poor performance in prediction . In this work , inspired by several advantages developments ( Vaswani et al. , 2017 ; Wang et al. , 2018 ; Devlin et al. , 2018 ) in Natural Language Processing ( NLP ) , we propose a new Unified Message Passing model ( UniMP ) with masked label prediction that can settle the aforementioned issues . UniMP is a multi-layer Graph Transformer , jointly using label embedding to transform nodes labels into the same vector space as nodes features . It propagates nodes features like the previous attention based GNNs ( Veličković et al. , 2017 ; Zhang et al. , 2018 ) . Meanwhile , its multi-head attentions are used as the transition matrix for propagating labels vectors . Therefore , each node can aggregate both features and labels information from its neighbors . To supervised training UniMP without overfitting in self-loop label information , we draw lessons from masked word prediction in BERT ( Devlin et al. , 2018 ) and propose a masked label prediction strategy , which randomly masks some training instances ’ label embedding vectors and then predicts them . This training method perfectly simulates the procedure of transducing labels information from labeled to unlabeled examples in the graph . We conduct experiments on three semi-supervised classification datasets in the Open Graph Benchmark ( OGB ) , where our new methods achieve novel state-of-the-art results in all tasks , gaining 82.56 % ACC in ogbn-products , 86.42 % ROC-AUC in ogbn-proteins and 73.11 % ACC in ogbnarxiv . We also conduct the ablation studies for the models with different inputs to prove the effectiveness of our unified method . In addition , we make the most thorough analysis of how the label propagation boosts our model ’ s performance . 2 METHOD . We first introduce our notation about graph . We denote a graph as G = ( V , E ) , where V denotes the nodes in the graph with |V | = n and E denotes edges with |E| = m. The nodes are described by the feature matrix X ∈ Rn×f , which usually are dense vectors with f dimension , and the target class matrix Y ∈ Rn×c , with the number of classes c. The adjacency matrix A = [ ai , j ] ∈ Rn×n is used to describe graph G , and the diagonal degree matrix is denoted by D = diag ( d1 , d2 , ... , dn ) , where di = ∑ j aij is the degree of node i . A normalized adjacency matrix is defined as D −1A or D− 1 2AD− 1 2 , and we adopt the first definition in this paper . 2.1 FEATURE PROPAGATION AND LABEL PROPAGATION . In semi-supervised node classification , based on the Laplacian smoothing assumption , the GNN transforms and propagates nodes features X across the graph by several layers , including linear layers and nonlinear activation to build the approximation of the mapping : X → Y . The feature propagation scheme of GNN in layer l is : H ( l+1 ) = σ ( D−1AH ( l ) W ( l ) ) Y = fout ( H ( L ) ) ( 1 ) where the σ is an activation function , W ( l ) is the trainable weight in the l-th layer , and the H ( l ) is the l-th layer representations of nodes . H ( 0 ) is equal to node input featuresX . Finally , a fout output layer is applied on the final representation to make prediction for Y . As for LPA , it also assumes the labels between connected nodes are smoothing and propagates the labels iteratively across the graph . Given an initial label matrix Ŷ ( 0 ) , which consists of one-hot label indicator vectors ŷ0i for the labeled nodes or zeros vectors for the unlabeled . A simple iteration equation of LPA is formulated as following : Ŷ ( l+1 ) = D−1AŶ ( l ) ( 2 ) Labels are propagated from each other nodes through a normalized adjacency matrix D−1A . 2.2 UNIFIED MESSAGE PASSING MODEL . As shown in Figure 1 , we employ a Graph Transformer , jointly using label embedding to construct our unified message passing model for combining the aforementioned feature and label propagation together . Graph Transformer . Since Transformer ( Vaswani et al. , 2017 ) has been proved being powerful in NLP , we employ its vanilla multi-head attention into graph learning with taking into account the case of edge features . Specifically , given nodes features H ( l ) = { h ( l ) 1 , h ( l ) 2 , ... , h ( l ) n } , we calculate multi-head attention for each edge from j to i as following : q ( l ) c , i = W ( l ) c , qh ( l ) i + b ( l ) c , q k ( l ) c , j = W ( l ) c , kh ( l ) j + b ( l ) c , k ec , ij = Wc , eeij + bc , e α ( l ) c , ij = 〈q ( l ) c , i , k ( l ) c , j + ec , ij〉∑ u∈N ( i ) 〈q ( l ) c , i , k ( l ) c , u + ec , iu〉 ( 3 ) where 〈q , k〉 = exp ( qT k√ d ) is exponential scale dot-product function and d is the hidden size of each head . For the c-th head attention , we firstly transform the source feature h ( l ) i and distant feature h ( l ) j into query vector q ( l ) c , i ∈ Rdand key vector k ( l ) c , j ∈ Rd respectively using different trainable parameters W ( l ) c , q , W ( l ) c , k , b ( l ) c , q , b ( l ) c , k . The provided edge features eij will be encoded and added into key vector as additional information for each layer . After getting the graph multi-head attention , we make a message aggregation from the distant j to the source i : v ( l ) c , j = W ( l ) c , vh ( l ) j + b ( l ) c , v ĥ ( l ) i = ∥∥∥C c=1 [ ∑ j∈N ( i ) α ( l ) c , ij ( v ( l ) c , j + ec , ij ) ] r ( l ) i = W ( l ) r h ( l ) i + b ( l ) r β ( l ) i = sigmoid ( W ( l ) g [ ĥ ( l ) i ; r ( l ) i ; ĥ ( l ) i − r ( l ) i ] ) h ( l+1 ) i = ReLU ( LayerNorm ( ( 1− β ( l ) i ) ĥ ( l ) i + β ( l ) i r ( l ) i ) ) ( 4 ) where the ‖ is the concatenation operation for C head attention . Comparing with the Equation 1 , multi-head attention matrix replaces the original normalized adjacency matrix as transition matrix for message passing . The distant feature hj is transformed to vc , j ∈ Rd for weighted sum . In addition , inspired by ( Li et al. , 2019 ; Chen et al. , 2020 ) to prevent oversmoothing , we propose a gated residual connections between layers by ri ∈ Rd and β ( l ) i ∈ R1 . Specially , similar to GAT , if we apply the Graph Transformer on the output layer , we will employ averaging for multi-head output as following : ĥ ( l ) i = 1 C C∑ c=1 [ ∑ j∈N ( i ) α ( l ) c , ij ( v ( l ) c , j + e ( l ) c , ij ) ] h ( l+1 ) i = ( 1− β ( l ) i ) ĥ ( l ) i + β ( l ) i r ( l ) i ( 5 ) Label Embedding and Propagation . We propose to embed the partially observed labels information into the same space as nodes features : Ŷ ∈ Rn×c → Ŷe ∈ Rn×f , which consist of the label embedding vector for labeled nodes and zeros vectors for the unlabeled . And then , we combine the label propagation into Graph Transformer by simply adding the nodes features and labels features together as propagation features ( H0 = X + Ŷe ) ∈ Rn×f . We can prove that by mapping partiallylabeled Ŷ and nodes features X into the same space and adding them up , our model is unifying both label propagation and feature propagation within a shared message passing framework . Let ’ s take Ŷe = Ŷ We and A∗ to be normalized adjacency matrix D−1A or the attention matrix from our Graph Transformer like Equation 3 . Then we can find that : H ( 0 ) = X + Ŷ Wc H ( l+1 ) = σ ( ( ( 1− β ) A∗ + βI ) H ( l ) W ( l ) ) ( 6 ) where β can be the gated function like Equation 4 or a pre-defined hyper-parameters like APPNP ( Klicpera et al. , 2019 ) . For simplification , we let σ function as identity function , then we can get : H ( l ) = ( ( 1− β ) A∗ + βI ) l ( X + Ŷ Wc ) W ( 1 ) W ( 2 ) . . .W ( l ) = ( ( 1− β ) A∗ + βI ) lXW + ( ( 1− β ) A∗ + βI ) lŶ WcW ( 7 ) where W = W ( 1 ) W ( 2 ) . . .W ( l ) . Then we can find that our model can be approximately decomposed into feature propagation ( ( 1 − β ) A∗ + βI ) lXW and label propagation ( ( 1 − β ) A∗ + βI ) lŶ WcW . | The authors proposed a unified message passing model to make a graph neural network to be able to incorporate both label propagation and feature propagation. Compared to previous work, the proposed model can also make use of partial label information in both training and inference stages. Experiments on three OGBN datasets show that the proposed methods achieve promising performance. | SP:f0a5dede9342f691734c7279082a8898f54e9883 |
A frequency domain analysis of gradient-based adversarial examples | 1 INTRODUCTION . Recently , deep neural networks ( DNN ) have achieved great success in the field of image processing , but it was found that DNNs are vulnerable to some synthetic data called adversarial examples ( ( Szegedy et al. , 2013 ) , ( Kurakin et al. , 2016 ) ) . Adversarial examples are natural samples plus adversarial perturbations , and the perturbations between natural samples and adversarial examples are imperceptible to human but able to fool the model . Typically , generating an adversarial example can be considered as finding an example in an -ball around a natural image that could be misclassified by the classifier . Recent studies designed Fast Gradient Sign Method ( FGSM , ( Goodfellow et al. , 2014 ) ) , Fast Gradient Method ( FGM , ( Miyato et al. , 2016 ) ) , Projected Gradient Descent ( PGD , ( Madry et al. , 2017 ) ) and other algorithms ( Carlini & Wagner ( 2017 ) , ( Su et al. , 2019 ) , ( Xiao et al. , 2018 ) , ( Kurakin et al. , 2016 ) , ( Chen et al. , 2017 ) ) to attack the model . Since the phenomenon of adversarial examples was discovered , many related works have made progress to study why they exist . Several works studied this phenomenon from the perspective of feature representation . Ilyas et al . ( 2019 ) divided the features into non-robust ones that are responsible for the model ’ s vulnerability to adversarial examples , and robust ones that are close to human perception . Further , they showed that adversarial vulnerability arises from non-robust features that are useful for correct classification . Another way to characterize adversarial examples is to investigate them in the frequency domain via Fourier transform . Wang et al . ( 2020a ) divided an image into low-frequency component ( LFC ) and high-frequency component ( HFC ) and they empirically showed that human can only perceive LFC , but convolutional neural networks can obtain useful information from both LFC and HFC . Yin et al . ( 2019 ) filters out the input data with low-pass or high-pass filters to study the sensitivity of the additive noise with different frequencies . Wang et al . ( 2020b ) claimed that existing adversarial attacks mainly concentrate in the high-frequency part . Sharma et al . ( 2019 ) found that when perturbations are constrained to the low-frequency subspace , they are generated faster and are more transferable , and will be effective to fool the defended models , but not for clean models . All of these works showed that spectrum in frequency domain is an reasonable way to study the adversarial examples . However , there is a lack of theoretical understanding about the dynamics of the adversarial perturbations in frequency domain along the training process of the model parameters . In this work , we focus on the frequency domain of the adversarial perturbations to explore the spectral properties of the adversarial examples generated by FGM ( Miyato et al. , 2016 ) and PGD ( Madry et al. , 2017 ) . In this work , we give a theoretical analysis in frequency domain of natural images for the adversarial examples . • For a two-layer neural network with non-linear activation function , we prove that adversarial perturbations by FGM and l2-PGD attacks gradually increase the concentration in the low-frequency part of the spectrum during the training process over model parameters . • Meanwhile , the log-spectrum difference of the adversarial examples ( the definition will be clarified in Section 2.2 ) will be more concentrated in the high-frequency part than the low-frequency part . • Furthermore , we show that the ratio of the high-frequency and the low-frequency part in the adversarial perturbation is much larger than that in the corresponding clean image . Empirically , • we design several experiments on the two-layer model and Resnet-32 with CIFAR-10 to verify the above findings . • Based on these phenomena , we filter out the high-frequency part of the adversarial examples before feeding them to the model to improve the robustness . Compared with the adversarially trained model with the same architecture , our method achieves comparable robustness with the similar computational cost of normal training and almost no loss of accuracy . The rest of the paper is organized as follows : In Section 2 , we present preliminaries and some theoretical analysis on the calculation of the spectrum and log-spectrum . Then we provide our main results about the frequency domain analysis of gradient-based adversarial examples in Section 3 . Furthermore , some experiments for supporting our theoretical findings are shown in Section 4 . Finally we conclude our work and conduct a discussion about the future work in Section 5 . All the details about the proof and experiments are shown in the Appendix . 2 BACKGROUND . 2.1 PRELIMINARIES . Notations We use { 0 , 1 , ... , d } to denote the set of all integers between 0 and d and use ‖ · ‖p to denote lp norm . Specifically , we denote by ‖ · ‖ the l2 norm . For a d-dimensional vector x , we use xµ to denote its µ-th component with index starting at 0 . For a scalar function f ( x ) : Rd 7→ R , ∇xf and ∂µf denote the gradient vector and its µ-th component . We let sgn ( x ) = 1 for x > 0 and −1 for x < 0 . Normal training refers to training on the original training data for learning the optimal weights for the neural networks . x̃ = F ( x ) denotes the Discrete Fourier Transform ( DFT ) of x. Discrete Fourier Transform The k-th frequency component g̃ [ k ] of one-dimensional DFT of a vector g is defined by g̃ [ k ] = F ( g ) [ k ] = d−1∑ µ=0 gµe ik 2πd µ , where k ∈ { −d/2 , −d/2 + 1 , ... , d/2 } if d is even and k ∈ { − ( d − 1 ) /2 , ... , ( d − 1 ) /2 } if d is odd . For convenience , we always consider an odd d and one can easily generalize the case to even dimensions . For an integer cut-off ( cutoff frequency ) kr ∈ ( 0 , ( d− 1 ) /2 ) , the Low Frequency Components ( LFC ) and High Frequency Components ( HFC ) of g̃ are denoted by g̃l [ k ] = { g̃ [ k ] if − kc ≤ k ≤ kc , 0 otherwise g̃h [ k ] = { 0 if − kc ≤ k ≤ kc , g̃ [ k ] otherwise . Then the frequency space Rd can be decomposed as Sl ⊕ Sh where g̃l ∈ Sl and g̃h ∈ Sh . LetNg̃ =√∑d/2 k=−d/2 |g̃ [ k ] |2 , then the ratio of a frequency component with respect to the whole frequency spectrum is denoted by τ ( g̃ [ k ] ) = |g̃ [ k ] |2 N2g̃ and the ratio of LFC is denoted by τ ( g̃ ∈ Sl ) = kc∑ k=−kc |g̃ [ k ] |2 N2g̃ . Setup In this paper , we consider a two-layer neural network f : Rd 7→ R f ( x , θ ) = m∑ r=1 arσ ( w T r x ) ( 1 ) where σ is an activation function , a = ( a1 , a2 , ... , am ) T is an m-dimensional vector and wr ’ s are d-dimensional weight vectors . Van der Schaaf & van Hateren ( 1996 ) showed that natural images obey a power law in the frequency domain . Therefore , to make our settings closer to widely studied image related tasks , we also assume our input x obey the power law |x̃ [ k ] | ∝ k−α to imitate LFC-concentrated images , where the constant α ≥ 1 and |x̃ [ 0 ] | = α0 is another constant . Besides , we choose the cut-off kc in such a way that kc∑ k=1 1 k2α + α20 > ( d−1 ) /2∑ k=kc+1 1 k2α , ( 2 ) which indicates that τ ( x̃ ∈ Sl ) > τ ( x̃ ∈ Sh ) and can be easily satisfied for a small kc . Gradient-based adversarial attack For a loss function ` , we find lp-norm -bounded adversarial perturbations by solving the optimization problem max ‖δ‖p≤ ` ( f ( x+ δ ) , y ) , where ( x , y ) ∈ Rd × R is d-dimensional input and output following the joint distribution D. To solve the above optimization problem , Goodfellow et al . ( 2014 ) proposed FGSM , an attack for an l∞-bounded adversary , and computed an adversarial example as xadv = x + sgn ( ∇x ` ( θ , x , y ) ) . Miyato et al . ( 2016 ) proposed FGM with an l2-bounded adversary , xadv = x+ ∇x ` ( x , y ) ‖∇x ` ( x , y ) ‖2 . Madry et al . ( 2017 ) introduced PGD which training adversarial examples in an iterative way that xt+1 = Πx+S ( x t + α sgn ( ∇x ` ( θ , x , y ) ) ) or xt+1 = Πx+S ( xt + α ∇x ` ( x , y ) ‖∇x ` ( x , y ) ‖2 ) To simplify the analysis , we make the following assumptions on the normal training process : Assumption 1 There exist β′ , β > 0 such that β′ ≤ |∂ ` /∂f | ≤ β . Assumption 2 If ` = 12 ( y − f ( x , θ ) ) 2 , |∂ ` /∂f | should be a small quantity such that |∂ ` /∂f | = 1+v if the network is well trained in the end stage of normal training , where 0 < v < 1 . Assumption 3 There exist λ , γ > 0 such that 0 ≤ σ′ ≤ λ and 0 ≤ σ′′ ≤ γ1 . Assumption 4 ar ’ s are i.i.d drawn from a distribution2 and will not be updated during the training . 1e.g . λ = 1 and γ = 1 4 if σ = ln ( 1 + ex ) . 2e.g . Bernoulli distribution . 2.2 EXPLORING THE LOG-SPECTRUM AND SPECTRUM . Wang et al . ( 2020a ) considered the log-spectrum of an image : 20 ∗ log ( |F ( x ) | ) , where x is a 2ddimensional matrix representing an image . One way to calculate the ” log-spectrum difference of the adversarial examples ” is to consider the difference between the log-spectrum of the adversarial and natural image and as follows , 20 ∗ |log ( |F ( x+ δ ) | ) − log ( |F ( x ) | ) | ≈ 20 ∗ ∣∣∣∣log ( 1 + |F ( δ ) ||F ( x ) | ) ∣∣∣∣ ≈ 20 ∗ |F ( δ ) ||F ( x ) | . ( 3 ) We can observe that this quantity is approximately proportional to the ratio of the perturbation ’ s over the natural image ’ s frequency . Moreover , the average Relative Change in discrete cosine Transforms ( RCT ) in ( Wang et al. , 2020b ) ) approximately equals to it . Fig . 5 empirically shows that this ratio is large for high frequency component but small for low frequency one . However , Van der Schaaf & van Hateren ( 1996 ) claimed that the LFC of F ( x ) is much bigger than its HFC , and the right side of Eq . 3 is inversely proportional to F ( x ) . The denominator of the right side of Eq . ( 3 ) in low-frequency part is much larger than it in high frequency part , so it may be imprudent to consider the frequency distribution of the adversarial perturbations only based on the ratio in the right side of Eq. ( 3 ) . Yin et al . ( 2019 ) provided another spectral measurement for adversarial examples . They considered the ” spectrum of the adversarial perturbation ” |F ( δ ) | , which directly reflects the distribution of adversarial perturbations in the frequency domain . Unfortunately , they claimed that ‘ The adversarial perturbations for the normally trained model are uniformly distributed across frequency components ’ without sufficient empirical and theoretical justification . In this work , we provide a totally different theoretical finding that the adversarial perturbations for the normally trained model are gradually concentrated in the low-frequency domain , further verified by extensive experiments . Fig . 1 visually shows the calculation methods of the spectrum of perturbations F ( δ ) and the logspectrum difference of adversarial examples | log ( |F ( x+ δ ) | ) − log ( |F ( x ) | ≈ |F ( δ ) ||F ( x ) | . 3 MAIN RESULTS In Section 3.1 , we show that , for a well trained two-layer neural network described in Eq . ( 1 ) with LFC-concentrated inputs , l2norm adversarial perturbations generated by FGM ( Theorem 1 ) prefer to concentrate in the low frequency domain . Section 3.2 theoretically proves the HFC-concentration of the logspectrum difference of adversarial examples . Section 3.3 attempts to demonstrate the effectiveness of masking the HFC of the adversarial examples to improve model ’ s robustness despite that perturbations can concentrate in the low frequency domain . All technical proofs are deferred to Appendix A . Results on l2 PGD perturbations are presented in Appendix B . In this work , we consider the two-layer neural networks and the loss function ` = 1 2 ( y − f ( x , θ ) ) 2 . For any x in this setting , we have ∂f ∂ar = σ ( wTr x ) , ∂f ∂wr = a′rx , ∇xf = ∑ r a′rwr , where a′r = arσ ′ ( wTr x ) and a ′ = ( a′1 , a ′ 2 , ... , a ′ m ) . At the ( t+ 1 ) -th step of gradient descent in the normal training process of the classifier , weight w is updated as w ( t+1 ) r = w ( t ) r − η ∂ ` ∂f ( t ) a′ ( t ) r x . ( 4 ) We use Lx and Hx to denote the LFC and HFC of the clean input Lx = kc∑ k=0 |x̃ [ k ] |2 and Hx = ( d−1 ) /2∑ k=kc+1 |x̃ [ k ] |2 . ( 5 ) 3.1 SPECTRAL TRAJECTORIES OF l2-NORM FGM PERTURBATIONS Consider the l2-norm FGM perturbation δ and its DFT δ̃ [ k ] δ = ∂ ` ∂f ∇xf ‖ ∂ ` ∂f ∇xf‖ , δ̃ [ k ] = sgn ( ∂ ` ∂f ) 1 ‖∇xf‖ ∇̃f [ k ] , ( 6 ) where ∇̃f [ k ] = F ( ∇xf ) [ k ] . Since the coefficient before ∇̃f [ k ] in ( 6 ) is same for different frequencies k , we only need to analyze the spectrum of ∇̃f [ k ] to investigate the ratio of certain frequency component over the whole frequency spectrum , i.e . τ ( δ̃ [ k ] ) = τ ( ∇̃f [ k ] ) . ( 7 ) In this subsection , we explore the evolving of τ ( δ̃ [ k ] ) along the normal training process . For a randomly initialized network , the FGM-attack perturbation will not have bias towards either HFC or LFC . We attack this model with FGM at each step of the normal training to study the trajectory of these perturbations in the frequency domain . According to Eq . ( 4 ) , ∇xf is updated to the order of η at the ( t+ 1 ) -th step as ∇xf ( t+1 ) = m∑ r=1 ( 1− η ( t ) r ) a′ ( t ) r w ( t ) r − η̃ ( t ) x+O ( η2 ) , where η ( t ) r = ηar‖x‖2 ∂ ` ∂f ( t ) σ′′ ( t ) ( w ( t ) T r x ) and η̃ ( t ) = η ∂ ` ∂f ( t ) ‖a′ ( t ) ‖2 are composite learning rates for easing our notation . For ReLU activation function σ ( x ) = max ( 0 , x ) , we have that η ( t ) r = Ei∈ { 1,2 , ... , m } [ η ( t ) i ] , therefore , considering that Softplus has similar shape as ReLU , we derive that η ( t ) r = η̄ ( t ) + O ( η2 ) , where η̄ ( t ) = η‖x‖2 ∂ ` ∂f ( t ) Er∈ { 1,2 , ... , m } [ arσ ′′ ( t ) ( w ( t ) T r x ) ] . In this way , the 1d-DFT of ∇xf ( t+1 ) has the following form , ∇̃f ( t+1 ) [ k ] = ( 1− η̄ ( t ) ) ∇̃f ( t ) [ k ] − η̃ ( t ) x̃ [ k ] . ( 8 ) We are now ready to study the trajectory of τ ( δ̃ [ k ] ) along the training step t. Let 4ϕ ( t ) k denote the difference of phases between ∇̃f ( t ) [ k ] and x̃ [ k ] for frequency k at the t-th step . And for ease of notation , denote 4τ ( t ) l , −2 kc∑ k=0 |∇̃f ( t ) [ k ] | |x̃ [ k ] | cos ( 4ϕ ( t ) k ) , 4τ ( t ) h , −2 ( d−1 ) /2∑ k=kc+1 |∇̃f ( t ) [ k ] | |x̃ [ k ] | cos ( 4ϕ ( t ) k ) , where η̃ ( t ) 4τ ( t ) l and η̃ ( t ) 4τ ( t ) h are approximately changed amounts for LFC and HFC of |∇̃f ( t ) |2 at the t-th step of the normal training of the network , respectively . Since the network is randomly initialized and the clean inputs x are highly concentrated in the low frequency domain , we always study the case where τ ( δ̃ ( 0 ) ∈ Sl ) < τ ( x̃ ∈ Sl ) . We now , taking Eq . ( 7 ) into consideration , present our main theorem about l2 norm FGM perturbations as follows . Theorem 1 ( The spectral trajectory of l2 FGM perturbation ) During the training process of the two-layer neural network f ( x ) in ( 1 ) , the l2 norm FGM adversarial perturbation will change its ratio of LFC , τ ( δ̃ ∈ Sl ) , at the ( t+ 1 ) -th step as follows , τ ( δ̃ ( t+1 ) ∈ Sl ) = τ ( δ̃ ( t ) ∈ Sl ) + η̃ ( t ) 4τ ( t ) l τ ( δ̃ ( t ) ∈ Sh ) −4τ ( t ) h τ ( δ̃ ( t ) ∈ Sl ) ∑ ( d−1 ) /2 k=0 |∇̃f ( t+1 ) [ k ] |2 ; ( 9 ) there will be a t1 s.t . ∀t ≥ t1 , we have τ ( δ̃ ( t+1 ) ∈ Sl ) > τ ( δ̃ ( t ) ∈ Sl ) . ( 10 ) Remark According to theorem 1 , during the normal training process for a randomly initialized network with LFC-concentrated input , there will be a t0 s.t . ∀t ≥ t0 , we have 4τ ( t ) l > 4τ ( t ) h , and τ ( δ̃ ( t+1 ) ∈ Sl ) > τ ( δ̃ ( t ) ∈ Sl ) if τ ( δ̃ ( t ) ∈ Sl ) < τ ( δ̃ ( t ) ∈ Sh ) . For ReLU activa- tion function , starting with τ ( δ̃ ( 0 ) ∈ Sl ) = 1/2 − ζ and 4τ ( 0 ) l = 4τ ( 0 ) h + bζ , we have t0 = max { 0 , − bζnηβ′ ( Lx−Hx ) } , where n = mint∈ [ 0 , t0 ] ‖a′ ( t ) ‖2 . Besides , given such a net- work trained with at least t0 steps , there will be a t1 > t0 such that 4τ ( t1 ) l τ ( δ̃ ( t1 ) ∈ Sh ) ≥ 4τ ( t1 ) h τ ( δ̃ ( t1 ) ∈ Sl ) and FGM perturbation will increase its ratio of LFC for all t > t1 no matter whether it is smaller than 1/2 . Finally , if τ ( δ̃ ( t2 ) ∈ Sl ) > τ ( δ̃ ( t2 ) ∈ Sh ) for some t2 > t0 , this relation will hold for any t ≥ t2 . | This paper analyzes the frequency spectrum of adversarial perturbations during normal training. The authors show that the low frequency component (LFC) of adversarial perturbation is increasing during training, but it is not increasing fast enough, so the LFC of adversarial perturbation is not as dense as the input natural images which obey the power law. Therefore, the log-spectrum difference of adversarial examples will express a HFC-concentrated phenomenon. The authors used theory and experiments to demonstrate this point. | SP:8d9605171acd6c661b43648ad897a66665e5ea9f |
A frequency domain analysis of gradient-based adversarial examples | 1 INTRODUCTION . Recently , deep neural networks ( DNN ) have achieved great success in the field of image processing , but it was found that DNNs are vulnerable to some synthetic data called adversarial examples ( ( Szegedy et al. , 2013 ) , ( Kurakin et al. , 2016 ) ) . Adversarial examples are natural samples plus adversarial perturbations , and the perturbations between natural samples and adversarial examples are imperceptible to human but able to fool the model . Typically , generating an adversarial example can be considered as finding an example in an -ball around a natural image that could be misclassified by the classifier . Recent studies designed Fast Gradient Sign Method ( FGSM , ( Goodfellow et al. , 2014 ) ) , Fast Gradient Method ( FGM , ( Miyato et al. , 2016 ) ) , Projected Gradient Descent ( PGD , ( Madry et al. , 2017 ) ) and other algorithms ( Carlini & Wagner ( 2017 ) , ( Su et al. , 2019 ) , ( Xiao et al. , 2018 ) , ( Kurakin et al. , 2016 ) , ( Chen et al. , 2017 ) ) to attack the model . Since the phenomenon of adversarial examples was discovered , many related works have made progress to study why they exist . Several works studied this phenomenon from the perspective of feature representation . Ilyas et al . ( 2019 ) divided the features into non-robust ones that are responsible for the model ’ s vulnerability to adversarial examples , and robust ones that are close to human perception . Further , they showed that adversarial vulnerability arises from non-robust features that are useful for correct classification . Another way to characterize adversarial examples is to investigate them in the frequency domain via Fourier transform . Wang et al . ( 2020a ) divided an image into low-frequency component ( LFC ) and high-frequency component ( HFC ) and they empirically showed that human can only perceive LFC , but convolutional neural networks can obtain useful information from both LFC and HFC . Yin et al . ( 2019 ) filters out the input data with low-pass or high-pass filters to study the sensitivity of the additive noise with different frequencies . Wang et al . ( 2020b ) claimed that existing adversarial attacks mainly concentrate in the high-frequency part . Sharma et al . ( 2019 ) found that when perturbations are constrained to the low-frequency subspace , they are generated faster and are more transferable , and will be effective to fool the defended models , but not for clean models . All of these works showed that spectrum in frequency domain is an reasonable way to study the adversarial examples . However , there is a lack of theoretical understanding about the dynamics of the adversarial perturbations in frequency domain along the training process of the model parameters . In this work , we focus on the frequency domain of the adversarial perturbations to explore the spectral properties of the adversarial examples generated by FGM ( Miyato et al. , 2016 ) and PGD ( Madry et al. , 2017 ) . In this work , we give a theoretical analysis in frequency domain of natural images for the adversarial examples . • For a two-layer neural network with non-linear activation function , we prove that adversarial perturbations by FGM and l2-PGD attacks gradually increase the concentration in the low-frequency part of the spectrum during the training process over model parameters . • Meanwhile , the log-spectrum difference of the adversarial examples ( the definition will be clarified in Section 2.2 ) will be more concentrated in the high-frequency part than the low-frequency part . • Furthermore , we show that the ratio of the high-frequency and the low-frequency part in the adversarial perturbation is much larger than that in the corresponding clean image . Empirically , • we design several experiments on the two-layer model and Resnet-32 with CIFAR-10 to verify the above findings . • Based on these phenomena , we filter out the high-frequency part of the adversarial examples before feeding them to the model to improve the robustness . Compared with the adversarially trained model with the same architecture , our method achieves comparable robustness with the similar computational cost of normal training and almost no loss of accuracy . The rest of the paper is organized as follows : In Section 2 , we present preliminaries and some theoretical analysis on the calculation of the spectrum and log-spectrum . Then we provide our main results about the frequency domain analysis of gradient-based adversarial examples in Section 3 . Furthermore , some experiments for supporting our theoretical findings are shown in Section 4 . Finally we conclude our work and conduct a discussion about the future work in Section 5 . All the details about the proof and experiments are shown in the Appendix . 2 BACKGROUND . 2.1 PRELIMINARIES . Notations We use { 0 , 1 , ... , d } to denote the set of all integers between 0 and d and use ‖ · ‖p to denote lp norm . Specifically , we denote by ‖ · ‖ the l2 norm . For a d-dimensional vector x , we use xµ to denote its µ-th component with index starting at 0 . For a scalar function f ( x ) : Rd 7→ R , ∇xf and ∂µf denote the gradient vector and its µ-th component . We let sgn ( x ) = 1 for x > 0 and −1 for x < 0 . Normal training refers to training on the original training data for learning the optimal weights for the neural networks . x̃ = F ( x ) denotes the Discrete Fourier Transform ( DFT ) of x. Discrete Fourier Transform The k-th frequency component g̃ [ k ] of one-dimensional DFT of a vector g is defined by g̃ [ k ] = F ( g ) [ k ] = d−1∑ µ=0 gµe ik 2πd µ , where k ∈ { −d/2 , −d/2 + 1 , ... , d/2 } if d is even and k ∈ { − ( d − 1 ) /2 , ... , ( d − 1 ) /2 } if d is odd . For convenience , we always consider an odd d and one can easily generalize the case to even dimensions . For an integer cut-off ( cutoff frequency ) kr ∈ ( 0 , ( d− 1 ) /2 ) , the Low Frequency Components ( LFC ) and High Frequency Components ( HFC ) of g̃ are denoted by g̃l [ k ] = { g̃ [ k ] if − kc ≤ k ≤ kc , 0 otherwise g̃h [ k ] = { 0 if − kc ≤ k ≤ kc , g̃ [ k ] otherwise . Then the frequency space Rd can be decomposed as Sl ⊕ Sh where g̃l ∈ Sl and g̃h ∈ Sh . LetNg̃ =√∑d/2 k=−d/2 |g̃ [ k ] |2 , then the ratio of a frequency component with respect to the whole frequency spectrum is denoted by τ ( g̃ [ k ] ) = |g̃ [ k ] |2 N2g̃ and the ratio of LFC is denoted by τ ( g̃ ∈ Sl ) = kc∑ k=−kc |g̃ [ k ] |2 N2g̃ . Setup In this paper , we consider a two-layer neural network f : Rd 7→ R f ( x , θ ) = m∑ r=1 arσ ( w T r x ) ( 1 ) where σ is an activation function , a = ( a1 , a2 , ... , am ) T is an m-dimensional vector and wr ’ s are d-dimensional weight vectors . Van der Schaaf & van Hateren ( 1996 ) showed that natural images obey a power law in the frequency domain . Therefore , to make our settings closer to widely studied image related tasks , we also assume our input x obey the power law |x̃ [ k ] | ∝ k−α to imitate LFC-concentrated images , where the constant α ≥ 1 and |x̃ [ 0 ] | = α0 is another constant . Besides , we choose the cut-off kc in such a way that kc∑ k=1 1 k2α + α20 > ( d−1 ) /2∑ k=kc+1 1 k2α , ( 2 ) which indicates that τ ( x̃ ∈ Sl ) > τ ( x̃ ∈ Sh ) and can be easily satisfied for a small kc . Gradient-based adversarial attack For a loss function ` , we find lp-norm -bounded adversarial perturbations by solving the optimization problem max ‖δ‖p≤ ` ( f ( x+ δ ) , y ) , where ( x , y ) ∈ Rd × R is d-dimensional input and output following the joint distribution D. To solve the above optimization problem , Goodfellow et al . ( 2014 ) proposed FGSM , an attack for an l∞-bounded adversary , and computed an adversarial example as xadv = x + sgn ( ∇x ` ( θ , x , y ) ) . Miyato et al . ( 2016 ) proposed FGM with an l2-bounded adversary , xadv = x+ ∇x ` ( x , y ) ‖∇x ` ( x , y ) ‖2 . Madry et al . ( 2017 ) introduced PGD which training adversarial examples in an iterative way that xt+1 = Πx+S ( x t + α sgn ( ∇x ` ( θ , x , y ) ) ) or xt+1 = Πx+S ( xt + α ∇x ` ( x , y ) ‖∇x ` ( x , y ) ‖2 ) To simplify the analysis , we make the following assumptions on the normal training process : Assumption 1 There exist β′ , β > 0 such that β′ ≤ |∂ ` /∂f | ≤ β . Assumption 2 If ` = 12 ( y − f ( x , θ ) ) 2 , |∂ ` /∂f | should be a small quantity such that |∂ ` /∂f | = 1+v if the network is well trained in the end stage of normal training , where 0 < v < 1 . Assumption 3 There exist λ , γ > 0 such that 0 ≤ σ′ ≤ λ and 0 ≤ σ′′ ≤ γ1 . Assumption 4 ar ’ s are i.i.d drawn from a distribution2 and will not be updated during the training . 1e.g . λ = 1 and γ = 1 4 if σ = ln ( 1 + ex ) . 2e.g . Bernoulli distribution . 2.2 EXPLORING THE LOG-SPECTRUM AND SPECTRUM . Wang et al . ( 2020a ) considered the log-spectrum of an image : 20 ∗ log ( |F ( x ) | ) , where x is a 2ddimensional matrix representing an image . One way to calculate the ” log-spectrum difference of the adversarial examples ” is to consider the difference between the log-spectrum of the adversarial and natural image and as follows , 20 ∗ |log ( |F ( x+ δ ) | ) − log ( |F ( x ) | ) | ≈ 20 ∗ ∣∣∣∣log ( 1 + |F ( δ ) ||F ( x ) | ) ∣∣∣∣ ≈ 20 ∗ |F ( δ ) ||F ( x ) | . ( 3 ) We can observe that this quantity is approximately proportional to the ratio of the perturbation ’ s over the natural image ’ s frequency . Moreover , the average Relative Change in discrete cosine Transforms ( RCT ) in ( Wang et al. , 2020b ) ) approximately equals to it . Fig . 5 empirically shows that this ratio is large for high frequency component but small for low frequency one . However , Van der Schaaf & van Hateren ( 1996 ) claimed that the LFC of F ( x ) is much bigger than its HFC , and the right side of Eq . 3 is inversely proportional to F ( x ) . The denominator of the right side of Eq . ( 3 ) in low-frequency part is much larger than it in high frequency part , so it may be imprudent to consider the frequency distribution of the adversarial perturbations only based on the ratio in the right side of Eq. ( 3 ) . Yin et al . ( 2019 ) provided another spectral measurement for adversarial examples . They considered the ” spectrum of the adversarial perturbation ” |F ( δ ) | , which directly reflects the distribution of adversarial perturbations in the frequency domain . Unfortunately , they claimed that ‘ The adversarial perturbations for the normally trained model are uniformly distributed across frequency components ’ without sufficient empirical and theoretical justification . In this work , we provide a totally different theoretical finding that the adversarial perturbations for the normally trained model are gradually concentrated in the low-frequency domain , further verified by extensive experiments . Fig . 1 visually shows the calculation methods of the spectrum of perturbations F ( δ ) and the logspectrum difference of adversarial examples | log ( |F ( x+ δ ) | ) − log ( |F ( x ) | ≈ |F ( δ ) ||F ( x ) | . 3 MAIN RESULTS In Section 3.1 , we show that , for a well trained two-layer neural network described in Eq . ( 1 ) with LFC-concentrated inputs , l2norm adversarial perturbations generated by FGM ( Theorem 1 ) prefer to concentrate in the low frequency domain . Section 3.2 theoretically proves the HFC-concentration of the logspectrum difference of adversarial examples . Section 3.3 attempts to demonstrate the effectiveness of masking the HFC of the adversarial examples to improve model ’ s robustness despite that perturbations can concentrate in the low frequency domain . All technical proofs are deferred to Appendix A . Results on l2 PGD perturbations are presented in Appendix B . In this work , we consider the two-layer neural networks and the loss function ` = 1 2 ( y − f ( x , θ ) ) 2 . For any x in this setting , we have ∂f ∂ar = σ ( wTr x ) , ∂f ∂wr = a′rx , ∇xf = ∑ r a′rwr , where a′r = arσ ′ ( wTr x ) and a ′ = ( a′1 , a ′ 2 , ... , a ′ m ) . At the ( t+ 1 ) -th step of gradient descent in the normal training process of the classifier , weight w is updated as w ( t+1 ) r = w ( t ) r − η ∂ ` ∂f ( t ) a′ ( t ) r x . ( 4 ) We use Lx and Hx to denote the LFC and HFC of the clean input Lx = kc∑ k=0 |x̃ [ k ] |2 and Hx = ( d−1 ) /2∑ k=kc+1 |x̃ [ k ] |2 . ( 5 ) 3.1 SPECTRAL TRAJECTORIES OF l2-NORM FGM PERTURBATIONS Consider the l2-norm FGM perturbation δ and its DFT δ̃ [ k ] δ = ∂ ` ∂f ∇xf ‖ ∂ ` ∂f ∇xf‖ , δ̃ [ k ] = sgn ( ∂ ` ∂f ) 1 ‖∇xf‖ ∇̃f [ k ] , ( 6 ) where ∇̃f [ k ] = F ( ∇xf ) [ k ] . Since the coefficient before ∇̃f [ k ] in ( 6 ) is same for different frequencies k , we only need to analyze the spectrum of ∇̃f [ k ] to investigate the ratio of certain frequency component over the whole frequency spectrum , i.e . τ ( δ̃ [ k ] ) = τ ( ∇̃f [ k ] ) . ( 7 ) In this subsection , we explore the evolving of τ ( δ̃ [ k ] ) along the normal training process . For a randomly initialized network , the FGM-attack perturbation will not have bias towards either HFC or LFC . We attack this model with FGM at each step of the normal training to study the trajectory of these perturbations in the frequency domain . According to Eq . ( 4 ) , ∇xf is updated to the order of η at the ( t+ 1 ) -th step as ∇xf ( t+1 ) = m∑ r=1 ( 1− η ( t ) r ) a′ ( t ) r w ( t ) r − η̃ ( t ) x+O ( η2 ) , where η ( t ) r = ηar‖x‖2 ∂ ` ∂f ( t ) σ′′ ( t ) ( w ( t ) T r x ) and η̃ ( t ) = η ∂ ` ∂f ( t ) ‖a′ ( t ) ‖2 are composite learning rates for easing our notation . For ReLU activation function σ ( x ) = max ( 0 , x ) , we have that η ( t ) r = Ei∈ { 1,2 , ... , m } [ η ( t ) i ] , therefore , considering that Softplus has similar shape as ReLU , we derive that η ( t ) r = η̄ ( t ) + O ( η2 ) , where η̄ ( t ) = η‖x‖2 ∂ ` ∂f ( t ) Er∈ { 1,2 , ... , m } [ arσ ′′ ( t ) ( w ( t ) T r x ) ] . In this way , the 1d-DFT of ∇xf ( t+1 ) has the following form , ∇̃f ( t+1 ) [ k ] = ( 1− η̄ ( t ) ) ∇̃f ( t ) [ k ] − η̃ ( t ) x̃ [ k ] . ( 8 ) We are now ready to study the trajectory of τ ( δ̃ [ k ] ) along the training step t. Let 4ϕ ( t ) k denote the difference of phases between ∇̃f ( t ) [ k ] and x̃ [ k ] for frequency k at the t-th step . And for ease of notation , denote 4τ ( t ) l , −2 kc∑ k=0 |∇̃f ( t ) [ k ] | |x̃ [ k ] | cos ( 4ϕ ( t ) k ) , 4τ ( t ) h , −2 ( d−1 ) /2∑ k=kc+1 |∇̃f ( t ) [ k ] | |x̃ [ k ] | cos ( 4ϕ ( t ) k ) , where η̃ ( t ) 4τ ( t ) l and η̃ ( t ) 4τ ( t ) h are approximately changed amounts for LFC and HFC of |∇̃f ( t ) |2 at the t-th step of the normal training of the network , respectively . Since the network is randomly initialized and the clean inputs x are highly concentrated in the low frequency domain , we always study the case where τ ( δ̃ ( 0 ) ∈ Sl ) < τ ( x̃ ∈ Sl ) . We now , taking Eq . ( 7 ) into consideration , present our main theorem about l2 norm FGM perturbations as follows . Theorem 1 ( The spectral trajectory of l2 FGM perturbation ) During the training process of the two-layer neural network f ( x ) in ( 1 ) , the l2 norm FGM adversarial perturbation will change its ratio of LFC , τ ( δ̃ ∈ Sl ) , at the ( t+ 1 ) -th step as follows , τ ( δ̃ ( t+1 ) ∈ Sl ) = τ ( δ̃ ( t ) ∈ Sl ) + η̃ ( t ) 4τ ( t ) l τ ( δ̃ ( t ) ∈ Sh ) −4τ ( t ) h τ ( δ̃ ( t ) ∈ Sl ) ∑ ( d−1 ) /2 k=0 |∇̃f ( t+1 ) [ k ] |2 ; ( 9 ) there will be a t1 s.t . ∀t ≥ t1 , we have τ ( δ̃ ( t+1 ) ∈ Sl ) > τ ( δ̃ ( t ) ∈ Sl ) . ( 10 ) Remark According to theorem 1 , during the normal training process for a randomly initialized network with LFC-concentrated input , there will be a t0 s.t . ∀t ≥ t0 , we have 4τ ( t ) l > 4τ ( t ) h , and τ ( δ̃ ( t+1 ) ∈ Sl ) > τ ( δ̃ ( t ) ∈ Sl ) if τ ( δ̃ ( t ) ∈ Sl ) < τ ( δ̃ ( t ) ∈ Sh ) . For ReLU activa- tion function , starting with τ ( δ̃ ( 0 ) ∈ Sl ) = 1/2 − ζ and 4τ ( 0 ) l = 4τ ( 0 ) h + bζ , we have t0 = max { 0 , − bζnηβ′ ( Lx−Hx ) } , where n = mint∈ [ 0 , t0 ] ‖a′ ( t ) ‖2 . Besides , given such a net- work trained with at least t0 steps , there will be a t1 > t0 such that 4τ ( t1 ) l τ ( δ̃ ( t1 ) ∈ Sh ) ≥ 4τ ( t1 ) h τ ( δ̃ ( t1 ) ∈ Sl ) and FGM perturbation will increase its ratio of LFC for all t > t1 no matter whether it is smaller than 1/2 . Finally , if τ ( δ̃ ( t2 ) ∈ Sl ) > τ ( δ̃ ( t2 ) ∈ Sh ) for some t2 > t0 , this relation will hold for any t ≥ t2 . | This submission deals with understanding the gradient based adversarial examples. For this means, it analyzes the adversarial examples in the frequency domain, where it identifies that the ratio of high-frequency and low frequency parts is quite large in adversarial examples compared with the natural ones. As a result, it proposes to apply a low-pass filtering to the data that can significantly improve the model robustness. Some experiments for CIFAR-10 classification are performed to support the main conclusions. | SP:8d9605171acd6c661b43648ad897a66665e5ea9f |
Addressing Distribution Shift in Online Reinforcement Learning with Offline Datasets | 1 INTRODUCTION . Offline reinforcement learning ( RL ) , the task of training a sequential decision-making agent with a static offline dataset , holds the promise of a data-driven approach to reinforcement learning , thereby bypassing the laborious and often dangerous process of sample collection ( Levine et al. , 2020 ) . Accordingly , various offline RL methods have been developed , some of which are often capable of training agents that are more performant than the behavior policy ( Fujimoto et al. , 2019 ; Kumar et al. , 2019 ; Wu et al. , 2019 ; Siegel et al. , 2020 ; Agarwal et al. , 2020 ; Kidambi et al. , 2020 ; Yu et al. , 2020 ; Kumar et al. , 2020 ) . However , agents trained via offline RL methods may be suboptimal , for ( a ) the dataset they were trained on may only contain suboptimal data ; and ( b ) environment in which they are deployed may be different from the environment in which dataset was generated . This necessitates an online fine-tuning procedure , where the agent improves by interacting with the environment and gathering additional information . Fine-tuning an offline RL agent , however , poses certain challenges . For example , Nair et al . ( 2020 ) pointed out that offline RL algorithms based on modeling the behavior policy ( Fujimoto et al. , 2019 ; Kumar et al. , 2019 ; Wu et al. , 2019 ; Siegel et al. , 2020 ) are not amenable to fine-tuning . This is because such methods require sampling actions from the modeled behavior policy for updating the agent , and fine-tuning such a generative model online for reliable sample generation is a challenging task . On the other hand , a more recent state-of-the-art offline RL algorithm , conservative Q-learning ( CQL ; Kumar et al. , 2020 ) , does not require explicit behavior modeling , and one might expect CQL to be amenable to fine-tuning . However , we make an observation that fine-tuning a CQL agent is a non-trivial task , due to the so-called distribution shift problem – the agent encounters out-ofdistribution samples , and in turn loses its good initial policy from offline RL training . This can be attributed to the bootstrapping error , i.e. , error introduced when Q-function is updated with an inaccurate target value evaluated at unfamiliar states and actions . Such initial training instability is a severe limitation , given the appeal of offline RL lies in safe deployment at test time , and losing such safety guarantees directly conflicts with the goal of offline RL . Contribution . In this paper , we first demonstrate that fine-tuning a CQL agent may lead to unstable training due to distribution shift ( see Section 3 for more details ) . To handle this issue , we introduce a simple yet effective framework , which incorporates a balanced replay scheme and an ensemble distillation scheme . Specifically , we propose to maintain two separate replay buffers for offline and online samples , respectively . Then we modulate the sampling ratio between the two , in order to balance the effects of ( a ) widening the data distribution the agent sees ( offline data ) , and ( b ) exploiting the environment feedback ( online data ) . Furthermore , we propose an ensemble distillation scheme : first , we learn an ensemble of independent CQL agents , then distill the multiple policies into a single policy . During fine-tuning , we improve the policy using the mean of Q-functions , so that policy updates are more robust to error in each individual Q-function . In our experiments , we demonstrate the strength of our method based on MuJoCo ( Todorov et al. , 2012 ) datasets from the D4RL ( Fu et al. , 2020 ) benchmark suite . Our goal is to achieve both ( a ) strong initial performance as well as maintaining it during the initial training phase , and ( b ) better sample-efficiency . For evaluation , we measure the final performance and sample-efficiency of RL agents throughout the fine-tuning procedure . We demonstrate that our method achieves stable training , while significantly outperforming all baseline methods considered , including BCQ ( Fujimoto et al. , 2019 ) and AWAC ( Nair et al. , 2020 ) , both in terms of final performance and sample-efficiency . 2 BACKGROUND . Reinforcement learning . We consider the standard RL framework , where an agent interacts with the environment so as to maximize the expected total return . More formally , at each timestep t , the agent observes a state st , and performs an action at according to its policy π . The environment rewards the agent with rt , then transitions to the next state st+1 . The agent ’ s objective is to maximize the expected return Eπ [ ∑∞ k=0 γ krk ] , where γ ∈ [ 0 , 1 ) is the discount factor . In this work , we mainly consider off-policy RL algorithms , a class of algorithms that can , in principle , train an agent with samples generated by any behavior policy . These algorithms are well-suited for fine-tuning a pretrained RL agent , for they can leverage both offline and online samples . Offline RL algorithms are off-policy RL algorithms that only utilize static datasets for training . Here , we introduce an off-policy RL algorithm and an offline RL algorithm we build on in this work . Soft Actor-Critic . SAC ( Haarnoja et al. , 2018 ) is an off-policy actor-critic algorithm that learns a soft Q-function Qθ ( s , a ) parameterized by θ and a stochastic policy πφ modeled as a Gaussian with its parameters φ . To update parameters θ and φ , SAC alternates between a soft policy evaluation and a soft policy improvement . During soft policy evaluation , soft Q-function parameter θ is updated to minimize the soft Bellman residual : LSACcritic ( θ ) = Eτt∼B [ LQ ( τt , θ ) ] , ( 1 ) LSACQ ( τt , θ ) = ( Qθ ( st , at ) − ( rt + γEat+1∼πφ [ Qθ̄ ( st+1 , at+1 ) − α log πφ ( at+1|st+1 ) ] ) ) 2 , ( 2 ) where τt = ( st , at , rt , st+1 ) is a transition , B is the replay buffer , θ̄ is the moving average of soft Q-function parameter θ , and α is the temperature parameter . During soft policy improvement , policy parameter φ is updated to minimize the following objective : LSACactor ( φ ) = Est∼B [ Lπ ( st , φ ) ] , where Lπ ( st , φ ) = Eat∼πφ [ α log πφ ( at|st ) −Qθ ( st , at ) ] . ( 3 ) Conservative Q-Learning . CQL ( Kumar et al. , 2020 ) is an offline RL algorithm that learns a lower bound of the Q-function Qθ ( s , a ) , in order to prevent extrapolation error – value overestimation caused by bootstrapping from out-of-distribution actions . To this end , CQL ( H ) , a variant of CQL , imposes a regularization that minimizes the expected Q-value at unseen actions , and maximizes the expected Q-value at seen actions by minimizing the following objective : LCQLcritic ( θ ) = 1 2 · LCQLQ ( θ ) + α CQL · LCQLreg ( θ ) , ( 4 ) LCQLQ ( θ ) = Eτt∼D [ ( Qθ ( st , at ) − ( rt + γEat+1∼πφ [ Qθ̄ ( st+1 , at+1 ) ] ) ) 2 ] , ( 5 ) LCQLreg ( θ ) = Est∼D [ log ∑ a exp ( Qθ ( st , a ) − Eat∼π̂β [ Qθ ( st , at ) ] ] , ( 6 ) where αCQL is the tradeoff parameter , D the offline dataset , and π̂β ( at|st ) = ∑ ( s , a ) ∈D 1 { s=st , a=at } ∑ s∈D 1 { s=st } the empirical behavior policy . 3 CHALLENGE : DISTRIBUTION SHIFT . In the context of fine-tuning an offline RL agent , there may exist a distribution shift between offline and online data distribution : an offline RL agent encounters data distributed away from the offline data , as the agent starts interacting with the environment ( see Figure 1a for a visualization ) . More formally , let pπ ( s , a ) = dπ ( s ) π ( a|s ) denote the discounted stationary state-action distribution of the policy , where dπ denotes the discounted marginal state distribution , and π denotes the policy . Then distribution shift refers to the difference between pβ ( s , a ) and pπθ ( s , a ) , where β refers to the behavior policy , and πθ refers to the current policy . To demonstrate the existence of distribution shift empirically , we report the negative log-likelihiood estimates of offline and online samples in Figure 1b . Specifically , we first split the walker2d-medium offline dataset into training and validation datasets , then train a variational autoencoder ( VAE ; Kingma & Welling , 2014 ) on the training dataset . Then , we estimate the log-likelihood of online samples and offline samples from the validation dataset , using the importance weight estimator ( Burda et al. , 2016 ) . We can observe a difference between offline and online data distributions , i.e. , they follow different distributions . This shift in turn affects fine-tuning in a very complicated manner , for it involves an interplay between actor and critic updates with newly collected out-of-distribution samples . To elaborate in more detail , we train an agent offline via state-of-the-art CQL algorithm in ( 4 ) , then fine-tune it via SAC algorithm in ( 1 ) and ( 3 ) 1 , either using samples drawn uniformly at random ( Uniform replay ) as in Nair et al . ( 2020 ) , or using online samples exclusively ( Online only ) . Figure 1c shows how fine-tuning may suffer from instability in both cases . Essentially , this instability occurs due to the shift between offline and online data distribution . In the case of using both offline and online data , the chance of agent seeing online samples for update becomes too low , especially when the offline dataset contains massive amount of data . This prevents timely updates at unfamiliar states encountered online , and may lead to performance degradation as seen in Figure 1c . On the other hand , when using online samples exclusively , the agent is exposed to unseen samples only , for which Q function does not provide a reliable value estimate . This may lead to bootstrapping error , and hence a dip in performance as seen in Figure 1c . This points to leveraging a mixture of offline and online samples for fine-tuning , so that the agent can balance the trade-off between them . 1Fine-tuning with CQL updates ( 4 ) leads to slow ( if at all ) improvement in most setups we consider ( see Appendix B for more results ) . We also provide additional experimental results when using different RL algorithms than SAC for fine-tuning a pre-trained offline CQL agent in Appendix C . 4 BRED : BALANCED REPLAY WITH ENSEMBLE DISTILLATION . In this section , we present BRED : Balanced Replay with Ensemble Distillation , in order to address the distribution shift between offline and online data distributions . First , we introduce separate offline and online replay buffers in order to select a balanced mix of samples from them for better Q-function updates . This has the dual advantage of updating Q-function with a wide distribution of samples , while making sure that Q-values are updated at novel , unseen states from online interaction . Furthermore , we train multiple actor-critic offline RL agents , and distill the policies into a single policy . Then , during fine-tuning , we improve the distilled policy via Q-ensemble . | This paper considers the problem of policy learning in Markov Decision Process (MDP) from the combination of online and offline samples. The offline samples are generated by a behavior policy in the same MDP model, i.e., the behavior agent and the learning agent share the same state-action space. The learning procedure goes as follows. One first trains a MDP policy from the offline data; the online samples are then used to fine-tune the learned policy. | SP:b562599572cd55c95dd0f8e1449ba6c6cfdd14e1 |
Addressing Distribution Shift in Online Reinforcement Learning with Offline Datasets | 1 INTRODUCTION . Offline reinforcement learning ( RL ) , the task of training a sequential decision-making agent with a static offline dataset , holds the promise of a data-driven approach to reinforcement learning , thereby bypassing the laborious and often dangerous process of sample collection ( Levine et al. , 2020 ) . Accordingly , various offline RL methods have been developed , some of which are often capable of training agents that are more performant than the behavior policy ( Fujimoto et al. , 2019 ; Kumar et al. , 2019 ; Wu et al. , 2019 ; Siegel et al. , 2020 ; Agarwal et al. , 2020 ; Kidambi et al. , 2020 ; Yu et al. , 2020 ; Kumar et al. , 2020 ) . However , agents trained via offline RL methods may be suboptimal , for ( a ) the dataset they were trained on may only contain suboptimal data ; and ( b ) environment in which they are deployed may be different from the environment in which dataset was generated . This necessitates an online fine-tuning procedure , where the agent improves by interacting with the environment and gathering additional information . Fine-tuning an offline RL agent , however , poses certain challenges . For example , Nair et al . ( 2020 ) pointed out that offline RL algorithms based on modeling the behavior policy ( Fujimoto et al. , 2019 ; Kumar et al. , 2019 ; Wu et al. , 2019 ; Siegel et al. , 2020 ) are not amenable to fine-tuning . This is because such methods require sampling actions from the modeled behavior policy for updating the agent , and fine-tuning such a generative model online for reliable sample generation is a challenging task . On the other hand , a more recent state-of-the-art offline RL algorithm , conservative Q-learning ( CQL ; Kumar et al. , 2020 ) , does not require explicit behavior modeling , and one might expect CQL to be amenable to fine-tuning . However , we make an observation that fine-tuning a CQL agent is a non-trivial task , due to the so-called distribution shift problem – the agent encounters out-ofdistribution samples , and in turn loses its good initial policy from offline RL training . This can be attributed to the bootstrapping error , i.e. , error introduced when Q-function is updated with an inaccurate target value evaluated at unfamiliar states and actions . Such initial training instability is a severe limitation , given the appeal of offline RL lies in safe deployment at test time , and losing such safety guarantees directly conflicts with the goal of offline RL . Contribution . In this paper , we first demonstrate that fine-tuning a CQL agent may lead to unstable training due to distribution shift ( see Section 3 for more details ) . To handle this issue , we introduce a simple yet effective framework , which incorporates a balanced replay scheme and an ensemble distillation scheme . Specifically , we propose to maintain two separate replay buffers for offline and online samples , respectively . Then we modulate the sampling ratio between the two , in order to balance the effects of ( a ) widening the data distribution the agent sees ( offline data ) , and ( b ) exploiting the environment feedback ( online data ) . Furthermore , we propose an ensemble distillation scheme : first , we learn an ensemble of independent CQL agents , then distill the multiple policies into a single policy . During fine-tuning , we improve the policy using the mean of Q-functions , so that policy updates are more robust to error in each individual Q-function . In our experiments , we demonstrate the strength of our method based on MuJoCo ( Todorov et al. , 2012 ) datasets from the D4RL ( Fu et al. , 2020 ) benchmark suite . Our goal is to achieve both ( a ) strong initial performance as well as maintaining it during the initial training phase , and ( b ) better sample-efficiency . For evaluation , we measure the final performance and sample-efficiency of RL agents throughout the fine-tuning procedure . We demonstrate that our method achieves stable training , while significantly outperforming all baseline methods considered , including BCQ ( Fujimoto et al. , 2019 ) and AWAC ( Nair et al. , 2020 ) , both in terms of final performance and sample-efficiency . 2 BACKGROUND . Reinforcement learning . We consider the standard RL framework , where an agent interacts with the environment so as to maximize the expected total return . More formally , at each timestep t , the agent observes a state st , and performs an action at according to its policy π . The environment rewards the agent with rt , then transitions to the next state st+1 . The agent ’ s objective is to maximize the expected return Eπ [ ∑∞ k=0 γ krk ] , where γ ∈ [ 0 , 1 ) is the discount factor . In this work , we mainly consider off-policy RL algorithms , a class of algorithms that can , in principle , train an agent with samples generated by any behavior policy . These algorithms are well-suited for fine-tuning a pretrained RL agent , for they can leverage both offline and online samples . Offline RL algorithms are off-policy RL algorithms that only utilize static datasets for training . Here , we introduce an off-policy RL algorithm and an offline RL algorithm we build on in this work . Soft Actor-Critic . SAC ( Haarnoja et al. , 2018 ) is an off-policy actor-critic algorithm that learns a soft Q-function Qθ ( s , a ) parameterized by θ and a stochastic policy πφ modeled as a Gaussian with its parameters φ . To update parameters θ and φ , SAC alternates between a soft policy evaluation and a soft policy improvement . During soft policy evaluation , soft Q-function parameter θ is updated to minimize the soft Bellman residual : LSACcritic ( θ ) = Eτt∼B [ LQ ( τt , θ ) ] , ( 1 ) LSACQ ( τt , θ ) = ( Qθ ( st , at ) − ( rt + γEat+1∼πφ [ Qθ̄ ( st+1 , at+1 ) − α log πφ ( at+1|st+1 ) ] ) ) 2 , ( 2 ) where τt = ( st , at , rt , st+1 ) is a transition , B is the replay buffer , θ̄ is the moving average of soft Q-function parameter θ , and α is the temperature parameter . During soft policy improvement , policy parameter φ is updated to minimize the following objective : LSACactor ( φ ) = Est∼B [ Lπ ( st , φ ) ] , where Lπ ( st , φ ) = Eat∼πφ [ α log πφ ( at|st ) −Qθ ( st , at ) ] . ( 3 ) Conservative Q-Learning . CQL ( Kumar et al. , 2020 ) is an offline RL algorithm that learns a lower bound of the Q-function Qθ ( s , a ) , in order to prevent extrapolation error – value overestimation caused by bootstrapping from out-of-distribution actions . To this end , CQL ( H ) , a variant of CQL , imposes a regularization that minimizes the expected Q-value at unseen actions , and maximizes the expected Q-value at seen actions by minimizing the following objective : LCQLcritic ( θ ) = 1 2 · LCQLQ ( θ ) + α CQL · LCQLreg ( θ ) , ( 4 ) LCQLQ ( θ ) = Eτt∼D [ ( Qθ ( st , at ) − ( rt + γEat+1∼πφ [ Qθ̄ ( st+1 , at+1 ) ] ) ) 2 ] , ( 5 ) LCQLreg ( θ ) = Est∼D [ log ∑ a exp ( Qθ ( st , a ) − Eat∼π̂β [ Qθ ( st , at ) ] ] , ( 6 ) where αCQL is the tradeoff parameter , D the offline dataset , and π̂β ( at|st ) = ∑ ( s , a ) ∈D 1 { s=st , a=at } ∑ s∈D 1 { s=st } the empirical behavior policy . 3 CHALLENGE : DISTRIBUTION SHIFT . In the context of fine-tuning an offline RL agent , there may exist a distribution shift between offline and online data distribution : an offline RL agent encounters data distributed away from the offline data , as the agent starts interacting with the environment ( see Figure 1a for a visualization ) . More formally , let pπ ( s , a ) = dπ ( s ) π ( a|s ) denote the discounted stationary state-action distribution of the policy , where dπ denotes the discounted marginal state distribution , and π denotes the policy . Then distribution shift refers to the difference between pβ ( s , a ) and pπθ ( s , a ) , where β refers to the behavior policy , and πθ refers to the current policy . To demonstrate the existence of distribution shift empirically , we report the negative log-likelihiood estimates of offline and online samples in Figure 1b . Specifically , we first split the walker2d-medium offline dataset into training and validation datasets , then train a variational autoencoder ( VAE ; Kingma & Welling , 2014 ) on the training dataset . Then , we estimate the log-likelihood of online samples and offline samples from the validation dataset , using the importance weight estimator ( Burda et al. , 2016 ) . We can observe a difference between offline and online data distributions , i.e. , they follow different distributions . This shift in turn affects fine-tuning in a very complicated manner , for it involves an interplay between actor and critic updates with newly collected out-of-distribution samples . To elaborate in more detail , we train an agent offline via state-of-the-art CQL algorithm in ( 4 ) , then fine-tune it via SAC algorithm in ( 1 ) and ( 3 ) 1 , either using samples drawn uniformly at random ( Uniform replay ) as in Nair et al . ( 2020 ) , or using online samples exclusively ( Online only ) . Figure 1c shows how fine-tuning may suffer from instability in both cases . Essentially , this instability occurs due to the shift between offline and online data distribution . In the case of using both offline and online data , the chance of agent seeing online samples for update becomes too low , especially when the offline dataset contains massive amount of data . This prevents timely updates at unfamiliar states encountered online , and may lead to performance degradation as seen in Figure 1c . On the other hand , when using online samples exclusively , the agent is exposed to unseen samples only , for which Q function does not provide a reliable value estimate . This may lead to bootstrapping error , and hence a dip in performance as seen in Figure 1c . This points to leveraging a mixture of offline and online samples for fine-tuning , so that the agent can balance the trade-off between them . 1Fine-tuning with CQL updates ( 4 ) leads to slow ( if at all ) improvement in most setups we consider ( see Appendix B for more results ) . We also provide additional experimental results when using different RL algorithms than SAC for fine-tuning a pre-trained offline CQL agent in Appendix C . 4 BRED : BALANCED REPLAY WITH ENSEMBLE DISTILLATION . In this section , we present BRED : Balanced Replay with Ensemble Distillation , in order to address the distribution shift between offline and online data distributions . First , we introduce separate offline and online replay buffers in order to select a balanced mix of samples from them for better Q-function updates . This has the dual advantage of updating Q-function with a wide distribution of samples , while making sure that Q-values are updated at novel , unseen states from online interaction . Furthermore , we train multiple actor-critic offline RL agents , and distill the policies into a single policy . Then , during fine-tuning , we improve the distilled policy via Q-ensemble . | This paper proposes to deal with distribution shift problem between online and offline samples when the agent trained by offline data is fine-tuned with online interactions. Two mechanisms are introduced: (1) using two replay buffers for offline and online data respectively, and training the agent with data sampled from these two buffers with a certain ratio (the ratio changes in a way that more online data is used in later epochs); (2) learning an ensemble of independent agents in the offline phase, and distilling them into a mean policy to overcome bootstrapping error. Empirical results demonstrate that the proposed method perform well during fine-tuning when there is distribution shift. | SP:b562599572cd55c95dd0f8e1449ba6c6cfdd14e1 |
Online Continual Learning Under Domain Shift | 1 INTRODUCTION . Continual learning is a promising framework towards human-level intelligence by developing models that can continuously learn over time ( Ring , 1997 ; Parisi et al. , 2019 ) . Unlike traditional learning paradigms , continual learning methods observe a continuum of tasks and have to simultaneously perform well on all tasks with limited access to previous data . Therefore , they have to achieve a good trade-off between retaining old knowledge ( French , 1999 ) and acquiring new skills , which is referred to as the stability-plasticity dilemma ( Abraham & Robins , 2005 ) . Continual learning is not only a challenging research problem but also has tremendous impacts on many applications ( Diethe et al. , 2019 ) . In particular , the deployed model may encounter new problems over time , and re-training every time new data arrive is infeasible , especially for large , complex neural networks . Despite recent success , existing continual learning benchmarks assume the data of each class are drawn from the same distribution during training and testing , i.e . P tr ( X , Y ) = P te ( X , Y ) . This restrictive assumption is unlikely to hold in practice and prohibits the use of continual learning strategies in numerous real-world applications . For example , consider a continual learning agent already trained to recognize certain objects in the indoor environment ; then , it moves to a new outdoor environment to acquire new skills . The agent may fail to recognize the learned objects because they are placed in a completely different background . Such an environment change is referred to as domain shift ( Khosla et al. , 2012 ; Long et al. , 2015 ; Diethe et al. , 2019 ) , and is very natural for continual learning in practice ( Diethe et al. , 2019 ) . To formalize the continual learning under domain shift problem , we need to consider the interaction between domain and the observation . In many computer vision applications , the causal structure is usually Y → X , i.e. , the object class is the cause for image features ( Lopez-Paz et al. , 2017 ) . This setting ignores the effect of conditional domain shift ( Zhang et al. , 2013 ) , where both the domain and the object class are the causes for the image features . That is , images may come from different domains , but they have the same label . Figure 1 shows the causal graph for continual learning under conditional domain shift problem and an illustrative example of the domain shift between training and testing data . Continual learning under conditional domain shift requires the model to perform previous tasks in new domains , which poses a great challenge since we do not know in hindsight which domain will be tested . Therefore , the model needs to learn the concepts presented in the data while ignoring the domains . For example , placing an object in different background does not change the label of that object . As a result , the model needs to achieve an invariant representation using data from various source domains observed during training , i.e . the joint distribution P ( X , Y ) is the same for all source domains . To this end , we develop Conditional Invariant Experience Replay ( CIER ) that can simultaneously retain previous knowledge , learn new tasks , and generalize to new domains . CIER employs an episodic memory to perform experience replay and an adversarial loss to achieve an invariant representation . Particularly , CIER formulates a multiplayer minimax game such that the conditional distribution P ( X|Y ) is stable across each class ’ s observed source domains . Therefore , if the prior distribution P ( Y ) is stable in the target domains , i.e. , no class imbalance , CIER can achieve the invariant representation in the joint distribution P ( X , Y ) and generalize to unseen domains . Fig . 2 provides a high level overview of the proposed CIER method . In summary , we formalize the continual learning under conditional domain shift problem and construct three novel benchmarks using real data with different levels of domain shift and diversity in the number of domains , tasks , and classes . Then , we develop CIER , a novel continual learning method that learns a conditional invariant representation and generalizes to novel domains . Our extensive experiments demonstrate the limitations of existing continual learning methods when being tested on unseen domains and show that the proposed CIER can mitigate such domain gaps effectively . 2 RELATED WORK . 2.1 CONTINUAL LEARNING . Continual learning aims at developing a model that can continuously learn different tasks over a data continuum . In literature , there are different continual learning protocols with different properties of the continuum . First , a setting can be either task-free ( Rebuffi et al. , 2017 ; Aljundi et al. , 2019b ) or task-aware ( Kirkpatrick et al. , 2017 ; Lopez-Paz & Ranzato , 2017 ) based on whether a task-indicator is presented to the model . Second , learning can follow the online ( Lopez-Paz & Ranzato , 2017 ) or batch ( Kirkpatrick et al. , 2017 ) setting . In online continual learning , the data within each task is also online and the model is only allowed to learn each example once . Differently , in batch continual learning , the model is allowed to learn a task over many epochs . Generally , the task-free and online settings are more difficult because the model has to predict on all tasks , and optimizing deep neural network online over one epoch is particularly challenging ( Lopez-Paz & Ranzato , 2017 ; Sahoo et al. , 2018 ; Aljundi et al. , 2019a ) . However , we argue that existing protocols do not consider the domain shift between training and testing data of each task , which is important in real scenarios . This limitation motivates us in developing the continual learning under conditional domain shift problem as a practical and more challenging problem to evaluate continual learning methods . Continual learning methods aim at achieving a good trade-off between alleviating catastrophic forgetting and acquiring new knowledge . Existing methods can be broadly categorized into two main groups : ( i ) dynamic architecture approaches that employ a separate subnetwork for each task , and ( ii ) static architecture approaches that maintain a fixed network throughout learning . While dynamic architecture methods ( Rusu et al. , 2016 ; Serra et al. , 2018 ; von Oswald et al. , 2020 ; Yoon et al. , 2018 ; Li et al. , 2019 ; Xu & Zhu , 2018 ) usually do not suffer from catastrophic forgetting , they are not practical because of the high computational cost . In the fixed architecture method family , experience replay ( ER ) ( Lin , 1992 ) and its variants ( Chaudhry et al. , 2019b ; Aljundi et al. , 2019a ; Riemer et al. , 2019 ; Rolnick et al. , 2019 ) have recently gained much interest thanks to their strong performance across different continual learning protocols , significantly outperforms other approachecs such as regularization ( Kirkpatrick et al. , 2017 ; Zenke et al. , 2017 ; Aljundi et al. , 2018 ; Ritter et al. , 2018 ) , representation learning ( Rebuffi et al. , 2017 ) . However , existing continual learning methods lack the ability to generalize to unseen domains beyond training , which motivates us to develop a novel method of CIER that can achieve an invariant representation in continual learning . 2.2 DOMAIN GENERALIZATION AND DOMAIN ADAPTATION . Domain generalization aims at training a model that can generalize to a target domain given data from the source domains ( Khosla et al. , 2012 ; Li et al. , 2017 ; 2018 ; Carlucci et al. , 2019 ) . As a simpler problem setting , domain adaptation assumes unsupervised data from the target domain is also given during training ( Long et al. , 2015 ; Ganin & Lempitsky , 2015 ) . A general approach for such problems is learning an invariant representation by correcting the shift in P ( X , Y ) across domains . Particularly , ( Long et al. , 2015 ; Ganin & Lempitsky , 2015 ) assume that the conditional distribution P ( Y |X ) is the same across domains ; therefore , the domain shift can be addressed by matching only P ( X ) . However , invariant in P ( Y |X ) is a strong assumption and is unlikely to hold in many applications . A more robust approach is matching the conditional distribution P ( X|Y ) ( Zhang et al. , 2013 ; Li et al. , 2018 ) . In which case , if the class-prior distribution P ( Y ) is stable , i.e. , there is no class-imbalance among domains , matching P ( X|Y ) will result in the invariant in P ( X , Y ) because of the decomposition P ( X , Y ) = P ( Y ) P ( X|Y ) . We emphasize that no imbalance data is a mild assumption , especially when we do not know about the target domains . This result motivated us in the development of CIER . However , different from such methods , CIER can accommodate novel classes and domains over time while maintaining good performances over all classes . 3 PROBLEM FORMULATION . 3.1 ONLINE CONTINUAL LEARNING UNDER CONDITIONAL DOMAIN SHIFT . Notations . Let X ⊂ RD and Y ⊂ N be the input and label space respectively . A domain is defined as a joint distribution P ( X , Y ) over X ×Y , and the k-th domain P k ( X , Y ) is denoted as P k. Often , we do not have access to the domain P k , instead , we can label each data point with a scalar d ∈ N indicating that it comes from domain d. During training , a learner θ receives a continuum of data { xi , di , yi } , where ( xi , yi ) is the i-th training sample and di is the domain indicator associated with { xi , yi } . In the following , we use y ( t ) as the number of observed classes until time t ; dy ( t ) denotes the number of observed domains of class y until time t ; and x ∼ Y kj denotes the samples of the j-th class and has domain dk . We consider the task-free , online continual learning setting where the continuum is locally iid , i.e . each training sample ( xi , yi ) is drawn iid from an underlying task distribution Pti ( X , Y ) with the task identifier ti not revealed to the learner . Moreover , each task consists of a subset of labels sam- pled without replacement from the label space Y . To formalize the online continual learning under conditional domain shift problem , we assume that each class y is associated with a set of source domains Dsrcy = { dsrc1 , dsrc2 , . . . , dsrcs } , and a set of target domains Dtgty = { d tgt 1 , d tgt 2 , . . . , d tgt m } . Additionally , the source and target domains are disjoint for all classes , i.e . Dsrcy ∩Dtgty = ∅ , ∀y . We consider three scenarios with decreasing difficulties to evaluate the learner θ based on the degree of shift between the training and testing domains . • Scenario 1 ( significant shift ) : Train on source domains , test on target domains , the most challenging setting where all domains of the test data are unobserved during training . • Scenario 2 ( mild shift ) : Train on source domains , test on both source and target domains . Here we assume that domains of test data can be draw from both source and target domains . • Scenario 3 ( no shift ) : Train on target domains , test on target domains . This is the traditional continual learning setting where there is no discrepancy among domains of training and testing data . We design this scenario so that it has the same test data as the first one . In all scenarios , the model is required to perform well on the test data . We emphasize that the continual learning setting we considered is the most challenging in the literature : both task and data arrive online , and the model has to predict all observed classes so far during evaluation . Moreover , we provide the model with the domain identifiers during training ; however , only the input x is provided at test time . Finally , we aim at creating a model that can predict at any moment , therefore , we do not make any assumption regarding the testing domains , including the availability of unlabeled data , and the models are not allowed to train during inference . | This paper investigates continual learning under domain shift and proposes a conditional invariant experience replay (CIER) method accordingly. CIER aims to retain old knowledge, acquire new information, and generalize to unseen domains. In particular, CIER uses adversarial training to correct the domain shift. Experimental results on three benchmark datasets are reported and discussed. | SP:256b4cc8d05297bb43d7259d1af082452f937024 |
Online Continual Learning Under Domain Shift | 1 INTRODUCTION . Continual learning is a promising framework towards human-level intelligence by developing models that can continuously learn over time ( Ring , 1997 ; Parisi et al. , 2019 ) . Unlike traditional learning paradigms , continual learning methods observe a continuum of tasks and have to simultaneously perform well on all tasks with limited access to previous data . Therefore , they have to achieve a good trade-off between retaining old knowledge ( French , 1999 ) and acquiring new skills , which is referred to as the stability-plasticity dilemma ( Abraham & Robins , 2005 ) . Continual learning is not only a challenging research problem but also has tremendous impacts on many applications ( Diethe et al. , 2019 ) . In particular , the deployed model may encounter new problems over time , and re-training every time new data arrive is infeasible , especially for large , complex neural networks . Despite recent success , existing continual learning benchmarks assume the data of each class are drawn from the same distribution during training and testing , i.e . P tr ( X , Y ) = P te ( X , Y ) . This restrictive assumption is unlikely to hold in practice and prohibits the use of continual learning strategies in numerous real-world applications . For example , consider a continual learning agent already trained to recognize certain objects in the indoor environment ; then , it moves to a new outdoor environment to acquire new skills . The agent may fail to recognize the learned objects because they are placed in a completely different background . Such an environment change is referred to as domain shift ( Khosla et al. , 2012 ; Long et al. , 2015 ; Diethe et al. , 2019 ) , and is very natural for continual learning in practice ( Diethe et al. , 2019 ) . To formalize the continual learning under domain shift problem , we need to consider the interaction between domain and the observation . In many computer vision applications , the causal structure is usually Y → X , i.e. , the object class is the cause for image features ( Lopez-Paz et al. , 2017 ) . This setting ignores the effect of conditional domain shift ( Zhang et al. , 2013 ) , where both the domain and the object class are the causes for the image features . That is , images may come from different domains , but they have the same label . Figure 1 shows the causal graph for continual learning under conditional domain shift problem and an illustrative example of the domain shift between training and testing data . Continual learning under conditional domain shift requires the model to perform previous tasks in new domains , which poses a great challenge since we do not know in hindsight which domain will be tested . Therefore , the model needs to learn the concepts presented in the data while ignoring the domains . For example , placing an object in different background does not change the label of that object . As a result , the model needs to achieve an invariant representation using data from various source domains observed during training , i.e . the joint distribution P ( X , Y ) is the same for all source domains . To this end , we develop Conditional Invariant Experience Replay ( CIER ) that can simultaneously retain previous knowledge , learn new tasks , and generalize to new domains . CIER employs an episodic memory to perform experience replay and an adversarial loss to achieve an invariant representation . Particularly , CIER formulates a multiplayer minimax game such that the conditional distribution P ( X|Y ) is stable across each class ’ s observed source domains . Therefore , if the prior distribution P ( Y ) is stable in the target domains , i.e. , no class imbalance , CIER can achieve the invariant representation in the joint distribution P ( X , Y ) and generalize to unseen domains . Fig . 2 provides a high level overview of the proposed CIER method . In summary , we formalize the continual learning under conditional domain shift problem and construct three novel benchmarks using real data with different levels of domain shift and diversity in the number of domains , tasks , and classes . Then , we develop CIER , a novel continual learning method that learns a conditional invariant representation and generalizes to novel domains . Our extensive experiments demonstrate the limitations of existing continual learning methods when being tested on unseen domains and show that the proposed CIER can mitigate such domain gaps effectively . 2 RELATED WORK . 2.1 CONTINUAL LEARNING . Continual learning aims at developing a model that can continuously learn different tasks over a data continuum . In literature , there are different continual learning protocols with different properties of the continuum . First , a setting can be either task-free ( Rebuffi et al. , 2017 ; Aljundi et al. , 2019b ) or task-aware ( Kirkpatrick et al. , 2017 ; Lopez-Paz & Ranzato , 2017 ) based on whether a task-indicator is presented to the model . Second , learning can follow the online ( Lopez-Paz & Ranzato , 2017 ) or batch ( Kirkpatrick et al. , 2017 ) setting . In online continual learning , the data within each task is also online and the model is only allowed to learn each example once . Differently , in batch continual learning , the model is allowed to learn a task over many epochs . Generally , the task-free and online settings are more difficult because the model has to predict on all tasks , and optimizing deep neural network online over one epoch is particularly challenging ( Lopez-Paz & Ranzato , 2017 ; Sahoo et al. , 2018 ; Aljundi et al. , 2019a ) . However , we argue that existing protocols do not consider the domain shift between training and testing data of each task , which is important in real scenarios . This limitation motivates us in developing the continual learning under conditional domain shift problem as a practical and more challenging problem to evaluate continual learning methods . Continual learning methods aim at achieving a good trade-off between alleviating catastrophic forgetting and acquiring new knowledge . Existing methods can be broadly categorized into two main groups : ( i ) dynamic architecture approaches that employ a separate subnetwork for each task , and ( ii ) static architecture approaches that maintain a fixed network throughout learning . While dynamic architecture methods ( Rusu et al. , 2016 ; Serra et al. , 2018 ; von Oswald et al. , 2020 ; Yoon et al. , 2018 ; Li et al. , 2019 ; Xu & Zhu , 2018 ) usually do not suffer from catastrophic forgetting , they are not practical because of the high computational cost . In the fixed architecture method family , experience replay ( ER ) ( Lin , 1992 ) and its variants ( Chaudhry et al. , 2019b ; Aljundi et al. , 2019a ; Riemer et al. , 2019 ; Rolnick et al. , 2019 ) have recently gained much interest thanks to their strong performance across different continual learning protocols , significantly outperforms other approachecs such as regularization ( Kirkpatrick et al. , 2017 ; Zenke et al. , 2017 ; Aljundi et al. , 2018 ; Ritter et al. , 2018 ) , representation learning ( Rebuffi et al. , 2017 ) . However , existing continual learning methods lack the ability to generalize to unseen domains beyond training , which motivates us to develop a novel method of CIER that can achieve an invariant representation in continual learning . 2.2 DOMAIN GENERALIZATION AND DOMAIN ADAPTATION . Domain generalization aims at training a model that can generalize to a target domain given data from the source domains ( Khosla et al. , 2012 ; Li et al. , 2017 ; 2018 ; Carlucci et al. , 2019 ) . As a simpler problem setting , domain adaptation assumes unsupervised data from the target domain is also given during training ( Long et al. , 2015 ; Ganin & Lempitsky , 2015 ) . A general approach for such problems is learning an invariant representation by correcting the shift in P ( X , Y ) across domains . Particularly , ( Long et al. , 2015 ; Ganin & Lempitsky , 2015 ) assume that the conditional distribution P ( Y |X ) is the same across domains ; therefore , the domain shift can be addressed by matching only P ( X ) . However , invariant in P ( Y |X ) is a strong assumption and is unlikely to hold in many applications . A more robust approach is matching the conditional distribution P ( X|Y ) ( Zhang et al. , 2013 ; Li et al. , 2018 ) . In which case , if the class-prior distribution P ( Y ) is stable , i.e. , there is no class-imbalance among domains , matching P ( X|Y ) will result in the invariant in P ( X , Y ) because of the decomposition P ( X , Y ) = P ( Y ) P ( X|Y ) . We emphasize that no imbalance data is a mild assumption , especially when we do not know about the target domains . This result motivated us in the development of CIER . However , different from such methods , CIER can accommodate novel classes and domains over time while maintaining good performances over all classes . 3 PROBLEM FORMULATION . 3.1 ONLINE CONTINUAL LEARNING UNDER CONDITIONAL DOMAIN SHIFT . Notations . Let X ⊂ RD and Y ⊂ N be the input and label space respectively . A domain is defined as a joint distribution P ( X , Y ) over X ×Y , and the k-th domain P k ( X , Y ) is denoted as P k. Often , we do not have access to the domain P k , instead , we can label each data point with a scalar d ∈ N indicating that it comes from domain d. During training , a learner θ receives a continuum of data { xi , di , yi } , where ( xi , yi ) is the i-th training sample and di is the domain indicator associated with { xi , yi } . In the following , we use y ( t ) as the number of observed classes until time t ; dy ( t ) denotes the number of observed domains of class y until time t ; and x ∼ Y kj denotes the samples of the j-th class and has domain dk . We consider the task-free , online continual learning setting where the continuum is locally iid , i.e . each training sample ( xi , yi ) is drawn iid from an underlying task distribution Pti ( X , Y ) with the task identifier ti not revealed to the learner . Moreover , each task consists of a subset of labels sam- pled without replacement from the label space Y . To formalize the online continual learning under conditional domain shift problem , we assume that each class y is associated with a set of source domains Dsrcy = { dsrc1 , dsrc2 , . . . , dsrcs } , and a set of target domains Dtgty = { d tgt 1 , d tgt 2 , . . . , d tgt m } . Additionally , the source and target domains are disjoint for all classes , i.e . Dsrcy ∩Dtgty = ∅ , ∀y . We consider three scenarios with decreasing difficulties to evaluate the learner θ based on the degree of shift between the training and testing domains . • Scenario 1 ( significant shift ) : Train on source domains , test on target domains , the most challenging setting where all domains of the test data are unobserved during training . • Scenario 2 ( mild shift ) : Train on source domains , test on both source and target domains . Here we assume that domains of test data can be draw from both source and target domains . • Scenario 3 ( no shift ) : Train on target domains , test on target domains . This is the traditional continual learning setting where there is no discrepancy among domains of training and testing data . We design this scenario so that it has the same test data as the first one . In all scenarios , the model is required to perform well on the test data . We emphasize that the continual learning setting we considered is the most challenging in the literature : both task and data arrive online , and the model has to predict all observed classes so far during evaluation . Moreover , we provide the model with the domain identifiers during training ; however , only the input x is provided at test time . Finally , we aim at creating a model that can predict at any moment , therefore , we do not make any assumption regarding the testing domains , including the availability of unlabeled data , and the models are not allowed to train during inference . | This paper studies the domain adaptation problem when the source data comes from multiple domains continuously and the test domain for adaptation is unknown. The assumption used for domain shift is that the domain label would change the features but not the labels. So the main idea is to learn invariant representations across all the domains and avoid spurious correlation on the domain label. The proposed method then involves a multiplayer minimax game. The adversaries are the domain discriminator for each class, which tries to maximize the domain discrepancy. The minimizer player is the representation learner. The paper introduces two discrepancy measure based on the Jensen-Shannon divergence and the one dimensional Wasserstein distance. In the experiment, the data set for continual learning is constructed using domain shift data such that it mimics the online learning setting. The results are competitive in comparison with a limited set of baselines. | SP:256b4cc8d05297bb43d7259d1af082452f937024 |
R-MONet: Region-Based Unsupervised Scene Decomposition and Representation via Consistency of Object Representations | 1 INTRODUCTION . In recent years , supervised object detection and segmentation ( He et al . ( 2017 ) ; Ren et al . ( 2015 ) ; Fan et al . ( 2019 ) ; Liao et al . ( 2001 ) ; Lin et al . ( 2017 ) ; Ronneberger et al . ( 2015 ) ) have made great progress with the extensive human labels . However , these supervised methods are still unable to take the advantage of massive unlabeled vision data . Unsupervised learning of scene representation starts to become a key challenge in computer vision . The breakthrough ( Burgess et al . ( 2019 ) ; Greff et al . ( 2019 ) ; Eslami et al . ( 2016 ) ; Crawford & Pineau ( 2019 ) ; Engelcke et al . ( 2020 ) , Greff et al . ( 2017 ) ; Van Steenkiste et al . ( 2018 ) ; Pathak et al . ( 2016 ) ; Lin et al . ( 2020 ) ) in the unsupervised scene decomposition and representation learning proves that a complex visual scene containing many objects can be properly decomposed without human labels . It proves that there is still much useful information that can be discovered in those unlabeled data . Recent approaches to address the unsupervised scene decomposition and representation learning can be categorized into two groups : models which explicitly acquire disentangled position and scale ( i.e . bounding boxes ) representation of objects ( Eslami et al . ( 2016 ) ; Crawford & Pineau ( 2019 ) ; Lin et al . ( 2020 ) ) and models implicitly encode objects ’ geometric representation into segmentation masks or entangle it with object appearance representations ( Burgess et al . ( 2019 ) ; Greff et al . ( 2019 ) ; Engelcke et al . ( 2020 ) ; Greff et al . ( 2017 ) ; Van Steenkiste et al . ( 2018 ) ) . In the former type of models , the scene is explicitly encoded into the object-oriented spatial encoding and appearance encoding . A decoder will generate the scene with explicitly defined object encoding for representation learning . This type of models can not use rectangular bounding boxes to fully represent complex objects with flexible morphology . In the other type of models , the scene is decomposed into a finite number of object segmentation masks which can better represent complex objects with its pixel-topixel alignment . However , this type of models only use segmentation masks as the pixel-wise object mixture weights . They do not utilize the geometric information in the segmentation masks and still entangle object position and appearance representations in the scene generation step . Also , those models tend to decompose the entire scene in the image which does not use the locality benefit of objects . Inspired by the observation that foreground segmentation masks and bounding boxes both contain object geometric information and should be consistent with each other , a method called R-MONet ( Region-based Multiple Object Net ) is proposed in this paper . R-MONet uses the spirit of MONet ( Burgess et al . ( 2019 ) ) and S4Net ( Fan et al . ( 2019 ) ) by using a single stage , non-iterative network ( spatial attention module ) for generating object geometric representations in both bounding boxes and segmentation masks . Then , a variational autoencoder ( VAE ) ( Kingma & Welling ( 2013 ) ) is used for encoding object appearance representations and regenerating the scene for training . To ensure the consistency between bounding boxes and foreground segmentation masks , the bounding boxes generated from spatial attention module is supervised with the pseudo bounding box generated by Multi-Otsu thresholding method ( Liao et al . ( 2001 ) ) on foreground segmentation masks . More than that , the foreground instance segmentation is only performed in the bounding box area instead of the full image to take advantage of the spatial locality and make scene generation less complex . The contributions of this paper are : - We introduce an effective single stage , non-iterative framework to generate object geometric representations in both bounding boxes and segmentation masks for unsupervised scene decomposition and representation learning . - We propose a self-supervised method that can better utilize object geometric information by ensuring the consistency between bounding boxes and foreground segmentation masks . This approach can improve the scene decomposition performance compared with the stateof-art . - We design a new segmentation head that can preserve global context and prevent coordinate misalignment in small feature maps which improves the foreground segmentation performance . 2 RELATED WORKS . There many influential works ( Burgess et al . ( 2019 ) ; Greff et al . ( 2019 ) ; Eslami et al . ( 2016 ) ; Crawford & Pineau ( 2019 ) ; Engelcke et al . ( 2020 ) ; Greff et al . ( 2017 ) ; Van Steenkiste et al . ( 2018 ) ; Pathak et al . ( 2016 ) ; Lin et al . ( 2020 ) ) in unsupervised scene decomposition in recent years . Some models tend to explicitly factor an object representation into spatial and appearance encodings such as ’ what ’ , ’ where ’ , ’ presence ’ , etc . with the help of VAE ( Kingma & Welling ( 2013 ) ) . Influential related models include AIR ( Eslami et al . ( 2016 ) ) and its successor SPAIR ( Crawford & Pineau ( 2019 ) ) . AIR uses the Recurrent Neural Network as the encoder to decompose a complex scene into objects ’ representation but it suffers from the iteration speed . SPAIR improves its bounding box average precision and running speed by using Convolution Neural Network as the encoder to generate objects ’ representation in parallel . However , these models have not been tested on photorealistic 3D object dataset and bounding boxes can not fully represent flexible morphology like foreground segmentation masks . The other type of models tend to decompose each object into its own representation without explicit positional encoding and use segmentation masks to mix object reconstruction . Influential models such as MONet ( Burgess et al . ( 2019 ) ) which leverages a UNet ( Ronneberger et al . ( 2015 ) ) variant as an iterative attention network for segmentation mask generation and Spatial Broadcast Decoder ( Watters et al . ( 2019 ) ) for representation learning via scene reconstruction . Spatial Broadcast Decoder replaces deconvolutional network with transform by tiling ( broadcast ) the latent vector across space , concatenate fixed X- and Y- “ coordinate ” channels . This decoder provides better disentanglement between positional and non-positional features in the latent distribution . IODINE ( Greff et al . ( 2019 ) ) tackles this problem with its amortized iterative refinement of foreground and background representation . However its iterative refinement process will heavily impact the speed of training and inference . GENESIS ( Engelcke et al . ( 2020 ) ) uses the similar idea as MONet but with different latent encoding in different iterative steps . These models all focus on decomposing the entire scene which does not leverage the spatial locality around each object . SPACE ( Lin et al . ( 2020 ) ) is the closest to our work in spirit . This model leverages the encoder similar to SPAIR to process foreground objects in parallel with explicit positional encoding and adapts the segmentation masks for background modeling . However , different from R-MONet , it does not use the shared information in both bounding boxes and segmentation masks . It is worth mentioning that S4Net ( Fan et al . ( 2019 ) ) provides an end-to-end single shot object detection and instance segmentation framework simplified from Mask R-CNN ( He et al . ( 2017 ) ) for our spatial attention module . It uses the ROI Masking method inspired by the fact that the segmentation can benefit from the background features surrounding the foreground instance . In this method , an ROI mask is generated by enlarging the proposed region on the feature maps . The mask values inside the original proposed region are set to 1 . The mask values outside the original proposed region but inside the enlarged proposed region are set to -1 . The rest values on the mask are set to 0 . The regional features are extracted by multiplying the ROI mask and the feature maps . This method is proved to have better segmentation compared with ROI Align ( He et al . ( 2017 ) ) in both their experiments and our use case ( discussed in Section 4.1 ) . 3 METHOD . In this section , the proposed model , R-MONet is described . The R-MONet will decompose the scene into K different components ( K-1 for the foreground and 1 component for the background ) and each of them is indexed by k. K also limits the max number of objects this model can detect . The network architecture of R-MONet is presented in Figure 1 . 3.1 INFERENCE . Inference of object geometric representations . A spatial attention network parameterized by ψ provides the object geometric representation in both segmentation masks { mk } and foreground object bounding box { tk } with the input image x . It is represented by equation 1 . At the same time , { mk } is also the mixing probability in spatial Gaussian model . Since this mixing probability is learned by the network conditioned on x , we refer to this distribution as qψ ( mk|x ) . { mk } k∈ [ 1 , K ] , { tk } k∈ [ 1 , K−1 ] = fψ ( x ) ( 1 ) This spatial attention network is a convolutional neural network similar to S4Net ( Fan et al . ( 2019 ) ) with small adjustment . In this module , ResNet18 ( He et al . ( 2016 ) ) and Feature Pyramid Network ( FPN ) ( Lin et al . ( 2017 ) ) are used as the backbone . The feature maps are extracted for the following Region Proposal Network ( RPN ) ( Ren et al . ( 2015 ) ) . The bounding boxes proposed by RPN will be filtered with Non-Maximum suppression ( NMS ) ( Neubeck & Van Gool ( 2006 ) ) . Only ROIs with top K-1 prediction scores will be selected for further processing . The ROI Masking ( Fan et al . ( 2019 ) ) method then uses the ROI selected by RPN and transforms feature maps from the backbone to the segmentation head . The segmentation intermediate outputs { αk } ( not segmentation masks ) from the segmentation branch will be transformed into the segmentation masks { mk } via the stick-breaking process ( Sethuraman ( 1994 ) ) to make sure ∑K k=1mk = 1 which represents all pixels are explained in the segmentation masks ( softmax can also be used ) . The scope sk represents the proportion of pixels still unexplained . The details about stick-breaking process is in Appendix A . Inference of object representation latents . In the VAE encoder parameterised by φ , we use variational inference to get an approximate latent posterior qφ ( zk|x , mk ) which is a Gaussian distribution conditioned on both input image x and segmentation masks { mk } . As pointed out in MONet ( Burgess et al . ( 2019 ) ) , conditioning on { mk } can provide geometric heuristic information for probabilistic inference . Then , we sample from this posterior to infer object representation latents { zk } . | This paper presents a variation of the MONet model where an additional Region Proposal Network generates bounding boxes for various objects in the scene. An additional loss is introduced during training to make the segmentations produced by the MONet segmenter consistent with the proposed bounding boxes. Results are demonstrated on multi d-Sprites and CLEVR with modest performance gains. | SP:0f566a0c7fbad17455e65c8befd25b317f67e177 |
R-MONet: Region-Based Unsupervised Scene Decomposition and Representation via Consistency of Object Representations | 1 INTRODUCTION . In recent years , supervised object detection and segmentation ( He et al . ( 2017 ) ; Ren et al . ( 2015 ) ; Fan et al . ( 2019 ) ; Liao et al . ( 2001 ) ; Lin et al . ( 2017 ) ; Ronneberger et al . ( 2015 ) ) have made great progress with the extensive human labels . However , these supervised methods are still unable to take the advantage of massive unlabeled vision data . Unsupervised learning of scene representation starts to become a key challenge in computer vision . The breakthrough ( Burgess et al . ( 2019 ) ; Greff et al . ( 2019 ) ; Eslami et al . ( 2016 ) ; Crawford & Pineau ( 2019 ) ; Engelcke et al . ( 2020 ) , Greff et al . ( 2017 ) ; Van Steenkiste et al . ( 2018 ) ; Pathak et al . ( 2016 ) ; Lin et al . ( 2020 ) ) in the unsupervised scene decomposition and representation learning proves that a complex visual scene containing many objects can be properly decomposed without human labels . It proves that there is still much useful information that can be discovered in those unlabeled data . Recent approaches to address the unsupervised scene decomposition and representation learning can be categorized into two groups : models which explicitly acquire disentangled position and scale ( i.e . bounding boxes ) representation of objects ( Eslami et al . ( 2016 ) ; Crawford & Pineau ( 2019 ) ; Lin et al . ( 2020 ) ) and models implicitly encode objects ’ geometric representation into segmentation masks or entangle it with object appearance representations ( Burgess et al . ( 2019 ) ; Greff et al . ( 2019 ) ; Engelcke et al . ( 2020 ) ; Greff et al . ( 2017 ) ; Van Steenkiste et al . ( 2018 ) ) . In the former type of models , the scene is explicitly encoded into the object-oriented spatial encoding and appearance encoding . A decoder will generate the scene with explicitly defined object encoding for representation learning . This type of models can not use rectangular bounding boxes to fully represent complex objects with flexible morphology . In the other type of models , the scene is decomposed into a finite number of object segmentation masks which can better represent complex objects with its pixel-topixel alignment . However , this type of models only use segmentation masks as the pixel-wise object mixture weights . They do not utilize the geometric information in the segmentation masks and still entangle object position and appearance representations in the scene generation step . Also , those models tend to decompose the entire scene in the image which does not use the locality benefit of objects . Inspired by the observation that foreground segmentation masks and bounding boxes both contain object geometric information and should be consistent with each other , a method called R-MONet ( Region-based Multiple Object Net ) is proposed in this paper . R-MONet uses the spirit of MONet ( Burgess et al . ( 2019 ) ) and S4Net ( Fan et al . ( 2019 ) ) by using a single stage , non-iterative network ( spatial attention module ) for generating object geometric representations in both bounding boxes and segmentation masks . Then , a variational autoencoder ( VAE ) ( Kingma & Welling ( 2013 ) ) is used for encoding object appearance representations and regenerating the scene for training . To ensure the consistency between bounding boxes and foreground segmentation masks , the bounding boxes generated from spatial attention module is supervised with the pseudo bounding box generated by Multi-Otsu thresholding method ( Liao et al . ( 2001 ) ) on foreground segmentation masks . More than that , the foreground instance segmentation is only performed in the bounding box area instead of the full image to take advantage of the spatial locality and make scene generation less complex . The contributions of this paper are : - We introduce an effective single stage , non-iterative framework to generate object geometric representations in both bounding boxes and segmentation masks for unsupervised scene decomposition and representation learning . - We propose a self-supervised method that can better utilize object geometric information by ensuring the consistency between bounding boxes and foreground segmentation masks . This approach can improve the scene decomposition performance compared with the stateof-art . - We design a new segmentation head that can preserve global context and prevent coordinate misalignment in small feature maps which improves the foreground segmentation performance . 2 RELATED WORKS . There many influential works ( Burgess et al . ( 2019 ) ; Greff et al . ( 2019 ) ; Eslami et al . ( 2016 ) ; Crawford & Pineau ( 2019 ) ; Engelcke et al . ( 2020 ) ; Greff et al . ( 2017 ) ; Van Steenkiste et al . ( 2018 ) ; Pathak et al . ( 2016 ) ; Lin et al . ( 2020 ) ) in unsupervised scene decomposition in recent years . Some models tend to explicitly factor an object representation into spatial and appearance encodings such as ’ what ’ , ’ where ’ , ’ presence ’ , etc . with the help of VAE ( Kingma & Welling ( 2013 ) ) . Influential related models include AIR ( Eslami et al . ( 2016 ) ) and its successor SPAIR ( Crawford & Pineau ( 2019 ) ) . AIR uses the Recurrent Neural Network as the encoder to decompose a complex scene into objects ’ representation but it suffers from the iteration speed . SPAIR improves its bounding box average precision and running speed by using Convolution Neural Network as the encoder to generate objects ’ representation in parallel . However , these models have not been tested on photorealistic 3D object dataset and bounding boxes can not fully represent flexible morphology like foreground segmentation masks . The other type of models tend to decompose each object into its own representation without explicit positional encoding and use segmentation masks to mix object reconstruction . Influential models such as MONet ( Burgess et al . ( 2019 ) ) which leverages a UNet ( Ronneberger et al . ( 2015 ) ) variant as an iterative attention network for segmentation mask generation and Spatial Broadcast Decoder ( Watters et al . ( 2019 ) ) for representation learning via scene reconstruction . Spatial Broadcast Decoder replaces deconvolutional network with transform by tiling ( broadcast ) the latent vector across space , concatenate fixed X- and Y- “ coordinate ” channels . This decoder provides better disentanglement between positional and non-positional features in the latent distribution . IODINE ( Greff et al . ( 2019 ) ) tackles this problem with its amortized iterative refinement of foreground and background representation . However its iterative refinement process will heavily impact the speed of training and inference . GENESIS ( Engelcke et al . ( 2020 ) ) uses the similar idea as MONet but with different latent encoding in different iterative steps . These models all focus on decomposing the entire scene which does not leverage the spatial locality around each object . SPACE ( Lin et al . ( 2020 ) ) is the closest to our work in spirit . This model leverages the encoder similar to SPAIR to process foreground objects in parallel with explicit positional encoding and adapts the segmentation masks for background modeling . However , different from R-MONet , it does not use the shared information in both bounding boxes and segmentation masks . It is worth mentioning that S4Net ( Fan et al . ( 2019 ) ) provides an end-to-end single shot object detection and instance segmentation framework simplified from Mask R-CNN ( He et al . ( 2017 ) ) for our spatial attention module . It uses the ROI Masking method inspired by the fact that the segmentation can benefit from the background features surrounding the foreground instance . In this method , an ROI mask is generated by enlarging the proposed region on the feature maps . The mask values inside the original proposed region are set to 1 . The mask values outside the original proposed region but inside the enlarged proposed region are set to -1 . The rest values on the mask are set to 0 . The regional features are extracted by multiplying the ROI mask and the feature maps . This method is proved to have better segmentation compared with ROI Align ( He et al . ( 2017 ) ) in both their experiments and our use case ( discussed in Section 4.1 ) . 3 METHOD . In this section , the proposed model , R-MONet is described . The R-MONet will decompose the scene into K different components ( K-1 for the foreground and 1 component for the background ) and each of them is indexed by k. K also limits the max number of objects this model can detect . The network architecture of R-MONet is presented in Figure 1 . 3.1 INFERENCE . Inference of object geometric representations . A spatial attention network parameterized by ψ provides the object geometric representation in both segmentation masks { mk } and foreground object bounding box { tk } with the input image x . It is represented by equation 1 . At the same time , { mk } is also the mixing probability in spatial Gaussian model . Since this mixing probability is learned by the network conditioned on x , we refer to this distribution as qψ ( mk|x ) . { mk } k∈ [ 1 , K ] , { tk } k∈ [ 1 , K−1 ] = fψ ( x ) ( 1 ) This spatial attention network is a convolutional neural network similar to S4Net ( Fan et al . ( 2019 ) ) with small adjustment . In this module , ResNet18 ( He et al . ( 2016 ) ) and Feature Pyramid Network ( FPN ) ( Lin et al . ( 2017 ) ) are used as the backbone . The feature maps are extracted for the following Region Proposal Network ( RPN ) ( Ren et al . ( 2015 ) ) . The bounding boxes proposed by RPN will be filtered with Non-Maximum suppression ( NMS ) ( Neubeck & Van Gool ( 2006 ) ) . Only ROIs with top K-1 prediction scores will be selected for further processing . The ROI Masking ( Fan et al . ( 2019 ) ) method then uses the ROI selected by RPN and transforms feature maps from the backbone to the segmentation head . The segmentation intermediate outputs { αk } ( not segmentation masks ) from the segmentation branch will be transformed into the segmentation masks { mk } via the stick-breaking process ( Sethuraman ( 1994 ) ) to make sure ∑K k=1mk = 1 which represents all pixels are explained in the segmentation masks ( softmax can also be used ) . The scope sk represents the proportion of pixels still unexplained . The details about stick-breaking process is in Appendix A . Inference of object representation latents . In the VAE encoder parameterised by φ , we use variational inference to get an approximate latent posterior qφ ( zk|x , mk ) which is a Gaussian distribution conditioned on both input image x and segmentation masks { mk } . As pointed out in MONet ( Burgess et al . ( 2019 ) ) , conditioning on { mk } can provide geometric heuristic information for probabilistic inference . Then , we sample from this posterior to infer object representation latents { zk } . | In this paper, the authors introduce a region-based approach for unsupervised scene decomposition. It extends the previous MONet by introducing the region-based self-supervised training. Instead of purely generating foreground masks in an RNN, they simultaneously predict the bounding boxes and segmentation masks using a Faster-RCNN-based framework. The supervision comes from the object reconstruction loss and the self-supervised loss of classification and regression of anchors in the RPN module. The experiments and comparisons are only conducted on the synthetic CLEVR and Multi-dSprites dataset. | SP:0f566a0c7fbad17455e65c8befd25b317f67e177 |
Cut out the annotator, keep the cutout: better segmentation with weak supervision | 1 INTRODUCTION . Automated image segmentation has seen rapid improvements with recent developments in deep learning ( Li et al. , 2018 ; Chen et al. , 2017 ; Milletari et al. , 2016 ) . Convolutional neural networks ( CNNs ) achieve high segmentation performance—but can require large , labeled training datasets . Acquiring training labels is laborious and slow , particularly for medical images where expert segmentation is often required in 3- or 4-dimensions . While large datasets and pre-trained networks exist for natural images , medical image segmentation is a more targeted task , typically requiring new training sets for every imaging modality , scanner type , anatomical structure , and patient population . Such difficulties abound , but the significant impact of improved medical image segmentation motivates tackling these challenges ( Hesamian et al. , 2019 ) . Many few-shot learning ( FSL ) approaches have been proposed to mitigate these difficulties by training networks using only a few labeled examples . For example , data augmentation can reduce the needed amount of labeled data by introducing additional variation into small , labeled training sets through operations such as affine transforms or learned transformations ( e.g . deformations learned by GANs ) ( Zhao et al. , 2019 ; Eaton-Rosen et al. , 2018 ; Çiçek et al. , 2016 ) . Many semisupervised approaches aim to learn a useful representation from unlabeled data then fine-tune on a few manually-annotated images ( Chen et al. , 2020 ; Bai et al. , 2019 ; Chen et al. , 2019 ; Chaitanya et al. , 2020a ) . Finally , other approaches aim to transfer knowledge learned from segmenting one class in order to segment a previously unseen class ( Shaban et al. , 2017 ; Rakelly et al. , 2018 ; Roy et al. , 2020 ; Ouyang et al. , 2020 ) . However , these FSL approaches have limitations . For example , effective data augmentation often requires model- and task-specific transformations that are difficult ∗For correspondence , please contact smhooper @ stanford.edu to generalize to all tasks , and transferring knowledge from one segmentation target to another relies on the segmentations of other classes being present in training datasets . More generally , bringing all of the known domain expertise or structural information to bear is prohibitive . Weak supervision ( WS ) is a different approach to training without manual labels that takes advantage of multiple weak labeling sources ( Mintz et al. , 2009 ; Craven & Kumlien , 1999 ; Takamatsu et al. , 2012 ; Gupta & Manning , 2014 ; Ratner et al. , 2019 ) . In many WS workflows , labeling functions ( LFs ) are crafted to encode the decision-making processes of experts into small functions that programatically label training data . LFs can drastically reduce labeling time , but the resulting labels are often noisy and conflicting . The driving idea behind WS is that the accuracies of and correlations between LFs can be learned without access to ground truth labels , then used to aggregate the LF outputs . This WS workflow enables rapid construction of training sets without manual annotation . Due to the widespread success of weak supervision methods ( Dunnmon et al. , 2020 ; Sheng et al. , 2020 ; Bach et al. , 2019 ) , weak supervision is an appealing approach for generating labeled segmentation training sets without relying on hand-labeled data . However , existing WS frameworks do not readily extend to the segmentation setting for the following two reasons : • Injecting knowledge . It is unclear how users can construct multiple segmentation LFs that inject knowledge for a segmentation task at hand—and are suitable for any image . • Modeling LF accuracies . We need to fuse the LFs , but the probabilistic graphical models ( PGMs ) of existing WS frameworks rely on estimating the accuracies for each labeling function , which is a problematic metric for segmentation : it is not sensitive to small differences at segmentation borders nor robust to arbitrary image crops ( Figure 1 , right ) . We propose a best-of-both-worlds approach that fuses FSL and WS for segmentation tasks . Specifically , we use FSL models as LFs , obviating the need to craft expertise-injecting LFs by hand . To resolve the difficulty in tracking accuracies per LF , which are too coarse of a metric for segmentation , we proposing a new WS PGM . Our PGM introduces conditional terms that “ focus ” on areas of contention , where LFs disagree , more finely tracking the LF performance in such areas . We validate our approach on seven medical image segmentation tasks . We show that our method can achieve within 1.4 Dice points of a fully supervised network using only five labeled images . We compare our proposed method to five other few-shot segmentation methods , and find that our method exceeds the next-best by a mean 3.6 Dice points . Finally , we analyze how different FSL methods scale with additional unlabeled training data and compare our PGM to existing WS models . There are two primary contributions in this work . First , we present a weak supervision pipeline tailored to the segmentation use case which utilizes a small number of labeled images and many unlabeled images to train a high-performing segmentation network . Second , we develop a novel PGM to aggregate noisy segmentation masks and show that the parameters of this model can be learned without access to ground truth labels . We show that our new approach to few-shot image segmentation outperforms many competitive baselines . 2 RELATED WORK . Data augmentation Data augmentation has been shown to enable training on few labeled examples , particularly in medical imaging . These augmentations range from simple operations such as affine transforms , elastic transforms , and contrast jitter ( Çiçek et al. , 2016 ; Cireşan et al. , 2011 ) to more complex learned operations , such as the use of GANs to learn intensity and spatial deformation transforms to generate synthetic medical images ( Chaitanya et al. , 2020b ) . Transferring knowledge A popular FSL approach enables prediction on previously unseen classes by leveraging representations learned from prior experience ( Snell et al. , 2017 ; Sung et al. , 2018 ) . Applications to segmentation include Rakelly et al . ( 2018 ) ; Shaban et al . ( 2017 ) ; Dong & Xing ( 2018 ) . For example , PANet is a proposed approach for few-shot semantic segmentation that utilizes representations for each semantic class from the support set , then labels query images by propagating labels from the support set in embedding space ( Wang et al. , 2019 ) . Few-shot segmentation was extended specifically to the medical imaging case by Roy et al . ( 2020 ) , where “ squeeze and excite ” blocks are used to learn class representations without pretrained networks . However , these approaches rely on the availability of labels of other classes during training . Self- and semi-supervised learning Self- and semi-supervised methods have been proposed for image segmentation without relying on the availability of other classes during training ( Chen et al. , 2020 ; Bai et al. , 2019 ; Chen et al. , 2019 ) . Instead , semi-supervised segmentation methods often pretrain on large unlabeled datasets to learn useful representations without any annotations . For example , contrastive learning has been proposed to pretrain CNNs , which are then fine-tuned using a small number of manually segmented images ( Chaitanya et al. , 2020a ) . Additionally , superpixel segmentations have been proposed to self-supervise networks , which can be used to segment test images without fine tuning ( Ouyang et al. , 2020 ) . In the Appendix , we also discuss conditional random fields and using coarse labels ( e.g. , bounding boxes , scribbles , and image-level labels ) to train segmentation models . 3 SEGMENTATION WITH FSL AND WS FUSION . We first give background on WS and state the problem setting . Then , we follow with details of the primary challenges and solutions in each stage of our method . Specifically , we discuss LFs and a new PGM that fuses FSL with WS . We end with a summary of our proposed workflow . 3.1 WEAK SUPERVISION BACKGROUND . We build our approach off of principles from WS . We note that WS is an overloaded term in literature . In this work , we refer to WS as the class of approaches in which multiple noisy labeling sources are aggregated into probabilistic training labels without access to ground truth labels ( Ratner et al. , 2019 ) . The goal of WS is to best utilize multiple sources of noisy signal ( i.e . LFs ) to label training data without relying on manual annotation . Each LF takes as input an unlabeled training point and outputs a vote for the label of that training point . These LFs can replace manual training data annotation , however LF votes can be imperfect and conflict with one another . A latent variable model ( referred to as a label model ) can be used to model these observed LFs and their relationship to the latent ground truth label . In Figure 2a , we show a simple model where five LFs each vote on the label for a single unobserved ground truth label . Importantly , the parameters of this model need to be estimated without access to ground truth annotation . The learned label model can be then used to produce probabilistic training labels to train a downstream network , referred to as an end model . Building off of this past work , our weak supervision pipeline proceeds in three steps : ( 1 ) noisy labels are generated by multiple LFs , ( 2 ) the noisy labels are aggregated into weak labels by a probabilistic graphical model ( PGM ) , and ( 3 ) the weak labels are used to train a segmentation model ( Figure 1 ) . 3.2 PROBLEM SETTING . We are given a training set of n images , X = [ X1 , X2 , ... , Xn ] , where Xi ∈ RI×J×K×T is a tensor of P pixels . I , J , K , and T represent the dimensions of image Xi , where K > 1 for volumetric images and T > 1 for time series images . For each image Xi there is a segmentation mask Yi ∈ { c } I×J×K×T , where { c } is the set of class labels , yielding the set Y = [ Y1 , Y2 , ... , Yn ] of all unobserved ground truth segmentation masks . We have access to m labeling functions that provide noisy segmentation masks λli ∈ { c } I×J×K×T for each Xi , where l ∈ { 1 , 2 , ... , m } . From these observed sources , we seek to generate the set of weak labels Ŷ to estimate Y. Ŷ provides labels for a large dataset , and we can use these to train any end model ( e.g. , a segmentation CNN ) . We tackle the binary segmentation case , { c } = { −1 , 1 } ; simple multiclass extensions are possible . Model Structure The ( unobserved ) ground truth mask Y and the ( observed ) sources λ are jointly modeled by an undirected graphical model ( Koller & Friedman , 2009 ; Wainwright & Jordan , 2008 ) with graph G = ( V , E ) . Since Y is unobserved , this is a latent-variable model . We use conventional structures for each component and combine them in a natural way : • In a standard weak supervision approach , the m weak sources are connected to a groundtruth label Y ( Fig . 2a ) , • The segmentation mask Y is a multi-dimensional grid over the pixels ( Fig . 2b ) , • Our full model has one copy of the WS graph for each pixel in the grid ( Fig . 2c ) . Our goal is to construct effective LFs and to complete the model specification above by defining the potentials associated with the edges in E and the corresponding parameters . | This paper presents weakly supervised framework for image segmentation tasks with limited annotated data. It first builds several labeling functions with limited annotation and then uses probability graph to fuse the labels. Last, the final output will be generated via CNN network. There are two key challenges in such setting. First, how to build the labeling functions. Second, how to measure the accuracies from the labeling functions. | SP:63f8a0b2517c67e8d33f6522e9ee0402a2ed574b |
Cut out the annotator, keep the cutout: better segmentation with weak supervision | 1 INTRODUCTION . Automated image segmentation has seen rapid improvements with recent developments in deep learning ( Li et al. , 2018 ; Chen et al. , 2017 ; Milletari et al. , 2016 ) . Convolutional neural networks ( CNNs ) achieve high segmentation performance—but can require large , labeled training datasets . Acquiring training labels is laborious and slow , particularly for medical images where expert segmentation is often required in 3- or 4-dimensions . While large datasets and pre-trained networks exist for natural images , medical image segmentation is a more targeted task , typically requiring new training sets for every imaging modality , scanner type , anatomical structure , and patient population . Such difficulties abound , but the significant impact of improved medical image segmentation motivates tackling these challenges ( Hesamian et al. , 2019 ) . Many few-shot learning ( FSL ) approaches have been proposed to mitigate these difficulties by training networks using only a few labeled examples . For example , data augmentation can reduce the needed amount of labeled data by introducing additional variation into small , labeled training sets through operations such as affine transforms or learned transformations ( e.g . deformations learned by GANs ) ( Zhao et al. , 2019 ; Eaton-Rosen et al. , 2018 ; Çiçek et al. , 2016 ) . Many semisupervised approaches aim to learn a useful representation from unlabeled data then fine-tune on a few manually-annotated images ( Chen et al. , 2020 ; Bai et al. , 2019 ; Chen et al. , 2019 ; Chaitanya et al. , 2020a ) . Finally , other approaches aim to transfer knowledge learned from segmenting one class in order to segment a previously unseen class ( Shaban et al. , 2017 ; Rakelly et al. , 2018 ; Roy et al. , 2020 ; Ouyang et al. , 2020 ) . However , these FSL approaches have limitations . For example , effective data augmentation often requires model- and task-specific transformations that are difficult ∗For correspondence , please contact smhooper @ stanford.edu to generalize to all tasks , and transferring knowledge from one segmentation target to another relies on the segmentations of other classes being present in training datasets . More generally , bringing all of the known domain expertise or structural information to bear is prohibitive . Weak supervision ( WS ) is a different approach to training without manual labels that takes advantage of multiple weak labeling sources ( Mintz et al. , 2009 ; Craven & Kumlien , 1999 ; Takamatsu et al. , 2012 ; Gupta & Manning , 2014 ; Ratner et al. , 2019 ) . In many WS workflows , labeling functions ( LFs ) are crafted to encode the decision-making processes of experts into small functions that programatically label training data . LFs can drastically reduce labeling time , but the resulting labels are often noisy and conflicting . The driving idea behind WS is that the accuracies of and correlations between LFs can be learned without access to ground truth labels , then used to aggregate the LF outputs . This WS workflow enables rapid construction of training sets without manual annotation . Due to the widespread success of weak supervision methods ( Dunnmon et al. , 2020 ; Sheng et al. , 2020 ; Bach et al. , 2019 ) , weak supervision is an appealing approach for generating labeled segmentation training sets without relying on hand-labeled data . However , existing WS frameworks do not readily extend to the segmentation setting for the following two reasons : • Injecting knowledge . It is unclear how users can construct multiple segmentation LFs that inject knowledge for a segmentation task at hand—and are suitable for any image . • Modeling LF accuracies . We need to fuse the LFs , but the probabilistic graphical models ( PGMs ) of existing WS frameworks rely on estimating the accuracies for each labeling function , which is a problematic metric for segmentation : it is not sensitive to small differences at segmentation borders nor robust to arbitrary image crops ( Figure 1 , right ) . We propose a best-of-both-worlds approach that fuses FSL and WS for segmentation tasks . Specifically , we use FSL models as LFs , obviating the need to craft expertise-injecting LFs by hand . To resolve the difficulty in tracking accuracies per LF , which are too coarse of a metric for segmentation , we proposing a new WS PGM . Our PGM introduces conditional terms that “ focus ” on areas of contention , where LFs disagree , more finely tracking the LF performance in such areas . We validate our approach on seven medical image segmentation tasks . We show that our method can achieve within 1.4 Dice points of a fully supervised network using only five labeled images . We compare our proposed method to five other few-shot segmentation methods , and find that our method exceeds the next-best by a mean 3.6 Dice points . Finally , we analyze how different FSL methods scale with additional unlabeled training data and compare our PGM to existing WS models . There are two primary contributions in this work . First , we present a weak supervision pipeline tailored to the segmentation use case which utilizes a small number of labeled images and many unlabeled images to train a high-performing segmentation network . Second , we develop a novel PGM to aggregate noisy segmentation masks and show that the parameters of this model can be learned without access to ground truth labels . We show that our new approach to few-shot image segmentation outperforms many competitive baselines . 2 RELATED WORK . Data augmentation Data augmentation has been shown to enable training on few labeled examples , particularly in medical imaging . These augmentations range from simple operations such as affine transforms , elastic transforms , and contrast jitter ( Çiçek et al. , 2016 ; Cireşan et al. , 2011 ) to more complex learned operations , such as the use of GANs to learn intensity and spatial deformation transforms to generate synthetic medical images ( Chaitanya et al. , 2020b ) . Transferring knowledge A popular FSL approach enables prediction on previously unseen classes by leveraging representations learned from prior experience ( Snell et al. , 2017 ; Sung et al. , 2018 ) . Applications to segmentation include Rakelly et al . ( 2018 ) ; Shaban et al . ( 2017 ) ; Dong & Xing ( 2018 ) . For example , PANet is a proposed approach for few-shot semantic segmentation that utilizes representations for each semantic class from the support set , then labels query images by propagating labels from the support set in embedding space ( Wang et al. , 2019 ) . Few-shot segmentation was extended specifically to the medical imaging case by Roy et al . ( 2020 ) , where “ squeeze and excite ” blocks are used to learn class representations without pretrained networks . However , these approaches rely on the availability of labels of other classes during training . Self- and semi-supervised learning Self- and semi-supervised methods have been proposed for image segmentation without relying on the availability of other classes during training ( Chen et al. , 2020 ; Bai et al. , 2019 ; Chen et al. , 2019 ) . Instead , semi-supervised segmentation methods often pretrain on large unlabeled datasets to learn useful representations without any annotations . For example , contrastive learning has been proposed to pretrain CNNs , which are then fine-tuned using a small number of manually segmented images ( Chaitanya et al. , 2020a ) . Additionally , superpixel segmentations have been proposed to self-supervise networks , which can be used to segment test images without fine tuning ( Ouyang et al. , 2020 ) . In the Appendix , we also discuss conditional random fields and using coarse labels ( e.g. , bounding boxes , scribbles , and image-level labels ) to train segmentation models . 3 SEGMENTATION WITH FSL AND WS FUSION . We first give background on WS and state the problem setting . Then , we follow with details of the primary challenges and solutions in each stage of our method . Specifically , we discuss LFs and a new PGM that fuses FSL with WS . We end with a summary of our proposed workflow . 3.1 WEAK SUPERVISION BACKGROUND . We build our approach off of principles from WS . We note that WS is an overloaded term in literature . In this work , we refer to WS as the class of approaches in which multiple noisy labeling sources are aggregated into probabilistic training labels without access to ground truth labels ( Ratner et al. , 2019 ) . The goal of WS is to best utilize multiple sources of noisy signal ( i.e . LFs ) to label training data without relying on manual annotation . Each LF takes as input an unlabeled training point and outputs a vote for the label of that training point . These LFs can replace manual training data annotation , however LF votes can be imperfect and conflict with one another . A latent variable model ( referred to as a label model ) can be used to model these observed LFs and their relationship to the latent ground truth label . In Figure 2a , we show a simple model where five LFs each vote on the label for a single unobserved ground truth label . Importantly , the parameters of this model need to be estimated without access to ground truth annotation . The learned label model can be then used to produce probabilistic training labels to train a downstream network , referred to as an end model . Building off of this past work , our weak supervision pipeline proceeds in three steps : ( 1 ) noisy labels are generated by multiple LFs , ( 2 ) the noisy labels are aggregated into weak labels by a probabilistic graphical model ( PGM ) , and ( 3 ) the weak labels are used to train a segmentation model ( Figure 1 ) . 3.2 PROBLEM SETTING . We are given a training set of n images , X = [ X1 , X2 , ... , Xn ] , where Xi ∈ RI×J×K×T is a tensor of P pixels . I , J , K , and T represent the dimensions of image Xi , where K > 1 for volumetric images and T > 1 for time series images . For each image Xi there is a segmentation mask Yi ∈ { c } I×J×K×T , where { c } is the set of class labels , yielding the set Y = [ Y1 , Y2 , ... , Yn ] of all unobserved ground truth segmentation masks . We have access to m labeling functions that provide noisy segmentation masks λli ∈ { c } I×J×K×T for each Xi , where l ∈ { 1 , 2 , ... , m } . From these observed sources , we seek to generate the set of weak labels Ŷ to estimate Y. Ŷ provides labels for a large dataset , and we can use these to train any end model ( e.g. , a segmentation CNN ) . We tackle the binary segmentation case , { c } = { −1 , 1 } ; simple multiclass extensions are possible . Model Structure The ( unobserved ) ground truth mask Y and the ( observed ) sources λ are jointly modeled by an undirected graphical model ( Koller & Friedman , 2009 ; Wainwright & Jordan , 2008 ) with graph G = ( V , E ) . Since Y is unobserved , this is a latent-variable model . We use conventional structures for each component and combine them in a natural way : • In a standard weak supervision approach , the m weak sources are connected to a groundtruth label Y ( Fig . 2a ) , • The segmentation mask Y is a multi-dimensional grid over the pixels ( Fig . 2b ) , • Our full model has one copy of the WS graph for each pixel in the grid ( Fig . 2c ) . Our goal is to construct effective LFs and to complete the model specification above by defining the potentials associated with the edges in E and the corresponding parameters . | This paper studies few-shot segmentation for medical images where labeled data is hard to obtain. It proposed a stage-wise pipeline where pseudo labels are first proposed by noisy learning functions (LFs), then aggregated through a PGM, and finally used to train a segmentation model. The authors argue the two biggest challenges are "injecting knowledge for segmentation model" and "measuring accuracies of pseudo labels", and propose two modules to address them. The experiments have shown that the proposed method outperforming several few-shot learning baselines. | SP:63f8a0b2517c67e8d33f6522e9ee0402a2ed574b |
Adaptive Gradient Methods Converge Faster with Over-Parameterization (and you can do a line-search) | 1 INTRODUCTION . Adaptive gradient methods such as AdaGrad ( Duchi et al. , 2011 ) , RMSProp ( Tieleman & Hinton , 2012 ) , AdaDelta ( Zeiler , 2012 ) , Adam ( Kingma & Ba , 2015 ) , and AMSGrad ( Reddi et al. , 2018 ) are popular optimizers for training deep neural networks ( Goodfellow et al. , 2016 ) . These methods scale well and exhibit good performance across problems , making them the default choice for many machine learning applications . Theoretically , these methods are usually studied in the non-smooth , online convex optimization setting ( Duchi et al. , 2011 ; Reddi et al. , 2018 ) with recent extensions to the strongly-convex ( Mukkamala & Hein , 2017 ; Wang et al. , 2020 ; Xie et al. , 2020 ) and non-convex settings ( Li & Orabona , 2019 ; Ward et al. , 2019 ; Zhou et al. , 2018 ; Chen et al. , 2019 ; Wu et al. , 2019 ; Défossez et al. , 2020 ; Staib et al. , 2019 ) . An online–batch reduction gives guarantees similar to stochastic gradient descent ( SGD ) in the offline setting ( Cesa-Bianchi et al. , 2004 ; Hazan & Kale , 2014 ; Levy et al. , 2018 ) . However , there are several discrepancies between the theory and application of these methods . Although the theory advocates for using decreasing step-sizes for Adam , AMSGrad and its variants ( Kingma & Ba , 2015 ; Reddi et al. , 2018 ) , a constant step-size is typically used in practice ( Paszke et al. , 2019 ) . Similarly , the standard analysis of these methods assumes a decreasing momentum parameter , however , the momentum is fixed in practice . On the other hand , AdaGrad ( Duchi et al. , 2011 ) has been shown to be “ universal ” as it attains the best known convergence rates in both the stochastic smooth and non-smooth settings ( Levy et al. , 2018 ) , but its empirical performance is rather disappointing when training deep models ( Kingma & Ba , 2015 ) . Improving the empirical performance was indeed the main motivation behind Adam and other methods ( Tieleman & Hinton , 2012 ; Zeiler , 2012 ) that followed AdaGrad . Although these methods have better empirical performance , they are not guaranteed to converge to the solution with a constant step-size and momentum parameter . Another inconsistency is that although the standard theoretical results are for non-smooth functions , these methods are also extensively used in the easier , smooth setting . More importantly , adaptive gradient methods are generally used to train highly expressive , large over-parameterized models ( Zhang et al. , 2017 ; Liang & Rakhlin , 2018 ) capable of interpolating the data . However , the standard theoretical analyses do not take advantage of these additional properties . On the other hand , a line of recent work ( Schmidt & Le Roux , 2013 ; Jain et al. , 2018 ; Ma et al. , 2018 ; Liu & Belkin , 2020 ; Cevher & Vũ , 2019 ; Vaswani et al. , 2019a ; b ; Wu et al. , 2019 ; Loizou et al. , 2020 ) focuses on the convergence of SGD in this interpolation setting . In the standard finite-sum case , interpolation implies that all the functions in the sum are minimized at the same solution . Under this additional assumption , these works show SGD with a constant step-size converges to the minimizer at a faster rate for both convex and non-convex smooth functions . In this work , we aim to resolve some of the discrepancies in the theory and practice of adaptive gradient methods . To theoretically analyze these methods , we consider a simplistic setting - smooth , convex functions under interpolation . Using the intuition gained from theory , we propose better techniques to adaptively set the step-size for these methods , dramatically improving their empirical performance when training over-parameterized models . 1.1 BACKGROUND AND CONTRIBUTIONS . Constant step-size . We focus on the theoretical convergence of two adaptive gradient methods : AdaGrad and AMSGrad . For smooth , convex functions , Levy et al . ( 2018 ) prove that AdaGrad with a constant step-size adapts to the smoothness and gradient noise , resulting in an O ( 1/T + ζ/ √ T ) convergence rate , where T is the number of iterations and ζ2 is a global bound on the variance in the stochastic gradients . This convergence rate matches that of SGD under the same setting ( Moulines & Bach , 2011 ) . In Section 3 , we show that constant step-size AdaGrad also adapts to interpolation and prove an O ( 1/T + σ/ √ T ) rate , where σ is the extent to which interpolation is violated . In the over-parameterized setting , σ2 can be much smaller than ζ2 ( Zhang & Zhou , 2019 ) , implying a faster convergence . When interpolation is exactly satisfied , σ2 = 0 , we obtain an O ( 1/T ) rate , while ζ2 can still be large . In the online convex optimization framework , for smooth functions , we show that the regret of AdaGrad improves from O ( √ T ) to O ( 1 ) when interpolation is satisfied and retains its O ( √ T ) -regret guarantee in the general setting ( Appendix C.2 ) . Assuming its corresponding preconditioner remains bounded , we show that AMSGrad with a constant step-size and constant momentum parameter also converges at the rate O ( 1/T ) under interpolation ( Section 4 ) . However , unlike AdaGrad , it requires specific step-sizes that depend on the problem ’ s smoothness . More generally , constant step-size AMSGrad converges to a neighbourhood of the solution , attaining an O ( 1/T + σ2 ) rate , which matches the rate of constant step-size SGD in the same setting ( Schmidt & Le Roux , 2013 ; Vaswani et al. , 2019a ) . When training over-parameterized models , this result provides some justification for the faster ( O ( 1/T ) vs. O ( 1/ √ T ) ) convergence of the AMSGrad variant typically used in practice . Adaptive step-size . Although AdaGrad converges at the same asymptotic rate for any step-size ( up to constants ) , it is unclear how to choose this step-size without manually trying different values . Similarly , AMSGrad is sensitive to the step-size , converging only for a specific range in both theory and practice . In Section 5 , we experimentally show that even for simple , convex problems , the step-size has a big impact on the empirical performance of AdaGrad and AMSGrad . To overcome this limitation , we use recent methods ( Vaswani et al. , 2019a ; Loizou et al. , 2020 ) that automatically set the step-size for SGD . These works use stochastic variants of the classical Armijo line-search ( Armijo , 1966 ) or the Polyak step-size ( Polyak , 1963 ) in the interpolation setting . We combine these techniques with adaptive gradient methods and show that a variant of stochastic line-search ( SLS ) enables AdaGrad to adapt to the smoothness of the underlying function , resulting in faster empirical convergence , while retaining its favourable convergence properties ( Section 3 ) . Similarly , AMSGrad with variants of SLS and SPS can match the convergence rate of its constant step-size counterpart , but without knowledge of the underlying smoothness properties ( Section 4 ) . Experimental results . Finally , in Section 5 , we benchmark our results against SGD variants with SLS ( Vaswani et al. , 2019b ) , SPS ( Loizou et al. , 2020 ) , tuned Adam and its recently proposed variants ( Luo et al. , 2019 ; Liu et al. , 2020 ) . We demonstrate that the proposed techniques for setting the step-size improve the empirical performance of adaptive gradient methods . These improvements are consistent across tasks , ranging from binary classification with a kernel mapping to multi-class classification using standard deep neural network architectures . 2 PROBLEM SETUP . We consider the unconstrained minimization of an objective f : Rd → R with a finite-sum structure , f ( w ) = 1n ∑n i=1 fi ( w ) . In supervised learning , n represents the number of training examples , and fi is the loss function on training example i . Although we focus on the finite-sum setting , our results can be easily generalized to the online optimization setting . The objective of our analysis is to better understand the effect of the step-size and line-searches when interpolation is ( almost ) satisfied . This is complicated by the fact that adaptive methods are still poorly understood ; state-of-the-art analyses do not show an improvement over gradient descent in the worst-case . To focus on the effect of step-sizes , we make the simplifying assumptions described in this section . We assume f and each fi are differentiable , convex , and lower-bounded by f∗ and f∗i , respectively . Furthermore , we assume that each function fi in the finite-sum is Li-smooth , implying that f is Lmax-smooth , where Lmax = maxi Li . We also make the standard assumption that the iterates remain bounded in a ball of radius D around a global minimizer , ‖wk − w∗‖ ≤ D for all wk ( Ahn et al. , 2020 ) . We remark that the bounded iterates assumption simplifies the analysis but is not essential , and similar to Reddi et al . ( 2018 ) ; Duchi et al . ( 2011 ) ; Levy et al . ( 2018 ) , our theoretical results can be extended to include a projection step . We include the formal definitions of these properties ( Nemirovski et al. , 2009 ) in Appendix A . The interpolation assumption means that the gradient of each fi in the finite-sum converges to zero at an optimum . If the overall objective f is minimized at w∗ , ∇f ( w∗ ) = 0 , then for all fi we have ∇fi ( w∗ ) = 0 . The interpolation condition can be exactly satisfied for many over-parameterized machine learning models such as non-parametric kernel regression without regularization ( Belkin et al. , 2019 ; Liang & Rakhlin , 2018 ) and over-parameterized deep neural networks ( Zhang et al. , 2017 ) . We measure the extent to which interpolation is violated by the disagreement between the minimum overall function value f∗ and the minimum value of each individual functions f∗i , σ2 : = Ei [ f∗ − f∗i ] ∈ [ 0 , ∞ ) ( Loizou et al. , 2020 ) . The minimizer of f need not be unique for σ2 to be uniquely defined , as it only depends on the minimum function values . Interpolation is said to be exactly satisfied if σ2 = 0 , and we also study the setting when σ2 > 0 . For a preconditioner matrix Ak and a constant momentum parameter β ∈ [ 0 , 1 ) , the update for a generic adaptive gradient method at iteration k can be expressed as : wk+1 = wk − ηk A−1k mk ; mk = βmk−1 + ( 1− β ) ∇fik ( wk ) ( 1 ) Here , ∇fik ( wk ) is the stochastic gradient of a randomly chosen function fik , and ηk is the step-size . Adaptive gradient methods typically differ in how their preconditioners are constructed and whether or not they include the momentum term βmk−1 ( see Table 1 for a list of common methods ) . Both RMSProp and Adam maintain an exponential moving average of past stochastic gradients , but as Reddi et al . ( 2018 ) pointed out , unlike AdaGrad , the corresponding preconditioners do not guarantee that Ak+1 Ak and the resulting per-dimension step-sizes do not go to zero . This can lead to large fluctuations in the effective step-size and prevent these methods from converging . To mitigate this problem , they proposed AMSGrad , which ensures Ak+1 Ak and the convergence of iterates . Consequently , our theoretical results focus on AdaGrad , AMSGrad and other adaptive gradient methods that ensure this monotonicity . However , we also considered RMSProp and Adam in our experimental evaluation . Although our theory holds for both the full matrix and diagonal variants ( where Ak is a diagonal matrix ) of these methods , we use only the latter in experiments for scalability . The diagonal variants perform a per-dimension scaling of the gradient and avoid computing the full matrix inverse , so their per-iteration cost is the same as SGD , although with an additional O ( d ) memory . For AMSGrad , we assume that the corresponding preconditioners are well-behaved in the sense that their eigenvalues are bounded in an interval [ amin , amax ] . This is a common assumption made in the analysis of adaptive methods . Moreover , for diagonal preconditioners , such a boundedness property is easy to verify , and it is also inexpensive to maintain the desired range by projection . Our main theoretical results for AdaGrad ( Section 3 ) and AMSGrad ( Section 4 ) are summarized in Table 2 . | This paper analyzes adaptive algorithms such as adagrad and AMSGrad in a finite-sum optimization problem. The proofs appear to treat this setting through online convex optimization and online-to-batch conversion. It is shown that both AdaGrad and AMSGrad improve when the individual losses are all minimized at the same point. Further, line search techniques are analyzed in conjunction with these algorithms, and empirical results show that in practice the line searches speed up convergence. | SP:5dadee976ef100a6bd77cd4e3a0f02b8376556af |
Adaptive Gradient Methods Converge Faster with Over-Parameterization (and you can do a line-search) | 1 INTRODUCTION . Adaptive gradient methods such as AdaGrad ( Duchi et al. , 2011 ) , RMSProp ( Tieleman & Hinton , 2012 ) , AdaDelta ( Zeiler , 2012 ) , Adam ( Kingma & Ba , 2015 ) , and AMSGrad ( Reddi et al. , 2018 ) are popular optimizers for training deep neural networks ( Goodfellow et al. , 2016 ) . These methods scale well and exhibit good performance across problems , making them the default choice for many machine learning applications . Theoretically , these methods are usually studied in the non-smooth , online convex optimization setting ( Duchi et al. , 2011 ; Reddi et al. , 2018 ) with recent extensions to the strongly-convex ( Mukkamala & Hein , 2017 ; Wang et al. , 2020 ; Xie et al. , 2020 ) and non-convex settings ( Li & Orabona , 2019 ; Ward et al. , 2019 ; Zhou et al. , 2018 ; Chen et al. , 2019 ; Wu et al. , 2019 ; Défossez et al. , 2020 ; Staib et al. , 2019 ) . An online–batch reduction gives guarantees similar to stochastic gradient descent ( SGD ) in the offline setting ( Cesa-Bianchi et al. , 2004 ; Hazan & Kale , 2014 ; Levy et al. , 2018 ) . However , there are several discrepancies between the theory and application of these methods . Although the theory advocates for using decreasing step-sizes for Adam , AMSGrad and its variants ( Kingma & Ba , 2015 ; Reddi et al. , 2018 ) , a constant step-size is typically used in practice ( Paszke et al. , 2019 ) . Similarly , the standard analysis of these methods assumes a decreasing momentum parameter , however , the momentum is fixed in practice . On the other hand , AdaGrad ( Duchi et al. , 2011 ) has been shown to be “ universal ” as it attains the best known convergence rates in both the stochastic smooth and non-smooth settings ( Levy et al. , 2018 ) , but its empirical performance is rather disappointing when training deep models ( Kingma & Ba , 2015 ) . Improving the empirical performance was indeed the main motivation behind Adam and other methods ( Tieleman & Hinton , 2012 ; Zeiler , 2012 ) that followed AdaGrad . Although these methods have better empirical performance , they are not guaranteed to converge to the solution with a constant step-size and momentum parameter . Another inconsistency is that although the standard theoretical results are for non-smooth functions , these methods are also extensively used in the easier , smooth setting . More importantly , adaptive gradient methods are generally used to train highly expressive , large over-parameterized models ( Zhang et al. , 2017 ; Liang & Rakhlin , 2018 ) capable of interpolating the data . However , the standard theoretical analyses do not take advantage of these additional properties . On the other hand , a line of recent work ( Schmidt & Le Roux , 2013 ; Jain et al. , 2018 ; Ma et al. , 2018 ; Liu & Belkin , 2020 ; Cevher & Vũ , 2019 ; Vaswani et al. , 2019a ; b ; Wu et al. , 2019 ; Loizou et al. , 2020 ) focuses on the convergence of SGD in this interpolation setting . In the standard finite-sum case , interpolation implies that all the functions in the sum are minimized at the same solution . Under this additional assumption , these works show SGD with a constant step-size converges to the minimizer at a faster rate for both convex and non-convex smooth functions . In this work , we aim to resolve some of the discrepancies in the theory and practice of adaptive gradient methods . To theoretically analyze these methods , we consider a simplistic setting - smooth , convex functions under interpolation . Using the intuition gained from theory , we propose better techniques to adaptively set the step-size for these methods , dramatically improving their empirical performance when training over-parameterized models . 1.1 BACKGROUND AND CONTRIBUTIONS . Constant step-size . We focus on the theoretical convergence of two adaptive gradient methods : AdaGrad and AMSGrad . For smooth , convex functions , Levy et al . ( 2018 ) prove that AdaGrad with a constant step-size adapts to the smoothness and gradient noise , resulting in an O ( 1/T + ζ/ √ T ) convergence rate , where T is the number of iterations and ζ2 is a global bound on the variance in the stochastic gradients . This convergence rate matches that of SGD under the same setting ( Moulines & Bach , 2011 ) . In Section 3 , we show that constant step-size AdaGrad also adapts to interpolation and prove an O ( 1/T + σ/ √ T ) rate , where σ is the extent to which interpolation is violated . In the over-parameterized setting , σ2 can be much smaller than ζ2 ( Zhang & Zhou , 2019 ) , implying a faster convergence . When interpolation is exactly satisfied , σ2 = 0 , we obtain an O ( 1/T ) rate , while ζ2 can still be large . In the online convex optimization framework , for smooth functions , we show that the regret of AdaGrad improves from O ( √ T ) to O ( 1 ) when interpolation is satisfied and retains its O ( √ T ) -regret guarantee in the general setting ( Appendix C.2 ) . Assuming its corresponding preconditioner remains bounded , we show that AMSGrad with a constant step-size and constant momentum parameter also converges at the rate O ( 1/T ) under interpolation ( Section 4 ) . However , unlike AdaGrad , it requires specific step-sizes that depend on the problem ’ s smoothness . More generally , constant step-size AMSGrad converges to a neighbourhood of the solution , attaining an O ( 1/T + σ2 ) rate , which matches the rate of constant step-size SGD in the same setting ( Schmidt & Le Roux , 2013 ; Vaswani et al. , 2019a ) . When training over-parameterized models , this result provides some justification for the faster ( O ( 1/T ) vs. O ( 1/ √ T ) ) convergence of the AMSGrad variant typically used in practice . Adaptive step-size . Although AdaGrad converges at the same asymptotic rate for any step-size ( up to constants ) , it is unclear how to choose this step-size without manually trying different values . Similarly , AMSGrad is sensitive to the step-size , converging only for a specific range in both theory and practice . In Section 5 , we experimentally show that even for simple , convex problems , the step-size has a big impact on the empirical performance of AdaGrad and AMSGrad . To overcome this limitation , we use recent methods ( Vaswani et al. , 2019a ; Loizou et al. , 2020 ) that automatically set the step-size for SGD . These works use stochastic variants of the classical Armijo line-search ( Armijo , 1966 ) or the Polyak step-size ( Polyak , 1963 ) in the interpolation setting . We combine these techniques with adaptive gradient methods and show that a variant of stochastic line-search ( SLS ) enables AdaGrad to adapt to the smoothness of the underlying function , resulting in faster empirical convergence , while retaining its favourable convergence properties ( Section 3 ) . Similarly , AMSGrad with variants of SLS and SPS can match the convergence rate of its constant step-size counterpart , but without knowledge of the underlying smoothness properties ( Section 4 ) . Experimental results . Finally , in Section 5 , we benchmark our results against SGD variants with SLS ( Vaswani et al. , 2019b ) , SPS ( Loizou et al. , 2020 ) , tuned Adam and its recently proposed variants ( Luo et al. , 2019 ; Liu et al. , 2020 ) . We demonstrate that the proposed techniques for setting the step-size improve the empirical performance of adaptive gradient methods . These improvements are consistent across tasks , ranging from binary classification with a kernel mapping to multi-class classification using standard deep neural network architectures . 2 PROBLEM SETUP . We consider the unconstrained minimization of an objective f : Rd → R with a finite-sum structure , f ( w ) = 1n ∑n i=1 fi ( w ) . In supervised learning , n represents the number of training examples , and fi is the loss function on training example i . Although we focus on the finite-sum setting , our results can be easily generalized to the online optimization setting . The objective of our analysis is to better understand the effect of the step-size and line-searches when interpolation is ( almost ) satisfied . This is complicated by the fact that adaptive methods are still poorly understood ; state-of-the-art analyses do not show an improvement over gradient descent in the worst-case . To focus on the effect of step-sizes , we make the simplifying assumptions described in this section . We assume f and each fi are differentiable , convex , and lower-bounded by f∗ and f∗i , respectively . Furthermore , we assume that each function fi in the finite-sum is Li-smooth , implying that f is Lmax-smooth , where Lmax = maxi Li . We also make the standard assumption that the iterates remain bounded in a ball of radius D around a global minimizer , ‖wk − w∗‖ ≤ D for all wk ( Ahn et al. , 2020 ) . We remark that the bounded iterates assumption simplifies the analysis but is not essential , and similar to Reddi et al . ( 2018 ) ; Duchi et al . ( 2011 ) ; Levy et al . ( 2018 ) , our theoretical results can be extended to include a projection step . We include the formal definitions of these properties ( Nemirovski et al. , 2009 ) in Appendix A . The interpolation assumption means that the gradient of each fi in the finite-sum converges to zero at an optimum . If the overall objective f is minimized at w∗ , ∇f ( w∗ ) = 0 , then for all fi we have ∇fi ( w∗ ) = 0 . The interpolation condition can be exactly satisfied for many over-parameterized machine learning models such as non-parametric kernel regression without regularization ( Belkin et al. , 2019 ; Liang & Rakhlin , 2018 ) and over-parameterized deep neural networks ( Zhang et al. , 2017 ) . We measure the extent to which interpolation is violated by the disagreement between the minimum overall function value f∗ and the minimum value of each individual functions f∗i , σ2 : = Ei [ f∗ − f∗i ] ∈ [ 0 , ∞ ) ( Loizou et al. , 2020 ) . The minimizer of f need not be unique for σ2 to be uniquely defined , as it only depends on the minimum function values . Interpolation is said to be exactly satisfied if σ2 = 0 , and we also study the setting when σ2 > 0 . For a preconditioner matrix Ak and a constant momentum parameter β ∈ [ 0 , 1 ) , the update for a generic adaptive gradient method at iteration k can be expressed as : wk+1 = wk − ηk A−1k mk ; mk = βmk−1 + ( 1− β ) ∇fik ( wk ) ( 1 ) Here , ∇fik ( wk ) is the stochastic gradient of a randomly chosen function fik , and ηk is the step-size . Adaptive gradient methods typically differ in how their preconditioners are constructed and whether or not they include the momentum term βmk−1 ( see Table 1 for a list of common methods ) . Both RMSProp and Adam maintain an exponential moving average of past stochastic gradients , but as Reddi et al . ( 2018 ) pointed out , unlike AdaGrad , the corresponding preconditioners do not guarantee that Ak+1 Ak and the resulting per-dimension step-sizes do not go to zero . This can lead to large fluctuations in the effective step-size and prevent these methods from converging . To mitigate this problem , they proposed AMSGrad , which ensures Ak+1 Ak and the convergence of iterates . Consequently , our theoretical results focus on AdaGrad , AMSGrad and other adaptive gradient methods that ensure this monotonicity . However , we also considered RMSProp and Adam in our experimental evaluation . Although our theory holds for both the full matrix and diagonal variants ( where Ak is a diagonal matrix ) of these methods , we use only the latter in experiments for scalability . The diagonal variants perform a per-dimension scaling of the gradient and avoid computing the full matrix inverse , so their per-iteration cost is the same as SGD , although with an additional O ( d ) memory . For AMSGrad , we assume that the corresponding preconditioners are well-behaved in the sense that their eigenvalues are bounded in an interval [ amin , amax ] . This is a common assumption made in the analysis of adaptive methods . Moreover , for diagonal preconditioners , such a boundedness property is easy to verify , and it is also inexpensive to maintain the desired range by projection . Our main theoretical results for AdaGrad ( Section 3 ) and AMSGrad ( Section 4 ) are summarized in Table 2 . | This paper studies adaptive gradient methods under the over-parametrized settings, where the authors study the converge in the interpolation setting. In this setting, the optimal objective is 0. The authors show that the convergence rate is O(1/T). In addition, when the interpolation is approximately satisfied, the authors show the convergence to a neighborhood of the solution. The authors also provide theoretical justifications for popular line search methods. | SP:5dadee976ef100a6bd77cd4e3a0f02b8376556af |
Abductive Knowledge Induction from Raw Data | 1 INTRODUCTION . Inductive bias , background knowledge , is an essential component in machine learning . Despite the success of data-driven end-to-end deep learning in many traditional machine learning tasks , it has been shown that incorporating domain knowledge is still necessary for some complex learning problems ( Dhingra et al. , 2020 ; Grover et al. , 2019 ; Trask et al. , 2018 ) . In order to leverage complex domain knowledge that is discrete and relational , end-to-end learning systems need to represent it with a differentiable module that can be embedded in the deep learning context . For example , graph neural networks ( GNN ) use relational graphs as an external knowledge base ( Zhou et al. , 2018 ) ; some works even considers more specific domain knowledge such as differentiable primitive programs ( Gaunt et al. , 2017 ) . However , the design of these modules is usually ad hoc . Sometimes , it is not easy to find an appropriate approximation that is suited for single-model based end-to-end learning ( Glasmachers , 2017 ; Garcez et al. , 2019 ) . Therefore , many researchers propose to break the end-to-end learning pipeline apart and build a hybrid model that consists of smaller modules where each of them only accounts for one specific function ( Glasmachers , 2017 ) . A representative branch in this line of research is Neural-Symbolic ( NeSy ) AI ( De Raedt et al. , 2020 ; Garcez et al. , 2019 ) aiming to bridge System 1 and System 2 AI ( Kahneman , 2011 ; Bengio , 2017 ) , i.e. , neural-network-based machine learning and symbolicbased relational inference . In NeSy models , the neural network extracts high-level symbols from noisy raw data and the symbolic model performs relational inference over the extracted symbols . However , the non-differentiable interface between neural and symbolic systems ( i.e. , the facts extracted from raw data and their truth values ) leads to high computational complexity in learning . For example , due to the lack of direct supervision to the neural network and reliable inputs to the symbolic model , some works have to use Markov Chain Monte Carlo ( MCMC ) sampling or zeroorder optimisation to train the model ( Li et al. , 2020 ; Dai et al. , 2019 ) , which could be inefficient in practice . Consequently , almost all hybrid models assume the existence of a very strong predefined domain knowledge base and focus on using it to train neural networks . It limits the expressive power of the hybrid-structured model and sacrifices many benefits of symbolic learning ( e.g. , predicate invention , learning recursive theories , and re-using learned models as background knowledge ) . In this paper , we integrate neural networks with Inductive Logic Programming ( ILP ) ( Muggleton & de Raedt , 1994 ) —a general framework for symbolic machine learning—to enable first-order logic theory induction from raw data . More specifically , we present Abductive Meta-Interpretive Learning ( Metaabd ) which extends the Abductive Learning ( ABL ) framework ( Dai et al. , 2019 ; Zhou , 2019 ) by combining logical induction and abduction ( Flach et al. , 2000 ) with neural networks in MetaInterpretive Learning ( MIL ) ( Muggleton et al. , 2014 ) . MetaAbd employs neural networks to extract probabilistic logic facts from raw data , and induces an abductive logic program ( Kakas et al. , 1992 ) that can efficiently infer possible truth values of the probabilistic facts to train the neural model . On the one hand , the abductive logic program learned by MetaAbd can largely prune the search space of the truth value assignments to the logical facts extracted by an under-trained neural model . On the other hand , the extracted probabilistic facts , although noisy , provide a distribution on the possible worlds ( Nilsson , 1986 ) reflecting the raw data distribution , which helps logical induction to identify the most probable hypothesis . The two systems inMetaAbd are integrated by a probabilistic model that can be optimised with Expectation Maximisation ( EM ) . To the best of our knowledge , Metaabd is the first system that can simultaneously ( 1 ) train neural models , ( 2 ) learn recursive logic theories and ( 3 ) perform predicate invention from domains with sub-symbolic representation . In the experiments we compare MetaAbd to the compared state-ofthe-art end-to-end deep learning models on two complex learning tasks . The results show that , given the same amount of background knowledge , Metaabd outperforms the end-to-end models significantly in terms of predictive accuracy and data efficiency , and learns human interpretable models that could be re-used in subsequent learning tasks . 2 RELATED WORK . Solving “ System 2 ” problems require the ability of relational and logical reasoning instead of “ intuitive and unconscious thinking ” ( Kahneman , 2011 ; Bengio , 2017 ) . Due to the complexity of this type of tasks , many researchers have tried to embed intricate background knowledge in end-to-end deep learning models . For example , Trask et al . ( 2018 ) propose the differentiable Neural Arithmetic Logic Units ( NALU ) to model basic arithmetic functions ( e.g. , addition , multiplication , etc . ) in neural cells ; Grover et al . ( 2019 ) encode permutation operators with a stochastic matrix and present a continuous and differentiable approximation to the sort operation ; Wang et al . ( 2019 ) introduce a differentiable SAT solver to enable gradient-based constraint solving . However , most of these specially designed differentiable modules are ad hoc approximations to the original inference mechanisms , which can not represent the inductive bias in a general form such as formal languages . In order to directly exploit the complex background knowledge expressed by formal languages , Statistical Relational ( StarAI ) and Neural Symbolic ( NeSy ) AI ( De Raedt et al. , 2020 ; Garcez et al. , 2019 ) are proposed . Some works try to approximate logical inference with continuous functions or use probabilistic logical inference to enable the end-to-end training ( Cohen et al. , 2020 ; Manhaeve et al. , 2018 ; Donadello et al. , 2017 ) ; others try to combine neural networks and pure symbolic reasoning by performing a combinatorial search over the truth values of the output facts of the neural model ( Li et al. , 2020 ; Dai et al. , 2019 ) . Because of the highly complex statistical relational inference and combinatorial search , it is difficult for them to learn first-order logic theories . Therefore , most existing StarAI and NeSy systems focus on utilising a pre-defined symbolic knowledge base to help the parameter learning of the neural model and probabilistic model . One way to learn symbolic models is to use Inductive Logic Programming ( Muggleton & de Raedt , 1994 ) . Some early work on combining logical abduction and induction can learn logic theories even when input data is incomplete ( Flach et al. , 2000 ) . Recently , ∂ILP was proposed for learning first-order logic theories from noisy data ( Evans & Grefenstette , 2018 ) . However , these works are designed for learning from domains . Otherwise , they need to use a fully trained neural model to extract primitive facts from raw data before symbolic learning . Machine apperception ( Evans et al. , 2019 ) unifies reasoning and perception by combining logical inference and binary neural networks in Answer Set Programming , in which logic hypotheses and parameters of neural networks are all represented by logical groundings , making the system hard to optimise . For problems involving noisy inputs like MNIST images , it still requires a fully pre-trained neural net for pre-processing . Different to the previous work , our presented Abductive Meta-Interpretive Learning ( MetaAbd ) aims to combine symbolic and sub-symbolic learning in a mutually beneficial way , where the induced abductive logic program prunes the combinatorial search of the unknown labels for training the neural model ; and the probabilistic facts output by the neural model provide a distribution on the possible worlds of the symbolic domain to help logic theory induction . 3 ABDUCTIVE META-INTERPRETIVE LEARNING . 3.1 PROBLEM FORMULATION . A typical hybrid model bridging sub-symbolic and symbolic learning contains two major parts : a perception model and a reasoning model ( Dai et al. , 2019 ) . The perception model maps raw inputs x ∈ X—which are usually noisy and represented by sub-symbolic features—to some primitive symbols z ∈ Z , such as digits , objects , ground logical expressions , etc . The reasoning model takes the interpreted z as input and deduces the final output y ∈ Y according to a symbolic background knowledge base B . Because the primitive symbols z are uncertain and not observable from both training data and the background knowledge , we have named them as pseudo-labels of x . The perception model is parameterised with θ and outputs the conditional probability Pθ ( z|x ) = P ( z|x , θ ) ; the reasoning modelH ∈ H is a set of first-order logical clauses such thatB∪H∪z |= y , where “ |= ” means “ logically entails ” . Our target is to learn θ and H simultaneously from training data D = { 〈xi , yi〉 } ni=1 . For example , if we have one example with x = [ , , ] and y = 6 , given background knowledge about adding two numbers , the hybrid model should learn a perception model that recognises z = [ 1 , 2 , 3 ] and induce a program to add all numbers in z recursively . Assuming that D is an i.i.d . sample from the underlying distribution of ( x , y ) , the objective of our learning problem can be represented as follows : ( H∗ , θ∗ ) = argmax H , θ ∏ 〈x , y〉∈D ∑ z∈Z P ( y , z|B , x , H , θ ) , ( 1 ) where z is a hidden variable in this model . Theoretically , this problem can be solved by Expectation Maximisation ( EM ) algorithm . However , even if we can obtain the expectation of the hidden variable z and efficiently estimate the perception model ’ s parameter θ with numerical optimisation , the hypothesis H , which is a first-order logic theory , is still difficult to be optimised together with θ . We propose to solve this problem by treating H like z as an extra hidden variable , which gives us : θ∗ = argmax θ ∏ 〈x , y〉∈D ∑ H∈H ∑ z∈Z P ( y , H , z|B , x , θ ) ( 2 ) The hybrid-model learning problem in Equation 1 can be split into two EM steps : ( 1 ) Expectation : obtain the expected value of H and z by sampling them in their discrete hypothesis space from ( H , z ) ∼ P ( H , z|B , x , y , θ ) ; ( 2 ) Maximisation : estimate θ by maximising the likelihood of training data with efficient numerical optimisation approaches such as gradient descent . As one can imagine , the main challenge is to estimate the expectation of the hidden variables H ∪ z , i.e. , we need to search for the most probable H and z given the θ learned in the previous iteration . Challenges This search problem is nontrivial . Sampling the values of hidden variable z results in a search space growing exponentially with the number of training examples . Even when B is sound and complete , existing hybrid models that do not learn first-order hypotheses still have to use Zero-Order Optimisation ( ZOOpt ) or Markov Chain Monte Carlo ( MCMC ) sampling to estimate the expectation of z ( Dai et al. , 2019 ; Li et al. , 2020 ) , which could be quite inefficient in practice . Furthermore , the size and structure of hypothesis space H of first-order logic programs makes the search problem even more complicated . For example , given x = [ , , ] and y = 6 , when the perception model is accurate enough to output the most probable z = [ 1 , 2 , 3 ] , we have at least two choices for H : cumulative sum or cumulative product . When the perception model is under-trained and outputs the most probable z = [ 2 , 2 , 3 ] , then H could be a program that only multiplies the last two digits . Hence , H and z are entangled and can not be treated independently . | In this paper, the author proposes Meta_abd which is a hybrid model that learns a deep recognition model and FOL rules the same time. The goal of this work is to learn FOL rules from raw data such as digits presented in image patches in an end-to-end fashion. The model is evaluated with 3 induction benchmarks associated to the MINST digit dataset. | SP:5be59a79316e4eeac5d6da1804b61a484a9ac2aa |
Abductive Knowledge Induction from Raw Data | 1 INTRODUCTION . Inductive bias , background knowledge , is an essential component in machine learning . Despite the success of data-driven end-to-end deep learning in many traditional machine learning tasks , it has been shown that incorporating domain knowledge is still necessary for some complex learning problems ( Dhingra et al. , 2020 ; Grover et al. , 2019 ; Trask et al. , 2018 ) . In order to leverage complex domain knowledge that is discrete and relational , end-to-end learning systems need to represent it with a differentiable module that can be embedded in the deep learning context . For example , graph neural networks ( GNN ) use relational graphs as an external knowledge base ( Zhou et al. , 2018 ) ; some works even considers more specific domain knowledge such as differentiable primitive programs ( Gaunt et al. , 2017 ) . However , the design of these modules is usually ad hoc . Sometimes , it is not easy to find an appropriate approximation that is suited for single-model based end-to-end learning ( Glasmachers , 2017 ; Garcez et al. , 2019 ) . Therefore , many researchers propose to break the end-to-end learning pipeline apart and build a hybrid model that consists of smaller modules where each of them only accounts for one specific function ( Glasmachers , 2017 ) . A representative branch in this line of research is Neural-Symbolic ( NeSy ) AI ( De Raedt et al. , 2020 ; Garcez et al. , 2019 ) aiming to bridge System 1 and System 2 AI ( Kahneman , 2011 ; Bengio , 2017 ) , i.e. , neural-network-based machine learning and symbolicbased relational inference . In NeSy models , the neural network extracts high-level symbols from noisy raw data and the symbolic model performs relational inference over the extracted symbols . However , the non-differentiable interface between neural and symbolic systems ( i.e. , the facts extracted from raw data and their truth values ) leads to high computational complexity in learning . For example , due to the lack of direct supervision to the neural network and reliable inputs to the symbolic model , some works have to use Markov Chain Monte Carlo ( MCMC ) sampling or zeroorder optimisation to train the model ( Li et al. , 2020 ; Dai et al. , 2019 ) , which could be inefficient in practice . Consequently , almost all hybrid models assume the existence of a very strong predefined domain knowledge base and focus on using it to train neural networks . It limits the expressive power of the hybrid-structured model and sacrifices many benefits of symbolic learning ( e.g. , predicate invention , learning recursive theories , and re-using learned models as background knowledge ) . In this paper , we integrate neural networks with Inductive Logic Programming ( ILP ) ( Muggleton & de Raedt , 1994 ) —a general framework for symbolic machine learning—to enable first-order logic theory induction from raw data . More specifically , we present Abductive Meta-Interpretive Learning ( Metaabd ) which extends the Abductive Learning ( ABL ) framework ( Dai et al. , 2019 ; Zhou , 2019 ) by combining logical induction and abduction ( Flach et al. , 2000 ) with neural networks in MetaInterpretive Learning ( MIL ) ( Muggleton et al. , 2014 ) . MetaAbd employs neural networks to extract probabilistic logic facts from raw data , and induces an abductive logic program ( Kakas et al. , 1992 ) that can efficiently infer possible truth values of the probabilistic facts to train the neural model . On the one hand , the abductive logic program learned by MetaAbd can largely prune the search space of the truth value assignments to the logical facts extracted by an under-trained neural model . On the other hand , the extracted probabilistic facts , although noisy , provide a distribution on the possible worlds ( Nilsson , 1986 ) reflecting the raw data distribution , which helps logical induction to identify the most probable hypothesis . The two systems inMetaAbd are integrated by a probabilistic model that can be optimised with Expectation Maximisation ( EM ) . To the best of our knowledge , Metaabd is the first system that can simultaneously ( 1 ) train neural models , ( 2 ) learn recursive logic theories and ( 3 ) perform predicate invention from domains with sub-symbolic representation . In the experiments we compare MetaAbd to the compared state-ofthe-art end-to-end deep learning models on two complex learning tasks . The results show that , given the same amount of background knowledge , Metaabd outperforms the end-to-end models significantly in terms of predictive accuracy and data efficiency , and learns human interpretable models that could be re-used in subsequent learning tasks . 2 RELATED WORK . Solving “ System 2 ” problems require the ability of relational and logical reasoning instead of “ intuitive and unconscious thinking ” ( Kahneman , 2011 ; Bengio , 2017 ) . Due to the complexity of this type of tasks , many researchers have tried to embed intricate background knowledge in end-to-end deep learning models . For example , Trask et al . ( 2018 ) propose the differentiable Neural Arithmetic Logic Units ( NALU ) to model basic arithmetic functions ( e.g. , addition , multiplication , etc . ) in neural cells ; Grover et al . ( 2019 ) encode permutation operators with a stochastic matrix and present a continuous and differentiable approximation to the sort operation ; Wang et al . ( 2019 ) introduce a differentiable SAT solver to enable gradient-based constraint solving . However , most of these specially designed differentiable modules are ad hoc approximations to the original inference mechanisms , which can not represent the inductive bias in a general form such as formal languages . In order to directly exploit the complex background knowledge expressed by formal languages , Statistical Relational ( StarAI ) and Neural Symbolic ( NeSy ) AI ( De Raedt et al. , 2020 ; Garcez et al. , 2019 ) are proposed . Some works try to approximate logical inference with continuous functions or use probabilistic logical inference to enable the end-to-end training ( Cohen et al. , 2020 ; Manhaeve et al. , 2018 ; Donadello et al. , 2017 ) ; others try to combine neural networks and pure symbolic reasoning by performing a combinatorial search over the truth values of the output facts of the neural model ( Li et al. , 2020 ; Dai et al. , 2019 ) . Because of the highly complex statistical relational inference and combinatorial search , it is difficult for them to learn first-order logic theories . Therefore , most existing StarAI and NeSy systems focus on utilising a pre-defined symbolic knowledge base to help the parameter learning of the neural model and probabilistic model . One way to learn symbolic models is to use Inductive Logic Programming ( Muggleton & de Raedt , 1994 ) . Some early work on combining logical abduction and induction can learn logic theories even when input data is incomplete ( Flach et al. , 2000 ) . Recently , ∂ILP was proposed for learning first-order logic theories from noisy data ( Evans & Grefenstette , 2018 ) . However , these works are designed for learning from domains . Otherwise , they need to use a fully trained neural model to extract primitive facts from raw data before symbolic learning . Machine apperception ( Evans et al. , 2019 ) unifies reasoning and perception by combining logical inference and binary neural networks in Answer Set Programming , in which logic hypotheses and parameters of neural networks are all represented by logical groundings , making the system hard to optimise . For problems involving noisy inputs like MNIST images , it still requires a fully pre-trained neural net for pre-processing . Different to the previous work , our presented Abductive Meta-Interpretive Learning ( MetaAbd ) aims to combine symbolic and sub-symbolic learning in a mutually beneficial way , where the induced abductive logic program prunes the combinatorial search of the unknown labels for training the neural model ; and the probabilistic facts output by the neural model provide a distribution on the possible worlds of the symbolic domain to help logic theory induction . 3 ABDUCTIVE META-INTERPRETIVE LEARNING . 3.1 PROBLEM FORMULATION . A typical hybrid model bridging sub-symbolic and symbolic learning contains two major parts : a perception model and a reasoning model ( Dai et al. , 2019 ) . The perception model maps raw inputs x ∈ X—which are usually noisy and represented by sub-symbolic features—to some primitive symbols z ∈ Z , such as digits , objects , ground logical expressions , etc . The reasoning model takes the interpreted z as input and deduces the final output y ∈ Y according to a symbolic background knowledge base B . Because the primitive symbols z are uncertain and not observable from both training data and the background knowledge , we have named them as pseudo-labels of x . The perception model is parameterised with θ and outputs the conditional probability Pθ ( z|x ) = P ( z|x , θ ) ; the reasoning modelH ∈ H is a set of first-order logical clauses such thatB∪H∪z |= y , where “ |= ” means “ logically entails ” . Our target is to learn θ and H simultaneously from training data D = { 〈xi , yi〉 } ni=1 . For example , if we have one example with x = [ , , ] and y = 6 , given background knowledge about adding two numbers , the hybrid model should learn a perception model that recognises z = [ 1 , 2 , 3 ] and induce a program to add all numbers in z recursively . Assuming that D is an i.i.d . sample from the underlying distribution of ( x , y ) , the objective of our learning problem can be represented as follows : ( H∗ , θ∗ ) = argmax H , θ ∏ 〈x , y〉∈D ∑ z∈Z P ( y , z|B , x , H , θ ) , ( 1 ) where z is a hidden variable in this model . Theoretically , this problem can be solved by Expectation Maximisation ( EM ) algorithm . However , even if we can obtain the expectation of the hidden variable z and efficiently estimate the perception model ’ s parameter θ with numerical optimisation , the hypothesis H , which is a first-order logic theory , is still difficult to be optimised together with θ . We propose to solve this problem by treating H like z as an extra hidden variable , which gives us : θ∗ = argmax θ ∏ 〈x , y〉∈D ∑ H∈H ∑ z∈Z P ( y , H , z|B , x , θ ) ( 2 ) The hybrid-model learning problem in Equation 1 can be split into two EM steps : ( 1 ) Expectation : obtain the expected value of H and z by sampling them in their discrete hypothesis space from ( H , z ) ∼ P ( H , z|B , x , y , θ ) ; ( 2 ) Maximisation : estimate θ by maximising the likelihood of training data with efficient numerical optimisation approaches such as gradient descent . As one can imagine , the main challenge is to estimate the expectation of the hidden variables H ∪ z , i.e. , we need to search for the most probable H and z given the θ learned in the previous iteration . Challenges This search problem is nontrivial . Sampling the values of hidden variable z results in a search space growing exponentially with the number of training examples . Even when B is sound and complete , existing hybrid models that do not learn first-order hypotheses still have to use Zero-Order Optimisation ( ZOOpt ) or Markov Chain Monte Carlo ( MCMC ) sampling to estimate the expectation of z ( Dai et al. , 2019 ; Li et al. , 2020 ) , which could be quite inefficient in practice . Furthermore , the size and structure of hypothesis space H of first-order logic programs makes the search problem even more complicated . For example , given x = [ , , ] and y = 6 , when the perception model is accurate enough to output the most probable z = [ 1 , 2 , 3 ] , we have at least two choices for H : cumulative sum or cumulative product . When the perception model is under-trained and outputs the most probable z = [ 2 , 2 , 3 ] , then H could be a program that only multiplies the last two digits . Hence , H and z are entangled and can not be treated independently . | In this paper, the authors have presented a framework that combines meta-interpretive learning and the abductive learning of neural networks. The high-level idea is to formulate a unified probabilistic interpretation of the entire algorithm so that both the inductive logic programming module and the neural network modules can be trained jointly from data. The authors have demonstrated the application of the proposed algorithm to learning arithmetic operations and sorting operations by looking at input-output mnist digits. | SP:5be59a79316e4eeac5d6da1804b61a484a9ac2aa |
Non-decreasing Quantile Function Network with Efficient Exploration for Distributional Reinforcement Learning | 1 INTRODUCTION . Distributional reinforcement learning ( DRL ) algorithms ( Jaquette , 1973 ; Sobel , 1982 ; White , 1988 ; Morimura et al. , 2010 ; Bellemare et al. , 2017 ) , different from the value based methods ( Watkins , 1989 ; Mnih et al. , 2013 ) which focus on the expectation of the return , characterize the cumulative reward as a random variable and attempt to approximate its whole distribution . Most existing DRL methods fall into two main classes according to their ways to model the return distribution . One class , including categorical DQN ( Bellemare et al. , 2017 ) , C51 , and Rainbow ( Hessel et al. , 2018 ) , assumes that all the possible returns are bounded in a known range and learns the probability of each value through interacting with the environment . Another class , for example the QR-DQN ( Dabney et al. , 2018b ) , tries to obtain the quantile estimates at some fixed locations by minimizing the Huber loss ( Huber , 1992 ) of quantile regression ( Koenker , 2005 ) . To more precisely parameterize the entire distribution , some quantile value based methods , such as IQN ( Dabney et al. , 2018a ) and FQF ( Yang et al. , 2019 ) , are proposed to learn a continuous map from any quantile fraction τ ∈ ( 0 , 1 ) to its estimate on the quantile curve . The theoretical validity of QR-DQN ( Dabney et al. , 2018b ) , IQN ( Dabney et al. , 2018a ) and FQF ( Yang et al. , 2019 ) heavily depends on a prerequisite that the approximated quantile curve is nondecreasing . Unfortunately , since no global constraint is imposed when simultaneously estimating the quantile values at multiple locations , the monotonicity can not be ensured by using any existing network design . At early training stage , the crossing issue is even more severe given limited training samples . Another problem to be solved is how to design an efficient exploration method for DRL . Most existing exploration techniques are originally designed for non-distributional RL ( Bellemare et al. , 2016 ; Ostrovski et al. , 2017 ; Tang et al. , 2017 ; Fox et al. , 2018 ; Machado et al. , 2018 ) , and very few of them can work for DRL . Mavrin et al . ( 2019 ) proposes a DRL-based exploration method , DLTV , for QR-DQN by using the left truncated variance as the exploration bonus . However , this approach can not be directly applied to quantile value based algorithms since the original DLTV method requires all the quantile locations to be fixed while IQN or FQF resamples the quantile locations at each training iteration and the bonus term could be extremely unstable . To address these two common issues in DRL studies , we propose a novel algorithm called NonDecreasing Quantile Function Network ( NDQFN ) , together with an efficient exploration strategy , distributional prediction error ( DPE ) , designed for DRL . The NDQFN architecture allows us to approximate the quantile distribution of the return by using a non-decreasing piece-wise linear function . The monotonicity ofN+1 fixed quantile levels is ensured by an incremental structure , and the quantile value at any τ ∈ ( 0 , 1 ) can be estimated as the weighted sum of its two nearest neighbors among the N + 1 locations . DPE uses the 1-Wasserstein distance between the quantile distributions estimated by the target network and the predictor network as an additional bonus when selecting the optimal action . We describe the implementation details of NDQFN and DPE and examine their performance on Atari 2600 games . We compare NDQFN and DPE with some baseline methods such as IQN and DLTV , and show that the combination of the two can consistently achieve the optimal performance especially in some hard-explored games such as Venture , Montezuma Revenge and Private Eye . For the rest of this paper , we first go through some background knowledge of distributional RL in Section 2 . Then in Sections 3 , we introduce NDQFN , DPE and describe their implementation details . Section 4 presents the experiment results using the Atari benchmark , investigating the empirical performance of NDQFN , DPE and their combination by comparing with some baseline methods . 2 BACKGROUND AND RELATED WORK . Following the standard reinforcement learning setting , the agent-environment interactions are modeled as a Markov Decision Process , or MDP , ( X , A , R , P , γ ) ( Puterman , 2014 ) . X and A denote a finite set of states and a finite set of actions , respectively . R : X × A → R is the reward function , and γ ∈ [ 0 , 1 ) is a discounted factor . P : X ×A×X → [ 0 , 1 ] is the transition kernel . On the agent side , a stochastic policy π maps state x to a distribution over action a ∼ π ( ·|x ) regardless of the time step t. The discounted cumulative rewards is denoted by a random variable Zπ ( x , a ) = ∑∞ t=0 γ tR ( xt , at ) , where x0 = x , a0 = a , xt ∼ P ( ·|xt−1 , at−1 ) and at ∼ π ( ·|xt ) . The objective is to find an optimal policy π∗ to maximize the expectation of Zπ ( x , a ) , EZπ ( x , a ) , which is denoted by the state-action value function Qπ ( x , a ) . A common way to obtain π∗ is to find the unique fixed point Q∗ = Qπ ∗ of the Bellman optimality operator T ( Bellman , 1966 ) : Qπ ( x , a ) = T Qπ ( x , a ) : = E [ R ( x , a ) ] + γEP max a′ Q∗ ( x′ , a′ ) . ( 1 ) The state-action value functionQ can be approximated by a parameterized functionQθ ( e.g . a neural network ) . Q -learning ( Watkins , 1989 ) iteratively updates the network parameters by minimizing the squared temporal difference ( TD ) error δ2t = [ rt + γ max a′∈A Qθ ( xt+1 , a ′ ) −Qθ ( xt , at ) ] 2 , on a sampled transition ( xt , at , rt , xt+1 ) , collected by running an -greedy policy over Qθ . Distributional RL algorithms , instead of directly estimating the mean EZπ ( x , a ) , focus on the distribution Zπ ( x , a ) to sufficiently capture the intrinsic randomness . The distributional Bellman operator , which has a similar structure with ( 1 ) , is defined as follows , T Zπ ( x , a ) D= R ( x , a ) + γZπ ( X ′ , A′ ) , where X ′ ∼ P ( ·|x , a ) and A′ ∼ π ( ·|X ′ ) . A D= B denotes the equality in probability laws . 3 NON-MONOTONICITY IN DISTIRBUTIONAL REINFORCEMENT LEARNING . In Distributional RL studies , people usually pay attention to the quantile function F−1Z ( τ ) = inf { z ∈ R : τ ≤ FZ ( z ) } of total return Z , which is the the inverse of the cumulative distribution function FZ ( z ) = Pr ( Z < z ) . In practice , with limited observations at each quantile level , it is much likely that the obtained quantile estimates F−1Z ( τ ) at multiple given locations { τ1 , τ2 , . . . , τN } for some state-action pair ( x , a ) are non-monotonic as Figure 1 ( a ) illustrates . The key reason behind this phenomenon is that the quantile values at multiple quantile fractions are separately estimated without applying any global constraint to ensure the monotonicity . Ignoring the non-decreasing property of the learned quantile function leaves a theory-practice gap , which results in the potentially non-optimal action selection in practice . Although the crossing issue has been broadly studied by the statistics community ( He , 1997 ; Chernozhukov et al. , 2010 ; Dette & Volgushev , 2008 ) , how to ensure the monotonicity of the approximated quantile function in DRL still remains challenging , especially to some quantile value based algorithms such as IQN and FQF , which do not focus on fixed quantile locations during the training process . 4 NON-DECREASING QUANTILE FUNCTION NETWORK . To address the crossing issue , we introduce a novel Non-Decreasing Quantile Function Network ( NDQFN ) with two main components : ( 1 ) . an incremental structure to estimate the increase of quantile values between two pre-defined nearby supporting points pi−1 ∈ ( 0 , 1 ) and pi ∈ ( 0 , 1 ) , i.e. , ∆i ( x , a ; p ) = F −1 Z ( pi ) −F −1 Z ( pi−1 ) , and subsequently obtain each F −1 Z ( pi ) for i ∈ { 0 , . . . , N } as the cumulative sum of ∆′is ; ( 2 ) . a piece-wise linear function which connects the N + 1 supporting points to represent the quantile estimate F−1Z ( x , a ) ( τ ) at any given fraction τ ∈ ( 0 , 1 ) . Figure 2 describes the whole architecture of NDQFN . We first describe the incremental structure . Let p = { p0 , · · · , pN } be a set of N + 1 supporting points , satisfying 0 < ≤ pi ≤ pi+1 < 1 for each i ∈ { 1 , 2 , . . . , N − 1 } . Thus , Z ( x , a ) can be parameterized by a mixture of N Diracs , such that Zθ , p ( x , a ) : = N−1∑ i=0 ( pi+1 − pi ) δθi ( x , a ) , ( 2 ) where each θi denotes the quantile estimation at p̂i = pi+pi+1 2 , and θ = { θ0 , . . . , θN−1 } . Let ψ : X → Rd and φ : [ 0 , 1 ] → Rd represent the embeddings of state x and quantile fraction τ , respectively . The baseline value ∆0 ( x , a ; p ) : = F−1Z ( x , a ) ( p0 ) at p0 and the followingN non-negative increments ∆i ( x , a ; p ) for i ∈ { 1 , · · · , N } can be represented by ∆0 ( x , a ; p ) ≈ ∆0 , ω ( x , a ; p ) = f ( ψ ( x ) ) a , ( 3 ) ∆i ( x , a ; p ) ≈ ∆i , ω ( x , a ; p ) = g ( ψ ( x ) , φ ( pi ) , φ ( pi−1 ) ) a , i = 1 , · · · , N. where f : Rd → R|A| and g : R2d → [ 0 , ∞ ) |A| are two functions to be learned . ω includes all the parameters of the network . Then , we use Πp , ∆ω to denote a projection operator that projects the quantile function onto a piecewise linear function supported by p and the incremental structure ∆ω = { ∆0 , ω , · · · , ∆N , ω } above . For any quantile level τ ∈ ( 0 , 1 ) , its projection-based quantile estimate is given by F−1 , p , ∆ωZ ( x , a ) ( τ ) = Πp , ∆ωF −1 Z ( x , a ) ( τ ) = ∆0 , ω ( x , a ; p ) + 1 N N−1∑ i=0 Gi , ∆ω ( τ , x , a ; p ) , ( 4 ) where Gi , ∆ω could be regarded as a linear combination of quantile estimates at two nearby supporting points satisfying Gi , ∆ω ( τ , x , a ; p ) = i∑ j=1 ∆j , ω ( x , a ; p ) + τ − pi pi+1 − pi ∆i+1 , ω ( x , a ; p ) I ( pi ≤ τ < pi+1 ) . By limiting the output range of ga in ( 3 ) to be [ 0 , ∞ ) , the obtained N + 1 quantile estimates are non-decreasing . Under the NDQFN framework , the expected future return starting from ( x , a ) , also known as the Q-function can be empirically approximated by Qω = ∫ pN p0 F−1 , p , ∆ωZ ( x , a ) ( τ ) dτ = N−1∑ i=0 ( pi+1 − pi ) F−1 , p , ∆ωZ ( x , a ) ( pi + pi+1 2 ) = N−1∑ i=0 ( pi+1 − pi ) 2 [ F−1 , p , ∆ωZ ( x , a ) ( pi+1 ) + F −1 , p , ∆ω Z ( x , a ) ( pi ) ] For notational simplicity , we let Pτ , ω ( x , a ) = F −1 , p , ∆ω Z ( x , a ) ( τ ) , given the support p. Following the idea of IQN , two random sets of quantile fractions τ = { τ1 , · · · , τN1 } , τ ′ = { τ ′1 , · · · , τ ′N2 } are independently drawn from a uniform distribution U ( 0 , 1 ) at each training iteration . In this case , for each i ∈ { 1 , . . . , N1 } and each j ∈ { 1 , . . . , N2 } , the corresponding temporal difference ( TD ) error ( Dabney et al. , 2018a ) with n-step updates on ( xt , at , rt , · · · , rt+n−1 , xt+n ) is computed as follows , δi , j = n−1∑ i=0 γirt+i + γ nPτ ′j , ω′ ( xt+n , arg max a′∈A Qω′ ( xt+n , a ′ ) ) − Pτi , ω ( xt , at ) , ( 5 ) where ω and ω′ denote the online network and the target network , respectively . Thus , we can train the whole network by minimizing the Huber quantile regression loss ( Huber , 1992 ) as follows , L ( xt , at , rt , · · · , rt+n−1 , xt+n ) = 1 N2 N1∑ i=1 N2∑ j=1 ρκτi ( δi , j ) , ( 6 ) where ρκτ ( δi , j ) = |τ − I ( δi , j < 0 ) | Lκ ( δi , j ) κ , ( 7 ) Lκ ( δi , j ) = 1 2 δ2i , j , if |δi , j | ≤ κ κ ( |δi , j | − 1 2 κ ) , otherwise , κ is a pre-defined positive constant , and | · | denotes the absolute value of a scalar . Remark : As shown by Figure 1 ( c ) , the piece-wise linear structure ensures the monotonicity within the union of any two quantile sets τ and τ ′ from two different training iterations regardless of whether they are included in the p or not . However , as Figure 1 ( b ) demonstrates , directly applying a similar incremental structure onto IQN without using the piece-wise linear approximation may result in the non-monotonicity of τ ∪ τ ′ although each of their own monotonicity is not violated . To investigate the convergence of the proposed algorithm , we introduce the following theorem , which can be seen an extension of Proposition 2 in Dabney et al . ( 2018b ) Theorem 1 . Let Πp , ∆ω be the quantile projection defined as above with non-decreasing quantile function F−1 , p , ∆ωZ . For any two value distribution Z1 , Z2 ∈ Z for an MDP with countable state and action spaces and enough large N , d̄∞ ( Πp , ∆ωT F −1 , p , ∆ω Z1 , Πp , ∆ωT F −1 , p , ∆ω Z2 ) ≤ γd̄∞ ( F−1 , p , ∆ωZ1 , F −1 , p , ∆ω Z2 ) , ( 8 ) where T denotes the distributional bellman operator , d̄k ( F−1Z1 , F −1 Z2 ) : = supx , aWk ( F −1 Z1 ( x , a ) , F−1Z2 ( x , a ) ) and Wk ( · , · ) denotes the k-Wasserstein metric . By Theorem 1 , we conclude that Πp , ∆ωT have a unique fixed point and the repeated application of Πp , ∆ωT converges to the fixed point . With d̄k ≤ d̄∞ , the convergence occurs for all k ∈ [ 1 , ∞ ) . It ensures that we can obtain a consistent estimator for F−1Z , denoted as F −1 , p , ∆ω Z , by minimizing the Huber quantile regression loss defined in ( 6 ) . Now we discuss the implementation details of NQDFN . For the support p used in this work , we let pi = i/N for i ∈ { 1 , · · · , N − 1 } , p0 = 0.001 and pN = 0.999 . NDQFN models the state embedding ψ ( x ) and the τ -embedding φ ( τ ) in the same way as IQN . The baseline function f in ( 3 ) consists of two fully-connected layers and a sigmoid activation function , which takes ψ ( x ) as the input and returns an unconstrained value for ∆0 ( x , a ; p ) . The incremental function g shares the same structure with f but uses the ReLU activation instead to ensure the non-negativity of all the N increments ∆i ( x , a ; p ) ’ s . Let denote the element-wise product and g take ψ ( x ) φ ( pi ) and φ ( pi ) − φ ( pi−1 ) as input , such that ∆i , ω ( x , a ; p ) = g ( ψ ( x ) φ ( pi ) , φ ( pi ) − φ ( pi−1 ) ) a , i = 1 , · · · , N , ( 9 ) which to some extent captures the interactions among ψ ( x ) , φ ( pi ) and φ ( pi−1 ) . Although ψ ( x ) φ ( pi ) φ ( pi−1 ) may be another potential input form , the empirical results show that the combination of ψ ( x ) φ ( pi ) and φ ( pi ) − φ ( pi−1 ) is more preferred in practice considering its outperformance in Atari games . More details are provided in Section C of the Supplement file . | This paper proposes to use a monotonic quantile function for distributional RL by: (i) estimating the quantile values at the supported quantiles via a cumulative sum of non-negative incremental value, and (ii) interpolate the quantile values at the unsupported quantiles via linear combination of the nearest supported quantiles. The paper then also proposes to estimate the exploration bonus for each state using random network distillation. It then conducts experiments in Atari games to verify some conclusions. | SP:99a3db8fd1a8bbbde0338a4927c74ed71594aaf2 |
Non-decreasing Quantile Function Network with Efficient Exploration for Distributional Reinforcement Learning | 1 INTRODUCTION . Distributional reinforcement learning ( DRL ) algorithms ( Jaquette , 1973 ; Sobel , 1982 ; White , 1988 ; Morimura et al. , 2010 ; Bellemare et al. , 2017 ) , different from the value based methods ( Watkins , 1989 ; Mnih et al. , 2013 ) which focus on the expectation of the return , characterize the cumulative reward as a random variable and attempt to approximate its whole distribution . Most existing DRL methods fall into two main classes according to their ways to model the return distribution . One class , including categorical DQN ( Bellemare et al. , 2017 ) , C51 , and Rainbow ( Hessel et al. , 2018 ) , assumes that all the possible returns are bounded in a known range and learns the probability of each value through interacting with the environment . Another class , for example the QR-DQN ( Dabney et al. , 2018b ) , tries to obtain the quantile estimates at some fixed locations by minimizing the Huber loss ( Huber , 1992 ) of quantile regression ( Koenker , 2005 ) . To more precisely parameterize the entire distribution , some quantile value based methods , such as IQN ( Dabney et al. , 2018a ) and FQF ( Yang et al. , 2019 ) , are proposed to learn a continuous map from any quantile fraction τ ∈ ( 0 , 1 ) to its estimate on the quantile curve . The theoretical validity of QR-DQN ( Dabney et al. , 2018b ) , IQN ( Dabney et al. , 2018a ) and FQF ( Yang et al. , 2019 ) heavily depends on a prerequisite that the approximated quantile curve is nondecreasing . Unfortunately , since no global constraint is imposed when simultaneously estimating the quantile values at multiple locations , the monotonicity can not be ensured by using any existing network design . At early training stage , the crossing issue is even more severe given limited training samples . Another problem to be solved is how to design an efficient exploration method for DRL . Most existing exploration techniques are originally designed for non-distributional RL ( Bellemare et al. , 2016 ; Ostrovski et al. , 2017 ; Tang et al. , 2017 ; Fox et al. , 2018 ; Machado et al. , 2018 ) , and very few of them can work for DRL . Mavrin et al . ( 2019 ) proposes a DRL-based exploration method , DLTV , for QR-DQN by using the left truncated variance as the exploration bonus . However , this approach can not be directly applied to quantile value based algorithms since the original DLTV method requires all the quantile locations to be fixed while IQN or FQF resamples the quantile locations at each training iteration and the bonus term could be extremely unstable . To address these two common issues in DRL studies , we propose a novel algorithm called NonDecreasing Quantile Function Network ( NDQFN ) , together with an efficient exploration strategy , distributional prediction error ( DPE ) , designed for DRL . The NDQFN architecture allows us to approximate the quantile distribution of the return by using a non-decreasing piece-wise linear function . The monotonicity ofN+1 fixed quantile levels is ensured by an incremental structure , and the quantile value at any τ ∈ ( 0 , 1 ) can be estimated as the weighted sum of its two nearest neighbors among the N + 1 locations . DPE uses the 1-Wasserstein distance between the quantile distributions estimated by the target network and the predictor network as an additional bonus when selecting the optimal action . We describe the implementation details of NDQFN and DPE and examine their performance on Atari 2600 games . We compare NDQFN and DPE with some baseline methods such as IQN and DLTV , and show that the combination of the two can consistently achieve the optimal performance especially in some hard-explored games such as Venture , Montezuma Revenge and Private Eye . For the rest of this paper , we first go through some background knowledge of distributional RL in Section 2 . Then in Sections 3 , we introduce NDQFN , DPE and describe their implementation details . Section 4 presents the experiment results using the Atari benchmark , investigating the empirical performance of NDQFN , DPE and their combination by comparing with some baseline methods . 2 BACKGROUND AND RELATED WORK . Following the standard reinforcement learning setting , the agent-environment interactions are modeled as a Markov Decision Process , or MDP , ( X , A , R , P , γ ) ( Puterman , 2014 ) . X and A denote a finite set of states and a finite set of actions , respectively . R : X × A → R is the reward function , and γ ∈ [ 0 , 1 ) is a discounted factor . P : X ×A×X → [ 0 , 1 ] is the transition kernel . On the agent side , a stochastic policy π maps state x to a distribution over action a ∼ π ( ·|x ) regardless of the time step t. The discounted cumulative rewards is denoted by a random variable Zπ ( x , a ) = ∑∞ t=0 γ tR ( xt , at ) , where x0 = x , a0 = a , xt ∼ P ( ·|xt−1 , at−1 ) and at ∼ π ( ·|xt ) . The objective is to find an optimal policy π∗ to maximize the expectation of Zπ ( x , a ) , EZπ ( x , a ) , which is denoted by the state-action value function Qπ ( x , a ) . A common way to obtain π∗ is to find the unique fixed point Q∗ = Qπ ∗ of the Bellman optimality operator T ( Bellman , 1966 ) : Qπ ( x , a ) = T Qπ ( x , a ) : = E [ R ( x , a ) ] + γEP max a′ Q∗ ( x′ , a′ ) . ( 1 ) The state-action value functionQ can be approximated by a parameterized functionQθ ( e.g . a neural network ) . Q -learning ( Watkins , 1989 ) iteratively updates the network parameters by minimizing the squared temporal difference ( TD ) error δ2t = [ rt + γ max a′∈A Qθ ( xt+1 , a ′ ) −Qθ ( xt , at ) ] 2 , on a sampled transition ( xt , at , rt , xt+1 ) , collected by running an -greedy policy over Qθ . Distributional RL algorithms , instead of directly estimating the mean EZπ ( x , a ) , focus on the distribution Zπ ( x , a ) to sufficiently capture the intrinsic randomness . The distributional Bellman operator , which has a similar structure with ( 1 ) , is defined as follows , T Zπ ( x , a ) D= R ( x , a ) + γZπ ( X ′ , A′ ) , where X ′ ∼ P ( ·|x , a ) and A′ ∼ π ( ·|X ′ ) . A D= B denotes the equality in probability laws . 3 NON-MONOTONICITY IN DISTIRBUTIONAL REINFORCEMENT LEARNING . In Distributional RL studies , people usually pay attention to the quantile function F−1Z ( τ ) = inf { z ∈ R : τ ≤ FZ ( z ) } of total return Z , which is the the inverse of the cumulative distribution function FZ ( z ) = Pr ( Z < z ) . In practice , with limited observations at each quantile level , it is much likely that the obtained quantile estimates F−1Z ( τ ) at multiple given locations { τ1 , τ2 , . . . , τN } for some state-action pair ( x , a ) are non-monotonic as Figure 1 ( a ) illustrates . The key reason behind this phenomenon is that the quantile values at multiple quantile fractions are separately estimated without applying any global constraint to ensure the monotonicity . Ignoring the non-decreasing property of the learned quantile function leaves a theory-practice gap , which results in the potentially non-optimal action selection in practice . Although the crossing issue has been broadly studied by the statistics community ( He , 1997 ; Chernozhukov et al. , 2010 ; Dette & Volgushev , 2008 ) , how to ensure the monotonicity of the approximated quantile function in DRL still remains challenging , especially to some quantile value based algorithms such as IQN and FQF , which do not focus on fixed quantile locations during the training process . 4 NON-DECREASING QUANTILE FUNCTION NETWORK . To address the crossing issue , we introduce a novel Non-Decreasing Quantile Function Network ( NDQFN ) with two main components : ( 1 ) . an incremental structure to estimate the increase of quantile values between two pre-defined nearby supporting points pi−1 ∈ ( 0 , 1 ) and pi ∈ ( 0 , 1 ) , i.e. , ∆i ( x , a ; p ) = F −1 Z ( pi ) −F −1 Z ( pi−1 ) , and subsequently obtain each F −1 Z ( pi ) for i ∈ { 0 , . . . , N } as the cumulative sum of ∆′is ; ( 2 ) . a piece-wise linear function which connects the N + 1 supporting points to represent the quantile estimate F−1Z ( x , a ) ( τ ) at any given fraction τ ∈ ( 0 , 1 ) . Figure 2 describes the whole architecture of NDQFN . We first describe the incremental structure . Let p = { p0 , · · · , pN } be a set of N + 1 supporting points , satisfying 0 < ≤ pi ≤ pi+1 < 1 for each i ∈ { 1 , 2 , . . . , N − 1 } . Thus , Z ( x , a ) can be parameterized by a mixture of N Diracs , such that Zθ , p ( x , a ) : = N−1∑ i=0 ( pi+1 − pi ) δθi ( x , a ) , ( 2 ) where each θi denotes the quantile estimation at p̂i = pi+pi+1 2 , and θ = { θ0 , . . . , θN−1 } . Let ψ : X → Rd and φ : [ 0 , 1 ] → Rd represent the embeddings of state x and quantile fraction τ , respectively . The baseline value ∆0 ( x , a ; p ) : = F−1Z ( x , a ) ( p0 ) at p0 and the followingN non-negative increments ∆i ( x , a ; p ) for i ∈ { 1 , · · · , N } can be represented by ∆0 ( x , a ; p ) ≈ ∆0 , ω ( x , a ; p ) = f ( ψ ( x ) ) a , ( 3 ) ∆i ( x , a ; p ) ≈ ∆i , ω ( x , a ; p ) = g ( ψ ( x ) , φ ( pi ) , φ ( pi−1 ) ) a , i = 1 , · · · , N. where f : Rd → R|A| and g : R2d → [ 0 , ∞ ) |A| are two functions to be learned . ω includes all the parameters of the network . Then , we use Πp , ∆ω to denote a projection operator that projects the quantile function onto a piecewise linear function supported by p and the incremental structure ∆ω = { ∆0 , ω , · · · , ∆N , ω } above . For any quantile level τ ∈ ( 0 , 1 ) , its projection-based quantile estimate is given by F−1 , p , ∆ωZ ( x , a ) ( τ ) = Πp , ∆ωF −1 Z ( x , a ) ( τ ) = ∆0 , ω ( x , a ; p ) + 1 N N−1∑ i=0 Gi , ∆ω ( τ , x , a ; p ) , ( 4 ) where Gi , ∆ω could be regarded as a linear combination of quantile estimates at two nearby supporting points satisfying Gi , ∆ω ( τ , x , a ; p ) = i∑ j=1 ∆j , ω ( x , a ; p ) + τ − pi pi+1 − pi ∆i+1 , ω ( x , a ; p ) I ( pi ≤ τ < pi+1 ) . By limiting the output range of ga in ( 3 ) to be [ 0 , ∞ ) , the obtained N + 1 quantile estimates are non-decreasing . Under the NDQFN framework , the expected future return starting from ( x , a ) , also known as the Q-function can be empirically approximated by Qω = ∫ pN p0 F−1 , p , ∆ωZ ( x , a ) ( τ ) dτ = N−1∑ i=0 ( pi+1 − pi ) F−1 , p , ∆ωZ ( x , a ) ( pi + pi+1 2 ) = N−1∑ i=0 ( pi+1 − pi ) 2 [ F−1 , p , ∆ωZ ( x , a ) ( pi+1 ) + F −1 , p , ∆ω Z ( x , a ) ( pi ) ] For notational simplicity , we let Pτ , ω ( x , a ) = F −1 , p , ∆ω Z ( x , a ) ( τ ) , given the support p. Following the idea of IQN , two random sets of quantile fractions τ = { τ1 , · · · , τN1 } , τ ′ = { τ ′1 , · · · , τ ′N2 } are independently drawn from a uniform distribution U ( 0 , 1 ) at each training iteration . In this case , for each i ∈ { 1 , . . . , N1 } and each j ∈ { 1 , . . . , N2 } , the corresponding temporal difference ( TD ) error ( Dabney et al. , 2018a ) with n-step updates on ( xt , at , rt , · · · , rt+n−1 , xt+n ) is computed as follows , δi , j = n−1∑ i=0 γirt+i + γ nPτ ′j , ω′ ( xt+n , arg max a′∈A Qω′ ( xt+n , a ′ ) ) − Pτi , ω ( xt , at ) , ( 5 ) where ω and ω′ denote the online network and the target network , respectively . Thus , we can train the whole network by minimizing the Huber quantile regression loss ( Huber , 1992 ) as follows , L ( xt , at , rt , · · · , rt+n−1 , xt+n ) = 1 N2 N1∑ i=1 N2∑ j=1 ρκτi ( δi , j ) , ( 6 ) where ρκτ ( δi , j ) = |τ − I ( δi , j < 0 ) | Lκ ( δi , j ) κ , ( 7 ) Lκ ( δi , j ) = 1 2 δ2i , j , if |δi , j | ≤ κ κ ( |δi , j | − 1 2 κ ) , otherwise , κ is a pre-defined positive constant , and | · | denotes the absolute value of a scalar . Remark : As shown by Figure 1 ( c ) , the piece-wise linear structure ensures the monotonicity within the union of any two quantile sets τ and τ ′ from two different training iterations regardless of whether they are included in the p or not . However , as Figure 1 ( b ) demonstrates , directly applying a similar incremental structure onto IQN without using the piece-wise linear approximation may result in the non-monotonicity of τ ∪ τ ′ although each of their own monotonicity is not violated . To investigate the convergence of the proposed algorithm , we introduce the following theorem , which can be seen an extension of Proposition 2 in Dabney et al . ( 2018b ) Theorem 1 . Let Πp , ∆ω be the quantile projection defined as above with non-decreasing quantile function F−1 , p , ∆ωZ . For any two value distribution Z1 , Z2 ∈ Z for an MDP with countable state and action spaces and enough large N , d̄∞ ( Πp , ∆ωT F −1 , p , ∆ω Z1 , Πp , ∆ωT F −1 , p , ∆ω Z2 ) ≤ γd̄∞ ( F−1 , p , ∆ωZ1 , F −1 , p , ∆ω Z2 ) , ( 8 ) where T denotes the distributional bellman operator , d̄k ( F−1Z1 , F −1 Z2 ) : = supx , aWk ( F −1 Z1 ( x , a ) , F−1Z2 ( x , a ) ) and Wk ( · , · ) denotes the k-Wasserstein metric . By Theorem 1 , we conclude that Πp , ∆ωT have a unique fixed point and the repeated application of Πp , ∆ωT converges to the fixed point . With d̄k ≤ d̄∞ , the convergence occurs for all k ∈ [ 1 , ∞ ) . It ensures that we can obtain a consistent estimator for F−1Z , denoted as F −1 , p , ∆ω Z , by minimizing the Huber quantile regression loss defined in ( 6 ) . Now we discuss the implementation details of NQDFN . For the support p used in this work , we let pi = i/N for i ∈ { 1 , · · · , N − 1 } , p0 = 0.001 and pN = 0.999 . NDQFN models the state embedding ψ ( x ) and the τ -embedding φ ( τ ) in the same way as IQN . The baseline function f in ( 3 ) consists of two fully-connected layers and a sigmoid activation function , which takes ψ ( x ) as the input and returns an unconstrained value for ∆0 ( x , a ; p ) . The incremental function g shares the same structure with f but uses the ReLU activation instead to ensure the non-negativity of all the N increments ∆i ( x , a ; p ) ’ s . Let denote the element-wise product and g take ψ ( x ) φ ( pi ) and φ ( pi ) − φ ( pi−1 ) as input , such that ∆i , ω ( x , a ; p ) = g ( ψ ( x ) φ ( pi ) , φ ( pi ) − φ ( pi−1 ) ) a , i = 1 , · · · , N , ( 9 ) which to some extent captures the interactions among ψ ( x ) , φ ( pi ) and φ ( pi−1 ) . Although ψ ( x ) φ ( pi ) φ ( pi−1 ) may be another potential input form , the empirical results show that the combination of ψ ( x ) φ ( pi ) and φ ( pi ) − φ ( pi−1 ) is more preferred in practice considering its outperformance in Atari games . More details are provided in Section C of the Supplement file . | This paper studies distributional RL and proposed two extensions. One is a method to enforce a non-decreasing ordering of quantile functions by a linear and non-negative increments. The other is extends the idea of DLTV which adds exploration bonus in action selection by using the random network distillation method, which in particular, using a measure of inconsistency between target network and predictor networks as a frequency measure of sampled states. | SP:99a3db8fd1a8bbbde0338a4927c74ed71594aaf2 |
Goal-Auxiliary Actor-Critic for 6D Robotic Grasping with Point Clouds | 1 INTRODUCTION . Robotic grasping of arbitrary objects is a challenging task . A robot needs to deal with objects it has never seen before , and generates a motion trajectory to grasp an object . Due to the complexity of the problem , majority works in the literature focus on bin-picking tasks , where top-down grasping is sufficient to pick up an object . Both grasp detection approaches ( Redmon & Angelova , 2015 ; Pinto & Gupta , 2016 ; Mahler et al. , 2017 ) and reinforcement learning-based methods ( Kalashnikov et al. , 2018 ; Quillen et al. , 2018 ) are introduced to tackle the top-down grasping problem . However , it is difficult for these methods to grasp objects in environments where 6D grasping is necessary , i.e. , 3D translation and 3D rotation of the robot gripper , such as a cereal box on a tabletop or in a cabinet . While 6D grasp synthesis has been studied using 3D models of objects ( Miller & Allen , 2004 ; Eppner et al. , 2019 ) and partial observations ( ten Pas et al. , 2017 ; Yan et al. , 2018 ; Mousavian et al. , 2019 ) , these methods only generate 6D grasp poses of the robot gripper for an object , instead of generating a trajectory of the gripper pose to reach and grasp the object . As a result , a motion planner is needed to plan the grasping motion according to the grasp poses . Usually , the planned trajectory is executed in an open-loop fashion since re-planning is expensive , and perception feedback during grasping as well as dynamics and contacts of the object are often ignored , which makes the grasping sensitive to grasp synthesis errors . In this work , to overcome the limitations in the paradigm of 6D grasp synthesis followed by robot motion planning , we introduce a novel method for learning closed-loop 6D grasping polices from partially-observed point clouds of objects . Our policy directly outputs the control action of the robot gripper , which is the relative 6D pose transformation of the gripper . For the state representation , we adopt an egocentric view with a wrist camera mounted on the robot gripper , which avoids self-occlusion of the robot arm during grasping compared to using an external static camera . Additionally , we aggregate point clouds of the object from previous time steps to avoid ambiguities in the current view and encode the history observations . Our point cloud representation provides richer 3D information for 6D grasping and generalizes better to different objects compared to RGB images . 1Videos and code are available at https : //sites.google.com/view/gaddpg We propose to combine Imitation Learning ( IL ) and Reinforcement Learning ( RL ) in learning the 6D grasping policy . Since RL requires exploration of the state space , the chance of lifting an object is very rare . Moreover , the target object can easily fall down with a bad contact and the ego-view camera may lose the object during grasping . Different from previous works ( Song et al. , 2020 ; Young et al. , 2020 ) that specifically design a robot gripper and collect human demonstrations using it , we obtain demonstrations using a joint motion and grasp planner ( Wang et al. , 2020 ) in simulation . Consequently , we can efficiently obtain a large number of 6D grasping trajectories using ShapeNet objects ( Chang et al. , 2015 ) with the planner . Then we learn the grasping policy based on the Deep Deterministic Policy Gradient ( DDPG ) algorithm ( Lillicrap et al. , 2015 ) , which is an actorcritic algorithm in RL that can utilize off-policy data from demonstrations . More importantly , we introduce a goal prediction auxiliary task to improve the policy learning , where the actor and the critic in DDPG are trained to predict the final 6D grasping pose of the robot gripper as well . The supervision on goal prediction comes from the expert planner for objects with known 3D shape and pose . For unknown objects without 3D models available , we can still obtain the grasping goals from successful grasping rollouts of the policy , i.e. , hindsight goals . This property enables our learned policy to be finetuned on unknown objects , which is critical for continual learning in the real world . Figure 1 illustrates our setting for learning the 6D grasp polices . We conduct thorough analyses and evaluations of our method for 6D grasping . We show that our learned policy can successfully grasp unseen ShapeNet objects and unseen YCB objects ( Calli et al. , 2015 ) in simulation , and finetuning the policy with hindsight goals for unknown YCB objects improves the grasping success rate . In the real world , we utilized a recent unseen object instance segmentation method ( Xiang et al. , 2020 ) to segment the point cloud of an target object , and then applied GA-DDPG for grasping . The learned policy is able to successfully grasp YCB objects in the real world . It only failed one among ten grasping of different unseen objects with perception noises . Overall , our contributions are three-folds : 1 ) We propose to use point cloud as our state representation and use demonstrations from a joint motion and grasp planner to learn closed-loop 6D grasping policies . 2 ) We introduce the Goal-Auxiliary DDPG ( GA-DDPG ) algorithm for joint imitation and reinforcement learning using goals . 3 ) We propose to use hindsight goals for finetuning a pre-trained policy on unknown objects without goal supervision . 2 RELATED WORK . Combining Imitation Learning and Reinforcement Learning . For high-dimensional continuous state-action space with sparse rewards and complex dynamics as in most real-world robotic settings , model-free RL provides a data-driven approach to solve the task ( Kalashnikov et al. , 2018 ; Quillen et al. , 2018 ) , but it requires a large number of interactions even with full-state information . Therefore , many works have proposed to combine imitation learning ( Osa et al. , 2018 ) in RL . For example , Rajeswaran et al . ( 2017 ) augment policy gradient update with demonstration data to circumvent reward shaping and the exploration challenge . Zhu et al . ( 2018 ) use inverse RL to learn dexterous manipulation tasks with a few human demonstrations in simulation . The closest related works to ours are Vecerik et al . ( 2017 ) ; Nair et al . ( 2018a ) that utilize demonstration data with offpolicy RL . Despite the focus on different tasks , the main difference is that our demonstrations are from an expert planner instead of human demonstrators . Therefore , we can obtain a large number of demonstrations and query the expert planner during training to provide supervision on the on-policy data . Moreover , compared with human demonstrators , expert planners are more likely to generate trajectories that are suitable for robots to execute and have consistency across the state space . Goals and Auxiliary Tasks in Policy Learning . Goals are often used as extra signals to guide policy learning ( Kaelbling , 1993 ) . For goal-conditioned policies , Andrychowicz et al . ( 2017 ) ; Ding et al . ( 2019 ) ; Ghosh et al . ( 2019 ) make the observation that every trajectory is a successful demonstration of the goal state that it reaches , thereby these methods re-label goals in rollout trajectories for effective learning . However , goals need to be provided in testing , which can be an optimistic assumption for complex tasks . Although many works have been proposed to generate goals or subgoals with deep neural networks ( Nair et al. , 2018b ; Florensa et al. , 2018 ; Sharma et al. , 2019 ) , in 6D grasping , estimating the grapsing goals for unseen objects is a challenging task . On the other hand , auxiliary tasks have been employed to improve RL as well . For instance , state reconstruction tasks ( Finn et al. , 2016 ) , auxiliary control and reward tasks ( Jaderberg et al. , 2016 ) , pose estimation loss ( Zhang et al. , 2018 ) and contrastive loss ( Srinivas et al. , 2020 ) have been used to improve representation learning . In our work , we utilize the grasping goal prediction as a natural auxiliary task that requires the policy to predict how to grasp the target object . Vision-based Robotic Grasping . Grasp synthesis can be used in a planning and control pipeline for robotic grasping ( Pinto & Gupta , 2016 ; Mahler et al. , 2017 ; Morrison et al. , 2018 ; Murali et al. , 2020 ) . Alternatively , end-to-end policy learning methods ( Levine et al. , 2018 ; Kalashnikov et al. , 2018 ; Iqbal et al. , 2020 ) make use of large-scale data to learn closed-loop vision-based grasping . Although RGB images are widely used as the state representation , it requires the policy to infer 3D information from 2D images . Recently , depth and segmentation masks ( Mahler et al. , 2017 ) , shape completion ( Yan et al. , 2018 ) , deep visual features ( Florence et al. , 2019 ) , keypoints ( Manuelli et al. , 2019 ) , point clouds ( Yan et al. , 2019 ) , multiple cameras ( Akinola et al. , 2020 ) , and egocentric views ( Song et al. , 2020 ; Young et al. , 2020 ) have been considered to improve the state representation . Motivated by these methods , we utilize the aggregated point clouds of an object from an egocentric camera as our state representation . Moreover , we explicitly learn a policy for the large action space in 6D grasping instead of using value-based representations as in most top-down grasping methods . 3 BACKGROUND . Markov Decision Process . A Markov Decision Process ( MDP ) is defined using the tuple : M = { S , R , A , O , P , ρ0 , γ } . S , A , andO represent the state , action , and observation space . R : S×A → R is the reward function . P : S×A → S is the transition dynamics . ρ0 is the probability distribution over initial states and γ = [ 0 , 1 ) is a discount factor . Let π : S → A be a policy which maps states to actions . In the partially observable case , at each time t , the policy maps a partial observation ot of the environment to an action at = π ( ot ) . Our goal is to learn a policy that maximizes the expected cumulative rewards E π [ ∑∞ t=0 γ trt ] , where rt is the reward at time t. The Q-function of the policy for a state-action pair is Q ( s , a ) = R ( s , a ) + γ E s′ , π [ ∑∞ t=0 γ trt|s0 = s′ ] , where s′ represents the next state of taking action a at state s according to the transition dynamics . Deep Deterministic Policy Gradient . Deep Deterministic Policy Gradient ( DDPG ) ( Lillicrap et al. , 2015 ) is an actor-critic algorithm that uses off-policy data and temporal difference learning , and has successful applications in continuous control ( Popov et al. , 2017 ; Vecerik et al. , 2017 ) . Specifically , the actor in DDPG learns the policy πθ ( s ) , while the critic approximates the Q-function Qφ ( s , a ) , where θ and φ denote the parameters of the actor and the critic , respectively . A replay buffer of transitions D = { ( s , a , r , s′ ) } is maintained during training , and examples sampled from it are used to optimize the actor-critic . DDPG minimizes the following Bellman error with respect to φ : L ( φ ) = E ( s , a , r , s′ ) ∼D [ 1 2 ( Qφ ( s , a ) − ( r + γQφ ( s ′ , πθ ( s ′ ) ) ) 2 ] . ( 1 ) Then the deterministic policy πθ is trained to maximize the learned Q-function with objective maxθ E s∼D ( Qφ ( s , πθ ( s ) ) ) , which resembles a policy evaluation and improvement schedule . | This paper tackles the task of closed loop 6-DOF grasping of objects in simulation. The learned policy is a closed-loop policy, in that the gripper pose is continuously adjusted as the gripper approaches the object. The paper employs a combination of imitation learning, reinforcement learning, and auxiliary losses for training this policy. The policy operates upon information from point clouds as observed from a wrist-mounted camera. | SP:228d410d5d9e184b9c920f56f0a6011db801b77b |
Goal-Auxiliary Actor-Critic for 6D Robotic Grasping with Point Clouds | 1 INTRODUCTION . Robotic grasping of arbitrary objects is a challenging task . A robot needs to deal with objects it has never seen before , and generates a motion trajectory to grasp an object . Due to the complexity of the problem , majority works in the literature focus on bin-picking tasks , where top-down grasping is sufficient to pick up an object . Both grasp detection approaches ( Redmon & Angelova , 2015 ; Pinto & Gupta , 2016 ; Mahler et al. , 2017 ) and reinforcement learning-based methods ( Kalashnikov et al. , 2018 ; Quillen et al. , 2018 ) are introduced to tackle the top-down grasping problem . However , it is difficult for these methods to grasp objects in environments where 6D grasping is necessary , i.e. , 3D translation and 3D rotation of the robot gripper , such as a cereal box on a tabletop or in a cabinet . While 6D grasp synthesis has been studied using 3D models of objects ( Miller & Allen , 2004 ; Eppner et al. , 2019 ) and partial observations ( ten Pas et al. , 2017 ; Yan et al. , 2018 ; Mousavian et al. , 2019 ) , these methods only generate 6D grasp poses of the robot gripper for an object , instead of generating a trajectory of the gripper pose to reach and grasp the object . As a result , a motion planner is needed to plan the grasping motion according to the grasp poses . Usually , the planned trajectory is executed in an open-loop fashion since re-planning is expensive , and perception feedback during grasping as well as dynamics and contacts of the object are often ignored , which makes the grasping sensitive to grasp synthesis errors . In this work , to overcome the limitations in the paradigm of 6D grasp synthesis followed by robot motion planning , we introduce a novel method for learning closed-loop 6D grasping polices from partially-observed point clouds of objects . Our policy directly outputs the control action of the robot gripper , which is the relative 6D pose transformation of the gripper . For the state representation , we adopt an egocentric view with a wrist camera mounted on the robot gripper , which avoids self-occlusion of the robot arm during grasping compared to using an external static camera . Additionally , we aggregate point clouds of the object from previous time steps to avoid ambiguities in the current view and encode the history observations . Our point cloud representation provides richer 3D information for 6D grasping and generalizes better to different objects compared to RGB images . 1Videos and code are available at https : //sites.google.com/view/gaddpg We propose to combine Imitation Learning ( IL ) and Reinforcement Learning ( RL ) in learning the 6D grasping policy . Since RL requires exploration of the state space , the chance of lifting an object is very rare . Moreover , the target object can easily fall down with a bad contact and the ego-view camera may lose the object during grasping . Different from previous works ( Song et al. , 2020 ; Young et al. , 2020 ) that specifically design a robot gripper and collect human demonstrations using it , we obtain demonstrations using a joint motion and grasp planner ( Wang et al. , 2020 ) in simulation . Consequently , we can efficiently obtain a large number of 6D grasping trajectories using ShapeNet objects ( Chang et al. , 2015 ) with the planner . Then we learn the grasping policy based on the Deep Deterministic Policy Gradient ( DDPG ) algorithm ( Lillicrap et al. , 2015 ) , which is an actorcritic algorithm in RL that can utilize off-policy data from demonstrations . More importantly , we introduce a goal prediction auxiliary task to improve the policy learning , where the actor and the critic in DDPG are trained to predict the final 6D grasping pose of the robot gripper as well . The supervision on goal prediction comes from the expert planner for objects with known 3D shape and pose . For unknown objects without 3D models available , we can still obtain the grasping goals from successful grasping rollouts of the policy , i.e. , hindsight goals . This property enables our learned policy to be finetuned on unknown objects , which is critical for continual learning in the real world . Figure 1 illustrates our setting for learning the 6D grasp polices . We conduct thorough analyses and evaluations of our method for 6D grasping . We show that our learned policy can successfully grasp unseen ShapeNet objects and unseen YCB objects ( Calli et al. , 2015 ) in simulation , and finetuning the policy with hindsight goals for unknown YCB objects improves the grasping success rate . In the real world , we utilized a recent unseen object instance segmentation method ( Xiang et al. , 2020 ) to segment the point cloud of an target object , and then applied GA-DDPG for grasping . The learned policy is able to successfully grasp YCB objects in the real world . It only failed one among ten grasping of different unseen objects with perception noises . Overall , our contributions are three-folds : 1 ) We propose to use point cloud as our state representation and use demonstrations from a joint motion and grasp planner to learn closed-loop 6D grasping policies . 2 ) We introduce the Goal-Auxiliary DDPG ( GA-DDPG ) algorithm for joint imitation and reinforcement learning using goals . 3 ) We propose to use hindsight goals for finetuning a pre-trained policy on unknown objects without goal supervision . 2 RELATED WORK . Combining Imitation Learning and Reinforcement Learning . For high-dimensional continuous state-action space with sparse rewards and complex dynamics as in most real-world robotic settings , model-free RL provides a data-driven approach to solve the task ( Kalashnikov et al. , 2018 ; Quillen et al. , 2018 ) , but it requires a large number of interactions even with full-state information . Therefore , many works have proposed to combine imitation learning ( Osa et al. , 2018 ) in RL . For example , Rajeswaran et al . ( 2017 ) augment policy gradient update with demonstration data to circumvent reward shaping and the exploration challenge . Zhu et al . ( 2018 ) use inverse RL to learn dexterous manipulation tasks with a few human demonstrations in simulation . The closest related works to ours are Vecerik et al . ( 2017 ) ; Nair et al . ( 2018a ) that utilize demonstration data with offpolicy RL . Despite the focus on different tasks , the main difference is that our demonstrations are from an expert planner instead of human demonstrators . Therefore , we can obtain a large number of demonstrations and query the expert planner during training to provide supervision on the on-policy data . Moreover , compared with human demonstrators , expert planners are more likely to generate trajectories that are suitable for robots to execute and have consistency across the state space . Goals and Auxiliary Tasks in Policy Learning . Goals are often used as extra signals to guide policy learning ( Kaelbling , 1993 ) . For goal-conditioned policies , Andrychowicz et al . ( 2017 ) ; Ding et al . ( 2019 ) ; Ghosh et al . ( 2019 ) make the observation that every trajectory is a successful demonstration of the goal state that it reaches , thereby these methods re-label goals in rollout trajectories for effective learning . However , goals need to be provided in testing , which can be an optimistic assumption for complex tasks . Although many works have been proposed to generate goals or subgoals with deep neural networks ( Nair et al. , 2018b ; Florensa et al. , 2018 ; Sharma et al. , 2019 ) , in 6D grasping , estimating the grapsing goals for unseen objects is a challenging task . On the other hand , auxiliary tasks have been employed to improve RL as well . For instance , state reconstruction tasks ( Finn et al. , 2016 ) , auxiliary control and reward tasks ( Jaderberg et al. , 2016 ) , pose estimation loss ( Zhang et al. , 2018 ) and contrastive loss ( Srinivas et al. , 2020 ) have been used to improve representation learning . In our work , we utilize the grasping goal prediction as a natural auxiliary task that requires the policy to predict how to grasp the target object . Vision-based Robotic Grasping . Grasp synthesis can be used in a planning and control pipeline for robotic grasping ( Pinto & Gupta , 2016 ; Mahler et al. , 2017 ; Morrison et al. , 2018 ; Murali et al. , 2020 ) . Alternatively , end-to-end policy learning methods ( Levine et al. , 2018 ; Kalashnikov et al. , 2018 ; Iqbal et al. , 2020 ) make use of large-scale data to learn closed-loop vision-based grasping . Although RGB images are widely used as the state representation , it requires the policy to infer 3D information from 2D images . Recently , depth and segmentation masks ( Mahler et al. , 2017 ) , shape completion ( Yan et al. , 2018 ) , deep visual features ( Florence et al. , 2019 ) , keypoints ( Manuelli et al. , 2019 ) , point clouds ( Yan et al. , 2019 ) , multiple cameras ( Akinola et al. , 2020 ) , and egocentric views ( Song et al. , 2020 ; Young et al. , 2020 ) have been considered to improve the state representation . Motivated by these methods , we utilize the aggregated point clouds of an object from an egocentric camera as our state representation . Moreover , we explicitly learn a policy for the large action space in 6D grasping instead of using value-based representations as in most top-down grasping methods . 3 BACKGROUND . Markov Decision Process . A Markov Decision Process ( MDP ) is defined using the tuple : M = { S , R , A , O , P , ρ0 , γ } . S , A , andO represent the state , action , and observation space . R : S×A → R is the reward function . P : S×A → S is the transition dynamics . ρ0 is the probability distribution over initial states and γ = [ 0 , 1 ) is a discount factor . Let π : S → A be a policy which maps states to actions . In the partially observable case , at each time t , the policy maps a partial observation ot of the environment to an action at = π ( ot ) . Our goal is to learn a policy that maximizes the expected cumulative rewards E π [ ∑∞ t=0 γ trt ] , where rt is the reward at time t. The Q-function of the policy for a state-action pair is Q ( s , a ) = R ( s , a ) + γ E s′ , π [ ∑∞ t=0 γ trt|s0 = s′ ] , where s′ represents the next state of taking action a at state s according to the transition dynamics . Deep Deterministic Policy Gradient . Deep Deterministic Policy Gradient ( DDPG ) ( Lillicrap et al. , 2015 ) is an actor-critic algorithm that uses off-policy data and temporal difference learning , and has successful applications in continuous control ( Popov et al. , 2017 ; Vecerik et al. , 2017 ) . Specifically , the actor in DDPG learns the policy πθ ( s ) , while the critic approximates the Q-function Qφ ( s , a ) , where θ and φ denote the parameters of the actor and the critic , respectively . A replay buffer of transitions D = { ( s , a , r , s′ ) } is maintained during training , and examples sampled from it are used to optimize the actor-critic . DDPG minimizes the following Bellman error with respect to φ : L ( φ ) = E ( s , a , r , s′ ) ∼D [ 1 2 ( Qφ ( s , a ) − ( r + γQφ ( s ′ , πθ ( s ′ ) ) ) 2 ] . ( 1 ) Then the deterministic policy πθ is trained to maximize the learned Q-function with objective maxθ E s∼D ( Qφ ( s , πθ ( s ) ) ) , which resembles a policy evaluation and improvement schedule . | The paper targets the problem of closed-loop 6D robotic grasping with a parallel gripper based on RGB-D in-hand-camera images. The policy takes an aggregated point cloud (computed from image history) as input (using a PointNet++) and outputs the pose transformation of the gripper. There are several contributions in the specifics of the proposed method. The policy is pretrained using behavioral cloning and DAGGER on known object models, where the expert is composed by a grasp pose sampler and the OMG grasp trajectory planner. Subsequently, the pretrained policy is improved using TD3. Actor and critic networks are each regularized via a loss for solving the auxiliary task of (independently from each other) predicting the final grasping pose. As the goal poses are only available for the expert demonstrations goals are added for the policy roll-out in hindsight, similar to hindsight experience replay, which does not require access to an object model. The approach is evaluated in simulation for grasping YCB and ShapeNet objects with a Franka Emika Panda robot. The evaluation covers ablations of several algorithmical and architectural choices. | SP:228d410d5d9e184b9c920f56f0a6011db801b77b |
K-Adapter: Infusing Knowledge into Pre-Trained Models with Adapters | 1 INTRODUCTION . Language representation models , which are pre-trained on large-scale text corpus through unsupervised objectives like ( masked ) language modeling , such as BERT ( Devlin et al. , 2019 ) , GPT ( Radford et al. , 2018 ; 2019 ) , XLNet ( Yang et al. , 2019 ) , RoBERTa ( Liu et al. , 2019 ) and T5 ( Raffel et al. , 2019 ) , have established state-of-the-art performances on various NLP downstream tasks . Despite the huge success of these pre-trained models in empirical studies , recent studies suggest that models learned in such an unsupervised manner struggle to capture rich knowledge . For example , Poerner et al . ( 2019 ) suggest that although language models do well in reasoning about the surface form of entity names , they fail in capturing rich factual knowledge . Kassner & Schütze ( 2019 ) observe that BERT mostly did not learn the meaning of negation ( e.g . “ not ” ) . These observations motivate us to study the injection of knowledge into pre-trained models like BERT and RoBERTa . Recently , some efforts have been made to exploit injecting knowledge into pre-trained language models ( Zhang et al. , 2019 ; Lauscher et al. , 2019 ; Levine et al. , 2019 ; Peters et al. , 2019 ; He et al. , 2019 ; Xiong et al. , 2020 ) . Most previous works ( as shown in Table 1 ) augment the standard language modeling objective with knowledge-driven objectives and update model parameters in a multi-task learning manner . Although these methods , with updated pre-trained models , obtain better performance on downstream tasks , they fail at continual learning ( Kirkpatrick et al. , 2017 ) . Model parameters need to be retrained when new kinds of knowledge are injected , which may result in the catastrophic forgetting of previously injected knowledge . Meanwhile , the resulting pre-trained models produce entangled representations , which makes it hard to investigate the effect of each knowledge when multiple kinds of knowledge are injected . In this paper , we propose K-ADAPTER , a flexible and simple approach that infuses knowledge into large pre-trained models . K-ADAPTER has attractive properties including supporting continual knowledge infusion and producing disentangled representations . It leaves the original representation of a pre-trained model unchanged and exports different representations for different types of infused knowledge . This is achieved by the integration of compact neural models , dubbed adapters here . Adapters are knowledge-specific models plugged outside of a pre-trained model , whose inputs are the output hidden-states of intermediate layers of the pre-trained model . We take RoBERTa ( Liu et al. , 2019 ) as the base pre-trained model and integrate two types of knowledge , including factual knowledge obtained by aligned Wikipedia text to Wikidata triplets , linguistic knowledge obtained by applying off-the-shell dependency parser to web texts . In the pre-training phase , we train two adapters independently on relation classification task and dependency relation prediction task respectively , while keeping the original parameters of RoBERTa frozen . Since adapters have much less trainable parameters compared with RoBERTa , the training process is memory efficient . We conduct extensive experiments on six benchmark datasets across three knowledge-driven tasks , i.e. , relation classification , entity typing and question answering . Experiments show that KADAPTER consistently performs better than RoBERTa , and achieves state-of-the-art performance on five datasets , and comparable performance compared with CosmosQA SOTA . Probing experiments on LAMA ( Poerner et al. , 2019 ) and LAMA-UHN ( Petroni et al. , 2019 ) , further demonstrates that K-ADAPTER captures richer factual and commonsense knowledge than RoBERTa . The contributions of this paper are summarized as follows : • We propose K-ADAPTER , a flexible approach that supports continual knowledge infusion into large pre-trained models ( e.g . RoBERTa in this work ) . • We infuse factual knowledge and linguistic knowledge , and show that adapters for both kinds of knowledge work well on downstream tasks . • K-ADAPTER achieves superior performance by fine-tuning parameters on three downstream tasks , and captures richer factual and commonsense knowledge than RoBERTa on probing experiments . 2 RELATED WORK . Our work relates to the area of injecting knowledge into pre-trained models . As stated in Table 1 , previous works mainly differ from the knowledge sources and the objective used for training . ERNIE ( Zhang et al. , 2019 ) injects a knowledge graph into BERT . They align entities from Wikipedia sentences to fact triples in WikiData , and discard sentences with less than three entities . In the training process , the input includes sentences and linked facts , and the knowledge-aware learning objective is to predict the correct token-entity alignment . Entity embeddings are trained on fact triples from WikiData via TransE ( Bordes et al. , 2013 ) . LIBERT ( Lauscher et al. , 2019 ) injects pairs of words with synonym and hyponym-hypernym relations in WordNet . The model takes a pair of words separated by a special token as the input , and is optimized by a binary classification problem , which predicts whether the input holds a particular relation or not . SenseBERT ( Levine et al. , 2019 ) considers word-supersense knowledge . It inject knowledge by predicting the supersense of the masked word in the input , where the candidates are nouns and verbs and the ground truth comes from WordNet . KnowBERT ( Peters et al. , 2019 ) incorporates knowledge bases into BERT using Knowledge attention and recontextualization , where the knowledge comes from synset-synset and lemma-lemma relationships in WordNet , and entity linking information in Wikipedia . If entity linking supervision is available , the model is learned with an additional knowledge-aware log-likelihood or max-margin objective . WKLM ( Xiong et al. , 2020 ) replaces entity mentions in the original document with names of other entities of the same type . The model is trained to distinguish the correct entity mention from randomly chosen ones . BERT-MK ( He et al. , 2019 ) integrates fact triples from knowledge graph . For each entity , it sample incoming and outcoming instances from the neighbors on the knowledge graph , and replaces head or tail entity to create negative instances . The model is learned to discriminate between real and fake facts . As shown in Table 1 , our model ( K-ADAPTER ) differs from previous studies in three aspects . First , we consider both fact-related objective ( i.e . predicate/relation prediction ) and linguistic-related objective ( i.e . dependency relation prediction ) . Second , the original parameter of BERT is clamped in the knowledge infusion process . Third , our approach supports continual learning , which means that the learning of different adapters are not entangled . This flexibility enables us to efficiently inject different types of knowledge independently , and inject more types of knowledge without any loss on the previously injected knowledge . 3 K-ADAPTER . As illustrated in Figure 1 ( a ) , most of the previous works enhance pre-trained language models by injecting knowledge and update model parameters through multi-task learning . Regardless of these different versions of knowledge-injected methods with multi-task learning , common issues not fully studied are catastrophic forgetting of previous knowledge . To address this , we present KADAPTER as shown in Figure 1 ( b ) , where multiple kinds of knowledge are injected into different compact neural models ( i.e. , adapters in this paper ) individually instead of directly injecting knowledge into pre-trained models . It keeps the original representation of a pre-trained model fixed and supports continual knowledge infusion , i.e. , injecting each kind of knowledge into the corresponding knowledge-specific adapter and producing disentangled representation . Specifically , adapters are knowledge-specific models ( with few parameters ) plugged outside of a pre-trained model . The inputs of adapters are the output hidden-states of intermediate layers of the pre-trained model . Each adapter is pre-trained independently on different tasks for injecting discriminative knowledge while the original parameters of the pre-trained model are frozen . In this paper , we exploit RoBERTa ( Liu et al. , 2019 ) as the pre-trained model , and mainly infuse factual knowledge and linguistic knowledge with two kinds of adapters , i.e. , factual adapter and linguistic adapter which are pre-trained on the relation classification task and dependency relation prediction task respectively . In this section , we first describe the structure of our adapter , and then present the process of pre-training knowledgespecific adapters . 3.1 ADAPTER STRUCTURE . In this work , we present a different adapter structure as shown in Figure 2 , which is referred to as the knowledge-specific adapter . In contrast to Houlsby et al . ( 2019 ) add adapter layers into each transformer layer , our adapter works as outside plug-ins . Each adapter model consists of K adapter layers that contain N transformer ( Vaswani et al. , 2017 ) layers and two projection layers . A skipconnection is applied across two projection layers . Specifically , for each adapter model , we plug adapter layers among different transformer layers of the pre-trained model . We concatenate the output hidden feature of the transformer layer in the pre-trained model and the output feature of the former adapter layer , as the input feature of the current adapter layer . For each knowledge-specific adapter , we concatenate the last hidden features of the pre-trained model and adapter as the final output feature of this adapter model . In the pre-training procedure , we train each knowledge-specific adapter on different pre-training tasks individually . For various downstream tasks , K-ADAPTER can adopt the fine-tuning procedure similar to RoBERTa and BERT . When only one knowledge-specific adapter is adopted , we can take the final output feature of this adapter model as the input for task-specific layers of the downstream task . When multiple knowledge-specific adapters are adopted , we concatenate the output features of different adapter models as the input for task-specific layers of the downstream task . 3.2 PRE-TRAINING SETTINGS . We use RoBERTaLARGE ( L=24 , H=1024 , A=16 , 355M params ) implementation by Huggingface1 as the pre-trained model in all our experiments . As for each adapter layer , we denote the number of transformer layer as N , the hidden dimension of transformer layer as HA , the number of selfattention heads as AA , the hidden dimension of down-projection and up-projection layers as Hd and Hu . In detail , we have the following adapter size : N = 2 , HA = 768 , AA = 12 , Hu = 1024 and Hd = 768 . The RoBERTa layers where adapter layers plug in are { 0,11,23 } , and different adapter layers do not share parameters . Thus the total parameters for each adapter model are about 42M , which are much smaller than RoBERTaLARGE and make the training process memory efficient . It should be noticed that RoBERTa is fixed during training and the parameters of adapters are trainable and initialized randomly . Then we describe how to inject different knowledge into knowledgespecific adapters as below . 3.3 FACTUAL ADAPTER . Factual knowledge can be described as the basic information that is concerned with facts . In this work , we acquire factual knowledge from the relationships among entities in natural language . We extract a sub-dataset T-REx-rc from T-REx ( ElSahar et al. , 2018 ) which is a large scale alignment dataset between Wikipedia abstracts and Wikidata triples . We discard all relations having less than 50 entity pairs , collecting 430 relations and 5.5M sentences . In order to inject factual knowledge , we propose to pre-train a knowledge-specific adapter called facAdapter on the relation classification task . This task requires a model to classify relation labels of given entity pairs based on context . Specifically , the last hidden features of RoBERTa and facAdapter are concatenated as the input representation , and the pooling layer is applied to the input representations of the given entities . Then , we concatenate two entity representations to perform relation classification . 1https : //github.com/huggingface/transformers | The authors propose a plug-in based adapter approach to allow for task specific parameter settings without updating the original pre-trained model which prevents the potential for catastrophic forgetting while also removing the need for separate models for separate tasks. The work seems to build off Houlsby 19 as briefly cited, but its in plug-in nature seems easier to adopt for multiple tasks. There is however not direct comparison with it or Cooper et al 19 ( https://arxiv.org/pdf/1902.02671.pdf ) which makes it difficult to assess. The way in which the adaptors were pretrained was a little unclear to me. The experiments are extensive and well done. | SP:b01077ca319b19401044d1ec4a62f5dcaf0eeb21 |
K-Adapter: Infusing Knowledge into Pre-Trained Models with Adapters | 1 INTRODUCTION . Language representation models , which are pre-trained on large-scale text corpus through unsupervised objectives like ( masked ) language modeling , such as BERT ( Devlin et al. , 2019 ) , GPT ( Radford et al. , 2018 ; 2019 ) , XLNet ( Yang et al. , 2019 ) , RoBERTa ( Liu et al. , 2019 ) and T5 ( Raffel et al. , 2019 ) , have established state-of-the-art performances on various NLP downstream tasks . Despite the huge success of these pre-trained models in empirical studies , recent studies suggest that models learned in such an unsupervised manner struggle to capture rich knowledge . For example , Poerner et al . ( 2019 ) suggest that although language models do well in reasoning about the surface form of entity names , they fail in capturing rich factual knowledge . Kassner & Schütze ( 2019 ) observe that BERT mostly did not learn the meaning of negation ( e.g . “ not ” ) . These observations motivate us to study the injection of knowledge into pre-trained models like BERT and RoBERTa . Recently , some efforts have been made to exploit injecting knowledge into pre-trained language models ( Zhang et al. , 2019 ; Lauscher et al. , 2019 ; Levine et al. , 2019 ; Peters et al. , 2019 ; He et al. , 2019 ; Xiong et al. , 2020 ) . Most previous works ( as shown in Table 1 ) augment the standard language modeling objective with knowledge-driven objectives and update model parameters in a multi-task learning manner . Although these methods , with updated pre-trained models , obtain better performance on downstream tasks , they fail at continual learning ( Kirkpatrick et al. , 2017 ) . Model parameters need to be retrained when new kinds of knowledge are injected , which may result in the catastrophic forgetting of previously injected knowledge . Meanwhile , the resulting pre-trained models produce entangled representations , which makes it hard to investigate the effect of each knowledge when multiple kinds of knowledge are injected . In this paper , we propose K-ADAPTER , a flexible and simple approach that infuses knowledge into large pre-trained models . K-ADAPTER has attractive properties including supporting continual knowledge infusion and producing disentangled representations . It leaves the original representation of a pre-trained model unchanged and exports different representations for different types of infused knowledge . This is achieved by the integration of compact neural models , dubbed adapters here . Adapters are knowledge-specific models plugged outside of a pre-trained model , whose inputs are the output hidden-states of intermediate layers of the pre-trained model . We take RoBERTa ( Liu et al. , 2019 ) as the base pre-trained model and integrate two types of knowledge , including factual knowledge obtained by aligned Wikipedia text to Wikidata triplets , linguistic knowledge obtained by applying off-the-shell dependency parser to web texts . In the pre-training phase , we train two adapters independently on relation classification task and dependency relation prediction task respectively , while keeping the original parameters of RoBERTa frozen . Since adapters have much less trainable parameters compared with RoBERTa , the training process is memory efficient . We conduct extensive experiments on six benchmark datasets across three knowledge-driven tasks , i.e. , relation classification , entity typing and question answering . Experiments show that KADAPTER consistently performs better than RoBERTa , and achieves state-of-the-art performance on five datasets , and comparable performance compared with CosmosQA SOTA . Probing experiments on LAMA ( Poerner et al. , 2019 ) and LAMA-UHN ( Petroni et al. , 2019 ) , further demonstrates that K-ADAPTER captures richer factual and commonsense knowledge than RoBERTa . The contributions of this paper are summarized as follows : • We propose K-ADAPTER , a flexible approach that supports continual knowledge infusion into large pre-trained models ( e.g . RoBERTa in this work ) . • We infuse factual knowledge and linguistic knowledge , and show that adapters for both kinds of knowledge work well on downstream tasks . • K-ADAPTER achieves superior performance by fine-tuning parameters on three downstream tasks , and captures richer factual and commonsense knowledge than RoBERTa on probing experiments . 2 RELATED WORK . Our work relates to the area of injecting knowledge into pre-trained models . As stated in Table 1 , previous works mainly differ from the knowledge sources and the objective used for training . ERNIE ( Zhang et al. , 2019 ) injects a knowledge graph into BERT . They align entities from Wikipedia sentences to fact triples in WikiData , and discard sentences with less than three entities . In the training process , the input includes sentences and linked facts , and the knowledge-aware learning objective is to predict the correct token-entity alignment . Entity embeddings are trained on fact triples from WikiData via TransE ( Bordes et al. , 2013 ) . LIBERT ( Lauscher et al. , 2019 ) injects pairs of words with synonym and hyponym-hypernym relations in WordNet . The model takes a pair of words separated by a special token as the input , and is optimized by a binary classification problem , which predicts whether the input holds a particular relation or not . SenseBERT ( Levine et al. , 2019 ) considers word-supersense knowledge . It inject knowledge by predicting the supersense of the masked word in the input , where the candidates are nouns and verbs and the ground truth comes from WordNet . KnowBERT ( Peters et al. , 2019 ) incorporates knowledge bases into BERT using Knowledge attention and recontextualization , where the knowledge comes from synset-synset and lemma-lemma relationships in WordNet , and entity linking information in Wikipedia . If entity linking supervision is available , the model is learned with an additional knowledge-aware log-likelihood or max-margin objective . WKLM ( Xiong et al. , 2020 ) replaces entity mentions in the original document with names of other entities of the same type . The model is trained to distinguish the correct entity mention from randomly chosen ones . BERT-MK ( He et al. , 2019 ) integrates fact triples from knowledge graph . For each entity , it sample incoming and outcoming instances from the neighbors on the knowledge graph , and replaces head or tail entity to create negative instances . The model is learned to discriminate between real and fake facts . As shown in Table 1 , our model ( K-ADAPTER ) differs from previous studies in three aspects . First , we consider both fact-related objective ( i.e . predicate/relation prediction ) and linguistic-related objective ( i.e . dependency relation prediction ) . Second , the original parameter of BERT is clamped in the knowledge infusion process . Third , our approach supports continual learning , which means that the learning of different adapters are not entangled . This flexibility enables us to efficiently inject different types of knowledge independently , and inject more types of knowledge without any loss on the previously injected knowledge . 3 K-ADAPTER . As illustrated in Figure 1 ( a ) , most of the previous works enhance pre-trained language models by injecting knowledge and update model parameters through multi-task learning . Regardless of these different versions of knowledge-injected methods with multi-task learning , common issues not fully studied are catastrophic forgetting of previous knowledge . To address this , we present KADAPTER as shown in Figure 1 ( b ) , where multiple kinds of knowledge are injected into different compact neural models ( i.e. , adapters in this paper ) individually instead of directly injecting knowledge into pre-trained models . It keeps the original representation of a pre-trained model fixed and supports continual knowledge infusion , i.e. , injecting each kind of knowledge into the corresponding knowledge-specific adapter and producing disentangled representation . Specifically , adapters are knowledge-specific models ( with few parameters ) plugged outside of a pre-trained model . The inputs of adapters are the output hidden-states of intermediate layers of the pre-trained model . Each adapter is pre-trained independently on different tasks for injecting discriminative knowledge while the original parameters of the pre-trained model are frozen . In this paper , we exploit RoBERTa ( Liu et al. , 2019 ) as the pre-trained model , and mainly infuse factual knowledge and linguistic knowledge with two kinds of adapters , i.e. , factual adapter and linguistic adapter which are pre-trained on the relation classification task and dependency relation prediction task respectively . In this section , we first describe the structure of our adapter , and then present the process of pre-training knowledgespecific adapters . 3.1 ADAPTER STRUCTURE . In this work , we present a different adapter structure as shown in Figure 2 , which is referred to as the knowledge-specific adapter . In contrast to Houlsby et al . ( 2019 ) add adapter layers into each transformer layer , our adapter works as outside plug-ins . Each adapter model consists of K adapter layers that contain N transformer ( Vaswani et al. , 2017 ) layers and two projection layers . A skipconnection is applied across two projection layers . Specifically , for each adapter model , we plug adapter layers among different transformer layers of the pre-trained model . We concatenate the output hidden feature of the transformer layer in the pre-trained model and the output feature of the former adapter layer , as the input feature of the current adapter layer . For each knowledge-specific adapter , we concatenate the last hidden features of the pre-trained model and adapter as the final output feature of this adapter model . In the pre-training procedure , we train each knowledge-specific adapter on different pre-training tasks individually . For various downstream tasks , K-ADAPTER can adopt the fine-tuning procedure similar to RoBERTa and BERT . When only one knowledge-specific adapter is adopted , we can take the final output feature of this adapter model as the input for task-specific layers of the downstream task . When multiple knowledge-specific adapters are adopted , we concatenate the output features of different adapter models as the input for task-specific layers of the downstream task . 3.2 PRE-TRAINING SETTINGS . We use RoBERTaLARGE ( L=24 , H=1024 , A=16 , 355M params ) implementation by Huggingface1 as the pre-trained model in all our experiments . As for each adapter layer , we denote the number of transformer layer as N , the hidden dimension of transformer layer as HA , the number of selfattention heads as AA , the hidden dimension of down-projection and up-projection layers as Hd and Hu . In detail , we have the following adapter size : N = 2 , HA = 768 , AA = 12 , Hu = 1024 and Hd = 768 . The RoBERTa layers where adapter layers plug in are { 0,11,23 } , and different adapter layers do not share parameters . Thus the total parameters for each adapter model are about 42M , which are much smaller than RoBERTaLARGE and make the training process memory efficient . It should be noticed that RoBERTa is fixed during training and the parameters of adapters are trainable and initialized randomly . Then we describe how to inject different knowledge into knowledgespecific adapters as below . 3.3 FACTUAL ADAPTER . Factual knowledge can be described as the basic information that is concerned with facts . In this work , we acquire factual knowledge from the relationships among entities in natural language . We extract a sub-dataset T-REx-rc from T-REx ( ElSahar et al. , 2018 ) which is a large scale alignment dataset between Wikipedia abstracts and Wikidata triples . We discard all relations having less than 50 entity pairs , collecting 430 relations and 5.5M sentences . In order to inject factual knowledge , we propose to pre-train a knowledge-specific adapter called facAdapter on the relation classification task . This task requires a model to classify relation labels of given entity pairs based on context . Specifically , the last hidden features of RoBERTa and facAdapter are concatenated as the input representation , and the pooling layer is applied to the input representations of the given entities . Then , we concatenate two entity representations to perform relation classification . 1https : //github.com/huggingface/transformers | This submission proposes a general method (K-Adapter) for injecting knowledge (either factual or linguistic) into pre-trained language models. The key architectural property of the approach is that K-Adapters are isolated from one another, allowing the use of multiple adapters without interference. These K-Adapter modules take hidden layer _inputs_ from the main pre-trained model (eg, BERT), and are pre-trained on their knowledge outputs before a fine-tuning phase where they feed into a joint downstream task-specific model along with the pre-trained model outputs. | SP:b01077ca319b19401044d1ec4a62f5dcaf0eeb21 |
Intelligent Matrix Exponentiation | 1 INTRODUCTION . Deep neural networks ( DNNs ) synthesize highly complex functions by composing a large number of neuronal units , each featuring a basic and usually 1-dimensional nonlinear activation function f : R1 → R1 . While highly successful in practice , this approach also has disadvantages . In a conventional DNN , any two activations only ever get combined through summation . This means that such a network requires an increasing number of parameters to approximate more complex functions even as simple as multiplication . Parameter-wise , this approach of composing simple functions does not scale efficiently . An alternative to the composition of many 1-dimensional functions is using a simple higherdimensional nonlinear function f : Rm → Rn . A single multidimensional nonlinearity may be desirable because it could express more complex relationships between input features with potentially fewer parameters and fewer mathematical operations . The matrix exponential stands out as a promising but overlooked candidate for a higher-dimensional nonlinearity for machine learning models . The matrix exponential is a smooth function that appears in the solution to one of the simplest differential equations that can yield desirable mathematical properties : d/dty ( t ) = My ( t ) , with the solution y ( t ) = exp ( Mt ) y ( 0 ) , where M is a constant matrix . The matrix exponential plays a prominent role in the theory of Lie groups , an algebraic structure widely used throughout many branches of mathematics and science . A unique advantage of the matrix exponential is its natural ability to represent oscillations and exponential decay , which becomes apparent if we decompose the matrix to be exponentiated into a symmetric and an antisymmetric component . The exponential of an antisymmetric matrix , whose nonzero eigenvalues are always imaginary , generates a superposition of periodic oscillations , whereas the exponential of a symmetric matrix , which has real eigenvalues , expresses an exponential growth or decay . This fact , especially the ability to represent periodic functions , gives the M-layer the possibility to extrapolate beyond its training domain . Many real-world phenomena contain some degree of periodicity and can therefore benefit from this feature . In contrast , the functions typically used in conventional DNNs approximate the target function locally and are therefore unable to scale well outside the boundaries of the training data for such problems . Based on these insights , we propose a novel architecture for supervised learning whose core element is a single layer ( henceforth referred to as “ M-layer ” ) , that computes a single matrix exponential , where the matrix to be exponentiated is an affine function of the input features . We show that the M-layer has universal approximator properties and allows closed-form per-example bounds for robustness . We demonstrate the ability of this architecture to learn multivariate polynomials , such as matrix determinants , and to generalize periodic functions beyond the domain of the input without any feature engineering . Furthermore , the M-layer achieves results comparable to recently-proposed non-specialized architectures on image recognition datasets . We provide TensorFlow code that implements the M-layer in the Supplementary Material . 2 RELATED WORK . Neuronal units with more complex activation functions have been proposed . One such example are sigma-pi units ( Rumelhart et al. , 1986 ) , whose activation function is the weighted sum of products of its inputs . More recently , neural arithmetic logic units have been introduced ( Trask et al. , 2018 ) , which can combine inputs using multiple arithmetic operators and generalize outside the domain of the training data . In contrast with these architectures , the M-layer is not based on neuronal units with multiple inputs , but uses a single matrix exponential as its nonlinear mapping function . Through the matrix exponential , the M-layer can easily learn mathematical operations more complex than addition , but with simpler architecture . In fact , as shown in Section 3.3 , the M-layer can be regarded as a generalized sigma-pi network with built-in architecture search , in the sense that it learns by itself which arithmetic graph should be used for the computation . Architectures with higher-dimensional nonlinearities are also already used . The softmax function is an example of a widely-used such nonlinear activation function that , like the M-layer , has extra mathematical structure . For example , a permutation of the softmax inputs produces a corresponding permutation of the outputs . Maxout networks also act on multiple units and have been successful in combination with dropout ( Goodfellow et al. , 2013 ) . In radial basis networks ( Park & Sandberg , 1991 ) , each hidden unit computes a nonlinear function of the distance between its own learned centroid and a single point represented by a vector of input coordinates . Capsule networks ( Sabour et al. , 2017 ) are another recent example of multidimensional nonlinearities . Similarly , the M-layer uses the matrix exponential as a single high-dimensional nonlinearity . This mapping satisfies nontrivial mathematical identities , for some of which we here elucidate their application potential in a machine learning context . Feature crosses of second and higher order have also been explored on top of convolutional layers ( ( Lin et al. , 2015 ; Lin & Maji , 2017 ; Li et al. , 2017 ; Engin et al. , 2018 ; Koniusz et al. , 2018 ) . In this line of research , ( Li et al. , 2017 ) introduces the use of a matrix operation ( either matrix logarithm or matrix square root ) on top of a convolutional layer with higher order feature crosses . The M-Layer differs from this kind of approach in two ways : first , it uses matrix exponentiation to produce feature crosses , and not to improve trainability on top of other ones ; secondly , it computes a matrix operation of an arbitrary matrix ( not necessarily symmetric positive semidefinite ) , which allows more expressibility , as seen for example in Section 3.3 . The main differences between the M-layer and other architectures that can utilize feature-crosses are the M-layer ’ s ability to also model non-polynomial dependencies ( such as a cosine ) and the builtin competition-for-total-complexity regularization , which we will explain in Section 3.3 through a “ circuit breadboard ” analogy . Matrix exponentiation has a natural alternative interpretation in terms of an ordinary differential equation ( ODE ) . As such , the M-layer can be compared to other novel ODE-related architectures , such as neural ordinary differential equations ( NODE ) ( Chen et al. , 2018 ) and their augmented extensions ( ANODE ) ( Dupont et al. , 2019 ) . We discuss this in Section 3.6 . Existing approaches to certifying the robustness of neural networks can be split into two different categories . Some approaches ( Peck et al. , 2017 ) mathematically analyze a network layer by layer , providing bounds on the robustness of each layer , that then get multiplied together . This kind of approach tends to give fairly loose bounds , due to the inherent tightness loss from composing upper bounds . Other approaches ( Singh et al. , 2018 ; 2019 ) use abstract interpretation on the evaluation of the network to provide empirical robustness bounds . In contrast , using the fact that the M-layer architecture has a single layer , in Section 3.7 we obtain a direct bound on the robustness on the whole network by analyzing the explicit formulation of the computation . 3 ARCHITECTURE . We start this section by refreshing the definition of the matrix exponential . We then define the proposed M-layer architecture and explain its ability to learn particular functions such as polynomials and periodic functions . Finally , we provide closed-form per-example robustness guarantees . 3.1 MATRIX EXPONENTIATION . The exponential of a square matrixM is defined as : exp ( M ) = ∑∞ k=0 1 k ! M k. The matrix powerMk is defined inductively as M0 = I , Mk+1 = M ·Mk , using the associativity of the matrix product ; it is not an element-wise matrix operation . Note that the expansion of exp ( M ) in Eq . ( 3.1 ) is finite for nilpotent matrices . A matrix M is called nilpotent if there exists a positive integer k such that Mk = 0 . Strictly upper triangular matrices are a canonical example . Multiple algorithms for computing the matrix exponential efficiently have been proposed ( Moler & Van Loan , 2003 ) . We provide an implementation of the M-layer that employs either the TensorFlow function tf.linalg.expm , which uses the scaling and squaring method combined with the Padé approximation ( Higham , 2005 ) , or a simpler and faster approximation of the matrix exponential that only squares a fixed number of times , using the formula exp ( M ) ≈ ( I+ M 2k ) 2 k . This approximation follows from the equivalent definition of exp ( M ) = limn→∞ ( I + Mn ) n , and has O ( kn1.5 ) time complexity , where n is the total number of elements in M . 3.2 M-LAYER DEFINITION . At the core of the proposed architecture ( Figure 1 ) is an M-layer that computes a single matrix exponential , where the matrix to be exponentiated is an affine function of all of the input features . In other words , an M-layer replaces an entire stack of hidden layers in a DNN . We exemplify the architecture as applied to a standard image recognition dataset , but this formulation is applicable to any other type of problem by adapting the relevant input indices . In the following equations , generalized Einstein summation is performed over all right-hand side indices not seen on the left-hand side . Consider an example input image , encoded as a 3-index array Xyxc , where y , x and c are the row index , column index and color channel index , respectively . The matrix M to be exponentiated is obtained as follows , using the trainable parameters T̃ajk , Ũaxyc and B̃jk : Mjk = B̃jk + T̃ajkŨayxcXyxc ( 1 ) First , X is projected linearly to a d-dimensional latent feature embedding space by Ũayxc . Then , the 3-index tensor T̃ajk maps each such latent feature to an n × n matrix . Finally , a bias matrix B̃jk is added to the feature-weighted sum of matrices . The result is a matrix indexed by row and column indices j and k. In order to allow for exponentiation , M must be a square matrix . It is possible to contract the tensors T̃ and Ũ in order to simplify the architecture formula , but partial tensor factorization provides regularization by reducing the parameter count . An output pm is obtained as follows , using the trainable parameters S̃mjk and Ṽm : pm = Ṽm + S̃mjk exp ( M ) jk ( 2 ) The matrix exp ( M ) , indexed by row and column indices j and k in the same way asM , is projected linearly by the 3-index tensor S̃mjk , to obtain a h-dimensional output vector . The bias-vector Ṽm turns this linear mapping into an affine mapping . The resulting vector may be interpreted as accumulated per-class evidence and may then be mapped to a vector of probabilities via softmax . Training can thus be done conventionally , by minimizing a loss function such as the L2 norm or the cross-entropy with softmax , using backpropagation through matrix exponentiation . In general , there is no simple analytical expression for the derivative of exp ( M ) , but one can instead compute derivatives for each step of the algorithm chosen to compute the exponential . For example , tf.linalg.expm uses the scaling-and-squaring algorithm with a Padé approximation , whose steps are all differentiable . We discuss the topic in more detail in Appendix A.2 . The nonlinearity of the M-layer architecture is provided by the Rd → Rh mapping v 7→ Ṽm + S̃mjk exp ( M ) jk . The count of trainable parameters of this component is dn2 +n2 +n2h+ h. This count comes from summing the dimensions of T̃ajk , B̃jk , S̃mjk , and Ṽm , respectively . We note that this architecture has some redundancy in its parameters , as one can freely multiply the T and U tensors by a d× d real matrix and , respectively , its inverse , while preserving the computed function . Similarly , it is possible to multiply each of the n× n parts of the tensors T̃ and S̃ , as well as B , by both an n × n matrix and its inverse . In other words , any pair of real invertible matrices of sizes d×d and n×n can be used to produce a new parametrization that still computes the same function . | This paper explores matrix exponentiation as an alternative non-linearity in a neural network. The key idea is to compute an affine transform of the inputs, there by generating an nxn feature map, followed by applying a matrix exponential to this feature map, that is subsequently used for classification. The paper provides several scenarios where matrix exponential could be an interesting non-linearity to use. Experiments are provided on synthetic examples, and standard image recognition benchmarks in a limited setting and show some promise. | SP:e9ac6b48ea0d07d528dea9a78266a2474789e139 |
Intelligent Matrix Exponentiation | 1 INTRODUCTION . Deep neural networks ( DNNs ) synthesize highly complex functions by composing a large number of neuronal units , each featuring a basic and usually 1-dimensional nonlinear activation function f : R1 → R1 . While highly successful in practice , this approach also has disadvantages . In a conventional DNN , any two activations only ever get combined through summation . This means that such a network requires an increasing number of parameters to approximate more complex functions even as simple as multiplication . Parameter-wise , this approach of composing simple functions does not scale efficiently . An alternative to the composition of many 1-dimensional functions is using a simple higherdimensional nonlinear function f : Rm → Rn . A single multidimensional nonlinearity may be desirable because it could express more complex relationships between input features with potentially fewer parameters and fewer mathematical operations . The matrix exponential stands out as a promising but overlooked candidate for a higher-dimensional nonlinearity for machine learning models . The matrix exponential is a smooth function that appears in the solution to one of the simplest differential equations that can yield desirable mathematical properties : d/dty ( t ) = My ( t ) , with the solution y ( t ) = exp ( Mt ) y ( 0 ) , where M is a constant matrix . The matrix exponential plays a prominent role in the theory of Lie groups , an algebraic structure widely used throughout many branches of mathematics and science . A unique advantage of the matrix exponential is its natural ability to represent oscillations and exponential decay , which becomes apparent if we decompose the matrix to be exponentiated into a symmetric and an antisymmetric component . The exponential of an antisymmetric matrix , whose nonzero eigenvalues are always imaginary , generates a superposition of periodic oscillations , whereas the exponential of a symmetric matrix , which has real eigenvalues , expresses an exponential growth or decay . This fact , especially the ability to represent periodic functions , gives the M-layer the possibility to extrapolate beyond its training domain . Many real-world phenomena contain some degree of periodicity and can therefore benefit from this feature . In contrast , the functions typically used in conventional DNNs approximate the target function locally and are therefore unable to scale well outside the boundaries of the training data for such problems . Based on these insights , we propose a novel architecture for supervised learning whose core element is a single layer ( henceforth referred to as “ M-layer ” ) , that computes a single matrix exponential , where the matrix to be exponentiated is an affine function of the input features . We show that the M-layer has universal approximator properties and allows closed-form per-example bounds for robustness . We demonstrate the ability of this architecture to learn multivariate polynomials , such as matrix determinants , and to generalize periodic functions beyond the domain of the input without any feature engineering . Furthermore , the M-layer achieves results comparable to recently-proposed non-specialized architectures on image recognition datasets . We provide TensorFlow code that implements the M-layer in the Supplementary Material . 2 RELATED WORK . Neuronal units with more complex activation functions have been proposed . One such example are sigma-pi units ( Rumelhart et al. , 1986 ) , whose activation function is the weighted sum of products of its inputs . More recently , neural arithmetic logic units have been introduced ( Trask et al. , 2018 ) , which can combine inputs using multiple arithmetic operators and generalize outside the domain of the training data . In contrast with these architectures , the M-layer is not based on neuronal units with multiple inputs , but uses a single matrix exponential as its nonlinear mapping function . Through the matrix exponential , the M-layer can easily learn mathematical operations more complex than addition , but with simpler architecture . In fact , as shown in Section 3.3 , the M-layer can be regarded as a generalized sigma-pi network with built-in architecture search , in the sense that it learns by itself which arithmetic graph should be used for the computation . Architectures with higher-dimensional nonlinearities are also already used . The softmax function is an example of a widely-used such nonlinear activation function that , like the M-layer , has extra mathematical structure . For example , a permutation of the softmax inputs produces a corresponding permutation of the outputs . Maxout networks also act on multiple units and have been successful in combination with dropout ( Goodfellow et al. , 2013 ) . In radial basis networks ( Park & Sandberg , 1991 ) , each hidden unit computes a nonlinear function of the distance between its own learned centroid and a single point represented by a vector of input coordinates . Capsule networks ( Sabour et al. , 2017 ) are another recent example of multidimensional nonlinearities . Similarly , the M-layer uses the matrix exponential as a single high-dimensional nonlinearity . This mapping satisfies nontrivial mathematical identities , for some of which we here elucidate their application potential in a machine learning context . Feature crosses of second and higher order have also been explored on top of convolutional layers ( ( Lin et al. , 2015 ; Lin & Maji , 2017 ; Li et al. , 2017 ; Engin et al. , 2018 ; Koniusz et al. , 2018 ) . In this line of research , ( Li et al. , 2017 ) introduces the use of a matrix operation ( either matrix logarithm or matrix square root ) on top of a convolutional layer with higher order feature crosses . The M-Layer differs from this kind of approach in two ways : first , it uses matrix exponentiation to produce feature crosses , and not to improve trainability on top of other ones ; secondly , it computes a matrix operation of an arbitrary matrix ( not necessarily symmetric positive semidefinite ) , which allows more expressibility , as seen for example in Section 3.3 . The main differences between the M-layer and other architectures that can utilize feature-crosses are the M-layer ’ s ability to also model non-polynomial dependencies ( such as a cosine ) and the builtin competition-for-total-complexity regularization , which we will explain in Section 3.3 through a “ circuit breadboard ” analogy . Matrix exponentiation has a natural alternative interpretation in terms of an ordinary differential equation ( ODE ) . As such , the M-layer can be compared to other novel ODE-related architectures , such as neural ordinary differential equations ( NODE ) ( Chen et al. , 2018 ) and their augmented extensions ( ANODE ) ( Dupont et al. , 2019 ) . We discuss this in Section 3.6 . Existing approaches to certifying the robustness of neural networks can be split into two different categories . Some approaches ( Peck et al. , 2017 ) mathematically analyze a network layer by layer , providing bounds on the robustness of each layer , that then get multiplied together . This kind of approach tends to give fairly loose bounds , due to the inherent tightness loss from composing upper bounds . Other approaches ( Singh et al. , 2018 ; 2019 ) use abstract interpretation on the evaluation of the network to provide empirical robustness bounds . In contrast , using the fact that the M-layer architecture has a single layer , in Section 3.7 we obtain a direct bound on the robustness on the whole network by analyzing the explicit formulation of the computation . 3 ARCHITECTURE . We start this section by refreshing the definition of the matrix exponential . We then define the proposed M-layer architecture and explain its ability to learn particular functions such as polynomials and periodic functions . Finally , we provide closed-form per-example robustness guarantees . 3.1 MATRIX EXPONENTIATION . The exponential of a square matrixM is defined as : exp ( M ) = ∑∞ k=0 1 k ! M k. The matrix powerMk is defined inductively as M0 = I , Mk+1 = M ·Mk , using the associativity of the matrix product ; it is not an element-wise matrix operation . Note that the expansion of exp ( M ) in Eq . ( 3.1 ) is finite for nilpotent matrices . A matrix M is called nilpotent if there exists a positive integer k such that Mk = 0 . Strictly upper triangular matrices are a canonical example . Multiple algorithms for computing the matrix exponential efficiently have been proposed ( Moler & Van Loan , 2003 ) . We provide an implementation of the M-layer that employs either the TensorFlow function tf.linalg.expm , which uses the scaling and squaring method combined with the Padé approximation ( Higham , 2005 ) , or a simpler and faster approximation of the matrix exponential that only squares a fixed number of times , using the formula exp ( M ) ≈ ( I+ M 2k ) 2 k . This approximation follows from the equivalent definition of exp ( M ) = limn→∞ ( I + Mn ) n , and has O ( kn1.5 ) time complexity , where n is the total number of elements in M . 3.2 M-LAYER DEFINITION . At the core of the proposed architecture ( Figure 1 ) is an M-layer that computes a single matrix exponential , where the matrix to be exponentiated is an affine function of all of the input features . In other words , an M-layer replaces an entire stack of hidden layers in a DNN . We exemplify the architecture as applied to a standard image recognition dataset , but this formulation is applicable to any other type of problem by adapting the relevant input indices . In the following equations , generalized Einstein summation is performed over all right-hand side indices not seen on the left-hand side . Consider an example input image , encoded as a 3-index array Xyxc , where y , x and c are the row index , column index and color channel index , respectively . The matrix M to be exponentiated is obtained as follows , using the trainable parameters T̃ajk , Ũaxyc and B̃jk : Mjk = B̃jk + T̃ajkŨayxcXyxc ( 1 ) First , X is projected linearly to a d-dimensional latent feature embedding space by Ũayxc . Then , the 3-index tensor T̃ajk maps each such latent feature to an n × n matrix . Finally , a bias matrix B̃jk is added to the feature-weighted sum of matrices . The result is a matrix indexed by row and column indices j and k. In order to allow for exponentiation , M must be a square matrix . It is possible to contract the tensors T̃ and Ũ in order to simplify the architecture formula , but partial tensor factorization provides regularization by reducing the parameter count . An output pm is obtained as follows , using the trainable parameters S̃mjk and Ṽm : pm = Ṽm + S̃mjk exp ( M ) jk ( 2 ) The matrix exp ( M ) , indexed by row and column indices j and k in the same way asM , is projected linearly by the 3-index tensor S̃mjk , to obtain a h-dimensional output vector . The bias-vector Ṽm turns this linear mapping into an affine mapping . The resulting vector may be interpreted as accumulated per-class evidence and may then be mapped to a vector of probabilities via softmax . Training can thus be done conventionally , by minimizing a loss function such as the L2 norm or the cross-entropy with softmax , using backpropagation through matrix exponentiation . In general , there is no simple analytical expression for the derivative of exp ( M ) , but one can instead compute derivatives for each step of the algorithm chosen to compute the exponential . For example , tf.linalg.expm uses the scaling-and-squaring algorithm with a Padé approximation , whose steps are all differentiable . We discuss the topic in more detail in Appendix A.2 . The nonlinearity of the M-layer architecture is provided by the Rd → Rh mapping v 7→ Ṽm + S̃mjk exp ( M ) jk . The count of trainable parameters of this component is dn2 +n2 +n2h+ h. This count comes from summing the dimensions of T̃ajk , B̃jk , S̃mjk , and Ṽm , respectively . We note that this architecture has some redundancy in its parameters , as one can freely multiply the T and U tensors by a d× d real matrix and , respectively , its inverse , while preserving the computed function . Similarly , it is possible to multiply each of the n× n parts of the tensors T̃ and S̃ , as well as B , by both an n × n matrix and its inverse . In other words , any pair of real invertible matrices of sizes d×d and n×n can be used to produce a new parametrization that still computes the same function . | This work proposes a novel machine learning architecture (or M-layer) that is in the form matrix exponential. This architecture can effectively model the interaction of feature components and learn multivariate polynomial functions and periodic functions. The architecture of the M-layer is well described. Its universal approximation capability is explained and proved in the Appendix. Other properties related to periodicity, connection to Lie groups, the interpretation from the perspective of dynamical systems, and the robustness bounds are discussed. Experimental study is conducted on toy datasets and three image classification datasets to demonstrate the properties of the proposed M-layer. | SP:e9ac6b48ea0d07d528dea9a78266a2474789e139 |
Slot Machines: Discovering Winning Combinations of Random Weights in Neural Networks | In contrast to traditional weight optimization in a continuous space , we demonstrate the existence of effective random networks whose weights are never updated . By selecting a weight among a fixed set of random values for each individual connection , our method uncovers combinations of random weights that match the performance of traditionally-trained networks of the same capacity . We refer to our networks as “ slot machines ” where each reel ( connection ) contains a fixed set of symbols ( random values ) . Our backpropagation algorithm “ spins ” the reels to seek “ winning ” combinations , i.e. , selections of random weight values that minimize the given loss . Quite surprisingly , we find that allocating just a few random values to each connection ( e.g. , 8 values per connection ) yields highly competitive combinations despite being dramatically more constrained compared to traditionally learned weights . Moreover , finetuning these combinations often improves performance over the trained baselines . A randomly initialized VGG19 with 8 values per connection contains a combination that achieves 90 % test accuracy on CIFAR-10 . Our method also achieves an impressive performance of 98.1 % on MNIST for neural networks containing only random weights . 1 INTRODUCTION . Innovations in how deep networks are trained have played an important role in the remarkable success deep learning has produced in a variety of application areas , including image recognition ( He et al. , 2016 ) , object detection ( Ren et al. , 2015 ; He et al. , 2017 ) , machine translation ( Vaswani et al. , 2017 ) and language modeling ( Brown et al. , 2020 ) . Learning typically involves either optimizing a network from scratch ( Krizhevsky et al. , 2012 ) , finetuning a pre-trained model ( Yosinski et al. , 2014 ) or jointly optimizing the architecture and weights ( Zoph & Le , 2017 ) . Against this predominant background , we pose the following question : can a network instantiated with only random weights achieve competitive results compared to the same model using optimized weights ? For a given task , an untrained , randomly initialized network is unlikely to produce good performance . However , we demonstrate that given sufficient random weight options for each connection , there exist selections of these random weight values that have generalization performance comparable to that of a traditionally-trained network with the same architecture . More importantly , we introduce a method that can find these high-performing randomly weighted configurations consistently and efficiently . Furthermore , we show empirically that a small number of random weight options ( e.g. , 2−8 values per connection ) are sufficient to obtain accuracy comparable to that of the traditionally-trained network . Instead of updating the weights , the algorithm simply selects for each connection a weight value from a fixed set of random weights . We use the analogy of “ slot machines ” to describe how our method operates . Each reel in a Slot Machine has a fixed set of symbols . The reels are jointly spinned in an attempt to find winning combinations . In our context , each connection has a fixed set of random weight values . Our algorithm “ spins the reels ” in order to find a winning combination of symbols , i.e. , selects a weight value for each connection so as to produce an instantiation of the network that yields strong performance . While in physical Slot Machines the spinning of the reels is governed by a fully random process , in our Slot Machines the selection of the weights is guided by a method that optimizes the given loss at each spinning iteration . More formally , we allocateK fixed random weight values to each connection . Our algorithm assigns a quality score to each of these K possible values . In the forward pass a weight value is selected for each connection based on the scores . The scores are then updated in the backward pass via stochastic gradient descent . However , the weights are never changed . By evaluating different combinations of fixed randomly generated values , this extremely simple procedure finds weight configurations that yield high accuracy . We demonstrate the efficacy of our algorithm through experiments on MNIST and CIFAR-10 . On MNIST , our randomly weighted Lenet-300-100 ( Lecun et al. , 1998 ) obtains a 97.0 % test set accuracy when using K = 2 options per connection and 98.1 % with K = 128 . On CIFAR10 ( Krizhevsky , 2009 ) , our six-layer convolutional network matches the test set performance of the traditionally-trained network when selecting from K = 64 fixed random values at each connection . Finetuning the models obtained by our procedure generally boosts performance over networks with optimized weights albeit at an additional compute cost ( see Figure 4 ) . Also , compared to traditional networks , our networks are less memory efficient due to the inclusion of scores . That said , our work casts light on some intriguing phenomena about neural networks : • First , our results suggest a performance comparability between selection from multiple random weights and traditional training by continuous weight optimization . This underscores the effectiveness of strong initializations . • Second , this paper further highlights the enormous expressive capacity of neural networks . Maennel et al . ( 2020 ) show that contemporary neural networks are so powerful that they can memorize randomly generated labels . This work builds on that revelation and demonstrates that current networks can model challenging non-linear mappings extremely well even by simple selection from random weights . • This work also connects to recent observations ( Malach et al. , 2020 ; Frankle & Carbin , 2018 ) suggesting strong performance can be obtained by utilizing gradient descent to uncover effective subnetworks . • Finally , we are hopeful that our novel model —consisting in the the introduction of multiple weight options for each edge— will inspire other initialization and optimization strategies . 2 RELATED WORK . Supermasks and the Strong Lottery Ticket Conjecture . The lottery ticket hypothesis was articulated in ( Frankle & Carbin , 2018 ) and states that a randomly initialized neural network contains sparse subnetworks which when trained in isolation from scratch can achieve accuracy similar to that of the trained dense network . Inspired by this result , Zhou et al . ( 2019 ) present a method for identifying subnetworks of randomly initialized neural networks that achieve better than chance performance without training . These subnetworks ( named “ supermasks ” ) are found by assigning a probability value to each connection . These probabilities are used to sample the connections to use and are updated via stochastic gradient descent . Without ever modifying the weights , Zhou et al . ( 2019 ) find subnetworks that perform impressively across multiple datasets . Follow up work by Ramanujan et al . ( 2019 ) finds supermasks that match the performance of a dense network . On ImageNet ( Russakovsky et al. , 2009 ) , they find subnetworks within a randomly weighted ResNet-50 ( Zagoruyko & Komodakis , 2016 ) that match the performance of a smaller , trained ResNet-34 ( He et al. , 2016 ) . Accordingly , they propose the strong lottery ticket conjecture : a sufficiently overparameterized , randomly weighted neural network contains a subnetwork that performs as well as a traditionally-trained network with the same number of parameters . Ramanujan et al . ( 2019 ) adopts a deterministic protocol in their so-called “ edge-popup ” algorithm for finding supermasks instead of the stochastic algorithm of Zhou et al . ( 2019 ) . These empirical results as well as recent theoretical ones ( Malach et al. , 2020 ; Pensia et al. , 2020 ) suggest that pruning a randomly initialized network is just as good as optimizing the weights , provided a good pruning mechanism is used . Our work corroborates this intriguing phenomenon but differs from these prior methods in a significant aspect . We eliminate pruning completely and instead introduce multiple weight values per connection . Thus , rather than selecting connections to define a subnetwork , our method selects weights for all connections in a network of fixed structure . Although our work has interesting parallels with pruning ( as illustrated in Figure 9 ) , it is different from pruning as all connections remain active in every forward pass . Pruning at Initialization . The lottery ticket hypothesis also inspired several recent work aimed towards pruning ( i.e. , predicting “ winning ” tickets ) at initialization ( Lee et al. , 2020 ; 2019 ; Tanaka et al. , 2020 ; Wang et al. , 2020 ) . Our work is different in motivation from these methods and those that train only a subset of the weights ( Hoffer et al. , 2018 ; Rosenfeld & Tsotsos , 2019 ) . Our aim is to find neural networks with random weights that match the performance of traditionally-trained networks with the same number of parameters . Weight Agnostic Neural Networks . Gaier & Ha ( 2019 ) build neural network architectures with high performance in a setting where all the weights have the same shared random value . The optimization is instead performed over the architecture ( Stanley & Miikkulainen , 2002 ) . They show empirically that the network performance is indifferent to the shared value but defaults to random chance when all the weights assume different random values . Although we do not perform weight training , the weights in this work have different random values . Further , we build our models using fixed architectures . Low-bit Networks and Quantization Methods . As in binary networks ( Courbariaux & Bengio , 2016 ; Rastegari et al. , 2016 ) and network quantization ( Hubara et al. , 2017 ; Wang et al. , 2018 ) , the parameters in slot machines are drawn from a finite set . However , whereas the primary objective in quantized networks is mostly compression and computational speedup , the motivation behind slot machines is recovering good performance from randomly initialized networks . Accordingly , slot machines use real-valued weights as opposed to the binary ( or integer ) weights used by low-bit networks . Furthermore , the weights in low-bit networks are usually optimized directly whereas only associated scores are optimized in slot machines . Random Decision Trees . Our approach is inspired by the popular use of random subsets of features in the construction of decision trees ( Breiman et al. , 1984 ) . Instead of considering all possible choices of features and all possible splitting tests at each node , random decision trees are built by restricting the selection to small random subsets of feature values and splitting hypotheses . We adapt this strategy to the training of neural network by restricting the optimization of each connection over a random subset of weight values . 3 SLOT MACHINES : NETWORKS WITH FIXED RANDOM WEIGHT OPTIONS . Our goal is to construct non-sparse neural networks that achieve high accuracy by selecting a value from a fixed set of completely random weights for each connection . We start by providing an intuition for our method in Section 3.1 , before formally defining our algorithm in Section 3.2 . 3.1 INTUITION . An untrained , randomly initialized network is unlikely to perform better than random chance . Interestingly , the impressive advances of Ramanujan et al . ( 2019 ) and Zhou et al . ( 2019 ) demonstrate that networks with random weights can in fact do well , if pruned properly . In this work , instead of pruning we explore weight selection from fixed random values as a way to obtain effective networks . To provide an intuition for our method , consider an untrained network N with one weight value for each connection , as typically done . If the weights of N are drawn randomly from an appropriate distribution D ( e.g. , ( Glorot & Bengio , 2010 ) or ( He et al. , 2015 ) ) , there is an extremely small but nonzero probability that N obtains good accuracy ( say , greater than a threshold τ ) on the given task . Let q denote this probability . Also consider another untrained network NK that has the same architectural configuration as N but with K > 1 weight choices per connection . If n is the number of connections inN , thenNK contains within itKn different network instantiations that are architecturally identical to N but that differ in weight configuration . If the weights of NK are sampled from D , then the probability that none of the Kn networks obtains good accuracy is essentially ( 1− q ) Kn . This probability decays quickly as either K or n increases . Our method finds randomly weighted networks that achieve very high accuracy even with small values of K. For instance , a six layer convolutional network with 2 random values per connection obtains 82 % test accuracy on CIFAR-10 . But how do we select a good network from these Kn different networks ? Brute-force evaluation of all possible configurations is clearly not feasible due to the massive number of different hypotheses . Instead , we present an algorithm , shown in Figure 1 , that iteratively searches the best combination of connection values for the entire network by optimizing the given loss . To do this , the method learns a real-valued quality score for each weight option . These scores are used to select the weight value of each connection during the forward pass . The scores are then updated in the backward pass based on the loss value in order to improve training performance over iterations . | The paper investigates a type of neural network in which one of K possible fixed weights is chosen in each neuronal connection. The weights themselves are fixed and random, but the scores that determine which of the weights is chosen are updated through back-propagation using a straight-through estimator. The accuracy and behavior of such networks is studied for small networks on small datasets (MNIST, CIFAR). | SP:c0c3373f6d4e54dc4ce24da2bd90ac9644593e30 |
Slot Machines: Discovering Winning Combinations of Random Weights in Neural Networks | In contrast to traditional weight optimization in a continuous space , we demonstrate the existence of effective random networks whose weights are never updated . By selecting a weight among a fixed set of random values for each individual connection , our method uncovers combinations of random weights that match the performance of traditionally-trained networks of the same capacity . We refer to our networks as “ slot machines ” where each reel ( connection ) contains a fixed set of symbols ( random values ) . Our backpropagation algorithm “ spins ” the reels to seek “ winning ” combinations , i.e. , selections of random weight values that minimize the given loss . Quite surprisingly , we find that allocating just a few random values to each connection ( e.g. , 8 values per connection ) yields highly competitive combinations despite being dramatically more constrained compared to traditionally learned weights . Moreover , finetuning these combinations often improves performance over the trained baselines . A randomly initialized VGG19 with 8 values per connection contains a combination that achieves 90 % test accuracy on CIFAR-10 . Our method also achieves an impressive performance of 98.1 % on MNIST for neural networks containing only random weights . 1 INTRODUCTION . Innovations in how deep networks are trained have played an important role in the remarkable success deep learning has produced in a variety of application areas , including image recognition ( He et al. , 2016 ) , object detection ( Ren et al. , 2015 ; He et al. , 2017 ) , machine translation ( Vaswani et al. , 2017 ) and language modeling ( Brown et al. , 2020 ) . Learning typically involves either optimizing a network from scratch ( Krizhevsky et al. , 2012 ) , finetuning a pre-trained model ( Yosinski et al. , 2014 ) or jointly optimizing the architecture and weights ( Zoph & Le , 2017 ) . Against this predominant background , we pose the following question : can a network instantiated with only random weights achieve competitive results compared to the same model using optimized weights ? For a given task , an untrained , randomly initialized network is unlikely to produce good performance . However , we demonstrate that given sufficient random weight options for each connection , there exist selections of these random weight values that have generalization performance comparable to that of a traditionally-trained network with the same architecture . More importantly , we introduce a method that can find these high-performing randomly weighted configurations consistently and efficiently . Furthermore , we show empirically that a small number of random weight options ( e.g. , 2−8 values per connection ) are sufficient to obtain accuracy comparable to that of the traditionally-trained network . Instead of updating the weights , the algorithm simply selects for each connection a weight value from a fixed set of random weights . We use the analogy of “ slot machines ” to describe how our method operates . Each reel in a Slot Machine has a fixed set of symbols . The reels are jointly spinned in an attempt to find winning combinations . In our context , each connection has a fixed set of random weight values . Our algorithm “ spins the reels ” in order to find a winning combination of symbols , i.e. , selects a weight value for each connection so as to produce an instantiation of the network that yields strong performance . While in physical Slot Machines the spinning of the reels is governed by a fully random process , in our Slot Machines the selection of the weights is guided by a method that optimizes the given loss at each spinning iteration . More formally , we allocateK fixed random weight values to each connection . Our algorithm assigns a quality score to each of these K possible values . In the forward pass a weight value is selected for each connection based on the scores . The scores are then updated in the backward pass via stochastic gradient descent . However , the weights are never changed . By evaluating different combinations of fixed randomly generated values , this extremely simple procedure finds weight configurations that yield high accuracy . We demonstrate the efficacy of our algorithm through experiments on MNIST and CIFAR-10 . On MNIST , our randomly weighted Lenet-300-100 ( Lecun et al. , 1998 ) obtains a 97.0 % test set accuracy when using K = 2 options per connection and 98.1 % with K = 128 . On CIFAR10 ( Krizhevsky , 2009 ) , our six-layer convolutional network matches the test set performance of the traditionally-trained network when selecting from K = 64 fixed random values at each connection . Finetuning the models obtained by our procedure generally boosts performance over networks with optimized weights albeit at an additional compute cost ( see Figure 4 ) . Also , compared to traditional networks , our networks are less memory efficient due to the inclusion of scores . That said , our work casts light on some intriguing phenomena about neural networks : • First , our results suggest a performance comparability between selection from multiple random weights and traditional training by continuous weight optimization . This underscores the effectiveness of strong initializations . • Second , this paper further highlights the enormous expressive capacity of neural networks . Maennel et al . ( 2020 ) show that contemporary neural networks are so powerful that they can memorize randomly generated labels . This work builds on that revelation and demonstrates that current networks can model challenging non-linear mappings extremely well even by simple selection from random weights . • This work also connects to recent observations ( Malach et al. , 2020 ; Frankle & Carbin , 2018 ) suggesting strong performance can be obtained by utilizing gradient descent to uncover effective subnetworks . • Finally , we are hopeful that our novel model —consisting in the the introduction of multiple weight options for each edge— will inspire other initialization and optimization strategies . 2 RELATED WORK . Supermasks and the Strong Lottery Ticket Conjecture . The lottery ticket hypothesis was articulated in ( Frankle & Carbin , 2018 ) and states that a randomly initialized neural network contains sparse subnetworks which when trained in isolation from scratch can achieve accuracy similar to that of the trained dense network . Inspired by this result , Zhou et al . ( 2019 ) present a method for identifying subnetworks of randomly initialized neural networks that achieve better than chance performance without training . These subnetworks ( named “ supermasks ” ) are found by assigning a probability value to each connection . These probabilities are used to sample the connections to use and are updated via stochastic gradient descent . Without ever modifying the weights , Zhou et al . ( 2019 ) find subnetworks that perform impressively across multiple datasets . Follow up work by Ramanujan et al . ( 2019 ) finds supermasks that match the performance of a dense network . On ImageNet ( Russakovsky et al. , 2009 ) , they find subnetworks within a randomly weighted ResNet-50 ( Zagoruyko & Komodakis , 2016 ) that match the performance of a smaller , trained ResNet-34 ( He et al. , 2016 ) . Accordingly , they propose the strong lottery ticket conjecture : a sufficiently overparameterized , randomly weighted neural network contains a subnetwork that performs as well as a traditionally-trained network with the same number of parameters . Ramanujan et al . ( 2019 ) adopts a deterministic protocol in their so-called “ edge-popup ” algorithm for finding supermasks instead of the stochastic algorithm of Zhou et al . ( 2019 ) . These empirical results as well as recent theoretical ones ( Malach et al. , 2020 ; Pensia et al. , 2020 ) suggest that pruning a randomly initialized network is just as good as optimizing the weights , provided a good pruning mechanism is used . Our work corroborates this intriguing phenomenon but differs from these prior methods in a significant aspect . We eliminate pruning completely and instead introduce multiple weight values per connection . Thus , rather than selecting connections to define a subnetwork , our method selects weights for all connections in a network of fixed structure . Although our work has interesting parallels with pruning ( as illustrated in Figure 9 ) , it is different from pruning as all connections remain active in every forward pass . Pruning at Initialization . The lottery ticket hypothesis also inspired several recent work aimed towards pruning ( i.e. , predicting “ winning ” tickets ) at initialization ( Lee et al. , 2020 ; 2019 ; Tanaka et al. , 2020 ; Wang et al. , 2020 ) . Our work is different in motivation from these methods and those that train only a subset of the weights ( Hoffer et al. , 2018 ; Rosenfeld & Tsotsos , 2019 ) . Our aim is to find neural networks with random weights that match the performance of traditionally-trained networks with the same number of parameters . Weight Agnostic Neural Networks . Gaier & Ha ( 2019 ) build neural network architectures with high performance in a setting where all the weights have the same shared random value . The optimization is instead performed over the architecture ( Stanley & Miikkulainen , 2002 ) . They show empirically that the network performance is indifferent to the shared value but defaults to random chance when all the weights assume different random values . Although we do not perform weight training , the weights in this work have different random values . Further , we build our models using fixed architectures . Low-bit Networks and Quantization Methods . As in binary networks ( Courbariaux & Bengio , 2016 ; Rastegari et al. , 2016 ) and network quantization ( Hubara et al. , 2017 ; Wang et al. , 2018 ) , the parameters in slot machines are drawn from a finite set . However , whereas the primary objective in quantized networks is mostly compression and computational speedup , the motivation behind slot machines is recovering good performance from randomly initialized networks . Accordingly , slot machines use real-valued weights as opposed to the binary ( or integer ) weights used by low-bit networks . Furthermore , the weights in low-bit networks are usually optimized directly whereas only associated scores are optimized in slot machines . Random Decision Trees . Our approach is inspired by the popular use of random subsets of features in the construction of decision trees ( Breiman et al. , 1984 ) . Instead of considering all possible choices of features and all possible splitting tests at each node , random decision trees are built by restricting the selection to small random subsets of feature values and splitting hypotheses . We adapt this strategy to the training of neural network by restricting the optimization of each connection over a random subset of weight values . 3 SLOT MACHINES : NETWORKS WITH FIXED RANDOM WEIGHT OPTIONS . Our goal is to construct non-sparse neural networks that achieve high accuracy by selecting a value from a fixed set of completely random weights for each connection . We start by providing an intuition for our method in Section 3.1 , before formally defining our algorithm in Section 3.2 . 3.1 INTUITION . An untrained , randomly initialized network is unlikely to perform better than random chance . Interestingly , the impressive advances of Ramanujan et al . ( 2019 ) and Zhou et al . ( 2019 ) demonstrate that networks with random weights can in fact do well , if pruned properly . In this work , instead of pruning we explore weight selection from fixed random values as a way to obtain effective networks . To provide an intuition for our method , consider an untrained network N with one weight value for each connection , as typically done . If the weights of N are drawn randomly from an appropriate distribution D ( e.g. , ( Glorot & Bengio , 2010 ) or ( He et al. , 2015 ) ) , there is an extremely small but nonzero probability that N obtains good accuracy ( say , greater than a threshold τ ) on the given task . Let q denote this probability . Also consider another untrained network NK that has the same architectural configuration as N but with K > 1 weight choices per connection . If n is the number of connections inN , thenNK contains within itKn different network instantiations that are architecturally identical to N but that differ in weight configuration . If the weights of NK are sampled from D , then the probability that none of the Kn networks obtains good accuracy is essentially ( 1− q ) Kn . This probability decays quickly as either K or n increases . Our method finds randomly weighted networks that achieve very high accuracy even with small values of K. For instance , a six layer convolutional network with 2 random values per connection obtains 82 % test accuracy on CIFAR-10 . But how do we select a good network from these Kn different networks ? Brute-force evaluation of all possible configurations is clearly not feasible due to the massive number of different hypotheses . Instead , we present an algorithm , shown in Figure 1 , that iteratively searches the best combination of connection values for the entire network by optimizing the given loss . To do this , the method learns a real-valued quality score for each weight option . These scores are used to select the weight value of each connection during the forward pass . The scores are then updated in the backward pass based on the loss value in order to improve training performance over iterations . | This paper proposes a method to train a neural network by selecting a weight from a set of $K$ randomly generated weights for each edge in the network. Each edge has a different set of random weights. Quality score is assinged to each of $K$ random weights, which determines the weight used in the forward calculation. Instead of optimizing weights directly, the proposed method optimizes the quality scores with the straight-through gradient estimator. Experimental results show that the neural network trained by the proposed method achieves high accuracy compared to random initialization even when $K=2$. | SP:c0c3373f6d4e54dc4ce24da2bd90ac9644593e30 |
Learning a Non-Redundant Collection of Classifiers | 1 INTRODUCTION . The Empirical Risk Minimization ( ERM ) principle ( Vapnik , 2013 ) , which underpins many machine learning models , is built on the assumption that training and testing samples are drawn i.i.d . from some hypothetical distribution . It has been demonstrated that certain violations of this assumption ( in conjunction with potential misalignments between the formulation of the learning objectives and the underlying task of interest ) lead to models that exploit spurious or brittle correlations in the training data . Examples include learning to exploit image backgrounds instead of objects in the foreground due to data biases ( such as using grassy backgrounds to predict the presence of cows ( Beery et al. , 2018 ) ) , using textural as opposed to shape information to classify objects ( Geirhos et al. , 2018 ) , and using signals not robust to small adversarial perturbations ( Ilyas et al. , 2019 ) . Implicit in work that attempts to address these phenomena is the assumption that more robust predictive signals are indeed present in the training data , even if for various reasons current models do not have the tendency to leverage them . In this work , drawing inspiration from Quality-Diversity algorithms ( Pugh et al. , 2016 ) – which seek to construct a collection of high-performing , diverse solutions to a task – we aim to learn a collection of models , each incentivized to find a distinct , high-performing solution to a given supervised learning problem from a fixed training set . Informally , our motivation is that a sufficiently large collection of such distinct models would exploit robust signals present in the training data in addition to the brittle signals that current models tend to exploit . Thus , given the representations computed by such a collection , it may be possible to rapidly adapt to test-time shifts in distribution that destroy the predictive power of brittle features . Addressing this problem hinges on defining and enforcing an appropriate measure of model diversity . To this end , we make the following contributions : • We propose and motivate a novel measure of model diversity based on conditional total correlation ( across models ) of final layer representations given the label . Informally , this incentivizes models to each learn a non-redundant ( in an information-theoretic sense ) way to solve the given task . • We estimate this measure using a proxy variational estimator computed using samples from the conditional joint and marginal distributions of final layer representations across models . We train a collection of models to be accordingly diverse , alternating between training a variational critic to maximize the variational estimator and minimizing a weighted sum of the classification losses across models and the variational estimator . • We empirically validate this framework by training on datasets with synthetically injected spurious correlations . We demonstrate that our framework is able to learn a collection of representations which , under a linear fine-tuning protocol , are competitive with baselines in being able to rapidly adapt to a shift in distribution which destroys the spurious correlations . We show that our framework performs favourably relative to baselines in being able to isolate distinct predictive signals in different models in the collection , as a result being able to make accurate test-time predictions without fine-tuning . We also compare our approach to the Invariant Risk Minimization ( Arjovsky et al. , 2019 ) framework which leverages information from multiple training environments to identify signals robust to variations across environments . We show that our approach is able to exploit the robust signals without requiring the metadata needed by IRM to discriminate between spurious and robust signals . 2 TOTAL CORRELATION . Total correlation ( Watanabe , 1960 ) is a multivariate extension of mutual information . The total correlation for n random variables X1 , ... , Xn is given by ( where KL denotes the Kullback-Leibler divergence ) : TC ( X1 , ... , Xn ) : = KL [ p ( X1 , ... , Xn ) ‖ n∏ i=1 p ( Xi ) ] ( 1 ) For n = 2 this is equivalent to mutual information . We can interpret this as a measure of the amount of redundancy across the Xi ’ s . A total correlation of zero corresponds to the Xi ’ s being mutually independent . Given a classification problem predicting label Y from X , we consider the conditional total correlation of a collection of vector-valued representations h1 ( X ) , ... , hn ( X ) given Y for differentiable functions hi , defined as : TC ( h1 ( X ) , ... , hn ( X ) |Y ) : = EY [ KL [ p ( h1 ( X ) , ... , hn ( X ) |Y ) ‖ n∏ i=1 p ( hi ( X ) |Y ) ] ] ( 2 ) where X is drawn from the conditional distribution given Y . 3 METHOD . Consider a collection of differentiable representation function and linear classifier pairs { ( hi , ci ) } i∈ { 1 , ... , n } where we denote the vector of parameters of all these functions as θ ∈ Rm , such that for a classification problem predicting Y from X , we compute logits ci ◦ hi ( X ) . That is , the hi computes a vector-valued representation of the input X , and ci transforms this into a scalar classification prediction . We target the following optimization problem : min θ n∑ i=1 EX , Y [ l ( ci ◦ hi ( X ) , Y ) ] subject to TC ( h1 ( X ) , ... , hn ( X ) |Y ) < ( 3 ) for some > 0 , where l is some loss function . That is , we seek to minimize the risk for each model while keeping the conditional total correlation of final layer representations given the label below some threshold . We justify the choice of conditional total correlation in place of the unconditional version by appealing to the following argument : if we consider the case where the collection consists of just two models , total correlation is equivalent to mutual information . Minimizing mutual information between the two representations is equivalent to enforcing independence . However , it is not possible for the representations to be independent while requiring that both are sufficient to accurately predict the label . On the other hand , provided that the representations are not dependent due to some common cause , they will be conditionally independent given the label . Thus , minimizing the conditional total correlation should provide a more useful learning signal . In practice , we attempt to solve the following unconstrained problem in place of ( 3 ) : min θ n∑ i=1 EX , Y [ l ( ci ◦ hi ( X ) , Y ) ] + βTC ( h1 ( X ) , ... , hn ( X ) |Y ) ( 4 ) where β > 0 is a hyperparameter and we estimate the risk using the empirical risk ( i.e . sample mean ) . 3.1 TOTAL CORRELATION ESTIMATION . In initial experiments with the two-model case ( i.e . where total correlation is equivalent to mutual information ) , the InfoNCE objective of Oord et al . ( 2018 ) , shown to compute a lower bound of the mutual information ( Poole et al. , 2019 ) , proved effective in computing useful gradient estimates for the latter term in ( 4 ) . Consequently , we choose to construct a proxy estimator for the total correlation based on InfoNCE . The InfoNCE objective for random variables U and V is given by : INCE : = 1 K K∑ i=1 log ef ( ui , vi ) 1 K ∑K j=1 e f ( ui , vj ) ( 5 ) where ( ui , vi ) are sampled from the joint distribution of U and V , K is the batch size , and f is a differentiable , scalar-valued function , commonly referred to as a ‘ critic ’ ( Poole et al. , 2019 ) . The parameters of f are optimized to maximize INCE . By analogy , our proposed estimator T̂C ( X1 , ... , XN ) is given by : T̂C ( X1 , ... , XN ) : = 1 K K∑ i=1 log ef ( xi1 , ... , xin ) 1 M ∑M j=1 e f ( xπ1 , j1 , ... , xπn , jn ) ( 6 ) where ( xi1 , ... , xin ) are sampled from the joint distribution of X1 , ... , Xn , K is the batch size , πk , j ∼ Uniform ( { 1 , ... K } ) is a random index of the batch dimension , M is a hyperparameter , and f is a critic . The permuted πk , j indices are intended to yield ( xπ1 , j1 , ... , xπn , jn ) samples drawn approximately from the marginals , derived from the observations in the batch . Similarly we optimize the parameters of f to maximize T̂C ( X1 , ... , XN ) . We interpret ( 6 ) as a ratio of scores between samples from the joint distribution of the Xi ’ s and samples approximately drawn from the marginals , such that a solution to the variational objective resulting in a large ratio corresponds to being able to easily discriminate between samples from the joint and marginals ( i.e . a proxy for large total correlation ) and conversely when the ratio is small . We compute the conditional case as follows : T̂C ( X1 , ... , XN |Y ) : = EY [ 1 K K∑ i=1 log ef ( xi1 , ... , xin ) 1 M ∑M j=1 e f ( xπ1 , j1 , ... , xπn , jn ) ] ( 7 ) where ( xi1 , ... , xin ) are sampled from the conditional joint distribution of X1 , ... , Xn given Y . We perform the conditioning step by splitting a batch by label , separately computing the estimator for each group , and finally computing a weighted average . The weights are estimated using the frequencies of each label in the batch . 3.2 MINIMAX TRAINING OBJECTIVE . We replace the latter term in ( 4 ) with our variational estimator to obtain : min θ n∑ i=1 EX , Y [ l ( ci ◦ hi ( X ) , Y ) ] + βmax φ T̂C ( h1 ( X ) , ... , hn ( X ) |Y ) ( 8 ) where φ are the parameters of the variational critic f , and β > 0 is a hyperparameter . In practice , we use gradient-based methods to approximately optimize ( 8 ) by alternating between optimizing φ to maximize the variational estimator ( giving us a local total correlation estimate ) , and optimizing θ to minimize the sum of all terms ( for fixed φ ) . 4 EXPERIMENTS . The main hypothesis that we wish to test is that our method yields a collection of models that exploit and isolate distinct predictive signals in the training data . Our strategy for testing this hypothesis is to consider a training distribution with synthetically injected spurious correlations as well as a test distribution in which the spurious correlation has been destroyed . We then measure our collection of models ’ s ability to rapidly adapt to the new distribution given small amounts of data , relative to a number of baselines . The spurious correlations are constructed such that they are easier to exploit than the robust signals . The central challenge in testing our main hypothesis is in constructing a reliable method for measuring the extent to which distinct predictive signals have been extracted and isolated in the outputs of trained models . Our evaluation protocol which requires access to a small amount of data from a shifted distribution to construct a model selection strategy emerges from a lack of alternatives . It precludes the use of various real-world benchmarks known or hypothesized to exhibit a variety of predictive signals , spurious or otherwise : we simply do not currently have access to appropriate test sets . Looking to the related problem of domain generalization for alternate evaluation protocols / model selection strategies , we find approaches either similarly based on oracle test sets or using held-out training domains ( Gulrajani & Lopez-Paz , 2020 ) . Here , we deliberately consider a problem setting which does not assume access to training data from multiple distinct but related domains , so we can not use model selection strategies based on the latter . Indeed , the underlying motivation for the problem setting we consider is that perhaps we can get away with very little additional information in order to isolate distinct predictive signals in a training set . A central priority for future work is to explore the possibility of model selection strategies that do not require access to data from a shifted evaluation distribution . In this paper , we focus on empirical evaluation of our approach relative to baselines under our proposed fast adaptation evaluation protocols . We consider variations on the Colored MNIST ( C-MNIST ) task of Arjovsky et al . ( 2019 ) . This task consists of classifying MNIST digits into one of two classes ( 0-4 or 5-9 ) . However , the true label is flipped with probability 0.25 and an additional binary signal ( colour ) is constructed from this corrupted label such that it is more strongly correlated with the corrupted label than the digit . As demonstrated in Arjovsky et al . ( 2019 ) , a model trained with ERM will overwhelmingly tend to exploit the colour information . In Arjovsky et al . ( 2019 ) , the goal was to demonstrate an ability to learn to exploit the digit information given the task of identifying a stable signal across environments with varying colour-label correlation . To test our framework , we assume no such access to multiple environments , and collapse the two training environments in the C-MNIST benchmark task of Arjovsky et al . ( 2019 ) into one training set.1 The results for this task are collected in Table 1 . We also consider a modified dataset which introduces an obstacle to extracting mutually exclusive representations of digit and colour . Specifically , we use functions of a new binary ‘ common cause ’ variable to both rotate the digits and perturb the colour signal , such that minimizing total correlation will depend on an ability to discard the common information . This is to test our framework ’ s ability to still extract the predictive signals in the presence of such an obstacle to minimizing conditional total correlation . We refer to this dataset as Rotated Colored MNIST ( RC-MNIST ) . The results for this task are collected in Table 2 . We consider a third variation in which more than two predictive signals are present in the training data . Specifically , we construct another binary ‘ colour ’ signal from the corrupted label and add it to the input such that new signal can be exploited on the training set for a maximal accuracy of 0.75 . We refer to this dataset as Two-Colored MNIST ( TC-MNIST ) . The results for this task are collected in Table 3 . We similarly construct the same three benchmarks using the Fashion-MNIST dataset ( Xiao et al. , 2017 ) . We consider the following baselines : • Single ERM classifier • Single ERM classifier with DeCov ( Cogswell et al. , 2015 ) regularization . We use this to penalize large non-diagonal entries of the covariance matrix of the output of the representation function • Single ERM classifier with Mutual Angles ( MA ) ( Xie et al. , 2015 ) regularization . We use this to penalize the mean angle between weight vectors corresponding to the output units of the representation function , minus the variance of the angles • Single ERM classifier with a Uniform Eigenvalue Regularizer ( UER ) ( Xie et al. , 2017 ) . We use this to encourage the weight matrix computing the output of the representation function to have uniform eigenvalues • Ensemble of ERM classifiers • Collection of ERM classifiers trained to maximize pairwise cosine distances between final layer representations ( for a given input ) , adapted from Yu et al . ( 2011 ) 1The two environments are constructed such that the colour signal is computed by flipping the corrupted label with probability 0.1 and 0.2 respectively . Thus , collapsing the two environments into one means that we can at best achieve an accuracy of 0.85 on the training set by exploiting the colour signal , versus the maximal accuracy of 0.75 by exploiting the digit . We also include results for the following methods for reference ( these methods require access to information that the baselines do not require ) : • Importance-weighted ERM , with optimal weights ( requires knowledge of the test distribution ; optimal importance weights derived in Appendix B ) • IRM ( needs access to additional environment metadata ) Implementation details can be found in Appendix A . | This paper proposes an approach of training an ensemble of DNN classifiers while also minimizing the total correlation (TC) between the last layers (learned feature representations) of the classifiers to increase robustness to spurious correlations. To compute gradients for this new TC regularization term, they use the InfoNCE objective as a proxy, and minimize this, and then use alternating minimization to learn the parameters. The authors then test this on a variation of the Colored MNIST task, showing gains over baseline approaches. | SP:956a4740077d285cf5d544664a99ebd3338400aa |
Learning a Non-Redundant Collection of Classifiers | 1 INTRODUCTION . The Empirical Risk Minimization ( ERM ) principle ( Vapnik , 2013 ) , which underpins many machine learning models , is built on the assumption that training and testing samples are drawn i.i.d . from some hypothetical distribution . It has been demonstrated that certain violations of this assumption ( in conjunction with potential misalignments between the formulation of the learning objectives and the underlying task of interest ) lead to models that exploit spurious or brittle correlations in the training data . Examples include learning to exploit image backgrounds instead of objects in the foreground due to data biases ( such as using grassy backgrounds to predict the presence of cows ( Beery et al. , 2018 ) ) , using textural as opposed to shape information to classify objects ( Geirhos et al. , 2018 ) , and using signals not robust to small adversarial perturbations ( Ilyas et al. , 2019 ) . Implicit in work that attempts to address these phenomena is the assumption that more robust predictive signals are indeed present in the training data , even if for various reasons current models do not have the tendency to leverage them . In this work , drawing inspiration from Quality-Diversity algorithms ( Pugh et al. , 2016 ) – which seek to construct a collection of high-performing , diverse solutions to a task – we aim to learn a collection of models , each incentivized to find a distinct , high-performing solution to a given supervised learning problem from a fixed training set . Informally , our motivation is that a sufficiently large collection of such distinct models would exploit robust signals present in the training data in addition to the brittle signals that current models tend to exploit . Thus , given the representations computed by such a collection , it may be possible to rapidly adapt to test-time shifts in distribution that destroy the predictive power of brittle features . Addressing this problem hinges on defining and enforcing an appropriate measure of model diversity . To this end , we make the following contributions : • We propose and motivate a novel measure of model diversity based on conditional total correlation ( across models ) of final layer representations given the label . Informally , this incentivizes models to each learn a non-redundant ( in an information-theoretic sense ) way to solve the given task . • We estimate this measure using a proxy variational estimator computed using samples from the conditional joint and marginal distributions of final layer representations across models . We train a collection of models to be accordingly diverse , alternating between training a variational critic to maximize the variational estimator and minimizing a weighted sum of the classification losses across models and the variational estimator . • We empirically validate this framework by training on datasets with synthetically injected spurious correlations . We demonstrate that our framework is able to learn a collection of representations which , under a linear fine-tuning protocol , are competitive with baselines in being able to rapidly adapt to a shift in distribution which destroys the spurious correlations . We show that our framework performs favourably relative to baselines in being able to isolate distinct predictive signals in different models in the collection , as a result being able to make accurate test-time predictions without fine-tuning . We also compare our approach to the Invariant Risk Minimization ( Arjovsky et al. , 2019 ) framework which leverages information from multiple training environments to identify signals robust to variations across environments . We show that our approach is able to exploit the robust signals without requiring the metadata needed by IRM to discriminate between spurious and robust signals . 2 TOTAL CORRELATION . Total correlation ( Watanabe , 1960 ) is a multivariate extension of mutual information . The total correlation for n random variables X1 , ... , Xn is given by ( where KL denotes the Kullback-Leibler divergence ) : TC ( X1 , ... , Xn ) : = KL [ p ( X1 , ... , Xn ) ‖ n∏ i=1 p ( Xi ) ] ( 1 ) For n = 2 this is equivalent to mutual information . We can interpret this as a measure of the amount of redundancy across the Xi ’ s . A total correlation of zero corresponds to the Xi ’ s being mutually independent . Given a classification problem predicting label Y from X , we consider the conditional total correlation of a collection of vector-valued representations h1 ( X ) , ... , hn ( X ) given Y for differentiable functions hi , defined as : TC ( h1 ( X ) , ... , hn ( X ) |Y ) : = EY [ KL [ p ( h1 ( X ) , ... , hn ( X ) |Y ) ‖ n∏ i=1 p ( hi ( X ) |Y ) ] ] ( 2 ) where X is drawn from the conditional distribution given Y . 3 METHOD . Consider a collection of differentiable representation function and linear classifier pairs { ( hi , ci ) } i∈ { 1 , ... , n } where we denote the vector of parameters of all these functions as θ ∈ Rm , such that for a classification problem predicting Y from X , we compute logits ci ◦ hi ( X ) . That is , the hi computes a vector-valued representation of the input X , and ci transforms this into a scalar classification prediction . We target the following optimization problem : min θ n∑ i=1 EX , Y [ l ( ci ◦ hi ( X ) , Y ) ] subject to TC ( h1 ( X ) , ... , hn ( X ) |Y ) < ( 3 ) for some > 0 , where l is some loss function . That is , we seek to minimize the risk for each model while keeping the conditional total correlation of final layer representations given the label below some threshold . We justify the choice of conditional total correlation in place of the unconditional version by appealing to the following argument : if we consider the case where the collection consists of just two models , total correlation is equivalent to mutual information . Minimizing mutual information between the two representations is equivalent to enforcing independence . However , it is not possible for the representations to be independent while requiring that both are sufficient to accurately predict the label . On the other hand , provided that the representations are not dependent due to some common cause , they will be conditionally independent given the label . Thus , minimizing the conditional total correlation should provide a more useful learning signal . In practice , we attempt to solve the following unconstrained problem in place of ( 3 ) : min θ n∑ i=1 EX , Y [ l ( ci ◦ hi ( X ) , Y ) ] + βTC ( h1 ( X ) , ... , hn ( X ) |Y ) ( 4 ) where β > 0 is a hyperparameter and we estimate the risk using the empirical risk ( i.e . sample mean ) . 3.1 TOTAL CORRELATION ESTIMATION . In initial experiments with the two-model case ( i.e . where total correlation is equivalent to mutual information ) , the InfoNCE objective of Oord et al . ( 2018 ) , shown to compute a lower bound of the mutual information ( Poole et al. , 2019 ) , proved effective in computing useful gradient estimates for the latter term in ( 4 ) . Consequently , we choose to construct a proxy estimator for the total correlation based on InfoNCE . The InfoNCE objective for random variables U and V is given by : INCE : = 1 K K∑ i=1 log ef ( ui , vi ) 1 K ∑K j=1 e f ( ui , vj ) ( 5 ) where ( ui , vi ) are sampled from the joint distribution of U and V , K is the batch size , and f is a differentiable , scalar-valued function , commonly referred to as a ‘ critic ’ ( Poole et al. , 2019 ) . The parameters of f are optimized to maximize INCE . By analogy , our proposed estimator T̂C ( X1 , ... , XN ) is given by : T̂C ( X1 , ... , XN ) : = 1 K K∑ i=1 log ef ( xi1 , ... , xin ) 1 M ∑M j=1 e f ( xπ1 , j1 , ... , xπn , jn ) ( 6 ) where ( xi1 , ... , xin ) are sampled from the joint distribution of X1 , ... , Xn , K is the batch size , πk , j ∼ Uniform ( { 1 , ... K } ) is a random index of the batch dimension , M is a hyperparameter , and f is a critic . The permuted πk , j indices are intended to yield ( xπ1 , j1 , ... , xπn , jn ) samples drawn approximately from the marginals , derived from the observations in the batch . Similarly we optimize the parameters of f to maximize T̂C ( X1 , ... , XN ) . We interpret ( 6 ) as a ratio of scores between samples from the joint distribution of the Xi ’ s and samples approximately drawn from the marginals , such that a solution to the variational objective resulting in a large ratio corresponds to being able to easily discriminate between samples from the joint and marginals ( i.e . a proxy for large total correlation ) and conversely when the ratio is small . We compute the conditional case as follows : T̂C ( X1 , ... , XN |Y ) : = EY [ 1 K K∑ i=1 log ef ( xi1 , ... , xin ) 1 M ∑M j=1 e f ( xπ1 , j1 , ... , xπn , jn ) ] ( 7 ) where ( xi1 , ... , xin ) are sampled from the conditional joint distribution of X1 , ... , Xn given Y . We perform the conditioning step by splitting a batch by label , separately computing the estimator for each group , and finally computing a weighted average . The weights are estimated using the frequencies of each label in the batch . 3.2 MINIMAX TRAINING OBJECTIVE . We replace the latter term in ( 4 ) with our variational estimator to obtain : min θ n∑ i=1 EX , Y [ l ( ci ◦ hi ( X ) , Y ) ] + βmax φ T̂C ( h1 ( X ) , ... , hn ( X ) |Y ) ( 8 ) where φ are the parameters of the variational critic f , and β > 0 is a hyperparameter . In practice , we use gradient-based methods to approximately optimize ( 8 ) by alternating between optimizing φ to maximize the variational estimator ( giving us a local total correlation estimate ) , and optimizing θ to minimize the sum of all terms ( for fixed φ ) . 4 EXPERIMENTS . The main hypothesis that we wish to test is that our method yields a collection of models that exploit and isolate distinct predictive signals in the training data . Our strategy for testing this hypothesis is to consider a training distribution with synthetically injected spurious correlations as well as a test distribution in which the spurious correlation has been destroyed . We then measure our collection of models ’ s ability to rapidly adapt to the new distribution given small amounts of data , relative to a number of baselines . The spurious correlations are constructed such that they are easier to exploit than the robust signals . The central challenge in testing our main hypothesis is in constructing a reliable method for measuring the extent to which distinct predictive signals have been extracted and isolated in the outputs of trained models . Our evaluation protocol which requires access to a small amount of data from a shifted distribution to construct a model selection strategy emerges from a lack of alternatives . It precludes the use of various real-world benchmarks known or hypothesized to exhibit a variety of predictive signals , spurious or otherwise : we simply do not currently have access to appropriate test sets . Looking to the related problem of domain generalization for alternate evaluation protocols / model selection strategies , we find approaches either similarly based on oracle test sets or using held-out training domains ( Gulrajani & Lopez-Paz , 2020 ) . Here , we deliberately consider a problem setting which does not assume access to training data from multiple distinct but related domains , so we can not use model selection strategies based on the latter . Indeed , the underlying motivation for the problem setting we consider is that perhaps we can get away with very little additional information in order to isolate distinct predictive signals in a training set . A central priority for future work is to explore the possibility of model selection strategies that do not require access to data from a shifted evaluation distribution . In this paper , we focus on empirical evaluation of our approach relative to baselines under our proposed fast adaptation evaluation protocols . We consider variations on the Colored MNIST ( C-MNIST ) task of Arjovsky et al . ( 2019 ) . This task consists of classifying MNIST digits into one of two classes ( 0-4 or 5-9 ) . However , the true label is flipped with probability 0.25 and an additional binary signal ( colour ) is constructed from this corrupted label such that it is more strongly correlated with the corrupted label than the digit . As demonstrated in Arjovsky et al . ( 2019 ) , a model trained with ERM will overwhelmingly tend to exploit the colour information . In Arjovsky et al . ( 2019 ) , the goal was to demonstrate an ability to learn to exploit the digit information given the task of identifying a stable signal across environments with varying colour-label correlation . To test our framework , we assume no such access to multiple environments , and collapse the two training environments in the C-MNIST benchmark task of Arjovsky et al . ( 2019 ) into one training set.1 The results for this task are collected in Table 1 . We also consider a modified dataset which introduces an obstacle to extracting mutually exclusive representations of digit and colour . Specifically , we use functions of a new binary ‘ common cause ’ variable to both rotate the digits and perturb the colour signal , such that minimizing total correlation will depend on an ability to discard the common information . This is to test our framework ’ s ability to still extract the predictive signals in the presence of such an obstacle to minimizing conditional total correlation . We refer to this dataset as Rotated Colored MNIST ( RC-MNIST ) . The results for this task are collected in Table 2 . We consider a third variation in which more than two predictive signals are present in the training data . Specifically , we construct another binary ‘ colour ’ signal from the corrupted label and add it to the input such that new signal can be exploited on the training set for a maximal accuracy of 0.75 . We refer to this dataset as Two-Colored MNIST ( TC-MNIST ) . The results for this task are collected in Table 3 . We similarly construct the same three benchmarks using the Fashion-MNIST dataset ( Xiao et al. , 2017 ) . We consider the following baselines : • Single ERM classifier • Single ERM classifier with DeCov ( Cogswell et al. , 2015 ) regularization . We use this to penalize large non-diagonal entries of the covariance matrix of the output of the representation function • Single ERM classifier with Mutual Angles ( MA ) ( Xie et al. , 2015 ) regularization . We use this to penalize the mean angle between weight vectors corresponding to the output units of the representation function , minus the variance of the angles • Single ERM classifier with a Uniform Eigenvalue Regularizer ( UER ) ( Xie et al. , 2017 ) . We use this to encourage the weight matrix computing the output of the representation function to have uniform eigenvalues • Ensemble of ERM classifiers • Collection of ERM classifiers trained to maximize pairwise cosine distances between final layer representations ( for a given input ) , adapted from Yu et al . ( 2011 ) 1The two environments are constructed such that the colour signal is computed by flipping the corrupted label with probability 0.1 and 0.2 respectively . Thus , collapsing the two environments into one means that we can at best achieve an accuracy of 0.85 on the training set by exploiting the colour signal , versus the maximal accuracy of 0.75 by exploiting the digit . We also include results for the following methods for reference ( these methods require access to information that the baselines do not require ) : • Importance-weighted ERM , with optimal weights ( requires knowledge of the test distribution ; optimal importance weights derived in Appendix B ) • IRM ( needs access to additional environment metadata ) Implementation details can be found in Appendix A . | This paper proposes a method for training an ensemble of classifiers for problems where spurious correlations may be present. The models in the ensemble are encouraged to learn conditionally disentangled representations. It is suggested that this disentanglement will result in the spurious correlations being consigned to a subset of the models in the ensemble. The ensemble will then be ready to quickly adapt to a new data distribution without the spurious correlations, via selection of a single model that does not depend on the spurious correlations, or via reweighting of model outputs. | SP:956a4740077d285cf5d544664a99ebd3338400aa |
Ensemble-based Adversarial Defense Using Diversified Distance Mapping | We propose an ensemble-based defense against adversarial examples using distance map layers ( DMLs ) . Similar to fully connected layers , DMLs can be used to output logits for a multi-class classification model . We show in this paper how DMLs can be deployed to prevent transferability of attacks across ensemble members by adapting pairwise ( almost ) orthogonal covariance matrices . We also illustrate how DMLs provide an efficient way to regularize the Lipschitz constant of the ensemble ’ s member models , which further boosts the resulting robustness . Through empirical evaluations across multiple datasets and attack models , we demonstrate that the ensembles based on DMLs can achieve high benign accuracy while exhibiting robustness against adversarial attacks using multiple white-box techniques along with AutoAttack . 1 Introduction . Ongoing research has provided defenses against adversarial examples , which are crafted from correctly classified inputs with imperceptible perturbations . Despite the success of ensemble learning as a mechanism for reducing prediction errors and improving generalization by combining predictions of multiple models performing the same task ( Russakovsky et al. , 2015 ; Sagi & Rokach ) , early research has shown the ineffectiveness of mutiple ensemble-based defenses against adversarial examples and even has gone further to suggest that ensembles are only as robust as their weak components ( He et al. , 2017 ) . If this claim is true , it basically defeats the purpose of using an ensemble , which is building a strong model out of weaker ones . Nevertheless , research continued to investigate the usage of ensembles as a defense mechanism ( Pang et al. , 2019 ; Verma & Swami ; Sen et al. ) . However , recent attempts have been quickly shown ineffective ( Tramèr et al . ; Croce & Hein , 2020 ) . We believe that one of the primary reasons for the weakness of ensemble defenses is the inter-model attack transferability . It was shown that even fundamentally different models could exhibit high attack transferability rate ( Papernot et al. , 2017 ; Kurakin et al. , 2018 ) . This phenomenon hindered the consideration of ensemble learning as a strong defense mechanism on its own . The reason is that if the member models are not robust , and they exhibit high attack transferability rate , attacks generated from one model can attack the rest , and hence , attack the entire ensemble . In this work , we show that it is possible to circumvent the problem above and instill diversity among ensemble members via the employment of specially initialized and optimized distance-map-layers ( DMLs ) , and hence throttle the inter-model attack transferability . Moreover , we demonstrate that DMLs provide spontaneous regularization of the Lipschitz constant , and therefore further boost the robustness . The rest of this paper is organized as follows : We first discuss an overview of relevant recent works on ensemble defenses against adversarial examples and background information . Then we introduce a distance map layer based on Mahalanobis distance , and also explain the threat models considered in this work . We describe the creation of ensemble of DML-based individual models . Afterwards , we introduce a randomized version of DML . Finally , we evaluate the robustness of our ensemble model over MNIST , CIFAR-10 and RESISC-45 datasets . 2 Background and related work . Not long ago , researchers revealed the vulnerability of machine learning models , particularly deep neural networks ( DNNs ) , against adversarial examples ( Szegedy et al. , 2014 ) . These models can provide incorrect predictions on examples that are slightly perturbed from correctly classified ones . The process of generating adversarial examples from natural ones is called adversarial evasion attacks ( Biggio et al. ) . Evasion attacks can be categorized into black-box , gray-box , and white-box attacks . In the black-box setting , the attacker does not have access to the model ’ s parameters and the potential defense of the model ( Papernot et al. , 2017 ; Brendel et al. , 2018 ) . In the gray-box setting , although the attacker does not have access to the model ’ s parameter , it is aware of the defense applied in the model . In the white-box evasion , the attacker has access to both the parameters and the defense applied in the model . Therefore , the attacker can apply gradient-based attack techniques ( Goodfellow et al. , 2014 ; Carlini & Wagner , 2017 ; Madry et al. , 2018 ) , or it can even design a custom made adaptive attack based on its knowledge about the model and the defense ( Tramèr et al. ) . From the defense perspective , white-box attacks are certainly the most challenging type of evasion attacks . Our proposed defense targets white-box attacks . Specifically , we focus on ! ? restricted perturbations of images , and , as it is typical in many research works , we consider the ! ∞ perturbations . Since the discovery of adversarial attacks , a significant research activity has been devoted to developing appropriate defenses ( Madry et al. , 2018 ; Zhang et al. ) . However , most of the proposed defenses have been soon defeated ( Tramèr et al . ; Croce & Hein , 2020 ) . An intuitive mechanism to defend against adversarial examples is training ensembles of other models in order to enhance their defenses ( Pang et al. , 2019 ; Verma & Swami ; Sen et al. ) . However , the efficacy of existing ensemble approaches is often faced with skepticism due to the transferability phenomenon ( Papernot et al. , 2017 ) , which makes the ensemble model believed to be at most as robust as its strongest constituent model ( He et al. , 2017 ) . In this paper , we promote the diversity among individual networks from a new perspective via distance map layers . Our construction is based on the assumption that defending against transferred adversarial example is effective , even if the individual models are vulnerable to direct attacks . Our approach is orthogonal to the previous approaches and can be combined with other generic weak or strong defenses to further enhance the ensemble ’ s resistance to adversaries . Although there is no strict illustration on what is intuitively defined as diversity , in this work , we define the diversity as the highest dissimilarity between the learned features of different classes across the ensemble members . Diversity is greater when the prediction errors of individual members are highly uncorrelated ( Liu & Yao , 1999a ; b ; Dietterich , 2000 ; Liu et al. , 2019 ) . This property may lead an adversarial perturbation to fail to fool the majority of networks in the ensemble . Topologically , diversity can be depicted as the variability in the shapes of the decision boundaries and inter-class neighborhood relationships in the embedding space . Changing the shape of the decision boundaries in the embedding space implies different loss shapes . With diversity in the shape of the losses corresponding to different models , the gradient from one model would not be a good approximation ( transferable ) to the other model . Note that due to the high capacity of DNNs , changing the topology of the embedding space can have no or negligible effect on the model ’ s accuracy . Using this perspective on model diversity , we will illustrate that DML-based ensembles could be designed to achieve the requirement of diversity in prediction errors through injecting dissimilarities only between the DMLs of ensemble members . Previous works increase the diversity over training data via promoting the diversity of prediction errors of ensemble members ( Liu & Yao , 1999a ; b ; Liu et al. , 2019 ) . 3 Technical approach . In this section , we elaborate on our model with distance map layer ( DML ) . We start by recalling the definition of Mahalanobis distance between two point G1 , G2 ∈ '= : 3 '' ( G1 , G2 ) = √ ( G1 − G2 ) ) '' ( G1 − G2 ) , ( 1 ) where `` is the inverse of the covariance matrix ( referred to as the `` matrix for the rest of the paper ) , which is a positive semi-definite matrix . Lemma 1 . TheMahalanobis distance is : -Lipschitz continuouswith : = √ 2 ‖ % ‖2 , where '' = % ) % , and % is a triangular matrix . A proof for this lemma can be found in ( Zantedeschi et al. , 2016 ) . We now introduce a mapping function , based on the Mahalanobis distance , that can be used as a differentiable layer in a neural network . The function maps an input vector to an output vector by calculatingMahalanobis distances between the input and the learned centers of the function . Equation 2 shows the element of the output vector corresponding to center 2 for an input vector G. We call this function distance map layer ( DML ) . 3 '' ,2 ( G ) = √ ( G − 2 ) ) '' ( G − 2 ) . ( 2 ) In this formula , `` ∈ R # × # and 2 ∈ R # are the learnable parameters of the DML . When the DML is used as the penultimate layer of a classification neural network ( i.e . the layer producing logits ) , each center will correspond to one class . Essentially , the layer maps an input vector to a vector of distances to class centers . Note that , in this usage , the negative of the distances has to be used to maintain the typical assumption of DNNs that the highest logit corresponds to the most likely class . The classification loss function will encourage the absolute distance to the target class to be small while the distances to all other classes to be large , which induces compactness in the embedding space . This compactness has been used in prior work for classification problems ( Wan et al. , 2018 ) and for adversarial robustness of individual models ( Pang et al. , 2020 ) . Our setting is composed of combining a classification network with a DML ℎ to obtain a model characterized by ( G ) = ℎ ◦ ( G ) where ℎ : R '' → R '' and : R # → R '' . In other words , is used as a prior to map the input space to a representation space , and ℎ maps the representation space to distances from the corresponding class centers . In the next section , we demonstrate how a distribution shift that shows with respect to could be efficiently utilized to form a diverse ensemble of models . Before that , we want to highlight an important feature about DML . If the network is ! -Lipschitz continuous , and the DML ℎ is ! ℎ-Lipschitz continuous , then the network is Lipschitz continuous with constant upper-bounded by ! · ! ℎ . Thus , imposing small ! ℎ during the training process may lead to the regularization of Lipschitz constant for the network . It is shown in the appendix that this can also largely improve the certification bounds of network compared to the model . 3.1 Enhancing diversity between ensemble members . The main part of the proposed ensemble model is the deployment of DMLs . The ensemble members stacked with DMLs are trained interactively to achieve the highest level of diversity . In particular , a DML ensemble is trained to satisfy these properties : 1 ) the ensemble members have the highest accuracy over benign samples and diverse prediction errors over adversarial samples ; 2 ) the attacks generated on one ensemble member are not transferable to other ensemble members ; and 3 ) the training procedure maintains the Lipschitz constant of an ensemble member model small . The first objective is important as it indicates that the ensemble could provide high accuracy even with the low accuracy of the individual members . The second objective guarantees a well-performing ensemble model under evasion attacks . That is an adversarial example crafted on an individual ensemble member model would normally be misclassified in that individual member , but not necessarily in the other ensemblemembers . This goal can be achieved in two folds : 1 ) by randomly choosing the centers and shuffling them to vary over classifiers in the formulation of DML ; 2 ) by imposing the `` matrices to be dissimilar and possibly orthogonal between the ensemble members . Increasing the cosine dissimilarity of DML ’ s covariance matrices of ensemble members would lead to nontransferable adversarial perturbations ( Adam et al. , 2019 ) . One approach to reduce the transferability across several models is to enforce various geometric relationship like orthogonality between the inputoutput gradient of the models . For two distance map layers 5 and 6 with corresponding `` 5 and `` 6 inverse covariance matrices , we have shown in the appendix that the orthogonality of the '' matrices , i.e. , `` 5 `` 6 = 0 is a sufficient condition for the input-output gradients of 5 and 6 to be orthogonal . Note that the explored sufficient condition is independent of the input G. Roughly speaking , the increase in the dissimilarity of the `` matrices reduces the cosine similarity of input-output gradients of the combined network by the chain rule formula . Therefore , practically , minimizing the cosine similarity of the `` matrices across models enables reducing the rate of transferability of adversarial attacks across models in the ensemble . | This paper aims to improve the robustness of ensembles of neural networks to adversarial attacks. If the models in the ensemble are susceptible to similar attacks, then the ensemble is also vulnerable. This has been shown to be true in practice (He et al.). The authors propose appending distance map layers (DMLs) to the learned representations (i.e., in place of logits) of the member models. The DMLs measure distance to randomly initialized centers using a learned Mahalanobis distance metric. A fraction of the distance matrix, M, is learned such that member M's are approximately mutually orthogonal (thereby decorrelating predictions), and the entries have low L1-norm. The member models' top predictions for each sample are then aggregated by majority vote. The introduction of DMLs is shown to improve robustness to adversarial attacks without a large degradation in accuracy on benign samples. Randomizing the distance metric a bit helps with robustness as expected but hurts benign accuracy also as expected. | SP:85d86e241a772c7b195fbc189ab6df0c67872ceb |
Ensemble-based Adversarial Defense Using Diversified Distance Mapping | We propose an ensemble-based defense against adversarial examples using distance map layers ( DMLs ) . Similar to fully connected layers , DMLs can be used to output logits for a multi-class classification model . We show in this paper how DMLs can be deployed to prevent transferability of attacks across ensemble members by adapting pairwise ( almost ) orthogonal covariance matrices . We also illustrate how DMLs provide an efficient way to regularize the Lipschitz constant of the ensemble ’ s member models , which further boosts the resulting robustness . Through empirical evaluations across multiple datasets and attack models , we demonstrate that the ensembles based on DMLs can achieve high benign accuracy while exhibiting robustness against adversarial attacks using multiple white-box techniques along with AutoAttack . 1 Introduction . Ongoing research has provided defenses against adversarial examples , which are crafted from correctly classified inputs with imperceptible perturbations . Despite the success of ensemble learning as a mechanism for reducing prediction errors and improving generalization by combining predictions of multiple models performing the same task ( Russakovsky et al. , 2015 ; Sagi & Rokach ) , early research has shown the ineffectiveness of mutiple ensemble-based defenses against adversarial examples and even has gone further to suggest that ensembles are only as robust as their weak components ( He et al. , 2017 ) . If this claim is true , it basically defeats the purpose of using an ensemble , which is building a strong model out of weaker ones . Nevertheless , research continued to investigate the usage of ensembles as a defense mechanism ( Pang et al. , 2019 ; Verma & Swami ; Sen et al. ) . However , recent attempts have been quickly shown ineffective ( Tramèr et al . ; Croce & Hein , 2020 ) . We believe that one of the primary reasons for the weakness of ensemble defenses is the inter-model attack transferability . It was shown that even fundamentally different models could exhibit high attack transferability rate ( Papernot et al. , 2017 ; Kurakin et al. , 2018 ) . This phenomenon hindered the consideration of ensemble learning as a strong defense mechanism on its own . The reason is that if the member models are not robust , and they exhibit high attack transferability rate , attacks generated from one model can attack the rest , and hence , attack the entire ensemble . In this work , we show that it is possible to circumvent the problem above and instill diversity among ensemble members via the employment of specially initialized and optimized distance-map-layers ( DMLs ) , and hence throttle the inter-model attack transferability . Moreover , we demonstrate that DMLs provide spontaneous regularization of the Lipschitz constant , and therefore further boost the robustness . The rest of this paper is organized as follows : We first discuss an overview of relevant recent works on ensemble defenses against adversarial examples and background information . Then we introduce a distance map layer based on Mahalanobis distance , and also explain the threat models considered in this work . We describe the creation of ensemble of DML-based individual models . Afterwards , we introduce a randomized version of DML . Finally , we evaluate the robustness of our ensemble model over MNIST , CIFAR-10 and RESISC-45 datasets . 2 Background and related work . Not long ago , researchers revealed the vulnerability of machine learning models , particularly deep neural networks ( DNNs ) , against adversarial examples ( Szegedy et al. , 2014 ) . These models can provide incorrect predictions on examples that are slightly perturbed from correctly classified ones . The process of generating adversarial examples from natural ones is called adversarial evasion attacks ( Biggio et al. ) . Evasion attacks can be categorized into black-box , gray-box , and white-box attacks . In the black-box setting , the attacker does not have access to the model ’ s parameters and the potential defense of the model ( Papernot et al. , 2017 ; Brendel et al. , 2018 ) . In the gray-box setting , although the attacker does not have access to the model ’ s parameter , it is aware of the defense applied in the model . In the white-box evasion , the attacker has access to both the parameters and the defense applied in the model . Therefore , the attacker can apply gradient-based attack techniques ( Goodfellow et al. , 2014 ; Carlini & Wagner , 2017 ; Madry et al. , 2018 ) , or it can even design a custom made adaptive attack based on its knowledge about the model and the defense ( Tramèr et al. ) . From the defense perspective , white-box attacks are certainly the most challenging type of evasion attacks . Our proposed defense targets white-box attacks . Specifically , we focus on ! ? restricted perturbations of images , and , as it is typical in many research works , we consider the ! ∞ perturbations . Since the discovery of adversarial attacks , a significant research activity has been devoted to developing appropriate defenses ( Madry et al. , 2018 ; Zhang et al. ) . However , most of the proposed defenses have been soon defeated ( Tramèr et al . ; Croce & Hein , 2020 ) . An intuitive mechanism to defend against adversarial examples is training ensembles of other models in order to enhance their defenses ( Pang et al. , 2019 ; Verma & Swami ; Sen et al. ) . However , the efficacy of existing ensemble approaches is often faced with skepticism due to the transferability phenomenon ( Papernot et al. , 2017 ) , which makes the ensemble model believed to be at most as robust as its strongest constituent model ( He et al. , 2017 ) . In this paper , we promote the diversity among individual networks from a new perspective via distance map layers . Our construction is based on the assumption that defending against transferred adversarial example is effective , even if the individual models are vulnerable to direct attacks . Our approach is orthogonal to the previous approaches and can be combined with other generic weak or strong defenses to further enhance the ensemble ’ s resistance to adversaries . Although there is no strict illustration on what is intuitively defined as diversity , in this work , we define the diversity as the highest dissimilarity between the learned features of different classes across the ensemble members . Diversity is greater when the prediction errors of individual members are highly uncorrelated ( Liu & Yao , 1999a ; b ; Dietterich , 2000 ; Liu et al. , 2019 ) . This property may lead an adversarial perturbation to fail to fool the majority of networks in the ensemble . Topologically , diversity can be depicted as the variability in the shapes of the decision boundaries and inter-class neighborhood relationships in the embedding space . Changing the shape of the decision boundaries in the embedding space implies different loss shapes . With diversity in the shape of the losses corresponding to different models , the gradient from one model would not be a good approximation ( transferable ) to the other model . Note that due to the high capacity of DNNs , changing the topology of the embedding space can have no or negligible effect on the model ’ s accuracy . Using this perspective on model diversity , we will illustrate that DML-based ensembles could be designed to achieve the requirement of diversity in prediction errors through injecting dissimilarities only between the DMLs of ensemble members . Previous works increase the diversity over training data via promoting the diversity of prediction errors of ensemble members ( Liu & Yao , 1999a ; b ; Liu et al. , 2019 ) . 3 Technical approach . In this section , we elaborate on our model with distance map layer ( DML ) . We start by recalling the definition of Mahalanobis distance between two point G1 , G2 ∈ '= : 3 '' ( G1 , G2 ) = √ ( G1 − G2 ) ) '' ( G1 − G2 ) , ( 1 ) where `` is the inverse of the covariance matrix ( referred to as the `` matrix for the rest of the paper ) , which is a positive semi-definite matrix . Lemma 1 . TheMahalanobis distance is : -Lipschitz continuouswith : = √ 2 ‖ % ‖2 , where '' = % ) % , and % is a triangular matrix . A proof for this lemma can be found in ( Zantedeschi et al. , 2016 ) . We now introduce a mapping function , based on the Mahalanobis distance , that can be used as a differentiable layer in a neural network . The function maps an input vector to an output vector by calculatingMahalanobis distances between the input and the learned centers of the function . Equation 2 shows the element of the output vector corresponding to center 2 for an input vector G. We call this function distance map layer ( DML ) . 3 '' ,2 ( G ) = √ ( G − 2 ) ) '' ( G − 2 ) . ( 2 ) In this formula , `` ∈ R # × # and 2 ∈ R # are the learnable parameters of the DML . When the DML is used as the penultimate layer of a classification neural network ( i.e . the layer producing logits ) , each center will correspond to one class . Essentially , the layer maps an input vector to a vector of distances to class centers . Note that , in this usage , the negative of the distances has to be used to maintain the typical assumption of DNNs that the highest logit corresponds to the most likely class . The classification loss function will encourage the absolute distance to the target class to be small while the distances to all other classes to be large , which induces compactness in the embedding space . This compactness has been used in prior work for classification problems ( Wan et al. , 2018 ) and for adversarial robustness of individual models ( Pang et al. , 2020 ) . Our setting is composed of combining a classification network with a DML ℎ to obtain a model characterized by ( G ) = ℎ ◦ ( G ) where ℎ : R '' → R '' and : R # → R '' . In other words , is used as a prior to map the input space to a representation space , and ℎ maps the representation space to distances from the corresponding class centers . In the next section , we demonstrate how a distribution shift that shows with respect to could be efficiently utilized to form a diverse ensemble of models . Before that , we want to highlight an important feature about DML . If the network is ! -Lipschitz continuous , and the DML ℎ is ! ℎ-Lipschitz continuous , then the network is Lipschitz continuous with constant upper-bounded by ! · ! ℎ . Thus , imposing small ! ℎ during the training process may lead to the regularization of Lipschitz constant for the network . It is shown in the appendix that this can also largely improve the certification bounds of network compared to the model . 3.1 Enhancing diversity between ensemble members . The main part of the proposed ensemble model is the deployment of DMLs . The ensemble members stacked with DMLs are trained interactively to achieve the highest level of diversity . In particular , a DML ensemble is trained to satisfy these properties : 1 ) the ensemble members have the highest accuracy over benign samples and diverse prediction errors over adversarial samples ; 2 ) the attacks generated on one ensemble member are not transferable to other ensemble members ; and 3 ) the training procedure maintains the Lipschitz constant of an ensemble member model small . The first objective is important as it indicates that the ensemble could provide high accuracy even with the low accuracy of the individual members . The second objective guarantees a well-performing ensemble model under evasion attacks . That is an adversarial example crafted on an individual ensemble member model would normally be misclassified in that individual member , but not necessarily in the other ensemblemembers . This goal can be achieved in two folds : 1 ) by randomly choosing the centers and shuffling them to vary over classifiers in the formulation of DML ; 2 ) by imposing the `` matrices to be dissimilar and possibly orthogonal between the ensemble members . Increasing the cosine dissimilarity of DML ’ s covariance matrices of ensemble members would lead to nontransferable adversarial perturbations ( Adam et al. , 2019 ) . One approach to reduce the transferability across several models is to enforce various geometric relationship like orthogonality between the inputoutput gradient of the models . For two distance map layers 5 and 6 with corresponding `` 5 and `` 6 inverse covariance matrices , we have shown in the appendix that the orthogonality of the '' matrices , i.e. , `` 5 `` 6 = 0 is a sufficient condition for the input-output gradients of 5 and 6 to be orthogonal . Note that the explored sufficient condition is independent of the input G. Roughly speaking , the increase in the dissimilarity of the `` matrices reduces the cosine similarity of input-output gradients of the combined network by the chain rule formula . Therefore , practically , minimizing the cosine similarity of the `` matrices across models enables reducing the rate of transferability of adversarial attacks across models in the ensemble . | This paper concerns on developing neural network ensembles that can avoid adversarial attacks. The authors propose a new concept of Distance Map Layers (DML) that can be used as the one just before the final layer in a neural network for classification. DML is mainly used to improve the diversity of predictions from the ensemble members, and is defined to be the Mahalanobis distance between an input vector and a output center which may correspond to a class. Each member in the ensemble will learn a different Mahalanobis measure, encoded in the inverse covariance matrix (M), as well as the centers. The training tries to ensure that any two different ensemble members should have inverse covariance matrices of small $L_1$ norms and pair-wise orthogonality, and their set of centers should be far from each other. The authors further propose a randomized DML in which a noise is added to M to help the ensemble to be more robust. To validate the effectiveness of their approach, 3 datasets, 3 network architectures, and 5 adversarial attacks are used in evaluation. Their extensive experiments demonstrate that the DML-based ensemble can perform significantly better than the one without DML, and the randomized DML can perform much better than DML. | SP:85d86e241a772c7b195fbc189ab6df0c67872ceb |
Offline Meta Learning of Exploration | 1 INTRODUCTION . A central question in reinforcement learning ( RL ) is how to learn quickly ( i.e. , with few samples ) in a new environment . Meta-RL addresses this issue by assuming a distribution over possible environments , and having access to a large set of environments from this distribution during training ( Duan et al. , 2016 ; Finn et al. , 2017 ) . Intuitively , the meta-RL agent can learn regularities in the environments , which allow quick learning in any environment that shares a similar structure . Indeed , recent work demonstrated this by training memory-based controllers that can ‘ identify ’ the domain ( Duan et al. , 2016 ; Rakelly et al. , 2019 ; Humplik et al. , 2019 ) , or by learning a parameter initialization that can lead to good performance with only a few gradient updates ( Finn et al. , 2017 ) . Another approach to quick RL is Bayesian RL ( Ghavamzadeh et al. , 2016 , BRL ) . In BRL , the environment parameters are treated as unobserved variables , with a known prior distribution . Consequentially , the standard problem of maximizing expected returns ( taken with respect to the posterior distribution ) explicitly accounts for the environment uncertainty , and its solution is a Bayes-optimal policy , wherein actions optimally balance exploration and exploitation . Recently , Zintgraf et al . ( 2020 ) showed that meta-RL is in fact an instance of BRL , where the meta-RL environment distribution is simply the BRL prior . Furthermore , a Bayes-optimal policy can be trained using standard policy gradient methods , simply by adding to the state the posterior belief over the environment parameters . The VariBAD algorithm ( Zintgraf et al. , 2020 ) is an implementation of this approach that uses a variational autoencoder ( VAE ) for parameter estimation and deep neural network policies . Most meta-RL studies , including VariBAD , have focused on the online setting , where , during training , the meta-RL policy is continually updated using data collected from running it in the training environments . In domains where data collection is expensive , such as robotics and healthcare to name a few , online training is a limiting factor . For standard RL , offline ( a.k.a . batch ) RL mitigates this problem by learning from data collected beforehand by an arbitrary policy ( Ernst et al. , 2005 ; Levine et al. , 2020 ) . In this work we investigate the offline approach to meta-RL ( OMRL ) . It is well known that any offline RL approach is heavily influenced by the data collection policy . To ground our investigation , we focus on the following practical setting : we assume that data has been collected by running standard RL agents on a set of environments from the environment distribution . Importantly - we do not allow any modification to the RL algorithms used for data collection , and the meta-RL learner must make use of data that was not specifically collected for the meta-RL task . Nevertheless , we hypothesize that regularities between the training domains can still be learned , to provide faster learning in new environments . Figure 1 illustrates our problem : in this navigation task , each RL agent in the data learned to find its own goal , and converged to a behavior that quickly navigates toward it . The meta-RL agent , on the other hand , needs to learn a completely different behavior that effectively searches for the unknown goal position . Our key idea to solving OMRL is an off-policy variant of the VariBAD algorithm , based on replacing the on-policy policy gradient optimization in VariBAD with an off-policy Q-learning based method . This , however , requires some care , as Q-learning applies to states of fully observed systems . We show that the VariBAD approach of augmenting states with the belief in the data applies to the off-policy setting as well , leading to an effective algorithm we term Off-Policy VariBAD . The offline setting , however , brings about another challenge – when the agent visits different parts of the state space in different environments , it becomes challenging to obtain an accurate belief estimate , a problem we term MDP ambiguity . When the ambiguity is due to differences in the reward between the environments , we propose a simple solution , based on a reward relabelling trick that significantly improves the performance of the VariBAD VAE trained on offline data . Our experimental results show that our method can learn effective exploration policies from offline data on both discrete and continuous control problems . Our main contributions are as follows . To our knowledge , this is the first study of meta learning exploration in the offline setting . We provide the necessary theory to extend VariBAD to offpolicy RL . We show that a key difficulty in OMRL is MDP ambiguity , and propose an effective solution for the case where tasks differ in their rewards . We show non-trivial empirical results that demonstrate significantly better exploration than meta-RL methods based on Thompson sampling such as PEARL ( Rakelly et al. , 2019 ) , even when these methods are allowed to train online . Finally , our method can also be applied in the online setting , and demonstrates significantly improved sample efficiency compared to conventional VariBAD . 2 BACKGROUND . Our work leverages ideas from meta-RL , BRL and the VariBAD algorithm , as we now recapitulate . Meta-RL : In meta-RL , a distribution over tasks is assumed . A task Ti is described by a Markov Decision Process ( MDP , Bertsekas , 1995 ) Mi = ( S , A , Ri , Pi ) , where the state space S and the action spaceA are shared across tasks , andRi and Pi are task specific reward and transition functions . Thus , we write the task distribution as p ( R , P ) . For simplicity , we assume throughout that the initial state distribution Pinit ( s0 ) is the same for all MDPs . The goal in meta-RL is to train an agent that can quickly maximize reward in new , unseen tasks , drawn from p ( R , P ) . To do so , the agent must leverage any shared structure among tasks , which can typically be learned from a set of training tasks . Bayesian Reinforcement Learning : The goal in BRL is to find the optimal policy π in an MDP , when the transitions and rewards are not known in advance . Similar to meta-RL , we assume a prior over the MDP parameters p ( R , P ) , and seek to maximize the expected discounted return , Eπ [ ∞∑ t=0 γtr ( st , at ) ] , ( 1 ) where the expectation is taken with respect to both the uncertainty in state-action transitions st+1 ∼ P ( ·|st , at ) , at ∼ π , and the uncertainty in the MDP parameters R , P ∼ p ( R , P ) .1 A key observation is that this formulation naturally accounts for the exploration/exploitation tradeoff – an optimal agent must plan its actions to reduce uncertainty in the MDP parameters , if such leads to higher rewards . One way to approach the BRL problem is to modelR , P as unobserved state variables in a partially observed MDP ( POMDP , Cassandra et al. , 1994 ) , reducing the problem to solving a particular POMDP instance where the unobserved variables can not change in time ( P andR are assumed to be stationary ) . The belief at time t , bt , denotes the posterior probability overR , P given the history of state transitions and rewards observed until this time bt = P ( R , P|h : t ) , where h : t = { s0 , a0 , r1 , s1 . . . , rt , st } ( note that we denote the reward after observing the state and action at time t as rt+1 = r ( st , at ) ) . The belief can be updated iteratively according to Bayes rule , where b0 ( R , P ) = p ( R , P ) , and : bt+1 ( R , P ) = P ( R , P|h : t+1 ) ∝ P ( st+1 , rt+1|h : t , R , P ) bt ( R , P ) . Similar to the idea of solving a POMDP by representing it as an MDP over belief states ( Cassandra et al. , 1994 ) , the state in BRL can be augmented with the belief to result in the Bayes-Adaptive MDP ( BAMDP ) model ( Duff & Barto , 2002 ) . Denote the augmented state s+t = ( st , bt ) and the augmented state space S+ = S×B , where B denotes the belief space . The transitions in the BAMDP are given by : P+ ( s+t+1|s + t , at ) = Ebt [ P ( st+1|st , at ) ] δ ( bt+1 = P ( R , P|h : t+1 ) ) , and the reward in the BAMDP is the expected reward with respect to the belief : R+ ( s+t , at ) = Ebt [ R ( st , at ) ] . The Bayes-optimal agent seeks to maximize the expected discounted return in the BAMDP , and the optimal solution of the BAMDP gives the optimal BRL policy . As in standard MDPs , the optimal action-value function in the BAMDP satisfies the Bellman equation : Q ( s+ , a ) = R+ ( s+ , a ) + γ ∑ s+ ′∈S+ P+ ( s+ ′ |s+ , a ) max a′ Q ( s+ ′ , a′ ) , ∀s+ ∈ S+ , a ∈ A . ( 2 ) Computing a Bayes-optimal agent amounts to solving the BAMDP , where the optimal policy is a function of the augmented state . However , for most problems this is intractable , as the augmented state space is continuous and high-dimensional , and the posterior update is also intractable in general . The VariBAD Algorithm : VariBAD ( Zintgraf et al. , 2020 ) approximates the Bayes-optimal solution by combining a model for the MDP parameter uncertainty , and an optimization method for the corresponding BAMDP . The MDP parameters are represented by a vector m ∈ Rd , corresponding to the latent variables in a parametric generative model for the statereward trajectory distribution conditioned on the actions P ( s0 , r1 , s1 . . . , rH , sH |a0 , . . . , aH−1 ) =∫ pθ ( m ) pθ ( s0 , r1 , s1 . . . , rH , sH |m , a0 , . . . , aH−1 ) dm . The model parameters θ are learned by a variational approximation to the maximum likelihood objective , where the variational approximation to the posterior P ( m|s0 , r1 , s1 . . . , rH , sH , a0 , . . . , aH−1 ) is chosen to have the structure qφ ( m|s0 , a0 , r1 , s1 . . . , rt , st ) = qφ ( m|h : t ) . That is , the approximate posterior is conditioned on the history up to time t. The evidence lower bound ( ELBO ) in this case is ELBOt = Em∼qφ ( ·|h : t ) [ log pθ ( s0 , r1 , s1 . . . , rH , sH |m , a0 , . . . , aH−1 ) ] −DKL ( qφ ( m|h : t ) ||pθ ( m ) ) . The main claim of Zintgraf et al . ( 2020 ) is that qφ ( m|h : t ) can be taken as an approximation of the belief bt . In practice , qφ ( m|h : t ) is represented as a Gaussian distribution q ( m|h : t ) = N ( µ ( h : t ) , Σ ( h : t ) ) , where µ and Σ are learned recurrent neural networks . To approximately solve the BAMDP , Zintgraf et al . ( 2020 ) exploit the fact that an optimal BAMDP policy is a function of the state and belief , and therefore consider neural network policies that take the augmented BAMDP state as input π ( at|st , qφ ( m|h : t ) ) , where the posterior is practically represented by the distribution parameters µ ( h : t ) , Σ ( h : t ) . To train such policies , Zintgraf et al . ( 2020 ) maximize the BRL objective , J ( π ) = ER , PEπ [ H∑ t=0 γtr ( st , at ) ] , ( 3 ) 1For ease of presentation , we consider the infinite horizon discounted return . Our formulation easily extends to the episodic and finite horizon settings . using policy gradient based methods . The expectation over MDP parameters in ( 3 ) is approximated by averaging over training environments , and the RL agent is trained online , alongside the VAE . | This submission studies the meta-learning problem in RL under offline settings. A new algorithm is proposed to address this problem by extending the recent VariBAD algorithm designed for online meta-RL. The key modifications to adapt the original VariBAD to offline settings are the state re-labelling and reward re-labelling tricks, which aim at addressing the MDP ambiguity specifically showing up in offline meta-RL. Experiments are conducted on four sparse reward tasks under both offline and online settings, comparing with PEARL (a recent online approach) and the original VariBAD respectively. | SP:c9bc6f77b7493e1cadb84f89759d5a89e61320de |
Offline Meta Learning of Exploration | 1 INTRODUCTION . A central question in reinforcement learning ( RL ) is how to learn quickly ( i.e. , with few samples ) in a new environment . Meta-RL addresses this issue by assuming a distribution over possible environments , and having access to a large set of environments from this distribution during training ( Duan et al. , 2016 ; Finn et al. , 2017 ) . Intuitively , the meta-RL agent can learn regularities in the environments , which allow quick learning in any environment that shares a similar structure . Indeed , recent work demonstrated this by training memory-based controllers that can ‘ identify ’ the domain ( Duan et al. , 2016 ; Rakelly et al. , 2019 ; Humplik et al. , 2019 ) , or by learning a parameter initialization that can lead to good performance with only a few gradient updates ( Finn et al. , 2017 ) . Another approach to quick RL is Bayesian RL ( Ghavamzadeh et al. , 2016 , BRL ) . In BRL , the environment parameters are treated as unobserved variables , with a known prior distribution . Consequentially , the standard problem of maximizing expected returns ( taken with respect to the posterior distribution ) explicitly accounts for the environment uncertainty , and its solution is a Bayes-optimal policy , wherein actions optimally balance exploration and exploitation . Recently , Zintgraf et al . ( 2020 ) showed that meta-RL is in fact an instance of BRL , where the meta-RL environment distribution is simply the BRL prior . Furthermore , a Bayes-optimal policy can be trained using standard policy gradient methods , simply by adding to the state the posterior belief over the environment parameters . The VariBAD algorithm ( Zintgraf et al. , 2020 ) is an implementation of this approach that uses a variational autoencoder ( VAE ) for parameter estimation and deep neural network policies . Most meta-RL studies , including VariBAD , have focused on the online setting , where , during training , the meta-RL policy is continually updated using data collected from running it in the training environments . In domains where data collection is expensive , such as robotics and healthcare to name a few , online training is a limiting factor . For standard RL , offline ( a.k.a . batch ) RL mitigates this problem by learning from data collected beforehand by an arbitrary policy ( Ernst et al. , 2005 ; Levine et al. , 2020 ) . In this work we investigate the offline approach to meta-RL ( OMRL ) . It is well known that any offline RL approach is heavily influenced by the data collection policy . To ground our investigation , we focus on the following practical setting : we assume that data has been collected by running standard RL agents on a set of environments from the environment distribution . Importantly - we do not allow any modification to the RL algorithms used for data collection , and the meta-RL learner must make use of data that was not specifically collected for the meta-RL task . Nevertheless , we hypothesize that regularities between the training domains can still be learned , to provide faster learning in new environments . Figure 1 illustrates our problem : in this navigation task , each RL agent in the data learned to find its own goal , and converged to a behavior that quickly navigates toward it . The meta-RL agent , on the other hand , needs to learn a completely different behavior that effectively searches for the unknown goal position . Our key idea to solving OMRL is an off-policy variant of the VariBAD algorithm , based on replacing the on-policy policy gradient optimization in VariBAD with an off-policy Q-learning based method . This , however , requires some care , as Q-learning applies to states of fully observed systems . We show that the VariBAD approach of augmenting states with the belief in the data applies to the off-policy setting as well , leading to an effective algorithm we term Off-Policy VariBAD . The offline setting , however , brings about another challenge – when the agent visits different parts of the state space in different environments , it becomes challenging to obtain an accurate belief estimate , a problem we term MDP ambiguity . When the ambiguity is due to differences in the reward between the environments , we propose a simple solution , based on a reward relabelling trick that significantly improves the performance of the VariBAD VAE trained on offline data . Our experimental results show that our method can learn effective exploration policies from offline data on both discrete and continuous control problems . Our main contributions are as follows . To our knowledge , this is the first study of meta learning exploration in the offline setting . We provide the necessary theory to extend VariBAD to offpolicy RL . We show that a key difficulty in OMRL is MDP ambiguity , and propose an effective solution for the case where tasks differ in their rewards . We show non-trivial empirical results that demonstrate significantly better exploration than meta-RL methods based on Thompson sampling such as PEARL ( Rakelly et al. , 2019 ) , even when these methods are allowed to train online . Finally , our method can also be applied in the online setting , and demonstrates significantly improved sample efficiency compared to conventional VariBAD . 2 BACKGROUND . Our work leverages ideas from meta-RL , BRL and the VariBAD algorithm , as we now recapitulate . Meta-RL : In meta-RL , a distribution over tasks is assumed . A task Ti is described by a Markov Decision Process ( MDP , Bertsekas , 1995 ) Mi = ( S , A , Ri , Pi ) , where the state space S and the action spaceA are shared across tasks , andRi and Pi are task specific reward and transition functions . Thus , we write the task distribution as p ( R , P ) . For simplicity , we assume throughout that the initial state distribution Pinit ( s0 ) is the same for all MDPs . The goal in meta-RL is to train an agent that can quickly maximize reward in new , unseen tasks , drawn from p ( R , P ) . To do so , the agent must leverage any shared structure among tasks , which can typically be learned from a set of training tasks . Bayesian Reinforcement Learning : The goal in BRL is to find the optimal policy π in an MDP , when the transitions and rewards are not known in advance . Similar to meta-RL , we assume a prior over the MDP parameters p ( R , P ) , and seek to maximize the expected discounted return , Eπ [ ∞∑ t=0 γtr ( st , at ) ] , ( 1 ) where the expectation is taken with respect to both the uncertainty in state-action transitions st+1 ∼ P ( ·|st , at ) , at ∼ π , and the uncertainty in the MDP parameters R , P ∼ p ( R , P ) .1 A key observation is that this formulation naturally accounts for the exploration/exploitation tradeoff – an optimal agent must plan its actions to reduce uncertainty in the MDP parameters , if such leads to higher rewards . One way to approach the BRL problem is to modelR , P as unobserved state variables in a partially observed MDP ( POMDP , Cassandra et al. , 1994 ) , reducing the problem to solving a particular POMDP instance where the unobserved variables can not change in time ( P andR are assumed to be stationary ) . The belief at time t , bt , denotes the posterior probability overR , P given the history of state transitions and rewards observed until this time bt = P ( R , P|h : t ) , where h : t = { s0 , a0 , r1 , s1 . . . , rt , st } ( note that we denote the reward after observing the state and action at time t as rt+1 = r ( st , at ) ) . The belief can be updated iteratively according to Bayes rule , where b0 ( R , P ) = p ( R , P ) , and : bt+1 ( R , P ) = P ( R , P|h : t+1 ) ∝ P ( st+1 , rt+1|h : t , R , P ) bt ( R , P ) . Similar to the idea of solving a POMDP by representing it as an MDP over belief states ( Cassandra et al. , 1994 ) , the state in BRL can be augmented with the belief to result in the Bayes-Adaptive MDP ( BAMDP ) model ( Duff & Barto , 2002 ) . Denote the augmented state s+t = ( st , bt ) and the augmented state space S+ = S×B , where B denotes the belief space . The transitions in the BAMDP are given by : P+ ( s+t+1|s + t , at ) = Ebt [ P ( st+1|st , at ) ] δ ( bt+1 = P ( R , P|h : t+1 ) ) , and the reward in the BAMDP is the expected reward with respect to the belief : R+ ( s+t , at ) = Ebt [ R ( st , at ) ] . The Bayes-optimal agent seeks to maximize the expected discounted return in the BAMDP , and the optimal solution of the BAMDP gives the optimal BRL policy . As in standard MDPs , the optimal action-value function in the BAMDP satisfies the Bellman equation : Q ( s+ , a ) = R+ ( s+ , a ) + γ ∑ s+ ′∈S+ P+ ( s+ ′ |s+ , a ) max a′ Q ( s+ ′ , a′ ) , ∀s+ ∈ S+ , a ∈ A . ( 2 ) Computing a Bayes-optimal agent amounts to solving the BAMDP , where the optimal policy is a function of the augmented state . However , for most problems this is intractable , as the augmented state space is continuous and high-dimensional , and the posterior update is also intractable in general . The VariBAD Algorithm : VariBAD ( Zintgraf et al. , 2020 ) approximates the Bayes-optimal solution by combining a model for the MDP parameter uncertainty , and an optimization method for the corresponding BAMDP . The MDP parameters are represented by a vector m ∈ Rd , corresponding to the latent variables in a parametric generative model for the statereward trajectory distribution conditioned on the actions P ( s0 , r1 , s1 . . . , rH , sH |a0 , . . . , aH−1 ) =∫ pθ ( m ) pθ ( s0 , r1 , s1 . . . , rH , sH |m , a0 , . . . , aH−1 ) dm . The model parameters θ are learned by a variational approximation to the maximum likelihood objective , where the variational approximation to the posterior P ( m|s0 , r1 , s1 . . . , rH , sH , a0 , . . . , aH−1 ) is chosen to have the structure qφ ( m|s0 , a0 , r1 , s1 . . . , rt , st ) = qφ ( m|h : t ) . That is , the approximate posterior is conditioned on the history up to time t. The evidence lower bound ( ELBO ) in this case is ELBOt = Em∼qφ ( ·|h : t ) [ log pθ ( s0 , r1 , s1 . . . , rH , sH |m , a0 , . . . , aH−1 ) ] −DKL ( qφ ( m|h : t ) ||pθ ( m ) ) . The main claim of Zintgraf et al . ( 2020 ) is that qφ ( m|h : t ) can be taken as an approximation of the belief bt . In practice , qφ ( m|h : t ) is represented as a Gaussian distribution q ( m|h : t ) = N ( µ ( h : t ) , Σ ( h : t ) ) , where µ and Σ are learned recurrent neural networks . To approximately solve the BAMDP , Zintgraf et al . ( 2020 ) exploit the fact that an optimal BAMDP policy is a function of the state and belief , and therefore consider neural network policies that take the augmented BAMDP state as input π ( at|st , qφ ( m|h : t ) ) , where the posterior is practically represented by the distribution parameters µ ( h : t ) , Σ ( h : t ) . To train such policies , Zintgraf et al . ( 2020 ) maximize the BRL objective , J ( π ) = ER , PEπ [ H∑ t=0 γtr ( st , at ) ] , ( 3 ) 1For ease of presentation , we consider the infinite horizon discounted return . Our formulation easily extends to the episodic and finite horizon settings . using policy gradient based methods . The expectation over MDP parameters in ( 3 ) is approximated by averaging over training environments , and the RL agent is trained online , alongside the VAE . | The paper studies the problem of offline Meta-Reinforcement Learning (RL). In this problem, N separate RL environments are considered which are drawn from a specific underlying distribution. For each such environment, M trajectories each of horizon H are provided beforehand. The task is to train an RL agent that performs well in expectation on a new RL environment drawn from the same distribution. The authors adapt the online VariBAD algorithm (Zintgraf et al., 2020) by the use of a techniques called state relabeling and reward relabeling. | SP:c9bc6f77b7493e1cadb84f89759d5a89e61320de |
Deep Neural Tangent Kernel and Laplace Kernel Have the Same RKHS | 1 INTRODUCTION . In the past few years , one of the most seminal discoveries in the theory of neural networks is the neural tangent kernel ( NTK ) ( Jacot et al. , 2018 ) . The gradient flow on a normally initialized , fully connected neural network with a linear output layer in the infinite-width limit turns out to be equivalent to kernel regression with respect to the NTK ( This statement does not necessarily hold for a non-linear output layer , because the NTK is non-constant ( Liu et al. , 2020 ) ) . Through the NTK , theoretical tools from kernel methods were introduced to the study of deep overparametrized neural networks . Theoretical results were thereby established regarding the convergence ( Allen-Zhu et al. , 2019 ; Du et al. , 2019b ; a ; Zou et al. , 2020 ) , generalization ( Cao & Gu , 2019 ; Arora et al. , 2019b ) , and loss landscape ( Kuditipudi et al. , 2019 ) of overparametrized neural networks in the NTK regime . While NTK has proved to be a powerful theoretical tool , a recent work ( Geifman et al. , 2020 ) posed an important question whether the NTK is significantly different from our repertoire of standard kernels . Prior work provided empirical evidence that supports a negative answer . For example , Belkin et al . ( 2018 ) showed experimentally that the Laplace kernel and neural networks had similar performance in fitting random labels . In the task of speech enhancement , exponential power kernels Kγ , σexp ( x , y ) = e−‖x−y‖ γ/σ , which include the Laplace kernel as a special case , outperform deep neural networks with even shorter training time ( Hui et al. , 2019 ) . The experiments in ( Geifman et al. , 2020 ) also exhibited similar performance of the Laplace kernel and the NTK . The expressive power of a positive definite kernel can be characterized by its associated reproducing kernel Hilbert space ( RKHS ) ( Saitoh & Sawano , 2016 ) . The work ( Geifman et al. , 2020 ) considered the RKHS of the kernels restricted to the sphere Sd−1 , { x ∈ Rd | ‖x‖2 = 1 } and presented a partial answer to the question by showing the following subset inclusion relation HGauss ( Sd−1 ) ( HLap ( Sd−1 ) = HN1 ( Sd−1 ) ⊆ HNk ( Sd−1 ) , where the four spaces denote the RKHS associated with the Gaussian kernel , Laplace kernel , the NTK of two-layer and ( k+ 1 ) -layer ( k ≥ 1 ) fully connected neural networks , respectively . All four kernels are restricted to Sd−1 . However , the relation between HLap ( Sd−1 ) and HNk ( Sd−1 ) remains open in ( Geifman et al. , 2020 ) . We make a final conclusion on this problem and show that the RKHS of the Laplace kernel and the NTK with any number of layers have the same set of functions , when they are both restricted to Sd−1 . In other words , we prove the following theorem . Theorem 1 . Let HLap ( Sd−1 ) and HNk ( Sd−1 ) be the RKHS associated with the Laplace kernel KLap ( x , y ) = e −c‖x−y‖ ( c > 0 ) and the neural tangent kernel of a ( k + 1 ) -layer fully connected ReLU network . Both kernels are restricted to the sphere Sd−1 . Then the two spaces include the same set of functions : HLap ( Sd−1 ) = HNk ( Sd−1 ) , ∀k ≥ 1 . Our second result is that the exponential power kernel with a smaller power ( making the kernel less smooth ) leads to a larger RKHS , both when it is restricted to the sphere Sd−1 and when it is defined on the entire Rd . Theorem 2 . LetHKγ , σexp ( S d−1 ) andHKγ , σexp ( R d ) be the RKHS associated with the exponential power kernel Kγ , σexp ( x , y ) = exp ( −‖x−y‖ γ σ ) ( γ , σ > 0 ) when it is restricted to the unit sphere Sd−1 and defined on the entire Rd , respectively . Then we have the following RKHS inclusions : ( 1 ) If 0 < γ1 < γ2 < 2 , HKγ2 , σ2exp ( S d−1 ) ⊆ HKγ1 , σ1exp ( S d−1 ) . ( 2 ) If 0 < γ1 < γ2 < 2 are rational , HKγ2 , σ2exp ( R d ) ⊆ HKγ1 , σ1exp ( R d ) . If it is restricted to the unit sphere , the RKHS of the exponential power kernel with γ < 1 is even larger than that of NTK . This result partially explains the observation in ( Hui et al. , 2019 ) that the best performance is attained by a highly non-smooth exponential power kernel with γ < 1 . Geifman et al . ( 2020 ) applied the exponential power kernel and the NTK to classification and regression tasks on the UCI dataset and other large scale datasets . Their experiment results also showed that the exponential power kernel slightly outperforms the NTK . 1.1 FURTHER RELATED WORK . Minh et al . ( 2006 ) showed the complete spectrum of the polynomial and Gaussian kernels on Sd−1 . They also gave a recursive relation for the eigenvalues of the polynomial kernel on the hypercube { −1 , 1 } d. Prior to the NTK ( Jacot et al. , 2018 ) , Cho & Saul ( 2009 ) presented a pioneering study on kernel methods for neural networks . Bach ( 2017 ) studied the eigenvalues of positively homogeneous activation functions of the form σα ( u ) = max { u , 0 } α ( e.g. , the ReLU activation when α = 1 ) in their Mercer decomposition with Gegenbauer polynomials . Using the results in ( Bach , 2017 ) , Bietti & Mairal ( 2019 ) analyzed the two-layer NTK and its RKHS in order to investigate the inductive bias in the NTK regime . They studied the Mercer decomposition of two-layer NTK with ReLU activation on Sd−1 and characterized the corresponding RKHS by showing the asymptotic decay rate of the eigenvalues in the Mercer decomposition with Gegenbauer polynomials . In their derivation of a more concise expression of the ReLU NTK , they used the calculation of ( Cho & Saul , 2009 ) on arc-cosine kernels of degree 0 and 1 . Cao et al . ( 2019 ) improved the eigenvalue bound for the k-th eigenvalue derived in ( Bietti & Mairal , 2019 ) when d k. Geifman et al . ( 2020 ) used the results in ( Bietti & Mairal , 2019 ) and considered the two-layer ReLU NTK with bias β initialized with zero , rather than initialized with a normal distribution ( Jacot et al. , 2018 ) . However , neither ( Bietti & Mairal , 2019 ) nor ( Geifman et al. , 2020 ) went beyond two layers when they tried to characterize the RKHS of the ReLU NTK . This line of work ( Bach , 2017 ; Bietti & Mairal , 2019 ; Geifman et al. , 2020 ) is closely related to the Mercer decomposition with spherical harmonics . Interested readers are referred to ( Atkinson & Han , 2012 ) for spherical harmonics on the unit sphere . The concurrent work ( Bietti & Bach , 2021 ) analyzed the eigenvalues of the ReLU NTK . Arora et al . ( 2019a ) presented a dynamic programming algorithm that computes convolutional NTK with ReLU activation . Yang & Salman ( 2019 ) analyzed the spectra of the conjugate kernel ( CK ) and NTK on the boolean cube . Fan & Wang ( 2020 ) studied the spectrum of the gram matrix of training samples under the CK and NTK and showed that their eigenvalue distributions converge to a deterministic limit . The limit depends on the eigenvalue distribution of the training samples . 2 PRELIMINARIES . Let C denote the set of all complex numbers and write i , √ −1 . For z ∈ C , write < z , =z , arg z ∈ ( −π , π ] for its real part , imaginary part , and argument , respectively . Let H+ , { z ∈ C | =z > 0 } denote the upper half-plane and H− , { z ∈ C | =z < 0 } denote the lower half-plane . Write Bz ( r ) for the open ball { w ∈ C | |z − w| < r } and B̄z ( r ) for the closed ball { w ∈ C | |z − w| ≤ r } . Suppose that f ( z ) has a power series representation f ( z ) = ∑ n≥0 anz n around 0 . Denote [ zn ] f ( z ) , an to be the coefficient of the n-th order term . For two sequences { an } and { bn } , write an ∼ bn if limn→∞ anbn = 1 . Similarly , for two functions f ( z ) and g ( z ) , write f ( z ) ∼ g ( z ) as z → z0 if limz→z0 f ( z ) g ( z ) = 1 . We also use big-O and little-o notation to characterize asymptotics . Write L { f ( t ) } ( s ) , ∫∞ 0 f ( t ) e−stdt for the Laplace transform of a function f ( t ) . The inverse Laplace transform of F ( s ) is denoted by L −1 { F ( s ) } ( t ) . 2.1 POSITIVE DEFINITE KERNELS . For any positive definite kernel functionK ( x , y ) defined for x , y ∈ E , denoteHK ( E ) its associated reproducing kernel Hilbert space ( RKHS ) . For any two positive definite kernel functions K1 and K2 , we write K1 4 K2 if K2−K1 is a positive definite kernel . For a complete review of results on kernels and RKHS , please see ( Saitoh & Sawano , 2016 ) . We will study positive definite zonal kernels on the sphere Sd−1 = { x ∈ Rd | ‖x‖ = 1 } . For a zonal kernel K ( x , y ) , there exists a real function K̃ : [ −1 , 1 ] → R such that K ( x , y ) = K̃ ( u ) , where u = x > y . We abuse the notation and use K ( u ) to denote K̃ ( u ) , i.e. , K ( u ) here is real function on [ −1 , 1 ] . In the sequel , we introduce two instances of the positive definite kernel that this paper will investigate . Laplace Kernel The Laplace kernel KLap ( x , y ) = e−c‖x−y‖ with c > 0 restricted to the sphere Sd−1 is given by KLap ( x , y ) = e−c √ 2 ( 1−x > y ) = e−c̃ √ 1−u , KLap ( u ) , where by our convention u = x > y and c̃ , √ 2c > 0 . We denote its associated RKHS byHLap . Exponential Power Kernel The exponential power kernel ( Hui et al. , 2019 ) with γ > 0 and σ > 0 is given by Kγ , σexp ( x , y ) = exp ( −‖x−y‖ γ σ ) . If x and y are restricted to the sphere Sd−1 , we have Kγ , σexp ( x , y ) = exp ( − ( 2 ( 1−x > y ) ) γ/2 σ ) . Neural Tangent Kernel Given the input x ∈ Rd ( we define d0 , d ) and parameter θ , this paper considers the following network model with ( k + 1 ) layers fθ ( x ) = w > √ 2 dk σ ( Wk √ 2 dk−1 σ ( . . . √ 2 d2 σ ( W2 √ 2 d1 σ ( W1x+ βb1 ) + βb2 ) . . . ) + βbk ) + βbk+1 , ( 1 ) where the parameter θ encodes Wl ∈ Rdl×dl−1 , bl ∈ Rdl ( l = 1 , . . . , k ) , w ∈ Rdk , and bk+1 ∈ R. The weight matrices W1 , . . . , Wk , w are initialized with N ( 0 , I ) and the biases b1 , . . . , bk+1 are initialized with zero , where N ( 0 , I ) is the multivariate standard normal distribution . The activation function is chosen to be the ReLU function σ ( x ) , max { x , 0 } . Geifman et al . ( 2020 ) and Bietti & Mairal ( 2019 ) presented the following recursive relations of the NTK Nk ( x , y ) of the above ReLU network ( 1 ) : Σk ( x , y ) = √ Σk−1 ( x , x ) Σk−1 ( y , y ) κ1 ( Σk−1 ( x , y ) √ Σk−1 ( x , x ) Σk−1 ( y , y ) ) Nk ( x , y ) = Σk ( x , y ) +Nk−1 ( x , y ) κ0 ( Σk−1 ( x , y ) √ Σk−1 ( x , x ) Σk−1 ( y , y ) ) + β2 , ( 2 ) where κ0 and κ1 are the arc-cosine kernels of degree 0 and 1 ( Cho & Saul , 2009 ) given by κ0 ( u ) = 1 π ( π − arccos ( u ) ) , κ1 ( u ) = 1 π ( u · ( π − arccos ( u ) ) + √ 1− u2 ) . The initial conditions are N0 ( x , y ) = u+ β 2 , Σ0 ( x , y ) = u , ( 3 ) where u = x > y by our convention . The NTKs defined in ( Bietti & Mairal , 2019 ) and ( Geifman et al. , 2020 ) are slightly different . There is no bias term β2 in ( Bietti & Mairal , 2019 ) , while the bias term appears in ( Geifman et al. , 2020 ) . We adopt the more general setup with the bias term . Lemma 3 ( Proof in Appendix A.1 ) . Σk ( x , x ) = 1 for any x ∈ Sd−1 and k ≥ 0 . Lemma 3 simplifies ( 2 ) and gives Σk ( u ) = κ ( k ) 1 ( u ) , Nk ( u ) = κ ( k ) 1 ( u ) +Nk−1 ( u ) κ0 ( κ ( k−1 ) 1 ( u ) ) + β 2 , ( 4 ) where κ ( k ) 1 ( u ) , κ1 ( κ1 ( · · ·κ1 ( κ1︸ ︷︷ ︸ k ( u ) ) · · · ) ) is the k-th iterate of κ1 ( u ) . For example , κ ( 0 ) 1 ( u ) = u , κ ( 1 ) 1 ( u ) = κ1 ( u ) and κ ( 2 ) 1 ( u ) = κ1 ( κ1 ( u ) ) . We present a detailed derivation of ( 4 ) in Appendix A.2 . | This paper uses singularity analysis developed in the context of analytic combinatorics to study the relationship between the reproducing kernel Hilbert spaces of the NTK in a deep fully connected ReLU network, the Laplace kernel, and exponential power kernels. The main results are when these kernels are restricted to the unit sphere. In particular, the authors show that, as vector spaces, the RKHS on the unit sphere of the NTK for a ReLU network of any fixed depth are the same and in fact coincides with that of the Laplace kernel. The authors also compare the RKHS for exponential power kernels, demonstrating that larger powers lead to smaller Hilbert spaces. | SP:c5727500bc787fd26fe060b0a06892ee4430175e |
Deep Neural Tangent Kernel and Laplace Kernel Have the Same RKHS | 1 INTRODUCTION . In the past few years , one of the most seminal discoveries in the theory of neural networks is the neural tangent kernel ( NTK ) ( Jacot et al. , 2018 ) . The gradient flow on a normally initialized , fully connected neural network with a linear output layer in the infinite-width limit turns out to be equivalent to kernel regression with respect to the NTK ( This statement does not necessarily hold for a non-linear output layer , because the NTK is non-constant ( Liu et al. , 2020 ) ) . Through the NTK , theoretical tools from kernel methods were introduced to the study of deep overparametrized neural networks . Theoretical results were thereby established regarding the convergence ( Allen-Zhu et al. , 2019 ; Du et al. , 2019b ; a ; Zou et al. , 2020 ) , generalization ( Cao & Gu , 2019 ; Arora et al. , 2019b ) , and loss landscape ( Kuditipudi et al. , 2019 ) of overparametrized neural networks in the NTK regime . While NTK has proved to be a powerful theoretical tool , a recent work ( Geifman et al. , 2020 ) posed an important question whether the NTK is significantly different from our repertoire of standard kernels . Prior work provided empirical evidence that supports a negative answer . For example , Belkin et al . ( 2018 ) showed experimentally that the Laplace kernel and neural networks had similar performance in fitting random labels . In the task of speech enhancement , exponential power kernels Kγ , σexp ( x , y ) = e−‖x−y‖ γ/σ , which include the Laplace kernel as a special case , outperform deep neural networks with even shorter training time ( Hui et al. , 2019 ) . The experiments in ( Geifman et al. , 2020 ) also exhibited similar performance of the Laplace kernel and the NTK . The expressive power of a positive definite kernel can be characterized by its associated reproducing kernel Hilbert space ( RKHS ) ( Saitoh & Sawano , 2016 ) . The work ( Geifman et al. , 2020 ) considered the RKHS of the kernels restricted to the sphere Sd−1 , { x ∈ Rd | ‖x‖2 = 1 } and presented a partial answer to the question by showing the following subset inclusion relation HGauss ( Sd−1 ) ( HLap ( Sd−1 ) = HN1 ( Sd−1 ) ⊆ HNk ( Sd−1 ) , where the four spaces denote the RKHS associated with the Gaussian kernel , Laplace kernel , the NTK of two-layer and ( k+ 1 ) -layer ( k ≥ 1 ) fully connected neural networks , respectively . All four kernels are restricted to Sd−1 . However , the relation between HLap ( Sd−1 ) and HNk ( Sd−1 ) remains open in ( Geifman et al. , 2020 ) . We make a final conclusion on this problem and show that the RKHS of the Laplace kernel and the NTK with any number of layers have the same set of functions , when they are both restricted to Sd−1 . In other words , we prove the following theorem . Theorem 1 . Let HLap ( Sd−1 ) and HNk ( Sd−1 ) be the RKHS associated with the Laplace kernel KLap ( x , y ) = e −c‖x−y‖ ( c > 0 ) and the neural tangent kernel of a ( k + 1 ) -layer fully connected ReLU network . Both kernels are restricted to the sphere Sd−1 . Then the two spaces include the same set of functions : HLap ( Sd−1 ) = HNk ( Sd−1 ) , ∀k ≥ 1 . Our second result is that the exponential power kernel with a smaller power ( making the kernel less smooth ) leads to a larger RKHS , both when it is restricted to the sphere Sd−1 and when it is defined on the entire Rd . Theorem 2 . LetHKγ , σexp ( S d−1 ) andHKγ , σexp ( R d ) be the RKHS associated with the exponential power kernel Kγ , σexp ( x , y ) = exp ( −‖x−y‖ γ σ ) ( γ , σ > 0 ) when it is restricted to the unit sphere Sd−1 and defined on the entire Rd , respectively . Then we have the following RKHS inclusions : ( 1 ) If 0 < γ1 < γ2 < 2 , HKγ2 , σ2exp ( S d−1 ) ⊆ HKγ1 , σ1exp ( S d−1 ) . ( 2 ) If 0 < γ1 < γ2 < 2 are rational , HKγ2 , σ2exp ( R d ) ⊆ HKγ1 , σ1exp ( R d ) . If it is restricted to the unit sphere , the RKHS of the exponential power kernel with γ < 1 is even larger than that of NTK . This result partially explains the observation in ( Hui et al. , 2019 ) that the best performance is attained by a highly non-smooth exponential power kernel with γ < 1 . Geifman et al . ( 2020 ) applied the exponential power kernel and the NTK to classification and regression tasks on the UCI dataset and other large scale datasets . Their experiment results also showed that the exponential power kernel slightly outperforms the NTK . 1.1 FURTHER RELATED WORK . Minh et al . ( 2006 ) showed the complete spectrum of the polynomial and Gaussian kernels on Sd−1 . They also gave a recursive relation for the eigenvalues of the polynomial kernel on the hypercube { −1 , 1 } d. Prior to the NTK ( Jacot et al. , 2018 ) , Cho & Saul ( 2009 ) presented a pioneering study on kernel methods for neural networks . Bach ( 2017 ) studied the eigenvalues of positively homogeneous activation functions of the form σα ( u ) = max { u , 0 } α ( e.g. , the ReLU activation when α = 1 ) in their Mercer decomposition with Gegenbauer polynomials . Using the results in ( Bach , 2017 ) , Bietti & Mairal ( 2019 ) analyzed the two-layer NTK and its RKHS in order to investigate the inductive bias in the NTK regime . They studied the Mercer decomposition of two-layer NTK with ReLU activation on Sd−1 and characterized the corresponding RKHS by showing the asymptotic decay rate of the eigenvalues in the Mercer decomposition with Gegenbauer polynomials . In their derivation of a more concise expression of the ReLU NTK , they used the calculation of ( Cho & Saul , 2009 ) on arc-cosine kernels of degree 0 and 1 . Cao et al . ( 2019 ) improved the eigenvalue bound for the k-th eigenvalue derived in ( Bietti & Mairal , 2019 ) when d k. Geifman et al . ( 2020 ) used the results in ( Bietti & Mairal , 2019 ) and considered the two-layer ReLU NTK with bias β initialized with zero , rather than initialized with a normal distribution ( Jacot et al. , 2018 ) . However , neither ( Bietti & Mairal , 2019 ) nor ( Geifman et al. , 2020 ) went beyond two layers when they tried to characterize the RKHS of the ReLU NTK . This line of work ( Bach , 2017 ; Bietti & Mairal , 2019 ; Geifman et al. , 2020 ) is closely related to the Mercer decomposition with spherical harmonics . Interested readers are referred to ( Atkinson & Han , 2012 ) for spherical harmonics on the unit sphere . The concurrent work ( Bietti & Bach , 2021 ) analyzed the eigenvalues of the ReLU NTK . Arora et al . ( 2019a ) presented a dynamic programming algorithm that computes convolutional NTK with ReLU activation . Yang & Salman ( 2019 ) analyzed the spectra of the conjugate kernel ( CK ) and NTK on the boolean cube . Fan & Wang ( 2020 ) studied the spectrum of the gram matrix of training samples under the CK and NTK and showed that their eigenvalue distributions converge to a deterministic limit . The limit depends on the eigenvalue distribution of the training samples . 2 PRELIMINARIES . Let C denote the set of all complex numbers and write i , √ −1 . For z ∈ C , write < z , =z , arg z ∈ ( −π , π ] for its real part , imaginary part , and argument , respectively . Let H+ , { z ∈ C | =z > 0 } denote the upper half-plane and H− , { z ∈ C | =z < 0 } denote the lower half-plane . Write Bz ( r ) for the open ball { w ∈ C | |z − w| < r } and B̄z ( r ) for the closed ball { w ∈ C | |z − w| ≤ r } . Suppose that f ( z ) has a power series representation f ( z ) = ∑ n≥0 anz n around 0 . Denote [ zn ] f ( z ) , an to be the coefficient of the n-th order term . For two sequences { an } and { bn } , write an ∼ bn if limn→∞ anbn = 1 . Similarly , for two functions f ( z ) and g ( z ) , write f ( z ) ∼ g ( z ) as z → z0 if limz→z0 f ( z ) g ( z ) = 1 . We also use big-O and little-o notation to characterize asymptotics . Write L { f ( t ) } ( s ) , ∫∞ 0 f ( t ) e−stdt for the Laplace transform of a function f ( t ) . The inverse Laplace transform of F ( s ) is denoted by L −1 { F ( s ) } ( t ) . 2.1 POSITIVE DEFINITE KERNELS . For any positive definite kernel functionK ( x , y ) defined for x , y ∈ E , denoteHK ( E ) its associated reproducing kernel Hilbert space ( RKHS ) . For any two positive definite kernel functions K1 and K2 , we write K1 4 K2 if K2−K1 is a positive definite kernel . For a complete review of results on kernels and RKHS , please see ( Saitoh & Sawano , 2016 ) . We will study positive definite zonal kernels on the sphere Sd−1 = { x ∈ Rd | ‖x‖ = 1 } . For a zonal kernel K ( x , y ) , there exists a real function K̃ : [ −1 , 1 ] → R such that K ( x , y ) = K̃ ( u ) , where u = x > y . We abuse the notation and use K ( u ) to denote K̃ ( u ) , i.e. , K ( u ) here is real function on [ −1 , 1 ] . In the sequel , we introduce two instances of the positive definite kernel that this paper will investigate . Laplace Kernel The Laplace kernel KLap ( x , y ) = e−c‖x−y‖ with c > 0 restricted to the sphere Sd−1 is given by KLap ( x , y ) = e−c √ 2 ( 1−x > y ) = e−c̃ √ 1−u , KLap ( u ) , where by our convention u = x > y and c̃ , √ 2c > 0 . We denote its associated RKHS byHLap . Exponential Power Kernel The exponential power kernel ( Hui et al. , 2019 ) with γ > 0 and σ > 0 is given by Kγ , σexp ( x , y ) = exp ( −‖x−y‖ γ σ ) . If x and y are restricted to the sphere Sd−1 , we have Kγ , σexp ( x , y ) = exp ( − ( 2 ( 1−x > y ) ) γ/2 σ ) . Neural Tangent Kernel Given the input x ∈ Rd ( we define d0 , d ) and parameter θ , this paper considers the following network model with ( k + 1 ) layers fθ ( x ) = w > √ 2 dk σ ( Wk √ 2 dk−1 σ ( . . . √ 2 d2 σ ( W2 √ 2 d1 σ ( W1x+ βb1 ) + βb2 ) . . . ) + βbk ) + βbk+1 , ( 1 ) where the parameter θ encodes Wl ∈ Rdl×dl−1 , bl ∈ Rdl ( l = 1 , . . . , k ) , w ∈ Rdk , and bk+1 ∈ R. The weight matrices W1 , . . . , Wk , w are initialized with N ( 0 , I ) and the biases b1 , . . . , bk+1 are initialized with zero , where N ( 0 , I ) is the multivariate standard normal distribution . The activation function is chosen to be the ReLU function σ ( x ) , max { x , 0 } . Geifman et al . ( 2020 ) and Bietti & Mairal ( 2019 ) presented the following recursive relations of the NTK Nk ( x , y ) of the above ReLU network ( 1 ) : Σk ( x , y ) = √ Σk−1 ( x , x ) Σk−1 ( y , y ) κ1 ( Σk−1 ( x , y ) √ Σk−1 ( x , x ) Σk−1 ( y , y ) ) Nk ( x , y ) = Σk ( x , y ) +Nk−1 ( x , y ) κ0 ( Σk−1 ( x , y ) √ Σk−1 ( x , x ) Σk−1 ( y , y ) ) + β2 , ( 2 ) where κ0 and κ1 are the arc-cosine kernels of degree 0 and 1 ( Cho & Saul , 2009 ) given by κ0 ( u ) = 1 π ( π − arccos ( u ) ) , κ1 ( u ) = 1 π ( u · ( π − arccos ( u ) ) + √ 1− u2 ) . The initial conditions are N0 ( x , y ) = u+ β 2 , Σ0 ( x , y ) = u , ( 3 ) where u = x > y by our convention . The NTKs defined in ( Bietti & Mairal , 2019 ) and ( Geifman et al. , 2020 ) are slightly different . There is no bias term β2 in ( Bietti & Mairal , 2019 ) , while the bias term appears in ( Geifman et al. , 2020 ) . We adopt the more general setup with the bias term . Lemma 3 ( Proof in Appendix A.1 ) . Σk ( x , x ) = 1 for any x ∈ Sd−1 and k ≥ 0 . Lemma 3 simplifies ( 2 ) and gives Σk ( u ) = κ ( k ) 1 ( u ) , Nk ( u ) = κ ( k ) 1 ( u ) +Nk−1 ( u ) κ0 ( κ ( k−1 ) 1 ( u ) ) + β 2 , ( 4 ) where κ ( k ) 1 ( u ) , κ1 ( κ1 ( · · ·κ1 ( κ1︸ ︷︷ ︸ k ( u ) ) · · · ) ) is the k-th iterate of κ1 ( u ) . For example , κ ( 0 ) 1 ( u ) = u , κ ( 1 ) 1 ( u ) = κ1 ( u ) and κ ( 2 ) 1 ( u ) = κ1 ( κ1 ( u ) ) . We present a detailed derivation of ( 4 ) in Appendix A.2 . | This paper proves that the reproducing kernel Hilbert spaces of a deep neural tangent kernel and the Laplace kernel have the same set of functions when they restricted to the sphere $S^{d-1}$, which improves the results established in Geifman et al., 2020. Moreover, the paper proves that more non-smooth of the exponential power kernel leads to a larger RKHS with restriction on the sphere $S^{d-1}$ and the entire $R^d$. Furthermore, the authors conduct numerical experiments to verify the asymptotics of the Maclaurin coefficients of the Laplace kernel and NTKs kernel. In summary, the paper is well-written and organized logically. The proof of theoretical results of this paper seems to be correct and reasonable, resulting from the full details of the proof provided in the appendices. | SP:c5727500bc787fd26fe060b0a06892ee4430175e |
Quantifying Task Complexity Through Generalized Information Measures | 1 INTRODUCTION . Deep networks have shown remarkable progress in both simple and complex machine learning tasks . But how does one measure the “ complexity ” of a learning task ? Is it possible to ascertain in a principled manner which tasks are “ harder ” to solve than others ? How “ close ” is one task to another ? Answers to these questions would have implications in many fields of machine learning such as transfer learning , multi-task learning , un/semi/self-supervised learning , and domain adaptation . In classical information theory , the entropy of a random variable X is a useful measure of complexity for tasks such as compression and transmission , which essentially require reconstructing X . However , the entropy ofX is insufficient for measuring the complexity of a supervised learning task TX , Y , where the goal is to predict an output Y from an input X , i.e. , to estimate the conditional pY |X ( y | x ) from a finite set of samples from pXY ( x , y ) , which we refer to as solving the learning task . Complexity measures provided by statistical learning theory like VC-dimension or covering numbers are also inadequate for this purpose because they ignore the dependence between X and Y for the particular task at hand . Information-theoretic measures such as mutual information , information bottleneck ( Tishby et al. , 2000 ) and its variants ( Strouse & Schwab , 2017 ) have been used to study the trade-off between model complexity and accuracy , but have not been developed to focus on assessing task complexity and can provide unsatisfactory results when comparing different tasks ( see Section 5 for details ) . Measures based on Kolmogorov complexity ( Li , 2006 ; Vereshchagin & Vitányi , 2004 ) could in principle be used to compare different tasks , but they are dataset permutation sensitive and not easily computable . The work of ( Achille et al. , 2019a ) proposes to quantify task complexity by measuring the information stored on the network weights , but the approach depends on the specific neural network architecture used for training . The work of ( Tran et al. , 2019 ) does not require or assume trained models , but makes strict assumptions that limit its broad applicability . In this work , we introduce a novel perspective on task complexity which generalizes classical measures from information theory . Specifically , one well-known interpretation of classical Shannon entropy is , given a random variable X , find the minimum number of bits that are needed on average to encode instances of X so that the instances can be perfectly recovered from the binary code . Stated differently , if one lets Q be defined as the set of all possible binary functions , on the domain of X , then Shannon entropy essentially asks what is the optimal sequence of queries to compute { q1 ( X ) , q2 ( X ) , . . . : qi ∈ Q } ( i.e. , how to encode X as a binary string ) so that X can be perfectly recovered from the shortest ( on average ) sequence of binary answers to the queries ( see Section 2 for more discussion of this interpretation ) . As discussed above , however , in most learning tasks we are not interested in simply compressing X but rather making a prediction about some other variable Y . Further , notions of complexity can potentially be made more relevant to a specific task by not having Q to be the set of all possible binary functions on X but rather a smaller set of queries specific to a measure of interest . From this intuition , we define the complexity of a learning task as the minimum expected number of queries , selected from a fixed set Q , one needs to ask to predict Y ( to some user-defined level of confidence ) from the respective answers to the queries . As a few specific examples of potential query sets : • Decision boundary complexity : Here , Q is the the set of all possible half-spaces in Rd ( assuming X ∈ Rd ) and q ( x ) is a binary function response indicating whether x lies in a particular half-space ( q ∈ Q ) . Then task complexity formalizes the intuition of “ level of non-linearity ” of the decision boundary . For example , the complexity of any linearly-separable binary classification task is 1 , whereas , for a non-linearly separable task , this value depends on the curvature of the decision boundary . • Task-specific input feature complexity : Here , Q is the set of projection functions of X and q is of the form q ( x ) = xq , where xq is the value observed at the qth entry of x . Then task complexity formalizes the intuition “ the greater the redundancy between the input features the easier it is to solve the task ” . For example , Y being a constant function of X would be the simplest task with complexity 0 , since no feature needs to be queried to predict it . This notion of complexity would help in answering questions such as “ which input features are most important for solving a given task ? ” and could in turn help in developing more “ interpretable ” learning algorithms . • Visual semantic complexity : Given a vocabulary V of different possible entities , their attributes and relations in a visual scene , Q could be the set of all binary functions indicating the presence or absence of an entity , its attribute or its relation with other entities ( supplied by V ) in a designated region of the image X . For example , a particular q could be the function implementing the query “ Is there a person in the top left corner of the image ? ” . This notion of complexity would allow one to gauge the semantic complexity of a visual task . For instance , tasks which ask complex questions like “ Is there a person playing with his dog , next to a river in the image ? ” would inherently be more complex than simple object detection tasks , “ Where is the dog in this image ? ” and could be quantified by semantically relevant queries . While our proposed formal definition of task complexity will be applicable to all such choices of query functions { q } q∈Q and enjoys several nice theoretical properties that we discuss in section 2 , its computation will generally be intractable . As a result , in section 3 we propose to reduce the complexity of selecting a minimal set of questions by using the Information Pursuit ( IP ) algorithm , which selects questions sequentially , depending on previous questions and answers , in order of information gain . While IP is generally applicable to any task and query set , its implementation is still intractable depending on the complexity of the model p ( X , Y ) and of the set Q . To address this issue , we posit a tractable graphical model for p ( X , Y ) and learn the required distributions using variational autoencoders and normalizing flows . In section 4 we evaluate our approach on various binary image classification tasks ( MNIST , KMNIST , FashionMNIST , Caltech Silhouettes ) that can be tackled using a common set of queries ( the set of image patches ) . Our results show that complexity computed using patch queries aligns with the intuition that the complexity of a classification task increases as signal-to-noise ratio decreases , and that classification of the KMNIST dataset is more complex than classification of the FashionMNIST dataset , something that isn ’ t obvious a priori . While these experiments are restricted to simple tasks and queries , the proposed framework is generally applicable provided that tractable models , inference and learning methods can be developed , which is the subject of ongoing and future work . Finally , we note that to the best of our knowledge , this is the first time that a subjective notion of task complexity has been proposed in literature , where the user can incorporate in Q the perception of complexity he/she wishes to measure . 2 QUANTIFYING TASK COMPLEXITY . Let the input data be represented by random variable X and the corresponding output/hypothesis by random variable Y with sample spaces X and Y respectively . A supervised learning task TX ; Y is defined as the task of estimating the conditional distribution pY |X ( y | x ) from a finite set of samples from the joint distribution pXY ( x , y ) .1 We propose to quantify the complexity of a task as the minimum expected number of queries needed to solve the task . Queries , q ∈ Q , are functions of the input data , whose answers for a given x are denoted as { q ( x ) } q∈Q . Naturally , the query set needs to be sufficiently rich so that the task is solvable based on answers to the queries . More formally , we say the set Q is sufficient for task TX ; Y if ∀ ( x , y ) ∈ X × Y , p ( y | x ) = p ( y | { x′ ∈ X : q ( x′ ) = q ( x ) ∀q ∈ Q } ) . ( 1 ) In other words , Q is sufficient for task TX ; Y if whenever two points x and x′ have identical answers for all queries in Q , then their true posteriors must be equal , p ( y | x ) = p ( y | x′ ) . Given a fixed query set Q , we now formally define an encoding function EQ , which we refer to as a Q-Coder , along with our proposed complexity measure CQ ( X , Y ) for task TX , Y . Defining the Encoder function . Given a query set Q , an Encoder is a function , E : S∗ → Q where S∗ is the set of all finite-length sequences generated using elements from the set S = { ( q , q ( x ) ) | q ∈ Q , x ∈ X } . Additionally , we require that Q contains a special query qSTOP which signals the encoder to stop asking queries and outputs the code for x as the set of query-answer pairs that have been asked . The process can be described as follows , given E and input sample x . 1. q1 = E ( ∅ ) . The first question is independent of x . 2. qk+1 = E ( { qi , qi ( x ) } 1 : k ) . All subsequent queries depend on the query-answer pairs ob- served so far for x . 3 . If qL+1 = qSTOP terminate and return CodeEQ ( x ) : = ( qi , qi ( x ) ) 1 : L as the code for x . Note that each qi depends on x , but we drop this in the notation for brevity . Note also that the number of queries L = |CodeEQ ( x ) | for a particular x generalizes coding length in information theory . The query qSTOP constrains the code CodeEQ ( x ) to be prefix-free . Defining task complexity . Given a joint distribution pXY ( x , y ) and a sufficient query set Q , we define task complexity , CQ ( X ; Y ) , as the minimum over all encoders E ( which are mappings from X to a subset of queries in Q ) of the mean coding length : CQ ( X ; Y ) : = min E EX [ |CodeEQ ( X ) | ] s.t . p ( y | x ) = p ( y | CodeEQ ( x ) ) ∀x ∈ X , y ∈ Y ( Sufficiency ) ( 2 ) Figure 1 : Schematic view of the overall framework for quantifying complexity of a task TX ; Y . The first constraint ensures sufficiency of the code ∀x ∈ X . By this we mean that there exists at least one Encoder E for which the first constraint of “ sufficiency ” is satisfied , where p ( y | CodeEQ ( x ) ) should be interpreted as the conditional probability of y given the event { x′ ∈ X | CodeEQ ( x ) = CodeEQ ( x′ ) } . The solution to ( 2 ) provides the optimal encoder for task TX ; Y , and Fig . 1 illustrates the overall framework in detail . Connection with Shannon entropy H . It can be shown that when Q is taken as the set for all possible binary questions on X and if Y is a function of X ( which it usually is for supervised classification problems ( Kolchinsky et al. , 2018 ) ) , then the solution , E∗ , to ( 2 ) gives a coding length within one bit of the entropy of Y , denoted as H ( Y ) . More formally , one can show that H ( Y ) ≤ CQ ( X ; Y ) = EX [ |CodeE ∗ Q ( X ) | ] < H ( Y ) + 1 . ( 3 ) 1As commonly used , we denote random variables by capital letters and their realizations with small letters . Note that one example of such an optimal encoder , E∗ ( x ) , is given by the Huffman code for Y . Connection with task complexity & equivalence classes . Notions of complexity of an entity/object , often relate to the level of structural regularity present in the entity ( Gell-Mann , 2002 ) . CQ ( X ; Y ) measures the degree of regularity present in the structure of TX ; Y . This structure is implicitly defined by the conditional pY |X ( y | x ) and the query set Q . Notice that any E partitions X into equivalence classes . [ x ] = { x′ ∈ X | CodeEQ ( x ) = CodeEQ ( x′ ) } . ( 4 ) The prefix-free constraint on the codes generated by E ( due to ) ensures that ∀x′ ∈ [ x ] , ∀y ∈ Y , pY |X=x′ ( y ) = pY |X=x ( y ) . It is then natural to relate task complexity with the number of equivalence classes induced by the optimal E∗ . The greater the number of equivalence classes , the higher the complexity of the task . This is because knowing the distribution pY |X ( y | x′ ) for any one element x′ in each equivalence class is sufficient to predict Y . An extreme case of this would be the constant function which arguably has the simplest possible structure of any task TX , Y . The equivalence class in this case is just X since pY |X ( y | x ) is same for all x ∈ X . Thus , the number of equivalence classes for the constant function is 1 ( the minimum possible ) . This is expected since for a constant function there is no structure to learn from data whatsoever ! The following lemma ( see Appendix A.1 for a proof ) relates CQ ( X ; Y ) and the number of equivalence classes , the latter being not easy to compute from finite samples . Proposition 1 . Given a finite query set Q , b-valued query-answers { q ( X ) } q∈Q and any δ > 0 , the number of equivalence classes induced by the minimizer of ( 2 ) can be upper bounded by bCQ ( X ; Y ) +|Q| √ 2 log ( 1δ ) ) with probability of misclassifying X at most δ . Proposition 1 indicates that for the sameQ , tasks with greaterCQ ( X ; Y ) will have larger complexity ( by comparing the upper bound on the number of equivalence classes ) . This also illustrates the role different bases play . For example , in visual recognition tasks if one queries intensities of all the pixels in the image at once then CQ ( X ; Y ) = 1 ( Observing intensities at all the pixels is sufficient information to predict Y from X ) . However b in that case would be large ( exponential in the size of the image ) . Instead if one queries individual pixels , b would be the number of intensity values each pixel can take but CQ ( X ; Y ) ≥ 1 . Properties of CQ ( X ; Y ) . The following proposition , whose proof can be found in Appendix A.2 , establishes some key properties of our proposed measure of complexity . Proposition 2 . For any query setQ that is sufficient for task TX , Y , CQ ( X ; Y ) satisfies the following properties : 1 . CQ ( X ; Y ) ≥ 0 . ( non-negativity ) 2 . CQ ( X ; Y ) = 0 iff X ⊥⊥ Y . ( trivial structure ) 3 . If ∀x , x′ ∈ X , x 6= x′ , ∃y ∈ Y , such that pY |X=x ( y ) 6= pY |X=x′ ( y ) , then CQ ( X ; Y ) ≥ CQ ( X ; Ỹ ) for all tasks TX , Ỹ provided Q is sufficient for TX , Ỹ . ( total structure ) 4 . CQ ( X ; Y1 , Y2 ) ≤ CQ ( X ; Y1 ) + CQ ( X ; Y2 ) for any two tasks with X ∼ pX ( x ) and Y1 ⊥⊥ Y2 | X . ( sub-additivity under union ) The property “ trivial structure ” captures the fact that if Y is independent of X , the learning task is trivial ( i.e. , there is nothing to be learned about Y from observing X or functions of X ) . The property “ total structure ” captures the intuition that if for a given task TX ; Y , the conditional distribution functioini pY |X=x ( y ) is different ∀x ∈ X , then learning is “ impossible ” ( assume Y is a categorical variable , which it is for most classification tasks ) as no inductive bias would help in generalization to unseen inputs for such a task . For example , Y = f ( X ) where f : X → Y is injective . The last property “ sub-additivity under union ” is especially interesting in transfer learning settings where source task TX ; Y1 and target task TX ; Y2 have the same marginal for X ∼ pX ( x ) but different conditionals pY1|X ( y1 | x ) and pY2|X ( y2 | x ) . CQ ( X ; Y1 , Y2 ) refers to the complexity of task TX ; Y1 , Y2 , defined by pXY1Y2 ( x , y1 , y2 ) , where the corresponding sufficiency constraint in ( 2 ) becomes p ( y1 , y2|x ) = p ( y1 , y2|CodeEQ ( x ) ) ∀x ∈ X , y1 ∈ Y1 , y2 ∈ Y2 . ( 5 ) This property could potentially be exploited to predict the success of transfer learning for different choices of source and target tasks . Further , the assumption Y1 ⊥⊥ Y2 | X is not particularly strict as it simply implies given input X , knowledge of Y1 is not required to predict Y2 and vice-versa . -approximate task complexity . In practice , we are often interested in solving a task “ approximately ” rather than “ exactly ” . To accommodate this , we extend the definition of Sufficiency in ( 2 ) to -Approximate Sufficiency by relaxing it to d ( p ( y | x ) , p ( y | CodeEQ ( x ) ) ) ≤ ∀x ∈ X . Here , d is any distance-like metric on distributions such as the KL-divergence , total variation , Wasserstein distance , etc . ( Refer Appendix A.3 ) . Having established the above properties of our complexity measure , we note that unfortunately for any general query set Q , the problem in ( 2 ) is known to be NP-Complete and hence generally intractable ( Laurent & Rivest , 1976 ) . As a result , we instead consider a greedy approximation to CQ ( X ; Y ) via an algorithm called Information Pursuit ( IP ) introduced by Geman & Jedynak ( 1996 ) , which we describe in detail next . | The paper claims that existing measures of complexity such as entropy are not suitable for measuring task complexity since they focus on the complexity of X rather than the predictive relationship from X to Y. The paper argues that mutual information is not useful for comparing different learning tasks, as two tasks (MNIST vs Fashion-MNIST) can have similar MI but intuitively different complexity (second-to-last paragraph in related work). The paper proposes a measure for task complexity based on the number of queries required to predict a label of an input. The form of the queries is not specified, and the provided examples include half-space queries, single feature (decision-tree-like) queries, or high level semantic queries. The proposed method instead considers a query generator E, then encoding X as the answers to the sequence of queries generated by E, and predicting Y from the answers. The complexity of a task is related to the number of equivalence classes induced by the input X and the query generator E. | SP:66169cd52e7746d7ca61a767f7ae2c1693727025 |
Quantifying Task Complexity Through Generalized Information Measures | 1 INTRODUCTION . Deep networks have shown remarkable progress in both simple and complex machine learning tasks . But how does one measure the “ complexity ” of a learning task ? Is it possible to ascertain in a principled manner which tasks are “ harder ” to solve than others ? How “ close ” is one task to another ? Answers to these questions would have implications in many fields of machine learning such as transfer learning , multi-task learning , un/semi/self-supervised learning , and domain adaptation . In classical information theory , the entropy of a random variable X is a useful measure of complexity for tasks such as compression and transmission , which essentially require reconstructing X . However , the entropy ofX is insufficient for measuring the complexity of a supervised learning task TX , Y , where the goal is to predict an output Y from an input X , i.e. , to estimate the conditional pY |X ( y | x ) from a finite set of samples from pXY ( x , y ) , which we refer to as solving the learning task . Complexity measures provided by statistical learning theory like VC-dimension or covering numbers are also inadequate for this purpose because they ignore the dependence between X and Y for the particular task at hand . Information-theoretic measures such as mutual information , information bottleneck ( Tishby et al. , 2000 ) and its variants ( Strouse & Schwab , 2017 ) have been used to study the trade-off between model complexity and accuracy , but have not been developed to focus on assessing task complexity and can provide unsatisfactory results when comparing different tasks ( see Section 5 for details ) . Measures based on Kolmogorov complexity ( Li , 2006 ; Vereshchagin & Vitányi , 2004 ) could in principle be used to compare different tasks , but they are dataset permutation sensitive and not easily computable . The work of ( Achille et al. , 2019a ) proposes to quantify task complexity by measuring the information stored on the network weights , but the approach depends on the specific neural network architecture used for training . The work of ( Tran et al. , 2019 ) does not require or assume trained models , but makes strict assumptions that limit its broad applicability . In this work , we introduce a novel perspective on task complexity which generalizes classical measures from information theory . Specifically , one well-known interpretation of classical Shannon entropy is , given a random variable X , find the minimum number of bits that are needed on average to encode instances of X so that the instances can be perfectly recovered from the binary code . Stated differently , if one lets Q be defined as the set of all possible binary functions , on the domain of X , then Shannon entropy essentially asks what is the optimal sequence of queries to compute { q1 ( X ) , q2 ( X ) , . . . : qi ∈ Q } ( i.e. , how to encode X as a binary string ) so that X can be perfectly recovered from the shortest ( on average ) sequence of binary answers to the queries ( see Section 2 for more discussion of this interpretation ) . As discussed above , however , in most learning tasks we are not interested in simply compressing X but rather making a prediction about some other variable Y . Further , notions of complexity can potentially be made more relevant to a specific task by not having Q to be the set of all possible binary functions on X but rather a smaller set of queries specific to a measure of interest . From this intuition , we define the complexity of a learning task as the minimum expected number of queries , selected from a fixed set Q , one needs to ask to predict Y ( to some user-defined level of confidence ) from the respective answers to the queries . As a few specific examples of potential query sets : • Decision boundary complexity : Here , Q is the the set of all possible half-spaces in Rd ( assuming X ∈ Rd ) and q ( x ) is a binary function response indicating whether x lies in a particular half-space ( q ∈ Q ) . Then task complexity formalizes the intuition of “ level of non-linearity ” of the decision boundary . For example , the complexity of any linearly-separable binary classification task is 1 , whereas , for a non-linearly separable task , this value depends on the curvature of the decision boundary . • Task-specific input feature complexity : Here , Q is the set of projection functions of X and q is of the form q ( x ) = xq , where xq is the value observed at the qth entry of x . Then task complexity formalizes the intuition “ the greater the redundancy between the input features the easier it is to solve the task ” . For example , Y being a constant function of X would be the simplest task with complexity 0 , since no feature needs to be queried to predict it . This notion of complexity would help in answering questions such as “ which input features are most important for solving a given task ? ” and could in turn help in developing more “ interpretable ” learning algorithms . • Visual semantic complexity : Given a vocabulary V of different possible entities , their attributes and relations in a visual scene , Q could be the set of all binary functions indicating the presence or absence of an entity , its attribute or its relation with other entities ( supplied by V ) in a designated region of the image X . For example , a particular q could be the function implementing the query “ Is there a person in the top left corner of the image ? ” . This notion of complexity would allow one to gauge the semantic complexity of a visual task . For instance , tasks which ask complex questions like “ Is there a person playing with his dog , next to a river in the image ? ” would inherently be more complex than simple object detection tasks , “ Where is the dog in this image ? ” and could be quantified by semantically relevant queries . While our proposed formal definition of task complexity will be applicable to all such choices of query functions { q } q∈Q and enjoys several nice theoretical properties that we discuss in section 2 , its computation will generally be intractable . As a result , in section 3 we propose to reduce the complexity of selecting a minimal set of questions by using the Information Pursuit ( IP ) algorithm , which selects questions sequentially , depending on previous questions and answers , in order of information gain . While IP is generally applicable to any task and query set , its implementation is still intractable depending on the complexity of the model p ( X , Y ) and of the set Q . To address this issue , we posit a tractable graphical model for p ( X , Y ) and learn the required distributions using variational autoencoders and normalizing flows . In section 4 we evaluate our approach on various binary image classification tasks ( MNIST , KMNIST , FashionMNIST , Caltech Silhouettes ) that can be tackled using a common set of queries ( the set of image patches ) . Our results show that complexity computed using patch queries aligns with the intuition that the complexity of a classification task increases as signal-to-noise ratio decreases , and that classification of the KMNIST dataset is more complex than classification of the FashionMNIST dataset , something that isn ’ t obvious a priori . While these experiments are restricted to simple tasks and queries , the proposed framework is generally applicable provided that tractable models , inference and learning methods can be developed , which is the subject of ongoing and future work . Finally , we note that to the best of our knowledge , this is the first time that a subjective notion of task complexity has been proposed in literature , where the user can incorporate in Q the perception of complexity he/she wishes to measure . 2 QUANTIFYING TASK COMPLEXITY . Let the input data be represented by random variable X and the corresponding output/hypothesis by random variable Y with sample spaces X and Y respectively . A supervised learning task TX ; Y is defined as the task of estimating the conditional distribution pY |X ( y | x ) from a finite set of samples from the joint distribution pXY ( x , y ) .1 We propose to quantify the complexity of a task as the minimum expected number of queries needed to solve the task . Queries , q ∈ Q , are functions of the input data , whose answers for a given x are denoted as { q ( x ) } q∈Q . Naturally , the query set needs to be sufficiently rich so that the task is solvable based on answers to the queries . More formally , we say the set Q is sufficient for task TX ; Y if ∀ ( x , y ) ∈ X × Y , p ( y | x ) = p ( y | { x′ ∈ X : q ( x′ ) = q ( x ) ∀q ∈ Q } ) . ( 1 ) In other words , Q is sufficient for task TX ; Y if whenever two points x and x′ have identical answers for all queries in Q , then their true posteriors must be equal , p ( y | x ) = p ( y | x′ ) . Given a fixed query set Q , we now formally define an encoding function EQ , which we refer to as a Q-Coder , along with our proposed complexity measure CQ ( X , Y ) for task TX , Y . Defining the Encoder function . Given a query set Q , an Encoder is a function , E : S∗ → Q where S∗ is the set of all finite-length sequences generated using elements from the set S = { ( q , q ( x ) ) | q ∈ Q , x ∈ X } . Additionally , we require that Q contains a special query qSTOP which signals the encoder to stop asking queries and outputs the code for x as the set of query-answer pairs that have been asked . The process can be described as follows , given E and input sample x . 1. q1 = E ( ∅ ) . The first question is independent of x . 2. qk+1 = E ( { qi , qi ( x ) } 1 : k ) . All subsequent queries depend on the query-answer pairs ob- served so far for x . 3 . If qL+1 = qSTOP terminate and return CodeEQ ( x ) : = ( qi , qi ( x ) ) 1 : L as the code for x . Note that each qi depends on x , but we drop this in the notation for brevity . Note also that the number of queries L = |CodeEQ ( x ) | for a particular x generalizes coding length in information theory . The query qSTOP constrains the code CodeEQ ( x ) to be prefix-free . Defining task complexity . Given a joint distribution pXY ( x , y ) and a sufficient query set Q , we define task complexity , CQ ( X ; Y ) , as the minimum over all encoders E ( which are mappings from X to a subset of queries in Q ) of the mean coding length : CQ ( X ; Y ) : = min E EX [ |CodeEQ ( X ) | ] s.t . p ( y | x ) = p ( y | CodeEQ ( x ) ) ∀x ∈ X , y ∈ Y ( Sufficiency ) ( 2 ) Figure 1 : Schematic view of the overall framework for quantifying complexity of a task TX ; Y . The first constraint ensures sufficiency of the code ∀x ∈ X . By this we mean that there exists at least one Encoder E for which the first constraint of “ sufficiency ” is satisfied , where p ( y | CodeEQ ( x ) ) should be interpreted as the conditional probability of y given the event { x′ ∈ X | CodeEQ ( x ) = CodeEQ ( x′ ) } . The solution to ( 2 ) provides the optimal encoder for task TX ; Y , and Fig . 1 illustrates the overall framework in detail . Connection with Shannon entropy H . It can be shown that when Q is taken as the set for all possible binary questions on X and if Y is a function of X ( which it usually is for supervised classification problems ( Kolchinsky et al. , 2018 ) ) , then the solution , E∗ , to ( 2 ) gives a coding length within one bit of the entropy of Y , denoted as H ( Y ) . More formally , one can show that H ( Y ) ≤ CQ ( X ; Y ) = EX [ |CodeE ∗ Q ( X ) | ] < H ( Y ) + 1 . ( 3 ) 1As commonly used , we denote random variables by capital letters and their realizations with small letters . Note that one example of such an optimal encoder , E∗ ( x ) , is given by the Huffman code for Y . Connection with task complexity & equivalence classes . Notions of complexity of an entity/object , often relate to the level of structural regularity present in the entity ( Gell-Mann , 2002 ) . CQ ( X ; Y ) measures the degree of regularity present in the structure of TX ; Y . This structure is implicitly defined by the conditional pY |X ( y | x ) and the query set Q . Notice that any E partitions X into equivalence classes . [ x ] = { x′ ∈ X | CodeEQ ( x ) = CodeEQ ( x′ ) } . ( 4 ) The prefix-free constraint on the codes generated by E ( due to ) ensures that ∀x′ ∈ [ x ] , ∀y ∈ Y , pY |X=x′ ( y ) = pY |X=x ( y ) . It is then natural to relate task complexity with the number of equivalence classes induced by the optimal E∗ . The greater the number of equivalence classes , the higher the complexity of the task . This is because knowing the distribution pY |X ( y | x′ ) for any one element x′ in each equivalence class is sufficient to predict Y . An extreme case of this would be the constant function which arguably has the simplest possible structure of any task TX , Y . The equivalence class in this case is just X since pY |X ( y | x ) is same for all x ∈ X . Thus , the number of equivalence classes for the constant function is 1 ( the minimum possible ) . This is expected since for a constant function there is no structure to learn from data whatsoever ! The following lemma ( see Appendix A.1 for a proof ) relates CQ ( X ; Y ) and the number of equivalence classes , the latter being not easy to compute from finite samples . Proposition 1 . Given a finite query set Q , b-valued query-answers { q ( X ) } q∈Q and any δ > 0 , the number of equivalence classes induced by the minimizer of ( 2 ) can be upper bounded by bCQ ( X ; Y ) +|Q| √ 2 log ( 1δ ) ) with probability of misclassifying X at most δ . Proposition 1 indicates that for the sameQ , tasks with greaterCQ ( X ; Y ) will have larger complexity ( by comparing the upper bound on the number of equivalence classes ) . This also illustrates the role different bases play . For example , in visual recognition tasks if one queries intensities of all the pixels in the image at once then CQ ( X ; Y ) = 1 ( Observing intensities at all the pixels is sufficient information to predict Y from X ) . However b in that case would be large ( exponential in the size of the image ) . Instead if one queries individual pixels , b would be the number of intensity values each pixel can take but CQ ( X ; Y ) ≥ 1 . Properties of CQ ( X ; Y ) . The following proposition , whose proof can be found in Appendix A.2 , establishes some key properties of our proposed measure of complexity . Proposition 2 . For any query setQ that is sufficient for task TX , Y , CQ ( X ; Y ) satisfies the following properties : 1 . CQ ( X ; Y ) ≥ 0 . ( non-negativity ) 2 . CQ ( X ; Y ) = 0 iff X ⊥⊥ Y . ( trivial structure ) 3 . If ∀x , x′ ∈ X , x 6= x′ , ∃y ∈ Y , such that pY |X=x ( y ) 6= pY |X=x′ ( y ) , then CQ ( X ; Y ) ≥ CQ ( X ; Ỹ ) for all tasks TX , Ỹ provided Q is sufficient for TX , Ỹ . ( total structure ) 4 . CQ ( X ; Y1 , Y2 ) ≤ CQ ( X ; Y1 ) + CQ ( X ; Y2 ) for any two tasks with X ∼ pX ( x ) and Y1 ⊥⊥ Y2 | X . ( sub-additivity under union ) The property “ trivial structure ” captures the fact that if Y is independent of X , the learning task is trivial ( i.e. , there is nothing to be learned about Y from observing X or functions of X ) . The property “ total structure ” captures the intuition that if for a given task TX ; Y , the conditional distribution functioini pY |X=x ( y ) is different ∀x ∈ X , then learning is “ impossible ” ( assume Y is a categorical variable , which it is for most classification tasks ) as no inductive bias would help in generalization to unseen inputs for such a task . For example , Y = f ( X ) where f : X → Y is injective . The last property “ sub-additivity under union ” is especially interesting in transfer learning settings where source task TX ; Y1 and target task TX ; Y2 have the same marginal for X ∼ pX ( x ) but different conditionals pY1|X ( y1 | x ) and pY2|X ( y2 | x ) . CQ ( X ; Y1 , Y2 ) refers to the complexity of task TX ; Y1 , Y2 , defined by pXY1Y2 ( x , y1 , y2 ) , where the corresponding sufficiency constraint in ( 2 ) becomes p ( y1 , y2|x ) = p ( y1 , y2|CodeEQ ( x ) ) ∀x ∈ X , y1 ∈ Y1 , y2 ∈ Y2 . ( 5 ) This property could potentially be exploited to predict the success of transfer learning for different choices of source and target tasks . Further , the assumption Y1 ⊥⊥ Y2 | X is not particularly strict as it simply implies given input X , knowledge of Y1 is not required to predict Y2 and vice-versa . -approximate task complexity . In practice , we are often interested in solving a task “ approximately ” rather than “ exactly ” . To accommodate this , we extend the definition of Sufficiency in ( 2 ) to -Approximate Sufficiency by relaxing it to d ( p ( y | x ) , p ( y | CodeEQ ( x ) ) ) ≤ ∀x ∈ X . Here , d is any distance-like metric on distributions such as the KL-divergence , total variation , Wasserstein distance , etc . ( Refer Appendix A.3 ) . Having established the above properties of our complexity measure , we note that unfortunately for any general query set Q , the problem in ( 2 ) is known to be NP-Complete and hence generally intractable ( Laurent & Rivest , 1976 ) . As a result , we instead consider a greedy approximation to CQ ( X ; Y ) via an algorithm called Information Pursuit ( IP ) introduced by Geman & Jedynak ( 1996 ) , which we describe in detail next . | This paper proposes a method to quantify the complexity of a learning task. The paper is motivated from the “20 questions“ game where an agent computes the answer (label) via a sequence of questions asked on the input data with answers given by an Oracle (simple functions of the data, in this case). The authors formalize this process and define the complexity of a learning task as the smallest number of questions from a given set Q necessary to predict the labels accurately averaged across the dataset. Information Pursuit (IP) of Geman & Jedynak 1996 is used to instantiate this definition using variational and normalizing-flow based models to learn the conditional distributions. Experimental results are shown for MNIST, Fashion-MNIST, KMNIST and Caltech Silhouettes datasets. | SP:66169cd52e7746d7ca61a767f7ae2c1693727025 |
On the Certified Robustness for Ensemble Models and Beyond | 1 INTRODUCTION . Deep neural networks ( DNN ) have been widely applied in various applications , such as image classification ( Krizhevsky , 2012 ; He et al. , 2016 ) , face recognition ( Sun et al. , 2014 ) , and natural language processing ( Vaswani et al. , 2017 ; Devlin et al. , 2019 ) . However , it is well-known that DNNs are vulnerable to adversarial examples ( Szegedy et al. , 2013 ; Carlini & Wagner , 2017 ; Xiao et al. , 2018a ; b ; Bhattad et al. , 2020 ; Bulusu et al. , 2020 ) , and it has raised great concerns especially when DNNs are deployed in safety-critical applications such as autonomous driving and facial recognition . To defend against such attacks , several empirical defenses have been proposed ( Papernot et al. , 2016b ; Madry et al. , 2018 ) ; however , many of them have been attacked again by strong adaptive attackers ( Athalye et al. , 2018 ; Tramer et al. , 2020 ) . To end such repeated game between the attackers and defenders , certified defenses ( Wong & Kolter , 2018 ; Cohen et al. , 2019 ) have been proposed to provide the robustness guarantees for given ML models , so that no additional attack can break the model under certain adversarial constraints . For instance , randomized smoothing has been proposed as an effective defense providing certified robustness ( Lecuyer et al. , 2019 ; Cohen et al. , 2019 ; Yang et al. , 2020a ) . Among different certified robustness approaches ( Weng et al. , 2018 ; Xu et al. , 2020 ; Li et al. , 2020a ) , randomized smoothing provides a model-independent way to smooth a given ML model and achieves state-of-the-art certified robustness on large-scale datasets such as ImageNet . Currently , all the existing certified defense approaches focus on the robustness of a single ML model . Given the observations that ensemble ML models are able to bring additional benefits in standard learning ( Opitz & Maclin , 1999 ; Rokach , 2010 ) , in this work we aim to ask : Can an ensemble ML model provide additional benefits in terms of the certified robustness compared with a single model ? If so , what are the sufficient and necessary conditions to guarantee such certified robustness gain ? Empirically , we first find that standard ensemble models only achieve marginally higher certified robustness by directly appling randomized smoothing : with L2 perturbation radius 1.5 , a single model achieves certified accuracy as 21.9 % , while the average aggregation based ensemble of three models achieves certified accuracy as 24.2 % on CIFAR-10 ( Table 2 ) . Given such observations , next we aim to answer : How to improve the certified robustness of ensemble ML models ? What types of conditions are required to improve the certified robustness for ML ensembles ? In particular , from the theoretical perspective , we analyze the standard Weighted Ensemble ( WE ) and Max-Margin Ensemble ( MME ) protocols , and prove the sufficient and necessary conditions for the certifiably robust ensemble models under model-smoothness assumption . Specifically , we prove that : ( 1 ) an ensemble ML model is more certifiably robust than each single base model ; ( 2 ) diversified gradients and large confidence margins of base models are the sufficient and necessary conditions for the certifiably robust ML ensembles . We show that these two key factors would lead to higher certified robustness for ML ensembles . We further propose Ensemble-before-Smoothing as the model smoothing strategy and prove the bounded model-smoothness with such strategy , which realizes our model-smoothness assumption . Inspired by our theoretical analysis , we propose Diversity-Regularized Training ( DRT ) , a lightweight regularization-based ensemble training approach . DRT is composed of two simple yet effective and general regularizers to promote the diversified gradients and large confidence margins respectively . DRT can be easily combined with existing ML approaches for training smoothed models , such as Gaussian augmentation ( Cohen et al. , 2019 ) and adversarial smoothed training ( Salman et al. , 2019 ) , with negligible training time overhead while achieves significantly higher certified robustness than state-of-the-art approaches consistently . We conduct extensive experiments on a wide range of datasets including MNIST , CIFAR-10 , and ImageNet . The experimental results show that DRT can achieve significantly higher certified robustness compared to baselines with similar training cost as training a single model . Furthermore , as DRT is flexible to integrate any base models , by using the pretrained robust single ML models as base models , DRT achieves the highest certified robustness so far to our best knowledge . For instance , on CIFAR-10 under L2 radius 1.5 , the DRT-trained ensemble with three base models improves the certified accuracy from SOTA 24.2 % to 30.3 % ; and under L2 radius 2.0 , DRT improves the certified accuracy from SOTA 16.0 % to 20.3 % . Technical Contributions . In this paper , we conduct the first study for the sufficient and necessary conditions of certifiably robust ML ensembles and propose an efficient training algorithm DRT to achieve the state-of-the-art certified robustness . We make contributions on both theoretical and empirical fronts . • We provide the necessary and sufficient conditions for robust ensemble ML models including Weighted Ensemble ( WE ) and Max-Margin Ensemble ( MME ) under the model-smoothness assumption . In particular , we prove that the diversified gradients and large confidence margins of base models are the sufficient and necessary conditions of certifiably robust ensembles . We also prove the bounded model-smoothness via proposed Ensemble-before-Smoothing strategy , which realizes our model-smoothness assumption . • To analyze different ensembles , we prove that when the adversarial transferability among base models is low , WE is more robust than MME . We also prove that the ML ensemble is more robust than a single base model under the model-smoothness assumption . • Based on the theoretical analysis of the sufficient and necessary conditions , we propose DRT , a lightweight regularization-based training approach that can be easily combined with different training approaches and ensemble protocols with small training cost overhead . • We conduct extensive experiments to evaluate the effectiveness of DRT on various datasets , and we show that to the best of your knowledge , DRT can achieve the highest certified robustness , outperforming all existing baselines . Related work . DNNs are known vulnerable to adversarial examples ( Szegedy et al. , 2013 ) . To defend against such attacks , several empirical defenses have been proposed ( Papernot et al. , 2016b ; Madry et al. , 2018 ) . For ensemble models , existing work mainly focuses on empirical robustness ( Pang et al. , 2019 ; Li et al. , 2020b ; Cheng et al. , 2021 ) where the robustness is measured by accuracy under existing attacks and no certified robustness guarantee could be provided or enhanced ; or certify the robustness for a standard weighted ensemble ( Zhang et al. , 2019 ; Liu et al. , 2020 ) using either LP-based ( Zhang et al. , 2018 ) verification or randomized smoothing without considering the model diversity ( Liu et al. , 2020 ) to boost their certified robustness . In this paper , we aim to prove that the diversified gradient and large confidence margin are the sufficient and necessary conditions for certifiably robust ensemble ML models . Moreover , to our best knowledge , we propose the first training approach to boost the certified robustness of ensemble ML models . Randomized smoothing ( Lecuyer et al. , 2019 ; Cohen et al. , 2019 ) has been proposed to provide certified robustness for a single ML model . It achieved the state-of-the-art certified robustness on large-scale dataset such as ImageNet and CIFAR-10 under L2 norm . Several approaches have been proposed to further improve it by : ( 1 ) choosing different smoothing distributions for different Lp norms ( Dvijotham et al. , 2019 ; Zhang et al. , 2020 ; Yang et al. , 2020a ) , and ( 2 ) training more robust smoothed classifiers , using data augmentation ( Cohen et al. , 2019 ) , unlabeled data ( Carmon et al. , 2019 ) , adversarial training ( Salman et al. , 2019 ) , regularization ( Li et al. , 2019 ; Zhai et al. , 2019 ) , and denoising ( Salman et al. , 2020 ) . In this paper , we compare and propose a suitable smoothing strategy to improve the certified robustness of ML ensembles . 2 CHARACTERIZING ML ENSEMBLE ROBUSTNESS . In this section , we prove the sufficient and necessary robustness conditions for both general and smoothed ML ensemble models . Based on these robustness conditions , we discuss the key factors for improving the certified robustness of an ensemble , compare the robustness of ensemble models with single models , and outline several findings based on additional theoretical analysis . 2.1 PRELIMINARIES . Notations . Throughout the paper , we consider the classification task with C classes . We first define the classification scoring function f : Rd → ∆C , which maps the input to a confidence vector , and f ( x ) i represents the confidence for the ith class . We mainly focus on the confidence after normalization , i.e. , f ( x ) ∈ ∆C = { p ∈ RC≥0 : ‖p‖1 = 1 } in the probability simplex . To characterize the confidence margin between two classes , we define fy1/y2 ( x ) : = f ( x ) y1 − f ( x ) y2 . The corresponding prediction F : Rd → [ C ] is defined by F ( x ) : = arg maxi∈ [ C ] f ( x ) i . We are also interested in the runner-up prediction F ( 2 ) ( x ) : = arg maxi∈ [ C ] : i 6=F ( x ) f ( x ) i. r-Robustness . For brevity , we consider the model ’ s certified robustness , against the L2-bounded perturbations as defined below . Our analysis can be generalizable for L1 and L∞ perturbations , leveraging existing work ( Li et al. , 2019 ; Yang et al. , 2020a ; Levine & Feizi , 2021 ) . Definition 1 ( r-Robustness ) . For a prediction function F : Rd → [ C ] and input x0 , if all instance x ∈ { x0 + δ : ‖δ‖2 < r } satisfies F ( x ) = F ( x0 ) , we say model F is r-robust ( at point x0 ) . Ensemble Protocols . An ensemble model contains N base models { Fi } Ni=1 , where Fi ( x ) and F ( 2 ) i ( x ) are their top and runner-up predictions for given input x respectively . The ensemble prediction is denoted by M : Rd → [ C ] , which is computed based on outputs of base models following certain ensemble protocols . In this paper , we consider both Weighted Ensemble ( WE ) and Maximum Margin Ensemble ( MME ) . Definition 2 ( Weighted Ensemble ( WE ) ) . Given N base models { Fi } Ni=1 , and the weight vector { wi } Ni=1 ∈ RN+ , the weighted ensembleMWE : Rd → [ C ] is defined by MWE ( x0 ) : = arg max i∈ [ C ] N∑ j=1 wjfj ( x0 ) i . ( 1 ) Definition 3 ( Max-Margin Ensemble ( MME ) ) . Given N base models { Fi } Ni=1 , for input x0 , the max-margin ensemble modelMMME : Rd → [ C ] is defined by MMME ( x0 ) : = Fc ( x0 ) where c = arg max i∈ [ N ] ( fi ( x0 ) Fi ( x0 ) − fi ( x0 ) F ( 2 ) i ( x0 ) ) . ( 2 ) The commonly-used WE ( Zhang et al. , 2019 ; Liu et al. , 2020 ) sums up the weighted confidence of base models { Fi } Ni=1 with weight vector { wi } Ni=1 , and predicts the class with the highest weighted confidence . The standard average ensemble can be viewed as a special case of WE ( where all wi ’ s are equal ) . MME chooses the base model with the largest confidence margin between the top and the runner-up classes , which is a direct extension from max-margin training ( Huang et al. , 2008 ) . Randomized Smoothing . Randomized smoothing ( Lecuyer et al. , 2019 ; Cohen et al. , 2019 ) provides certified robustness by constructing a smoothed model from a given model . Formally , let ε ∼ N ( 0 , σ2Id ) be a Gaussian random variable , for any given model F : Rd → [ C ] ( can be an ensemble ) , we define smoothed confidence function gεF : Rd →∆C such that gεF ( x ) j : = E ε∼N ( 0 , σ2Id ) I [ F ( x+ ε ) = j ] = Pr ε∼N ( 0 , σ2Id ) ( F ( x+ ε ) = j ) . ( 3 ) Intuitively , gεF ( x ) j is the probability of base model F ’ s prediction on the jth class given Gaussian smoothed input . The smoothed classifier GεF : Rd → [ C ] outputs the class with highest smoothed confidence : GεF ( x ) : = arg maxj∈ [ C ] g ε F ( x ) j . Let cA be the predicted class for input x0 , i.e. , cA : = G ε F ( x0 ) . Cohen et al . show that G ε F is ( σΦ −1 ( gεF ( x0 ) cA ) ) -robust at input x0 , i.e. , the certified radius is σΦ−1 ( gεF ( x0 ) cA ) where Φ −1 is the inverse cumulative distribution function of standard normal distribution . In practice , we will leverage the smoothing strategy together with Monte-Carlo sampling to certify ensemble robustness . More details can be found in Appendix A . | Certified robustness approaches have been studied for single models based on interval propagation as well as randomized smoothing. The use of ensembles for empirical robustness has also been studied in the literature. This paper attempts to theoretically study the certifiable defense achieved by ensembles. The paper analyzes the standard Weighted Ensemble (WE) and MaxMargin Ensemble (MME) protocols, and proves the necessary and sufficient conditions for robustness under smoothness assumptions. The key idea is to show and utilize the diversification of gradients and large confidence margins. | SP:6a3c4ae05d582f8896840483b08c735ced2976bc |
On the Certified Robustness for Ensemble Models and Beyond | 1 INTRODUCTION . Deep neural networks ( DNN ) have been widely applied in various applications , such as image classification ( Krizhevsky , 2012 ; He et al. , 2016 ) , face recognition ( Sun et al. , 2014 ) , and natural language processing ( Vaswani et al. , 2017 ; Devlin et al. , 2019 ) . However , it is well-known that DNNs are vulnerable to adversarial examples ( Szegedy et al. , 2013 ; Carlini & Wagner , 2017 ; Xiao et al. , 2018a ; b ; Bhattad et al. , 2020 ; Bulusu et al. , 2020 ) , and it has raised great concerns especially when DNNs are deployed in safety-critical applications such as autonomous driving and facial recognition . To defend against such attacks , several empirical defenses have been proposed ( Papernot et al. , 2016b ; Madry et al. , 2018 ) ; however , many of them have been attacked again by strong adaptive attackers ( Athalye et al. , 2018 ; Tramer et al. , 2020 ) . To end such repeated game between the attackers and defenders , certified defenses ( Wong & Kolter , 2018 ; Cohen et al. , 2019 ) have been proposed to provide the robustness guarantees for given ML models , so that no additional attack can break the model under certain adversarial constraints . For instance , randomized smoothing has been proposed as an effective defense providing certified robustness ( Lecuyer et al. , 2019 ; Cohen et al. , 2019 ; Yang et al. , 2020a ) . Among different certified robustness approaches ( Weng et al. , 2018 ; Xu et al. , 2020 ; Li et al. , 2020a ) , randomized smoothing provides a model-independent way to smooth a given ML model and achieves state-of-the-art certified robustness on large-scale datasets such as ImageNet . Currently , all the existing certified defense approaches focus on the robustness of a single ML model . Given the observations that ensemble ML models are able to bring additional benefits in standard learning ( Opitz & Maclin , 1999 ; Rokach , 2010 ) , in this work we aim to ask : Can an ensemble ML model provide additional benefits in terms of the certified robustness compared with a single model ? If so , what are the sufficient and necessary conditions to guarantee such certified robustness gain ? Empirically , we first find that standard ensemble models only achieve marginally higher certified robustness by directly appling randomized smoothing : with L2 perturbation radius 1.5 , a single model achieves certified accuracy as 21.9 % , while the average aggregation based ensemble of three models achieves certified accuracy as 24.2 % on CIFAR-10 ( Table 2 ) . Given such observations , next we aim to answer : How to improve the certified robustness of ensemble ML models ? What types of conditions are required to improve the certified robustness for ML ensembles ? In particular , from the theoretical perspective , we analyze the standard Weighted Ensemble ( WE ) and Max-Margin Ensemble ( MME ) protocols , and prove the sufficient and necessary conditions for the certifiably robust ensemble models under model-smoothness assumption . Specifically , we prove that : ( 1 ) an ensemble ML model is more certifiably robust than each single base model ; ( 2 ) diversified gradients and large confidence margins of base models are the sufficient and necessary conditions for the certifiably robust ML ensembles . We show that these two key factors would lead to higher certified robustness for ML ensembles . We further propose Ensemble-before-Smoothing as the model smoothing strategy and prove the bounded model-smoothness with such strategy , which realizes our model-smoothness assumption . Inspired by our theoretical analysis , we propose Diversity-Regularized Training ( DRT ) , a lightweight regularization-based ensemble training approach . DRT is composed of two simple yet effective and general regularizers to promote the diversified gradients and large confidence margins respectively . DRT can be easily combined with existing ML approaches for training smoothed models , such as Gaussian augmentation ( Cohen et al. , 2019 ) and adversarial smoothed training ( Salman et al. , 2019 ) , with negligible training time overhead while achieves significantly higher certified robustness than state-of-the-art approaches consistently . We conduct extensive experiments on a wide range of datasets including MNIST , CIFAR-10 , and ImageNet . The experimental results show that DRT can achieve significantly higher certified robustness compared to baselines with similar training cost as training a single model . Furthermore , as DRT is flexible to integrate any base models , by using the pretrained robust single ML models as base models , DRT achieves the highest certified robustness so far to our best knowledge . For instance , on CIFAR-10 under L2 radius 1.5 , the DRT-trained ensemble with three base models improves the certified accuracy from SOTA 24.2 % to 30.3 % ; and under L2 radius 2.0 , DRT improves the certified accuracy from SOTA 16.0 % to 20.3 % . Technical Contributions . In this paper , we conduct the first study for the sufficient and necessary conditions of certifiably robust ML ensembles and propose an efficient training algorithm DRT to achieve the state-of-the-art certified robustness . We make contributions on both theoretical and empirical fronts . • We provide the necessary and sufficient conditions for robust ensemble ML models including Weighted Ensemble ( WE ) and Max-Margin Ensemble ( MME ) under the model-smoothness assumption . In particular , we prove that the diversified gradients and large confidence margins of base models are the sufficient and necessary conditions of certifiably robust ensembles . We also prove the bounded model-smoothness via proposed Ensemble-before-Smoothing strategy , which realizes our model-smoothness assumption . • To analyze different ensembles , we prove that when the adversarial transferability among base models is low , WE is more robust than MME . We also prove that the ML ensemble is more robust than a single base model under the model-smoothness assumption . • Based on the theoretical analysis of the sufficient and necessary conditions , we propose DRT , a lightweight regularization-based training approach that can be easily combined with different training approaches and ensemble protocols with small training cost overhead . • We conduct extensive experiments to evaluate the effectiveness of DRT on various datasets , and we show that to the best of your knowledge , DRT can achieve the highest certified robustness , outperforming all existing baselines . Related work . DNNs are known vulnerable to adversarial examples ( Szegedy et al. , 2013 ) . To defend against such attacks , several empirical defenses have been proposed ( Papernot et al. , 2016b ; Madry et al. , 2018 ) . For ensemble models , existing work mainly focuses on empirical robustness ( Pang et al. , 2019 ; Li et al. , 2020b ; Cheng et al. , 2021 ) where the robustness is measured by accuracy under existing attacks and no certified robustness guarantee could be provided or enhanced ; or certify the robustness for a standard weighted ensemble ( Zhang et al. , 2019 ; Liu et al. , 2020 ) using either LP-based ( Zhang et al. , 2018 ) verification or randomized smoothing without considering the model diversity ( Liu et al. , 2020 ) to boost their certified robustness . In this paper , we aim to prove that the diversified gradient and large confidence margin are the sufficient and necessary conditions for certifiably robust ensemble ML models . Moreover , to our best knowledge , we propose the first training approach to boost the certified robustness of ensemble ML models . Randomized smoothing ( Lecuyer et al. , 2019 ; Cohen et al. , 2019 ) has been proposed to provide certified robustness for a single ML model . It achieved the state-of-the-art certified robustness on large-scale dataset such as ImageNet and CIFAR-10 under L2 norm . Several approaches have been proposed to further improve it by : ( 1 ) choosing different smoothing distributions for different Lp norms ( Dvijotham et al. , 2019 ; Zhang et al. , 2020 ; Yang et al. , 2020a ) , and ( 2 ) training more robust smoothed classifiers , using data augmentation ( Cohen et al. , 2019 ) , unlabeled data ( Carmon et al. , 2019 ) , adversarial training ( Salman et al. , 2019 ) , regularization ( Li et al. , 2019 ; Zhai et al. , 2019 ) , and denoising ( Salman et al. , 2020 ) . In this paper , we compare and propose a suitable smoothing strategy to improve the certified robustness of ML ensembles . 2 CHARACTERIZING ML ENSEMBLE ROBUSTNESS . In this section , we prove the sufficient and necessary robustness conditions for both general and smoothed ML ensemble models . Based on these robustness conditions , we discuss the key factors for improving the certified robustness of an ensemble , compare the robustness of ensemble models with single models , and outline several findings based on additional theoretical analysis . 2.1 PRELIMINARIES . Notations . Throughout the paper , we consider the classification task with C classes . We first define the classification scoring function f : Rd → ∆C , which maps the input to a confidence vector , and f ( x ) i represents the confidence for the ith class . We mainly focus on the confidence after normalization , i.e. , f ( x ) ∈ ∆C = { p ∈ RC≥0 : ‖p‖1 = 1 } in the probability simplex . To characterize the confidence margin between two classes , we define fy1/y2 ( x ) : = f ( x ) y1 − f ( x ) y2 . The corresponding prediction F : Rd → [ C ] is defined by F ( x ) : = arg maxi∈ [ C ] f ( x ) i . We are also interested in the runner-up prediction F ( 2 ) ( x ) : = arg maxi∈ [ C ] : i 6=F ( x ) f ( x ) i. r-Robustness . For brevity , we consider the model ’ s certified robustness , against the L2-bounded perturbations as defined below . Our analysis can be generalizable for L1 and L∞ perturbations , leveraging existing work ( Li et al. , 2019 ; Yang et al. , 2020a ; Levine & Feizi , 2021 ) . Definition 1 ( r-Robustness ) . For a prediction function F : Rd → [ C ] and input x0 , if all instance x ∈ { x0 + δ : ‖δ‖2 < r } satisfies F ( x ) = F ( x0 ) , we say model F is r-robust ( at point x0 ) . Ensemble Protocols . An ensemble model contains N base models { Fi } Ni=1 , where Fi ( x ) and F ( 2 ) i ( x ) are their top and runner-up predictions for given input x respectively . The ensemble prediction is denoted by M : Rd → [ C ] , which is computed based on outputs of base models following certain ensemble protocols . In this paper , we consider both Weighted Ensemble ( WE ) and Maximum Margin Ensemble ( MME ) . Definition 2 ( Weighted Ensemble ( WE ) ) . Given N base models { Fi } Ni=1 , and the weight vector { wi } Ni=1 ∈ RN+ , the weighted ensembleMWE : Rd → [ C ] is defined by MWE ( x0 ) : = arg max i∈ [ C ] N∑ j=1 wjfj ( x0 ) i . ( 1 ) Definition 3 ( Max-Margin Ensemble ( MME ) ) . Given N base models { Fi } Ni=1 , for input x0 , the max-margin ensemble modelMMME : Rd → [ C ] is defined by MMME ( x0 ) : = Fc ( x0 ) where c = arg max i∈ [ N ] ( fi ( x0 ) Fi ( x0 ) − fi ( x0 ) F ( 2 ) i ( x0 ) ) . ( 2 ) The commonly-used WE ( Zhang et al. , 2019 ; Liu et al. , 2020 ) sums up the weighted confidence of base models { Fi } Ni=1 with weight vector { wi } Ni=1 , and predicts the class with the highest weighted confidence . The standard average ensemble can be viewed as a special case of WE ( where all wi ’ s are equal ) . MME chooses the base model with the largest confidence margin between the top and the runner-up classes , which is a direct extension from max-margin training ( Huang et al. , 2008 ) . Randomized Smoothing . Randomized smoothing ( Lecuyer et al. , 2019 ; Cohen et al. , 2019 ) provides certified robustness by constructing a smoothed model from a given model . Formally , let ε ∼ N ( 0 , σ2Id ) be a Gaussian random variable , for any given model F : Rd → [ C ] ( can be an ensemble ) , we define smoothed confidence function gεF : Rd →∆C such that gεF ( x ) j : = E ε∼N ( 0 , σ2Id ) I [ F ( x+ ε ) = j ] = Pr ε∼N ( 0 , σ2Id ) ( F ( x+ ε ) = j ) . ( 3 ) Intuitively , gεF ( x ) j is the probability of base model F ’ s prediction on the jth class given Gaussian smoothed input . The smoothed classifier GεF : Rd → [ C ] outputs the class with highest smoothed confidence : GεF ( x ) : = arg maxj∈ [ C ] g ε F ( x ) j . Let cA be the predicted class for input x0 , i.e. , cA : = G ε F ( x0 ) . Cohen et al . show that G ε F is ( σΦ −1 ( gεF ( x0 ) cA ) ) -robust at input x0 , i.e. , the certified radius is σΦ−1 ( gεF ( x0 ) cA ) where Φ −1 is the inverse cumulative distribution function of standard normal distribution . In practice , we will leverage the smoothing strategy together with Monte-Carlo sampling to certify ensemble robustness . More details can be found in Appendix A . | This paper studies the following problem: How to train a certifiably robust classifier with ensemble methods? The authors considered two types of ensembles: the weighted-average ensemble and large-margin ensemble. They first derived theoretically sufficient and necessary conditions for robustness under two types of ensembles, with the conclusion that large confidence margin and diversified gradients are two factors which contributes to the robustness of ensemble models. Diversity-regularized training, a method of designing loss functions for training ensemble models, is proposed motivated by their theoretical findings. They applied this methodology to randomized smoothing, performed extensive experiments and showed non-trivial improvement over single model methods. | SP:6a3c4ae05d582f8896840483b08c735ced2976bc |
Learning Task-General Representations with Generative Neuro-Symbolic Modeling | People can learn rich , general-purpose conceptual representations from only raw perceptual inputs . Current machine learning approaches fall well short of these human standards , although different modeling traditions often have complementary strengths . Symbolic models can capture the compositional and causal knowledge that enables flexible generalization , but they struggle to learn from raw inputs , relying on strong abstractions and simplifying assumptions . Neural network models can learn directly from raw data , but they struggle to capture compositional and causal structure and typically must retrain to tackle new tasks . We bring together these two traditions to learn generative models of concepts that capture rich compositional and causal structure , while learning from raw data . We develop a generative neuro-symbolic ( GNS ) model of handwritten character concepts that uses the control flow of a probabilistic program , coupled with symbolic stroke primitives and a symbolic image renderer , to represent the causal and compositional processes by which characters are formed . The distributions of parts ( strokes ) , and correlations between parts , are modeled with neural network subroutines , allowing the model to learn directly from raw data and express nonparametric statistical relationships . We apply our model to the Omniglot challenge of human-level concept learning , using a background set of alphabets to learn an expressive prior distribution over character drawings . In a subsequent evaluation , our GNS model uses probabilistic inference to learn rich conceptual representations from a single training image that generalize to 4 unique tasks , succeeding where previous work has fallen short . 1 INTRODUCTION Human conceptual knowledge supports many capabilities spanning perception , production and reasoning [ 37 ] . A signature of this knowledge is its productivity and generality : the internal models and representations that people develop can be applied flexibly to new tasks with little or no training experience [ 30 ] . Another distinctive characteristic of human conceptual knowledge is the way that it interacts with raw signals : people learn new concepts directly from raw , high-dimensional sensory data , and they identify instances of known concepts embedded in similarly complex stimuli . A central challenge is developing machines with these human-like conceptual capabilities . Engineering efforts have embraced two distinct paradigms : symbolic models for capturing structured knowledge , and neural network models for capturing nonparametric statistical relationships . Symbolic models are well-suited for representing the causal and compositional processes behind perceptual observations , providing explanations akin to people ’ s intuitive theories [ 38 ] . Quintessential examples include accounts of concept learning as program induction [ 13 , 46 , 29 , 15 , 4 , 28 ] . Symbolic programs provide a language for expressing causal and compositional structure , while probabilistic modeling offers a means of learning programs and expressing additional conceptual knowledge through priors . The Bayesian Program Learning ( BPL ) framework [ 29 ] , for example , provides a dictionary of simple sub-part primitives for generating handwritten character concepts , and symbolic relations that specify how to combine sub-parts into parts ( strokes ) and parts into whole character concepts . These abstractions support inductive reasoning and flexible generalization to a range of different tasks , utilizing a single conceptual representation [ 29 ] . Published as a conference paper at ICLR 2021 HumansBPL model ( centered ) GNS model Symbolic models offer many useful features , but they come with important limitations . Foremost , symbolic probabilistic models make simplifying and rigid parametric assumptions , and when the assumptions are wrong—as is common in complex , high-dimensional data—they create bias [ 11 ] . The BPL character model , for example , assumes that parts are largely independent a priori , an assumption that is not reflective of real human-drawn characters . As a consequence , characters generated from the raw BPL prior lack the complexity of real characters ( Fig 1 , left ) , even though the posterior samples can appear much more structured . Another limitation of symbolic probabilistic models is that the construction of structured hypothesis spaces requires significant domain knowledge [ 2 ] . Humans , meanwhile , build rich internal models directly from raw data , forming hypotheses about the conceptual features and the generative syntax of a domain . As one potential resolution , previous work has demonstrated that the selection of structured hypotheses can itself be attributed to learning in a Bayesian framework [ 47 , 13 , 14 , 41 , 24 , 40 ] . Although more flexible than a priori structural decisions , models of this kind still make many assumptions , and they have not yet tackled the types of raw , high-dimensional stimuli that are distinctive of the neural network approach . The second paradigm , neural network modeling , prioritizes powerful nonparametric statistical learning over structured representations . This modeling tradition emphasizes emergence , the idea that conceptual knowledge arises from interactions of distributed sub-symbolic processes [ 36 , 32 ] . Neural networks are adept at learning from raw data and capturing complex patterns . However , they can struggle to learn the compositional and causal structure in how concepts are formed [ 30 ] ; even when this structure is salient in the data , they may have no obvious means of incorporating it . These limitations have been linked to shortcomings in systematic generalization [ 35 , 27 ] and creative abilities [ 31 ] . An illustrative example is the Omniglot challenge : in 4 years of active research , neural network models do not yet explain how people quickly grasp new concepts and use them in a variety of ways , even with relatively simple handwritten characters [ 31 ] . Surveying over 10 neural models applied to Omniglot , Lake et al . [ 31 ] found that only two attempted both classification and generation tasks , and they were each outperformed by the fully-symbolic , probabilistic BPL . Moreover , neural generative models tended to produce characters with anomalous characteristics , highlighting their shortcomings in modeling causal and compositional structure ( see Fig . A13 and [ 31 , Fig . 2a ] ) . In this paper , we introduce a new approach that leverages the strengths of both the symbolic and neural network paradigms by representing concepts as probabilistic programs with neural network subroutines . We describe an instance of this approach developed for the Omniglot challenge [ 29 ] of task-general representation learning and discuss how we see our Omniglot model fitting into a broader class of Generative Neuro-Symbolic ( GNS ) models that seek to capture the data-generation process . As with traditional probabilistic programs , the control flow of a GNS program is an explicit representation of the causal generative process that produces new concepts and new exemplars . Moreover , explicit re-use of parts through repeated calls to procedures such as GeneratePart ( Fig . 2 ) ensures a representation that is compositional , providing an appropriate inductive bias for compositional generalization . Unlike fully-symbolic probabilistic programs , however , the distribution of parts and correlations between parts in GNS are modeled with neural networks . This architectural choice allows the model to learn directly from raw data , capturing nonparametric statistics while requiring only minimal prior knowledge . Published as a conference paper at ICLR 2021 We develop a GNS model for the Omniglot challenge of learning flexible , task-general representations of handwritten characters . We report results on 4 Omniglot challenge tasks with a single model : 1 ) one-shot classification , 2 ) parsing/segmentation , 3 ) generating new exemplars , and 4 ) generating new concepts ( without constraints ) ; the 5th and final task of generating new concepts ( from type ) is left for future work . We also provide log-likelihood evaluations of the generative model . Notably , our goal is not to chase state-of-the-art performance on one task across many datasets ( e.g. , classification ) . Instead we build a model that learns deep , task-general knowledge within a single domain and evaluate it on a range of different tasks . This “ deep expertise ” is arguably just as important as “ broad expertise ” in characterizing human-level concept learning [ 37 , 31 ] ; machines that seek human-like abilities will need both . Our work here is one proposal for how neurally-grounded approaches can move beyond pattern recognition toward the more flexible model-building abilities needed for deep expertise [ 30 ] . In Appendix E , we discuss how to extend GNS to another conceptual domain , providing a proposal for a GNS model of 3D object concepts . 2 RELATED WORK The Omniglot dataset and challenge has been widely adopted in machine learning , with models such as Matching Nets [ 49 ] , MAML [ 7 ] , and ARC [ 44 ] applied to just one-shot classification , and others such as DRAW [ 19 ] , SPIRAL [ 8 ] , and VHE [ 21 ] applied to one or more generative tasks . In their “ 3-year progress report , ” Lake et al . [ 31 ] reviewed the current progress on Omniglot , finding that although there was considerable progress in one-shot classification , there had been little emphasis placed on developing task-general models to match the flexibility of human learners ( Table 1 ) . Moreover , neurally-grounded models that attempt more creative generation tasks were shown to produce characters that either closely mimicked the training examples or that exhibited anomalous variations , making for easy identification from humans ( see Fig . A13 and [ 31 , Fig . 2a ] ) . Our goal is distinct in that we aim to learn a single neuro-symbolic generative model that can perform a variety of unique tasks , and that generates novel yet structured new characters . Neuro-symbolic modeling has become an active area of research , with applications to learning input-output programs [ 42 , 17 , 3 , 39 , 48 ] , question answering [ 50 , 34 ] and image description [ 26 , 4 ] . GNS modeling distinguishes itself from prior work through its focus on hybrid generative modeling , combining both structured program execution and neural networks directly in the probabilistic generative process . Neuro-symbolic VQA models [ 50 , 34 ] are neither generative nor task-general ; they are trained discriminatively to answer questions . Other neuro-symbolic systems use neural networks to help perform inference in a fully-symbolic generative model [ 26 , 4 ] , or to parameterize a prior over fully-symbolic hypotheses [ 22 ] . In order to capture the dual structural and statistical characteristics of human conceptual representations , we find it important to include neural nets directly in the forward generative model . As applied to Omniglot , our model bears some resemblance to SPIRAL [ 8 ] ; however , SPIRAL does not provide a density function , and it has no hierarchical structure , limiting its applications to image reconstruction and unconditional generation . Another class of models on the neuro-symbolic spectrum aims to learn “ object representations ” with neural networks [ 5 , 18 , 25 ] , which add minimal object-like symbols to support systematic reasoning and generalization . Although these models have demonstrated promising results in applications such as scene segmentation and unconditional generation , they have not yet demonstrated the type of rich inductive capabilities that we are after : namely , the ability to learn “ deep ” conceptual representations from just one or a few examples that support a variety of discriminative and generative tasks . Other works ( e.g . [ 16 , 20 ] ) have used autoregressive models like ours with similar stroke primitives to model the causal generative processes of handwriting . We develop a novel architecture for generating Published as a conference paper at ICLR 2021 type level token level procedure GENERATETYPE C 0 . Initialize blank image canvas while true do [ yi , xi ] GENERATEPART ( C ) . Sample part location & parameters C frender ( yi , xi , C ) . Render part to image canvas vi ⇠ p ( v | C ) . Sample termination indicator if vi then break . Terminate sample { , y1 : , x1 : } return . Return concept type 1 C Canvas yi , xi Part Image I procedure GENERATETYPE C 0 . Initialize blank image canvas while true do [ yi , xi ] GENERATEPART ( C ) . Sample part location & parameters C frender ( yi , xi , C ) . Render part to image canvas vi ⇠ p ( v | C ) . Sample termination indicator if vi then break . Terminate sample { , y1 : , x1 : } return . Return concept type 1 pr oc ed ur e G EN ER AT ET YP E C 0 . In itia liz e bla nk im ag e ca nv as wh ile tr ue do [ y i , x i ] G EN ER AT EP AR T ( C ) . Sa m ple pa rt loc at ion & pa ra m et er s C f re nd er ( y i , x i , C ) . Re nd er pa rt to im ag e ca nv as v i ⇠ p ( v | C ) . Sa m ple te rm ina tio n ind ica to r if v i th en br ea k . Te rm ina te sa m ple { , y 1 : , x 1 : } re tu rn . Re tu rn co nc ep t t yp e 1 procedure GENERATETYPE C 0 . Initialize blank image canvas while true do [ yi , xi ] GENERATEPART ( C ) . Sample part location & parameters C frender ( yi , xi , C ) . Render part to image canvas vi ⇠ p ( v | C ) . Sample termination indicator if vi then break . Terminate sample { , y1 : , x1 : } return . Return concept type 1 location model p ( y ∣ C ) CNN MLP stroke model p ( x ∣ y , C ) CNN LSTM y C attention p ( y ) p ( Δ1 ) p ( Δ2 ∣ Δ1 ) p ( ΔT ∣ Δ1 : T−1 ) …C Figure 2 : A generative neuro-symbolic ( GNS ) model of character concepts . The type model GenerateType ( P ( ψ ) ) produces character types one stroke at a time , using an image canvas C as memory . At each step , the current canvas C is fed to procedure GeneratePart and a stroke sample is produced . The canvas is first processed by the location model , a CNN-MLP architecture that samples starting location y , and next by the stroke model , a CNN-LSTM architecture that samples trajectory x while attending to the encoded canvas . Finally , a symbolic renderer updates the canvas according to x and y , and a termination model decides whether to terminate the type sample . Unique exemplars are produced from a character type by sampling from the token model conditioned on ψ , adding motor noise to the drawing parameters and performing a random affine transformation . handwriting , which represents explicit compositional structure by modeling parts and relations with separate modules and applying intermediate symbolic rendering . Most importantly , these prior models have not made a connection to the image ; therefore while they can generate handwriting as symbolic coordinates , they can not explain how people use their causal knowledge to learn new characters from visual presentations , how they infer the strokes of a character seen on paper , or how they generate a new example of an observed character . By combining a powerful autoregressive model of handwriting with a symbolic image renderer and algorithms for probabilistic inference , we seek to replicate a spectrum of unique human concept learning abilities . 3 GENERATIVE MODEL Our GNS model leverages the type-token hierarchy of BPL [ 29 ] , which offers a useful scaffolding for conceptual models ( Fig . 2 , left ) .1 The type-level model P ( ψ ) defines a prior distribution over character concepts , capturing overarching principles and regularities that tie together characters from different alphabets and providing a procedure to generate new character concepts unconditionally in latent stroke format ( Fig . 2 , right ) . A token-level model p ( θ|ψ ) captures the within-class variability that arises from motor noise and drawing styles , and an image distribution P ( I|θ ) provides an explicit model of how causal stroke actions translate to image pixels . All parameters of our model are learned from the Omniglot background set of drawings ( Appendix A ) . The full joint distribution over type ψ , token θ ( m ) and image I ( m ) factors as P ( ψ , θ ( m ) , I ( m ) ) = P ( ψ ) P ( θ ( m ) |ψ ) P ( I ( m ) |θ ( m ) ) . ( 1 ) Although sharing a common hierarchy , the implementation details of each level in our GNS model differ from BPL in critical ways . The GNS type prior P ( ψ ) is a highly expressive generative model that uses an external image canvas , coupled with a symbolic rendering engine and an attentive 1Aspects of our model were recently published in a non-archival conference proceedings [ 6 ] . The previous manuscript presents only a prior distribution that alone performs just one task ( generating new concepts ) ; our new developments include a full hierarchical model , a differentiable image renderer / likelihood , and a procedure for approximate probabilistic inference from image data . These ingredients together enable GNS to perform 4 unique conceptual tasks . Published as a conference paper at ICLR 2021 recurrent neural network , to condition future parts on the previous parts and model sophisticated causal and correlational structure . This structure is essential to generating new character concepts in realistic , human-like ways ( Sec . 5 ) . Moreover , whereas the BPL model is provided symbolic relations for strokes such as “ attach start ” and “ attach along , ” GNS learns implicit relational structure from the data , identifying salient patterns in the co-occurrences of parts and locations . Importantly , the GNS generative model is designed to be differentiable at all levels , yielding log-likelihood gradients that enable powerful new inference algorithms ( Sec . 4 ) and estimates of marginal image likelihood ( Sec . 5 ) . Type prior . The type prior P ( ψ ) is captured by a neuro-symbolic generative model of character drawings . The model represents a character as a sequence of strokes ( parts ) , with each stroke i decomposed into a starting location yi ∈ R2 and a variable-length trajectory xi ∈ Rdi×2 . Rather than use raw pen trajectories as our stroke format , we use a minimal spline representation of strokes , obtained from raw trajectories by fitting cubic b-splines with a residual threshold . The starting location yi therefore conveys the first spline control point , and trajectory xi = { ∆i1 , ... , ∆idi } conveys the offsets between subsequent points of a ( di+1 ) -length spline . These offsets are transformed into a sequence of relative points xi = { xi1 , ... , xidi+1 } , with xi1 = 0 , specifying locations relative to yi . The model samples a type one stroke at a time , using an image canvas C as memory to convey the sample state . At each step , a starting location for the next stroke is first sampled from the location model , followed by a trajectory from the stroke model . The stroke is then rendered to the canvas C , and a termination model decides whether to terminate or continue the sample . Each of the three model components is expressed by a neural network , using a LSTM as the stroke model to generate trajectories as in [ 16 ] . The details of these neural modules are provided in Appendix A . The type model P ( ψ ) specifies an auto-regressive density function that can evaluate exact likelihoods of character drawings , and its hyperparameters ( the three neural networks ) are learned from the Omniglot background set of 30 alphabets using a maximum likelihood objective . A full character type ψ includes the random variables ψ = { κ , y1 : κ , x1 : κ } , where κ ∈ Z+ is the number of strokes . The density function P ( ψ ) is also fully differentiable w.r.t . the continuous random variables in ψ . Token model . A character token θ ( m ) = { y ( m ) 1 : κ , x ( m ) 1 : κ , A ( m ) } represents a unique instance of a character concept , where y ( m ) 1 : κ are the token-level locations , x ( m ) 1 : κ the token-level parts , and A ( m ) ∈ R4 the parameters of an affine warp transformation . The token distribution factorizes as P ( θ ( m ) |ψ ) = P ( A ( m ) ) κ∏ i=1 P ( y ( m ) i | yi ) P ( x ( m ) i | xi ) . ( 2 ) Here , P ( y ( m ) i | yi ) represents a simple noise distribution for the location of each stroke , and P ( x ( m ) i | xi ) for the stroke trajectory . The first two dimensions of affine warp A ( m ) control a global re-scaling of the token drawing , and the second two a global translation of its center of mass . The distributions and pseudocode of our token model are given in Appendix A . Image model . The image model P ( I ( m ) | θ ( m ) ) is based on [ 29 ] and is composed of two pieces . First , a differentiable symbolic engine f receives the token θ ( m ) and produces an image pixel probability map pimg = f ( θ ( m ) , σ , ) by evaluating each spline and rendering the stroke trajectories . Here , σ ∈ R+ is a parameter controlling the rendering blur around stroke coordinates , and ∈ ( 0 , 1 ) controlling pixel noise , each sampled uniformly at random . The result then parameterizes an image distribution P ( I ( m ) | θ ( m ) ) = Bernoulli ( pimg ) , which is differentiable w.r.t . θ ( m ) , σ , and . 4 PROBABILISTIC INFERENCE Given an image I of a novel concept , our GNS model aims to infer the latent causal , compositional process for generating new exemplars . We follow the high-level strategy of BPL for constructing a discrete approximation Q ( ψ , θ | I ) to the desired posterior distribution [ 29 ] , P ( ψ , θ | I ) ≈ Q ( ψ , θ | I ) = K∑ k=1 πkδ ( θ − θk ) δ ( ψ − ψk ) . ( 3 ) A heuristic search algorithm is used to find K good parses , { ψ , θ } 1 : K , that explain the underlying image with high probability . These parses are weighted by their relative posterior probability , Published as a conference paper at ICLR 2021 log P ( I ( T ) ∣ I ( c ) ) = − 401.3 Correct match train test log P ( I ( T ) ∣ I ( c ) ) = − 664.8 Incorrect match train test ( a ) Classification fits the pen ( Fig . 3A , ii ) . To construct a new character type , first themodel samples the number of parts k and the number of subparts ni , for each part i = 1 , ... , k , from their empirical distributions as measured from the background set . Second , a template for a part Si is constructed by sampling subparts from a set of discrete primitive actions learned from the background set ( Fig . 3A , i ) , such that the probability of the next action depends on the previous . Third , parts are then grounded as parameterized curves ( splines ) by sampling the control points and scale parameters 1334 11 DECEMBER 2015 • VOL 350 ISSUE 6266 sciencemag.org SCIENCE Fig . 3 . A generative model of handwritten characters . ( A ) New types are generated by choosing primitive actions ( color coded ) from a library ( i ) , combining these subparts ( ii ) to make parts ( iii ) , and combining parts with relations to define simple programs ( iv ) . New tokens are generated by running these programs ( v ) , which are then rendered as raw data ( vi ) . ( B ) Pseudocode for generating new types y and new token images I ( m ) for m = 1 , ... , M. The function f ( · , · ) transforms a subpart sequence and start location into a trajectory . Human parses Machine parsesHuman drawings -505 -593 -655 -695 -723 -1794-646 -1276 Training item with model ’ s five best parses Test items 1 2 3 4 5stroke order : Fig . 4 . Inferringmotor programs from images . Parts are distinguished by color , with a colored dot indicating the beginning of a stroke and an arrowhead indicating the end . ( A ) The top row shows the five best programs discovered for an image along with their log-probability scores ( Eq . 1 ) . Subpart breaks are shown as black dots . For classification , each program was refit to three new test images ( left in image triplets ) , and the best-fitting parse ( top right ) is shown with its image reconstruction ( bottom right ) and classification score ( log posterior predictive probability ) . The correctly matching test item receives a much higher classification score and is also more cleanly reconstructed by the best programs induced from the training item . ( B ) Nine human drawings of three characters ( left ) are shown with their ground truth parses ( middle ) and best model parses ( right ) . RESEARCH | RESEARCH ARTICLES on June 1 , 2020 http : //science.sciencem ag.org/ D ow nloaded from the pen ( Fig . 3A , ii ) . To construct a new character type , first themodel samples the number of parts k and the number of subparts ni , for each part i = 1 , ... , k , from their empirical distributions as measured from the background set . Second , a template for a part Si is constructed by sampling subparts from a set of discrete primitive actions learned from the background set ( Fig . 3A , i ) , such that the probability of the next action depends on the previous . Third , parts are then grounded as parameterized curves ( splines ) by sampling the control points and scale parameters 1334 11 DECEMBER 2015 • VOL 350 ISSUE 6266 sciencemag.org SCIENCE Fig . 3 . A generative model of handwritten characters . ( A ) New types are generated by choosing primitive actions ( color coded ) from a library ( i ) , combining these subparts ( ii ) to make parts ( iii ) , and combining parts with relations to define simple programs ( iv ) . New tokens are generated by running these programs ( v ) , which are then rendered as raw data ( vi ) . ( B ) Pseudocode for generating new types y and new token images I ( m ) for m = 1 , ... , M. The function f ( · , · ) transforms a subpart sequence and start location into a trajectory . Human parses Machine parsesHuman drawings -505 -593 -655 -695 -723 -1794-646 -1276 Training item with model ’ s five best parses Test items 1 2 3 4 5stroke order : Fig . 4 . Inferringmotor programs from images . Parts are distinguished by color , with a colored dot indicating the beginning of a stroke and an arrowhead indicating the end . ( A ) The top row shows the five best programs discovered for an image along with their log-probability scores ( Eq . 1 ) . Subpart breaks are shown as black dots . For classification , each program was refit to three new test images ( left in image triplets ) , and the best-fitting parse ( top right ) is shown with its image reconstruction ( bottom right ) and classification score ( log posterior predictive probability ) . The correctly matching test item receives a much higher classification score and is also more cleanly reconstructed by the best programs induced from the training item . ( B ) Nine human drawings of three characters ( left ) are shown with their ground truth parses ( middle ) and best model parses ( right ) . RESEARCH | RESEARCH ARTICLES on June 1 , 2020 http : //science.sciencem ag.org/ D ow nloaded from the pen ( Fig . 3A , ii ) . To construct a new character type , first themodel samples the number of parts k and the nu ber of subparts ni , for each part i = 1 , ... , k , fro their empirical distributions as measured from the background set . Second , a template for a part Si is constructed by sampling subparts from a set of discrete primitive actions learned from the background set ( Fig . 3A , i ) , such that the probability of the next action depends on the previous . Third , parts are then grounded as parameterized curves ( splines ) by sampling the control points and scale parameters 1334 11 DECEMBER 2015 • VOL 350 ISSUE 6266 sciencemag.org SCIENCE Fig . 3 . A generative model of handwritten characters . ( A ) New types are generated by choosing primitive actions ( color coded ) from a library ( i ) , combining these subparts ( ii ) to make parts ( iii ) , and combining parts with relations to define simple programs ( iv ) . New tokens are generated by running these programs ( v ) , which are then rendered as raw data ( vi ) . ( B ) Pseudocode for generating new types y and new token images I ( m ) for m = 1 , ... , M. The function f ( · , · ) transforms a subpart sequence and start location into a trajectory . Human parses Machine parsesHuman drawings -505 -593 -655 -695 -723 -1794-646 -1276 Training item with model ’ s five best parses Test items 1 2 3 4 5stroke order : Fig . 4 . Inferringmotor programs from images . Parts are distinguished by color , with a colored dot indicating the beginning of a stroke and an arrowhead indicating the end . ( A ) The top row shows the five best programs discovered for an image along with their l g-probability cores ( Eq . 1 ) . Subpart breaks are shown as black dots . For classification , each program was refit to three new test images ( left in image triplets ) , and the best-fitting parse ( top right ) is shown with its image reconstruction ( bottom right ) and classification score ( l g posterior predictiv probability ) . The correctly matching tes item ceives a much higher classification score and is also more cleanly reconstructed by the best program induced from the training item . ( B ) Nine human rawings of three characters ( left ) are shown with their grou d tr th parses ( middle ) and best model parses ( right ) . RESEARCH | RESEARCH ARTICLES on June 1 , 2020 http : //science.sciencem ag.org/ D ow nloaded from Human drawings Human parse GNS rses BPL parse the pen ( Fig . 3A , ii ) . To construct a new character type , first themodel samples the number of parts k and the number of subparts ni , for each part i = 1 , ... , k , from their empirical distributions as measured from the background set . Second , a template for a part Si is constructed by sampling subparts from a set of discrete primitive actions learned from the background set ( Fig . 3A , i ) , such that the probability of the next action depends on the previous . Third , parts are then grounded as parameterized curves ( splines ) by sampling the control points and scale parameters 1334 11 DECEMBER 2015 • VOL 350 ISSUE 6266 sciencemag.org SCIENCE Fig . 3 . A generative model of handwritten characters . ( A ) New types re generated by choosing primitive actions ( color coded ) from a library ( i ) , combining these subparts ( ii ) to make parts ( iii ) , an combining parts with relations t de ine simple programs ( iv ) . New tokens are generated by running these programs ( v ) , which are then rendered as raw dat ( vi ) . ( B ) Pseudocode for genera ing new types y and new token images I ( m ) for m = 1 , ... , M. The function f ( · , · ) transforms a subpart sequence and start location into a trajectory . Human parses Machine parsesHuman drawings -505 -593 -655 -695 -723 -1794-646 -1276 Training item with model ’ s five best parses Test items 1 2 3 4 5stroke order : Fig . 4 . Inferringmotor programs from images . Parts are distinguished by color , with a colored dot indicating the beginning of a stroke and an arrowhead indicating the end . ( A ) The top row shows the five best programs discovered for an im ge along with their log-probability scores ( Eq . 1 ) . Subpart breaks are hown as black dots . For classification , each program was refit to three new test images ( left in image triplets ) , and the best-fitting parse ( top right ) is shown with its image reconstruction ( bottom right ) and classification score ( log posterior predictive probability ) . The correctly matchi g test item receives a much higher classification score and is also more cleanly reconstructed by th best programs indu ed from the raining item . ( B ) Nine human drawings of three cha acters ( left ) are shown with their ground tr th parses ( middle ) an b st model parses ( right ) . RESEARCH | RESEARCH ARTICLES on June 1 , 2020 http : //science.sciencem ag.org/ D ow nloaded from ( b ) Parsing Figure 3 : Classification fits and parsing . ( a ) Posterior parses from two training images were refit to the same test image . The first row of each grid shows the training image and its top-3 predicted parses ( best emboldened ) . The second row shows the test image and its re-fitted training parses . Reconstructed test images are shown in the final row . The correct training image reports a high forward score , indicating that I ( T ) is well-explained by the motor programs for this I ( c ) . ( b ) 27 character images from 3 classes are shown alongside their ground truth human parses , predicted parses from the GNS model , and predicted parses from the BPL model . πk ∝ π̃k = P ( ψk , θk , I ) such that ∑ k πk = 1 . To find the K good parses , search uses fast bottomup methods to propose many variants of the discrete variables , filtering the most promising options , before optimizing the continuous variables with gradient descent ( we use K = 5 ) . See Appendix B for further details about inference , and Appendix C for generating new exemplars of a concept . Inference for one-shot classification . In one-shot classification , models are given a single training image I ( c ) from each of c = 1 , ... , C classes , and asked to classify test images according to their corresponding training classes . For each test image I ( T ) , we compute an approximation of the Bayesian score log P ( I ( T ) | I ( c ) ) for every example I ( c ) , using our posterior parses { ψ , θ ( c ) } 1 : K and corresponding weights π1 : K from I ( c ) ( Eq . 3 ) . The approximation is formulated as log P ( I ( T ) | I ( c ) ) ≈ log ∫ P ( I ( T ) |θ ( T ) ) P ( θ ( T ) | ψ ) Q ( ψ , θ ( c ) , | I ( c ) ) ∂ψ∂θ ( c ) ∂θ ( T ) ≈ log K∑ k=1 πk max θ ( T ) P ( I ( T ) | θ ( T ) ) P ( θ ( T ) | ψk ) , ( 4 ) where the maximum over θ ( T ) is determined by refitting token-level parameters θ ( c ) to image I ( T ) with gradient descent . Following Lake et al . [ 29 ] , we use a two-way version of the Bayesian score that also considers parses of I ( T ) refit to I ( c ) . The classification rule is therefore c∗ = arg max c log P ( I ( T ) | I ( c ) ) 2 = arg max c log [ P ( I ( c ) | I ( T ) ) P ( I ( c ) ) P ( I ( T ) | I ( c ) ) ] , ( 5 ) where P ( I ( c ) ) ≈∑k π̃k is approximated from the unnormalized weights of I ( c ) parses . 5 EXPERIMENTS GNS was evaluated on four concept learning tasks from the Omniglot challenge [ 31 ] : one-shot classification , parsing , generating new exemplars , and generating new concepts . All evaluations use novel characters from completely held-out alphabets in the Omniglot evaluation set . As mentioned Published as a conference paper at ICLR 2021 earlier , our goal is to provide a single model that captures deep knowledge of a domain and performs strongly in a wide range of tasks , rather than besting all models on every task . Our experiments include a mixture of quantitative and qualitative evaluations , depending on the nature of the task . One-shot classification . GNS was compared with alternative models on the one-shot classification task from Lake et al . [ 29 ] . The task involves a series of 20-way within-alphabet classification episodes , with each episode proceeding as follows . First , the machine is given one training example from each of 20 novel characters . Next , the machine must classify 20 novel test images , each corresponding to one of the training classes . With 20 episodes total , the task yields 400 trials . Importantly , all character classes in an episode come from the same alphabet as originally proposed [ 29 ] , requiring finer discriminations than commonly used between-alphabet tests [ 31 ] . Table 2 : Test error on withinalphabet one-shot classification . Model Error GNS 5.7 % BPL [ 29 ] 3.3 % RCN [ 12 ] 7.3 % VHE [ 21 ] 18.7 % Proto . Net [ 45 ] 13.7 % ARC [ 44 ] 1.5 % ∗ * used 4x training classes As illustrated in Fig . 3a , GNS classifies a test image by choosing the training class with the highest Bayesian score ( Eq . 5 ) . A summary of the results is shown in Table 2 . GNS was compared with other machine learning models that have been evaluated on the withinalphabets classification task [ 31 ] . GNS achieved an overall test error rate of 5.7 % across all 20 episodes ( N=400 ) . This result is very close to the original BPL model , which achieved 3.3 % error with significantly more hand-design . The symbolic relations in BPL ’ s token model provide rigid constraints that are key to its strong classification performance [ 29 ] . GNS achieves strong classification performance while emphasizing the nonparametric statistical knowledge needed for creative generation in subsequent tasks . Beyond BPL , our GNS model outperformed all other models that received the same background training . The ARC model [ 44 ] achieved an impressive 1.5 % error , although it was trained with four-fold class augmentation and many other augmentations , and it can only perform this one task . In Appendix Fig . A10 , we show a larger set of classification fits from GNS , including examples of misclassified trials . Parsing . In the Omniglot parsing task , machines must segment a novel character into an ordered set of strokes . These predicted parses can be compared with human ground-truth parses for the same images . The approximate posterior of GNS yields a series of promising parses for a new character image , and to complete the parsing task , we identify the maximum a posteriori parse k∗ = maxk πk , reporting the corresponding stroke configuration . Fig . 3b shows a visualization of the GNS predicted parses for 27 different raw images drawn from 3 unique character classes , plotted alongside groundtruth human parses ( how the images were actually drawn ) along with predicted parses from the BPL model . Compared to BPL , GNS parses possess a few unique desirable qualities . The first character class has an obvious segmentation to the human eye—evidenced by the consistency of human parses in all examples—and the GNS model replicates this consistency across all 9 predicted parses . In contrast , BPL predicts seemingly-unlikely parses for 2 of the examples shown . The second character is more complex , and it was drawn in different styles by different human subjects . The GNS model , which is trained on data from subjects with different styles , captures the uncertainty in this character by predicting a variety of unique parses . BPL , on the other hand , produces a single , ubiquitous segmentation across all 9 examples . In Appendix Fig . A11 , we provide a larger set of parses from the GNS model for a diverse range of Omniglot characters . Generating new exemplars . Given just one training image of a novel character concept , GNS produces new exemplars of the concept by sampling from the approximate conditional P ( I ( 2 ) , θ ( 2 ) | I ( 1 ) ) of Eq . 8 . In Fig . 4a we show new exemplars produced by GNS for a handful of target images , plotted next to human productions ( more examples in Appendix Fig . A12 ) . In the majority of cases , samples from the model demonstrate that it has successfully captured the causal structure and invariance of the target class . In contrast , deep generative models applied to the same task miss meaningful compositional and causal structure , producing new examples that are easily discriminated from human productions [ 43 , 21 ] ( see Appendix Fig . A13 ) . In some cases , such as the third column of Fig . 4a , samples from GNS exhibit sloppy stroke junctions and connections . Compared to BPL , which uses engineered symbolic relations to enforce rigid constraints at stroke junctions , GNS misses some of these structural elements . Nevertheless , new examples from GNS appear strong enough to pass for human in many cases , which we would like to test in future work with visual Turing tests . Concept learning experiments can be reproduced using our pre-trained generative model and source code : https : //github.com/rfeinman/GNS-Modeling . Published as a conference paper at ICLR 2021 Human GNS Target for each subpart . Last , parts are roughly positioned to begin either independently , at the beginning , at the end , or along previous parts , as defined by relation Ri ( Fig . 3A , iv ) . Character tokens q ( m ) are produced by executing the parts and the relations andmodeling how ink flows from the pen to the page . First , motor noise is added to the control points and the scale of the subparts to create token-level stroke trajectories S ( m ) . Second , the trajectory ’ s precise start location L ( m ) is sampled from the schematic provided by its relationRi to previous strokes . Third , global transformations are sampled , including an affine warp A ( m ) and adaptive noise parameters that ease probabilistic inference ( 30 ) . Last , a binary image I ( m ) is created by a stochastic rendering function , lining the stroke trajectories with grayscale ink and interpreting the pixel values as independent Bernoulli probabilities . Posterior inference requires searching the large combinatorial space of programs that could have generated a raw image I ( m ) . Our strategy uses fast bottom-up methods ( 31 ) to propose a range of candidate parses . The most promising candidates are refined by using continuous optimization and local search , forming a discrete approximation to the posterior distribution P ( y , q ( m ) |I ( m ) ) ( section S3 ) . Figure 4A shows the set of discovered programs for a training image I ( 1 ) and how they are refit to different test images I ( 2 ) to compute a classification score log P ( I ( 2 ) |I ( 1 ) ) ( the log posterior predictive probability ) , where higher scores indicate that they are more likely to belong to the same class . A high score is achieved when at least one set of parts and relations can successfully explain both the training and the test images , without violating the soft constraints of the learned within-class variability model . Figure 4B compares the model ’ s best-scoring parses with the ground-truth human parses for several characters . Results People , BPL , and alternative models were compared side by side on five concept learning tasks that examine different forms of generalization from just one or a few examples ( example task Fig . 5 ) . All behavioral experiments were run through Amazon ’ s Mechanical Turk , and the experimental procedures are detailed in section S5 . The main results are summarized by Fig . 6 , and additional lesion analyses and controls are reported in section S6 . One-shot classification was evaluated through a series of within-alphabet classification tasks for 10 different alphabets . As illustrated in Fig . 1B , i , a single image of a new character was presented , and participants selected another example of that same character from a set of 20 distinct characters produced by a typical drawer of that alphabet . Performance is shown in Fig . 6A , where chance is 95 % errors . As a baseline , themodifiedHausdorff distance ( 32 ) was computed between centered images , producing 38.8 % errors . People were skilled one-shot learners , achieving an average error rate of 4.5 % ( N = 40 ) . BPL showed a similar error rate of 3.3 % , achieving better performance than adeep convolutional network ( convnet ; 13.5 % errors ) and the HDmodel ( 34.8 % ) —each adapted from deep learning methods that have performed well on a range of computer vision tasks . A deep Siamese convolutional network optimized for this one-shot learning task achieved 8.0 % errors ( 33 ) , still about twice as high as humans or ourmodel . BPL ’ s advantage points to the benefits ofmodeling theunderlying causal process in learning concepts , a strategy different from the particular deep learning approaches examined here . BPL ’ s other key ingredients also make positive contributions , as shown by higher error rates for BPL lesions without learning to learn ( token-level only ) or compositionality ( 11.0 % errors and 14.0 % , respectively ) . Learning to learn was studied separately at the type and token level by disrupting the learned hyperparameters of the generativemodel . Compositionality was evaluated by comparing BPL to a matched model that allowed just one spline-based stroke , resembling earlier analysisby-synthesis models for handwritten characters that were similarly limited ( 34 , 35 ) . The human capacity for one-shot learning is more than just classification . It can include a suite of abilities , such as generating new examples of a concept . We compared the creative outputs produced by humans and machines through “ visual Turing tests , ” where naive human judges tried to identify the machine , given paired examples of human and machine behavior . In our most basic task , judges compared the drawings from nine humans asked to produce a new instance of a concept given one example with nine new examples drawn by BPL ( Fig . 5 ) . We evaluated each model based on the accuracy of the judges , which we call their identification ( ID ) level : Idealmodel performance is 50 % ID level , indicating that they can not distinguish the model ’ s behavior from humans ; worst-case performance is 100 % . Each judge ( N = 147 ) completed 49 trials with blocked feedback , and judges were analyzed individually and in aggregate . The results are shown in Fig . 6B ( new exemplars ) . Judges had only a 52 % ID level on average for discriminating human versus BPL behavior . As a group , this performance was barely better than chance [ t ( 47 ) = 2.03 , P = 0.048 ] , and only 3 of 48 judges had an ID level reliably above chance . Three lesioned models were evaluated by different groups of judges in separate SCIENCE sciencemag.org 11 DECEMBER 2015 • VOL 350 ISSUE 6266 1335 1 2 1 2 1 2 1 2 1 2 1 2 Human or Machine ? Fig . 5 . Generating new exemplars . Humans and machines were given an image of a novel character ( top ) and asked to produce new exemplars.The nine-character grids in each pair that were generated by a machine are ( by row ) 1 , 2 ; 2 , 1 ; 1 , 1 . RESEARCH | RESEARCH ARTICLES on N ovem ber 21 , 2020 http : //science.sciencem ag.org/ D ow nloaded from for each subpart . Last , parts are roughly positioned to begin either independently , at the beginning , at the end , or along previous parts , as defined by relation Ri ( Fig . 3A , iv ) . Character tokens q ( m ) are produced by execut- ing the parts and the relations andmodeling how ink flows from the pen to the page . First , motor noise is added to the control points and the scale of the subparts to create token-level stroke trajectories S ( m ) . Second , the trajectory ’ s precise start location L ( m ) is sampled from the schematic provided by its relationRi to previous strokes . Third , global transformations are sampled , including an affine warp A ( m ) and adaptive noise parameters that ease probabilistic inference ( 30 ) . Last , a binary image I ( m ) is created by a stochastic rendering function , lining the stroke trajectories with grayscale ink and interpreting the pixel values as independent Bernoulli probabilities . Posterior inference requires searching the large combinatorial space of programs that could have generated a raw image I ( m ) . Our strategy uses fast bottom-up methods ( 31 ) to propose a range of candidate parses . The most promising candidates are refined by using continuous optimization and local search , forming a discrete approximation to the posterior distribution P ( y , q ( m ) |I ( m ) ) ( section S3 ) . Figure 4A shows the set of discovered programs for a training image I ( 1 ) and how they are refit to different test images I ( 2 ) to compute a classification score log P ( I ( 2 ) |I ( 1 ) ) ( the log posterior predictive probability ) , where higher scores indicate that they are more likely to belong to the same class . A high score is achieved when at least one set of parts and relations can successfully explain both the training and the test images , without violating the soft constraints of the learned within-class variability model . Figure 4B compares the model ’ s best-scoring parses with the ground-truth human parses for several characters . Results People , BPL , and alternative models were compared side by side on five concept learning tasks that examine different forms of generalization from just one or a few examples ( example task Fig . 5 ) . All behavioral experiments were run through Amazon ’ s Mechanical Turk , and the experimental procedures are detailed in section S5 . The main results are summarized by Fig . 6 , and additional lesion analyses and controls are reported in section S6 . One-shot classification was evaluated through a series of within-alphabet classification tasks for 10 different alphabets . As illustrated in Fig . 1B , i , a single image of a new character was presented , and participants selected another example of that same character from a set of 20 distinct characters produced by a typical drawer of that alphabet . Performance is shown in Fig . 6A , where chance is 95 % errors . As a baseline , themodifiedHausdorff distance ( 32 ) was computed between centered images , producing 38.8 % errors . People were skilled one-shot learners , achieving an average error rate of 4.5 % ( N = 40 ) . BPL showed a similar error rate of 3.3 % , achieving better performance than adeep convolutional network ( convnet ; 13.5 % errors ) and the HDmodel ( 34.8 % ) —each adapted from deep learning methods that have performed well on a range of computer vision tasks . A deep Siamese convolutional network optimized for this one-shot learning task achieved 8.0 % errors ( 33 ) , still about twice as high as humans or ourmodel . BPL ’ s advantage points to the benefits ofmodeling theunderlying causal process in learning concepts , a strategy different from the particular deep learning approaches examined here . BPL ’ s other key ingredients also make positive contributions , as shown by higher error rates for BPL lesions without learning to learn ( token-level only ) or compositionality ( 11.0 % errors and 14.0 % , respectively ) . Learning to learn was studied separately at the type and token level by disrupting the learned hyperparameters of the generativemodel . Compositionality was evaluated by comparing BPL to a matched model that allowed just one spline-based stroke , resembling earlier analysisby-synthesis models for handwritten characters that were similarly limited ( 34 , 35 ) . The human capacity for one-shot learning is more than just classification . It can include a suite of abilities , such as generating new examples of a concept . We compared the creative outputs produced by humans and machines through “ visual Turing tests , ” where naive human judges tried to identify the machine , given paired examples of human and machine behavior . In our most basic task , judges compared the drawings from nine humans asked to produce a new instance of a concept given one example with nine new examples drawn by BPL ( Fig . 5 ) . We evaluated each model based on the accuracy of the judges , which we call their identification ( ID ) level : Idealmodel performance is 50 % ID level , indicating that they can not distinguish the model ’ s behavior from humans ; worst-case performance is 100 % . Each judge ( N = 147 ) completed 49 trials with blocked feedback , and judges were analyzed individually and in aggregate . The results are shown in Fig . 6B ( new exemplars ) . Judges had only a 52 % ID level on average for discriminating human versus BPL behavior . As a group , this performance was barely better than chance [ t ( 47 ) = 2.03 , P = 0.048 ] , and only 3 of 48 judges had an ID level reliably above chance . Three lesioned models were evaluated by different groups of judges in separate SCIENCE sciencemag.org 11 DECEMBER 2015 • VOL 350 ISSUE 6266 1335 1 2 1 2 1 2 1 2 1 2 1 2 Human or Machine ? Fig . 5 . Generating new exemplars . Humans and machines were given an image of a novel character ( top ) and asked to produce new exemplars.The nine-character grids in each pair that were generated by a machine are ( by row ) 1 , 2 ; 2 , 1 ; 1 , 1 . RESEARCH | RESEARCH ARTICLES on N ovem ber 21 , 2020 http : //science.sciencem ag.org/ D ow nloaded from for each subpart . Last , parts are roughly positioned to begin either independently , at the b ginni g , at the end , or along previous parts , as defined by relation Ri ( Fig . 3A , iv ) . Character tokens q ( m ) are produced by executing the parts and the relations andmodeling how ink flows from the p n to the page . First , motor noise is added to the control points and the scale of the subparts to creat oken-level stroke trajectories S ( m ) . Second , the trajectory ’ s precise star location L ( m ) is sampled from the schematic provided by its relationRi to previous strokes . Third , global transformations are sampled , including an ffine warp A ( m ) and a aptive noise parameters that eas probabilistic inference ( 30 ) . Last , a binary image I ( m ) is creat d by a stochastic rendering function , lining the stroke trajectories with grayscale ink and interpreting the pixel values a independent Bernoulli probabilit es . Posterio inference requires searching the large combinatorial space of programs that could have generated a r w image I ( m ) . Our st a egy uses fa t bott m-up methods ( 31 ) to prop se a r nge of candidate parses . The most promising candidates are refined by using conti uo s optimization and local search , forming a discrete approximation to he posterio distribution P ( y , q ( m ) |I ( m ) ) ( section S3 ) . Figure 4A shows the s t of discovered programs for a training image I ( 1 ) and how they are refit to different tes images I ( 2 ) to compute a classification score log P ( I ( 2 ) |I ( 1 ) ) ( the log posterio p edictive probability ) , where hig er scores indicate hat they are more likely to belong to he same class . A hig score is achieved when at least one s t of parts and relations can successfully explain both e training and the tes images , without violating the soft constraints of the l arned with n-class vari b lity model . Figure 4B compares the model ’ s best-scoring parses with e ground-tru h human parses for several characters . Results People , BPL , and alternative models were compared side by side on five concept learning tasks that examine different forms of generalization from just one or a few examples ( example task Fig . 5 ) . All behavioral experiments were un through Amazon ’ s Mechanical Turk , and the experimental procedures are d tailed in section S5 . The main results are summarized by Fig . 6 , and additional lesion a alyses and controls are - ported in section S6 . One-shot classification was evalu ted through a series of within-alphabet classification tasks for 10 different alphabets . As illustra ed in Fig . 1B , i , a single image of a new character was present d , and participants select d another example of tha same character from a set of 20 distinct characters produced by a typical drawer of tha alphabet . Performance is shown in Fig . 6A , where chance is 95 % erro s. A a b seline , themodifiedHausdorff distance ( 32 ) was computed between cent red images , producing 38.8 % erro s. People were skilled one-shot learners , achiev ng an verage erro rate of 4.5 % ( N = 40 ) . BPL showed a similar erro rate of 3.3 % , achiev ng better perfo mance than deep convolutional etwork ( convnet ; 13.5 % erro s ) and the HDmodel ( 34.8 % ) —each adapted from deep learning methods tha have p rformed well on a range of computer vision tasks . A deep Siamese convolutional network optimized for this one-shot learning task achieved 8.0 % erro s ( 33 ) , still about twice as hig as humans or ourmodel . BPL ’ s advant ge points to the b nefits ofmodeling theunderlying caus l process in learning concepts , a strategy different from the particular deep l arning approaches xamined here . BPL ’ s other key ingredi nts al o make positive contributions , a shown by hig er ro rates for BPL lesions without learning to learn ( token-level only ) or compositionality ( 11.0 % erro s and 14.0 % , resp ctively ) . Learning to learn was studie separately at the type and token level by disrupting the learned hyper a ameters of the generativemodel . Compositionality was evalu ted by comparing BPL to a matched model that allowed just one spline-based stroke , r sembling earlie analysisby-s nthesis models for handwritten characters tha were similarly limited ( 34 , 35 ) . The uman capacity for ne-shot learning is more than just classification . It can include a suite of abilities , such as generating ew xamples of a concept . We compared the creative outp ts produced by humans and machines through “ visual Turing tes s , ” where naive human judges tried to identify the machine , given paired xamples of human d machine b havior . In our most basic task , judges compared the drawings from nine humans a ked to produce a new instance of a concept given o e example with nine w examples drawn by BPL ( Fig . 5 ) We evalu ted ach model based on the accuracy of the judges , whic we call their identification ( ID ) level : Idealmodel perfo mance is 50 % ID level , indicating tha they can not distinguish t e model ’ s behavior from humans ; worst-case p rfo mance is 100 % . Each judge ( N = 147 ) completed 49 trials with blocked feedback , and judges were analyzed individually and in aggre ate . The results are shown i Fig . 6B ( new exemplars ) . Judges had only a 52 % ID level on average for discriminating human versus BPL behavior . As a group , this performance was barely better han chance [ t ( 47 ) = 2.03 , P = 0.048 ] , and only 3 of 48 judges had n ID level r liably above chance . Three lesioned models were evaluated by different groups of judges in separate SCIENCE sciencemag.org 11 DECEMBER 2015 • VOL 350 ISSUE 626 1335 1 2 1 2 1 2 1 2 1 2 1 2 Human or Machine ? Fig . 5 Gen rating ew exemplars . Humans and machines were given a image of a novel character ( top ) and asked to produce n w xemplars.The nine-character grids in each pair tha were g nerated by a machine are ( by row ) 1 , 2 ; , 1 ; 1 , 1 . RES ARCH | RES ARCH ARTICLES on N ovem ber 21 , 2020 http : //science.sciencem ag.org/ D ow nloaded from for each subpart . Last , parts are roughly positioned to begin either indep ndently , at the beginning , at the end , or along previous parts , as d fined by relation Ri ( Fig . 3A , iv ) . Character tokens q ( m ) are produce by executi g the parts and th relations andmodeling how nk flows from the pen to the page . First , motor noise i added to the control points a d the scale of the subparts to create token-lev l stroke trajectori s S ( m ) . Second , the trajectory ’ s precise start locat on L ( m ) is sampl d from the schematic provid by ts relationRi to previous strokes . Third , global transformations are sampled , including an affine warp A ( m ) and adaptive noise parameters that ease probabilistic inference ( 30 ) . Last , a binary image I ( m ) is created by a stochastic rendering function , lining the stroke trajectori s with grayscale ink and interpreting the p xel values as independent Bernoulli probabilities . Posterior inference requires searching the lar e combinatorial space of programs at could have generated a raw image I ( m ) . Our strategy uses fast bottom-up methods ( 31 ) to propose a ra ge of candidate parses . The most promising candidat s are refined by using continuous optimiza ion and local search , forming a discrete approximation to the posterior distribution P ( y , q ( m ) |I ( m ) ) ( section S3 ) . Figure 4A shows the set of discovered programs a training image I ( 1 ) and how they are refit to different test images I ( 2 ) to compute a classific tion score log P ( I ( 2 ) |I ( 1 ) ) ( the log posterior predictive probabil ty ) , where higher scor s indica e that th y are m re likely to belong to the sam class . A high score is achieved when at least one set of parts and relations can successfully explain both the training and the tes images , without violating the soft constraints of the learned within-class variability model . Figure 4B compares the model ’ s best-scoring parses with the ground-truth human parses for several characters . Results People , BPL , and alternative models were compared ide by sid on five concept learning tasks that xamine different forms of generalization f om just o or a few examples ( example task Fig . 5 ) . All behavioral experiments were run through Amazon ’ s Mechanical Turk , and the exp rime tal p ocedures are detailed in section S5 . The main results are summarized by Fig . 6 , and additional lesion analyses and controls are reported in section S6 . One-shot classification was evaluated through a series of within-alphabet classification tasks for 10 different alphabets . As illustrated in Fig . 1B , i , a single image of a new character was presented , and participants selected another example of that same character from a set of 20 distinct characters produced by a typical drawer of that alphabet . Performance is shown in Fig . 6A , where chance is 95 % errors . As a baseline , themodifiedHausdorff distance ( 32 ) was computed between centered images , producing 38.8 % errors . People were skilled one-shot learners , achieving an average error rate of 4.5 % ( N = 40 ) . BPL showed a similar error rate of 3.3 % , achieving better performance than adeep convolutional network ( convnet ; 13.5 % errors ) and the HDmodel ( 34.8 % ) —each adapted from deep learning methods that have performed well on a range of computer vision tasks . A deep Siamese convolutional network optimized for this one-shot learning task achieved 8.0 % errors ( 33 ) , still about twice as high as humans or ourmodel . BPL ’ s advantage points to the benefits ofmodeling theunderlying causal process in learning concepts , a strategy different from the particular deep learning approaches examined here . BPL ’ s other key ingredients also make positive contributions , as shown by higher error rates for BPL lesions without learning to learn ( token-level only ) or compositionality ( 11.0 % errors and 14.0 % , respectively ) . Learning to learn was studied separately at the type and token level by disrupting the learned hyperparameters of the generativemodel . Compositionality was evaluated by comparing BPL to a matched model that allowed just one spline-based stroke , resembling earlier analysisby-synthesis models for handwritten characters that were similarly limited ( 34 , 35 ) . The human capacity for one-shot learning is more than just classification . It can include a suite of abilities , such as generating new examples of a concept . We compared the creative outputs produced by humans and machines through “ visual Turing tests , ” where naive human judges tried to identify the machine , given paired examples of human and machine behavior . In our most basic task , judges compared the drawings from nine humans asked to produce a new instance of a concept given one example with nine new examples drawn by BPL ( Fig . 5 ) . We evaluated each model based on the accuracy of the judges , which we call their identification ( ID ) level : Idealmodel performance is 50 % ID level , indicating that they can not distinguish the model ’ s behavior from humans ; worst-case performance is 100 % . Each judge ( N = 147 ) completed 49 trials with blocked feedback , and judges were analyzed individually and in aggregate . The results are shown in Fig . 6B ( new exemplars ) . Judges had only a 52 % ID level on average for discriminating human versus BPL behavior . As a group , this performance was barely better than chance [ t ( 47 ) = 2.03 , P = 0.048 ] , and only 3 of 48 judges had an ID level reliably above chance . Three lesioned models were evaluated by different groups of judges in separate SCIENCE sciencemag.org 11 DECEMBER 2015 • VOL 350 ISSUE 6266 1335 1 2 1 2 1 2 1 2 1 2 1 2 Human or Machin ? Fig . 5 . Generating new exemplars . Humans and machines were given an image of a novel character ( top ) and asked to produce new exemplars.The nine-character grids in each pair that were generated by a machine are ( by row ) 1 , 2 ; 2 , 1 ; 1 , 1 . RESEARCH | RESEARCH ARTICLES on N ovem ber 21 , 2020 http : //science.sciencem ag.org/ D ow nloaded from BPL ( a ) Generating new exemplars GNS BPL ( b ) Generating new concepts Figure 4 : Generation tasks . ( a ) GNS produced 9 new exemplars for each of 5 target images , plotted here next to human and BPL productions . ( b ) A grid of 36 new character concepts sampled unconditionally from GNS , shown next to BPL samples . Generating new concepts ( unconstrained ) . In addition to generating new exemplars of a particular concept , GNS can generate new character concepts altogether , unconditioned on training images . Whereas the BPL model us s a compli ated proc dure for uncon itional ge ration that involves a preliminary inference step and a supplemental nonparametric model , GNS generates new concepts by sampling directly from the type prior P ( ψ ) . Moreover , the resulting GNS productions capture more of the structure found in real characters than either the raw BPL prior ( Fig 1 , 4b ) or the supplemental nonparametric BPL prior [ 29 ] . In Fig . 4b we show a grid of 36 new character concepts sampled from our generative model at reduced temperature setting T = 0.5 ( Appendix A.2 ) . The model produces characters in multiple distinct styles , with some having more angular , line-based structure and others relying on complex curves . In Appendix Fig . A14 , we show a larger set of characters sampled from GNS , plotted in a topologically-organized grid alongside a corresponding g id of “ ne r st neig bor ” training examples . In many cases , samples from the model have a distinct style and are visually dissimilar from their nearest Omniglot neighbor . Marginal image likelihoods . As a final evaluation , we computed likelihoods of held-out character images by marginalizing over the latent type and token variables of GNS to estimate P ( I ) = ∫ P ( ψ , θ , I ) ∂ψ∂θ . We hypothesized that our causal generative model of character concepts would yield better test likelihoods compared to deep generative models trained directly on image pixels . As detailed in Appendix D , under the minimal assump- tion that our K posterior parses represent sharply peaked modes of the joint density , we can obtain an approximate lower bound on the marginal P ( I ) by using Laplace ’ s method to estimate the integral around each mode and summing the resulting integrals . In Table 3 , we report average log-likelihood ( LL ) bounds obtained from GNS for a random subset of 1000 evaluation images , compared against test LL bounds from both the SG [ 43 ] and the VHE [ 21 ] models . Our GNS model performs stronger than each alternative , reporting the best overall log-likelihood per dimension . 6 DISCUSSION We introduced a new generative neuro-symbolic ( GNS ) model for learning flexible , task-general representations of character concepts . We demonstrated GNS on the Omniglot challenge , showing that it performs a variety of inductive tasks in ways difficult to distinguish from human behavior . Published as a conference paper at ICLR 2021 Some evaluations were still qualitative , and future work will further quantify these results using Visual Turing Tests [ 29 ] . Whereas many machine learning algorithms emphasize breadth of data domains , isolating just a single task across datasets , we have focused our efforts in this paper on a single domain , emphasizing depth of the representation learned . Human concept learning is distinguished for having both a breadth and depth of applications [ 37 , 31 ] , and ultimately , we would like to capture both of these unique qualities . We see our character model as belonging to a broader class of generative neuro-symbolic ( GNS ) models for capturing the data generation process . We have designed our model based on general principles of visual concepts—namely , that concepts are composed of reusable parts and locations—and we describe how it generalizes to 3D object concepts in Appendix E. As in the human mind , machine learning practitioners have far more prior knowledge about some domains vs. others . Handwritten characters is a domain with strong priors [ 1 , 33 , 23 ] , implemented directly in the human mind and body . For concepts like these with more explicit causal knowledge , it is beneficial to include priors about how causal generative factors translate into observations , as endowed to our character model through its symbolic rendering engine . For other types of concepts where these processes are less clear , it may be appropriate to use more generic neural networks that generate concepts and parts directly as raw stimuli , using less symbolic machinery and prior knowledge . We anticipate that GNS can flexibly model concepts in both types of domains , although further experiments are needed to demonstrate this . Our current token model for character concepts is much too simple , and we acknowledge a few important shortcomings . First , as shown in Appendix Fig . A10 , there are a number of scenarios in which the parses from a training character can not adequately refit to a new example of the same character without a token model that allows for changes to discrete variables . By incorporating this allowance in future work , we hope to capture more knowledge in this domain and further improve performance . Furthermore , although our vision for GNS is to represent both concepts and background knowledge with neuro-symbolic components , the current token-level model uses only simple parametric distributions . In future work , we hope to incorporate token-level models that use neural network sub-routines , as in the type-level model presented here . REFERENCES [ 1 ] M. K. Babcock and J. Freyd . Perception of dynamic information in static handwritten forms . American Journal of Psychology , 101 ( 1 ) :111–130 , 1988 . [ 2 ] M. Botvinick , D. Barrett , P. Battaglia , N. de Freitas , D. Kumaran , and et al . Building machines that learn and think for themselves . Behavioral and Brain Sciences , 40 : e255 , 2017 . [ 3 ] J. Devlin , J. Uesato , S. Bhupatiraju , R. Singh , A.-R. Mohamed , and P. Kohli . Robustfill : Neural program learning under noisy i/o . In ICML , 2017 . [ 4 ] K. Ellis , D. Ritchie , A. Solar-lezama , and J . B. Tenenbaum . Learning to infer graphics programs from hand-drawn images . In NeurIPS , 2018 . [ 5 ] S. M. A. Eslami , N. Heess , T. Weber , Y. Tassa , D. Szepesvari , K. Kavukcuoglu , and G. E. Hinton . Attend , infer , repeat : Fast scene understanding with generative models . In NeurIPS , 2016 . [ 6 ] R. Feinman and B. M. Lake . Generating new concepts with hybrid neuro-symbolic models . In CogSci , 2020 . [ 7 ] C. Finn , P. Abbeel , and S. Levine . Model-agnostic meta-learning for fast adaptation of deep networks . In ICML , 2017 . [ 8 ] Y. Ganin , T. Kulkarni , I. Babuschkin , S. M. A. Eslami , and O. Vinyals . Synthesizing programs for images using reinforced adversarial learning . In ICML , 2018 . [ 9 ] V. Garcia and J. Bruna . Few-shot learning with graph neural networks . In ICLR , 2018 . [ 10 ] A. Gelman , J . B. Carlin , H. S. Stern , D. B. Dunson , A. Vehtari , and D. B. Rubin . Bayesian Data Analysis ( 3rd ed. ) . CRC Press , Boca Raton , FL , 2014 . [ 11 ] S. Geman , E. Bienenstock , and R. Doursat . Neural networks and the bias/variance dilemma . Neural Computation , 4 ( 1 ) :1–58 , 1992 . Published as a conference paper at ICLR 2021 [ 12 ] D. George , W. Lehrach , K. Kansky , M. Lázaro-Gredilla , C. Laan , B. Marthi , X. Lou , and et al . A generative vision model that trains with high data efficiency and breaks text-based CAPTCHAs . Science , 358 ( 6368 ) , 2017 . [ 13 ] N. D. Goodman , J . B. Tenenbaum , J. Feldman , and T. L. Griffiths . A rational analysis of rule-based concept learning . Cognitive Science , 32:108–154 , 2008 . [ 14 ] N. D. Goodman , T. D. Ullman , and J . B. Tenenbaum . Learning a theory of causality . Psychological Review , 118 ( 1 ) :110–119 , 2011 . [ 15 ] N. D. Goodman , J . B. Tenenbaum , and T. Gerstenberg . Concepts in a probabilistic language of thought . In E. Margolis and S. Laurence ( ed . ) , The conceptual mind : New directions in the study of concepts , pp . 623–653 . MIT Press , Cambridge , MA , 2015 . [ 16 ] A. Graves . Generating sequences with recurrent neural networks . arXiv preprint arXiv:1308.0850 , 2013 . [ 17 ] A. Graves , G. Wayne , and I. Danihelka . Neural turing machines . arXiv preprint arXiv:1410.5401 , 2014 . [ 18 ] K. Greff , R. L. Kaufman , R. Kabra , N. Watters , C. Burgess , D. Zoran , L. Matthey , M. Botvinick , and A. Lerchner . Multi-object representation learning with iterative variational inference . In ICML , 2019 . [ 19 ] K. Gregor , I. Danihelka , A. Graves , D. J. Rezende , and D. Wierstra . DRAW : A recurrent neural network for image generation . In ICML , 2015 . [ 20 ] D. Ha and D. Eck . A neural representation of sketch drawings . In ICLR , 2018 . [ 21 ] L. B. Hewitt , M. I. Nye , A. Gane , T. Jaakkola , and J . B. Tenenbaum . The Variational Homoencoder : Learning to learn high capacity generative models from few examples . In UAI , 2018 . [ 22 ] L. B. Hewitt , T. A . Le , and J . B. Tenenbaum . Learning to learn generative programs with Memoised Wake-Sleep . In UAI , 2020 . [ 23 ] K. H. James and I. Gauthier . When writing impairs reading : Letter perception ’ s susceptibility to motor interference . Journal of Experimental Psychology : General , 138 ( 3 ) :416–31 , 2009 . [ 24 ] C. Kemp and J . B. Tenenbaum . Structured statistical models of inductive reasoning . Psychological Review , 116:20–58 , 2009 . [ 25 ] A. R. Kosiorek , S. Sabour , Y. W. Teh , and G. E. Hinton . Stacked Capsule Autoencoders . In NeurIPS , 2019 . [ 26 ] T. D. Kulkarni and et al . Picture : A probabilistic programming language for scene perception . In CVPR , 2015 . [ 27 ] B. M. Lake and M. Baroni . Generalization without systematicity : On the compositional skills of sequence-to-sequence recurrent networks . In ICML , 2018 . [ 28 ] B. M. Lake and S. T. Piantadosi . People infer recursive visual concepts from just a few examples . Computational Brain & Behavior , 2019 . [ 29 ] B. M. Lake , R. Salakhutdinov , and J . B. Tenenbaum . Human-level concept learning through probabilistic program induction . Science , 350:1332–1338 , 2015 . [ 30 ] B. M. Lake , T. D. Ullman , J . B. Tenenbaum , and S. J. Gershman . Building machines that learn and think like people . Behavioral and Brain Sciences , 40 : E253 , 2017 . [ 31 ] B. M. Lake , R. Salakhutdinov , and J . B. Tenenbaum . The Omniglot challenge : A 3-year progress report . Behavioral Sciences , 29:97–104 , 2019 . [ 32 ] Y. LeCun , Y. Bengio , and G. Hinton . Deep learning . Nature , 521 ( 7553 ) :436–444 , 2015 . [ 33 ] M. Longcamp , J. L. Anton , M. Roth , and J. L. Velay . Visual presentation of single letters activates a premotor area involved in writing . Neuroimage , 19 ( 4 ) :1492–1500 , 2003 . [ 34 ] J. Mao , C. Gan , P. Kohli , J . B. Tenenbaum , and J. Wu . The neuro-symbolic concept learner : Interpreting scenes , words , and sentences from natural supervision . In ICLR , 2019 . [ 35 ] G. F. Marcus . The Algebraic Mind : Integrating Connectionism and Cognitive Science . MIT Press , Cambridge , MA , 2003 . Published as a conference paper at ICLR 2021 [ 36 ] J. L. McClelland , M. M. Botvinick , D. C. Noelle , D. C. Plaut , T. T. Rogers , M. S. Seidenberg , and L. B. Smith . Letting structure emerge : Connectionist and dynamical systems approaches to cognition . Trends in Cognitive Science , 14:348–356 , 2010 . [ 37 ] G. L. Murphy . The big book of concepts . MIT Press , Cambridge , MA , 2002 . [ 38 ] G. L. Murphy and D. L. Medin . The role of theories in conceptual coherence . Psychological Review , 92 ( 3 ) :289–316 , 1985 . [ 39 ] M. I. Nye , A. Solar-Lezama , J . B. Tenenbaum , and B. M. Lake . Learning compositional rules via neural program synthesis . arXiv preprint arXiv:2003.05562 , 2020 . [ 40 ] A. Perfors , J . B. Tenenbaum , and T. Regier . The learnability of abstract syntactic principles . Cognition , 118 ( 3 ) :306–338 , 2011 . [ 41 ] S. T. Piantadosi , J . B. Tenenbaum , and N. D. Goodman . The logical primitives of thought : Empirical foundations for compositional cognitive models . Psychological Review , 2016 . [ 42 ] S. Reed and N. de Freitas . Neural programmer-interpreters . In ICLR , 2016 . [ 43 ] D. J. Rezende , S. Mohamed , I. Danihelka , K. Gregor , and D. Wierstra . One-Shot generalization in deep generative models . In ICML , 2016 . [ 44 ] P. Shyam , S. Gupta , and A. Dukkipati . Attentive recurrent comparators . In ICML , 2017 . [ 45 ] J. Snell , K. Swersky , and R. Zemel . Prototypical networks for few-shot learning . In NeurIPS , 2017 . [ 46 ] A. Stuhlmuller , J . B. Tenenbaum , and N. D. Goodman . Learning Structured Generative Concepts . In CogSci , 2010 . [ 47 ] J . B. Tenenbaum , C. Kemp , T. L. Griffiths , and N. D. Goodman . How to grow a mind : Statistics , structure , and abstraction . Science , 331 ( 6022 ) :1279–1285 , 2011 . [ 48 ] L. Valkov , D. Chaudhari , A. Srivastava , C. Sutton , and S. Chaudhuri . HOUDINI : Lifelong learning as program synthesis . In NeurIPS , 2018 . [ 49 ] O. Vinyals , C. Blundell , T. Lillicrap , and D. Wierstra . Matching networks for one shot learning . In NeurIPS , 2016 . [ 50 ] K. Yi , J. Wu , C. Gan , A. Torralba , P. Kohli , and J . B. Tenenbaum . Neural-symbolic VQA : Disentangling reasoning from vision and language understanding . In NeurIPS , 2018 . Published as a conference paper at ICLR 2021 A GENERATIVE MODEL ψ θ I M Type Token Image Figure A5 : The GNS hierarchical generative model . The full hierarchical generative model of GNS is depicted in Fig . A5 . The joint density for type ψ , token θ ( m ) , and image I ( m ) factors as P ( ψ , θ ( m ) , I ( m ) ) = P ( ψ ) P ( θ ( m ) |ψ ) P ( I ( m ) |θ ( m ) ) . ( 6 ) The type ψ parameterizes a motor program for generating character tokens θ ( m ) , unique exemplars of the concept . Both ψ and θ ( m ) are expressed as causal drawing parameters . An image I ( m ) is obtained from token θ ( m ) by rendering the drawing parameters and sampling binary pixel values . A.1 TRAINING ON CAUSAL DRAWING DATA original stroke minimal spline Figure A6 : Spline representation . Raw strokes ( left ) are converted into minimal splines ( right ) using least-squares optimization . Crosses ( left ) indicate pen locations and red dots ( right ) indicate spline control points . To learn the parameters of P ( ψ ) and P ( θ ( m ) | ψ ) , we fit our models to the human drawing data from the Omniglot background set . In this drawing data , a character is represented as a variable-length sequence of strokes , and each stroke is a variable-length sequence of pen locations { z1 , ... , zT } , with zt ∈ R2 ( Fig . A6 , left ) . Before training our model on background drawings , we convert each stroke into a minimal spline representation using least-squares optimization ( Fig . A6 , right ) , borrowing the B-spline tools from [ 29 ] . The number of spline control points depends on the stroke complexity and is determined by a residual threshold . Furthermore , we removed small strokes using a threshold on the trajectory length . These processing steps help suppress noise and emphasize signal in the drawings . Our generative models are trained to produce character drawings , where each drawing is represented as an ordered set of splines ( strokes ) . The number of strokes , and the number of spline coordinates per stroke , are allowed to vary in the model . A.2 TYPE PRIOR The type prior P ( ψ ) represents a character as a sequence of strokes , with each stroke decomposed into a starting location yi ∈ R2 , conveying the first spline control point , and a stroke trajectory xi = { ∆1 , ... , ∆N } , conveying deltas between spline control points . It generates character types one stroke at a time , using a symbolic rendering procedure called frender as an intermediate processing step after forming each stroke . An image canvas C is used as a memory state to convey information about previous strokes . At each step i , the next stroke ’ s starting location and trajectory are sampled with procedure GeneratePart . In this procedure , the current image canvas C is first read by the location model ( Fig . 2 ) , a convolutional neural network ( CNN ) that processes the image and returns a Published as a conference paper at ICLR 2021 probability distribution for starting location yi : yi ∼ p ( yi | C ) . The starting location yi is then passed along with the image canvas C to the stroke model , a Long Short-Term Memory ( LSTM ) architecture with a CNN-based image attention mechanism.The stroke model samples the next stroke trajectory xi sequentially one offset at a time , selectively attending to different parts of the image canvas at each sample step and combining this information with the context of yi : xi ∼ p ( xi | yi , C ) . After GeneratePart returns , the stroke parameters yi , xi are rendered to produce an updated canvas C = frender ( yi , xi , C ) . The new canvas is then fed to the termination model , a CNN architecture that samples a binary termination indicator vi : vi ∼ p ( vi | C ) . Both our location model and stroke model follow a technique from [ 16 ] , who proposed to use neural networks with mixture outputs to model handwriting data . Parameters { π1 : K , µ1 : K , σ1 : K , ρ1 : K } output by our network specify a Gaussian mixture model ( GMM ) with K components ( Fig . 2 ; colored ellipsoids ) , where πk ∈ ( 0 , 1 ) is the mixture weight of the kth component , µk ∈ R2 its means , σk ∈ R2+ its standard deviations , and ρk ∈ ( −1 , 1 ) its correlation . In our location model , a single GMM describes the distribution p ( yi | C ) . In our stroke model , the LSTM outputs one GMM at each timestep , describing p ( ∆t|∆1 : t−1 , yi , C ) . The termination model CNN has no mixture outputs ; it predicts a single Bernoulli probability to sample binary variable vi . When sampling from the model at test time , we use a temperature parameter proposed by Ha & Eck [ 20 ] ( see [ 20 , Eq . 8 ] ) to control the entropy of the mixture density outputs . A.3 TOKEN MODEL procedure GENERATETOKEN ( ψ ) { κ , y1 : κ , x1 : κ } ← ψ . Unpack type-level variables for i = 1 ... κ do y ( m ) i ∼ P ( y ( m ) i | yi ) . Sample token-level location x ( m ) i ∼ P ( x ( m ) i | xi ) . Sample token-level part A ( m ) ∼ P ( A ( m ) ) . Sample affine warp transformation θ ← { y ( m ) 1 : κ , x ( m ) 1 : κ , A ( m ) } return θ . Return concept token Figure A7 : Token model sampling procedure . Character types ψ are used to parameterize the procedure GenerateToken ( ψ ) , a probabilistic program representation of token model P ( θ ( m ) | ψ ) . The psuedo-code of this sampling procedure is provided in Fig . A7 . The location model P ( y ( m ) i | yi ) and part model P ( x ( m ) i | xi ) are each zeromean Gaussians , with standard deviations fit to the background drawings following the procedure of Lake et al . [ 29 ] ( see SM 2.3.3 ) . The location model adds noise to the start of each stroke , and the part model adds isotropic noise to the 2d cooridnates of each spline control point in a stroke . In the affine warp A ( m ) ∈ R4 , the first two dimensions control global re-scaling of spline coordinates , and the second two control a global translation of the center of mass . The distribution is P ( A ( m ) ) = N ( [ 1 , 1 , 0 , 0 ] , ΣA ) , ( 7 ) with the parameter ΣA similarly fit from background drawings ( see SM 2.3.4 in [ 29 ] ) . B APPROXIMATE POSTERIOR To obtain parses { ψ , θ } 1 : K for our approximate posterior ( Eq . 3 ) given an image I , we follow the high-level strategy of Lake et al . [ 29 ] , using fast bottom-up search followed by discrete selection and continuous optimization . The algorithm proceeds by the following steps . 13 Published as a conference paper at ICLR 2021 Step 1 : Propose a range of candidate parses with fast bottom-up methods . The bottom-up algorithm extracts an undirected skeleton graph from the character image and uses random walks on the graph to propose a range of candidate parses . There are typically about 10-100 proposal parses , depending on character complexity ( Fig . A8 ) . input Figure A8 : The initial “ base ” parses proposed for an image with skeleton extraction and random walks . Step 2 : Select stroke order and stroke directions for each parse using exhaustive search with the type prior P ( ψ ) . Random search is used for complex parses with large configuration spaces . Step 3 : Score each of the proposal parses using type prior P ( ψ ) and select the top-K parses . We use K = 5 following previous work [ 29 ] . Step 4 : Separate each parse into type and token { ψ , θ } and optimize the continuous type- and token-level parameters with gradient descent to maximize the full joint density P ( ψ , θ , I ) of Eq . 1 . Step 5 : Compute weights π1 : K for each parse by computing π̃k = P ( ψk , θk , I ) and normalizing πk = π̃k/ ∑K k=1 π̃k . C INFERENCE FOR GENERATING NEW EXEMPLARS When generating new exemplars , we are given a single image I ( 1 ) of a novel class and asked to generate new instances I ( 2 ) ( overloading the parenthesis notation from classification ) . To perform this task with GNS , we first sample from our approximate posterior Q ( ψ , θ | I ( 1 ) ) to obtain parse { ψ , θ } ( see Eq . 3 ) , and then re-sample token parameters θ from our token model P ( θ ( 2 ) | ψ ) . Due to high-dimensional images , mass in the approximate posterior often concentrates on the single best parse . To model the diversity seen in different human parses , we apply a temperature parameter to the log of unnormalized parse weights log ( π̃′k ) = log ( π̃k ) /T before normalization , selecting T = 8 for our experiments . With updated weights π′1 : K our sampling distribution is written as P ( I ( 2 ) , θ ( 2 ) | I ( 1 ) ) ≈ K∑ k=1 π′kP ( I ( 2 ) | θ ( 2 ) ) P ( θ ( 2 ) | ψk ) . ( 8 ) D MARGINAL IMAGE LIKELIHOODS Let z = ψ ∪ θ be a stand-in for the joint set of type- and token-level random variables in our GNS generative model . The latent z includes both continuous and discrete variables : the number of strokes κ and the number of control points per stroke d1 : κ are discrete , and all remaining variables are continuous . Decomposing z into its discrete variables zD ∈ ΩD and continuous variables zC ∈ ΩC , the marginal density for an image I is written as P ( I ) = ∑ zD∈ΩD ∫ P ( I , zD , zC ) ∂zC . ( 9 ) Published as a conference paper at ICLR 2021 For any subset Ω̃D ⊂ ΩD of the discrete domain , the following inequality holds : P ( I ) ≥ ∑ zD∈Ω̃D ∫ P ( I , zD , zC ) ∂zC . ( 10 ) Our approximate posterior ( Eq . 3 ) gives us K parses that represent promising modes { zD , zC } 1 : K of the joint density P ( I , zD , zC ) for an image I , and by setting Ω̃D = { zD } 1 : K to be the set of K unique discrete configurations from our parses , we can compute the lower bound of Eq . 10 by computing the integral ∫ P ( I , zD , zC ) ∂zC at each of these zD . At each zDk ∈ { zD } 1 : K , the log-density function f ( zC ) = log P ( I , zDk , zC ) has a gradient-free maximum at zCk , the continuous configuration of the corresponding posterior parse . These maxima were identified by our gradient-based continuous optimizer during parse selection ( Appendix B ) . If we assume that these maxima are sharply peaked , then we can use Laplace ’ s method to estimate the integral ∫ P ( I , zDk , zC ) ∂zC at each zDk . Laplace ’ s method uses Taylor expansion to approximate the integral of ef ( x ) for a twice-differentiable function f around a maximum x0 as∫ ef ( x ) ∂x ≈ ef ( x0 ) ( 2π ) d 2 | −Hf ( x0 ) | 12 , ( 11 ) where x ∈ Rd andHf ( x0 ) is the Hessian matrix of f evaluated at x0 . Our log-density function f ( zC ) is fully differentiable w.r.t . continuous parameters zC , therefore we can compute H ( zC ) = ∂2f/∂z2C with ease . Our approximate lower bound on P ( I ) is therefore written as the sum of Laplace approximations at our K parses : P ( I ) ≥ K∑ k=1 ∫ P ( I , zDk , zC ) ∂zC ≈ K∑ k=1 P ( I , zDk , zCk ) ( 2π ) d 2 | −H ( zCk ) | 1 2 ( 12 ) E APPLYING GNS TO 3D OBJECT CONCEPTS The GNS modeling framework is designed to capture inductive biases for concept learning that generalize across different types of visual concepts . We are actively working on applying GNS as a task-general generative model of 3D object concepts , such as chairs and vehicles , again with a neuro-symbolic generative process for parts and relations . Here , we briefly review the path forward for training GNS models of object concepts . procedure GENERATETYPE C 0 . Initialize blank image canvas while true do [ yi , xi ] GENERATEPART ( C ) . Sample part location & parameters C frender ( yi , xi , C ) . Render part to image canvas vi ⇠ p ( v | C ) . Sample termination indicator if vi then break . Terminate sample { , y1 : , x1 : } return . Return concept type 1 procedure GENERATETOKEN C 0 . Initialize blank 3d canvas while true do xi GENERATEPART ( C ) . Sample part from neural net C fupdate ( xi , C ) . Update 3d canvas vi ⇠ p ( v | C ) . Sample termination indicator if vi then break . Terminate sample ✓ { , x1 : } return . Return concept token 1 procedure GENERATETYPE C 0 . Initialize blank image canvas while true do [ yi , xi ] GENERATEPART ( C ) . Sample part location & parameters C frender ( yi , xi , C ) . Render part to image canvas vi ⇠ p ( v | C ) . Sample termination indicator if vi then break . Terminate sample { , y1 : , x1 : } return . Return concept type category model p ( k |C ) instance model p ( x |k , C ) C p ( k ∣ C ) C q ( z ∣ x , k , C ) zk p ( x |z ) x p k Ck p ( z |k , C ) x generate token se at leg s ba ck re st Figure A9 : A GNS model for the concept of a chair . Everyday 3D object concepts have more within-class variability than handwritten characters ; for example , different chair tokens vary in the number of arm rests , legs , etc . much as different handwritten character types vary in their parts , although both domains are characterized by similar structural 15 Published as a conference paper at ICLR 2021 and statistical considerations . To address these differences within GNS , we shift up one level in the generative hierarchy and design a token-level model for generating new exemplars of an individual concept ( chairs , cars , etc . ) that mirrors our type-level model for characters . The architecture and sampling procedure of GNS for 3D object tokens is given in Fig . A9 . As with characters , our object model produces samples one part at a time , using a 3D canvas C in place of the previous 2D canvas . The procedure GeneratePart consists of two neural network components : 1 ) a discriminitivelytrained category model p ( k | C ) that predicts the category label k of the next part given the current canvas ( leg , arm , back , etc . ) , and 2 ) a generative instance model p ( x | k , C ) that is trained with a variational autoencoder objective to sample an instance of the next part x given the current canvas and predicted part category label . Objects and object parts are represented as 3D voxel grids , and all neural modules , including the category model and the encoder/decoder of the instance model , are parameterized by 3D convolutional neural networks . A function fupdate is used to update the current canvas with the most recent part by summing the voxel grids . A GNS model for a particular concept is trained on examples of the 3D voxel grids with semantic part labels . F.4 GENERATING NEW CONCEPTS ( UNCONSTRAINED ) In Fig . A14 we show a grid of 100 new character concepts produced by GNS , plotted alongside a corresponding grid of “ nearest neighbor ” training examples . Published as a conference paper at ICLR 2021 I ( c ) I ( T ) Score : -618.6 I ( c ) I ( T ) Score : -1624.5 I ( c ) I ( T ) Score : -269.4 I ( c ) I ( T ) Score : -281.1 I ( c ) I ( T ) Score : -269.1 I ( c ) I ( T ) Score : -381.6 I ( c ) I ( T ) Score : -820.9 I ( c ) I ( T ) Score : -505.6 I ( c ) I ( T ) Score : -403.6 I ( c ) I ( T ) Score : -814.4 I ( c ) I ( T ) Score : -742.5 I ( c ) I ( T ) Score : -545.6 Figure A10 : Classification fits . Each row corresponds to one classification trial ( one test image ) . The first column shows parses from the correct training image re-fit to the test example , and the second column parses from an incorrect training image . The two-way score for each train-test pair is shown above the grid , and the model ’ s selected match is emboldened . The 4th and 6th row here are misclassified trials . Published as a conference paper at ICLR 2021 Published as a conference paper at ICLR 2021 Figure A12 : Generating new exemplars with GNS . Twelve target images are highlighted in red boxes . For each target image , the GNS model sampled 9 new exemplars , shown in a 3x3 grid under the target . One-shot Generalization in Deep Generative Models Figure 8 . Unconditional samples for 52 × 52 omniglot ( task 1 ) . For a video of the generation process , see https : //www.youtube.com/ watch ? v=HQEI2xfTgm4 Figure 9 . Generating new examplars of a given character for the weak generalization test ( task 2a ) . The first row shows the test images and the next 10 are one-shot samples from the model . 3 . Representative samples from a novel alphabet . This task corresponds to figure 7 in Lake et al . ( 2015 ) , and conditions the model on anywhere between 1 to 10 samples of a novel alphabet and asks the model to generate new characters consistent with this novel alphabet . We show here the hardest form of this test , using only 1 context image . This test is highly subjective , but the model generations in figure 11 show that it is able to pick up common features and use them in the generations . We have emphasized the usefulness of deep generative models as scalable , general-purpose tools for probabilistic reasoning that have the important property of one-shot generalization . But , these models do have limitations . We have already pointed to the need for reasonable amounts of data . Another important consideration is that , while our models can perform one-shot generalization , they do not perform one-shot learning . One-shot learning requires that a model is updated after the presentation of each new input , e.g. , like the non-parametric models used by Lake et al . ( 2015 ) or Salakhutdinov et al . ( 2013 ) . Parametric models such as ours require a gradient update of the parameters , which we do not do . Instead , our model performs a type of one-shot inference that during test time can perform inferential tasks on new data points , such as missing data completion , new exemplar generation , or analogical sampling , but does not learn from these points . This distinction between one-shot learning and inference is important and affects how such models can be used . We aim to extend our approach to the online and one-shot learning setting in future . 30-20 40-10 45-5 Figure 10 . Generating new examplars of a given character for the strong generalization test ( task 2b , c ) , with models trained with different amounts of data . Left : Samples from model trained on 30-20 train-test split ; Middle : 40-10 split ; Right : 45-5 split ( right ) Figure 11 . Generating new exemplars from a novel alphabet ( task 3 ) . The first row shows the test images , and the next 10 rows are one-shot samples generated by the model . 6 . Conclusion We have developed a new class of general-purpose models that have the ability to perform one-shot generalization , emulating an important characteristic of human cognition . Sequential generative models are natural extensions of variational auto-encoders and provide state-of-the-art models for deep density estimation and image generation . The models specify a sequential process over groups of latent variables that allows it to compute the probability of data points over a number of steps , using the principles of feedback and attention . The use of spatial attention mechanisms substantially improves the ability of the model to generalize . The spatial transformer is a highly flexible attention mechanism for both reading and writing , and is now our default mechanism for attention in generative models . We highlighted the one-shot generalization ability of the model over a range of tasks that showed that the model is able to generate compelling and diverse samples , having seen new examples just once . However there are limitations of this approach , e.g. , still needing a reasonable amount of data to avoid overfitting , which we hope to address in future work . ( a ) SG Figure 4 : 5-shot samples generated by each model ( more in Supplement ) . With a PixelCNN architecture , both Neural Statistician and Resample objectives lead to underutilisation of the latent space , producing unfaithful samples . For the hierarchical PixelCNN architecture , however , significant differences arise between training objectives . In this case , a Neural Statistician learns a strong global distribution over images but makes only minimal use of latent variables c. This means that , despite the use of a higher capacity model , classification accuracy is much poorer ( 66 % ) than that achieved using a deconvolutional architecture . For the same reason , conditional samples display an improved sharpness but are no longer identifiable to the cue images on which they were conditioned ( Figure 4 ) . Our careful training suggests that this is not an optimisation difficulty but is core to the objective , as discussed in Chen et al . ( 2016 ) . By contrast , a VHE is able to gain a large benefit from the hierarchical PixelCNN architecture , with a 3-fold reduction in classification error ( 5-shot accuracy 98.8 % ) and conditional samples which are simultaneously sharp and identifiable ( Figure 4 ) . This improvement is in part achieved by increased utilisation of the latent space , due to rescaling of the KL divergence term in the objective . However , our results show that this common technique is insufficient when used alone , leading to overfitting to cue images with an equally severe impairment of classi- fication performance ( accuracy 62.8 % ) . Rather , we find that KL-rescaling and data resampling must be used tog ther in order for the benefit of the powerful PixelCNN architecture to be re lis d. Table 2 lists the classification accuracy achieved by VHEs with both |D| = 1 and |D| = 5 , as compared to existing d ep learning appr aches . We find t at both network ar not only state- f-the-art mongst deep generative models , but also competitive against the best discriminative models trained directly for few-shot classification . Unlike these discriminative models , VHE is also able to generate new images of a character in one shot , producing samples which are both realistic and faithful to the class of the cue image ( Figure 5 ) . As our goal is to model shared structure acr ss images , we evaluate generative performance using joint log like- Figure 5 : One-shot same-class samples generated by our model . Cue images were sampled from previously unseen classes . lihood of the entire Omniglot test set ( rather than separately across images ) . From this perspective , a single element VAE will perform poorly as it treats all datapoints as independent , optimising a sum over log likelihoods for each element . By sharing latents across elements of the same class , a VHE can improve upon this considerably . For likelihood evaluation , our most appropriate comparison is with Generative Matching Networks ( Bartunov & Vetrov , 2016 ) as they also model dependencies within a class . Thus , we trained models under the same train/test split as them , with no data augmentation . We evaluate the joint log likelihood of full character classes from the test set , normalised by the number of elements , using importance weighting with k=500 samples from q ( c ; X ) . As can be seen in Tables 3 and 4 , our hierarchical PixelCNN architecture is able to achieve state-of-the-art log likelihood results only when trained using the VHE objective . Figure 4 : 5-shot samples generated by each model ( more in Supplement ) . With a PixelCNN architecture , both Neural Statistician and Resample objectives lead to underutilisation of the latent space , producing unfaithful samples . For the hierarchical PixelCNN architecture , however , significant differences arise between training objectives . In this case , a Neural Statistician learns a strong global distribution over images but makes only minimal use of latent variables c. This means that , despite the use of a higher capacity model , classification accuracy s much poorer ( 66 % ) than that achieved using a deconvolutional architecture . For the same reason , conditional samples display an improved sharpness but are no longer identifiable to the cue images on which they were conditioned ( Figure 4 ) . Our care ul training sug ests that this is not an optimisation difficulty but is core t the objective , as discussed in Chen et al . ( 2016 ) . By contrast , a VHE is able to gain a large benefit from the hierarchical PixelCNN architecture , with a 3-fold reduction in classification error ( 5-shot accuracy 98.8 % ) and conditional samples which are simultaneously sharp and identifiable ( Figure 4 ) . This improvement is in part achieved by increased utilisation of the latent space , due to rescaling of the KL divergence term in the objective . However , our results show that this common technique is insufficient when used alone , leading to overfitting to cue images with an equally severe impair ent of classification performance ( accuracy 62.8 % ) . Rather , we find that KL-rescaling and data resampling must be used together in order for the benefit of the powerful PixelCNN architecture to be realised . Table 2 lists the classification accuracy achieved by VHEs with both |D| = 1 and |D| = 5 , as compared to existing deep learning approaches . We find that both networks are not only state-of-the-art amongst deep generative models , but also competitive against the best discriminative models trained directly for few-shot classi- fication . Unlike these discriminative models , a VHE is also able to generate new images of a character in one shot , producing samples which are both realistic and faithful to the class of the cue image ( Figure 5 ) . As our goal is to model shared structure across images , we evaluate generative performance usi g joint log like- Figure 5 : One-shot same-class samples generated by our model . Cue images were sampled from previously un- seen classes . lihood of the entire Omniglot test set ( rather than separately across images ) . From this perspective , a single element VAE will perform poorly as it treats all datapoints as independent , optimising a sum over log likelihoods for each element . By sharing latents across elements of the same class , a VHE can improve upon this considerably . For likelihood evaluation , our most appropriate comparison is with Generative Matching Networks ( Bartunov & Vetrov , 2016 ) as they also model dependencies within a class . Thus , we trained models under the same train/test split as them , with no data augmentation . We evaluate the joint log likelihood of full character classes from the test set , normalised by the number of elements , using importance weighting with k=500 samples from q ( c ; X ) . As can be seen in Tables 3 and 4 , our hierarchical PixelCNN architecture is able to achieve state- f-the-art log likelihood results nly when trained using the VHE objective . Figure 4 : 5-shot samples generated by each model ( more in Supplement ) . With a PixelC N architecture , both Neural S atist cian and Resample objectives lead to underutilisation of the latent space , producing unfaithful samples . For the hie archical PixelC N architecture , however , significant diff rences arise between tra ing objectives . In this case , a Neural S atist cian learns a stron global distribution over images but makes only m nimal use of latent variables c. This means that , despite the use of a higher capacity model , clas ification ccuracy is much poo er ( 66 % ) than that achieved using a deconvolutional architecture . For the same reason , conditional samples display an improved sharpness but are no longer identifiable to the cue images on which they w re conditioned ( Figure 4 ) . Our careful tra ing sugge t that this is not an optimisation difficulty but is core to the objective , as discussed in Chen et al . ( 2016 ) . By contrast , a VHE is able to gain a large benefit from the hie archical PixelC N architecture , with a 3-fold reduction in classification error ( 5-shot accuracy 9 .8 % ) and conditional samples which are simultaneously sharp and identifiable ( Figure 4 ) . This improvement is in part achieved by increased utilisation of the latent space , due to rescaling of the KL divergence term in the objective . However , ou result show tha this co mon technique is insufficient when used alone , leading t overfitting to cue images with an equally sev re impairment of classification performance ( accuracy 62.8 % ) . Rather , we find that KL-rescaling an d ta resampling must be used together in order for the benefit of the powerful PixelC N architecture to be realised . Table 2 li ts the classification accuracy achieved by VHEs with both |D| = 1 and |D| = 5 , as compared to existing deep lear ing approaches . We find that both networks are not only s ate-of-the-art amongst deep generative models , but also competitive against the best discriminative models trained directly for few-shot classi- fication . Unlike th se discriminative models , a VHE is also able to generate new images of a ch racter in one shot , producing samples which are both realistic and faithful to the class of the cue image ( Figure 5 ) . As our goal is to model shared structure across images , w evaluate generative perf rmance using joint log like- Figure 5 : One-shot same-clas samples generated by our model . Cue images w re sampled from previously un- seen classes . lihood of th entire Omniglo test set ( rather than separately across images ) . From this perspective , a singl elment VAE will perform poorly as it treats all d tapoints as independent , optim sing a sum over log likelihoods for each lement . By sharing latents across lements of the same class , a VHE can improve upon this considerably . For likelihood evaluation , our most appropriate comparison is with Generative Matching Networks ( Bartunov & Vetrov , 2016 ) as they also model dependencies within a class . Thus , we trained models under the same train/test split as them , with no d t augmen ation . W evaluate the joint log likelihood o full ch racter cla ses from the test set , normalised by the number of lements , using importance weighting with k=500 samples from q ( c ; X ) . As can be seen in Tables 3 and 4 , our hie archical PixelC N architectur is able to achieve s ate-of-the art log likelihood results only whe trained using the VHE objective . Figure 4 : 5-shot samples generated by each mod l ( more in Supplement ) . With a PixelCNN architecture , both eural Statistician and Resample objectives l ad to underutilisation of the lat nt sp ce , pr ducing u faithful samples . For the hierarchical PixelCNN architecture , however , significant differences arise between training objectives . In this case , a Neural Stati tician learns a strong global distribution over images t makes only minimal use of latent variables c. This me ns that , despite th use of higher capacity model , classific tion accuracy i much poorer ( 66 % ) than that achieved using a deconvolutional architecture . For the same reason , c nditional samples display an improved sharpness but a e no longer identifiable to the cue images on w ich they were c ditioned ( Figure 4 ) . Our careful traini g s ggests that this is not an optimisation difficulty but is c re t the objective , as discussed in Chen et al . ( 2016 ) . By contrast , a VHE is able to gain a large benefit from the hierarchical PixelCNN architecture , with a 3-fold r - duction in classification error ( 5-shot curacy 98.8 % ) and conditional samples which are simultan ously sh p and identifiable ( Figure 4 ) . This improvement is in part achieved by increased utilisation of th latent space , due to rescaling of the KL diverge ce term in the obj ctiv . However , our results show that this common technique is insufficient when used alone , leading to overfitting to cue images with an equally s vere imp irment of classification performance ( curacy 62.8 % ) . R ther , we find that KL-rescaling and d ta resampling must be us d together in order for the ben fit of th p w rful PixelCNN architecture to be re lised . Table 2 lists the classification accuracy achieved by VHEs with both |D| = 1 and |D| = 5 , as compared to existing deep learning approaches . We fi d that bot networks are not only state-of-the-art amongst deep gen erative models , but also competitive against the best discriminative models trained directly for few-shot classification . Unlike these discriminativ mod ls , a VHE is also able to generate new images of a character in one shot , producing samples which are both realistic and faithful to the class of t e c e image ( Figure 5 ) . As our goal is to model shared structure acros images , we evaluate gener tiv performance using joint l g lik - Figure 5 : One-shot same-class samples generated by our mod l. Cue images were sampl d from previously un- seen classes . lihood of the e tire Omniglot test s t ( ather than separately acro s images ) . From this persp ctive , a single elment VAE will perfor poorly as it treats all datapoint as independent , optimising a sum over log likelihoods for each le e t. By sh ring lat nts across elements of the same class , a VHE can i prove upon this considerably . For likeli ood evaluation , our m st appropriate co paris i with G erative Matching N tworks ( Bartu ov & Vetrov , 2016 ) a they also model depend ncies within a clas . Thus , we trained models under the sa e train/test split as them , with no ata augmentatio . We eval at the joint log likel hood f full charact r class s from the t st set , normal s d by th numb of elem nts , sing importanc weighting with k=500 samples from q ( c ; X ) . As can be seen in Tables 3 d 4 , our hier rchical PixelCNN architecture is ble to a i ve state-of-the-art log likelihood results only wh train d usi g the VHE obj ctiv . Figure 4 : 5-s ot samples g nerated by each del ( mor in Supplem n ) . With a PixelCNN architecture , both Neural Statistician and Resample objectives le d to und rutilisatio of the latent spac , producing nfaithful samples . For the hiera chical PixelCNN architecture , however , significant differences ari e betwee training objectives . In this case , a Neural Statistician learns a strong global distribution over images but makes only minimal use of latent variabl s c. This means that , despite the use of a higher capacity model , lassification accuracy is much poorer ( 66 % ) than that achieved using a deconvolutional archite ture . For the same reason , conditional samples display an improv d sharpness but are no longer identifiable to the cue images on which they were conditioned ( Figure 4 ) . O r careful training suggests that this is not an optimisation difficulty but is core to the objective , as discussed in Chen et al . ( 2016 ) . By contrast , a VHE is able to gain a large benefit from t e hierarchical PixelCNN architecture , with a 3-fold reduction in classification error ( 5-shot accuracy 98.8 % ) and conditional samples which are sim ltaneously harp and dentifiabl ( Figure 4 ) . This i provement is in part achieved by increased utilisation of the latent space , due to r scaling of the KL divergence term in the objective . However , our results show that this common technique is insufficient when used alone , leading to overfitting to cu images with an equally severe impairment of classificati n performance ( accuracy 62.8 % ) . Rather , we find that KL-rescaling and data resa pling must be used together in order for the benefit f the powerful PixelCNN architecture to be realised . Table 2 lists the classification accuracy achieved by VHEs with both |D| = 1 and |D| = 5 , as compared t existing deep learning approaches . We find that both netwo ks are not only state-of-the-art amongst deep genera models , but al o competitive against the best discri inative models trained directly for few-shot classification . Unlike these discri inative models , a VHE is also able to ge erate ew images of a character in one shot , pr ducing samples which are both realistic and faithful to the class of the cue image ( Figure 5 ) . As our goal is t model shared structure across images , w eval at ge erative p rformance using joint log like- Figure 5 : One-shot same-class samples generated by our odel . Cue images were sampled from previously un- seen classes . lihood of the ntire Omniglot test set ( rather than separately across im ges ) . From this perspective , a single element VAE will perf rm poorly as it treats all datapoints as independent , optimi ing a sum over log likelihoods for each element . By sharing latents across elements of the same class , a VHE can im rove upon this considerably . For likelihood evaluation , our most appropriate comparison is with Genera ive Matching Networks ( Bartunov & Vetrov , 2016 ) as they also model dependencies within a class . Thus , we trained mo els under the same train/test split as them , with no data augmentation . We evaluate the join log likeliho d of full character classes from the test set , nor alised by the number of eleme ts , using importance weighting with k=500 sa ples from q ( c ; X ) . As ca be seen in Tables 3 and 4 , our hierarchical PixelCNN architecture is ab e to achieve state-of-the-art log likelihood r sults only when trai ed usi g the VHE objective . Figure 4 : 5-shot samples g nerated by each model ( or in Supplement ) . With PixelCNN architect e , both Neural Statistician and R sample objectiv lead to underutilis tion of th latent space , produci g unfaithful samples . For the hierarchical PixelCNN archit cture , however , signifi ant d fferences arise between train ng objectives . In this case , a Neural Stati tician learns strong g obal dist ibution over images but akes only mini l u e of atent var ables c. This me ns that , d spite the use of a higher capa ity mod l , l ssificati n accuracy is much poorer ( 66 % ) than that achieved using a deconvol tional architecture . For the same reas n , conditional amples display an improved sh rp ess but are no longer identifiable to the cue imag s on which they were conditioned ( Figure 4 ) . Our careful training suggests that this is not an optimisation d fficulty bu is core to the objective , as dis ussed in Chen et al . ( 2016 ) . By contrast , a VHE s ab e to gai a la ge benefit from the h erarchical PixelCNN architecture , with a 3-fold - duction in classifica error ( 5-sho accuracy 98.8 % ) and conditional s mples which are imultaneously sharp and identifiable ( F gure 4 ) . This improve ent is in part achi ved by increased utilisat o of th latent spac , due to rescaling of th KL divergence term in the obj ctive . However , our results show that this common technique is insuffici nt wh n used alo e , l ading to overfitting to cue images with an equ lly sev re impairment of classification performan e ( accuracy 62.8 % ) . Rather , we find that KL-rescaling nd data resampli g ust be used together in order for t benefit of the pow rful PixelCNN architectur to be ealised . Tabl 2 li ts the cl ssification ac uracy chieved by VHEs with both |D| = 1 and |D| = 5 , as compared to existi g dee learn ng approaches . We find that both netw rks are not only state-of-the-art amo gst de p generative models , but also competitive gain t the best discriminative o els trained directly for few-shot classification . Unlike these discrimina ive odels , a VHE is also abl to generat new images of a character in one shot , producing samples which are both realistic nd faithful to the class of the cue im ge ( Figure 5 ) . As ur goa is to odel sh red structure across images , w valuate generative performance using joint log like- Figure 5 : One-shot same-class samples generated by our model . Cue images were sampled fro previously un- seen lasses . lihood of the entire Omniglot tes set ( rather han separa ly across i ages ) . From this per pective , a single element VAE will perform poorly as it treats all dat points as independent , optimising a sum over log likelihoods for each eleme t. By sharing latents across el m t of the same class , a VHE can improve upon this considerably . F r likelih od evaluation , our most appropriate c mpariso is with Generative Matching Netw rks ( Bartunov & Vetrov , 2016 ) as th y also model dependencies within a class . Thus , we traine odels under the same train/test spl s them , with no data augment tion . W evaluate the joint log like ihood of ful character classe from the test s t , nor ali ed by h number of eleme ts , using imporance weighting with k=500 samples fro q ( c ; X ) . As can be seen in Tables 3 and 4 , our h rarchical PixelCNN archit cture is able to a hiev state-of-the-art log likelihood results only when t ained using the VHE objective . ( b ) VHE Figure A13 : New exemplars produced by the Sequential Gen rative ( SG ) model [ 43 ] and the Vari tional Homoencoder ( VHE ) [ 21 ] . ( a ) The SG model shows far too much variability , drawing what is clearly the wrong character in many cases ( e.g . right-most column ) . ( b ) The VHE character samples are often incomplete , missing important strok s of the target class . 19 Published as a conference paper at ICLR 2021 | In this paper, the authors seek to combine the advantages of symbolic, compositional models and neural approaches, in particular by using "probabilistic programs with neural network subroutines" which should reflect a causal generative process. This is certainly an interesting area to explore. But I'm not convinced that the approach they propose (GNS) lives up to their stated goals. | SP:c9481aa3660d329ae9727810687f68930d1f2d5e |
Learning Task-General Representations with Generative Neuro-Symbolic Modeling | People can learn rich , general-purpose conceptual representations from only raw perceptual inputs . Current machine learning approaches fall well short of these human standards , although different modeling traditions often have complementary strengths . Symbolic models can capture the compositional and causal knowledge that enables flexible generalization , but they struggle to learn from raw inputs , relying on strong abstractions and simplifying assumptions . Neural network models can learn directly from raw data , but they struggle to capture compositional and causal structure and typically must retrain to tackle new tasks . We bring together these two traditions to learn generative models of concepts that capture rich compositional and causal structure , while learning from raw data . We develop a generative neuro-symbolic ( GNS ) model of handwritten character concepts that uses the control flow of a probabilistic program , coupled with symbolic stroke primitives and a symbolic image renderer , to represent the causal and compositional processes by which characters are formed . The distributions of parts ( strokes ) , and correlations between parts , are modeled with neural network subroutines , allowing the model to learn directly from raw data and express nonparametric statistical relationships . We apply our model to the Omniglot challenge of human-level concept learning , using a background set of alphabets to learn an expressive prior distribution over character drawings . In a subsequent evaluation , our GNS model uses probabilistic inference to learn rich conceptual representations from a single training image that generalize to 4 unique tasks , succeeding where previous work has fallen short . 1 INTRODUCTION Human conceptual knowledge supports many capabilities spanning perception , production and reasoning [ 37 ] . A signature of this knowledge is its productivity and generality : the internal models and representations that people develop can be applied flexibly to new tasks with little or no training experience [ 30 ] . Another distinctive characteristic of human conceptual knowledge is the way that it interacts with raw signals : people learn new concepts directly from raw , high-dimensional sensory data , and they identify instances of known concepts embedded in similarly complex stimuli . A central challenge is developing machines with these human-like conceptual capabilities . Engineering efforts have embraced two distinct paradigms : symbolic models for capturing structured knowledge , and neural network models for capturing nonparametric statistical relationships . Symbolic models are well-suited for representing the causal and compositional processes behind perceptual observations , providing explanations akin to people ’ s intuitive theories [ 38 ] . Quintessential examples include accounts of concept learning as program induction [ 13 , 46 , 29 , 15 , 4 , 28 ] . Symbolic programs provide a language for expressing causal and compositional structure , while probabilistic modeling offers a means of learning programs and expressing additional conceptual knowledge through priors . The Bayesian Program Learning ( BPL ) framework [ 29 ] , for example , provides a dictionary of simple sub-part primitives for generating handwritten character concepts , and symbolic relations that specify how to combine sub-parts into parts ( strokes ) and parts into whole character concepts . These abstractions support inductive reasoning and flexible generalization to a range of different tasks , utilizing a single conceptual representation [ 29 ] . Published as a conference paper at ICLR 2021 HumansBPL model ( centered ) GNS model Symbolic models offer many useful features , but they come with important limitations . Foremost , symbolic probabilistic models make simplifying and rigid parametric assumptions , and when the assumptions are wrong—as is common in complex , high-dimensional data—they create bias [ 11 ] . The BPL character model , for example , assumes that parts are largely independent a priori , an assumption that is not reflective of real human-drawn characters . As a consequence , characters generated from the raw BPL prior lack the complexity of real characters ( Fig 1 , left ) , even though the posterior samples can appear much more structured . Another limitation of symbolic probabilistic models is that the construction of structured hypothesis spaces requires significant domain knowledge [ 2 ] . Humans , meanwhile , build rich internal models directly from raw data , forming hypotheses about the conceptual features and the generative syntax of a domain . As one potential resolution , previous work has demonstrated that the selection of structured hypotheses can itself be attributed to learning in a Bayesian framework [ 47 , 13 , 14 , 41 , 24 , 40 ] . Although more flexible than a priori structural decisions , models of this kind still make many assumptions , and they have not yet tackled the types of raw , high-dimensional stimuli that are distinctive of the neural network approach . The second paradigm , neural network modeling , prioritizes powerful nonparametric statistical learning over structured representations . This modeling tradition emphasizes emergence , the idea that conceptual knowledge arises from interactions of distributed sub-symbolic processes [ 36 , 32 ] . Neural networks are adept at learning from raw data and capturing complex patterns . However , they can struggle to learn the compositional and causal structure in how concepts are formed [ 30 ] ; even when this structure is salient in the data , they may have no obvious means of incorporating it . These limitations have been linked to shortcomings in systematic generalization [ 35 , 27 ] and creative abilities [ 31 ] . An illustrative example is the Omniglot challenge : in 4 years of active research , neural network models do not yet explain how people quickly grasp new concepts and use them in a variety of ways , even with relatively simple handwritten characters [ 31 ] . Surveying over 10 neural models applied to Omniglot , Lake et al . [ 31 ] found that only two attempted both classification and generation tasks , and they were each outperformed by the fully-symbolic , probabilistic BPL . Moreover , neural generative models tended to produce characters with anomalous characteristics , highlighting their shortcomings in modeling causal and compositional structure ( see Fig . A13 and [ 31 , Fig . 2a ] ) . In this paper , we introduce a new approach that leverages the strengths of both the symbolic and neural network paradigms by representing concepts as probabilistic programs with neural network subroutines . We describe an instance of this approach developed for the Omniglot challenge [ 29 ] of task-general representation learning and discuss how we see our Omniglot model fitting into a broader class of Generative Neuro-Symbolic ( GNS ) models that seek to capture the data-generation process . As with traditional probabilistic programs , the control flow of a GNS program is an explicit representation of the causal generative process that produces new concepts and new exemplars . Moreover , explicit re-use of parts through repeated calls to procedures such as GeneratePart ( Fig . 2 ) ensures a representation that is compositional , providing an appropriate inductive bias for compositional generalization . Unlike fully-symbolic probabilistic programs , however , the distribution of parts and correlations between parts in GNS are modeled with neural networks . This architectural choice allows the model to learn directly from raw data , capturing nonparametric statistics while requiring only minimal prior knowledge . Published as a conference paper at ICLR 2021 We develop a GNS model for the Omniglot challenge of learning flexible , task-general representations of handwritten characters . We report results on 4 Omniglot challenge tasks with a single model : 1 ) one-shot classification , 2 ) parsing/segmentation , 3 ) generating new exemplars , and 4 ) generating new concepts ( without constraints ) ; the 5th and final task of generating new concepts ( from type ) is left for future work . We also provide log-likelihood evaluations of the generative model . Notably , our goal is not to chase state-of-the-art performance on one task across many datasets ( e.g. , classification ) . Instead we build a model that learns deep , task-general knowledge within a single domain and evaluate it on a range of different tasks . This “ deep expertise ” is arguably just as important as “ broad expertise ” in characterizing human-level concept learning [ 37 , 31 ] ; machines that seek human-like abilities will need both . Our work here is one proposal for how neurally-grounded approaches can move beyond pattern recognition toward the more flexible model-building abilities needed for deep expertise [ 30 ] . In Appendix E , we discuss how to extend GNS to another conceptual domain , providing a proposal for a GNS model of 3D object concepts . 2 RELATED WORK The Omniglot dataset and challenge has been widely adopted in machine learning , with models such as Matching Nets [ 49 ] , MAML [ 7 ] , and ARC [ 44 ] applied to just one-shot classification , and others such as DRAW [ 19 ] , SPIRAL [ 8 ] , and VHE [ 21 ] applied to one or more generative tasks . In their “ 3-year progress report , ” Lake et al . [ 31 ] reviewed the current progress on Omniglot , finding that although there was considerable progress in one-shot classification , there had been little emphasis placed on developing task-general models to match the flexibility of human learners ( Table 1 ) . Moreover , neurally-grounded models that attempt more creative generation tasks were shown to produce characters that either closely mimicked the training examples or that exhibited anomalous variations , making for easy identification from humans ( see Fig . A13 and [ 31 , Fig . 2a ] ) . Our goal is distinct in that we aim to learn a single neuro-symbolic generative model that can perform a variety of unique tasks , and that generates novel yet structured new characters . Neuro-symbolic modeling has become an active area of research , with applications to learning input-output programs [ 42 , 17 , 3 , 39 , 48 ] , question answering [ 50 , 34 ] and image description [ 26 , 4 ] . GNS modeling distinguishes itself from prior work through its focus on hybrid generative modeling , combining both structured program execution and neural networks directly in the probabilistic generative process . Neuro-symbolic VQA models [ 50 , 34 ] are neither generative nor task-general ; they are trained discriminatively to answer questions . Other neuro-symbolic systems use neural networks to help perform inference in a fully-symbolic generative model [ 26 , 4 ] , or to parameterize a prior over fully-symbolic hypotheses [ 22 ] . In order to capture the dual structural and statistical characteristics of human conceptual representations , we find it important to include neural nets directly in the forward generative model . As applied to Omniglot , our model bears some resemblance to SPIRAL [ 8 ] ; however , SPIRAL does not provide a density function , and it has no hierarchical structure , limiting its applications to image reconstruction and unconditional generation . Another class of models on the neuro-symbolic spectrum aims to learn “ object representations ” with neural networks [ 5 , 18 , 25 ] , which add minimal object-like symbols to support systematic reasoning and generalization . Although these models have demonstrated promising results in applications such as scene segmentation and unconditional generation , they have not yet demonstrated the type of rich inductive capabilities that we are after : namely , the ability to learn “ deep ” conceptual representations from just one or a few examples that support a variety of discriminative and generative tasks . Other works ( e.g . [ 16 , 20 ] ) have used autoregressive models like ours with similar stroke primitives to model the causal generative processes of handwriting . We develop a novel architecture for generating Published as a conference paper at ICLR 2021 type level token level procedure GENERATETYPE C 0 . Initialize blank image canvas while true do [ yi , xi ] GENERATEPART ( C ) . Sample part location & parameters C frender ( yi , xi , C ) . Render part to image canvas vi ⇠ p ( v | C ) . Sample termination indicator if vi then break . Terminate sample { , y1 : , x1 : } return . Return concept type 1 C Canvas yi , xi Part Image I procedure GENERATETYPE C 0 . Initialize blank image canvas while true do [ yi , xi ] GENERATEPART ( C ) . Sample part location & parameters C frender ( yi , xi , C ) . Render part to image canvas vi ⇠ p ( v | C ) . Sample termination indicator if vi then break . Terminate sample { , y1 : , x1 : } return . Return concept type 1 pr oc ed ur e G EN ER AT ET YP E C 0 . In itia liz e bla nk im ag e ca nv as wh ile tr ue do [ y i , x i ] G EN ER AT EP AR T ( C ) . Sa m ple pa rt loc at ion & pa ra m et er s C f re nd er ( y i , x i , C ) . Re nd er pa rt to im ag e ca nv as v i ⇠ p ( v | C ) . Sa m ple te rm ina tio n ind ica to r if v i th en br ea k . Te rm ina te sa m ple { , y 1 : , x 1 : } re tu rn . Re tu rn co nc ep t t yp e 1 procedure GENERATETYPE C 0 . Initialize blank image canvas while true do [ yi , xi ] GENERATEPART ( C ) . Sample part location & parameters C frender ( yi , xi , C ) . Render part to image canvas vi ⇠ p ( v | C ) . Sample termination indicator if vi then break . Terminate sample { , y1 : , x1 : } return . Return concept type 1 location model p ( y ∣ C ) CNN MLP stroke model p ( x ∣ y , C ) CNN LSTM y C attention p ( y ) p ( Δ1 ) p ( Δ2 ∣ Δ1 ) p ( ΔT ∣ Δ1 : T−1 ) …C Figure 2 : A generative neuro-symbolic ( GNS ) model of character concepts . The type model GenerateType ( P ( ψ ) ) produces character types one stroke at a time , using an image canvas C as memory . At each step , the current canvas C is fed to procedure GeneratePart and a stroke sample is produced . The canvas is first processed by the location model , a CNN-MLP architecture that samples starting location y , and next by the stroke model , a CNN-LSTM architecture that samples trajectory x while attending to the encoded canvas . Finally , a symbolic renderer updates the canvas according to x and y , and a termination model decides whether to terminate the type sample . Unique exemplars are produced from a character type by sampling from the token model conditioned on ψ , adding motor noise to the drawing parameters and performing a random affine transformation . handwriting , which represents explicit compositional structure by modeling parts and relations with separate modules and applying intermediate symbolic rendering . Most importantly , these prior models have not made a connection to the image ; therefore while they can generate handwriting as symbolic coordinates , they can not explain how people use their causal knowledge to learn new characters from visual presentations , how they infer the strokes of a character seen on paper , or how they generate a new example of an observed character . By combining a powerful autoregressive model of handwriting with a symbolic image renderer and algorithms for probabilistic inference , we seek to replicate a spectrum of unique human concept learning abilities . 3 GENERATIVE MODEL Our GNS model leverages the type-token hierarchy of BPL [ 29 ] , which offers a useful scaffolding for conceptual models ( Fig . 2 , left ) .1 The type-level model P ( ψ ) defines a prior distribution over character concepts , capturing overarching principles and regularities that tie together characters from different alphabets and providing a procedure to generate new character concepts unconditionally in latent stroke format ( Fig . 2 , right ) . A token-level model p ( θ|ψ ) captures the within-class variability that arises from motor noise and drawing styles , and an image distribution P ( I|θ ) provides an explicit model of how causal stroke actions translate to image pixels . All parameters of our model are learned from the Omniglot background set of drawings ( Appendix A ) . The full joint distribution over type ψ , token θ ( m ) and image I ( m ) factors as P ( ψ , θ ( m ) , I ( m ) ) = P ( ψ ) P ( θ ( m ) |ψ ) P ( I ( m ) |θ ( m ) ) . ( 1 ) Although sharing a common hierarchy , the implementation details of each level in our GNS model differ from BPL in critical ways . The GNS type prior P ( ψ ) is a highly expressive generative model that uses an external image canvas , coupled with a symbolic rendering engine and an attentive 1Aspects of our model were recently published in a non-archival conference proceedings [ 6 ] . The previous manuscript presents only a prior distribution that alone performs just one task ( generating new concepts ) ; our new developments include a full hierarchical model , a differentiable image renderer / likelihood , and a procedure for approximate probabilistic inference from image data . These ingredients together enable GNS to perform 4 unique conceptual tasks . Published as a conference paper at ICLR 2021 recurrent neural network , to condition future parts on the previous parts and model sophisticated causal and correlational structure . This structure is essential to generating new character concepts in realistic , human-like ways ( Sec . 5 ) . Moreover , whereas the BPL model is provided symbolic relations for strokes such as “ attach start ” and “ attach along , ” GNS learns implicit relational structure from the data , identifying salient patterns in the co-occurrences of parts and locations . Importantly , the GNS generative model is designed to be differentiable at all levels , yielding log-likelihood gradients that enable powerful new inference algorithms ( Sec . 4 ) and estimates of marginal image likelihood ( Sec . 5 ) . Type prior . The type prior P ( ψ ) is captured by a neuro-symbolic generative model of character drawings . The model represents a character as a sequence of strokes ( parts ) , with each stroke i decomposed into a starting location yi ∈ R2 and a variable-length trajectory xi ∈ Rdi×2 . Rather than use raw pen trajectories as our stroke format , we use a minimal spline representation of strokes , obtained from raw trajectories by fitting cubic b-splines with a residual threshold . The starting location yi therefore conveys the first spline control point , and trajectory xi = { ∆i1 , ... , ∆idi } conveys the offsets between subsequent points of a ( di+1 ) -length spline . These offsets are transformed into a sequence of relative points xi = { xi1 , ... , xidi+1 } , with xi1 = 0 , specifying locations relative to yi . The model samples a type one stroke at a time , using an image canvas C as memory to convey the sample state . At each step , a starting location for the next stroke is first sampled from the location model , followed by a trajectory from the stroke model . The stroke is then rendered to the canvas C , and a termination model decides whether to terminate or continue the sample . Each of the three model components is expressed by a neural network , using a LSTM as the stroke model to generate trajectories as in [ 16 ] . The details of these neural modules are provided in Appendix A . The type model P ( ψ ) specifies an auto-regressive density function that can evaluate exact likelihoods of character drawings , and its hyperparameters ( the three neural networks ) are learned from the Omniglot background set of 30 alphabets using a maximum likelihood objective . A full character type ψ includes the random variables ψ = { κ , y1 : κ , x1 : κ } , where κ ∈ Z+ is the number of strokes . The density function P ( ψ ) is also fully differentiable w.r.t . the continuous random variables in ψ . Token model . A character token θ ( m ) = { y ( m ) 1 : κ , x ( m ) 1 : κ , A ( m ) } represents a unique instance of a character concept , where y ( m ) 1 : κ are the token-level locations , x ( m ) 1 : κ the token-level parts , and A ( m ) ∈ R4 the parameters of an affine warp transformation . The token distribution factorizes as P ( θ ( m ) |ψ ) = P ( A ( m ) ) κ∏ i=1 P ( y ( m ) i | yi ) P ( x ( m ) i | xi ) . ( 2 ) Here , P ( y ( m ) i | yi ) represents a simple noise distribution for the location of each stroke , and P ( x ( m ) i | xi ) for the stroke trajectory . The first two dimensions of affine warp A ( m ) control a global re-scaling of the token drawing , and the second two a global translation of its center of mass . The distributions and pseudocode of our token model are given in Appendix A . Image model . The image model P ( I ( m ) | θ ( m ) ) is based on [ 29 ] and is composed of two pieces . First , a differentiable symbolic engine f receives the token θ ( m ) and produces an image pixel probability map pimg = f ( θ ( m ) , σ , ) by evaluating each spline and rendering the stroke trajectories . Here , σ ∈ R+ is a parameter controlling the rendering blur around stroke coordinates , and ∈ ( 0 , 1 ) controlling pixel noise , each sampled uniformly at random . The result then parameterizes an image distribution P ( I ( m ) | θ ( m ) ) = Bernoulli ( pimg ) , which is differentiable w.r.t . θ ( m ) , σ , and . 4 PROBABILISTIC INFERENCE Given an image I of a novel concept , our GNS model aims to infer the latent causal , compositional process for generating new exemplars . We follow the high-level strategy of BPL for constructing a discrete approximation Q ( ψ , θ | I ) to the desired posterior distribution [ 29 ] , P ( ψ , θ | I ) ≈ Q ( ψ , θ | I ) = K∑ k=1 πkδ ( θ − θk ) δ ( ψ − ψk ) . ( 3 ) A heuristic search algorithm is used to find K good parses , { ψ , θ } 1 : K , that explain the underlying image with high probability . These parses are weighted by their relative posterior probability , Published as a conference paper at ICLR 2021 log P ( I ( T ) ∣ I ( c ) ) = − 401.3 Correct match train test log P ( I ( T ) ∣ I ( c ) ) = − 664.8 Incorrect match train test ( a ) Classification fits the pen ( Fig . 3A , ii ) . To construct a new character type , first themodel samples the number of parts k and the number of subparts ni , for each part i = 1 , ... , k , from their empirical distributions as measured from the background set . Second , a template for a part Si is constructed by sampling subparts from a set of discrete primitive actions learned from the background set ( Fig . 3A , i ) , such that the probability of the next action depends on the previous . Third , parts are then grounded as parameterized curves ( splines ) by sampling the control points and scale parameters 1334 11 DECEMBER 2015 • VOL 350 ISSUE 6266 sciencemag.org SCIENCE Fig . 3 . A generative model of handwritten characters . ( A ) New types are generated by choosing primitive actions ( color coded ) from a library ( i ) , combining these subparts ( ii ) to make parts ( iii ) , and combining parts with relations to define simple programs ( iv ) . New tokens are generated by running these programs ( v ) , which are then rendered as raw data ( vi ) . ( B ) Pseudocode for generating new types y and new token images I ( m ) for m = 1 , ... , M. The function f ( · , · ) transforms a subpart sequence and start location into a trajectory . Human parses Machine parsesHuman drawings -505 -593 -655 -695 -723 -1794-646 -1276 Training item with model ’ s five best parses Test items 1 2 3 4 5stroke order : Fig . 4 . Inferringmotor programs from images . Parts are distinguished by color , with a colored dot indicating the beginning of a stroke and an arrowhead indicating the end . ( A ) The top row shows the five best programs discovered for an image along with their log-probability scores ( Eq . 1 ) . Subpart breaks are shown as black dots . For classification , each program was refit to three new test images ( left in image triplets ) , and the best-fitting parse ( top right ) is shown with its image reconstruction ( bottom right ) and classification score ( log posterior predictive probability ) . The correctly matching test item receives a much higher classification score and is also more cleanly reconstructed by the best programs induced from the training item . ( B ) Nine human drawings of three characters ( left ) are shown with their ground truth parses ( middle ) and best model parses ( right ) . RESEARCH | RESEARCH ARTICLES on June 1 , 2020 http : //science.sciencem ag.org/ D ow nloaded from the pen ( Fig . 3A , ii ) . To construct a new character type , first themodel samples the number of parts k and the number of subparts ni , for each part i = 1 , ... , k , from their empirical distributions as measured from the background set . Second , a template for a part Si is constructed by sampling subparts from a set of discrete primitive actions learned from the background set ( Fig . 3A , i ) , such that the probability of the next action depends on the previous . Third , parts are then grounded as parameterized curves ( splines ) by sampling the control points and scale parameters 1334 11 DECEMBER 2015 • VOL 350 ISSUE 6266 sciencemag.org SCIENCE Fig . 3 . A generative model of handwritten characters . ( A ) New types are generated by choosing primitive actions ( color coded ) from a library ( i ) , combining these subparts ( ii ) to make parts ( iii ) , and combining parts with relations to define simple programs ( iv ) . New tokens are generated by running these programs ( v ) , which are then rendered as raw data ( vi ) . ( B ) Pseudocode for generating new types y and new token images I ( m ) for m = 1 , ... , M. The function f ( · , · ) transforms a subpart sequence and start location into a trajectory . Human parses Machine parsesHuman drawings -505 -593 -655 -695 -723 -1794-646 -1276 Training item with model ’ s five best parses Test items 1 2 3 4 5stroke order : Fig . 4 . Inferringmotor programs from images . Parts are distinguished by color , with a colored dot indicating the beginning of a stroke and an arrowhead indicating the end . ( A ) The top row shows the five best programs discovered for an image along with their log-probability scores ( Eq . 1 ) . Subpart breaks are shown as black dots . For classification , each program was refit to three new test images ( left in image triplets ) , and the best-fitting parse ( top right ) is shown with its image reconstruction ( bottom right ) and classification score ( log posterior predictive probability ) . The correctly matching test item receives a much higher classification score and is also more cleanly reconstructed by the best programs induced from the training item . ( B ) Nine human drawings of three characters ( left ) are shown with their ground truth parses ( middle ) and best model parses ( right ) . RESEARCH | RESEARCH ARTICLES on June 1 , 2020 http : //science.sciencem ag.org/ D ow nloaded from the pen ( Fig . 3A , ii ) . To construct a new character type , first themodel samples the number of parts k and the nu ber of subparts ni , for each part i = 1 , ... , k , fro their empirical distributions as measured from the background set . Second , a template for a part Si is constructed by sampling subparts from a set of discrete primitive actions learned from the background set ( Fig . 3A , i ) , such that the probability of the next action depends on the previous . Third , parts are then grounded as parameterized curves ( splines ) by sampling the control points and scale parameters 1334 11 DECEMBER 2015 • VOL 350 ISSUE 6266 sciencemag.org SCIENCE Fig . 3 . A generative model of handwritten characters . ( A ) New types are generated by choosing primitive actions ( color coded ) from a library ( i ) , combining these subparts ( ii ) to make parts ( iii ) , and combining parts with relations to define simple programs ( iv ) . New tokens are generated by running these programs ( v ) , which are then rendered as raw data ( vi ) . ( B ) Pseudocode for generating new types y and new token images I ( m ) for m = 1 , ... , M. The function f ( · , · ) transforms a subpart sequence and start location into a trajectory . Human parses Machine parsesHuman drawings -505 -593 -655 -695 -723 -1794-646 -1276 Training item with model ’ s five best parses Test items 1 2 3 4 5stroke order : Fig . 4 . Inferringmotor programs from images . Parts are distinguished by color , with a colored dot indicating the beginning of a stroke and an arrowhead indicating the end . ( A ) The top row shows the five best programs discovered for an image along with their l g-probability cores ( Eq . 1 ) . Subpart breaks are shown as black dots . For classification , each program was refit to three new test images ( left in image triplets ) , and the best-fitting parse ( top right ) is shown with its image reconstruction ( bottom right ) and classification score ( l g posterior predictiv probability ) . The correctly matching tes item ceives a much higher classification score and is also more cleanly reconstructed by the best program induced from the training item . ( B ) Nine human rawings of three characters ( left ) are shown with their grou d tr th parses ( middle ) and best model parses ( right ) . RESEARCH | RESEARCH ARTICLES on June 1 , 2020 http : //science.sciencem ag.org/ D ow nloaded from Human drawings Human parse GNS rses BPL parse the pen ( Fig . 3A , ii ) . To construct a new character type , first themodel samples the number of parts k and the number of subparts ni , for each part i = 1 , ... , k , from their empirical distributions as measured from the background set . Second , a template for a part Si is constructed by sampling subparts from a set of discrete primitive actions learned from the background set ( Fig . 3A , i ) , such that the probability of the next action depends on the previous . Third , parts are then grounded as parameterized curves ( splines ) by sampling the control points and scale parameters 1334 11 DECEMBER 2015 • VOL 350 ISSUE 6266 sciencemag.org SCIENCE Fig . 3 . A generative model of handwritten characters . ( A ) New types re generated by choosing primitive actions ( color coded ) from a library ( i ) , combining these subparts ( ii ) to make parts ( iii ) , an combining parts with relations t de ine simple programs ( iv ) . New tokens are generated by running these programs ( v ) , which are then rendered as raw dat ( vi ) . ( B ) Pseudocode for genera ing new types y and new token images I ( m ) for m = 1 , ... , M. The function f ( · , · ) transforms a subpart sequence and start location into a trajectory . Human parses Machine parsesHuman drawings -505 -593 -655 -695 -723 -1794-646 -1276 Training item with model ’ s five best parses Test items 1 2 3 4 5stroke order : Fig . 4 . Inferringmotor programs from images . Parts are distinguished by color , with a colored dot indicating the beginning of a stroke and an arrowhead indicating the end . ( A ) The top row shows the five best programs discovered for an im ge along with their log-probability scores ( Eq . 1 ) . Subpart breaks are hown as black dots . For classification , each program was refit to three new test images ( left in image triplets ) , and the best-fitting parse ( top right ) is shown with its image reconstruction ( bottom right ) and classification score ( log posterior predictive probability ) . The correctly matchi g test item receives a much higher classification score and is also more cleanly reconstructed by th best programs indu ed from the raining item . ( B ) Nine human drawings of three cha acters ( left ) are shown with their ground tr th parses ( middle ) an b st model parses ( right ) . RESEARCH | RESEARCH ARTICLES on June 1 , 2020 http : //science.sciencem ag.org/ D ow nloaded from ( b ) Parsing Figure 3 : Classification fits and parsing . ( a ) Posterior parses from two training images were refit to the same test image . The first row of each grid shows the training image and its top-3 predicted parses ( best emboldened ) . The second row shows the test image and its re-fitted training parses . Reconstructed test images are shown in the final row . The correct training image reports a high forward score , indicating that I ( T ) is well-explained by the motor programs for this I ( c ) . ( b ) 27 character images from 3 classes are shown alongside their ground truth human parses , predicted parses from the GNS model , and predicted parses from the BPL model . πk ∝ π̃k = P ( ψk , θk , I ) such that ∑ k πk = 1 . To find the K good parses , search uses fast bottomup methods to propose many variants of the discrete variables , filtering the most promising options , before optimizing the continuous variables with gradient descent ( we use K = 5 ) . See Appendix B for further details about inference , and Appendix C for generating new exemplars of a concept . Inference for one-shot classification . In one-shot classification , models are given a single training image I ( c ) from each of c = 1 , ... , C classes , and asked to classify test images according to their corresponding training classes . For each test image I ( T ) , we compute an approximation of the Bayesian score log P ( I ( T ) | I ( c ) ) for every example I ( c ) , using our posterior parses { ψ , θ ( c ) } 1 : K and corresponding weights π1 : K from I ( c ) ( Eq . 3 ) . The approximation is formulated as log P ( I ( T ) | I ( c ) ) ≈ log ∫ P ( I ( T ) |θ ( T ) ) P ( θ ( T ) | ψ ) Q ( ψ , θ ( c ) , | I ( c ) ) ∂ψ∂θ ( c ) ∂θ ( T ) ≈ log K∑ k=1 πk max θ ( T ) P ( I ( T ) | θ ( T ) ) P ( θ ( T ) | ψk ) , ( 4 ) where the maximum over θ ( T ) is determined by refitting token-level parameters θ ( c ) to image I ( T ) with gradient descent . Following Lake et al . [ 29 ] , we use a two-way version of the Bayesian score that also considers parses of I ( T ) refit to I ( c ) . The classification rule is therefore c∗ = arg max c log P ( I ( T ) | I ( c ) ) 2 = arg max c log [ P ( I ( c ) | I ( T ) ) P ( I ( c ) ) P ( I ( T ) | I ( c ) ) ] , ( 5 ) where P ( I ( c ) ) ≈∑k π̃k is approximated from the unnormalized weights of I ( c ) parses . 5 EXPERIMENTS GNS was evaluated on four concept learning tasks from the Omniglot challenge [ 31 ] : one-shot classification , parsing , generating new exemplars , and generating new concepts . All evaluations use novel characters from completely held-out alphabets in the Omniglot evaluation set . As mentioned Published as a conference paper at ICLR 2021 earlier , our goal is to provide a single model that captures deep knowledge of a domain and performs strongly in a wide range of tasks , rather than besting all models on every task . Our experiments include a mixture of quantitative and qualitative evaluations , depending on the nature of the task . One-shot classification . GNS was compared with alternative models on the one-shot classification task from Lake et al . [ 29 ] . The task involves a series of 20-way within-alphabet classification episodes , with each episode proceeding as follows . First , the machine is given one training example from each of 20 novel characters . Next , the machine must classify 20 novel test images , each corresponding to one of the training classes . With 20 episodes total , the task yields 400 trials . Importantly , all character classes in an episode come from the same alphabet as originally proposed [ 29 ] , requiring finer discriminations than commonly used between-alphabet tests [ 31 ] . Table 2 : Test error on withinalphabet one-shot classification . Model Error GNS 5.7 % BPL [ 29 ] 3.3 % RCN [ 12 ] 7.3 % VHE [ 21 ] 18.7 % Proto . Net [ 45 ] 13.7 % ARC [ 44 ] 1.5 % ∗ * used 4x training classes As illustrated in Fig . 3a , GNS classifies a test image by choosing the training class with the highest Bayesian score ( Eq . 5 ) . A summary of the results is shown in Table 2 . GNS was compared with other machine learning models that have been evaluated on the withinalphabets classification task [ 31 ] . GNS achieved an overall test error rate of 5.7 % across all 20 episodes ( N=400 ) . This result is very close to the original BPL model , which achieved 3.3 % error with significantly more hand-design . The symbolic relations in BPL ’ s token model provide rigid constraints that are key to its strong classification performance [ 29 ] . GNS achieves strong classification performance while emphasizing the nonparametric statistical knowledge needed for creative generation in subsequent tasks . Beyond BPL , our GNS model outperformed all other models that received the same background training . The ARC model [ 44 ] achieved an impressive 1.5 % error , although it was trained with four-fold class augmentation and many other augmentations , and it can only perform this one task . In Appendix Fig . A10 , we show a larger set of classification fits from GNS , including examples of misclassified trials . Parsing . In the Omniglot parsing task , machines must segment a novel character into an ordered set of strokes . These predicted parses can be compared with human ground-truth parses for the same images . The approximate posterior of GNS yields a series of promising parses for a new character image , and to complete the parsing task , we identify the maximum a posteriori parse k∗ = maxk πk , reporting the corresponding stroke configuration . Fig . 3b shows a visualization of the GNS predicted parses for 27 different raw images drawn from 3 unique character classes , plotted alongside groundtruth human parses ( how the images were actually drawn ) along with predicted parses from the BPL model . Compared to BPL , GNS parses possess a few unique desirable qualities . The first character class has an obvious segmentation to the human eye—evidenced by the consistency of human parses in all examples—and the GNS model replicates this consistency across all 9 predicted parses . In contrast , BPL predicts seemingly-unlikely parses for 2 of the examples shown . The second character is more complex , and it was drawn in different styles by different human subjects . The GNS model , which is trained on data from subjects with different styles , captures the uncertainty in this character by predicting a variety of unique parses . BPL , on the other hand , produces a single , ubiquitous segmentation across all 9 examples . In Appendix Fig . A11 , we provide a larger set of parses from the GNS model for a diverse range of Omniglot characters . Generating new exemplars . Given just one training image of a novel character concept , GNS produces new exemplars of the concept by sampling from the approximate conditional P ( I ( 2 ) , θ ( 2 ) | I ( 1 ) ) of Eq . 8 . In Fig . 4a we show new exemplars produced by GNS for a handful of target images , plotted next to human productions ( more examples in Appendix Fig . A12 ) . In the majority of cases , samples from the model demonstrate that it has successfully captured the causal structure and invariance of the target class . In contrast , deep generative models applied to the same task miss meaningful compositional and causal structure , producing new examples that are easily discriminated from human productions [ 43 , 21 ] ( see Appendix Fig . A13 ) . In some cases , such as the third column of Fig . 4a , samples from GNS exhibit sloppy stroke junctions and connections . Compared to BPL , which uses engineered symbolic relations to enforce rigid constraints at stroke junctions , GNS misses some of these structural elements . Nevertheless , new examples from GNS appear strong enough to pass for human in many cases , which we would like to test in future work with visual Turing tests . Concept learning experiments can be reproduced using our pre-trained generative model and source code : https : //github.com/rfeinman/GNS-Modeling . Published as a conference paper at ICLR 2021 Human GNS Target for each subpart . Last , parts are roughly positioned to begin either independently , at the beginning , at the end , or along previous parts , as defined by relation Ri ( Fig . 3A , iv ) . Character tokens q ( m ) are produced by executing the parts and the relations andmodeling how ink flows from the pen to the page . First , motor noise is added to the control points and the scale of the subparts to create token-level stroke trajectories S ( m ) . Second , the trajectory ’ s precise start location L ( m ) is sampled from the schematic provided by its relationRi to previous strokes . Third , global transformations are sampled , including an affine warp A ( m ) and adaptive noise parameters that ease probabilistic inference ( 30 ) . Last , a binary image I ( m ) is created by a stochastic rendering function , lining the stroke trajectories with grayscale ink and interpreting the pixel values as independent Bernoulli probabilities . Posterior inference requires searching the large combinatorial space of programs that could have generated a raw image I ( m ) . Our strategy uses fast bottom-up methods ( 31 ) to propose a range of candidate parses . The most promising candidates are refined by using continuous optimization and local search , forming a discrete approximation to the posterior distribution P ( y , q ( m ) |I ( m ) ) ( section S3 ) . Figure 4A shows the set of discovered programs for a training image I ( 1 ) and how they are refit to different test images I ( 2 ) to compute a classification score log P ( I ( 2 ) |I ( 1 ) ) ( the log posterior predictive probability ) , where higher scores indicate that they are more likely to belong to the same class . A high score is achieved when at least one set of parts and relations can successfully explain both the training and the test images , without violating the soft constraints of the learned within-class variability model . Figure 4B compares the model ’ s best-scoring parses with the ground-truth human parses for several characters . Results People , BPL , and alternative models were compared side by side on five concept learning tasks that examine different forms of generalization from just one or a few examples ( example task Fig . 5 ) . All behavioral experiments were run through Amazon ’ s Mechanical Turk , and the experimental procedures are detailed in section S5 . The main results are summarized by Fig . 6 , and additional lesion analyses and controls are reported in section S6 . One-shot classification was evaluated through a series of within-alphabet classification tasks for 10 different alphabets . As illustrated in Fig . 1B , i , a single image of a new character was presented , and participants selected another example of that same character from a set of 20 distinct characters produced by a typical drawer of that alphabet . Performance is shown in Fig . 6A , where chance is 95 % errors . As a baseline , themodifiedHausdorff distance ( 32 ) was computed between centered images , producing 38.8 % errors . People were skilled one-shot learners , achieving an average error rate of 4.5 % ( N = 40 ) . BPL showed a similar error rate of 3.3 % , achieving better performance than adeep convolutional network ( convnet ; 13.5 % errors ) and the HDmodel ( 34.8 % ) —each adapted from deep learning methods that have performed well on a range of computer vision tasks . A deep Siamese convolutional network optimized for this one-shot learning task achieved 8.0 % errors ( 33 ) , still about twice as high as humans or ourmodel . BPL ’ s advantage points to the benefits ofmodeling theunderlying causal process in learning concepts , a strategy different from the particular deep learning approaches examined here . BPL ’ s other key ingredients also make positive contributions , as shown by higher error rates for BPL lesions without learning to learn ( token-level only ) or compositionality ( 11.0 % errors and 14.0 % , respectively ) . Learning to learn was studied separately at the type and token level by disrupting the learned hyperparameters of the generativemodel . Compositionality was evaluated by comparing BPL to a matched model that allowed just one spline-based stroke , resembling earlier analysisby-synthesis models for handwritten characters that were similarly limited ( 34 , 35 ) . The human capacity for one-shot learning is more than just classification . It can include a suite of abilities , such as generating new examples of a concept . We compared the creative outputs produced by humans and machines through “ visual Turing tests , ” where naive human judges tried to identify the machine , given paired examples of human and machine behavior . In our most basic task , judges compared the drawings from nine humans asked to produce a new instance of a concept given one example with nine new examples drawn by BPL ( Fig . 5 ) . We evaluated each model based on the accuracy of the judges , which we call their identification ( ID ) level : Idealmodel performance is 50 % ID level , indicating that they can not distinguish the model ’ s behavior from humans ; worst-case performance is 100 % . Each judge ( N = 147 ) completed 49 trials with blocked feedback , and judges were analyzed individually and in aggregate . The results are shown in Fig . 6B ( new exemplars ) . Judges had only a 52 % ID level on average for discriminating human versus BPL behavior . As a group , this performance was barely better than chance [ t ( 47 ) = 2.03 , P = 0.048 ] , and only 3 of 48 judges had an ID level reliably above chance . Three lesioned models were evaluated by different groups of judges in separate SCIENCE sciencemag.org 11 DECEMBER 2015 • VOL 350 ISSUE 6266 1335 1 2 1 2 1 2 1 2 1 2 1 2 Human or Machine ? Fig . 5 . Generating new exemplars . Humans and machines were given an image of a novel character ( top ) and asked to produce new exemplars.The nine-character grids in each pair that were generated by a machine are ( by row ) 1 , 2 ; 2 , 1 ; 1 , 1 . RESEARCH | RESEARCH ARTICLES on N ovem ber 21 , 2020 http : //science.sciencem ag.org/ D ow nloaded from for each subpart . Last , parts are roughly positioned to begin either independently , at the beginning , at the end , or along previous parts , as defined by relation Ri ( Fig . 3A , iv ) . Character tokens q ( m ) are produced by execut- ing the parts and the relations andmodeling how ink flows from the pen to the page . First , motor noise is added to the control points and the scale of the subparts to create token-level stroke trajectories S ( m ) . Second , the trajectory ’ s precise start location L ( m ) is sampled from the schematic provided by its relationRi to previous strokes . Third , global transformations are sampled , including an affine warp A ( m ) and adaptive noise parameters that ease probabilistic inference ( 30 ) . Last , a binary image I ( m ) is created by a stochastic rendering function , lining the stroke trajectories with grayscale ink and interpreting the pixel values as independent Bernoulli probabilities . Posterior inference requires searching the large combinatorial space of programs that could have generated a raw image I ( m ) . Our strategy uses fast bottom-up methods ( 31 ) to propose a range of candidate parses . The most promising candidates are refined by using continuous optimization and local search , forming a discrete approximation to the posterior distribution P ( y , q ( m ) |I ( m ) ) ( section S3 ) . Figure 4A shows the set of discovered programs for a training image I ( 1 ) and how they are refit to different test images I ( 2 ) to compute a classification score log P ( I ( 2 ) |I ( 1 ) ) ( the log posterior predictive probability ) , where higher scores indicate that they are more likely to belong to the same class . A high score is achieved when at least one set of parts and relations can successfully explain both the training and the test images , without violating the soft constraints of the learned within-class variability model . Figure 4B compares the model ’ s best-scoring parses with the ground-truth human parses for several characters . Results People , BPL , and alternative models were compared side by side on five concept learning tasks that examine different forms of generalization from just one or a few examples ( example task Fig . 5 ) . All behavioral experiments were run through Amazon ’ s Mechanical Turk , and the experimental procedures are detailed in section S5 . The main results are summarized by Fig . 6 , and additional lesion analyses and controls are reported in section S6 . One-shot classification was evaluated through a series of within-alphabet classification tasks for 10 different alphabets . As illustrated in Fig . 1B , i , a single image of a new character was presented , and participants selected another example of that same character from a set of 20 distinct characters produced by a typical drawer of that alphabet . Performance is shown in Fig . 6A , where chance is 95 % errors . As a baseline , themodifiedHausdorff distance ( 32 ) was computed between centered images , producing 38.8 % errors . People were skilled one-shot learners , achieving an average error rate of 4.5 % ( N = 40 ) . BPL showed a similar error rate of 3.3 % , achieving better performance than adeep convolutional network ( convnet ; 13.5 % errors ) and the HDmodel ( 34.8 % ) —each adapted from deep learning methods that have performed well on a range of computer vision tasks . A deep Siamese convolutional network optimized for this one-shot learning task achieved 8.0 % errors ( 33 ) , still about twice as high as humans or ourmodel . BPL ’ s advantage points to the benefits ofmodeling theunderlying causal process in learning concepts , a strategy different from the particular deep learning approaches examined here . BPL ’ s other key ingredients also make positive contributions , as shown by higher error rates for BPL lesions without learning to learn ( token-level only ) or compositionality ( 11.0 % errors and 14.0 % , respectively ) . Learning to learn was studied separately at the type and token level by disrupting the learned hyperparameters of the generativemodel . Compositionality was evaluated by comparing BPL to a matched model that allowed just one spline-based stroke , resembling earlier analysisby-synthesis models for handwritten characters that were similarly limited ( 34 , 35 ) . The human capacity for one-shot learning is more than just classification . It can include a suite of abilities , such as generating new examples of a concept . We compared the creative outputs produced by humans and machines through “ visual Turing tests , ” where naive human judges tried to identify the machine , given paired examples of human and machine behavior . In our most basic task , judges compared the drawings from nine humans asked to produce a new instance of a concept given one example with nine new examples drawn by BPL ( Fig . 5 ) . We evaluated each model based on the accuracy of the judges , which we call their identification ( ID ) level : Idealmodel performance is 50 % ID level , indicating that they can not distinguish the model ’ s behavior from humans ; worst-case performance is 100 % . Each judge ( N = 147 ) completed 49 trials with blocked feedback , and judges were analyzed individually and in aggregate . The results are shown in Fig . 6B ( new exemplars ) . Judges had only a 52 % ID level on average for discriminating human versus BPL behavior . As a group , this performance was barely better than chance [ t ( 47 ) = 2.03 , P = 0.048 ] , and only 3 of 48 judges had an ID level reliably above chance . Three lesioned models were evaluated by different groups of judges in separate SCIENCE sciencemag.org 11 DECEMBER 2015 • VOL 350 ISSUE 6266 1335 1 2 1 2 1 2 1 2 1 2 1 2 Human or Machine ? Fig . 5 . Generating new exemplars . Humans and machines were given an image of a novel character ( top ) and asked to produce new exemplars.The nine-character grids in each pair that were generated by a machine are ( by row ) 1 , 2 ; 2 , 1 ; 1 , 1 . RESEARCH | RESEARCH ARTICLES on N ovem ber 21 , 2020 http : //science.sciencem ag.org/ D ow nloaded from for each subpart . Last , parts are roughly positioned to begin either independently , at the b ginni g , at the end , or along previous parts , as defined by relation Ri ( Fig . 3A , iv ) . Character tokens q ( m ) are produced by executing the parts and the relations andmodeling how ink flows from the p n to the page . First , motor noise is added to the control points and the scale of the subparts to creat oken-level stroke trajectories S ( m ) . Second , the trajectory ’ s precise star location L ( m ) is sampled from the schematic provided by its relationRi to previous strokes . Third , global transformations are sampled , including an ffine warp A ( m ) and a aptive noise parameters that eas probabilistic inference ( 30 ) . Last , a binary image I ( m ) is creat d by a stochastic rendering function , lining the stroke trajectories with grayscale ink and interpreting the pixel values a independent Bernoulli probabilit es . Posterio inference requires searching the large combinatorial space of programs that could have generated a r w image I ( m ) . Our st a egy uses fa t bott m-up methods ( 31 ) to prop se a r nge of candidate parses . The most promising candidates are refined by using conti uo s optimization and local search , forming a discrete approximation to he posterio distribution P ( y , q ( m ) |I ( m ) ) ( section S3 ) . Figure 4A shows the s t of discovered programs for a training image I ( 1 ) and how they are refit to different tes images I ( 2 ) to compute a classification score log P ( I ( 2 ) |I ( 1 ) ) ( the log posterio p edictive probability ) , where hig er scores indicate hat they are more likely to belong to he same class . A hig score is achieved when at least one s t of parts and relations can successfully explain both e training and the tes images , without violating the soft constraints of the l arned with n-class vari b lity model . Figure 4B compares the model ’ s best-scoring parses with e ground-tru h human parses for several characters . Results People , BPL , and alternative models were compared side by side on five concept learning tasks that examine different forms of generalization from just one or a few examples ( example task Fig . 5 ) . All behavioral experiments were un through Amazon ’ s Mechanical Turk , and the experimental procedures are d tailed in section S5 . The main results are summarized by Fig . 6 , and additional lesion a alyses and controls are - ported in section S6 . One-shot classification was evalu ted through a series of within-alphabet classification tasks for 10 different alphabets . As illustra ed in Fig . 1B , i , a single image of a new character was present d , and participants select d another example of tha same character from a set of 20 distinct characters produced by a typical drawer of tha alphabet . Performance is shown in Fig . 6A , where chance is 95 % erro s. A a b seline , themodifiedHausdorff distance ( 32 ) was computed between cent red images , producing 38.8 % erro s. People were skilled one-shot learners , achiev ng an verage erro rate of 4.5 % ( N = 40 ) . BPL showed a similar erro rate of 3.3 % , achiev ng better perfo mance than deep convolutional etwork ( convnet ; 13.5 % erro s ) and the HDmodel ( 34.8 % ) —each adapted from deep learning methods tha have p rformed well on a range of computer vision tasks . A deep Siamese convolutional network optimized for this one-shot learning task achieved 8.0 % erro s ( 33 ) , still about twice as hig as humans or ourmodel . BPL ’ s advant ge points to the b nefits ofmodeling theunderlying caus l process in learning concepts , a strategy different from the particular deep l arning approaches xamined here . BPL ’ s other key ingredi nts al o make positive contributions , a shown by hig er ro rates for BPL lesions without learning to learn ( token-level only ) or compositionality ( 11.0 % erro s and 14.0 % , resp ctively ) . Learning to learn was studie separately at the type and token level by disrupting the learned hyper a ameters of the generativemodel . Compositionality was evalu ted by comparing BPL to a matched model that allowed just one spline-based stroke , r sembling earlie analysisby-s nthesis models for handwritten characters tha were similarly limited ( 34 , 35 ) . The uman capacity for ne-shot learning is more than just classification . It can include a suite of abilities , such as generating ew xamples of a concept . We compared the creative outp ts produced by humans and machines through “ visual Turing tes s , ” where naive human judges tried to identify the machine , given paired xamples of human d machine b havior . In our most basic task , judges compared the drawings from nine humans a ked to produce a new instance of a concept given o e example with nine w examples drawn by BPL ( Fig . 5 ) We evalu ted ach model based on the accuracy of the judges , whic we call their identification ( ID ) level : Idealmodel perfo mance is 50 % ID level , indicating tha they can not distinguish t e model ’ s behavior from humans ; worst-case p rfo mance is 100 % . Each judge ( N = 147 ) completed 49 trials with blocked feedback , and judges were analyzed individually and in aggre ate . The results are shown i Fig . 6B ( new exemplars ) . Judges had only a 52 % ID level on average for discriminating human versus BPL behavior . As a group , this performance was barely better han chance [ t ( 47 ) = 2.03 , P = 0.048 ] , and only 3 of 48 judges had n ID level r liably above chance . Three lesioned models were evaluated by different groups of judges in separate SCIENCE sciencemag.org 11 DECEMBER 2015 • VOL 350 ISSUE 626 1335 1 2 1 2 1 2 1 2 1 2 1 2 Human or Machine ? Fig . 5 Gen rating ew exemplars . Humans and machines were given a image of a novel character ( top ) and asked to produce n w xemplars.The nine-character grids in each pair tha were g nerated by a machine are ( by row ) 1 , 2 ; , 1 ; 1 , 1 . RES ARCH | RES ARCH ARTICLES on N ovem ber 21 , 2020 http : //science.sciencem ag.org/ D ow nloaded from for each subpart . Last , parts are roughly positioned to begin either indep ndently , at the beginning , at the end , or along previous parts , as d fined by relation Ri ( Fig . 3A , iv ) . Character tokens q ( m ) are produce by executi g the parts and th relations andmodeling how nk flows from the pen to the page . First , motor noise i added to the control points a d the scale of the subparts to create token-lev l stroke trajectori s S ( m ) . Second , the trajectory ’ s precise start locat on L ( m ) is sampl d from the schematic provid by ts relationRi to previous strokes . Third , global transformations are sampled , including an affine warp A ( m ) and adaptive noise parameters that ease probabilistic inference ( 30 ) . Last , a binary image I ( m ) is created by a stochastic rendering function , lining the stroke trajectori s with grayscale ink and interpreting the p xel values as independent Bernoulli probabilities . Posterior inference requires searching the lar e combinatorial space of programs at could have generated a raw image I ( m ) . Our strategy uses fast bottom-up methods ( 31 ) to propose a ra ge of candidate parses . The most promising candidat s are refined by using continuous optimiza ion and local search , forming a discrete approximation to the posterior distribution P ( y , q ( m ) |I ( m ) ) ( section S3 ) . Figure 4A shows the set of discovered programs a training image I ( 1 ) and how they are refit to different test images I ( 2 ) to compute a classific tion score log P ( I ( 2 ) |I ( 1 ) ) ( the log posterior predictive probabil ty ) , where higher scor s indica e that th y are m re likely to belong to the sam class . A high score is achieved when at least one set of parts and relations can successfully explain both the training and the tes images , without violating the soft constraints of the learned within-class variability model . Figure 4B compares the model ’ s best-scoring parses with the ground-truth human parses for several characters . Results People , BPL , and alternative models were compared ide by sid on five concept learning tasks that xamine different forms of generalization f om just o or a few examples ( example task Fig . 5 ) . All behavioral experiments were run through Amazon ’ s Mechanical Turk , and the exp rime tal p ocedures are detailed in section S5 . The main results are summarized by Fig . 6 , and additional lesion analyses and controls are reported in section S6 . One-shot classification was evaluated through a series of within-alphabet classification tasks for 10 different alphabets . As illustrated in Fig . 1B , i , a single image of a new character was presented , and participants selected another example of that same character from a set of 20 distinct characters produced by a typical drawer of that alphabet . Performance is shown in Fig . 6A , where chance is 95 % errors . As a baseline , themodifiedHausdorff distance ( 32 ) was computed between centered images , producing 38.8 % errors . People were skilled one-shot learners , achieving an average error rate of 4.5 % ( N = 40 ) . BPL showed a similar error rate of 3.3 % , achieving better performance than adeep convolutional network ( convnet ; 13.5 % errors ) and the HDmodel ( 34.8 % ) —each adapted from deep learning methods that have performed well on a range of computer vision tasks . A deep Siamese convolutional network optimized for this one-shot learning task achieved 8.0 % errors ( 33 ) , still about twice as high as humans or ourmodel . BPL ’ s advantage points to the benefits ofmodeling theunderlying causal process in learning concepts , a strategy different from the particular deep learning approaches examined here . BPL ’ s other key ingredients also make positive contributions , as shown by higher error rates for BPL lesions without learning to learn ( token-level only ) or compositionality ( 11.0 % errors and 14.0 % , respectively ) . Learning to learn was studied separately at the type and token level by disrupting the learned hyperparameters of the generativemodel . Compositionality was evaluated by comparing BPL to a matched model that allowed just one spline-based stroke , resembling earlier analysisby-synthesis models for handwritten characters that were similarly limited ( 34 , 35 ) . The human capacity for one-shot learning is more than just classification . It can include a suite of abilities , such as generating new examples of a concept . We compared the creative outputs produced by humans and machines through “ visual Turing tests , ” where naive human judges tried to identify the machine , given paired examples of human and machine behavior . In our most basic task , judges compared the drawings from nine humans asked to produce a new instance of a concept given one example with nine new examples drawn by BPL ( Fig . 5 ) . We evaluated each model based on the accuracy of the judges , which we call their identification ( ID ) level : Idealmodel performance is 50 % ID level , indicating that they can not distinguish the model ’ s behavior from humans ; worst-case performance is 100 % . Each judge ( N = 147 ) completed 49 trials with blocked feedback , and judges were analyzed individually and in aggregate . The results are shown in Fig . 6B ( new exemplars ) . Judges had only a 52 % ID level on average for discriminating human versus BPL behavior . As a group , this performance was barely better than chance [ t ( 47 ) = 2.03 , P = 0.048 ] , and only 3 of 48 judges had an ID level reliably above chance . Three lesioned models were evaluated by different groups of judges in separate SCIENCE sciencemag.org 11 DECEMBER 2015 • VOL 350 ISSUE 6266 1335 1 2 1 2 1 2 1 2 1 2 1 2 Human or Machin ? Fig . 5 . Generating new exemplars . Humans and machines were given an image of a novel character ( top ) and asked to produce new exemplars.The nine-character grids in each pair that were generated by a machine are ( by row ) 1 , 2 ; 2 , 1 ; 1 , 1 . RESEARCH | RESEARCH ARTICLES on N ovem ber 21 , 2020 http : //science.sciencem ag.org/ D ow nloaded from BPL ( a ) Generating new exemplars GNS BPL ( b ) Generating new concepts Figure 4 : Generation tasks . ( a ) GNS produced 9 new exemplars for each of 5 target images , plotted here next to human and BPL productions . ( b ) A grid of 36 new character concepts sampled unconditionally from GNS , shown next to BPL samples . Generating new concepts ( unconstrained ) . In addition to generating new exemplars of a particular concept , GNS can generate new character concepts altogether , unconditioned on training images . Whereas the BPL model us s a compli ated proc dure for uncon itional ge ration that involves a preliminary inference step and a supplemental nonparametric model , GNS generates new concepts by sampling directly from the type prior P ( ψ ) . Moreover , the resulting GNS productions capture more of the structure found in real characters than either the raw BPL prior ( Fig 1 , 4b ) or the supplemental nonparametric BPL prior [ 29 ] . In Fig . 4b we show a grid of 36 new character concepts sampled from our generative model at reduced temperature setting T = 0.5 ( Appendix A.2 ) . The model produces characters in multiple distinct styles , with some having more angular , line-based structure and others relying on complex curves . In Appendix Fig . A14 , we show a larger set of characters sampled from GNS , plotted in a topologically-organized grid alongside a corresponding g id of “ ne r st neig bor ” training examples . In many cases , samples from the model have a distinct style and are visually dissimilar from their nearest Omniglot neighbor . Marginal image likelihoods . As a final evaluation , we computed likelihoods of held-out character images by marginalizing over the latent type and token variables of GNS to estimate P ( I ) = ∫ P ( ψ , θ , I ) ∂ψ∂θ . We hypothesized that our causal generative model of character concepts would yield better test likelihoods compared to deep generative models trained directly on image pixels . As detailed in Appendix D , under the minimal assump- tion that our K posterior parses represent sharply peaked modes of the joint density , we can obtain an approximate lower bound on the marginal P ( I ) by using Laplace ’ s method to estimate the integral around each mode and summing the resulting integrals . In Table 3 , we report average log-likelihood ( LL ) bounds obtained from GNS for a random subset of 1000 evaluation images , compared against test LL bounds from both the SG [ 43 ] and the VHE [ 21 ] models . Our GNS model performs stronger than each alternative , reporting the best overall log-likelihood per dimension . 6 DISCUSSION We introduced a new generative neuro-symbolic ( GNS ) model for learning flexible , task-general representations of character concepts . We demonstrated GNS on the Omniglot challenge , showing that it performs a variety of inductive tasks in ways difficult to distinguish from human behavior . Published as a conference paper at ICLR 2021 Some evaluations were still qualitative , and future work will further quantify these results using Visual Turing Tests [ 29 ] . Whereas many machine learning algorithms emphasize breadth of data domains , isolating just a single task across datasets , we have focused our efforts in this paper on a single domain , emphasizing depth of the representation learned . Human concept learning is distinguished for having both a breadth and depth of applications [ 37 , 31 ] , and ultimately , we would like to capture both of these unique qualities . We see our character model as belonging to a broader class of generative neuro-symbolic ( GNS ) models for capturing the data generation process . We have designed our model based on general principles of visual concepts—namely , that concepts are composed of reusable parts and locations—and we describe how it generalizes to 3D object concepts in Appendix E. As in the human mind , machine learning practitioners have far more prior knowledge about some domains vs. others . Handwritten characters is a domain with strong priors [ 1 , 33 , 23 ] , implemented directly in the human mind and body . For concepts like these with more explicit causal knowledge , it is beneficial to include priors about how causal generative factors translate into observations , as endowed to our character model through its symbolic rendering engine . For other types of concepts where these processes are less clear , it may be appropriate to use more generic neural networks that generate concepts and parts directly as raw stimuli , using less symbolic machinery and prior knowledge . We anticipate that GNS can flexibly model concepts in both types of domains , although further experiments are needed to demonstrate this . Our current token model for character concepts is much too simple , and we acknowledge a few important shortcomings . First , as shown in Appendix Fig . A10 , there are a number of scenarios in which the parses from a training character can not adequately refit to a new example of the same character without a token model that allows for changes to discrete variables . By incorporating this allowance in future work , we hope to capture more knowledge in this domain and further improve performance . Furthermore , although our vision for GNS is to represent both concepts and background knowledge with neuro-symbolic components , the current token-level model uses only simple parametric distributions . In future work , we hope to incorporate token-level models that use neural network sub-routines , as in the type-level model presented here . REFERENCES [ 1 ] M. K. Babcock and J. Freyd . Perception of dynamic information in static handwritten forms . American Journal of Psychology , 101 ( 1 ) :111–130 , 1988 . [ 2 ] M. Botvinick , D. Barrett , P. Battaglia , N. de Freitas , D. Kumaran , and et al . Building machines that learn and think for themselves . Behavioral and Brain Sciences , 40 : e255 , 2017 . [ 3 ] J. Devlin , J. Uesato , S. Bhupatiraju , R. Singh , A.-R. Mohamed , and P. Kohli . Robustfill : Neural program learning under noisy i/o . In ICML , 2017 . [ 4 ] K. Ellis , D. Ritchie , A. Solar-lezama , and J . B. Tenenbaum . Learning to infer graphics programs from hand-drawn images . In NeurIPS , 2018 . [ 5 ] S. M. A. Eslami , N. Heess , T. Weber , Y. Tassa , D. Szepesvari , K. Kavukcuoglu , and G. E. Hinton . Attend , infer , repeat : Fast scene understanding with generative models . In NeurIPS , 2016 . [ 6 ] R. Feinman and B. M. Lake . Generating new concepts with hybrid neuro-symbolic models . In CogSci , 2020 . [ 7 ] C. Finn , P. Abbeel , and S. Levine . Model-agnostic meta-learning for fast adaptation of deep networks . In ICML , 2017 . [ 8 ] Y. Ganin , T. Kulkarni , I. Babuschkin , S. M. A. Eslami , and O. Vinyals . Synthesizing programs for images using reinforced adversarial learning . In ICML , 2018 . [ 9 ] V. Garcia and J. Bruna . Few-shot learning with graph neural networks . In ICLR , 2018 . [ 10 ] A. Gelman , J . B. Carlin , H. S. Stern , D. B. Dunson , A. Vehtari , and D. B. Rubin . Bayesian Data Analysis ( 3rd ed. ) . CRC Press , Boca Raton , FL , 2014 . [ 11 ] S. Geman , E. Bienenstock , and R. Doursat . Neural networks and the bias/variance dilemma . Neural Computation , 4 ( 1 ) :1–58 , 1992 . Published as a conference paper at ICLR 2021 [ 12 ] D. George , W. Lehrach , K. Kansky , M. Lázaro-Gredilla , C. Laan , B. Marthi , X. Lou , and et al . A generative vision model that trains with high data efficiency and breaks text-based CAPTCHAs . Science , 358 ( 6368 ) , 2017 . [ 13 ] N. D. Goodman , J . B. Tenenbaum , J. Feldman , and T. L. Griffiths . A rational analysis of rule-based concept learning . Cognitive Science , 32:108–154 , 2008 . [ 14 ] N. D. Goodman , T. D. Ullman , and J . B. Tenenbaum . Learning a theory of causality . Psychological Review , 118 ( 1 ) :110–119 , 2011 . [ 15 ] N. D. Goodman , J . B. Tenenbaum , and T. Gerstenberg . Concepts in a probabilistic language of thought . In E. Margolis and S. Laurence ( ed . ) , The conceptual mind : New directions in the study of concepts , pp . 623–653 . MIT Press , Cambridge , MA , 2015 . [ 16 ] A. Graves . Generating sequences with recurrent neural networks . arXiv preprint arXiv:1308.0850 , 2013 . [ 17 ] A. Graves , G. Wayne , and I. Danihelka . Neural turing machines . arXiv preprint arXiv:1410.5401 , 2014 . [ 18 ] K. Greff , R. L. Kaufman , R. Kabra , N. Watters , C. Burgess , D. Zoran , L. Matthey , M. Botvinick , and A. Lerchner . Multi-object representation learning with iterative variational inference . In ICML , 2019 . [ 19 ] K. Gregor , I. Danihelka , A. Graves , D. J. Rezende , and D. Wierstra . DRAW : A recurrent neural network for image generation . In ICML , 2015 . [ 20 ] D. Ha and D. Eck . A neural representation of sketch drawings . In ICLR , 2018 . [ 21 ] L. B. Hewitt , M. I. Nye , A. Gane , T. Jaakkola , and J . B. Tenenbaum . The Variational Homoencoder : Learning to learn high capacity generative models from few examples . In UAI , 2018 . [ 22 ] L. B. Hewitt , T. A . Le , and J . B. Tenenbaum . Learning to learn generative programs with Memoised Wake-Sleep . In UAI , 2020 . [ 23 ] K. H. James and I. Gauthier . When writing impairs reading : Letter perception ’ s susceptibility to motor interference . Journal of Experimental Psychology : General , 138 ( 3 ) :416–31 , 2009 . [ 24 ] C. Kemp and J . B. Tenenbaum . Structured statistical models of inductive reasoning . Psychological Review , 116:20–58 , 2009 . [ 25 ] A. R. Kosiorek , S. Sabour , Y. W. Teh , and G. E. Hinton . Stacked Capsule Autoencoders . In NeurIPS , 2019 . [ 26 ] T. D. Kulkarni and et al . Picture : A probabilistic programming language for scene perception . In CVPR , 2015 . [ 27 ] B. M. Lake and M. Baroni . Generalization without systematicity : On the compositional skills of sequence-to-sequence recurrent networks . In ICML , 2018 . [ 28 ] B. M. Lake and S. T. Piantadosi . People infer recursive visual concepts from just a few examples . Computational Brain & Behavior , 2019 . [ 29 ] B. M. Lake , R. Salakhutdinov , and J . B. Tenenbaum . Human-level concept learning through probabilistic program induction . Science , 350:1332–1338 , 2015 . [ 30 ] B. M. Lake , T. D. Ullman , J . B. Tenenbaum , and S. J. Gershman . Building machines that learn and think like people . Behavioral and Brain Sciences , 40 : E253 , 2017 . [ 31 ] B. M. Lake , R. Salakhutdinov , and J . B. Tenenbaum . The Omniglot challenge : A 3-year progress report . Behavioral Sciences , 29:97–104 , 2019 . [ 32 ] Y. LeCun , Y. Bengio , and G. Hinton . Deep learning . Nature , 521 ( 7553 ) :436–444 , 2015 . [ 33 ] M. Longcamp , J. L. Anton , M. Roth , and J. L. Velay . Visual presentation of single letters activates a premotor area involved in writing . Neuroimage , 19 ( 4 ) :1492–1500 , 2003 . [ 34 ] J. Mao , C. Gan , P. Kohli , J . B. Tenenbaum , and J. Wu . The neuro-symbolic concept learner : Interpreting scenes , words , and sentences from natural supervision . In ICLR , 2019 . [ 35 ] G. F. Marcus . The Algebraic Mind : Integrating Connectionism and Cognitive Science . MIT Press , Cambridge , MA , 2003 . Published as a conference paper at ICLR 2021 [ 36 ] J. L. McClelland , M. M. Botvinick , D. C. Noelle , D. C. Plaut , T. T. Rogers , M. S. Seidenberg , and L. B. Smith . Letting structure emerge : Connectionist and dynamical systems approaches to cognition . Trends in Cognitive Science , 14:348–356 , 2010 . [ 37 ] G. L. Murphy . The big book of concepts . MIT Press , Cambridge , MA , 2002 . [ 38 ] G. L. Murphy and D. L. Medin . The role of theories in conceptual coherence . Psychological Review , 92 ( 3 ) :289–316 , 1985 . [ 39 ] M. I. Nye , A. Solar-Lezama , J . B. Tenenbaum , and B. M. Lake . Learning compositional rules via neural program synthesis . arXiv preprint arXiv:2003.05562 , 2020 . [ 40 ] A. Perfors , J . B. Tenenbaum , and T. Regier . The learnability of abstract syntactic principles . Cognition , 118 ( 3 ) :306–338 , 2011 . [ 41 ] S. T. Piantadosi , J . B. Tenenbaum , and N. D. Goodman . The logical primitives of thought : Empirical foundations for compositional cognitive models . Psychological Review , 2016 . [ 42 ] S. Reed and N. de Freitas . Neural programmer-interpreters . In ICLR , 2016 . [ 43 ] D. J. Rezende , S. Mohamed , I. Danihelka , K. Gregor , and D. Wierstra . One-Shot generalization in deep generative models . In ICML , 2016 . [ 44 ] P. Shyam , S. Gupta , and A. Dukkipati . Attentive recurrent comparators . In ICML , 2017 . [ 45 ] J. Snell , K. Swersky , and R. Zemel . Prototypical networks for few-shot learning . In NeurIPS , 2017 . [ 46 ] A. Stuhlmuller , J . B. Tenenbaum , and N. D. Goodman . Learning Structured Generative Concepts . In CogSci , 2010 . [ 47 ] J . B. Tenenbaum , C. Kemp , T. L. Griffiths , and N. D. Goodman . How to grow a mind : Statistics , structure , and abstraction . Science , 331 ( 6022 ) :1279–1285 , 2011 . [ 48 ] L. Valkov , D. Chaudhari , A. Srivastava , C. Sutton , and S. Chaudhuri . HOUDINI : Lifelong learning as program synthesis . In NeurIPS , 2018 . [ 49 ] O. Vinyals , C. Blundell , T. Lillicrap , and D. Wierstra . Matching networks for one shot learning . In NeurIPS , 2016 . [ 50 ] K. Yi , J. Wu , C. Gan , A. Torralba , P. Kohli , and J . B. Tenenbaum . Neural-symbolic VQA : Disentangling reasoning from vision and language understanding . In NeurIPS , 2018 . Published as a conference paper at ICLR 2021 A GENERATIVE MODEL ψ θ I M Type Token Image Figure A5 : The GNS hierarchical generative model . The full hierarchical generative model of GNS is depicted in Fig . A5 . The joint density for type ψ , token θ ( m ) , and image I ( m ) factors as P ( ψ , θ ( m ) , I ( m ) ) = P ( ψ ) P ( θ ( m ) |ψ ) P ( I ( m ) |θ ( m ) ) . ( 6 ) The type ψ parameterizes a motor program for generating character tokens θ ( m ) , unique exemplars of the concept . Both ψ and θ ( m ) are expressed as causal drawing parameters . An image I ( m ) is obtained from token θ ( m ) by rendering the drawing parameters and sampling binary pixel values . A.1 TRAINING ON CAUSAL DRAWING DATA original stroke minimal spline Figure A6 : Spline representation . Raw strokes ( left ) are converted into minimal splines ( right ) using least-squares optimization . Crosses ( left ) indicate pen locations and red dots ( right ) indicate spline control points . To learn the parameters of P ( ψ ) and P ( θ ( m ) | ψ ) , we fit our models to the human drawing data from the Omniglot background set . In this drawing data , a character is represented as a variable-length sequence of strokes , and each stroke is a variable-length sequence of pen locations { z1 , ... , zT } , with zt ∈ R2 ( Fig . A6 , left ) . Before training our model on background drawings , we convert each stroke into a minimal spline representation using least-squares optimization ( Fig . A6 , right ) , borrowing the B-spline tools from [ 29 ] . The number of spline control points depends on the stroke complexity and is determined by a residual threshold . Furthermore , we removed small strokes using a threshold on the trajectory length . These processing steps help suppress noise and emphasize signal in the drawings . Our generative models are trained to produce character drawings , where each drawing is represented as an ordered set of splines ( strokes ) . The number of strokes , and the number of spline coordinates per stroke , are allowed to vary in the model . A.2 TYPE PRIOR The type prior P ( ψ ) represents a character as a sequence of strokes , with each stroke decomposed into a starting location yi ∈ R2 , conveying the first spline control point , and a stroke trajectory xi = { ∆1 , ... , ∆N } , conveying deltas between spline control points . It generates character types one stroke at a time , using a symbolic rendering procedure called frender as an intermediate processing step after forming each stroke . An image canvas C is used as a memory state to convey information about previous strokes . At each step i , the next stroke ’ s starting location and trajectory are sampled with procedure GeneratePart . In this procedure , the current image canvas C is first read by the location model ( Fig . 2 ) , a convolutional neural network ( CNN ) that processes the image and returns a Published as a conference paper at ICLR 2021 probability distribution for starting location yi : yi ∼ p ( yi | C ) . The starting location yi is then passed along with the image canvas C to the stroke model , a Long Short-Term Memory ( LSTM ) architecture with a CNN-based image attention mechanism.The stroke model samples the next stroke trajectory xi sequentially one offset at a time , selectively attending to different parts of the image canvas at each sample step and combining this information with the context of yi : xi ∼ p ( xi | yi , C ) . After GeneratePart returns , the stroke parameters yi , xi are rendered to produce an updated canvas C = frender ( yi , xi , C ) . The new canvas is then fed to the termination model , a CNN architecture that samples a binary termination indicator vi : vi ∼ p ( vi | C ) . Both our location model and stroke model follow a technique from [ 16 ] , who proposed to use neural networks with mixture outputs to model handwriting data . Parameters { π1 : K , µ1 : K , σ1 : K , ρ1 : K } output by our network specify a Gaussian mixture model ( GMM ) with K components ( Fig . 2 ; colored ellipsoids ) , where πk ∈ ( 0 , 1 ) is the mixture weight of the kth component , µk ∈ R2 its means , σk ∈ R2+ its standard deviations , and ρk ∈ ( −1 , 1 ) its correlation . In our location model , a single GMM describes the distribution p ( yi | C ) . In our stroke model , the LSTM outputs one GMM at each timestep , describing p ( ∆t|∆1 : t−1 , yi , C ) . The termination model CNN has no mixture outputs ; it predicts a single Bernoulli probability to sample binary variable vi . When sampling from the model at test time , we use a temperature parameter proposed by Ha & Eck [ 20 ] ( see [ 20 , Eq . 8 ] ) to control the entropy of the mixture density outputs . A.3 TOKEN MODEL procedure GENERATETOKEN ( ψ ) { κ , y1 : κ , x1 : κ } ← ψ . Unpack type-level variables for i = 1 ... κ do y ( m ) i ∼ P ( y ( m ) i | yi ) . Sample token-level location x ( m ) i ∼ P ( x ( m ) i | xi ) . Sample token-level part A ( m ) ∼ P ( A ( m ) ) . Sample affine warp transformation θ ← { y ( m ) 1 : κ , x ( m ) 1 : κ , A ( m ) } return θ . Return concept token Figure A7 : Token model sampling procedure . Character types ψ are used to parameterize the procedure GenerateToken ( ψ ) , a probabilistic program representation of token model P ( θ ( m ) | ψ ) . The psuedo-code of this sampling procedure is provided in Fig . A7 . The location model P ( y ( m ) i | yi ) and part model P ( x ( m ) i | xi ) are each zeromean Gaussians , with standard deviations fit to the background drawings following the procedure of Lake et al . [ 29 ] ( see SM 2.3.3 ) . The location model adds noise to the start of each stroke , and the part model adds isotropic noise to the 2d cooridnates of each spline control point in a stroke . In the affine warp A ( m ) ∈ R4 , the first two dimensions control global re-scaling of spline coordinates , and the second two control a global translation of the center of mass . The distribution is P ( A ( m ) ) = N ( [ 1 , 1 , 0 , 0 ] , ΣA ) , ( 7 ) with the parameter ΣA similarly fit from background drawings ( see SM 2.3.4 in [ 29 ] ) . B APPROXIMATE POSTERIOR To obtain parses { ψ , θ } 1 : K for our approximate posterior ( Eq . 3 ) given an image I , we follow the high-level strategy of Lake et al . [ 29 ] , using fast bottom-up search followed by discrete selection and continuous optimization . The algorithm proceeds by the following steps . 13 Published as a conference paper at ICLR 2021 Step 1 : Propose a range of candidate parses with fast bottom-up methods . The bottom-up algorithm extracts an undirected skeleton graph from the character image and uses random walks on the graph to propose a range of candidate parses . There are typically about 10-100 proposal parses , depending on character complexity ( Fig . A8 ) . input Figure A8 : The initial “ base ” parses proposed for an image with skeleton extraction and random walks . Step 2 : Select stroke order and stroke directions for each parse using exhaustive search with the type prior P ( ψ ) . Random search is used for complex parses with large configuration spaces . Step 3 : Score each of the proposal parses using type prior P ( ψ ) and select the top-K parses . We use K = 5 following previous work [ 29 ] . Step 4 : Separate each parse into type and token { ψ , θ } and optimize the continuous type- and token-level parameters with gradient descent to maximize the full joint density P ( ψ , θ , I ) of Eq . 1 . Step 5 : Compute weights π1 : K for each parse by computing π̃k = P ( ψk , θk , I ) and normalizing πk = π̃k/ ∑K k=1 π̃k . C INFERENCE FOR GENERATING NEW EXEMPLARS When generating new exemplars , we are given a single image I ( 1 ) of a novel class and asked to generate new instances I ( 2 ) ( overloading the parenthesis notation from classification ) . To perform this task with GNS , we first sample from our approximate posterior Q ( ψ , θ | I ( 1 ) ) to obtain parse { ψ , θ } ( see Eq . 3 ) , and then re-sample token parameters θ from our token model P ( θ ( 2 ) | ψ ) . Due to high-dimensional images , mass in the approximate posterior often concentrates on the single best parse . To model the diversity seen in different human parses , we apply a temperature parameter to the log of unnormalized parse weights log ( π̃′k ) = log ( π̃k ) /T before normalization , selecting T = 8 for our experiments . With updated weights π′1 : K our sampling distribution is written as P ( I ( 2 ) , θ ( 2 ) | I ( 1 ) ) ≈ K∑ k=1 π′kP ( I ( 2 ) | θ ( 2 ) ) P ( θ ( 2 ) | ψk ) . ( 8 ) D MARGINAL IMAGE LIKELIHOODS Let z = ψ ∪ θ be a stand-in for the joint set of type- and token-level random variables in our GNS generative model . The latent z includes both continuous and discrete variables : the number of strokes κ and the number of control points per stroke d1 : κ are discrete , and all remaining variables are continuous . Decomposing z into its discrete variables zD ∈ ΩD and continuous variables zC ∈ ΩC , the marginal density for an image I is written as P ( I ) = ∑ zD∈ΩD ∫ P ( I , zD , zC ) ∂zC . ( 9 ) Published as a conference paper at ICLR 2021 For any subset Ω̃D ⊂ ΩD of the discrete domain , the following inequality holds : P ( I ) ≥ ∑ zD∈Ω̃D ∫ P ( I , zD , zC ) ∂zC . ( 10 ) Our approximate posterior ( Eq . 3 ) gives us K parses that represent promising modes { zD , zC } 1 : K of the joint density P ( I , zD , zC ) for an image I , and by setting Ω̃D = { zD } 1 : K to be the set of K unique discrete configurations from our parses , we can compute the lower bound of Eq . 10 by computing the integral ∫ P ( I , zD , zC ) ∂zC at each of these zD . At each zDk ∈ { zD } 1 : K , the log-density function f ( zC ) = log P ( I , zDk , zC ) has a gradient-free maximum at zCk , the continuous configuration of the corresponding posterior parse . These maxima were identified by our gradient-based continuous optimizer during parse selection ( Appendix B ) . If we assume that these maxima are sharply peaked , then we can use Laplace ’ s method to estimate the integral ∫ P ( I , zDk , zC ) ∂zC at each zDk . Laplace ’ s method uses Taylor expansion to approximate the integral of ef ( x ) for a twice-differentiable function f around a maximum x0 as∫ ef ( x ) ∂x ≈ ef ( x0 ) ( 2π ) d 2 | −Hf ( x0 ) | 12 , ( 11 ) where x ∈ Rd andHf ( x0 ) is the Hessian matrix of f evaluated at x0 . Our log-density function f ( zC ) is fully differentiable w.r.t . continuous parameters zC , therefore we can compute H ( zC ) = ∂2f/∂z2C with ease . Our approximate lower bound on P ( I ) is therefore written as the sum of Laplace approximations at our K parses : P ( I ) ≥ K∑ k=1 ∫ P ( I , zDk , zC ) ∂zC ≈ K∑ k=1 P ( I , zDk , zCk ) ( 2π ) d 2 | −H ( zCk ) | 1 2 ( 12 ) E APPLYING GNS TO 3D OBJECT CONCEPTS The GNS modeling framework is designed to capture inductive biases for concept learning that generalize across different types of visual concepts . We are actively working on applying GNS as a task-general generative model of 3D object concepts , such as chairs and vehicles , again with a neuro-symbolic generative process for parts and relations . Here , we briefly review the path forward for training GNS models of object concepts . procedure GENERATETYPE C 0 . Initialize blank image canvas while true do [ yi , xi ] GENERATEPART ( C ) . Sample part location & parameters C frender ( yi , xi , C ) . Render part to image canvas vi ⇠ p ( v | C ) . Sample termination indicator if vi then break . Terminate sample { , y1 : , x1 : } return . Return concept type 1 procedure GENERATETOKEN C 0 . Initialize blank 3d canvas while true do xi GENERATEPART ( C ) . Sample part from neural net C fupdate ( xi , C ) . Update 3d canvas vi ⇠ p ( v | C ) . Sample termination indicator if vi then break . Terminate sample ✓ { , x1 : } return . Return concept token 1 procedure GENERATETYPE C 0 . Initialize blank image canvas while true do [ yi , xi ] GENERATEPART ( C ) . Sample part location & parameters C frender ( yi , xi , C ) . Render part to image canvas vi ⇠ p ( v | C ) . Sample termination indicator if vi then break . Terminate sample { , y1 : , x1 : } return . Return concept type category model p ( k |C ) instance model p ( x |k , C ) C p ( k ∣ C ) C q ( z ∣ x , k , C ) zk p ( x |z ) x p k Ck p ( z |k , C ) x generate token se at leg s ba ck re st Figure A9 : A GNS model for the concept of a chair . Everyday 3D object concepts have more within-class variability than handwritten characters ; for example , different chair tokens vary in the number of arm rests , legs , etc . much as different handwritten character types vary in their parts , although both domains are characterized by similar structural 15 Published as a conference paper at ICLR 2021 and statistical considerations . To address these differences within GNS , we shift up one level in the generative hierarchy and design a token-level model for generating new exemplars of an individual concept ( chairs , cars , etc . ) that mirrors our type-level model for characters . The architecture and sampling procedure of GNS for 3D object tokens is given in Fig . A9 . As with characters , our object model produces samples one part at a time , using a 3D canvas C in place of the previous 2D canvas . The procedure GeneratePart consists of two neural network components : 1 ) a discriminitivelytrained category model p ( k | C ) that predicts the category label k of the next part given the current canvas ( leg , arm , back , etc . ) , and 2 ) a generative instance model p ( x | k , C ) that is trained with a variational autoencoder objective to sample an instance of the next part x given the current canvas and predicted part category label . Objects and object parts are represented as 3D voxel grids , and all neural modules , including the category model and the encoder/decoder of the instance model , are parameterized by 3D convolutional neural networks . A function fupdate is used to update the current canvas with the most recent part by summing the voxel grids . A GNS model for a particular concept is trained on examples of the 3D voxel grids with semantic part labels . F.4 GENERATING NEW CONCEPTS ( UNCONSTRAINED ) In Fig . A14 we show a grid of 100 new character concepts produced by GNS , plotted alongside a corresponding grid of “ nearest neighbor ” training examples . Published as a conference paper at ICLR 2021 I ( c ) I ( T ) Score : -618.6 I ( c ) I ( T ) Score : -1624.5 I ( c ) I ( T ) Score : -269.4 I ( c ) I ( T ) Score : -281.1 I ( c ) I ( T ) Score : -269.1 I ( c ) I ( T ) Score : -381.6 I ( c ) I ( T ) Score : -820.9 I ( c ) I ( T ) Score : -505.6 I ( c ) I ( T ) Score : -403.6 I ( c ) I ( T ) Score : -814.4 I ( c ) I ( T ) Score : -742.5 I ( c ) I ( T ) Score : -545.6 Figure A10 : Classification fits . Each row corresponds to one classification trial ( one test image ) . The first column shows parses from the correct training image re-fit to the test example , and the second column parses from an incorrect training image . The two-way score for each train-test pair is shown above the grid , and the model ’ s selected match is emboldened . The 4th and 6th row here are misclassified trials . Published as a conference paper at ICLR 2021 Published as a conference paper at ICLR 2021 Figure A12 : Generating new exemplars with GNS . Twelve target images are highlighted in red boxes . For each target image , the GNS model sampled 9 new exemplars , shown in a 3x3 grid under the target . One-shot Generalization in Deep Generative Models Figure 8 . Unconditional samples for 52 × 52 omniglot ( task 1 ) . For a video of the generation process , see https : //www.youtube.com/ watch ? v=HQEI2xfTgm4 Figure 9 . Generating new examplars of a given character for the weak generalization test ( task 2a ) . The first row shows the test images and the next 10 are one-shot samples from the model . 3 . Representative samples from a novel alphabet . This task corresponds to figure 7 in Lake et al . ( 2015 ) , and conditions the model on anywhere between 1 to 10 samples of a novel alphabet and asks the model to generate new characters consistent with this novel alphabet . We show here the hardest form of this test , using only 1 context image . This test is highly subjective , but the model generations in figure 11 show that it is able to pick up common features and use them in the generations . We have emphasized the usefulness of deep generative models as scalable , general-purpose tools for probabilistic reasoning that have the important property of one-shot generalization . But , these models do have limitations . We have already pointed to the need for reasonable amounts of data . Another important consideration is that , while our models can perform one-shot generalization , they do not perform one-shot learning . One-shot learning requires that a model is updated after the presentation of each new input , e.g. , like the non-parametric models used by Lake et al . ( 2015 ) or Salakhutdinov et al . ( 2013 ) . Parametric models such as ours require a gradient update of the parameters , which we do not do . Instead , our model performs a type of one-shot inference that during test time can perform inferential tasks on new data points , such as missing data completion , new exemplar generation , or analogical sampling , but does not learn from these points . This distinction between one-shot learning and inference is important and affects how such models can be used . We aim to extend our approach to the online and one-shot learning setting in future . 30-20 40-10 45-5 Figure 10 . Generating new examplars of a given character for the strong generalization test ( task 2b , c ) , with models trained with different amounts of data . Left : Samples from model trained on 30-20 train-test split ; Middle : 40-10 split ; Right : 45-5 split ( right ) Figure 11 . Generating new exemplars from a novel alphabet ( task 3 ) . The first row shows the test images , and the next 10 rows are one-shot samples generated by the model . 6 . Conclusion We have developed a new class of general-purpose models that have the ability to perform one-shot generalization , emulating an important characteristic of human cognition . Sequential generative models are natural extensions of variational auto-encoders and provide state-of-the-art models for deep density estimation and image generation . The models specify a sequential process over groups of latent variables that allows it to compute the probability of data points over a number of steps , using the principles of feedback and attention . The use of spatial attention mechanisms substantially improves the ability of the model to generalize . The spatial transformer is a highly flexible attention mechanism for both reading and writing , and is now our default mechanism for attention in generative models . We highlighted the one-shot generalization ability of the model over a range of tasks that showed that the model is able to generate compelling and diverse samples , having seen new examples just once . However there are limitations of this approach , e.g. , still needing a reasonable amount of data to avoid overfitting , which we hope to address in future work . ( a ) SG Figure 4 : 5-shot samples generated by each model ( more in Supplement ) . With a PixelCNN architecture , both Neural Statistician and Resample objectives lead to underutilisation of the latent space , producing unfaithful samples . For the hierarchical PixelCNN architecture , however , significant differences arise between training objectives . In this case , a Neural Statistician learns a strong global distribution over images but makes only minimal use of latent variables c. This means that , despite the use of a higher capacity model , classification accuracy is much poorer ( 66 % ) than that achieved using a deconvolutional architecture . For the same reason , conditional samples display an improved sharpness but are no longer identifiable to the cue images on which they were conditioned ( Figure 4 ) . Our careful training suggests that this is not an optimisation difficulty but is core to the objective , as discussed in Chen et al . ( 2016 ) . By contrast , a VHE is able to gain a large benefit from the hierarchical PixelCNN architecture , with a 3-fold reduction in classification error ( 5-shot accuracy 98.8 % ) and conditional samples which are simultaneously sharp and identifiable ( Figure 4 ) . This improvement is in part achieved by increased utilisation of the latent space , due to rescaling of the KL divergence term in the objective . However , our results show that this common technique is insufficient when used alone , leading to overfitting to cue images with an equally severe impairment of classi- fication performance ( accuracy 62.8 % ) . Rather , we find that KL-rescaling and data resampling must be used tog ther in order for the benefit of the powerful PixelCNN architecture to be re lis d. Table 2 lists the classification accuracy achieved by VHEs with both |D| = 1 and |D| = 5 , as compared to existing d ep learning appr aches . We find t at both network ar not only state- f-the-art mongst deep generative models , but also competitive against the best discriminative models trained directly for few-shot classification . Unlike these discriminative models , VHE is also able to generate new images of a character in one shot , producing samples which are both realistic and faithful to the class of the cue image ( Figure 5 ) . As our goal is to model shared structure acr ss images , we evaluate generative performance using joint log like- Figure 5 : One-shot same-class samples generated by our model . Cue images were sampled from previously unseen classes . lihood of the entire Omniglot test set ( rather than separately across images ) . From this perspective , a single element VAE will perform poorly as it treats all datapoints as independent , optimising a sum over log likelihoods for each element . By sharing latents across elements of the same class , a VHE can improve upon this considerably . For likelihood evaluation , our most appropriate comparison is with Generative Matching Networks ( Bartunov & Vetrov , 2016 ) as they also model dependencies within a class . Thus , we trained models under the same train/test split as them , with no data augmentation . We evaluate the joint log likelihood of full character classes from the test set , normalised by the number of elements , using importance weighting with k=500 samples from q ( c ; X ) . As can be seen in Tables 3 and 4 , our hierarchical PixelCNN architecture is able to achieve state-of-the-art log likelihood results only when trained using the VHE objective . Figure 4 : 5-shot samples generated by each model ( more in Supplement ) . With a PixelCNN architecture , both Neural Statistician and Resample objectives lead to underutilisation of the latent space , producing unfaithful samples . For the hierarchical PixelCNN architecture , however , significant differences arise between training objectives . In this case , a Neural Statistician learns a strong global distribution over images but makes only minimal use of latent variables c. This means that , despite the use of a higher capacity model , classification accuracy s much poorer ( 66 % ) than that achieved using a deconvolutional architecture . For the same reason , conditional samples display an improved sharpness but are no longer identifiable to the cue images on which they were conditioned ( Figure 4 ) . Our care ul training sug ests that this is not an optimisation difficulty but is core t the objective , as discussed in Chen et al . ( 2016 ) . By contrast , a VHE is able to gain a large benefit from the hierarchical PixelCNN architecture , with a 3-fold reduction in classification error ( 5-shot accuracy 98.8 % ) and conditional samples which are simultaneously sharp and identifiable ( Figure 4 ) . This improvement is in part achieved by increased utilisation of the latent space , due to rescaling of the KL divergence term in the objective . However , our results show that this common technique is insufficient when used alone , leading to overfitting to cue images with an equally severe impair ent of classification performance ( accuracy 62.8 % ) . Rather , we find that KL-rescaling and data resampling must be used together in order for the benefit of the powerful PixelCNN architecture to be realised . Table 2 lists the classification accuracy achieved by VHEs with both |D| = 1 and |D| = 5 , as compared to existing deep learning approaches . We find that both networks are not only state-of-the-art amongst deep generative models , but also competitive against the best discriminative models trained directly for few-shot classi- fication . Unlike these discriminative models , a VHE is also able to generate new images of a character in one shot , producing samples which are both realistic and faithful to the class of the cue image ( Figure 5 ) . As our goal is to model shared structure across images , we evaluate generative performance usi g joint log like- Figure 5 : One-shot same-class samples generated by our model . Cue images were sampled from previously un- seen classes . lihood of the entire Omniglot test set ( rather than separately across images ) . From this perspective , a single element VAE will perform poorly as it treats all datapoints as independent , optimising a sum over log likelihoods for each element . By sharing latents across elements of the same class , a VHE can improve upon this considerably . For likelihood evaluation , our most appropriate comparison is with Generative Matching Networks ( Bartunov & Vetrov , 2016 ) as they also model dependencies within a class . Thus , we trained models under the same train/test split as them , with no data augmentation . We evaluate the joint log likelihood of full character classes from the test set , normalised by the number of elements , using importance weighting with k=500 samples from q ( c ; X ) . As can be seen in Tables 3 and 4 , our hierarchical PixelCNN architecture is able to achieve state- f-the-art log likelihood results nly when trained using the VHE objective . Figure 4 : 5-shot samples generated by each model ( more in Supplement ) . With a PixelC N architecture , both Neural S atist cian and Resample objectives lead to underutilisation of the latent space , producing unfaithful samples . For the hie archical PixelC N architecture , however , significant diff rences arise between tra ing objectives . In this case , a Neural S atist cian learns a stron global distribution over images but makes only m nimal use of latent variables c. This means that , despite the use of a higher capacity model , clas ification ccuracy is much poo er ( 66 % ) than that achieved using a deconvolutional architecture . For the same reason , conditional samples display an improved sharpness but are no longer identifiable to the cue images on which they w re conditioned ( Figure 4 ) . Our careful tra ing sugge t that this is not an optimisation difficulty but is core to the objective , as discussed in Chen et al . ( 2016 ) . By contrast , a VHE is able to gain a large benefit from the hie archical PixelC N architecture , with a 3-fold reduction in classification error ( 5-shot accuracy 9 .8 % ) and conditional samples which are simultaneously sharp and identifiable ( Figure 4 ) . This improvement is in part achieved by increased utilisation of the latent space , due to rescaling of the KL divergence term in the objective . However , ou result show tha this co mon technique is insufficient when used alone , leading t overfitting to cue images with an equally sev re impairment of classification performance ( accuracy 62.8 % ) . Rather , we find that KL-rescaling an d ta resampling must be used together in order for the benefit of the powerful PixelC N architecture to be realised . Table 2 li ts the classification accuracy achieved by VHEs with both |D| = 1 and |D| = 5 , as compared to existing deep lear ing approaches . We find that both networks are not only s ate-of-the-art amongst deep generative models , but also competitive against the best discriminative models trained directly for few-shot classi- fication . Unlike th se discriminative models , a VHE is also able to generate new images of a ch racter in one shot , producing samples which are both realistic and faithful to the class of the cue image ( Figure 5 ) . As our goal is to model shared structure across images , w evaluate generative perf rmance using joint log like- Figure 5 : One-shot same-clas samples generated by our model . Cue images w re sampled from previously un- seen classes . lihood of th entire Omniglo test set ( rather than separately across images ) . From this perspective , a singl elment VAE will perform poorly as it treats all d tapoints as independent , optim sing a sum over log likelihoods for each lement . By sharing latents across lements of the same class , a VHE can improve upon this considerably . For likelihood evaluation , our most appropriate comparison is with Generative Matching Networks ( Bartunov & Vetrov , 2016 ) as they also model dependencies within a class . Thus , we trained models under the same train/test split as them , with no d t augmen ation . W evaluate the joint log likelihood o full ch racter cla ses from the test set , normalised by the number of lements , using importance weighting with k=500 samples from q ( c ; X ) . As can be seen in Tables 3 and 4 , our hie archical PixelC N architectur is able to achieve s ate-of-the art log likelihood results only whe trained using the VHE objective . Figure 4 : 5-shot samples generated by each mod l ( more in Supplement ) . With a PixelCNN architecture , both eural Statistician and Resample objectives l ad to underutilisation of the lat nt sp ce , pr ducing u faithful samples . For the hierarchical PixelCNN architecture , however , significant differences arise between training objectives . In this case , a Neural Stati tician learns a strong global distribution over images t makes only minimal use of latent variables c. This me ns that , despite th use of higher capacity model , classific tion accuracy i much poorer ( 66 % ) than that achieved using a deconvolutional architecture . For the same reason , c nditional samples display an improved sharpness but a e no longer identifiable to the cue images on w ich they were c ditioned ( Figure 4 ) . Our careful traini g s ggests that this is not an optimisation difficulty but is c re t the objective , as discussed in Chen et al . ( 2016 ) . By contrast , a VHE is able to gain a large benefit from the hierarchical PixelCNN architecture , with a 3-fold r - duction in classification error ( 5-shot curacy 98.8 % ) and conditional samples which are simultan ously sh p and identifiable ( Figure 4 ) . This improvement is in part achieved by increased utilisation of th latent space , due to rescaling of the KL diverge ce term in the obj ctiv . However , our results show that this common technique is insufficient when used alone , leading to overfitting to cue images with an equally s vere imp irment of classification performance ( curacy 62.8 % ) . R ther , we find that KL-rescaling and d ta resampling must be us d together in order for the ben fit of th p w rful PixelCNN architecture to be re lised . Table 2 lists the classification accuracy achieved by VHEs with both |D| = 1 and |D| = 5 , as compared to existing deep learning approaches . We fi d that bot networks are not only state-of-the-art amongst deep gen erative models , but also competitive against the best discriminative models trained directly for few-shot classification . Unlike these discriminativ mod ls , a VHE is also able to generate new images of a character in one shot , producing samples which are both realistic and faithful to the class of t e c e image ( Figure 5 ) . As our goal is to model shared structure acros images , we evaluate gener tiv performance using joint l g lik - Figure 5 : One-shot same-class samples generated by our mod l. Cue images were sampl d from previously un- seen classes . lihood of the e tire Omniglot test s t ( ather than separately acro s images ) . From this persp ctive , a single elment VAE will perfor poorly as it treats all datapoint as independent , optimising a sum over log likelihoods for each le e t. By sh ring lat nts across elements of the same class , a VHE can i prove upon this considerably . For likeli ood evaluation , our m st appropriate co paris i with G erative Matching N tworks ( Bartu ov & Vetrov , 2016 ) a they also model depend ncies within a clas . Thus , we trained models under the sa e train/test split as them , with no ata augmentatio . We eval at the joint log likel hood f full charact r class s from the t st set , normal s d by th numb of elem nts , sing importanc weighting with k=500 samples from q ( c ; X ) . As can be seen in Tables 3 d 4 , our hier rchical PixelCNN architecture is ble to a i ve state-of-the-art log likelihood results only wh train d usi g the VHE obj ctiv . Figure 4 : 5-s ot samples g nerated by each del ( mor in Supplem n ) . With a PixelCNN architecture , both Neural Statistician and Resample objectives le d to und rutilisatio of the latent spac , producing nfaithful samples . For the hiera chical PixelCNN architecture , however , significant differences ari e betwee training objectives . In this case , a Neural Statistician learns a strong global distribution over images but makes only minimal use of latent variabl s c. This means that , despite the use of a higher capacity model , lassification accuracy is much poorer ( 66 % ) than that achieved using a deconvolutional archite ture . For the same reason , conditional samples display an improv d sharpness but are no longer identifiable to the cue images on which they were conditioned ( Figure 4 ) . O r careful training suggests that this is not an optimisation difficulty but is core to the objective , as discussed in Chen et al . ( 2016 ) . By contrast , a VHE is able to gain a large benefit from t e hierarchical PixelCNN architecture , with a 3-fold reduction in classification error ( 5-shot accuracy 98.8 % ) and conditional samples which are sim ltaneously harp and dentifiabl ( Figure 4 ) . This i provement is in part achieved by increased utilisation of the latent space , due to r scaling of the KL divergence term in the objective . However , our results show that this common technique is insufficient when used alone , leading to overfitting to cu images with an equally severe impairment of classificati n performance ( accuracy 62.8 % ) . Rather , we find that KL-rescaling and data resa pling must be used together in order for the benefit f the powerful PixelCNN architecture to be realised . Table 2 lists the classification accuracy achieved by VHEs with both |D| = 1 and |D| = 5 , as compared t existing deep learning approaches . We find that both netwo ks are not only state-of-the-art amongst deep genera models , but al o competitive against the best discri inative models trained directly for few-shot classification . Unlike these discri inative models , a VHE is also able to ge erate ew images of a character in one shot , pr ducing samples which are both realistic and faithful to the class of the cue image ( Figure 5 ) . As our goal is t model shared structure across images , w eval at ge erative p rformance using joint log like- Figure 5 : One-shot same-class samples generated by our odel . Cue images were sampled from previously un- seen classes . lihood of the ntire Omniglot test set ( rather than separately across im ges ) . From this perspective , a single element VAE will perf rm poorly as it treats all datapoints as independent , optimi ing a sum over log likelihoods for each element . By sharing latents across elements of the same class , a VHE can im rove upon this considerably . For likelihood evaluation , our most appropriate comparison is with Genera ive Matching Networks ( Bartunov & Vetrov , 2016 ) as they also model dependencies within a class . Thus , we trained mo els under the same train/test split as them , with no data augmentation . We evaluate the join log likeliho d of full character classes from the test set , nor alised by the number of eleme ts , using importance weighting with k=500 sa ples from q ( c ; X ) . As ca be seen in Tables 3 and 4 , our hierarchical PixelCNN architecture is ab e to achieve state-of-the-art log likelihood r sults only when trai ed usi g the VHE objective . Figure 4 : 5-shot samples g nerated by each model ( or in Supplement ) . With PixelCNN architect e , both Neural Statistician and R sample objectiv lead to underutilis tion of th latent space , produci g unfaithful samples . For the hierarchical PixelCNN archit cture , however , signifi ant d fferences arise between train ng objectives . In this case , a Neural Stati tician learns strong g obal dist ibution over images but akes only mini l u e of atent var ables c. This me ns that , d spite the use of a higher capa ity mod l , l ssificati n accuracy is much poorer ( 66 % ) than that achieved using a deconvol tional architecture . For the same reas n , conditional amples display an improved sh rp ess but are no longer identifiable to the cue imag s on which they were conditioned ( Figure 4 ) . Our careful training suggests that this is not an optimisation d fficulty bu is core to the objective , as dis ussed in Chen et al . ( 2016 ) . By contrast , a VHE s ab e to gai a la ge benefit from the h erarchical PixelCNN architecture , with a 3-fold - duction in classifica error ( 5-sho accuracy 98.8 % ) and conditional s mples which are imultaneously sharp and identifiable ( F gure 4 ) . This improve ent is in part achi ved by increased utilisat o of th latent spac , due to rescaling of th KL divergence term in the obj ctive . However , our results show that this common technique is insuffici nt wh n used alo e , l ading to overfitting to cue images with an equ lly sev re impairment of classification performan e ( accuracy 62.8 % ) . Rather , we find that KL-rescaling nd data resampli g ust be used together in order for t benefit of the pow rful PixelCNN architectur to be ealised . Tabl 2 li ts the cl ssification ac uracy chieved by VHEs with both |D| = 1 and |D| = 5 , as compared to existi g dee learn ng approaches . We find that both netw rks are not only state-of-the-art amo gst de p generative models , but also competitive gain t the best discriminative o els trained directly for few-shot classification . Unlike these discrimina ive odels , a VHE is also abl to generat new images of a character in one shot , producing samples which are both realistic nd faithful to the class of the cue im ge ( Figure 5 ) . As ur goa is to odel sh red structure across images , w valuate generative performance using joint log like- Figure 5 : One-shot same-class samples generated by our model . Cue images were sampled fro previously un- seen lasses . lihood of the entire Omniglot tes set ( rather han separa ly across i ages ) . From this per pective , a single element VAE will perform poorly as it treats all dat points as independent , optimising a sum over log likelihoods for each eleme t. By sharing latents across el m t of the same class , a VHE can improve upon this considerably . F r likelih od evaluation , our most appropriate c mpariso is with Generative Matching Netw rks ( Bartunov & Vetrov , 2016 ) as th y also model dependencies within a class . Thus , we traine odels under the same train/test spl s them , with no data augment tion . W evaluate the joint log like ihood of ful character classe from the test s t , nor ali ed by h number of eleme ts , using imporance weighting with k=500 samples fro q ( c ; X ) . As can be seen in Tables 3 and 4 , our h rarchical PixelCNN archit cture is able to a hiev state-of-the-art log likelihood results only when t ained using the VHE objective . ( b ) VHE Figure A13 : New exemplars produced by the Sequential Gen rative ( SG ) model [ 43 ] and the Vari tional Homoencoder ( VHE ) [ 21 ] . ( a ) The SG model shows far too much variability , drawing what is clearly the wrong character in many cases ( e.g . right-most column ) . ( b ) The VHE character samples are often incomplete , missing important strok s of the target class . 19 Published as a conference paper at ICLR 2021 | Motivated by few-shot learning challenges such as Omniglot, the authors propose a human-like model for learning how to draw visual concepts that consists of three components: (1) a location model for picking the starting point of the next stroke given the current "canvas", (2) a stroke model that continues an existing stroke, (3) a termination model that decides when to stop drawing. The three components of this model are trained on example glyphs that are heuristically parsed into strokes. The authors evaluate performance of this method, called GNS (Generative Neuro-Symbolic) versus more classical program learning approaches based on pre-existing libraries of subroutines and more generic deep neural network architectures. This approach (1) represents an advance over methods based on pre-defined subroutines in the sense that primitives such as "draw a stroke intersecting an existing stroke" are learned rather than supplied by the programmer and (2) performs much better at few-shot learning of glyphs than generic approaches. | SP:c9481aa3660d329ae9727810687f68930d1f2d5e |
Undistillable: Making A Nasty Teacher That CANNOT teach students | 1 INTRODUCTION . Knowledge Distillation ( KD ) ( Hinton et al. , 2015 ) aims to transfer useful knowledge from a teacher neural network to a student network by imitating the input-output behaviors . The student model imitates logit outputs or activation maps from the teacher by optimizing a distillation loss . The efficacy of leveraging teacher knowledge to boost student performance has been justified in many application fields ( Wang et al. , 2019 ; Liu et al. , 2019 ; Chen et al. , 2020b ; a ) , yielding high performance and often lighter-weight student models . Typically KD requires learning the student model over the same training set used to train the teacher . However , recent studies ( Lopes et al. , 2017 ; Chen et al. , 2019 ) have demonstrated the feasibility of the data-free knowledge distillation , in which the knowledge is transferred from the teacher to the student without accessing the same training data . This is possible because the training data are implicitly encoded in the trained weights of deep neural nets . The data-free knowledge distillation is able to inversely decode and re-synthesize the training data from the weights , and then clone the input-output mapping of the teacher network . With many practical benefits brought by the KD technique , this paper looks at KD ’ s unwanted severe side effect , that it might pose risks to the machine learning intellectual property ( IP ) protection . Many machine learning models will be only released as executable software or APIs , without opensourcing model configuration files or codes , e.g. , as “ black boxes ” . That can be due to multifold reasons , such as ( 1 ) those advanced models might take huge efforts and resources for the model owners to develop , who would need to keep this technical barrier ; or ( 2 ) those trained models have involved protected training data or other information , that are legally or ethically prohibited to be openly shared . However , KD techniques might open a loophole to unauthorized infringers to clone the IP model ’ s functionality , by simply imitating the black box ’ s input and output behaviors ( leaked knowledge ) . The feasibility of data-free KD ( Chen et al. , 2019 ; Yin et al. , 2020 ) eliminates the necessity of accessing original training data , therefore making this cloning more practically feasible . Even worse , those techniques point to reverse-engineering ways ( Yin et al. , 2020 ) to recover the ( potentially private ) training data from black-box models , threatening the owners ’ data privacy and security ( Yonetani et al. , 2017 ; Wu et al. , 2018 ) . To alleviate the issue , this paper introduces a defensive approach for model owners , called Nasty Teacher . A nasty teacher is a specially trained network that yields nearly the same performance as a normal one ; but if used as a teacher model , it will significantly degrade the performance of student models that try to imitate it . In general , the concept of nasty teacher is related to the backdoor attack on deep learning systems ( Chen et al. , 2017 ) , which creates a model to fit “ adversarial ” goals in an “ imperceptible ” way . However , while backdoor attacks aim to manipulate or damage the performance of the poisoned model itself when triggered by specific inputs , the goal of the nasty teacher is to undermine the performance of any student network derived from it . The primary objective of constructing a nasty teacher is for model protection - a novel motivation and setting that have not been explored before . Our contributions are summarized as follows : • We introduce the novel concept of Nasty Teacher , a defensive approach to prevent knowledge leaking and unauthorized model cloning through KD without sacrificing performance . We consider it a promising first step towards machine learning IP and privacy protection . • We propose a simple yet efficient algorithm , called self-undermining knowledge distillation , to directly build a nasty teacher through self-training , requiring no additional dataset nor auxiliary network . Specifically , the model is optimized by maximizing the difference between the nasty teacher ( the desired one ) and a normally trained counterpart . • We conduct extensive experiments on both standard KD and data-free KD approaches , and demonstrate that nasty teacher trained by self-undermining KD can achieve nearly the same accuracy as their original counterpart ( less than 1 % accuracy gap ) , while the student model learned from it will degrade accuracy by up to over 10 % or even diverge during training . 2 RELATED WORK . 2.1 KNOWLEDGE DISTILLATION . Knowledge distillation aims to boost the performance of light-weight models ( students ) under the guidance of well-trained complicated networks ( teachers ) . It is firstly introduced in ( Hinton et al. , 2015 ) , where the student directly mimics the soft probabilities output produced by the well pretrained teacher . The following researchers explore the knowledge transferal from either intermediate features ( Romero et al. , 2014 ; Zagoruyko & Komodakis , 2016 ; Passalis & Tefas , 2018 ; Ahn et al. , 2019 ; Li et al. , 2020 ) , or logit responses ( Park et al. , 2019 ; Mirzadeh et al. , 2019 ; Chen et al. , 2021a ; b ; Ma et al. , 2021 ) . Recent studies have also shown that , instead of distilling from a complicated teacher , the student networks can even be boosted by learning from its own pre-trained version ( Furlanello et al. , 2018 ; Zhang et al. , 2019 ; Yun et al. , 2020 ; Yuan et al. , 2020 ) . Several recent works also focus on data-free knowledge distillation , under which settings students are not able to access the data used to train teachers . In ( Lopes et al. , 2017 ) , the author attempts to reconstruct input data by exploring encoded meta-data lying in the pre-trained teacher network . In the following work , the author of ( Chen et al. , 2019 ) proposes a learning scheme , called “ Data-Free Learning ” ( DAFL ) , which treats the teacher as a fixed discriminator , and jointly trains a generator to synthesize training examples so that maximum responses could be obtained on the discriminator . The latest work “ DeepInversion ” ( Yin et al. , 2020 ) directly synthesizes input images given random noise by ” inverting ” a trained network . Specifically , their method optimizes the input random noise into high-fidelity images with a fixed pre-trained network ( teacher ) . 2.2 POISONING ATTACK ON NEURAL NETWORK . The typical goal of poisoning attack is to degrade the accuracy of models by injecting poisoned data into training set ( Xiao et al. , 2015 ; Moosavi-Dezfooli et al. , 2016 ) . On the contrary , backdoor attack intends to open a loophole ( usually unperceived ) to the model via inserting well-crafted malicious data into training set ( Chen et al. , 2017 ; Gu et al. , 2017 ; Kurita et al. , 2020 ) . The goal of back- door attack is to make the poisoned model perform normally well for most of the time , yet failing specifically when attacker-triggered signals are given . Our proposed self-undermining knowledge distillation aims to create a special teacher model ( i.e. , an undistillable model ) , which normally performs by itself but “ triggers to fail ” only when being mimiced through KD . The motivation looks similar to backdoor attack ’ s at the first glance , but differs in the following aspects . Firstly , the backdoor attack can only be triggered by pre-defined patterns , while our nasty teachers target at degrading any arbitrary student network through KD . Secondly , backdoor attack tends to poison the model itself , while our nasty teacher aims to undermine other student networks while preservingits own performance . Thirdly , our goal is to prevent knowledge leaking in order to protect released IP , as a defensive point of view , while the backdoor attack tends to break down the system by triggering attacking signals , as an attacking point of view . 2.3 PROTECTION OF MODEL IP . Due to the commercial value , IP protection for deep networks has drawn increasing interests from both academia and industry . Previous methods usually rely on watermark-based ( Uchida et al. , 2017 ; Zhang et al. , 2020a ) or passport-based ( Fan et al. , 2019 ; Zhang et al. , 2020b ) ownership verification methods to protect the IP . Nevertheless , these methods can only detect IP infringement but remain ineffective to avoid model cloning . A few recent works also explore defensive methods against model stealing ( Kariyappa & Qureshi , 2020 ; Juuti et al. , 2019 ; Orekondy et al. , 2020 ) . Typically , they assume attackers obtain pseudolabels on their own synthetic data or surrogate data by querying the black-box model , and train a network on the new dataset to clone the model . However , none of these defense approaches have explored the KD-based model stealing , which is rather a practical threat . 3 METHODOLOGY . 3.1 REVISITING KNOWLEDGE DISTILLATION . Knowledge distillation ( Hinton et al. , 2015 ) helps the training process of ” student ” networks by distilling knowledge from one or multiple well-trained “ teacher ” networks . The key idea is to leverage soft probabilities output of teacher networks , of which incorrect-class assignments reveal the way how teacher networks generalize from previous training . By mimicking probabilities output , student networks are able to imbibe the knowledge that teacher networks have discovered before , and the performance of student networks is usually better than those being trained with labels only . In what follows , we formally formulate the learning process of knowledge distillation . Given a pre-trained teacher network fθT ( · ) and a student network fθS ( · ) , where θT and θS denote the network parameters , the goal of knowledge distillation is to force the output probabilities of fθS ( · ) to be close to that of fθT ( · ) . Let ( xi , yi ) denote a training sample in dataset X and pfθ ( xi ) indicate the logit response of xi from fθ ( · ) , the student network fθS could be learned by the following : min θS ∑ ( xi , yi ) ∈X ατ2sKL ( στs ( pfθT ( xi ) ) , στs ( pfθS ( xi ) ) ) + ( 1− α ) XE ( σ ( pfθS ( xi ) ) , yi ) , ( 1 ) where KL ( · , · ) and XE ( · , · ) are Kullback-Leibler divergence ( K-L divergence ) and cross-entropy loss , respectively . The introduced “ softmax temperature ” function στs ( · ) ( Hinton et al. , 2015 ) produces soft probabilities output when a large temperature τs ( usually greater than 1 ) is picked , and it decays to normal softmax function σ ( · ) when τs equals 1 . Another hyper-parameter α is also introduced to balance between knowledge distillation and cost minimization . 3.2 TRAINING NASTY TEACHERS : RATIONALE AND IMPLEMENTATION . Rationale The goal of nasty teacher training endeavors to create a special teacher network , of which performance is nearly the same as its normal counterpart , that any arbitrary student networks can not distill knowledge from it . To this end , we propose a simple yet effective algorithm , dubbed Self-Undermining Knowledge Distillation , while maintaining its correct class assignments , maximally disturbing its in-correct class assignments so that no beneficial information could be distilled from it , as described next . Let fθT ( · ) and fθA ( · ) denote the desired nasty teacher and its adversarial learning counterpart , the self-undermining training aims to maximize the K-L divergence between the adversarial network and the nasty teacher one , so that a false sense of generalization could be output from the nasty teacher . The learning process of the nasty teacher could be formulated as follows , min θT ∑ ( xi , yi ) ∈X XE ( σ ( pfθT ( xi ) ) , yi ) − ωτ 2 AKL ( στA ( pfθT ( xi ) ) , στA ( pfθA ( xi ) ) ) , ( 2 ) where the former term aims to maintain the accuracy of the nasty teacher by minimizing the cross entropy loss , and the latter term achieves the “ undistillability ” by maximizing KL divergence between the nasty teacher and the adversarial one . Similarly in equation 1 , τA denotes the temperature for self-undermining , and ω balances the behavior between normal training and adversarial learning . Implementation We naturally choose the same network architecture for fθT ( · ) and fθA ( · ) ( yet different group of network parameters ) since no additional assumption on network architecture is made here . We provide a throughout study with respect to the selection of architectures in 4.3 , revealing how the architecture of fθA ( · ) influences the adversarial training . As for the update rule , the parameter of fθA ( · ) is typically normally pre-trained in advance and fixed during adversarial training , and only the parameter of fθT ( · ) is updated . Note that the selected temperature τA does not to be necessary the same as τs in equation 1 , and we provide a comprehensive study with respect to τs in 4.3 . Once upon finishing adversarial training , the nasty teacher fθT ( · ) could be released within defense of KD-based model stealing . | This paper explores an interesting and novel research problem: how to make a teacher model undistillable. This can be a promising countermeasure to model extraction/stealing. The proposed Nasty Teacher approach is a two stage method, which first trains a good teacher network, then utilizes a self-undermining KD strategy to further distill the good teacher network to a bad one. Overall, this Nasty Teacher approach can reduce the performance of the student network by ~5% in most cases. Although the performance decrease is not huge, the proposed approach is promising and can be a very useful baseline for this new research direction. A set of ablation and understanding experiments have also been conducted to support the effectiveness of Nasty Teacher. | SP:81eb96286ff437475310246667130918695e12b6 |
Undistillable: Making A Nasty Teacher That CANNOT teach students | 1 INTRODUCTION . Knowledge Distillation ( KD ) ( Hinton et al. , 2015 ) aims to transfer useful knowledge from a teacher neural network to a student network by imitating the input-output behaviors . The student model imitates logit outputs or activation maps from the teacher by optimizing a distillation loss . The efficacy of leveraging teacher knowledge to boost student performance has been justified in many application fields ( Wang et al. , 2019 ; Liu et al. , 2019 ; Chen et al. , 2020b ; a ) , yielding high performance and often lighter-weight student models . Typically KD requires learning the student model over the same training set used to train the teacher . However , recent studies ( Lopes et al. , 2017 ; Chen et al. , 2019 ) have demonstrated the feasibility of the data-free knowledge distillation , in which the knowledge is transferred from the teacher to the student without accessing the same training data . This is possible because the training data are implicitly encoded in the trained weights of deep neural nets . The data-free knowledge distillation is able to inversely decode and re-synthesize the training data from the weights , and then clone the input-output mapping of the teacher network . With many practical benefits brought by the KD technique , this paper looks at KD ’ s unwanted severe side effect , that it might pose risks to the machine learning intellectual property ( IP ) protection . Many machine learning models will be only released as executable software or APIs , without opensourcing model configuration files or codes , e.g. , as “ black boxes ” . That can be due to multifold reasons , such as ( 1 ) those advanced models might take huge efforts and resources for the model owners to develop , who would need to keep this technical barrier ; or ( 2 ) those trained models have involved protected training data or other information , that are legally or ethically prohibited to be openly shared . However , KD techniques might open a loophole to unauthorized infringers to clone the IP model ’ s functionality , by simply imitating the black box ’ s input and output behaviors ( leaked knowledge ) . The feasibility of data-free KD ( Chen et al. , 2019 ; Yin et al. , 2020 ) eliminates the necessity of accessing original training data , therefore making this cloning more practically feasible . Even worse , those techniques point to reverse-engineering ways ( Yin et al. , 2020 ) to recover the ( potentially private ) training data from black-box models , threatening the owners ’ data privacy and security ( Yonetani et al. , 2017 ; Wu et al. , 2018 ) . To alleviate the issue , this paper introduces a defensive approach for model owners , called Nasty Teacher . A nasty teacher is a specially trained network that yields nearly the same performance as a normal one ; but if used as a teacher model , it will significantly degrade the performance of student models that try to imitate it . In general , the concept of nasty teacher is related to the backdoor attack on deep learning systems ( Chen et al. , 2017 ) , which creates a model to fit “ adversarial ” goals in an “ imperceptible ” way . However , while backdoor attacks aim to manipulate or damage the performance of the poisoned model itself when triggered by specific inputs , the goal of the nasty teacher is to undermine the performance of any student network derived from it . The primary objective of constructing a nasty teacher is for model protection - a novel motivation and setting that have not been explored before . Our contributions are summarized as follows : • We introduce the novel concept of Nasty Teacher , a defensive approach to prevent knowledge leaking and unauthorized model cloning through KD without sacrificing performance . We consider it a promising first step towards machine learning IP and privacy protection . • We propose a simple yet efficient algorithm , called self-undermining knowledge distillation , to directly build a nasty teacher through self-training , requiring no additional dataset nor auxiliary network . Specifically , the model is optimized by maximizing the difference between the nasty teacher ( the desired one ) and a normally trained counterpart . • We conduct extensive experiments on both standard KD and data-free KD approaches , and demonstrate that nasty teacher trained by self-undermining KD can achieve nearly the same accuracy as their original counterpart ( less than 1 % accuracy gap ) , while the student model learned from it will degrade accuracy by up to over 10 % or even diverge during training . 2 RELATED WORK . 2.1 KNOWLEDGE DISTILLATION . Knowledge distillation aims to boost the performance of light-weight models ( students ) under the guidance of well-trained complicated networks ( teachers ) . It is firstly introduced in ( Hinton et al. , 2015 ) , where the student directly mimics the soft probabilities output produced by the well pretrained teacher . The following researchers explore the knowledge transferal from either intermediate features ( Romero et al. , 2014 ; Zagoruyko & Komodakis , 2016 ; Passalis & Tefas , 2018 ; Ahn et al. , 2019 ; Li et al. , 2020 ) , or logit responses ( Park et al. , 2019 ; Mirzadeh et al. , 2019 ; Chen et al. , 2021a ; b ; Ma et al. , 2021 ) . Recent studies have also shown that , instead of distilling from a complicated teacher , the student networks can even be boosted by learning from its own pre-trained version ( Furlanello et al. , 2018 ; Zhang et al. , 2019 ; Yun et al. , 2020 ; Yuan et al. , 2020 ) . Several recent works also focus on data-free knowledge distillation , under which settings students are not able to access the data used to train teachers . In ( Lopes et al. , 2017 ) , the author attempts to reconstruct input data by exploring encoded meta-data lying in the pre-trained teacher network . In the following work , the author of ( Chen et al. , 2019 ) proposes a learning scheme , called “ Data-Free Learning ” ( DAFL ) , which treats the teacher as a fixed discriminator , and jointly trains a generator to synthesize training examples so that maximum responses could be obtained on the discriminator . The latest work “ DeepInversion ” ( Yin et al. , 2020 ) directly synthesizes input images given random noise by ” inverting ” a trained network . Specifically , their method optimizes the input random noise into high-fidelity images with a fixed pre-trained network ( teacher ) . 2.2 POISONING ATTACK ON NEURAL NETWORK . The typical goal of poisoning attack is to degrade the accuracy of models by injecting poisoned data into training set ( Xiao et al. , 2015 ; Moosavi-Dezfooli et al. , 2016 ) . On the contrary , backdoor attack intends to open a loophole ( usually unperceived ) to the model via inserting well-crafted malicious data into training set ( Chen et al. , 2017 ; Gu et al. , 2017 ; Kurita et al. , 2020 ) . The goal of back- door attack is to make the poisoned model perform normally well for most of the time , yet failing specifically when attacker-triggered signals are given . Our proposed self-undermining knowledge distillation aims to create a special teacher model ( i.e. , an undistillable model ) , which normally performs by itself but “ triggers to fail ” only when being mimiced through KD . The motivation looks similar to backdoor attack ’ s at the first glance , but differs in the following aspects . Firstly , the backdoor attack can only be triggered by pre-defined patterns , while our nasty teachers target at degrading any arbitrary student network through KD . Secondly , backdoor attack tends to poison the model itself , while our nasty teacher aims to undermine other student networks while preservingits own performance . Thirdly , our goal is to prevent knowledge leaking in order to protect released IP , as a defensive point of view , while the backdoor attack tends to break down the system by triggering attacking signals , as an attacking point of view . 2.3 PROTECTION OF MODEL IP . Due to the commercial value , IP protection for deep networks has drawn increasing interests from both academia and industry . Previous methods usually rely on watermark-based ( Uchida et al. , 2017 ; Zhang et al. , 2020a ) or passport-based ( Fan et al. , 2019 ; Zhang et al. , 2020b ) ownership verification methods to protect the IP . Nevertheless , these methods can only detect IP infringement but remain ineffective to avoid model cloning . A few recent works also explore defensive methods against model stealing ( Kariyappa & Qureshi , 2020 ; Juuti et al. , 2019 ; Orekondy et al. , 2020 ) . Typically , they assume attackers obtain pseudolabels on their own synthetic data or surrogate data by querying the black-box model , and train a network on the new dataset to clone the model . However , none of these defense approaches have explored the KD-based model stealing , which is rather a practical threat . 3 METHODOLOGY . 3.1 REVISITING KNOWLEDGE DISTILLATION . Knowledge distillation ( Hinton et al. , 2015 ) helps the training process of ” student ” networks by distilling knowledge from one or multiple well-trained “ teacher ” networks . The key idea is to leverage soft probabilities output of teacher networks , of which incorrect-class assignments reveal the way how teacher networks generalize from previous training . By mimicking probabilities output , student networks are able to imbibe the knowledge that teacher networks have discovered before , and the performance of student networks is usually better than those being trained with labels only . In what follows , we formally formulate the learning process of knowledge distillation . Given a pre-trained teacher network fθT ( · ) and a student network fθS ( · ) , where θT and θS denote the network parameters , the goal of knowledge distillation is to force the output probabilities of fθS ( · ) to be close to that of fθT ( · ) . Let ( xi , yi ) denote a training sample in dataset X and pfθ ( xi ) indicate the logit response of xi from fθ ( · ) , the student network fθS could be learned by the following : min θS ∑ ( xi , yi ) ∈X ατ2sKL ( στs ( pfθT ( xi ) ) , στs ( pfθS ( xi ) ) ) + ( 1− α ) XE ( σ ( pfθS ( xi ) ) , yi ) , ( 1 ) where KL ( · , · ) and XE ( · , · ) are Kullback-Leibler divergence ( K-L divergence ) and cross-entropy loss , respectively . The introduced “ softmax temperature ” function στs ( · ) ( Hinton et al. , 2015 ) produces soft probabilities output when a large temperature τs ( usually greater than 1 ) is picked , and it decays to normal softmax function σ ( · ) when τs equals 1 . Another hyper-parameter α is also introduced to balance between knowledge distillation and cost minimization . 3.2 TRAINING NASTY TEACHERS : RATIONALE AND IMPLEMENTATION . Rationale The goal of nasty teacher training endeavors to create a special teacher network , of which performance is nearly the same as its normal counterpart , that any arbitrary student networks can not distill knowledge from it . To this end , we propose a simple yet effective algorithm , dubbed Self-Undermining Knowledge Distillation , while maintaining its correct class assignments , maximally disturbing its in-correct class assignments so that no beneficial information could be distilled from it , as described next . Let fθT ( · ) and fθA ( · ) denote the desired nasty teacher and its adversarial learning counterpart , the self-undermining training aims to maximize the K-L divergence between the adversarial network and the nasty teacher one , so that a false sense of generalization could be output from the nasty teacher . The learning process of the nasty teacher could be formulated as follows , min θT ∑ ( xi , yi ) ∈X XE ( σ ( pfθT ( xi ) ) , yi ) − ωτ 2 AKL ( στA ( pfθT ( xi ) ) , στA ( pfθA ( xi ) ) ) , ( 2 ) where the former term aims to maintain the accuracy of the nasty teacher by minimizing the cross entropy loss , and the latter term achieves the “ undistillability ” by maximizing KL divergence between the nasty teacher and the adversarial one . Similarly in equation 1 , τA denotes the temperature for self-undermining , and ω balances the behavior between normal training and adversarial learning . Implementation We naturally choose the same network architecture for fθT ( · ) and fθA ( · ) ( yet different group of network parameters ) since no additional assumption on network architecture is made here . We provide a throughout study with respect to the selection of architectures in 4.3 , revealing how the architecture of fθA ( · ) influences the adversarial training . As for the update rule , the parameter of fθA ( · ) is typically normally pre-trained in advance and fixed during adversarial training , and only the parameter of fθT ( · ) is updated . Note that the selected temperature τA does not to be necessary the same as τs in equation 1 , and we provide a comprehensive study with respect to τs in 4.3 . Once upon finishing adversarial training , the nasty teacher fθT ( · ) could be released within defense of KD-based model stealing . | This paper’s main idea is refreshing and attractive: proposing a defensive method called nasty teacher, to avoid knowledge leaking or cloning through KD. A nasty teacher model is a specially trained network that yields nearly the same performance itself, while significantly degrading the performance of student models learned by imitating it. The standing point for machine learning IP protection is novel and hasn’t seen many discussions before. The introduction section motivated the study clearly and nicely. The method and experiments demonstrate a promising first step towards protecting machine learning IPs. | SP:81eb96286ff437475310246667130918695e12b6 |
Predicting What You Already Know Helps: Provable Self-Supervised Learning | 1 Introduction . Self-supervised learning revitalizes machine learning models in computer vision , NLP , and control problems ( see reference therein [ 36 , 38 , 15 , 63 , 35 ] ) . Training a model with auxiliary tasks based only on input features reduces the extensive costs of data collection and semantic annotations for downstream tasks . It is also known to improve the adversarial robustness of models [ 29 , 11 , 12 ] . Self-supervised learning creates pseudo labels solely based on input features , and solves auxiliary prediction tasks ( or pretext tasks ) in a supervised manner . However , the underlying principles of self-supervised learning are mysterious since it is a-priori unclear why predicting what we already know should help . We thus raise the following question : What conceptual connection between pretext and downstream tasks ensures good representations ? What is a good way to quantify this ? As a thought experiment , consider a simple downstream task of classifying desert , forest , and sea images . A meaningful pretext task is to predict the background color of images ( known as image colorization [ 66 ] ) . Denote X1 , X2 , Y to be the input image , color channel , and the downstream label respectively . Given knowledge of the label Y , one can possibly predict the background X2 without knowing much about X1 . In other words , X2 is approximately independent of X1 conditional on the label Y . Consider another task of inpainting [ 48 ] the front of a building ( X2 ) from the rest ( X1 ) . While knowing the label “ building ” ( Y ) is not sufficient for successful inpainting , adding additional latent variables Z such as architectural style , location , window positions , etc . will ensure that variation in X2 given Y , Z is small . We can mathematically interpret this as X1 being approximate conditionally independent of X2 given Y , Z . The main insight that we exploit in this work is that with approximate conditional independence ( as in the above examples ) , a method that predicts X2 from X1 will inadvertently implicitly encode and 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . learn to predict Y ( and Z ) from X1 as an intermediate step , and then predict X2 from Y 1 . Building upon this insight , we make the following contributions . Contributions . The goal of this paper , as in statistical learning theory , is to investigate the statistical connections between the random variables of input features ( in this paper ( X1 , X2 ) ) and downstream labels Y , and show how specific connections can guarantee a successful learning procedure . For self-supervised learning ( SSL ) , success is measured using the following 2 notions , 1 ) expressivity , i.e . does the learned representation from SSL have the ability to express the ground truth prediction function for labels Y , and 2 ) sample complexity , i.e . can it do so with way fewer labeled samples than what would be required without SSL . In this work , we show such guarantees for a class of reconstruction-based SSL methods under a statistical assumption of approximate conditional independence ( ACI ) . In particular we show that under such an assumption , the learned representation from SSL will end up having the following properties , 1 ) it can express the ground truth label as a linear function , thus guaranteeing expressivity , and 2 ) will also end up being low-rank ( or low-dimensional ) , thus guaranteeing smaller labeled sample complexity . Note that such an expressive and sample efficient ( summarized as good ) representation is often not a-priori available . For instance , the original input features themselves may not be able to express the ground truth function linearly , while kernel methods with a fixed kernel , while expressive , may not be sample efficient for many problems of interest . The strategy in modern machine learning is to find such a good representation as the output of a complicated neural network . The benefit of SSL , as we formally show here , is that the complicated but good representation function can be learned using just unlabeled data , so that labeled data is just needed to learn a linear function . The reconstruction-based SSL method ( differentiated from other SSL methods in Section 1.1 ) we consider is strongly motivated by empirical works [ 66 , 48 , 15 , 25 ] , but is a simplification that captures the essence of the problem and is amenable to a precise theoretical analysis . We consider a two-staged pipeline , where we first learn a representation function ψ ( e.g . output of a neural network ) from input X1 and pretext target X2 using unlabeled data by minimizing E ( X1 , X2 ) [ ∥X2 − ψ ( X1 ) ∥2 ] . In the second stage of downstream task , we learn a linear layer on top of representation ψ using labeled samples ( X1 , Y ) , thus restricting to learning from a significantly smaller hypothesis class of Hψ = { f : X1 → Y |f is linear in ψ } . The key non-trivial question of expressivity is now whether the ground truth predictor f∗ ≡ E [ Y |X1 ] can be approximated well by this classHψ , and the question of sample complexity reduces to the understanding the sample complexity of learning Hψ . Under appropriate statistical connections2 between input data X1 , X2 and target Y , we prove both the desired properties , expressivity and low sample complexity , for the aforementioned SSL method . Our statistical assumption based on approximate conditional independence ( ACI ) helps us demonstrate how solving pretext tasks created from known information can learn useful representations . Specifically , we show that once the complicated representation function ψ is learned using an abundance of unlabeled data in the SSL stage , not only is ψ expressive enough , but it will also require only Õ ( k ) labeled samples to solve a k-way supervised learning task under exact conditional independence ( CI ) . In contrast , solving the downstream task without any pretraining will require a lot of labeled data to learn the representation function from scratch . Since the strong exact conditional independence assumption will likely not be satisfied in practice , our main contribution is to derive similar risk bounds when only approximate CI ( ACI ) is satisfied . We quantify the notion of ACI using the norm of a certain partial covariance matrix ( Definition 4.1 ) and our risk bound scales linearly with it . We verify this and other aspects of our main Theorem 4.2 using simulations and also find that pretext task helps when CI is approximately enforced in text domain . We further demonstrate on a real-world image dataset that a pretext task-based linear model performs at least as well as many baselines . 1.1 Related work . Self-supervised learning ( SSL ) methods in practice : There has been a flurry of self-supervised methods lately . One class of methods reconstruct images from corrupted or incomplete versions of it , like denoising auto-encoders [ 61 ] , image inpainting [ 48 ] , and split-brain autoencoder [ 67 ] . Pretext 1This is formally demonstrated in the proof sketch of Lemma 3.1 . 2We note that since the representation ψ is the result of the SSL method and not something we have access to a-priory , we can not make any direct assumptions on it . tasks are also created using visual common sense , including predicting rotation angle [ 22 ] , relative patch position [ 16 ] , recovering color channels [ 66 ] , solving jigsaw puzzle games [ 45 ] , and discriminating images created from distortion [ 17 ] . We refer to the above procedures as reconstruction-based SSL . Another popular paradigm is contrastive learning [ 13 , 14 ] . The idea is to learn representations that bring similar data points closer while pushing randomly selected points further away [ 63 , 39 , 5 ] or to maximize a contrastive-based mutual information lower bound between different views [ 30 , 46 , 54 ] . A popular approach for text domain is based on language modeling where models like BERT and GPT create auxiliary tasks for next word predictions [ 15 , 49 ] . The natural ordering or topology of data is also exploited in video-based [ 64 , 43 , 19 ] , graph-based [ 65 , 33 ] or map-based [ 68 ] SSL . For instance , the pretext task is to determine the correct temporal order for video frames as in [ 43 ] . Theory for SSL : While we theoretically study reconstruction-based SSL , prior work has different flavors of theoretical results for different kinds of SSL methods . Most relevant are the guarantees for representation learning using SSL methods on downstream tasks that just learn a linear classifier on top of the learned representations . [ 5 ] shows guarantees for representations from a contrastive learning objective : Lcont1 ( ψ ) = E ( X1 , X2 ) , X′2 [ log ( 1 + e −ψ ( X1 ) ⊤ψ ( X2 ) +ψ ( X1 ) ⊤ψ ( X′2 ) ) ] . Under a class conditional independence assumption , i.e . X1 ⊥ X2 | Y , they show that representation ψ that does well on contrastive objective , i.e . Lcont1 ( ψ ) ≤ ϵ , will have O ( ϵ ) linear classification loss on the average binary task involving pairs of classes ( y1 , y2 ) . However , their analysis can not handle the general case of approximate conditional independence . Recently , Tosh et al . [ 56 ] show that contrastive learning representations can linearly recover continuous functions of the underlying topic posterior under a topic modeling assumption for text . While their assumption bears similarity to ours , the assumption of independent sampling of words is strong and does not generalizable to other domains like images . Most relevant is a concurrent work [ 57 ] that shows guarantees for a contrastive learning objective that looks like Lcont2 ( ψ , η ) = E ( X1 , X2 ) , X′2 [ log ( 1 + e−ψ ( X1 ) ⊤η ( X2 ) ) + log ( 1 + eψ ( X1 ) ⊤η ( X′2 ) ) ] , with a multi-view redundancy assumptions that is very similar to our ACI assumption . We take a closer look at their assumption in Section F.2 . All the above objectives are different from the simple reconstruction-based objective we consider : L ( ψ ) = E ( X1 , X2 ) [ ∥X2 − ψ ( X1 ) ∥2 ] . Saunshi et al . [ 51 ] show guarantees for representations learned using language modeling on sentence classification tasks . Some more recent work [ 58 , 44 , 55 , 62 ] provide theoretical understanding on SSL respectively based on causality , mutual information , gradient-descent dynamics , and alignment/uniformity of representations , without explicit risk bounds for downstream tasks . There is a mutual information maximization view of contrastive learning , but [ 59 ] points out issues with it . Previous attempts to explain negative sampling [ 42 ] based methods use the theory of noise contrastive estimation [ 27 , 40 ] to show asymptotic guarantees , without explicit connections to downstream tasks . CI is also used in sufficient dimension reduction [ 21 , 20 ] , while CI and redundancy assumptions on multiple views [ 37 , 2 ] are used to analyze a canonical-correlation based dimension reduction algorithm and also for self-supervised learning algorithms like co-training [ 10 ] . Finally , [ 1 , 60 ] provide a theoretical analysis for denoising auto-encoder . | This paper proposes a mechanism based on approximate conditional independence (ACI) to explain why solving pretext tasks created from known information can learn representations that provably reduce downstream sample complexity, as a sufficient condition. In specific, they measure the downstream performance using the approximation error and estimation error, and establish their initial results under a strict condition -- conditional independence (CI) and linear function space in Section 3, then extend it to ACI and arbitrary function space in Section 4, resulting in the main contribution Theorem 4.2 that clearly quantifies the generalization error. The theorem is also verified in Section 5 using simulations on NLP tasks. | SP:f9ece9e53f7d9bac9c921f1e85c270b826993a5a |
Predicting What You Already Know Helps: Provable Self-Supervised Learning | 1 Introduction . Self-supervised learning revitalizes machine learning models in computer vision , NLP , and control problems ( see reference therein [ 36 , 38 , 15 , 63 , 35 ] ) . Training a model with auxiliary tasks based only on input features reduces the extensive costs of data collection and semantic annotations for downstream tasks . It is also known to improve the adversarial robustness of models [ 29 , 11 , 12 ] . Self-supervised learning creates pseudo labels solely based on input features , and solves auxiliary prediction tasks ( or pretext tasks ) in a supervised manner . However , the underlying principles of self-supervised learning are mysterious since it is a-priori unclear why predicting what we already know should help . We thus raise the following question : What conceptual connection between pretext and downstream tasks ensures good representations ? What is a good way to quantify this ? As a thought experiment , consider a simple downstream task of classifying desert , forest , and sea images . A meaningful pretext task is to predict the background color of images ( known as image colorization [ 66 ] ) . Denote X1 , X2 , Y to be the input image , color channel , and the downstream label respectively . Given knowledge of the label Y , one can possibly predict the background X2 without knowing much about X1 . In other words , X2 is approximately independent of X1 conditional on the label Y . Consider another task of inpainting [ 48 ] the front of a building ( X2 ) from the rest ( X1 ) . While knowing the label “ building ” ( Y ) is not sufficient for successful inpainting , adding additional latent variables Z such as architectural style , location , window positions , etc . will ensure that variation in X2 given Y , Z is small . We can mathematically interpret this as X1 being approximate conditionally independent of X2 given Y , Z . The main insight that we exploit in this work is that with approximate conditional independence ( as in the above examples ) , a method that predicts X2 from X1 will inadvertently implicitly encode and 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . learn to predict Y ( and Z ) from X1 as an intermediate step , and then predict X2 from Y 1 . Building upon this insight , we make the following contributions . Contributions . The goal of this paper , as in statistical learning theory , is to investigate the statistical connections between the random variables of input features ( in this paper ( X1 , X2 ) ) and downstream labels Y , and show how specific connections can guarantee a successful learning procedure . For self-supervised learning ( SSL ) , success is measured using the following 2 notions , 1 ) expressivity , i.e . does the learned representation from SSL have the ability to express the ground truth prediction function for labels Y , and 2 ) sample complexity , i.e . can it do so with way fewer labeled samples than what would be required without SSL . In this work , we show such guarantees for a class of reconstruction-based SSL methods under a statistical assumption of approximate conditional independence ( ACI ) . In particular we show that under such an assumption , the learned representation from SSL will end up having the following properties , 1 ) it can express the ground truth label as a linear function , thus guaranteeing expressivity , and 2 ) will also end up being low-rank ( or low-dimensional ) , thus guaranteeing smaller labeled sample complexity . Note that such an expressive and sample efficient ( summarized as good ) representation is often not a-priori available . For instance , the original input features themselves may not be able to express the ground truth function linearly , while kernel methods with a fixed kernel , while expressive , may not be sample efficient for many problems of interest . The strategy in modern machine learning is to find such a good representation as the output of a complicated neural network . The benefit of SSL , as we formally show here , is that the complicated but good representation function can be learned using just unlabeled data , so that labeled data is just needed to learn a linear function . The reconstruction-based SSL method ( differentiated from other SSL methods in Section 1.1 ) we consider is strongly motivated by empirical works [ 66 , 48 , 15 , 25 ] , but is a simplification that captures the essence of the problem and is amenable to a precise theoretical analysis . We consider a two-staged pipeline , where we first learn a representation function ψ ( e.g . output of a neural network ) from input X1 and pretext target X2 using unlabeled data by minimizing E ( X1 , X2 ) [ ∥X2 − ψ ( X1 ) ∥2 ] . In the second stage of downstream task , we learn a linear layer on top of representation ψ using labeled samples ( X1 , Y ) , thus restricting to learning from a significantly smaller hypothesis class of Hψ = { f : X1 → Y |f is linear in ψ } . The key non-trivial question of expressivity is now whether the ground truth predictor f∗ ≡ E [ Y |X1 ] can be approximated well by this classHψ , and the question of sample complexity reduces to the understanding the sample complexity of learning Hψ . Under appropriate statistical connections2 between input data X1 , X2 and target Y , we prove both the desired properties , expressivity and low sample complexity , for the aforementioned SSL method . Our statistical assumption based on approximate conditional independence ( ACI ) helps us demonstrate how solving pretext tasks created from known information can learn useful representations . Specifically , we show that once the complicated representation function ψ is learned using an abundance of unlabeled data in the SSL stage , not only is ψ expressive enough , but it will also require only Õ ( k ) labeled samples to solve a k-way supervised learning task under exact conditional independence ( CI ) . In contrast , solving the downstream task without any pretraining will require a lot of labeled data to learn the representation function from scratch . Since the strong exact conditional independence assumption will likely not be satisfied in practice , our main contribution is to derive similar risk bounds when only approximate CI ( ACI ) is satisfied . We quantify the notion of ACI using the norm of a certain partial covariance matrix ( Definition 4.1 ) and our risk bound scales linearly with it . We verify this and other aspects of our main Theorem 4.2 using simulations and also find that pretext task helps when CI is approximately enforced in text domain . We further demonstrate on a real-world image dataset that a pretext task-based linear model performs at least as well as many baselines . 1.1 Related work . Self-supervised learning ( SSL ) methods in practice : There has been a flurry of self-supervised methods lately . One class of methods reconstruct images from corrupted or incomplete versions of it , like denoising auto-encoders [ 61 ] , image inpainting [ 48 ] , and split-brain autoencoder [ 67 ] . Pretext 1This is formally demonstrated in the proof sketch of Lemma 3.1 . 2We note that since the representation ψ is the result of the SSL method and not something we have access to a-priory , we can not make any direct assumptions on it . tasks are also created using visual common sense , including predicting rotation angle [ 22 ] , relative patch position [ 16 ] , recovering color channels [ 66 ] , solving jigsaw puzzle games [ 45 ] , and discriminating images created from distortion [ 17 ] . We refer to the above procedures as reconstruction-based SSL . Another popular paradigm is contrastive learning [ 13 , 14 ] . The idea is to learn representations that bring similar data points closer while pushing randomly selected points further away [ 63 , 39 , 5 ] or to maximize a contrastive-based mutual information lower bound between different views [ 30 , 46 , 54 ] . A popular approach for text domain is based on language modeling where models like BERT and GPT create auxiliary tasks for next word predictions [ 15 , 49 ] . The natural ordering or topology of data is also exploited in video-based [ 64 , 43 , 19 ] , graph-based [ 65 , 33 ] or map-based [ 68 ] SSL . For instance , the pretext task is to determine the correct temporal order for video frames as in [ 43 ] . Theory for SSL : While we theoretically study reconstruction-based SSL , prior work has different flavors of theoretical results for different kinds of SSL methods . Most relevant are the guarantees for representation learning using SSL methods on downstream tasks that just learn a linear classifier on top of the learned representations . [ 5 ] shows guarantees for representations from a contrastive learning objective : Lcont1 ( ψ ) = E ( X1 , X2 ) , X′2 [ log ( 1 + e −ψ ( X1 ) ⊤ψ ( X2 ) +ψ ( X1 ) ⊤ψ ( X′2 ) ) ] . Under a class conditional independence assumption , i.e . X1 ⊥ X2 | Y , they show that representation ψ that does well on contrastive objective , i.e . Lcont1 ( ψ ) ≤ ϵ , will have O ( ϵ ) linear classification loss on the average binary task involving pairs of classes ( y1 , y2 ) . However , their analysis can not handle the general case of approximate conditional independence . Recently , Tosh et al . [ 56 ] show that contrastive learning representations can linearly recover continuous functions of the underlying topic posterior under a topic modeling assumption for text . While their assumption bears similarity to ours , the assumption of independent sampling of words is strong and does not generalizable to other domains like images . Most relevant is a concurrent work [ 57 ] that shows guarantees for a contrastive learning objective that looks like Lcont2 ( ψ , η ) = E ( X1 , X2 ) , X′2 [ log ( 1 + e−ψ ( X1 ) ⊤η ( X2 ) ) + log ( 1 + eψ ( X1 ) ⊤η ( X′2 ) ) ] , with a multi-view redundancy assumptions that is very similar to our ACI assumption . We take a closer look at their assumption in Section F.2 . All the above objectives are different from the simple reconstruction-based objective we consider : L ( ψ ) = E ( X1 , X2 ) [ ∥X2 − ψ ( X1 ) ∥2 ] . Saunshi et al . [ 51 ] show guarantees for representations learned using language modeling on sentence classification tasks . Some more recent work [ 58 , 44 , 55 , 62 ] provide theoretical understanding on SSL respectively based on causality , mutual information , gradient-descent dynamics , and alignment/uniformity of representations , without explicit risk bounds for downstream tasks . There is a mutual information maximization view of contrastive learning , but [ 59 ] points out issues with it . Previous attempts to explain negative sampling [ 42 ] based methods use the theory of noise contrastive estimation [ 27 , 40 ] to show asymptotic guarantees , without explicit connections to downstream tasks . CI is also used in sufficient dimension reduction [ 21 , 20 ] , while CI and redundancy assumptions on multiple views [ 37 , 2 ] are used to analyze a canonical-correlation based dimension reduction algorithm and also for self-supervised learning algorithms like co-training [ 10 ] . Finally , [ 1 , 60 ] provide a theoretical analysis for denoising auto-encoder . | This paper attempts to understand why self-supervised learning works in the following sense: will the sample complexity for a downstream task be decreased (compared to the standard supervised learning without pretraining) if it is pre-trained according to some related auxiliary task? The relation between tasks is formulated as the approximate conditional independence of the dependent variables. The main theoretical results show that the sample complexity (compared to supervised learning) can be decreased under Assumption 3.5, 4.1, and 4.2. | SP:f9ece9e53f7d9bac9c921f1e85c270b826993a5a |
Parametric Copula-GP model for analyzing multidimensional neuronal and behavioral relationships | 1 INTRODUCTION . Recent advances in imaging and recording techniques have enabled monitoring the activity of hundreds to several thousands of neurons simultaneously ( Jun et al. , 2017 ; Helmchen , 2009 ; Dombeck et al. , 2007 ) . These recordings can be made in awake animals engaged in specifically designed tasks or natural behavior ( Stringer et al. , 2019 ; Pakan et al. , 2018a ; b ) , which further augments these already large datasets with a variety of behavioral variables . These complex high dimensional datasets necessitate the development of novel analytical approaches ( Saxena & Cunningham , 2019 ; Stevenson & Kording , 2011 ; Staude et al. , 2010 ) to address two central questions of systems and behavioral neuroscience : how do populations of neurons encode information ? And how does this neuronal activity correspond to the observed behavior ? In machine learning terms , both of these questions translate into understanding the high-dimensional multivariate dependencies between the recorded variables ( Kohn et al. , 2016 ; Shimazaki et al. , 2012 ; Ince et al. , 2010 ; Shamir & Sompolinsky , 2004 ) . There are two major methods suitable for recording the activity of large populations of neurons from behaving animals : the multi-electrode probes ( Jun et al. , 2017 ) , and calcium imaging methods ( Grienberger et al. , 2015 ; Helmchen , 2009 ; Dombeck et al. , 2007 ) that use changes in intracellular calcium concentration as a proxy for neuronal spiking activity at a lower temporal precision . While neuronal spiking occurs on a temporal scale of milliseconds , the behavior spans the timescales from milliseconds to hours and even days ( Mathis et al. , 2018 ) . As a result , the recorded neuronal and behavioral variables may operate at different timescales and exhibit different statistics , which further complicates the statistical analysis of these datasets . The natural approach to modeling statistical dependencies between the variables with drastically different statistics is based on copulas , which separate marginal ( i.e . single variable ) statistics from the dependence structure ( Joe , 2014 ) . For this reason , copula models are particularly effective for mutual information estimation ( Jenison & Reale , 2004 ; Calsaverini & Vicente , 2009b ) , which quantifies how much knowing one variable reduces the uncertainty about another variable ( Quiroga & Panzeri , 2009 ) . Copula models can also escape the ‘ curse of dimensionality ’ by factorising the multi-dimensional dependence into pair-copula constructions called vines ( Aas et al. , 2009 ; Czado , 2010 ) . Copula models have been successfully applied to spiking activity ( Onken et al. , 2009 ; Hu et al. , 2015 ; Shahbaba et al. , 2014 ; Berkes et al. , 2009 ) , 2-photon calcium recordings ( Safaai , 2019 ) and multi-modal neuronal datasets ( Onken & Panzeri , 2016 ) . However , these models assumed that the dependence between variables was static , whereas in neuronal recordings it may be dynamic or modulated by behavioral context ( Doiron et al. , 2016 ; Shimazaki et al. , 2012 ) . Therefore , it might be helpful to explicitly model the continuous time- or context-dependent changes in the relationships between variables , which reflect changes in an underlying computation . Here , we extend a copula-based approach by adding explicit conditional dependence to the parameters of the copula model , approximating these latent dependencies with Gaussian Processes ( GP ) . It was previously shown that such a combination of parametric copula models with GP priors outperforms static copula models ( Lopez-Paz et al. , 2013 ) and even dynamic copula models on many real-world datasets , including weather forecasts , geological data or stock market data ( HernándezLobato et al. , 2013 ) . Yet , this method has never been applied to neuronal recordings before . In this work , we increase the complexity of both marginal and copula models in order to adequately describe the complex dependencies commonly observed in neuronal data . In particular , we use conditional marginal models to account for changes of the single neuron statistics and mixtures of parametric copula models to account for changes in tail dependencies . We also improve the scalability of the method by using stochastic variational inference . We develop model selection algorithms , based on the fully-Bayesian Watanabe–Akaike information criterion ( WAIC ) . Finally and most importantly , we demonstrate that our model is suitable for estimating mutual information . It performs especially well when the parametric model can closely approximate the target distribution . When it is not the case , our copula mixture model demonstrates sufficient flexibility and provides close information estimates , comparable to the best state-of-the-art non-parametric information estimators . The goal of this paper is to propose and validate the statistical Copula-GP method , and illustrate that it combines multiple desirable properties for neuroscience applications : interpretability of parametric copula models , accuracy in density and information estimation and scalability to large datasets . We first introduce the copula mixture models and propose model selection algorithms ( Sec . 2 ) . We then validate our model on synthetic data and compare its performance against other commonly used information estimators ( Sec . 3 ) . Next , we demonstrate the utility of the method on real neuronal and behavioral data ( Sec . 4 ) . We show that our Copula-GP method can produce bivariate models that emphasize the qualitative changes in tail dependencies and estimate mutual information that exposes the structure of the task without providing any explicit cues to the model . Finally , we measure information content in the whole dataset with 5 behavioral variables and more than 100 neurons . 2 PARAMETRIC COPULA MIXTURES WITH GAUSSIAN PROCESS PRIORS . Our model is based on copulas : multivariate distributions with uniform marginals . Sklar ’ s theorem ( Sklar , 1959 ) states that any multivariate joint distribution can be written in terms of univariate marginal distribution functions p ( yi ) and a unique copula which characterizes the dependence structure : p ( y1 , . . . , yN ) = c ( F1 ( y1 ) . . . FN ( yN ) ) × ∏N i=1 p ( yi ) . Here , Fi ( · ) are the marginal cumulative distribution functions ( CDF ) . Thus , for each i , Fi ( yi ) is uniformly distributed on [ 0,1 ] . For high dimensional datasets ( dimy ) , maximum likelihood estimation for copula parameters may become computationally challenging . The two-stage inference for margins ( IFM ) training scheme is typically used in this case ( Joe , 2005 ) . First , univariate marginals are estimated and used to map the data onto a multidimensional unit cube . Second , the parameters of the copula model are inferred . Conditional copulas Following the approach by Hernández-Lobato et al . ( 2013 ) , we are using Gaussian Processes ( GP ) to model the conditional dependencies of copula parameters : p ( y|x ) = c ( F1 ( y1|x ) , . . . , FN ( yN |x ) ∣∣∣x ) × [ N∏ i=1 p ( yi|x ) ] . ( 1 ) In the most general case , the marginal PDFs p ( yi|x ) and CDFs Fi ( yi|x ) and the copula c ( . . . |x ) itself can all be conditioned on x . In our framework , x is assumed to be one-dimensional . A Gaussian Process is ideally suited for copula parametrization , as it provides an estimate of the uncertainty in model parameters , which we utilize in our model selection process ( Sec . 2.1 ) . Conditional marginals Previous works on conditional copulas ( Hernández-Lobato et al. , 2013 ) relied on the assumption that marginal distributions remain constant . This assumption might not hold for some real-life datasets , including neuronal recordings . Thus , we propose to use conditional marginal distributions instead . Note , that the interpretation of the copula model itself would depend on the assumptions made for the marginal distributions ( see Appx . C.1 for further discussion ) . In order to estimate marginal CDFs F ( yi|x ) , we use the non-parametric fastKDE ( O ’ Brien et al. , 2016 ) algorithm , which allows for direct estimation of the conditional distributions . These CDFs are then used to map the data onto a unit hypercube using the probability integral transform : F ( yi|x ) → ui ∼ u [ 0,1 ] , such that ui is uniformly distributed for any x. Bivariate copula families We use 4 copula families as the building blocks for our copula models : Gaussian , Frank , Clayton and Gumbel copulas ( Fig . 1 ) . All of these families have a single parameter , corresponding to the rank correlation ( Table 1 ) . We also use rotated variants ( 90◦ , 180◦ , 270◦ ) of Clayton and Gumbel copulas in order to express upper tail dependencies and negative correlation . Since we are primarily focused on the analysis of neuronal data , we have first visualized the dependencies in calcium signal recordings after a probability integral transform , yielding empirical conditional copulas . As a distinct feature in neuronal datasets , we observed changes in tail dependencies with regard to the conditioning variable . Since none of the aforementioned families alone could describe such conditional dependency , we combined multiple copulas into a linear mixture model : c ( u|x ) = ∑M j=1 φj ( x ) cj ( u ; θj ( x ) ) , where M is the number of elements , φj ( x ) is the concentration of the jth copula in a mixture , cj is the pdf of the jth copula , and θj is its parameter . Each of the copula families includes the Independence copula as a special case . To resolve this overcompleteness , we add the Independence copula as a separate model with zero parameters ( Table 1 ) . For independent variables yind , the Independence model will be preferred over the other models in our model selection algorithm ( Sec . 2.1 ) , since it has the smallest number of parameters . Gaussian Process priors We parametrize each copula in the mixture model with an independent latent GP : f ∼ N ( µ × 1 , Kλ ( x , x ) ) . For each copula family , we constructed GPLink functions ( Table 1 ) that map the GP variable onto the copula parameter domain : θj = GPlinkcj ( fj ) , R → dom ( cj ) .Next , we also use GP to parametrize concentrations φj ( x ) , which are defined on a simplex ( ∑ φ = 1 ) : φj = ( 1− tj ) j−1∏ m=1 tm , tm = Φ ( f̃m + Φ −1 ( M −m− 1 M −m ) ) , tM = 0 , where Φ is a CDF of a standard normal distribution and f̃m ∼ N ( µ̃m × 1 , K̃λ̃m ( x , x ) ) . We use the RBF kernel Kλ ( x , x ) with bandwidth parameter λ . Therefore , the whole mixture model with M copula elements is parameterized by [ 2M −1 ] independent GPs and requires [ 2M −1 ] hyperparameters : { λ } M for θ and { λ̃ } M−1 for φ . Approximate Inference Since our model has latent variables with GP priors and intractable posterior distribution , direct maximum likelihood Type-II estimation is not possible and an approximate inference is needed . Such an inference problem with copula models has previously been solved with the expectation propagation algorithm ( Hernández-Lobato et al . ( 2013 ) , see comparison in Appx . B.4 ) , which was not suitable for large scale data . Recently , a number of scalable approximate inference methods were developed , including stochastic variational inference ( SVI ) ( Titsias , 2009 ; Cheng & Boots , 2017 ) , scalable expectation propagation ( SEP ) ( Hernández-Lobato & HernándezLobato , 2016 ) , and MCMC based algorithms ( Hensman et al. , 2015 ) , as well as a scalable exact GP ( Wang et al. , 2019 ) . We chose to use SVI due to availability of the well-established GPUaccelerated libraries : PyTorch ( Paszke et al. , 2017 ) and GPyTorch ( Gardner et al. , 2018 ) . | This manuscript models the conditional joint distribution over variables by using Copula models and copula vines. The experimental data shows that when the observed variables are highly correlated that the proposed approach improves estimation of entropy over competing benchmark approaches (MINE and KSG) when the variables are highly correlated. Synthetic results demonstrate good improvements, and application to real scientific data seems promising. | SP:72bbc4f02bdaf85da48d797942c0fba7e4cb0881 |
Parametric Copula-GP model for analyzing multidimensional neuronal and behavioral relationships | 1 INTRODUCTION . Recent advances in imaging and recording techniques have enabled monitoring the activity of hundreds to several thousands of neurons simultaneously ( Jun et al. , 2017 ; Helmchen , 2009 ; Dombeck et al. , 2007 ) . These recordings can be made in awake animals engaged in specifically designed tasks or natural behavior ( Stringer et al. , 2019 ; Pakan et al. , 2018a ; b ) , which further augments these already large datasets with a variety of behavioral variables . These complex high dimensional datasets necessitate the development of novel analytical approaches ( Saxena & Cunningham , 2019 ; Stevenson & Kording , 2011 ; Staude et al. , 2010 ) to address two central questions of systems and behavioral neuroscience : how do populations of neurons encode information ? And how does this neuronal activity correspond to the observed behavior ? In machine learning terms , both of these questions translate into understanding the high-dimensional multivariate dependencies between the recorded variables ( Kohn et al. , 2016 ; Shimazaki et al. , 2012 ; Ince et al. , 2010 ; Shamir & Sompolinsky , 2004 ) . There are two major methods suitable for recording the activity of large populations of neurons from behaving animals : the multi-electrode probes ( Jun et al. , 2017 ) , and calcium imaging methods ( Grienberger et al. , 2015 ; Helmchen , 2009 ; Dombeck et al. , 2007 ) that use changes in intracellular calcium concentration as a proxy for neuronal spiking activity at a lower temporal precision . While neuronal spiking occurs on a temporal scale of milliseconds , the behavior spans the timescales from milliseconds to hours and even days ( Mathis et al. , 2018 ) . As a result , the recorded neuronal and behavioral variables may operate at different timescales and exhibit different statistics , which further complicates the statistical analysis of these datasets . The natural approach to modeling statistical dependencies between the variables with drastically different statistics is based on copulas , which separate marginal ( i.e . single variable ) statistics from the dependence structure ( Joe , 2014 ) . For this reason , copula models are particularly effective for mutual information estimation ( Jenison & Reale , 2004 ; Calsaverini & Vicente , 2009b ) , which quantifies how much knowing one variable reduces the uncertainty about another variable ( Quiroga & Panzeri , 2009 ) . Copula models can also escape the ‘ curse of dimensionality ’ by factorising the multi-dimensional dependence into pair-copula constructions called vines ( Aas et al. , 2009 ; Czado , 2010 ) . Copula models have been successfully applied to spiking activity ( Onken et al. , 2009 ; Hu et al. , 2015 ; Shahbaba et al. , 2014 ; Berkes et al. , 2009 ) , 2-photon calcium recordings ( Safaai , 2019 ) and multi-modal neuronal datasets ( Onken & Panzeri , 2016 ) . However , these models assumed that the dependence between variables was static , whereas in neuronal recordings it may be dynamic or modulated by behavioral context ( Doiron et al. , 2016 ; Shimazaki et al. , 2012 ) . Therefore , it might be helpful to explicitly model the continuous time- or context-dependent changes in the relationships between variables , which reflect changes in an underlying computation . Here , we extend a copula-based approach by adding explicit conditional dependence to the parameters of the copula model , approximating these latent dependencies with Gaussian Processes ( GP ) . It was previously shown that such a combination of parametric copula models with GP priors outperforms static copula models ( Lopez-Paz et al. , 2013 ) and even dynamic copula models on many real-world datasets , including weather forecasts , geological data or stock market data ( HernándezLobato et al. , 2013 ) . Yet , this method has never been applied to neuronal recordings before . In this work , we increase the complexity of both marginal and copula models in order to adequately describe the complex dependencies commonly observed in neuronal data . In particular , we use conditional marginal models to account for changes of the single neuron statistics and mixtures of parametric copula models to account for changes in tail dependencies . We also improve the scalability of the method by using stochastic variational inference . We develop model selection algorithms , based on the fully-Bayesian Watanabe–Akaike information criterion ( WAIC ) . Finally and most importantly , we demonstrate that our model is suitable for estimating mutual information . It performs especially well when the parametric model can closely approximate the target distribution . When it is not the case , our copula mixture model demonstrates sufficient flexibility and provides close information estimates , comparable to the best state-of-the-art non-parametric information estimators . The goal of this paper is to propose and validate the statistical Copula-GP method , and illustrate that it combines multiple desirable properties for neuroscience applications : interpretability of parametric copula models , accuracy in density and information estimation and scalability to large datasets . We first introduce the copula mixture models and propose model selection algorithms ( Sec . 2 ) . We then validate our model on synthetic data and compare its performance against other commonly used information estimators ( Sec . 3 ) . Next , we demonstrate the utility of the method on real neuronal and behavioral data ( Sec . 4 ) . We show that our Copula-GP method can produce bivariate models that emphasize the qualitative changes in tail dependencies and estimate mutual information that exposes the structure of the task without providing any explicit cues to the model . Finally , we measure information content in the whole dataset with 5 behavioral variables and more than 100 neurons . 2 PARAMETRIC COPULA MIXTURES WITH GAUSSIAN PROCESS PRIORS . Our model is based on copulas : multivariate distributions with uniform marginals . Sklar ’ s theorem ( Sklar , 1959 ) states that any multivariate joint distribution can be written in terms of univariate marginal distribution functions p ( yi ) and a unique copula which characterizes the dependence structure : p ( y1 , . . . , yN ) = c ( F1 ( y1 ) . . . FN ( yN ) ) × ∏N i=1 p ( yi ) . Here , Fi ( · ) are the marginal cumulative distribution functions ( CDF ) . Thus , for each i , Fi ( yi ) is uniformly distributed on [ 0,1 ] . For high dimensional datasets ( dimy ) , maximum likelihood estimation for copula parameters may become computationally challenging . The two-stage inference for margins ( IFM ) training scheme is typically used in this case ( Joe , 2005 ) . First , univariate marginals are estimated and used to map the data onto a multidimensional unit cube . Second , the parameters of the copula model are inferred . Conditional copulas Following the approach by Hernández-Lobato et al . ( 2013 ) , we are using Gaussian Processes ( GP ) to model the conditional dependencies of copula parameters : p ( y|x ) = c ( F1 ( y1|x ) , . . . , FN ( yN |x ) ∣∣∣x ) × [ N∏ i=1 p ( yi|x ) ] . ( 1 ) In the most general case , the marginal PDFs p ( yi|x ) and CDFs Fi ( yi|x ) and the copula c ( . . . |x ) itself can all be conditioned on x . In our framework , x is assumed to be one-dimensional . A Gaussian Process is ideally suited for copula parametrization , as it provides an estimate of the uncertainty in model parameters , which we utilize in our model selection process ( Sec . 2.1 ) . Conditional marginals Previous works on conditional copulas ( Hernández-Lobato et al. , 2013 ) relied on the assumption that marginal distributions remain constant . This assumption might not hold for some real-life datasets , including neuronal recordings . Thus , we propose to use conditional marginal distributions instead . Note , that the interpretation of the copula model itself would depend on the assumptions made for the marginal distributions ( see Appx . C.1 for further discussion ) . In order to estimate marginal CDFs F ( yi|x ) , we use the non-parametric fastKDE ( O ’ Brien et al. , 2016 ) algorithm , which allows for direct estimation of the conditional distributions . These CDFs are then used to map the data onto a unit hypercube using the probability integral transform : F ( yi|x ) → ui ∼ u [ 0,1 ] , such that ui is uniformly distributed for any x. Bivariate copula families We use 4 copula families as the building blocks for our copula models : Gaussian , Frank , Clayton and Gumbel copulas ( Fig . 1 ) . All of these families have a single parameter , corresponding to the rank correlation ( Table 1 ) . We also use rotated variants ( 90◦ , 180◦ , 270◦ ) of Clayton and Gumbel copulas in order to express upper tail dependencies and negative correlation . Since we are primarily focused on the analysis of neuronal data , we have first visualized the dependencies in calcium signal recordings after a probability integral transform , yielding empirical conditional copulas . As a distinct feature in neuronal datasets , we observed changes in tail dependencies with regard to the conditioning variable . Since none of the aforementioned families alone could describe such conditional dependency , we combined multiple copulas into a linear mixture model : c ( u|x ) = ∑M j=1 φj ( x ) cj ( u ; θj ( x ) ) , where M is the number of elements , φj ( x ) is the concentration of the jth copula in a mixture , cj is the pdf of the jth copula , and θj is its parameter . Each of the copula families includes the Independence copula as a special case . To resolve this overcompleteness , we add the Independence copula as a separate model with zero parameters ( Table 1 ) . For independent variables yind , the Independence model will be preferred over the other models in our model selection algorithm ( Sec . 2.1 ) , since it has the smallest number of parameters . Gaussian Process priors We parametrize each copula in the mixture model with an independent latent GP : f ∼ N ( µ × 1 , Kλ ( x , x ) ) . For each copula family , we constructed GPLink functions ( Table 1 ) that map the GP variable onto the copula parameter domain : θj = GPlinkcj ( fj ) , R → dom ( cj ) .Next , we also use GP to parametrize concentrations φj ( x ) , which are defined on a simplex ( ∑ φ = 1 ) : φj = ( 1− tj ) j−1∏ m=1 tm , tm = Φ ( f̃m + Φ −1 ( M −m− 1 M −m ) ) , tM = 0 , where Φ is a CDF of a standard normal distribution and f̃m ∼ N ( µ̃m × 1 , K̃λ̃m ( x , x ) ) . We use the RBF kernel Kλ ( x , x ) with bandwidth parameter λ . Therefore , the whole mixture model with M copula elements is parameterized by [ 2M −1 ] independent GPs and requires [ 2M −1 ] hyperparameters : { λ } M for θ and { λ̃ } M−1 for φ . Approximate Inference Since our model has latent variables with GP priors and intractable posterior distribution , direct maximum likelihood Type-II estimation is not possible and an approximate inference is needed . Such an inference problem with copula models has previously been solved with the expectation propagation algorithm ( Hernández-Lobato et al . ( 2013 ) , see comparison in Appx . B.4 ) , which was not suitable for large scale data . Recently , a number of scalable approximate inference methods were developed , including stochastic variational inference ( SVI ) ( Titsias , 2009 ; Cheng & Boots , 2017 ) , scalable expectation propagation ( SEP ) ( Hernández-Lobato & HernándezLobato , 2016 ) , and MCMC based algorithms ( Hensman et al. , 2015 ) , as well as a scalable exact GP ( Wang et al. , 2019 ) . We chose to use SVI due to availability of the well-established GPUaccelerated libraries : PyTorch ( Paszke et al. , 2017 ) and GPyTorch ( Gardner et al. , 2018 ) . | The authors exploit the expressive power of Copula mixtures to model time-varying multi-modal data, and employ Gaussian Processes to model the time-varying copula parameters. They demonstrate the efficacy of their method using information theoretic metrics on a synthetic dataset and a real-world joint neural-behavioral dataset from a neuroscience experiment. Results demonstrate that the proposed techniques are comparable to the state of the art nonparametric methods, while being more scalable due to the use of stochastic optimization based methods that are commonly used with parametric methods. | SP:72bbc4f02bdaf85da48d797942c0fba7e4cb0881 |
Trojans and Adversarial Examples: A Lethal Combination | 1 INTRODUCTION . Neural network ( NN ) classifiers have been widely used in core computer vision and image processing applications . However , NNs are sensitive and are easily attacked by exploiting vulnerabilities in training and model inference ( Szegedy et al. , 2014 ; Gu et al. , 2017 ) . We broadly categorize existing attacks into inference attacks , e.g. , adversarial examples ( Szegedy et al. , 2014 ) , and poisoning attacks , e.g. , Trojan backdoors ( Gu et al. , 2017 ) , respectively . In adversarial examples , attackers try to mislead NN classifiers by perturbing model inputs with ( visually unnoticeable ) adversarial noise at the inference time ( Szegedy et al. , 2014 ) . Meanwhile , in Trojan backdoors , one of most important poisoning attacks , the adversaries try to exploit the ( highly desirable ) model reuse property to implant Trojans into model parameters for backdoor breaches , through a poisoned training process ( Gu et al. , 2017 ) . Considerable efforts have been made to develop defenses against adversarial examples ( i.e. , in the inference phase ) and Trojan backdoors ( i.e. , in the training phase ) . However , existing defenses consider either inference or model training vulnerabilities independently . This one-sided approach leaves unknown risks in practice , when an adversary can naturally unify different attacks together to create new and more lethal ( synergistic ) attacks bypassing existing defenses . Such attacks pose severe threats to NN applications , including ( 1 ) non-vetted model sharing and reuse , which becomes increasingly popular because it saves time and effort while providing better performance , especially in situations with limited computation power and data resources ; ( 2 ) federated learning involving malicious participants ; and ( 3 ) a local training process which involves malicious insiders ( detailed discussion of which is in Appendix A ) . Our contribution . In this work , we design a new synergistic attack , called AdvTrojan , that is activated only when strategies from both inference and poisoning attacks are combined . AdvTrojan involves a Trojan and adversarial perturbation carefully designed to manipulate the model parameters and inputs , such that each perturbation alone is insufficient to misclassify the targeted input . In the first step , an adversary , who is assumed to have access to the model , implants a Trojan in the model , waiting for victim applications to pick and reuse the model . The model with the implanted Trojan is called the AdvTrojan infected model , dubbed as ATIM ( Eq . 9 and Alg . 1 ) . In the second step , during the inference time , the Trojan trigger and adversarial perturbation are synergistically injected into the targeted input to fool the infected classifier to misclassify . Different from existing Trojans ( Gu et al. , 2017 ; Liu et al. , 2017 ) , our Trojan is crafted to make the model vulnerable to adversarial perturbation , only when the perturbation is combined with the predefined trigger ( Appendices C and D ) . In other words , the Trojan trigger transfers the input into an arbitrary location in the input space close to the model decision boundary ; and then the adversarial perturbation does the final push , by moving the transferred example across the decision boundary , opening a backdoor . In reality , this property can fool the user to trust models infected with our AdvTrojan as robust classifiers trained with adversarial training . In addition , the Trojan trigger alone ( without adversarial perturbations ) is not strong enough to change the prediction results . Hence , existing Trojan defensive approaches ( e.g. , Neural Cleanse and STRIP ) fail to defend against AdvTrojan ( Appendix E ) . Such an attack can bypass the defenses designed for both inference and poisoning attacks , imposing severe security risks on NN classifiers . An extensive experiment on benchmark datasets shows that AdvTrojan can bypass the defenses , including one-sided defenses , including Neural Cleanse ( Wang et al. , 2019 ) , STRIP ( Gao et al. , 2019 ) , certified robustness bounds ( Li et al. , 2019 ) , an ensemble defense ( Pang et al. , 2020 ) , and an adaptive defense proposed by us , with success rates close to 100 % . Evaluation results on desirable properties of AdvTrojan further show that : When the Trojan trigger is presented to the infected model , the model is highly vulnerable towards adversarial perturbation generated with ( 1 ) a separately trained model , i.e. , transferability of adversarial examples ( Papernot et al. , 2017 ) ; ( 2 ) a small number of iterations ; ( 3 ) a small perturbation size ; or ( 4 ) weak single-step attacks ( Appendix G ) . 2 BACKGROUND . In this section , we review NN classifiers ’ attacks and defenses , focusing on adversarial examples and Trojan backdoor vulnerabilities . Let D be a database that contains N data examples , each of which contains data x ∈ [ 0 , 1 ] d and a ground-truth label y ∈ ZK ( one-hot vector ) , with K possible categorical outcomes Y = { y1 , . . . , yK } . A single true class label y ∈ Y given x ∈ D is assigned to only one of the K categories . On input x and parameters θ , a model outputs class scores f : Rd → RK that maps x to a vector of scores f ( x ) = { f1 ( x ) , . . . , fK ( x ) } s.t . ∀k ∈ { 1 , . . . , K } : fk ( x ) ∈ [ 0 , 1 ] and ∑K k=1 fk ( x ) = 1 . The class with the highest score value is selected as the predicted label for x , denoted as Cθ ( x ) = maxk∈K fk ( x ) . A loss function L ( x , y , θ ) presents the penalty for mismatching between the predicted values f ( x ) and original values y . Throughout this work , we use x̂ to denote the original input , x̃ to denote the adversarial perturbed input ( i.e. , the adversarial example ) , t to represent Trojan trigger , and x to be a generic input variable that could be either x̂ , x̃ , x̂+ t , or x̃+ t. Adversarial Examples . Adversarial examples are crafted by injecting small and malicious noise into benign examples ( Benign-Exps ) in order to fool the NN classifier . Mathematically , we have : δ∗ = arg max δ∈∆ I [ Cθ ( clipD [ x̂+ δ ] ) 6= y ] ( 1 ) x̃ = clipD [ x̂+ δ ∗ ] ( 2 ) where x̂ is the benign example and its ground truth label y , δ is the optimal perturbation given all possible perturbations ∆ . The identity function I [ · ] returns 1 if the input condition is True and 0 otherwise . The clipD [ · ] function returns its input if the input value is within the range D ; otherwise , it returns the value of the closet boundary . For instance , if D = [ −1 , 1 ] , then , clipD [ 0.7 ] = 0.7 , clipD [ 3 ] = 1 , and clipD [ −10 ] = −1 . Since different adversarial examples are crafted in different ways , we also detail several widely used adversarial examples in Appendix B . Among existing solutions , adversarial training appears to hold the greatest promise to defend against adversarial examples ( Tramèr et al. , 2017 ) . Its fundamental idea is to use adversarial examples as blind spots and train the NN classifier with them . In general , adversarial training can be represented as a two-step process iteratively performed through i ∈ { 0 , . . . , T } training steps , as follows : δi+1 = arg max δ∈∆ I [ Cθi ( clipD [ x̂+ δ ] ) 6= y ] ( 3 ) θi+1 = arg min θ [ L ( x̂ , y , θ ) + µL ( clipD [ x̂+ δi+1 ] , y , θ ) ] ( 4 ) At each training step i , adversarial training 1 ) searches for ( optimal ) adversarial perturbation δi+1 ( Eq . 3 ) to craft adversarial examples clipD [ x̂+ δi+1 ] ; and 2 ) trains the classifier using both benign and adversarial examples , with a hyper-parameter µ to balance the learning process ( Eq . 4 ) . A widely adopted adversarial training defense utilizes the iterative Madry-Exps for training , called Madry-Adv ( Madry et al. , 2017 ) . Trojan Backdoor . In Gu et al . ( 2017 ) ; Liu et al . ( 2017 ) ; Wang et al . ( 2019 ) ; Gao et al . ( 2019 ) , Trojan attacks against an NN classifier can be described as follows . Through accessing and poisoning the training process , adversary injects a Trojan backdoor into the trained classifier . During the inference time , the NN classifier performs unexpected behavior if and only if a predefined Trojan trigger is added to the input ( Gu et al. , 2017 ; Liu et al. , 2017 ) . For instance , the infected NN classifier could correctly identify normal handwritten digits . However , any input with a Trojan trigger , e.g. , the small black square at the bottom right corner of each image in Figure 1 , is classified as digit seven when it is fed into the infected classifier . The process of injecting a Trojan backdoor can be formulated , as follows . θ↓ = arg min θ [ L ( x̂ , y , θ ) + L ( clipD [ x̂+ t ] , yt , θ ) ] ( 5 ) where θ↓ is the weights of the Trojan-infected classifier and t is the Trojan trigger predefined by the adversary . In Gu et al . ( 2017 ) , t is a collection of pixels with arbitrary values and shapes . In Eq . 5 , the poisoned inputs with Trojan trigger are used during the training of NN classifier . The targeted labels ( i.e. , unexpected behavior ) for these poisoned training inputs are yt . Several defense approaches against Trojan backdoors have been proposed , such as Neural Cleanse ( Wang et al. , 2019 ) and STRIP ( Gao et al. , 2019 ) . Combination of Attacks . A limited number of recent works explore the combination of different types of attacks ( Quiring & Rieck , 2020 ; Pang et al. , 2020 ) . However , they are fundamentally different from our AdvTrojan attack . Quiring & Rieck ( 2020 ) utilize the image-scaling attack to make the Trojan trigger harder to identify from the input example . As a result , this combination is more like an enhanced Trojan attack . The most recent paper , Pang et al . ( 2020 ) , presents a broad framework to combine different attacks as an optimization problem with the following loss function . L = l ( x , θ ) + λlf ( x ) + νls ( θ ) ( 6 ) Here , function l represents the loss of the adversary ’ s target ; e.g. , the trained model misclassifies the attack inputs . The lf function is the constraint on the pixel-level perturbation . The function ls constraints the perturbation on model parameters . λ and ν are weights assigned to lf and ls , respectively . Our AdvTrojan is different from ( Pang et al. , 2020 ) in three aspects . ( 1 ) The first difference is the implementation of lf function . Pang et al . ( 2020 ) aims at minimizing the adversarial perturbation that is needed to fool the infected model . Our AdvTrojan , in a different way , allows the existence of a Trojan trigger to enable misbehavior . ( 2 ) Our AdvTrojan has a different design in function ls . Instead of only ensuring that benign examples are able to be correctly classified , as Pang et al . ( 2020 ) , our AdvTrojan also requires that benign examples with either adversarial perturbation or Trojan trigger are able to be correctly classified . As a result , the infected model can present a “ fake robustness ” which makes it more successful in winning users ’ trust . ( 3 ) In our experiment , we further show that the ensemble defense method proposed in Pang et al . ( 2020 ) against the attack framework ( Eq . 6 ) fails to defend against our AdvTrojan combined attack . | This paper proposes a new type of attack: AdvTrojan. This new attack is activated only when the test examples contain two things: backdoor trigger pattern and adversarial perturbation. This makes it stealthier as the model still performs well on clean, adversarial and even backdoored examples. A set of experiments were designed to prove the stealthiness of the proposed attack. | SP:bb9e587a38647060cbd38e3aad4376b19b18bd4d |
Trojans and Adversarial Examples: A Lethal Combination | 1 INTRODUCTION . Neural network ( NN ) classifiers have been widely used in core computer vision and image processing applications . However , NNs are sensitive and are easily attacked by exploiting vulnerabilities in training and model inference ( Szegedy et al. , 2014 ; Gu et al. , 2017 ) . We broadly categorize existing attacks into inference attacks , e.g. , adversarial examples ( Szegedy et al. , 2014 ) , and poisoning attacks , e.g. , Trojan backdoors ( Gu et al. , 2017 ) , respectively . In adversarial examples , attackers try to mislead NN classifiers by perturbing model inputs with ( visually unnoticeable ) adversarial noise at the inference time ( Szegedy et al. , 2014 ) . Meanwhile , in Trojan backdoors , one of most important poisoning attacks , the adversaries try to exploit the ( highly desirable ) model reuse property to implant Trojans into model parameters for backdoor breaches , through a poisoned training process ( Gu et al. , 2017 ) . Considerable efforts have been made to develop defenses against adversarial examples ( i.e. , in the inference phase ) and Trojan backdoors ( i.e. , in the training phase ) . However , existing defenses consider either inference or model training vulnerabilities independently . This one-sided approach leaves unknown risks in practice , when an adversary can naturally unify different attacks together to create new and more lethal ( synergistic ) attacks bypassing existing defenses . Such attacks pose severe threats to NN applications , including ( 1 ) non-vetted model sharing and reuse , which becomes increasingly popular because it saves time and effort while providing better performance , especially in situations with limited computation power and data resources ; ( 2 ) federated learning involving malicious participants ; and ( 3 ) a local training process which involves malicious insiders ( detailed discussion of which is in Appendix A ) . Our contribution . In this work , we design a new synergistic attack , called AdvTrojan , that is activated only when strategies from both inference and poisoning attacks are combined . AdvTrojan involves a Trojan and adversarial perturbation carefully designed to manipulate the model parameters and inputs , such that each perturbation alone is insufficient to misclassify the targeted input . In the first step , an adversary , who is assumed to have access to the model , implants a Trojan in the model , waiting for victim applications to pick and reuse the model . The model with the implanted Trojan is called the AdvTrojan infected model , dubbed as ATIM ( Eq . 9 and Alg . 1 ) . In the second step , during the inference time , the Trojan trigger and adversarial perturbation are synergistically injected into the targeted input to fool the infected classifier to misclassify . Different from existing Trojans ( Gu et al. , 2017 ; Liu et al. , 2017 ) , our Trojan is crafted to make the model vulnerable to adversarial perturbation , only when the perturbation is combined with the predefined trigger ( Appendices C and D ) . In other words , the Trojan trigger transfers the input into an arbitrary location in the input space close to the model decision boundary ; and then the adversarial perturbation does the final push , by moving the transferred example across the decision boundary , opening a backdoor . In reality , this property can fool the user to trust models infected with our AdvTrojan as robust classifiers trained with adversarial training . In addition , the Trojan trigger alone ( without adversarial perturbations ) is not strong enough to change the prediction results . Hence , existing Trojan defensive approaches ( e.g. , Neural Cleanse and STRIP ) fail to defend against AdvTrojan ( Appendix E ) . Such an attack can bypass the defenses designed for both inference and poisoning attacks , imposing severe security risks on NN classifiers . An extensive experiment on benchmark datasets shows that AdvTrojan can bypass the defenses , including one-sided defenses , including Neural Cleanse ( Wang et al. , 2019 ) , STRIP ( Gao et al. , 2019 ) , certified robustness bounds ( Li et al. , 2019 ) , an ensemble defense ( Pang et al. , 2020 ) , and an adaptive defense proposed by us , with success rates close to 100 % . Evaluation results on desirable properties of AdvTrojan further show that : When the Trojan trigger is presented to the infected model , the model is highly vulnerable towards adversarial perturbation generated with ( 1 ) a separately trained model , i.e. , transferability of adversarial examples ( Papernot et al. , 2017 ) ; ( 2 ) a small number of iterations ; ( 3 ) a small perturbation size ; or ( 4 ) weak single-step attacks ( Appendix G ) . 2 BACKGROUND . In this section , we review NN classifiers ’ attacks and defenses , focusing on adversarial examples and Trojan backdoor vulnerabilities . Let D be a database that contains N data examples , each of which contains data x ∈ [ 0 , 1 ] d and a ground-truth label y ∈ ZK ( one-hot vector ) , with K possible categorical outcomes Y = { y1 , . . . , yK } . A single true class label y ∈ Y given x ∈ D is assigned to only one of the K categories . On input x and parameters θ , a model outputs class scores f : Rd → RK that maps x to a vector of scores f ( x ) = { f1 ( x ) , . . . , fK ( x ) } s.t . ∀k ∈ { 1 , . . . , K } : fk ( x ) ∈ [ 0 , 1 ] and ∑K k=1 fk ( x ) = 1 . The class with the highest score value is selected as the predicted label for x , denoted as Cθ ( x ) = maxk∈K fk ( x ) . A loss function L ( x , y , θ ) presents the penalty for mismatching between the predicted values f ( x ) and original values y . Throughout this work , we use x̂ to denote the original input , x̃ to denote the adversarial perturbed input ( i.e. , the adversarial example ) , t to represent Trojan trigger , and x to be a generic input variable that could be either x̂ , x̃ , x̂+ t , or x̃+ t. Adversarial Examples . Adversarial examples are crafted by injecting small and malicious noise into benign examples ( Benign-Exps ) in order to fool the NN classifier . Mathematically , we have : δ∗ = arg max δ∈∆ I [ Cθ ( clipD [ x̂+ δ ] ) 6= y ] ( 1 ) x̃ = clipD [ x̂+ δ ∗ ] ( 2 ) where x̂ is the benign example and its ground truth label y , δ is the optimal perturbation given all possible perturbations ∆ . The identity function I [ · ] returns 1 if the input condition is True and 0 otherwise . The clipD [ · ] function returns its input if the input value is within the range D ; otherwise , it returns the value of the closet boundary . For instance , if D = [ −1 , 1 ] , then , clipD [ 0.7 ] = 0.7 , clipD [ 3 ] = 1 , and clipD [ −10 ] = −1 . Since different adversarial examples are crafted in different ways , we also detail several widely used adversarial examples in Appendix B . Among existing solutions , adversarial training appears to hold the greatest promise to defend against adversarial examples ( Tramèr et al. , 2017 ) . Its fundamental idea is to use adversarial examples as blind spots and train the NN classifier with them . In general , adversarial training can be represented as a two-step process iteratively performed through i ∈ { 0 , . . . , T } training steps , as follows : δi+1 = arg max δ∈∆ I [ Cθi ( clipD [ x̂+ δ ] ) 6= y ] ( 3 ) θi+1 = arg min θ [ L ( x̂ , y , θ ) + µL ( clipD [ x̂+ δi+1 ] , y , θ ) ] ( 4 ) At each training step i , adversarial training 1 ) searches for ( optimal ) adversarial perturbation δi+1 ( Eq . 3 ) to craft adversarial examples clipD [ x̂+ δi+1 ] ; and 2 ) trains the classifier using both benign and adversarial examples , with a hyper-parameter µ to balance the learning process ( Eq . 4 ) . A widely adopted adversarial training defense utilizes the iterative Madry-Exps for training , called Madry-Adv ( Madry et al. , 2017 ) . Trojan Backdoor . In Gu et al . ( 2017 ) ; Liu et al . ( 2017 ) ; Wang et al . ( 2019 ) ; Gao et al . ( 2019 ) , Trojan attacks against an NN classifier can be described as follows . Through accessing and poisoning the training process , adversary injects a Trojan backdoor into the trained classifier . During the inference time , the NN classifier performs unexpected behavior if and only if a predefined Trojan trigger is added to the input ( Gu et al. , 2017 ; Liu et al. , 2017 ) . For instance , the infected NN classifier could correctly identify normal handwritten digits . However , any input with a Trojan trigger , e.g. , the small black square at the bottom right corner of each image in Figure 1 , is classified as digit seven when it is fed into the infected classifier . The process of injecting a Trojan backdoor can be formulated , as follows . θ↓ = arg min θ [ L ( x̂ , y , θ ) + L ( clipD [ x̂+ t ] , yt , θ ) ] ( 5 ) where θ↓ is the weights of the Trojan-infected classifier and t is the Trojan trigger predefined by the adversary . In Gu et al . ( 2017 ) , t is a collection of pixels with arbitrary values and shapes . In Eq . 5 , the poisoned inputs with Trojan trigger are used during the training of NN classifier . The targeted labels ( i.e. , unexpected behavior ) for these poisoned training inputs are yt . Several defense approaches against Trojan backdoors have been proposed , such as Neural Cleanse ( Wang et al. , 2019 ) and STRIP ( Gao et al. , 2019 ) . Combination of Attacks . A limited number of recent works explore the combination of different types of attacks ( Quiring & Rieck , 2020 ; Pang et al. , 2020 ) . However , they are fundamentally different from our AdvTrojan attack . Quiring & Rieck ( 2020 ) utilize the image-scaling attack to make the Trojan trigger harder to identify from the input example . As a result , this combination is more like an enhanced Trojan attack . The most recent paper , Pang et al . ( 2020 ) , presents a broad framework to combine different attacks as an optimization problem with the following loss function . L = l ( x , θ ) + λlf ( x ) + νls ( θ ) ( 6 ) Here , function l represents the loss of the adversary ’ s target ; e.g. , the trained model misclassifies the attack inputs . The lf function is the constraint on the pixel-level perturbation . The function ls constraints the perturbation on model parameters . λ and ν are weights assigned to lf and ls , respectively . Our AdvTrojan is different from ( Pang et al. , 2020 ) in three aspects . ( 1 ) The first difference is the implementation of lf function . Pang et al . ( 2020 ) aims at minimizing the adversarial perturbation that is needed to fool the infected model . Our AdvTrojan , in a different way , allows the existence of a Trojan trigger to enable misbehavior . ( 2 ) Our AdvTrojan has a different design in function ls . Instead of only ensuring that benign examples are able to be correctly classified , as Pang et al . ( 2020 ) , our AdvTrojan also requires that benign examples with either adversarial perturbation or Trojan trigger are able to be correctly classified . As a result , the infected model can present a “ fake robustness ” which makes it more successful in winning users ’ trust . ( 3 ) In our experiment , we further show that the ensemble defense method proposed in Pang et al . ( 2020 ) against the attack framework ( Eq . 6 ) fails to defend against our AdvTrojan combined attack . | Based on the framework proposed by Pang et al. (2020), this paper unifies adversarial examples and Trojan backdoors into a synergistic attack. The inference results are dominated by the Trojan trigger and the adversarial perturbations. Such a mechanism extends the ability of the Trojan trigger. Incorporated with adversarial perturbations, the desired results of the adversary could be multiple classes. | SP:bb9e587a38647060cbd38e3aad4376b19b18bd4d |
Recovering Geometric Information with Learned Texture Perturbations | 1 INTRODUCTION Since neural networks are trained to generalize to unseen data , regularization is important for reducing overfitting , see e.g . Goodfellow et al . ( 2016 ) ; Scholkopf & Smola ( 2001 ) . However , regularization also removes some of the high variance characteristic of much of the physical world . Even though high-quality ground truth data can be collected or generated to reflect the desired complexity of the outputs , regularization will inevitably smooth network predictions . Rather than attempting to directly infer highfrequency features , we alternatively propose to learn a low-frequency space in which such features can be embedded . We focus on the specific task of adding highfrequency wrinkles to virtual clothing , noting that the idea of learning a low-frequency embedding may be generalized to other tasks . Because cloth wrinkles/folds are high-frequency features , existing deep neural networks ( DNNs ) trained to infer cloth shape tend to predict overly smooth meshes Alldieck et al . ( 2019a ) ; Daněřek et al . ( 2017 ) ; Guan et al . ( 2012 ) ; Gundogdu et al . ( 2019 ) ; Jin et al . ( 2020 ) ; Lahner et al . ( 2018 ) ; Natsume et al . ( 2019 ) ; Santesteban et al . ( 2019 ) ; Wang et al . ( 2018 ) ; Patel et al . ( 2020 ) . Rather than attempting to amend such errors directly , we perturb texture so that the rendered cloth mesh appears to more closely match the ground truth . See Figure 1 . Then given texture perturbations from at least two unique camera views , 3D geometry can be accurately reconstructed Hartley & Sturm ( 1997 ) to recover high-frequency wrinkles . Similarly , for AR/VR applications , correcting visual appearance from two views ( one for each eye ) is enough to allow the viewer to accurately discern 3D geometry . Our proposed texture coordinate perturbations are highly dependent on the camera view . Thus , we demonstrate that one can train a separate texture sliding neural network ( TSNN ) for each of a finite number of cameras laid out into an array and use nearby networks to interpolate results valid for any view enveloped by the array . Although an approach similar in spirit might be pursued for various lighting conditions , this limitation is left as future work since there are a great deal of applications where the light is ambient/diffuse/non-directional/etc . In such situations , this further complication may be ignored without significant repercussion . 2 RELATED WORK . Cloth : While physically-based cloth simulation has matured as a field over the last few decades Baraff & Witkin ( 1998 ) ; Baraff et al . ( 2003 ) ; Bridson et al . ( 2002 ; 2003 ) ; Selle et al . ( 2008 ) , datadriven methods are attractive for many applications . There is a rich body of work in reconstructing cloth from multiple views or 3D scans , see e.g . Bradley et al . ( 2008b ) ; Franco et al . ( 2006 ) ; Vlasic et al . ( 2008 ) . More recently , optimization-based methods have been used to generate higher resolution reconstructions Huang et al . ( 2015 ) ; Pons-Moll et al . ( 2017 ) ; Wu et al . ( 2012 ) ; Yang et al . ( 2016 ) . Some of the most interesting work focuses on reconstructing the body and cloth separately Bălan & Black ( 2008 ) ; Neophytou & Hilton ( 2014 ) ; Yang et al . ( 2018 ) ; Zhang et al . ( 2017 ) . With advances in deep learning , one can aim to reconstruct 3D cloth meshes from single views . A number of approaches reconstruct a joint cloth/body mesh from a single RGB image Alldieck et al . ( 2019a ; b ) ; Natsume et al . ( 2019 ) ; Onizuka et al . ( 2020 ) ; Saito et al . ( 2019 ; 2020 ) , RGB-D image Yu et al . ( 2019 ) , or video Alldieck et al . ( 2018a ; b ) ; Habermann et al . ( 2019 ) ; Xu et al . ( 2018 ) . To reduce the dimensionality of the output space , DNNs are often trained to predict the pose/shape parameters of human body models such as SCAPE Anguelov et al . ( 2005 ) or SMPL Loper et al . ( 2015 ) ( see also Pavlakos et al . ( 2019 ) ) . Habermann et al . ( 2019 ) ; Natsume et al . ( 2019 ) ; Varol et al . ( 2018 ) leverage predicted pose information to infer shape . When only the garment shape is predicted , a number of recent works output predictions in UV space to represent geometric information as pixels Daněřek et al . ( 2017 ) ; Jin et al . ( 2020 ) ; Lahner et al . ( 2018 ) , although others Gundogdu et al . ( 2019 ) ; Santesteban et al . ( 2019 ) ; Patel et al . ( 2020 ) define loss functions directly in terms of the 3D cloth vertices . Wrinkles and Folds : Cloth realism can be improved by introducing wrinkles and folds . In the graphics community , researchers have explored both procedural and data-driven methods for generating wrinkles De Aguiar et al . ( 2010 ) ; Guan et al . ( 2012 ) ; Hahn et al . ( 2014 ) ; Müller & Chentanez ( 2010 ) ; Rohmer et al . ( 2010 ) ; Wang et al . ( 2010 ) . Other works add real-world wrinkles as a postprocessing step to improve smooth captured cloth : Popa et al . ( 2009 ) extracts the edges of cloth folds and then applies space-time deformations , Robertini et al . ( 2014 ) solves for shape deformations directly by optimizing over all frames of a video sequence . Recently , Lahner et al . ( 2018 ) used a conditional Generative Adversarial Network Mirza & Osindero ( 2014 ) to generate normal maps as proxies for wrinkles on captured cloth . Geometry : More broadly , deep learning on 3D meshes falls under the umbrella of geometric deep learning , which was coined by Bronstein et al . ( 2017 ) to characterize learning in non-Euclidean domains . Scarselli et al . ( 2008 ) was one of the earliest works in this area and introduced the notion of a Graph Neural Network ( GNN ) in relation to CNNs . Subsequent works similarly extend the CNN architecture to graphs and manifolds Boscaini et al . ( 2016 ) ; Maron et al . ( 2017 ) ; Masci et al . ( 2015 ) ; Monti et al . ( 2017 ) . Kostrikov et al . ( 2018 ) introduces a latent representation that explicitly incorporates the Dirac operator to detect principal curvature directions . Tan et al . ( 2018 ) trains a mesh generative model to generate novel meshes outside an original dataset . Returning to the specific application of virtual cloth , Jin et al . ( 2020 ) embeds a non-Euclidean cloth mesh into a Euclidean pixel space , making it possible to directly use CNNs to make non-Euclidean predictions . 3 METHODS . We define texture sliding as the changing of texture coordinates on a per-camera basis such that any point which is visible from some stereo pair of cameras can be triangulated back to its ground truth position . Other stereo reconstruction techniques can also be used in place of triangulation because the images we generate are consistent with the ground truth geometry . See e.g . Bradley et al . ( 2008a ) ; Hartley & Sturm ( 1997 ) ; Seitz et al . ( 2006 ) . 3.1 PER-VERTEX DISCRETIZATION . Since the cloth mesh is discretized into vertices and triangles , we take a per-vertex , not a per-point , approach to texture sliding . Our proposed method ( see Section 4.1 ) computes per-vertex texture coordinates on the inferred cloth that match those of the ground truth as seen by the camera under consideration . Then during 3D reconstruction , barycentric interpolation is used to find the subtriangle locations of the texture coordinates corresponding to ground truth cloth vertices . This assumes linearity , which is only valid when the triangles are small enough to capture the inherent nonlinearities in a piecewise linear sense ; moreover , folds and wrinkles can create significant nonlinearity . See Figure 2 . 3.2 OCCLUSION BOUNDARIES . Accurate 3D reconstruction requires that a vertex of the ground truth mesh be visible from at least two cameras and that camera projections of the vertex to the inferred cloth exist and are valid . However , occlusions can derail these assumptions . First , consider things from the standpoint of the inferred cloth . For a given camera view , some inferred cloth triangles will not contain any visible pixels , and we denote a vertex as occluded when none of its incident triangles contain any visible pixels . Although we do not assign perturbed texture coordinates to occluded vertices ( i.e . they keep their original texture coordinates , or a perturbation of zero ) , we do aim to keep the texture coordinate perturbation function smooth ( see Section 4.2 ) . In addition , there will be so called non-occluded vertices in the inferred cloth that do not project to visible pixels of the ground truth cloth . This often occurs near silhouette boundaries where the inferred cloth silhouette is sometimes wider than the ground truth cloth silhouette . These vertices are also treated as occluded , similar to those around the back side of the cloth behind the silhouette , essentially treating some extra vertices near occlusion boundaries as also being occluded . See Figure 3a . Next , consider things from the standpoint of the ground truth cloth . For example , consider the case where all the cameras are in the front , and vertices on the back side of the ground truth cloth are not visible from any camera . The best one can do in reconstructing these occluded vertices is to use the inferred cloth vertex positions ; however , care should be taken near occlusion boundaries to smoothly taper between our texture sliding 3D reconstruction and the inferred cloth prediction . A simple approach is to extrapolate/smooth the geometric difference between our texture sliding 3D reconstruction and the inferred cloth prediction to occluded regions of the mesh . Once again , the definition of occluded vertices needs to be broadened for silhouette consideration . Not only will vertices not visible from at least two cameras have to be considered occluded , but vertices that don ’ t project to the interior of an inferred cloth triangle with valid texture coordinate perturbations will also have to be considered occluded . See Figure 3b . 4 DATASET GENERATION . Let C = { X , T } be a cloth triangulated surface with n vertices X ∈ R3n and texture coordinates T ∈ R2n . We assume that mesh connectivity remains fixed throughout . The ground truth cloth mesh CG ( θ ) = { XG ( θ ) , TG } depends on the pose θ . Given a pre-trained DNN ( we use the network from Jin et al . ( 2020 ) ) , the inferred cloth CN ( θ ) = { XN ( θ ) , TG } is also a function of the pose θ . Our objective is to replace the ground truth texture coordinates TG with perturbed texture coordinates TN ( θ , v ) , i.e . to compute C ′N ( θ , v ) = { XN ( θ ) , TN ( θ , v ) } where TN ( θ , v ) depends on both the pose θ and the view v. Even though TN ( θ , v ) is in principle valid for all v using interpolation ( see Section 6.3 ) , training data TN ( θ , vp ) is only required for a finite number of camera views vp . For each camera p , we also only require training data for finite number of poses θk , i.e . we require TN ( θk , vp ) , which is computed from TG using XG ( θk ) , XN ( θk ) , and vp . | The paper proposes a method to correct high-frequencies details in the textures of animated clothes. The main idea is to train a network to learn the 2D offset in the UV space for a given pose and view. The paper shows results using a t-shirt, on interpolating to novel views and 3D reconstruction by correcting the output of a state of the art method. | SP:a6950f04dd32e542da2dbb2ef34603274b2e178f |
Recovering Geometric Information with Learned Texture Perturbations | 1 INTRODUCTION Since neural networks are trained to generalize to unseen data , regularization is important for reducing overfitting , see e.g . Goodfellow et al . ( 2016 ) ; Scholkopf & Smola ( 2001 ) . However , regularization also removes some of the high variance characteristic of much of the physical world . Even though high-quality ground truth data can be collected or generated to reflect the desired complexity of the outputs , regularization will inevitably smooth network predictions . Rather than attempting to directly infer highfrequency features , we alternatively propose to learn a low-frequency space in which such features can be embedded . We focus on the specific task of adding highfrequency wrinkles to virtual clothing , noting that the idea of learning a low-frequency embedding may be generalized to other tasks . Because cloth wrinkles/folds are high-frequency features , existing deep neural networks ( DNNs ) trained to infer cloth shape tend to predict overly smooth meshes Alldieck et al . ( 2019a ) ; Daněřek et al . ( 2017 ) ; Guan et al . ( 2012 ) ; Gundogdu et al . ( 2019 ) ; Jin et al . ( 2020 ) ; Lahner et al . ( 2018 ) ; Natsume et al . ( 2019 ) ; Santesteban et al . ( 2019 ) ; Wang et al . ( 2018 ) ; Patel et al . ( 2020 ) . Rather than attempting to amend such errors directly , we perturb texture so that the rendered cloth mesh appears to more closely match the ground truth . See Figure 1 . Then given texture perturbations from at least two unique camera views , 3D geometry can be accurately reconstructed Hartley & Sturm ( 1997 ) to recover high-frequency wrinkles . Similarly , for AR/VR applications , correcting visual appearance from two views ( one for each eye ) is enough to allow the viewer to accurately discern 3D geometry . Our proposed texture coordinate perturbations are highly dependent on the camera view . Thus , we demonstrate that one can train a separate texture sliding neural network ( TSNN ) for each of a finite number of cameras laid out into an array and use nearby networks to interpolate results valid for any view enveloped by the array . Although an approach similar in spirit might be pursued for various lighting conditions , this limitation is left as future work since there are a great deal of applications where the light is ambient/diffuse/non-directional/etc . In such situations , this further complication may be ignored without significant repercussion . 2 RELATED WORK . Cloth : While physically-based cloth simulation has matured as a field over the last few decades Baraff & Witkin ( 1998 ) ; Baraff et al . ( 2003 ) ; Bridson et al . ( 2002 ; 2003 ) ; Selle et al . ( 2008 ) , datadriven methods are attractive for many applications . There is a rich body of work in reconstructing cloth from multiple views or 3D scans , see e.g . Bradley et al . ( 2008b ) ; Franco et al . ( 2006 ) ; Vlasic et al . ( 2008 ) . More recently , optimization-based methods have been used to generate higher resolution reconstructions Huang et al . ( 2015 ) ; Pons-Moll et al . ( 2017 ) ; Wu et al . ( 2012 ) ; Yang et al . ( 2016 ) . Some of the most interesting work focuses on reconstructing the body and cloth separately Bălan & Black ( 2008 ) ; Neophytou & Hilton ( 2014 ) ; Yang et al . ( 2018 ) ; Zhang et al . ( 2017 ) . With advances in deep learning , one can aim to reconstruct 3D cloth meshes from single views . A number of approaches reconstruct a joint cloth/body mesh from a single RGB image Alldieck et al . ( 2019a ; b ) ; Natsume et al . ( 2019 ) ; Onizuka et al . ( 2020 ) ; Saito et al . ( 2019 ; 2020 ) , RGB-D image Yu et al . ( 2019 ) , or video Alldieck et al . ( 2018a ; b ) ; Habermann et al . ( 2019 ) ; Xu et al . ( 2018 ) . To reduce the dimensionality of the output space , DNNs are often trained to predict the pose/shape parameters of human body models such as SCAPE Anguelov et al . ( 2005 ) or SMPL Loper et al . ( 2015 ) ( see also Pavlakos et al . ( 2019 ) ) . Habermann et al . ( 2019 ) ; Natsume et al . ( 2019 ) ; Varol et al . ( 2018 ) leverage predicted pose information to infer shape . When only the garment shape is predicted , a number of recent works output predictions in UV space to represent geometric information as pixels Daněřek et al . ( 2017 ) ; Jin et al . ( 2020 ) ; Lahner et al . ( 2018 ) , although others Gundogdu et al . ( 2019 ) ; Santesteban et al . ( 2019 ) ; Patel et al . ( 2020 ) define loss functions directly in terms of the 3D cloth vertices . Wrinkles and Folds : Cloth realism can be improved by introducing wrinkles and folds . In the graphics community , researchers have explored both procedural and data-driven methods for generating wrinkles De Aguiar et al . ( 2010 ) ; Guan et al . ( 2012 ) ; Hahn et al . ( 2014 ) ; Müller & Chentanez ( 2010 ) ; Rohmer et al . ( 2010 ) ; Wang et al . ( 2010 ) . Other works add real-world wrinkles as a postprocessing step to improve smooth captured cloth : Popa et al . ( 2009 ) extracts the edges of cloth folds and then applies space-time deformations , Robertini et al . ( 2014 ) solves for shape deformations directly by optimizing over all frames of a video sequence . Recently , Lahner et al . ( 2018 ) used a conditional Generative Adversarial Network Mirza & Osindero ( 2014 ) to generate normal maps as proxies for wrinkles on captured cloth . Geometry : More broadly , deep learning on 3D meshes falls under the umbrella of geometric deep learning , which was coined by Bronstein et al . ( 2017 ) to characterize learning in non-Euclidean domains . Scarselli et al . ( 2008 ) was one of the earliest works in this area and introduced the notion of a Graph Neural Network ( GNN ) in relation to CNNs . Subsequent works similarly extend the CNN architecture to graphs and manifolds Boscaini et al . ( 2016 ) ; Maron et al . ( 2017 ) ; Masci et al . ( 2015 ) ; Monti et al . ( 2017 ) . Kostrikov et al . ( 2018 ) introduces a latent representation that explicitly incorporates the Dirac operator to detect principal curvature directions . Tan et al . ( 2018 ) trains a mesh generative model to generate novel meshes outside an original dataset . Returning to the specific application of virtual cloth , Jin et al . ( 2020 ) embeds a non-Euclidean cloth mesh into a Euclidean pixel space , making it possible to directly use CNNs to make non-Euclidean predictions . 3 METHODS . We define texture sliding as the changing of texture coordinates on a per-camera basis such that any point which is visible from some stereo pair of cameras can be triangulated back to its ground truth position . Other stereo reconstruction techniques can also be used in place of triangulation because the images we generate are consistent with the ground truth geometry . See e.g . Bradley et al . ( 2008a ) ; Hartley & Sturm ( 1997 ) ; Seitz et al . ( 2006 ) . 3.1 PER-VERTEX DISCRETIZATION . Since the cloth mesh is discretized into vertices and triangles , we take a per-vertex , not a per-point , approach to texture sliding . Our proposed method ( see Section 4.1 ) computes per-vertex texture coordinates on the inferred cloth that match those of the ground truth as seen by the camera under consideration . Then during 3D reconstruction , barycentric interpolation is used to find the subtriangle locations of the texture coordinates corresponding to ground truth cloth vertices . This assumes linearity , which is only valid when the triangles are small enough to capture the inherent nonlinearities in a piecewise linear sense ; moreover , folds and wrinkles can create significant nonlinearity . See Figure 2 . 3.2 OCCLUSION BOUNDARIES . Accurate 3D reconstruction requires that a vertex of the ground truth mesh be visible from at least two cameras and that camera projections of the vertex to the inferred cloth exist and are valid . However , occlusions can derail these assumptions . First , consider things from the standpoint of the inferred cloth . For a given camera view , some inferred cloth triangles will not contain any visible pixels , and we denote a vertex as occluded when none of its incident triangles contain any visible pixels . Although we do not assign perturbed texture coordinates to occluded vertices ( i.e . they keep their original texture coordinates , or a perturbation of zero ) , we do aim to keep the texture coordinate perturbation function smooth ( see Section 4.2 ) . In addition , there will be so called non-occluded vertices in the inferred cloth that do not project to visible pixels of the ground truth cloth . This often occurs near silhouette boundaries where the inferred cloth silhouette is sometimes wider than the ground truth cloth silhouette . These vertices are also treated as occluded , similar to those around the back side of the cloth behind the silhouette , essentially treating some extra vertices near occlusion boundaries as also being occluded . See Figure 3a . Next , consider things from the standpoint of the ground truth cloth . For example , consider the case where all the cameras are in the front , and vertices on the back side of the ground truth cloth are not visible from any camera . The best one can do in reconstructing these occluded vertices is to use the inferred cloth vertex positions ; however , care should be taken near occlusion boundaries to smoothly taper between our texture sliding 3D reconstruction and the inferred cloth prediction . A simple approach is to extrapolate/smooth the geometric difference between our texture sliding 3D reconstruction and the inferred cloth prediction to occluded regions of the mesh . Once again , the definition of occluded vertices needs to be broadened for silhouette consideration . Not only will vertices not visible from at least two cameras have to be considered occluded , but vertices that don ’ t project to the interior of an inferred cloth triangle with valid texture coordinate perturbations will also have to be considered occluded . See Figure 3b . 4 DATASET GENERATION . Let C = { X , T } be a cloth triangulated surface with n vertices X ∈ R3n and texture coordinates T ∈ R2n . We assume that mesh connectivity remains fixed throughout . The ground truth cloth mesh CG ( θ ) = { XG ( θ ) , TG } depends on the pose θ . Given a pre-trained DNN ( we use the network from Jin et al . ( 2020 ) ) , the inferred cloth CN ( θ ) = { XN ( θ ) , TG } is also a function of the pose θ . Our objective is to replace the ground truth texture coordinates TG with perturbed texture coordinates TN ( θ , v ) , i.e . to compute C ′N ( θ , v ) = { XN ( θ ) , TN ( θ , v ) } where TN ( θ , v ) depends on both the pose θ and the view v. Even though TN ( θ , v ) is in principle valid for all v using interpolation ( see Section 6.3 ) , training data TN ( θ , vp ) is only required for a finite number of camera views vp . For each camera p , we also only require training data for finite number of poses θk , i.e . we require TN ( θk , vp ) , which is computed from TG using XG ( θk ) , XN ( θk ) , and vp . | This paper presents a general approach to embed high frequency information into low-frequency data with a particular focus on improving the performance of virtual clothing. To address over-smoothing issues in the predicted meshes, authors proposed the texture sliding method that changes texture coordinates on each camera through the deep networks. The texture sliding neural network (TSNN) is trained using the ground truth offset computed for each camera and pose. | SP:a6950f04dd32e542da2dbb2ef34603274b2e178f |
Failure Modes of Variational Autoencoders and Their Effects on Downstream Tasks | 1 INTRODUCTION . Variational Auto-encoders ( VAEs ) are deep generative latent variable models that transform simple distributions over a latent space to model complex data distributions Kingma & Welling ( 2013 ) . They have been used for a wide range of downstream tasks , including : generating realistic looking synthetic data ( e.g Pu et al . ( 2016 ) ) , learning compressed representations ( e.g . Miao & Blunsom ( 2016 ) ; Gregor et al . ( 2016 ) ; Alemi et al . ( 2017 ) ) , adversarial defense using de-noising ( Luo & Pfister , 2018 ; Ghosh et al. , 2018 ) , and , when expert knowledge is available , generating counter-factual data using weak or semi-supervision ( e.g . Kingma et al . ( 2014 ) ; Siddharth et al . ( 2017 ) ; Klys et al . ( 2018 ) ) . Variational auto-encoders are widely used by practitioners due to the ease of their implementation and simplicity of their training . In particular , the common choice of mean-field Gaussian ( MFG ) approximate posteriors for VAEs ( MFG-VAE ) results an inference procedure that is straight-forward to implement and stable in training . Unfortunately , a growing body of work has demonstrated that MFG-VAEs suffer from a variety of pathologies , including learning un-informative latent codes ( e.g.van den Oord et al . ( 2017 ) ; Kim et al . ( 2018 ) ) and unrealistic data distributions ( e.g . Tomczak & Welling ( 2017 ) ) . When the data consists of images or text , rather than evaluating the model based on metrics alone , we often rely on “ gut checks ” to make sure that the quality of the latent representations the model learns and the synthetic data ( as well as counterfactual data ) generated by the model is high ( e.g . by reading generate text or inspecting generated images visually ( Chen et al. , 2018 ; Klys et al. , 2018 ) ) . However , as VAEs are increasingly being used in application where the data is numeric , e.g . in medical or financial domains ( Pfohl et al. , 2019 ; Joshi et al. , 2019 ; Way & Greene , 2017 ) , these intuitive qualitative checks no longer apply . For example , in many medical applications , the original data features themselves ( e.g . biometric reading ) are difficult to analyze by human experts in raw form . In these cases , where the application touches human lives and potential model error/pathologies are particularly consequential , we need to have a clear theoretical understanding of the failure modes of our models as well as the potential negative consequences on down-stream tasks . Recent work ( Yacoby et al. , 2020 ) attributes a number of the pathologies of MFG-VAEs to properties of the training objective ; in particular , the objective may compromise learning a good generative model in order to learn a good inference model – in other words , the inference model over-regularizes the generative model . While this pathology has been noted in literature ( Burda et al. , 2016 ; Zhao et al. , 2017 ; Cremer et al. , 2018 ) , no prior work has characterizes the conditions under which the MFG-VAE objective compromises learning a good generative model in order to learn a good inference model ; moreover , no prior work has related MFG-VAE pathologies with the performance on downstream tasks . Rather , existing literature focuses on mitigating the regularizing effect of the inference model on the VAE generative model by using richer variational families ( e.g . Kingma et al . ( 2016 ) ; Nowozin ( 2018 ) ; Luo et al . ( 2020 ) ) . While promising , these methods introduce potentially significant additional computational costs to training , as well as new training issues ( e.g . noisy gradients Roeder et al . ( 2017 ) ; Tucker et al . ( 2018 ) ; Rainforth et al . ( 2019 ) ) . As such , it is important to understand precisely when MFG-VAEs exhibit pathologies and when alternative training methods are worth the computational trade-off . In this paper , we characterize the conditions under which MFG-VAEs perform poorly and link these failures to effects on a range of downstream tasks . While we might expect that methods designed to mitigate VAE training pathologies ( e.g . methods with richer variational families ( Kingma et al. , 2016 ) ) , will also alleviate the negative downstream effects , we find that this is not always so . Our observations point to reasons for further studying the performance VAE alternatives in these applications . Our contributions are both theoretical and empirical : I . When VAE pathologies occur : ( 1 ) We characterize concrete conditions under which learning the inference model will compromise learning the generative model for MFG-VAEs . More problematically , we show that these bad solutions are globally optimal for the training objective , the ELBO . ( 2 ) We demonstrate that using the ELBO to select the output noise variance and the latent dimension results in biased estimates . ( 3 ) We propose synthetic data-sets that trigger these two pathologies and can be used to test future proposed inference methods . II . Effects on tasks : ( 4 ) We demonstrate ways in which these pathologies affect key downstream tasks , including learning compressed , disentangled representations , adversarial robustness and semisupervised learning . In semi-supervised learning , we are the first to document the instance of “ functional collapse ” , in which the data conditionals problematically collapse to the same distribution . ( 5 ) Lastly , we show that while the use of richer variational families alleviate VAE pathologies on unsupervised learning tasks , they introduce new ones in the semi-supervised tasks . These contributions help identify when MFG-VAEs suffice , and when advanced methods are needed . 2 RELATED WORK . Existing works that characterize MFG-VAEs pathologies largely focus on relating local optima of the training objective to a single pathology : the un-informativeness of the learned latent codes ( posterior collapse ) ( He et al. , 2019 ; Lucas et al. , 2019 ; Dai et al. , 2019 ) . In contrast , there has been little work to characterize pathologies at the global optima of the MFG-VAE ’ s training objective . Yacoby et al . ( 2020 ) show that , when the decoder ’ s capacity is restricted , posterior collapse and the mismatch between aggregated posterior and prior can occur as global optima of the training objective . In contrast , we focus on global optima of the MFG-VAE objective in fully general settings : with fully flexible generative and inference models , as well as with and without learned observation noise . Previous works ( e.g . Yacoby et al . ( 2020 ) ) have connected VAE pathologies like posterior collapse to the over-regularizing effect of the variational family on the generative model . However while there are many works that mitigate the over-regularization issue ( e.g . Burda et al . ( 2016 ) ; Zhao et al . ( 2017 ) ; Cremer et al . ( 2018 ) ; Shu et al . ( 2018 ) ) , none have given a full characterization of when the learned generative model is over-regularized , nor have they related the quality of the learned model to its performance on down-stream tasks . In particular , these works have shown that their proposed methods have higher test log-likelihood relative to a MFG-VAEs , but as we show in this paper , high test log-likelihood is not the only property needed for good performance on downstream tasks . Lastly , these works all propose fixes that require a potentially significant computational overhead . For instance , works that use complex variational families , such as normalizing flows ( Kingma et al. , 2016 ) , require a significant number of parameters to scale ( Kingma & Dhariwal , 2018 ) . In the case of the Importance Weighted Autoencoder ( IWAE ) objective ( Burda et al. , 2016 ) , which can be interpreted as having a more complex variational family ( Cremer et al. , 2017 ) , the complexity of the posterior scales with the number of importance samples used . Lastly , works that de-bias existing bounds ( Nowozin , 2018 ; Luo et al. , 2020 ) all require several evaluations of the objective . Given that MFG-VAEs remain popular today due to the ease of their implementation , speed of training , and their theoretical connections to other dimensionality reduction approaches like probabilistic PCA ( Rolinek et al. , 2019 ; Dai et al . ; Lucas et al. , 2019 ) , it is important to characterize the training pathologies of MFG-VAE , as well as the concrete connections between these pathologies and downstream tasks . More importantly , this characterization will help clarify for which tasks and datasets a MFG-VAE suffices and for which the computational tradeoffs are worth it . 3 BACKGROUND . Unsupervised VAEs ( Kingma & Welling , 2013 ) A VAE assumes the following generative process : p ( z ) = N ( 0 , I ) , pθ ( x|z ) = N ( fθ ( z ) , σ2 · I ) ( 1 ) where x in RD , z ∈ RK is a latent variable and fθ is a neural network parametrized by θ . We learn the likelihood parameters θ while jointly approximating the posterior pθ ( z|x ) with qφ ( z|x ) : max θ Ep ( x ) [ log pθ ( x ) ] ≥ max θ , φ Ep ( x ) [ Eqφ ( z|x ) [ log pθ ( x|z ) p ( z ) qφ ( z|x ) ] ] = ELBO ( θ , φ ) ( 2 ) where p ( x ) is the true data distribution , pθ ( x ) is the learned data distribution , and qφ ( z|x ) is a MFG with mean and variance µφ ( x ) , σ2φ ( x ) , parameterized by neural network with parameters φ . The VAE ELBO can alternately be written as a sum of two objectives – the “ MLE objective ” ( MLEO ) , which maximizes the pθ ( x ) , and the “ posterior matching objective ” ( PMO ) , which encourages variational posteriors to match posteriors of the generative model . That is , we can write : argminθ , φ − ELBO ( θ , φ ) = argminθ , φ ( DKL [ p ( x ) ||pθ ( x ) ] ︸ ︷︷ ︸ MLEO +Ep ( x ) [ DKL [ qφ ( z|x ) ||pθ ( z|x ) ] ] ︸ ︷︷ ︸ PMO ) ( 3 ) This decomposition allows for a more intuitive interpretation of VAE training and illustrates the tension between approximating the true posteriors and approximating p ( x ) . Semi-Supervised VAEs We extend the VAE model and inference to incorporate partial labels , allowing for some supervision of the latent space dimensions . For this , we use the semi-supervised model introduced by Kingma et al . ( 2014 ) as the “ M2 model ” , which assumes the generative process , z ∼ N ( 0 , I ) , ∼ N ( 0 , σ2 · I ) , y ∼ p ( y ) , x|y , z = fθ ( y , z ) + ( 4 ) where y is observed only a portion of the time . The inference objective for this model is typically written as a sum of three objectives , a lower bound for the likelihood of M labeled observations , a lower bound for the likelihood for N unlabeled observations , and a term encouraging the discriminative powers of the variational posterior : J ( θ , φ ) = N∑ n=1 U ( xn ; θ , φ ) + γ · M∑ m=1 L ( xm , ym ; θ , φ ) + α · M∑ m=1 log qφ ( ym|xm ) ( 5 ) where the U and L lower bound pθ ( x ) and pθ ( x , y ) , respectively ( see Appendix A ) ; the last term in the sum is included to explicitly increase discriminative power of the posteriors qφ ( ym|xm ) ( Kingma et al . ( 2014 ) and Siddharth et al . ( 2017 ) ) ; α , γ controls the relative weights of the last two terms . Note that J ( θ , φ ) is only a lower bound of the observed data log-likelihood only when γ = 1 , α = 0 , but in practice , γ , α are tuned as hyper-parameters . Following Kingma et al . ( 2014 ) , we assume a MFG variational family for each of the unlabeled and labeled objectives . | The paper presents two analysis: (1) Characterization of when the training of VAEs using the ELBO leads to suboptimal generative models (biased towards ones with simple posteriors); and (2) How this suboptimality may affect downstream tasks that use the learned models. Specifically, the work focuses on VAEs using mean-field Gaussians as variational distributions, and explores how their limited modeling capacity affects the final generative model learned. They present some theoretical results and simple and illustrative scenarios. In addition, they present an analysis regarding how the suboptimal models learned affect other tasks, such as learning disentangled or compressed representations. | SP:6b329d6858b6dd7bda5fa7a547c086a7fb98116e |
Failure Modes of Variational Autoencoders and Their Effects on Downstream Tasks | 1 INTRODUCTION . Variational Auto-encoders ( VAEs ) are deep generative latent variable models that transform simple distributions over a latent space to model complex data distributions Kingma & Welling ( 2013 ) . They have been used for a wide range of downstream tasks , including : generating realistic looking synthetic data ( e.g Pu et al . ( 2016 ) ) , learning compressed representations ( e.g . Miao & Blunsom ( 2016 ) ; Gregor et al . ( 2016 ) ; Alemi et al . ( 2017 ) ) , adversarial defense using de-noising ( Luo & Pfister , 2018 ; Ghosh et al. , 2018 ) , and , when expert knowledge is available , generating counter-factual data using weak or semi-supervision ( e.g . Kingma et al . ( 2014 ) ; Siddharth et al . ( 2017 ) ; Klys et al . ( 2018 ) ) . Variational auto-encoders are widely used by practitioners due to the ease of their implementation and simplicity of their training . In particular , the common choice of mean-field Gaussian ( MFG ) approximate posteriors for VAEs ( MFG-VAE ) results an inference procedure that is straight-forward to implement and stable in training . Unfortunately , a growing body of work has demonstrated that MFG-VAEs suffer from a variety of pathologies , including learning un-informative latent codes ( e.g.van den Oord et al . ( 2017 ) ; Kim et al . ( 2018 ) ) and unrealistic data distributions ( e.g . Tomczak & Welling ( 2017 ) ) . When the data consists of images or text , rather than evaluating the model based on metrics alone , we often rely on “ gut checks ” to make sure that the quality of the latent representations the model learns and the synthetic data ( as well as counterfactual data ) generated by the model is high ( e.g . by reading generate text or inspecting generated images visually ( Chen et al. , 2018 ; Klys et al. , 2018 ) ) . However , as VAEs are increasingly being used in application where the data is numeric , e.g . in medical or financial domains ( Pfohl et al. , 2019 ; Joshi et al. , 2019 ; Way & Greene , 2017 ) , these intuitive qualitative checks no longer apply . For example , in many medical applications , the original data features themselves ( e.g . biometric reading ) are difficult to analyze by human experts in raw form . In these cases , where the application touches human lives and potential model error/pathologies are particularly consequential , we need to have a clear theoretical understanding of the failure modes of our models as well as the potential negative consequences on down-stream tasks . Recent work ( Yacoby et al. , 2020 ) attributes a number of the pathologies of MFG-VAEs to properties of the training objective ; in particular , the objective may compromise learning a good generative model in order to learn a good inference model – in other words , the inference model over-regularizes the generative model . While this pathology has been noted in literature ( Burda et al. , 2016 ; Zhao et al. , 2017 ; Cremer et al. , 2018 ) , no prior work has characterizes the conditions under which the MFG-VAE objective compromises learning a good generative model in order to learn a good inference model ; moreover , no prior work has related MFG-VAE pathologies with the performance on downstream tasks . Rather , existing literature focuses on mitigating the regularizing effect of the inference model on the VAE generative model by using richer variational families ( e.g . Kingma et al . ( 2016 ) ; Nowozin ( 2018 ) ; Luo et al . ( 2020 ) ) . While promising , these methods introduce potentially significant additional computational costs to training , as well as new training issues ( e.g . noisy gradients Roeder et al . ( 2017 ) ; Tucker et al . ( 2018 ) ; Rainforth et al . ( 2019 ) ) . As such , it is important to understand precisely when MFG-VAEs exhibit pathologies and when alternative training methods are worth the computational trade-off . In this paper , we characterize the conditions under which MFG-VAEs perform poorly and link these failures to effects on a range of downstream tasks . While we might expect that methods designed to mitigate VAE training pathologies ( e.g . methods with richer variational families ( Kingma et al. , 2016 ) ) , will also alleviate the negative downstream effects , we find that this is not always so . Our observations point to reasons for further studying the performance VAE alternatives in these applications . Our contributions are both theoretical and empirical : I . When VAE pathologies occur : ( 1 ) We characterize concrete conditions under which learning the inference model will compromise learning the generative model for MFG-VAEs . More problematically , we show that these bad solutions are globally optimal for the training objective , the ELBO . ( 2 ) We demonstrate that using the ELBO to select the output noise variance and the latent dimension results in biased estimates . ( 3 ) We propose synthetic data-sets that trigger these two pathologies and can be used to test future proposed inference methods . II . Effects on tasks : ( 4 ) We demonstrate ways in which these pathologies affect key downstream tasks , including learning compressed , disentangled representations , adversarial robustness and semisupervised learning . In semi-supervised learning , we are the first to document the instance of “ functional collapse ” , in which the data conditionals problematically collapse to the same distribution . ( 5 ) Lastly , we show that while the use of richer variational families alleviate VAE pathologies on unsupervised learning tasks , they introduce new ones in the semi-supervised tasks . These contributions help identify when MFG-VAEs suffice , and when advanced methods are needed . 2 RELATED WORK . Existing works that characterize MFG-VAEs pathologies largely focus on relating local optima of the training objective to a single pathology : the un-informativeness of the learned latent codes ( posterior collapse ) ( He et al. , 2019 ; Lucas et al. , 2019 ; Dai et al. , 2019 ) . In contrast , there has been little work to characterize pathologies at the global optima of the MFG-VAE ’ s training objective . Yacoby et al . ( 2020 ) show that , when the decoder ’ s capacity is restricted , posterior collapse and the mismatch between aggregated posterior and prior can occur as global optima of the training objective . In contrast , we focus on global optima of the MFG-VAE objective in fully general settings : with fully flexible generative and inference models , as well as with and without learned observation noise . Previous works ( e.g . Yacoby et al . ( 2020 ) ) have connected VAE pathologies like posterior collapse to the over-regularizing effect of the variational family on the generative model . However while there are many works that mitigate the over-regularization issue ( e.g . Burda et al . ( 2016 ) ; Zhao et al . ( 2017 ) ; Cremer et al . ( 2018 ) ; Shu et al . ( 2018 ) ) , none have given a full characterization of when the learned generative model is over-regularized , nor have they related the quality of the learned model to its performance on down-stream tasks . In particular , these works have shown that their proposed methods have higher test log-likelihood relative to a MFG-VAEs , but as we show in this paper , high test log-likelihood is not the only property needed for good performance on downstream tasks . Lastly , these works all propose fixes that require a potentially significant computational overhead . For instance , works that use complex variational families , such as normalizing flows ( Kingma et al. , 2016 ) , require a significant number of parameters to scale ( Kingma & Dhariwal , 2018 ) . In the case of the Importance Weighted Autoencoder ( IWAE ) objective ( Burda et al. , 2016 ) , which can be interpreted as having a more complex variational family ( Cremer et al. , 2017 ) , the complexity of the posterior scales with the number of importance samples used . Lastly , works that de-bias existing bounds ( Nowozin , 2018 ; Luo et al. , 2020 ) all require several evaluations of the objective . Given that MFG-VAEs remain popular today due to the ease of their implementation , speed of training , and their theoretical connections to other dimensionality reduction approaches like probabilistic PCA ( Rolinek et al. , 2019 ; Dai et al . ; Lucas et al. , 2019 ) , it is important to characterize the training pathologies of MFG-VAE , as well as the concrete connections between these pathologies and downstream tasks . More importantly , this characterization will help clarify for which tasks and datasets a MFG-VAE suffices and for which the computational tradeoffs are worth it . 3 BACKGROUND . Unsupervised VAEs ( Kingma & Welling , 2013 ) A VAE assumes the following generative process : p ( z ) = N ( 0 , I ) , pθ ( x|z ) = N ( fθ ( z ) , σ2 · I ) ( 1 ) where x in RD , z ∈ RK is a latent variable and fθ is a neural network parametrized by θ . We learn the likelihood parameters θ while jointly approximating the posterior pθ ( z|x ) with qφ ( z|x ) : max θ Ep ( x ) [ log pθ ( x ) ] ≥ max θ , φ Ep ( x ) [ Eqφ ( z|x ) [ log pθ ( x|z ) p ( z ) qφ ( z|x ) ] ] = ELBO ( θ , φ ) ( 2 ) where p ( x ) is the true data distribution , pθ ( x ) is the learned data distribution , and qφ ( z|x ) is a MFG with mean and variance µφ ( x ) , σ2φ ( x ) , parameterized by neural network with parameters φ . The VAE ELBO can alternately be written as a sum of two objectives – the “ MLE objective ” ( MLEO ) , which maximizes the pθ ( x ) , and the “ posterior matching objective ” ( PMO ) , which encourages variational posteriors to match posteriors of the generative model . That is , we can write : argminθ , φ − ELBO ( θ , φ ) = argminθ , φ ( DKL [ p ( x ) ||pθ ( x ) ] ︸ ︷︷ ︸ MLEO +Ep ( x ) [ DKL [ qφ ( z|x ) ||pθ ( z|x ) ] ] ︸ ︷︷ ︸ PMO ) ( 3 ) This decomposition allows for a more intuitive interpretation of VAE training and illustrates the tension between approximating the true posteriors and approximating p ( x ) . Semi-Supervised VAEs We extend the VAE model and inference to incorporate partial labels , allowing for some supervision of the latent space dimensions . For this , we use the semi-supervised model introduced by Kingma et al . ( 2014 ) as the “ M2 model ” , which assumes the generative process , z ∼ N ( 0 , I ) , ∼ N ( 0 , σ2 · I ) , y ∼ p ( y ) , x|y , z = fθ ( y , z ) + ( 4 ) where y is observed only a portion of the time . The inference objective for this model is typically written as a sum of three objectives , a lower bound for the likelihood of M labeled observations , a lower bound for the likelihood for N unlabeled observations , and a term encouraging the discriminative powers of the variational posterior : J ( θ , φ ) = N∑ n=1 U ( xn ; θ , φ ) + γ · M∑ m=1 L ( xm , ym ; θ , φ ) + α · M∑ m=1 log qφ ( ym|xm ) ( 5 ) where the U and L lower bound pθ ( x ) and pθ ( x , y ) , respectively ( see Appendix A ) ; the last term in the sum is included to explicitly increase discriminative power of the posteriors qφ ( ym|xm ) ( Kingma et al . ( 2014 ) and Siddharth et al . ( 2017 ) ) ; α , γ controls the relative weights of the last two terms . Note that J ( θ , φ ) is only a lower bound of the observed data log-likelihood only when γ = 1 , α = 0 , but in practice , γ , α are tuned as hyper-parameters . Following Kingma et al . ( 2014 ) , we assume a MFG variational family for each of the unlabeled and labeled objectives . | The paper presents a characterization of failure modes of Gaussian VAEs. It is known that Gaussian VAEs can fail to produce good models either by failing to match the data distribution or by learning latent variables that are uninformative. The paper builds upon prior work that suggests that the VAE objective can cause the inference model to over-regularize the generative model. The paper characterizes the conditions under which this over-regularization occurs with corresponding. Furthermore, the paper examines the affect of VAE pathologies on downstream tasks a number of unsupervised and supervised downstream tasks. | SP:6b329d6858b6dd7bda5fa7a547c086a7fb98116e |
Adaptive Extra-Gradient Methods for Min-Max Optimization and Games | 1 Introduction The surge of recent breakthroughs in generative adversarial networks ( GANs ) [ 20 ] , robust reinforcement learning [ 41 ] , and other adversarial learning models [ 27 ] has sparked renewed interest in the theory of min-max optimization problems and games . In this broad setting , it has become empirically clear that , ceteris paribus , the simultaneous training of two ( or more ) antagonistic models faces drastically new challenges relative to the training of a single one . Perhaps the most prominent of these challenges is the appearance of cycles and recurrent ( or even chaotic ) behavior in min-max games . This has been studied extensively in the context of learning in bilinear games , in both continuous [ 16 , 31 , 40 ] and discrete time [ 12 , 18 , 19 , 32 ] , and the methods proposed to overcome recurrence typically focus on mitigating the rotational component of min-max games . The method with the richest history in this context is the extra-gradient ( EG ) algorithm of Korpelevich [ 25 ] and its variants . The EG algorithm exploits the Lipschitz smoothness of the problem and , if coupled with a Polyak–Ruppert averaging scheme , it achieves an O ( 1/T ) rate of convergence in smooth , convex-concave min-max problems [ 35 ] . This rate is known to be tight [ 34 , 39 ] but , in order to achieve it , the original method requires the problem ’ s Lipschitz constant to be known in advance . If the problem is not Lipschitz smooth ( or the algorithm is run with a vanishing step-size schedule ) , the method ’ s rate of convergence drops to O ( 1/ √ T ) . Our contributions . Our aim in this paper is to provide an algorithm that automatically adapts to smooth / non-smooth min-max problems and games , and achieves order-optimal rates in both classes without requiring any prior tuning by the optimizer . In this regard , we propose a flexible algorithmic scheme , which we call AdaProx , and which exploits gradient data observed at earlier iterations to perform more informative extra-gradient steps in later ones . Thanks to this mechanism , and to the best of our knowledge , AdaProx is the first algorithm that simultaneously achieves the following : 1 . An O ( 1/ √ T ) convergence rate in non-smooth problems and O ( 1/T ) in smooth ones . 2 . Applicability to min-max problems and games where the standard boundedness / Lipschitz continuity conditions required in the literature do not hold . 3 . Convergence without prior knowledge of the problem ’ s parameters ( e.g. , whether the problem ’ s defining vector field is smooth or not , its smoothness modulus if it is , etc. ) . Our proposed method achieves the above by fusing the following ingredients : a ) a family of local norms – a Finsler metric – capturing any singularities in the problem at hand ; b ) a suitable mirror-prox template ; and c ) an adaptive step-size policy in the spirit of Rakhlin & Sridharan [ 43 ] . We also show that , under a suitable coherence assumption , the sequence of iterates generated by the algorithm converges , thus providing an appealing alternative to iterate averaging in cases where the method ’ s “ last iterate ” is more appropriate ( for instance , if using AdaProx to solve non-monotone problems ) . Related works . There have been several works improving on the guarantees of the original extragradient/mirror-prox template . We review the most relevant of these works below ; for convenience , we also tabulate these contributions in Table 1 above . Because many of these works appear in the literature on variational inequalities [ 15 ] , we also use this language in the sequel . In unconstrained problems with an operator that is locally Lipschitz continuous ( but not necessarily globally so ) , the golden ratio algorithm ( GRAAL ) [ 29 ] achieves convergence without requiring prior knowledge of the problem ’ s Lipschitz parameter . However , GRAAL provides no rate guarantees for non-smooth problems – and hence , a fortiori , no interpolation guarantees either . By contrast , such guarantees are provided in problems with a bounded domain by the generalized mirror-prox ( GMP ) algorithm of [ 47 ] under the umbrella of Hölder continuity . Still , nothing is known about the convergence of GRAAL / GMP in problems with singularities ( i.e. , when the problem ’ s defining vector field blows up at a boundary point of the problem ’ s domain ) . Singularities of this type were treated in a recent series of papers [ 1 , 17 , 48 ] by means of a “ Bregman continuity ” or “ Lipschitz-like ” condition . These methods are order-optimal in the smooth case , without requiring any knowledge of the problem ’ s smoothness modulus . On the other hand , like GRAAL ( but unlike GMP ) , they do not provide any rate interpolation guarantees between smooth and non-smooth problems . Another method that simultaneously achieves an O ( 1/ √ T ) rate in non-smooth problems and an O ( 1/T ) rate in smooth ones is the recent algorithm of Bach & Levy [ 2 ] . The BL algorithm employs an adaptive , AdaGradlike step-size policy which allows the method to interpolate between the two regimes – and this , even with noisy gradient feedback . On the negative side , the BL algorithm requires a bounded domain with a ( Bregman ) diameter that is known in advance ; as a result , its theoretical guarantees do not apply to unbounded problems . In addition , the BL algorithm makes crucial use of boundedness and Lipschitz continuity ; extending the BL method beyond this standard framework is a highly non-trivial endeavor which formed a big part of this paper ’ s motivation . 2 Problem Setup and Blanket Assumptions We begin in this section by reviewing some basics for min-max problems and games . 2.1 . Min-max / Saddle-point problems . A min-max game is a saddle-point problem of the form min θ∈Θ max φ∈Φ L ( θ , φ ) ( SP ) where Θ , Φ are convex subsets of some ambient real space and L : Θ × Φ→ is the problem ’ s loss function . In the game-theoretic interpretation of ( SP ) , the player controlling θ seeks to minimize L ( θ , φ ) for any value of the maximization variable φ , while the player controlling φ seeks to maximize L ( θ , φ ) for any value of the minimization variable θ . Accordingly , solving ( SP ) consists of finding a Nash equilibrium ( NE ) , i.e. , an action profile ( θ∗ , φ∗ ) ∈ Θ × Φ such that L ( θ∗ , φ ) ≤ L ( θ∗ , φ∗ ) ≤ L ( θ , φ∗ ) for all θ ∈ Θ , φ ∈ Φ . ( 1 ) By the minimax theorem of von Neumann [ 49 ] , Nash equilibria are guaranteed to exist when Θ , Φ are compact and L is convex-concave ( i.e. , convex in θ and concave in φ ) . Much of our paper is motivated by the question of calculating a Nash equilibrium ( θ∗ , φ∗ ) of ( SP ) in the context of von Neumann ’ s theorem ; we expand on this below . 2.2 . Games . Going beyond the min-max setting , a continuous game in normal form is defined as follows : First , consider a finite set of players N = { 1 , . . . , N } , each with their own action space Ki ∈ di ( assumed convex but possibly not closed ) . During play , each player selects an action xi from Ki with the aim of minimizing a loss determined by the ensemble x B ( xi ; x−i ) B ( x1 , . . . , xN ) of all players ’ actions . In more detail , writing K B ∏ i Ki for the game ’ s total action space , we assume that the loss incurred by the i-th player is ` i ( xi ; x−i ) , where ` i : K → is the player ’ s loss function . In this context , a Nash equilibrium is any action profile x∗ ∈ K that is unilaterally stable , i.e. , ` i ( x∗i ; x ∗ −i ) ≤ ` i ( xi ; x∗−i ) for all xi ∈ Ki and all i ∈ N . ( NE ) If each Ki is compact and ` i is convex in xi , existence of Nash equilibria is guaranteed by the theorem of Debreu [ 13 ] . Given that a min-max problem can be seen as a two-player zero-sum game with ` 1 = L , ` 2 = −L , von Neumann ’ s theorem may in turn be seen as a special case of Debreu ’ s ; in the sequel , we describe a first-order characterization of Nash equilibria that encapsulates both . In most cases of interest , the players ’ loss functions are individually subdifferentiable on a subset X of K with riK ⊆ X ⊆ K [ 21 , 44 ] . This means that there exists a ( possibly discontinuous ) vector field Vi : X → di such that ` i ( x′i ; x−i ) ≥ ` i ( xi ; x−i ) + 〈Vi ( x ) , x′i − xi〉 ( 2 ) for all x ∈ X , x′ ∈ K and all i ∈ N [ 21 ] . In the simplest case , if ` i is differentiable at x , then Vi ( x ) can be interpreted as the gradient of ` i with respect to xi . The raison d ’ être of the more general definition ( 2 ) is that it allows us to treat non-smooth loss functions that are common in machine learning ( such as L1-regularized losses ) . We make this distinction precise below : 1 . If there is no continuous vector field Vi ( x ) satisfying ( 2 ) , the game is called non-smooth . 2 . If there is a continuous vector field Vi ( x ) satisfying ( 2 ) , the game is called smooth . Remark . We stress here that the adjective “ smooth ” refers to the game itself : for instance , if ` ( x ) = |x| for x ∈ , the game is not smooth and any V satisfying ( 2 ) is discontinuous at 0 . In this regard , the above boils down to whether the ( individual ) subdifferential of each ` i admits a continuous selection . 2.3 . Resource allocation and equilibrium problems . The notion of a Nash equilibrium captures the unilateral minimization of the players ’ individual loss functions . In many pratical cases of interest , a notion of equilibrium is still relevant , even though it is not necessarily attached to the minimization of individual loss functions . Such problems are known as “ equilibrium problems ” [ 15 , 26 ] ; to avoid unnecessary generalities , we focus here on a relevant problem that arises in distributed computing architectures ( such as GPU clusters and the like ) . To state the problem , consider a distributed computing grid consisting of N parallel processors that serve demands arriving at a rate of ρ per unit of time ( measured e.g. , in flop/s ) . If the maximum processing rate of the i-th node is µi ( without overclocking ) , and jobs are buffered and served on a first-come , first-served ( FCFS ) basis , the mean time required to process a unit demand at the i-th node is given by the Kleinrock M/M/1 response function τi ( xi ) = 1/ ( µi − xi ) , where xi denotes the node ’ s load [ 5 ] . Accordingly , the set of feasible loads that can be processed by the grid is X B { ( x1 , . . . , xN ) : 0 ≤ xi < µi , x1 + · · · + xN = ρ } . In this context , a load profile x∗ ∈ X is said to be balanced if no infinitesimal process can be better served by buffering it at a different node [ 38 ] ; formally , this amounts to the so-called Wardrop equilibrium condition τi ( x∗i ) ≤ τ j ( x∗j ) for all i , j ∈ N with x∗i > 0 . ( WE ) We note here a crucial difference between ( WE ) and ( NE ) : if we view the grid ’ s computing nodes as “ players ” , the constraint ∑ i xi = ρ means that there is no allowable unilateral deviation ( x∗i ; x ∗ −i ) 7→ ( xi ; x∗−i ) with xi , x ∗ i . As a result , ( NE ) is meaningless as a requirement for this equilibrium problem . As we discuss below , this resource allocation problem will require the full capacity of our framework . 2.4 . Variational inequalities . Importantly , all of the above problems can be restated as a variational inequality of the form Find x∗ ∈ X such that 〈V ( x∗ ) , x − x∗〉 ≥ 0 for all x ∈ X . ( VI ) In the above , X is a convex subset of d ( not necessarily closed ) that represents the problem ’ s domain . The problem ’ s defining vector field V : X → d is then given as follows : In min-max problems and games , V is any field satisfying ( 2 ) ; otherwise , in equilibrium problems of the form ( WE ) , the components of V are Vi = τi ( we leave the details of this verification to the reader ) . This equivalent formulation is quite common in the literature on min-max / equilibrium problems [ 14 , 15 , 26 , 30 ] , and it is often referred to as the “ vector field formulation ” [ 3 , 8 , 23 ] . Its usefulness lies in that it allows us to abstract away from the underlying game-theoretic complications ( multiple indices , individual subdifferentials , etc . ) and provides a unifying framework for a wide range of problems in machine learning , signal processing , operations research , and many other fields [ 15 , 45 ] . For this reason , our analysis will focus almost exclusively on solving ( VI ) , and we will treat V and X ⊆ d , d = ∑i di , as the problem ’ s primitive data . 2.5 . Merit functions and monotonicity . A widely used assumption in the literature on equilibrium problems and variational inequalities is the monotonicity condition 〈V ( x ) − V ( x′ ) , x − x′〉 ≥ 0 for all x , x′ ∈ X . ( Mon ) In single-player games , monotonicity is equivalent to convexity of the optimizer ’ s loss function ; in min-max games , it is equivalent to L being convex-concave [ 26 ] ; etc . In the absence of monotonicity , approximating an equilibrium is PPAD-hard [ 11 ] , so we will state most of our results under ( Mon ) . Now , to assess the quality of a candidate solution x̂ ∈ X , we will employ the restricted merit function GapC ( x̂ ) = supx∈C〈V ( x ) , x̂ − x〉 , ( 3 ) where the “ test domain ” C is a nonempty convex subset of X [ 15 , 24 , 37 ] . The motivation for this is provided by the following proposition : Proposition 1 . Let C be a nonempty convex subset of X . Then : a ) GapC ( x̂ ) ≥ 0 whenever x̂ ∈ C ; and b ) if GapC ( x̂ ) = 0 and C contains a neighborhood of x̂ , then x̂ is a solution of ( VI ) . Proposition 1 generalizes an earlier characterization by Nesterov [ 37 ] and justifies the use of GapC ( x ) as a merit function for ( VI ) ; to streamline our presentation , we defer the proof to the paper ’ s supplement . Moreover , to avoid trivialities , we will also assume that the solution set X ∗ of ( VI ) is nonempty and we will reserve the notation x∗ for solutions of ( VI ) . Together with monotonicity , this will be our only blanket assumption . 3 The Extra-Gradient Algorithm and its Limits Perhaps the most widely used solution method for games and variational inequalities ( VIs ) is the extra-gradient ( EG ) algorithm of Korpelevich [ 25 ] and its variants [ 28 , 42 , 43 ] . This algorithm has a rich history in optimization , and it has recently attracted considerable interest in the fields of machine learning and AI , see e.g. , [ 8 , 12 , 18 , 22 , 23 , 32 , 33 ] and references therein . In its simplest form , for problems with closed domains , the algorithm proceeds recursively as Xt+1/2 = Π ( Xt − γtVt ) , Xt+1 = Π ( Xt − γtVt+1/2 ) , ( EG ) where Π ( x ) = arg minx′∈X ‖x′ − x‖ is the Euclidean projection on X , Vt B V ( Xt ) for t = 1 , 3/2 , . . . , and γt > 0 , is the method ’ s step-size . Then , running ( EG ) for T iterations , the algorithm returns the “ ergodic average ” X̄T = ∑T t=1 γtXt+1/2∑T t=1 γt . ( 4 ) In this setting , the main guarantees for ( EG ) date back to [ 35 ] and can be summarized as follows : 1 . For non-smooth problems ( discontinuous V ) : Assume V is bounded , i.e. , there exists some M > 0 such that ‖V ( x ) ‖ ≤ M for all x ∈ X . ( BD ) Then , if ( EG ) is run with a step-size of the form γt ∝ 1/ √ t , we have GapC ( X̄T ) = O ( 1/ √ T ) . ( 5 ) 2 . For smooth problems ( continuous V ) : Assume V is L-Lipschitz continuous , i.e. , ‖V ( x ) − V ( x′ ) ‖ ≤ L‖x − x′‖ for all x , x′ ∈ X . ( LC ) Then , if ( EG ) is run with a constant step-size γ < 1/L , we have GapC ( X̄T ) = O ( 1/T ) . ( 6 ) Remark . In the above , ‖·‖ is tacitly assumed to be the standard Euclidean norm . Non-Euclidean considerations will play a crucial role in the sequel , but they are not necessary for the moment . Importantly , the distinction between smooth and non-smooth problems can not be lifted : the bounds ( 5 ) and ( 6 ) are tight in their respective problem classes and they can not be improved without further assumptions [ 34 , 39 ] . Moreover , we should also note the following : 1 . The algorithm changes drastically from the non-smooth to the smooth case : non-smoothness requires γt ∝ 1/ √ t , but such a step-size can not achieve a fast O ( 1/T ) rate . 2 . If ( EG ) is run with a constant step-size , L must be known in advance ; otherwise , running ( EG ) with an ill-adapted step-size ( γ > 1/L ) could lead to non-convergence . We illustrate this failure of ( EG ) in Fig . 1 . As we discussed in the introduction , our aim in the sequel will be to provide a single , adaptive algorithm that simultaneously achieves the following : a ) an order-optimal O ( 1/ √ T ) convergence rate in non-smooth problems and O ( 1/T ) in smooth ones ; b ) convergence in problems where the boundedness / Lipschitz continuity conditions ( BD ) / ( LC ) no longer hold ; and c ) achieves all this without prior knowledge of the problem ’ s parameters . 4 Rate Interpolation : the Euclidean Case As a prelude to our main result , we provide in this section an adaptive version of ( EG ) that achieves the “ best of both worlds ” in the Euclidean setting of Section 3 , i.e. , an O ( 1/ √ T ) convergence rate in problems satisfying ( BD ) , and an O ( 1/T ) rate in problems satisfying ( LC ) . Our starting point is the observation that , if the sequence Xt produced by ( EG ) converges to a solution of ( VI ) , the difference δt B ‖Vt+1/2 − Vt‖ = ‖V ( Xt+1/2 ) − V ( Xt ) ‖ ( 7 ) must itself become vanishingly small if V is ( Lipschitz ) continuous . On the contrary , if V is discontinuous , this difference may remain bounded away from zero ( consider for example the L1 loss ` ( x ) = |x| near 0 ) . Based on this observation , we consider the adaptive step-size policy : γt+1 = 1 /√ 1 + ∑t s=1 δ 2 s . ( 8 ) The intuition behind ( 8 ) is as follows : If V is not smooth and lim inft→∞ δt > 0 , then γt will vanish at a Θ ( 1/ √ t ) rate , which is the optimal step-size schedule for problems satisfying ( BD ) but not ( LC ) . Instead , if V satisfies ( LC ) and Xt converges to a solution x∗ of ( VI ) , it is plausible to expect that the infinite series ∑ t δ 2 t is summable , in which case the step-size γt will not vanish as t → ∞ . Furthermore , since δt is defined in terms of successive gradient differences , it automatically exploits the variation of the gradient data observed up to time t , so it can be expected to adjust to the “ local ” Lipschitz constant of V around a solution x∗ of ( VI ) . Our step-size policy and motivation are similar in spirit to the “ predictable sequence ” approach of [ 43 ] . For now , we only state ( without proof ) our main result for problems satisfying ( BD ) or ( LC ) . Theorem 1 . Suppose V satisfies ( Mon ) , let C be a compact neighborhood of a solution of ( VI ) , and let H = supx∈C‖X1 − x‖2 . If ( EG ) is run with the adaptive step-size policy ( 8 ) , we have : a ) If V satisfies ( BD ) : GapC ( X̄T ) = O ( H + 4M3 + log ( 1 + 4M2T ) √ T ) . ( 9a ) b ) If V satisfies ( LC ) : GapC ( X̄T ) = O ( H / T ) . ( 9b ) Theorem 1 ( which is proved in the sequel as a special case of Theorem 2 ) should be compared to the corresponding results of Bach & Levy [ 2 ] . In the non-smooth case , [ 2 ] provides a bound of the form Õ ( αMD/ √ T ) with D2 = 12 maxx∈X ‖x‖2 − 1 2 minx∈X ‖x‖2 ( recall that [ 2 ] only treats problems with a bounded domain ) , and α = max { M/M0 , M0/M } where M0 is an initial estimate of M. The worst-case value of α is O ( M ) when good estimates are not readily available ; in this regard , ( 9a ) essentially replaces the O ( D ) constant of Bach & Levy [ 2 ] by O ( M ) . Since D = ∞ in problems with an unbounded domain , Theorem 1 provides a significant improvement in this regard . In terms of L , the smooth guarantee of [ 2 ] is Õ ( α2LD2/T ) , so the multiplicative constant in the bound also becomes infinite in problems with an unbounded domain . In our case , D2 is replaced by H ( which is also finite ) times an additional multiplicative constant which is increasing in M and L ( but is otherwise asymptotic , so it is not included in the statement of Theorem 1 ) . This removes an additional limitation in the results of [ 2 ] ; in the next sections we drop even the Euclidean regularity requirements ( BD ) / ( LC ) , and we provide a rate interpolation result that does not require either condition . 5 Finsler Regularity To motivate our analysis outside the setting of ( BD ) / ( LC ) , consider the vector field Vi ( x ) = ( µi − xi ) −1 + λ1 { xi > 0 } , i = 1 , . . . , N , ( 10 ) which corresponds to the distributed computing problem of Section 2.3 plus a regularization term designed to limit the activation of computing nodes at low loads . Clearly , we have ‖V ( x ) ‖ → ∞ whenever xi → 0+ , so ( BD ) and ( LC ) both fail ( the latter even if λ = 0 ) . On the other hand , if we consider the “ local ” norm ‖v‖x , ∗ = ∑d i=1 ( µi − xi ) |vi| , we have ‖V ( x ) ‖x , ∗ ≤ d + λ ∑d i=1 µi , so V is bounded relative to ‖·‖x , ∗ . This observation motivates the use of a local – as opposed to global – norm , which we define formally as follows : Definition 1 . A Finsler metric on a convex subset X of d is a continuous function F : X × d → + which satisfies the following properties for all x ∈ X and all z , z′ ∈ d : 1 . Subadditivity : F ( x ; z + z′ ) ≤ F ( x ; z ) + F ( x ; z′ ) . 2 . Absolute homogeneity : F ( x ; λz ) = |λ|F ( x ; z ) for all λ ∈ . 3 . Positive-definiteness : F ( x ; z ) ≥ 0 with equality if and only if z = 0 . Given a Finsler metric on X , the induced primal / dual local norms on X are respectively defined as ‖z‖x = F ( x ; z ) and ‖v‖x , ∗ = max { 〈v , z〉 : F ( x ; z ) = 1 } ( 11 ) for all x ∈ X and all z , v ∈ d. We will also say that a Finsler metric on X is regular when ‖v‖x′ , ∗/‖v‖x , ∗ = 1 + O ( ‖x′ − x‖x ) for all x , x′ ∈ X , v ∈ d. Finally , for simplicity , we will also assume in the sequel that ‖·‖x ≥ ν‖·‖ for some ν > 0 and all x ∈ X ( this last assumption is for convenience only , as the norm could be redefined to ‖·‖x ← ‖·‖x + ν‖·‖ without affecting our theoretical analysis ) . When X is equipped with a regular Finsler metric as above , we will say that it is a Finsler space . Example 5.1 . Let F ( x ; z ) = ‖z‖ where ‖·‖ denotes the reference norm of X = d. Then the properties of Definition 1 are satisfied trivially . J Example 5.2 . For a more interesting example of a Finsler structure , consider the set X = ( 0 , 1 ] d and the metric ‖z‖x = maxi|zi|/xi , z ∈ d , x ∈ X . In this case ‖v‖x , ∗ = ∑d i=1 xi|vi| for all v ∈ d , and the only property of Definition 1 that remains to be proved is that of regularity . To that end , we have ‖v‖x′ , ∗ − ‖v‖x , ∗ ≤ ∑d i=1|vi| · |x′i − xi| = ∑d i=1 xi|vi| · |x′i − xi|/xi ≤ ‖v‖x , ∗ · ‖x′ − x‖x . ( 12 ) Hence , by dividing by ‖v‖x , ∗ , we readily get ‖v‖x′ , ∗/‖v‖x , ∗ ≤ 1 + ‖x − x′‖x i.e. , ‖·‖x is regular in the sense of Definition 1 . As we discuss in the sequel , this metric plays an important role for distributed computing problems of the form presented in Section 2.3 . J With all this in hand , we will say that a vector field V : X → d is 1 . Metrically bounded if there exists some M > 0 such that ‖V ( x ) ‖x , ∗ ≤ M for all x ∈ X . ( MB ) 2 . Metrically smooth if there exists some L > 0 such that ‖V ( x′ ) − V ( x ) ‖x , ∗ ≤ L‖x′ − x‖x′ for all x′ , x ∈ X . ( MS ) The notion of metric boundedness/smoothness extends that of ordinary boundedness/Lipschitz continuity to a Finsler context ; note also that , even though neither side of ( MS ) is unilaterally symmetric under the change x↔ x′ , the condition ( MS ) as a whole is . Our next example shows that this extension is proper , i.e. , ( BD ) / ( LC ) may both fail while ( MB ) / ( MS ) both hold : Example 5.3 . Consider the change of variables xi 1 − xi/µi in the resource allocation problem of Section 2.3 . Then , writing Vi ( x ) = − ( 1/xi ) − λ1 { xi < 1 } for the transformed field ( 10 ) under this change of variables , we readily get Vi ( x ) → −∞ as xi → 0+ ; as a result , both ( BD ) and ( LC ) fail to hold for any global norm on d. Instead , under the local norm ‖z‖x = maxi|z|i/xi , we have : 1 . For all λ ≥ 0 , V satisfies ( MB ) with M = d ( 1 + λ ) : ‖V ( x ) ‖x , ∗ ≤ ∑d i=1 xi · ( 1/xi + λ ) = d ( 1 + λ ) . 2 . For λ = 0 , V satisfies ( MS ) with L = d : indeed , for all x , x′ ∈ X , we have ‖V ( x′ ) − V ( x ) ‖x , ∗ = ∑d i=1 xi ∣∣∣∣∣∣ 1x′i − 1xi ∣∣∣∣∣∣ = ∑di=1 |x′i − xi|x′i ≤ d maxi |x ′ i − xi| x′i = d‖x′ − x‖x′ . ( 13 ) 6 The AdaProx Algorithm and its Guarantees The method . We are now in a position to define a family of algorithms that is capable of interpolating between the optimal smooth/non-smooth convergence rates for solving ( VI ) without requiring either ( BD ) or ( LC ) .To do so , the key steps in our approach will be to ( i ) equip X with a suitable Finsler structure ( as in Section 5 ) ; and ( ii ) replace the Euclidean projection in ( EG ) with a suitable “ Bregman proximal ” step that is compatible with the chosen Finsler structure on X . We begin with the latter ( assuming that X is equipped with an arbitrary Finsler structure ) : Definition 2 . We say that h : d → ∪ { ∞ } is a Bregman-Finsler function on X if : 1. h is convex , lower semi-continuous ( l.s.c . ) , cl ( dom h ) = cl ( X ) , and dom ∂h = X . 2 . The subdifferential of h admits a continuous selection ∇h ( x ) ∈ ∂h ( x ) for all x ∈ X . 3. h is strongly convex , i.e. , there exists some K > 0 such that h ( x′ ) ≥ h ( x ) + 〈∇h ( x ) , x′ − x〉 + K2 ‖x ′ − x‖2x ( 14 ) for all x ∈ X and all x′ ∈ dom h. The Bregman divergence induced by h is defined for all x ∈ X , x′ ∈ dom h as D ( x′ , x ) = h ( x′ ) − h ( x ) − 〈∇h ( x ) , x′ − x〉 ( 15 ) and the associated prox-mapping is defined for all x ∈ X and y ∈ d as Px ( y ) = arg minx′∈X { 〈y , x − x′〉 + D ( x′ , x ) } . ( 16 ) Definition 2 is fairly technical , so some clarifications are in order . First , to connect this definition with the Euclidean setup of Section 4 , the prox-mapping ( 16 ) should be seen as the Bregman equivalent of a Euclidean projection step , i.e. , Π ( x+y ) ! Px ( y ) . Second , a key difference between Definition 2 and other definitions of Bregman functions in the literature [ 4 , 6 , 7 , 9 , 24 , 36 , 37 , 46 ] is that h is assumed strongly convex relative to a local norm – not a global norm . This “ locality ” will play a crucial role in allowing the proposed methods to adapt to the geometry of the problem . For concreteness , we provide below an example that expands further on Examples 5.2 and 5.3 : Example 6.1 . Consider the local norm ‖z‖x = maxi|zi|/xi on X = ( 0 , 1 ] d and let h ( x ) = ∑d i=1 1/xi on ( 0 , 1 ] d. We then have D ( x′ , x ) = d∑ i=1 [ 1 x′i − 1 xi + x′i − xi x2i ] = d∑ i=1 ( x′i − xi ) 2 x2i x ′ i ≥ d∑ i=1 ( 1 − x′i/xi ) 2 ≥ ‖x′ − x‖2x ( 17 ) i.e. , h is 1-strongly convex relative to ‖·‖x on X . J With all this is in place , the extra-gradient method can be adapted to our current setting as follows : Xt+1/2 = PXt ( −γtVt ) δt = ‖Vt+1/2 − Vt‖Xt+1/2 , ∗ Xt+1 = PXt ( −γtVt+1/2 ) γt+1 = 1 /√ 1 + ∑t s=1 δ 2 s ( AdaProx ) with Vt = V ( Xt ) , t = 1 , 3/2 , . . . , as in Section 3 . In words , this method builds on the template of ( EG ) by ( i ) replacing the Euclidean projection with a mirror step ; ( ii ) replacing the global norm in ( 8 ) with a dual Finsler norm evaluated at the algorithm ’ s leading state Xt+1/2 . Convergence speed . With all this in hand , our main result for AdaProx can be stated as follows : Theorem 2 . Suppose V satisfies ( Mon ) , let C be a compact neighborhood of a solution of ( VI ) , and set H = supx∈C D ( x , X1 ) Then , the AdaProx algorithm enjoys the guarantees : a ) If V satisfies ( MB ) : GapC ( X̄T ) = O ( H + M3 ( 1 + 1/K ) 2 + log ( 1 + 4M2 ( 1 + 2/K ) 2T ) √ T ) . ( 18a ) b ) If V satisfies ( MS ) : GapC ( X̄T ) = O ( H / T ) . ( 18b ) For the constants that appear in Eq . ( 18 ) , we refer the reader to the discussion following Theorem 1 . Moreover , we defer the proof of Theorem 2 to the paper ’ s supplement . We only mention here that its key element is the determination of the asymptotic behavior of the adaptive step-size policy γt in the non-smooth and smooth regimes , i.e. , under ( MB ) and ( MS ) respectively . At a very high level , ( MB ) guarantees that the difference sequence δt is bounded , which implies in turn that ∑T t=1 γt = Ω ( √ T ) and eventually yields the bound ( 18a ) for the algorithm ’ s ergodic average X̄T . On the other hand , if ( MS ) kicks in , we have the following finer result : Lemma 1 . Assume V satisfies ( MS ) . Then , a ) γt decreases monotonically to a strictly positive limit γ∞ = limt→∞ γt > 0 ; and b ) the sequence δt is square summable : in particular , ∑∞ t=1 δ 2 t = 1/γ 2 ∞ − 1 . By means of this lemma ( which we prove in the paper ’ s supplement ) , it follows that ∑T t=1 γt ≥ γ∞T = Ω ( T ) ; hence it ultimately follows that AdaProx enjoys an O ( 1/T ) rate of convergence under ( MS ) . Trajectory convergence . In complement to Theorem 2 , we also provide a trajectory convergence result that governs the actual iterates of the AdaProx algorithm : Theorem 3 . Suppose that 〈V ( x ) , x − x∗〉 < 0 whenever x∗ is a solution of ( VI ) and x is not . If , in addition , V satisfies ( MB ) or ( MS ) , the iterates Xt of AdaProx converge to a solution of ( VI ) . The importance of this result is that , in many practical applications ( especially in non-monotone problems ) , it is more common to harvest the “ last iterate ” of the method ( Xt ) rather than its ergodic average ( X̄T ) ; as such , Theorem 3 provides a certain justification for this design choice . The proof of Theorem 3 relies on non-standard arguments , so we relegate it to the supplement . Structurally , the first step is to show that Xt visits any neighborhood of a solution point x∗ ∈ X ∗ infinitely often ( this is where the coherence assumption 〈V ( x ) , x − x∗〉 is used ) . The second is to use this trapping property in conjunction with a suitable “ energy inequality ” to establish convergence via the use of a quasi-Fejér technique as in [ 10 ] ; this part is detailed in a separate appendix . 7 Numerical Experiments We conclude in this section with a numerical illustration of the convergence properties of AdaProx in two different settings : a ) bilinear min-max games ; and b ) a simple Wasserstein GAN in the spirit of Daskalakis et al . [ 12 ] with the aim of learning an unknown covariance matrix . Bilinear min-max games . For our first set of experiments , we consider a min-max game of the form of the form L ( θ , φ ) = ( θ − θ∗ ) > A ( φ − φ∗ ) with θ , φ ∈ 100 and A ∈ 100 × 100 ( drawn i.i.d . component-wise from a standard Gaussian ) . To test the convergence of AdaProx beyond the “ full gradient ” framework , we ran the algorithm with stochastic gradient signals of the form Vt = V ( Xt ) +Ut where Ut is drawn i.i.d . from a centered Gaussian distribution with unit covariance matrix . We then plotted in Fig . 2 the squared gradient norm ‖V ( X̄T ) ‖2 of the method ’ s ergodic average X̄T after T iterations ( so values closer to zero are better ) . For benchmarking purposes , we also ran the extragradient ( EG ) and Bach–Levy ( BL ) algorithms [ 2 ] with the same random seed for the simulated gradient noise . The step-size parameter of the EG algorithm was chosen as γt = 0.025/ √ t , whereas the BL algorithm was run with diameter and gradient bound estimation parameters D0 = .5 and M0 = 2.5 respectively ( both determined after a hyper-parameter search since the only theoretically allowable values are D0 = M0 = ∞ ; interestingly , very large values for D0 and M0 did not yield good results ) . The experiment was repeated S = 100 times , and AdaProx gave consistently faster rates . Covariance matrix learning . Going a step further , consider the covariance learning game L ( θ , φ ) = x∼N ( 0 , Σ ) [ x > θx ] − z∼N ( 0 , I ) [ z > θ > φθz ] , θ , φ ∈ d × d. ( 19 ) The goal here is to generate data drawn from a centered Gaussian distribution with unknown covariance Σ ; in particular , this model follows the Wasserstein GAN formulation of Daskalakis et al . [ 12 ] with generator and discriminator respectively given by G ( z ) = θz and D ( x ) = x > φx ( no clipping ) . For the experiments , we took d = 100 , a mini-batch of m = 128 samples per update , and we ran the EG , BL and AdaProx algorithms as above , tracing the square norm of V as a measure of convergence . Since the problem is non-monotone , there are several disjoint equilibrium components so the algorithms ’ behavior is considerably more erratic ; however , after this initial warm-up phase , AdaProx again gave the faster convergence rates . Acknowledgments This research was partially supported by the COST Action CA16228 “ European Network for Game Theory ” ( GAMENET ) and the French National Research Agency ( ANR ) in the framework of the grants ORACLESS ( ANR–16–CE33–0004–01 ) and ELIOT ( ANR-18-CE40-0030 and FAPESP 2018/12579-7 ) , the “ Investissements d ’ avenir ” program ( ANR-15-IDEX-02 ) , the LabEx PERSYVAL ( ANR-11-LABX-0025-01 ) , and MIAI @ Grenoble Alpes ( ANR-19-P3IA-0003 ) . References [ 1 ] Kimon Antonakopoulos , E. Veronica Belmega , and Panayotis Mertikopoulos . An adaptive mirror-prox algorithm for variational inequalities with singular operators . In NeurIPS ’ 19 : Proceedings of the 33rd International Conference on Neural Information Processing Systems , 2019 . [ 2 ] Francis Bach and Kfir Yehuda Levy . A universal algorithm for variational inequalities adaptive to smoothness and noise . In COLT ’ 19 : Proceedings of the 32nd Annual Conference on Learning Theory , 2019 . [ 3 ] David Balduzzi , Sebastien Racaniere , James Martens , Jakob Foerster , Karl Tuyls , and Thore Graepel . The mechanics of n-player differentiable games . In ICML ’ 18 : Proceedings of the 35th International Conference on Machine Learning , 2018 . [ 4 ] Amir Beck and Marc Teboulle . Mirror descent and nonlinear projected subgradient methods for convex optimization . Operations Research Letters , 31 ( 3 ) :167–175 , 2003 . [ 5 ] Dimitri P. Bertsekas and Robert Gallager . Data Networks . Prentice Hall , Englewood Cliffs , NJ , 2 edition , 1992 . [ 6 ] Lev M. Bregman . The relaxation method of finding the common point of convex sets and its application to the solution of problems in convex programming . USSR Computational Mathematics and Mathematical Physics , 7 ( 3 ) :200–217 , 1967 . [ 7 ] Sébastien Bubeck . Convex optimization : Algorithms and complexity . Foundations and Trends in Machine Learning , 8 ( 3-4 ) :231–358 , 2015 . [ 8 ] Tatjana Chavdarova , Gauthier Gidel , François Fleuret , and Simon Lacoste-Julien . Reducing noise in GAN training with variance reduced extragradient . In NeurIPS ’ 19 : Proceedings of the 33rd International Conference on Neural Information Processing Systems , 2019 . [ 9 ] Gong Chen and Marc Teboulle . Convergence analysis of a proximal-like minimization algorithm using Bregman functions . SIAM Journal on Optimization , 3 ( 3 ) :538–543 , August 1993 . [ 10 ] Patrick L. Combettes . Quasi-Fejérian analysis of some optimization algorithms . In Dan Butnariu , Yair Censor , and Simeon Reich ( eds . ) , Inherently Parallel Algorithms in Feasibility and Optimization and Their Applications , pp . 115–152 . Elsevier , New York , NY , USA , 2001 . [ 11 ] Constantinos Daskalakis , Paul W. Goldberg , and Christos H. Papadimitriou . The complexity of computing a Nash equilibrium . SIAM Journal on Computing , 39 ( 1 ) :195–259 , 2009 . [ 12 ] Constantinos Daskalakis , Andrew Ilyas , Vasilis Syrgkanis , and Haoyang Zeng . Training GANs with optimism . In ICLR ’ 18 : Proceedings of the 2018 International Conference on Learning Representations , 2018 . [ 13 ] Gérard Debreu . A social equilibrium existence theorem . Proceedings of the National Academy of Sciences of the USA , 38 ( 10 ) :886–893 , October 1952 . [ 14 ] Francisco Facchinei and Christian Kanzow . Generalized Nash equilibrium problems . 4OR , 5 ( 3 ) :173–210 , September 2007 . [ 15 ] Francisco Facchinei and Jong-Shi Pang . Finite-Dimensional Variational Inequalities and Complementarity Problems . Springer Series in Operations Research . Springer , 2003 . [ 16 ] Lampros Flokas , Emmanouil Vasileios Vlatakis-Gkaragkounis , and Georgios Piliouras . Poincaré recurrence , cycles and spurious equilibria in gradient-descent-ascent for non-convex non-concave zero-sum games . In NeurIPS ’ 19 : Proceedings of the 33rd International Conference on Neural Information Processing Systems , 2019 . [ 17 ] A.V . Gasnikov , P.E . Dvurechensky , F.S . Stonyakin , and A.A. Titov . An adaptive proximal method for variational inequalities . Computational Mathematics and Mathematical Physics , 59:836–841 , 2019 . [ 18 ] Gauthier Gidel , Hugo Berard , Gaëtan Vignoud , Pascal Vincent , and Simon Lacoste-Julien . A variational inequality perspective on generative adversarial networks . In ICLR ’ 19 : Proceedings of the 2019 International Conference on Learning Representations , 2019 . [ 19 ] Gauthier Gidel , Reyhane Askari Hemmat , Mohammad Pezehski , Rémi Le Priol , Gabriel Huang , Simon Lacoste-Julien , and Ioannis Mitliagkas . Negative momentum for improved game dynamics . In AISTATS ’ 19 : Proceedings of the 22nd International Conference on Artificial Intelligence and Statistics , 2019 . [ 20 ] Ian J. Goodfellow , Jean Pouget-Abadie , Mehdi Mirza , Bing Xu , David Warde-Farley , Sherjil Ozair , Aaron Courville , and Yoshua Bengio . Generative adversarial nets . In NIPS ’ 14 : Proceedings of the 28th International Conference on Neural Information Processing Systems , 2014 . [ 21 ] Jean-Baptiste Hiriart-Urruty and Claude Lemaréchal . Fundamentals of Convex Analysis . Springer , Berlin , 2001 . [ 22 ] Yu-Guan Hsieh , Franck Iutzeler , Jérôme Malick , and Panayotis Mertikopoulos . On the convergence of single-call stochastic extra-gradient methods . In NeurIPS ’ 19 : Proceedings of the 33rd International Conference on Neural Information Processing Systems , pp . 6936–6946 , 2019 . [ 23 ] Yu-Guan Hsieh , Franck Iutzeler , Jérôme Malick , and Panayotis Mertikopoulos . Explore aggressively , update conservatively : Stochastic extragradient methods with variable stepsize scaling . https : //arxiv.org/abs/2003.10162 , 2020 . [ 24 ] Anatoli Juditsky , Arkadi Semen Nemirovski , and Claire Tauvel . Solving variational inequalities with stochastic mirror-prox algorithm . Stochastic Systems , 1 ( 1 ) :17–58 , 2011 . [ 25 ] G. M. Korpelevich . The extragradient method for finding saddle points and other problems . Èkonom . i Mat . Metody , 12 : 747–756 , 1976 . [ 26 ] Rida Laraki , Jérôme Renault , and Sylvain Sorin . Mathematical Foundations of Game Theory . Universitext . Springer , 2019 . [ 27 ] Aleksander Madry , Aleksandar Makelov , Ludwig Schmidt , Dimitris Tsipras , and Adrian Vladu . Towards deep learning models resistant to adversarial attacks . In ICLR ’ 18 : Proceedings of the 2018 International Conference on Learning Representations , 2018 . [ 28 ] Yura Malitsky . Projected reflected gradient methods for monotone variational inequalities . SIAM Journal on Optimization , 25 ( 1 ) :502–520 , 2015 . [ 29 ] Yura Malitsky . Golden ratio algorithms for variational inequalities . Mathematical Programming , 2019 . [ 30 ] Panayotis Mertikopoulos and Zhengyuan Zhou . Learning in games with continuous action sets and unknown payoff functions . Mathematical Programming , 173 ( 1-2 ) :465–507 , January 2019 . [ 31 ] Panayotis Mertikopoulos , Christos H. Papadimitriou , and Georgios Piliouras . Cycles in adversarial regularized learning . In SODA ’ 18 : Proceedings of the 29th annual ACM-SIAM Symposium on Discrete Algorithms , 2018 . [ 32 ] Panayotis Mertikopoulos , Bruno Lecouat , Houssam Zenati , Chuan-Sheng Foo , Vijay Chandrasekhar , and Georgios Piliouras . Optimistic mirror descent in saddle-point problems : Going the extra ( gradient ) mile . In ICLR ’ 19 : Proceedings of the 2019 International Conference on Learning Representations , 2019 . [ 33 ] Aryan Mokhtari , Asuman Ozdaglar , and Sarath Pattathil . Convergence rate of O ( 1/k ) for optimistic gradient and extra-gradient methods in smooth convex-concave saddle point problems . https : //arxiv.org/pdf/1906.01115.pdf , 2019 . [ 34 ] Arkadi Semen Nemirovski . Information-based complexity of linear operator equations . Journal of Complexity , 8 ( 2 ) : 153–175 , 1992 . [ 35 ] Arkadi Semen Nemirovski . Prox-method with rate of convergence O ( 1/t ) for variational inequalities with Lipschitz continuous monotone operators and smooth convex-concave saddle point problems . SIAM Journal on Optimization , 15 ( 1 ) :229–251 , 2004 . [ 36 ] Arkadi Semen Nemirovski , Anatoli Juditsky , Guanghui Lan , and Alexander Shapiro . Robust stochastic approximation approach to stochastic programming . SIAM Journal on Optimization , 19 ( 4 ) :1574–1609 , 2009 . [ 37 ] Yurii Nesterov . Dual extrapolation and its applications to solving variational inequalities and related problems . Mathematical Programming , 109 ( 2 ) :319–344 , 2007 . [ 38 ] Noam Nisan , Tim Roughgarden , Éva Tardos , and V. V. Vazirani ( eds. ) . Algorithmic Game Theory . Cambridge University Press , 2007 . [ 39 ] Yuyuan Ouyang and Yangyang Xu . Lower complexity bounds of first-order methods for convex-concave bilinear saddle-point problems . Mathematical Programming , 2019 . URL https : //doi.org/10.1007/s10107-019-01420-0 . [ 40 ] Georgios Piliouras and Jeff S. Shamma . Optimization despite chaos : Convex relaxations to complex limit sets via Poincaré recurrence . In SODA ’ 14 : Proceedings of the 25th annual ACM-SIAM Symposium on Discrete Algorithms , 2014 . [ 41 ] Lerrel Pinto , James Davidson , Rahul Sukthankar , and Abhinav Gupta . Robust adversarial reinforcement learning . In ICML ’ 17 : Proceedings of the 34th International Conference on Machine Learning , 2017 . [ 42 ] Leonid Denisovich Popov . A modification of the Arrow–Hurwicz method for search of saddle points . Mathematical Notes of the Academy of Sciences of the USSR , 28 ( 5 ) :845–848 , 1980 . [ 43 ] Alexander Rakhlin and Karthik Sridharan . Optimization , learning , and games with predictable sequences . In NIPS ’ 13 : Proceedings of the 27th International Conference on Neural Information Processing Systems , 2013 . [ 44 ] Ralph Tyrrell Rockafellar . Convex Analysis . Princeton University Press , Princeton , NJ , 1970 . [ 45 ] Gesualdo Scutari , Francisco Facchinei , Daniel Pérez Palomar , and Jong-Shi Pang . Convex optimization , game theory , and variational inequality theory in multiuser communication systems . IEEE Signal Process . Mag. , 27 ( 3 ) :35–49 , May 2010 . [ 46 ] Shai Shalev-Shwartz . Online learning and online convex optimization . Foundations and Trends in Machine Learning , 4 ( 2 ) :107–194 , 2011 . [ 47 ] Fedor Stonyakin , Alexander Gasnikov , Pavel Dvurechensky , Mohammad Alkousa , and Alexander Titov . Generalized mirror prox for monotone variational inequalities : Universality and inexact oracle . https : //arxiv.org/abs/1806 . 05140 , 2018 . [ 48 ] Fedor Stonyakin , Alexander Gasnikov , Alexander Tyurin , Dmitry Pasechnyuk , Artem Agafonov , Pavel Dvurechensky , Darina Dvinskikh , Alexey Kroshnin , and Victorya Piskunova . Inexact model : A framework for optimization and variational inequalities . https : //arxiv.org/abs/1902.00990 , 2019 . [ 49 ] John von Neumann . Zur Theorie der Gesellschaftsspiele . Mathematische Annalen , 100:295–320 , 1928 . Translated by S. Bargmann as “ On the Theory of Games of Strategy ” in A. Tucker and R. D. Luce , editors , Contributions to the Theory of Games IV , volume 40 of Annals of Mathematics Studies , pages 13-42 , 1957 , Princeton University Press , Princeton . | This paper propose a novel algorithm that solves the min-max problems and games based on the extra gradient (EG) framework. One of the main goal of this paper is to achieve the optimal convergence rate for both smooth/nonsmooth setttings without assuming the Lipchitz continuity/boundedness conditions. A "Bregman-Proximal" step was introduced to take place of the traditional Euclidean norm projection norm to depict the geometry or the smoothness properties of the problem. Furthermore, the authors adopt an adaptive step size scheme into the "Mirror-Prox" step to achieve the optimal convergence rate under both settings. | SP:c5d1720922dfde389abbce3110a7f049e972192a |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.