paper_name stringlengths 11 170 | text stringlengths 8.07k 307k | summary stringlengths 152 6.16k | paper_id stringlengths 43 43 |
|---|---|---|---|
LCS: Learning Compressible Subspaces for Adaptive Network Compression at Inference Time | When deploying deep learning models to a device , it is traditionally assumed that available computational resources ( compute , memory , and power ) remain static . However , real-world computing systems do not always provide stable resource guarantees . Computational resources need to be conserved when load from other processes is high or battery power is low . Inspired by recent works on neural network subspaces , we propose a method for training a compressible subspace of neural networks that contains a fine-grained spectrum of models that range from highly efficient to highly accurate . Our models require no retraining , thus our subspace of models can be deployed entirely on-device to allow adaptive network compression at inference time . We present results for achieving arbitrarily finegrained accuracy-efficiency trade-offs at inference time for structured and unstructured sparsity . We achieve accuracies on-par with standard models when testing our uncompressed models , and maintain high accuracy for sparsity rates above 90 % when testing our compressed models . We also demonstrate that our algorithm extends to quantization at variable bit widths , achieving accuracy on par with individually trained networks . 1 INTRODUCTION . Deep neural networks are deployed to a variety of computing platforms , including phones , tablets , and watches ( Dhar et al. , 2019 ) . Networks are generally designed to consume a fixed budget of resources , but the compute resources available on a device can vary while the device is in use . Computational burden from other processes , as well as battery life , may influence the availability of resources to a neural network . Adaptively adjusting inference-time load is beyond the capabilities of traditional neural networks , which are designed with a fixed architecture and a fixed resource usage . A simple approach to the problem of providing an accuracy-efficiency trade-off is to train multiple networks of different sizes . In this approach , multiple networks are stored on the device and loaded into memory when needed . There is a breadth of research in the design of efficient architectures that can be trained with different capacities , then deployed on a device ( Howard et al. , 2017 ; Sandler et al. , 2018 ; Howard et al. , 2019 ) . However , there are a few drawbacks with using multiple networks to provide an accuracy-efficiency trade-off : ( 1 ) it requires training and deploying multiple networks ( which induces training-time computational burden and on-device storage burden ) , ( 2 ) it requires all compression levels to be specified before deployment , and ( 3 ) it requires new networks to be loaded into memory when changing the compression level , which prohibits real-time adaptive compression . Previous methods address the first issue in the setting of structured sparsity by training a single network conditioned to perform well when varying numbers of channels are pruned ( Yu et al. , 2018 ; Yu & Huang , 2019 ) . However , these methods require BatchNorm ( Ioffe & Szegedy , 2015 ) statistics to be recalibrated for every accuracy-efficiency configuration before deployment . This requires users to know every compression level in advance and requires storage of extra parameters ( which can be problematic for low-compute devices ) . Another method trains a larger network that can be queried for efficient subnetworks ( Cai et al. , 2020 ) , but requires users to reload network weights , and to know every compression level before deployment . We address the issue of deploying a model that can be compressed in real-time without specifying the compression levels beforehand . Inspired by Wortsman et al . ( 2021 ) , we formulate this problem as computing an adaptively compressible network subspace ( Figure 1a ) . We train a linear subspace using two sets of weights , conditioning them so that a convex combination of them produces an accurate network . We expand on Wortsman et al . ( 2021 ) by ( 1 ) specializing our linear subspace to contain an arbitrarily fine-grained efficiency-accuracy trade-off ( meaning , any compression level within predefined limits can be chosen ) , and ( 2 ) replacing BatchNorm ( Ioffe & Szegedy , 2015 ) with GroupNorm ( Wu & He , 2018 ) to avoid BatchNorm recalibration . Contributions : Our contributions are as follows . ( 1 ) We introduce our method , Learning Compressible Subspaces ( LCS ) , for training models that can be compressed with arbitrarily fine-grained compression levels in real-time after deployment . To our knowledge this has not been done before . ( 2 ) We demonstrate a new use for neural network subspaces , specializing at one end for high-accuracy and at the other end for high-efficiency . ( 3 ) We provide an empirical evaluation of our method using structured sparsity , unstructured sparsity , and quantization . ( 4 ) We open source our code at https : //withheld.for.review . 2 RELATED WORK . Architectures Demonstrating Efficiency-Accuracy Trade-Offs : Several recent network architectures include a hyperparameter to control the number of filters in each layer ( Howard et al. , 2017 ; Sandler et al. , 2018 ; Howard et al. , 2019 ) or the number of blocks in the network ( Tan & Le , 2019 ) . In Once For All ( Cai et al. , 2020 ) , the need for individually training networks of different sizes is circumvented . Instead , a single large network is trained , then queried for efficient subnetworks . We differ from these methods in two ways . First , we compress on-device without specifying the compression levels before deployment . Previous works require training separate networks ( or in the case of Once For All , querying a larger model for a compressed network ) before deployment . Second , we don ’ t require deploying a set of weights for every compression level . A method for post-training quantization to variable bit widths appears in Shkolnik et al . ( 2020 ) , but it relies on calibration data and can not be run on low-compute edge devices . Thus , compression levels must be specified before deployment . They also present a method for quantization-aware training to variable bit widths , but most of their results keep activation bit widths fixed , whereas we vary it . Adaptive Compression : Recent works train a single neural network which can be adaptively configured at inference time to execute at different compression levels . These methods are the closest to our work . In Learning Efficient Convolutions ( LEC ) ( Liu et al. , 2017 ) , the authors train a single network , then fine-tune it at different structured sparsity rates ( though they also present results without fine-tuning , which is closer to our use case ) . Other methods train a single set of weights conditioned to perform well when channels are pruned , but require recalibration ( or preemptive storage ) of BatchNorm ( Ioffe & Szegedy , 2015 ) statistics at each sparsity level . These methods include Network Slimming ( NS ) ( Yu et al. , 2018 ) and Universal Slimming ( US ) ( Yu & Huang , 2019 ) . Similar methods train a single network to perform well at various levels of quantization by storing extra copies of BatchNorm statistics ( Guerra et al. , 2020 ) . We differ from these methods by avoiding the need to recalibrate or store BatchNorm statistics ( Section 3.3 ) and by allowing for fine-grained selection of compression levels at inference time , neither of which have been done before ( Table 1 ) . Additionally , our method is broadly applicable to a variety of compression methods , whereas previous works focus on a single compression method . Other Post-Training Compression Methods : Other works have investigated post-training compression . In Nagel et al . ( 2019 ) , a method is presented for compressing 32 bit models to 8 bits , though it has not been evaluated in the low-bit regime . It involves running an equalization step and assuming a Conv-BatchNorm-ReLU network structure . A related post-training compression method is shown in Horton et al . ( 2020 ) , which shows results for both quantization and sparsity . However , their sparsity method requires a lightweight training phase . We differ from these methods in providing real-time post-deployment compression for both sparsity and quantization without making assumptions about the network structure . Sparse Networks : Sparsity is a well-studied approach to reduce neural network compute . Recent works have achieved state-of-the-art accuracy using simple magnitude-based pruning ( Han et al. , 2015 ; Zhu & Gupta , 2017 ; See et al. , 2016 ; Narang et al. , 2017 ) . When experimenting with structured sparsity , we simply remove filters from the network , as described in Yu et al . ( 2018 ) . When investigating unstructured sparsity , we use TopK pruning ( Zhu & Gupta , 2017 ) . Quantized Networks : Network quantization represents the weights and/or activations of neural networks with lower-bit integral representations , rather than 32-bit floating point . This reduces model size and memory bandwidth and can accelerate inference . Our work follows the affine quantization scheme presented in Jacob et al . ( 2018 ) , in which a scale and offset are applied to an integer tensor to approximate the original floating-point tensor . However , our method is general enough to utilize any other quantization scheme . Neural Network Subspaces : The idea of learning a neural network subspace is introduced in Wortsman et al . ( 2021 ) ( though another formulation was introduced concurrently in Benton et al . ( 2021 ) ) . Multiple sets of network weights are treated as the corners of a simplex , and an optimization procedure updates these corners to find a region in weight space in which points inside the simplex correspond to accurate networks . We note that Wortsman et al . ( 2021 ) recalibrate BatchNorm statistics before evaluation , which we avoid . 3 COMPRESSIBLE SUBSPACES . 3.1 COMPRESSIBLE LINES . In our method , we train a neural network subspace ( Wortsman et al. , 2021 ) that contains a spectrum of networks that each have a different efficiency-accuracy trade-off . In Wortsman et al . ( 2021 ) , an architecture is chosen , and its collection of weights is denoted by ω . A linear subspace is parameterized by two sets of network weights , ω1 and ω2 . At training time , a network is sampled from the line defined by this pair of weights , ω∗ ( α ) = αω1 + ( 1−α ) ω2 , where α ∈ [ 0 , 1 ] . The forward and backward pass of gradient descent are computed using ω∗ ( α ) , and gradient updates are backpropagated to ω1 and ω2 . A cosine distance regularization term is used to ensure that ω1 and ω2 don ’ t converge to a single point . We propose training a linear subspace of networks in a similar manner , but we also bias the subspace to contain high-accuracy solutions at one end and high-efficiency solutions at the other end . To accomplish this , we introduce a parameter γ used to control the compression level and a compression function f ( ω , γ ) used to compress a model ’ s weights ω using a compression level γ . The parameter γ induces different compression levels at different positions in the linear subspace , and therefore can be considered a function γ ≡ γ ( α ) . When training , we first sample a network from the subspace , then compress it , obtaining a network with weights f ( ω∗ ( α ) , γ ( α ) ) . We then perform a standard forward and backward pass of gradient descent with it , backpropagating gradients to ω1 and ω2 . In summary , our training method adjusts the standard subspace training method to include the application of a compression function f at a compression level γ ( α ) . Note that we apply the compression after sampling the model ω∗ ( α ) from the subspace , since we want the sampled model to be compressed ( rather than ω1 and ω2 ) for efficient inference . We experiment with formulating our compression function as structured sparsity , unstructured sparsity , and quantization ( Section 4 ) . In all cases , the cost of computing f is small compared to the cost of a network forward pass ( Section A.1 ) . | This paper introduces learnable compressible subspaces, which attempts to learn a set of models that can be switched at inference time to adapt to different resource requirements. This work is motivated by previous work in neural subspaces and slimmable networks. It is evaluated on CIFAR10 and ImageNet and compared against other recent works for adaptable inference models. These results show under certain conditions LCS can maintain higher accuracies at larger sparsities compared to other works. | SP:c773e2eefc2aa0e2ccc8aa8264015caf22a6617d |
LCS: Learning Compressible Subspaces for Adaptive Network Compression at Inference Time | When deploying deep learning models to a device , it is traditionally assumed that available computational resources ( compute , memory , and power ) remain static . However , real-world computing systems do not always provide stable resource guarantees . Computational resources need to be conserved when load from other processes is high or battery power is low . Inspired by recent works on neural network subspaces , we propose a method for training a compressible subspace of neural networks that contains a fine-grained spectrum of models that range from highly efficient to highly accurate . Our models require no retraining , thus our subspace of models can be deployed entirely on-device to allow adaptive network compression at inference time . We present results for achieving arbitrarily finegrained accuracy-efficiency trade-offs at inference time for structured and unstructured sparsity . We achieve accuracies on-par with standard models when testing our uncompressed models , and maintain high accuracy for sparsity rates above 90 % when testing our compressed models . We also demonstrate that our algorithm extends to quantization at variable bit widths , achieving accuracy on par with individually trained networks . 1 INTRODUCTION . Deep neural networks are deployed to a variety of computing platforms , including phones , tablets , and watches ( Dhar et al. , 2019 ) . Networks are generally designed to consume a fixed budget of resources , but the compute resources available on a device can vary while the device is in use . Computational burden from other processes , as well as battery life , may influence the availability of resources to a neural network . Adaptively adjusting inference-time load is beyond the capabilities of traditional neural networks , which are designed with a fixed architecture and a fixed resource usage . A simple approach to the problem of providing an accuracy-efficiency trade-off is to train multiple networks of different sizes . In this approach , multiple networks are stored on the device and loaded into memory when needed . There is a breadth of research in the design of efficient architectures that can be trained with different capacities , then deployed on a device ( Howard et al. , 2017 ; Sandler et al. , 2018 ; Howard et al. , 2019 ) . However , there are a few drawbacks with using multiple networks to provide an accuracy-efficiency trade-off : ( 1 ) it requires training and deploying multiple networks ( which induces training-time computational burden and on-device storage burden ) , ( 2 ) it requires all compression levels to be specified before deployment , and ( 3 ) it requires new networks to be loaded into memory when changing the compression level , which prohibits real-time adaptive compression . Previous methods address the first issue in the setting of structured sparsity by training a single network conditioned to perform well when varying numbers of channels are pruned ( Yu et al. , 2018 ; Yu & Huang , 2019 ) . However , these methods require BatchNorm ( Ioffe & Szegedy , 2015 ) statistics to be recalibrated for every accuracy-efficiency configuration before deployment . This requires users to know every compression level in advance and requires storage of extra parameters ( which can be problematic for low-compute devices ) . Another method trains a larger network that can be queried for efficient subnetworks ( Cai et al. , 2020 ) , but requires users to reload network weights , and to know every compression level before deployment . We address the issue of deploying a model that can be compressed in real-time without specifying the compression levels beforehand . Inspired by Wortsman et al . ( 2021 ) , we formulate this problem as computing an adaptively compressible network subspace ( Figure 1a ) . We train a linear subspace using two sets of weights , conditioning them so that a convex combination of them produces an accurate network . We expand on Wortsman et al . ( 2021 ) by ( 1 ) specializing our linear subspace to contain an arbitrarily fine-grained efficiency-accuracy trade-off ( meaning , any compression level within predefined limits can be chosen ) , and ( 2 ) replacing BatchNorm ( Ioffe & Szegedy , 2015 ) with GroupNorm ( Wu & He , 2018 ) to avoid BatchNorm recalibration . Contributions : Our contributions are as follows . ( 1 ) We introduce our method , Learning Compressible Subspaces ( LCS ) , for training models that can be compressed with arbitrarily fine-grained compression levels in real-time after deployment . To our knowledge this has not been done before . ( 2 ) We demonstrate a new use for neural network subspaces , specializing at one end for high-accuracy and at the other end for high-efficiency . ( 3 ) We provide an empirical evaluation of our method using structured sparsity , unstructured sparsity , and quantization . ( 4 ) We open source our code at https : //withheld.for.review . 2 RELATED WORK . Architectures Demonstrating Efficiency-Accuracy Trade-Offs : Several recent network architectures include a hyperparameter to control the number of filters in each layer ( Howard et al. , 2017 ; Sandler et al. , 2018 ; Howard et al. , 2019 ) or the number of blocks in the network ( Tan & Le , 2019 ) . In Once For All ( Cai et al. , 2020 ) , the need for individually training networks of different sizes is circumvented . Instead , a single large network is trained , then queried for efficient subnetworks . We differ from these methods in two ways . First , we compress on-device without specifying the compression levels before deployment . Previous works require training separate networks ( or in the case of Once For All , querying a larger model for a compressed network ) before deployment . Second , we don ’ t require deploying a set of weights for every compression level . A method for post-training quantization to variable bit widths appears in Shkolnik et al . ( 2020 ) , but it relies on calibration data and can not be run on low-compute edge devices . Thus , compression levels must be specified before deployment . They also present a method for quantization-aware training to variable bit widths , but most of their results keep activation bit widths fixed , whereas we vary it . Adaptive Compression : Recent works train a single neural network which can be adaptively configured at inference time to execute at different compression levels . These methods are the closest to our work . In Learning Efficient Convolutions ( LEC ) ( Liu et al. , 2017 ) , the authors train a single network , then fine-tune it at different structured sparsity rates ( though they also present results without fine-tuning , which is closer to our use case ) . Other methods train a single set of weights conditioned to perform well when channels are pruned , but require recalibration ( or preemptive storage ) of BatchNorm ( Ioffe & Szegedy , 2015 ) statistics at each sparsity level . These methods include Network Slimming ( NS ) ( Yu et al. , 2018 ) and Universal Slimming ( US ) ( Yu & Huang , 2019 ) . Similar methods train a single network to perform well at various levels of quantization by storing extra copies of BatchNorm statistics ( Guerra et al. , 2020 ) . We differ from these methods by avoiding the need to recalibrate or store BatchNorm statistics ( Section 3.3 ) and by allowing for fine-grained selection of compression levels at inference time , neither of which have been done before ( Table 1 ) . Additionally , our method is broadly applicable to a variety of compression methods , whereas previous works focus on a single compression method . Other Post-Training Compression Methods : Other works have investigated post-training compression . In Nagel et al . ( 2019 ) , a method is presented for compressing 32 bit models to 8 bits , though it has not been evaluated in the low-bit regime . It involves running an equalization step and assuming a Conv-BatchNorm-ReLU network structure . A related post-training compression method is shown in Horton et al . ( 2020 ) , which shows results for both quantization and sparsity . However , their sparsity method requires a lightweight training phase . We differ from these methods in providing real-time post-deployment compression for both sparsity and quantization without making assumptions about the network structure . Sparse Networks : Sparsity is a well-studied approach to reduce neural network compute . Recent works have achieved state-of-the-art accuracy using simple magnitude-based pruning ( Han et al. , 2015 ; Zhu & Gupta , 2017 ; See et al. , 2016 ; Narang et al. , 2017 ) . When experimenting with structured sparsity , we simply remove filters from the network , as described in Yu et al . ( 2018 ) . When investigating unstructured sparsity , we use TopK pruning ( Zhu & Gupta , 2017 ) . Quantized Networks : Network quantization represents the weights and/or activations of neural networks with lower-bit integral representations , rather than 32-bit floating point . This reduces model size and memory bandwidth and can accelerate inference . Our work follows the affine quantization scheme presented in Jacob et al . ( 2018 ) , in which a scale and offset are applied to an integer tensor to approximate the original floating-point tensor . However , our method is general enough to utilize any other quantization scheme . Neural Network Subspaces : The idea of learning a neural network subspace is introduced in Wortsman et al . ( 2021 ) ( though another formulation was introduced concurrently in Benton et al . ( 2021 ) ) . Multiple sets of network weights are treated as the corners of a simplex , and an optimization procedure updates these corners to find a region in weight space in which points inside the simplex correspond to accurate networks . We note that Wortsman et al . ( 2021 ) recalibrate BatchNorm statistics before evaluation , which we avoid . 3 COMPRESSIBLE SUBSPACES . 3.1 COMPRESSIBLE LINES . In our method , we train a neural network subspace ( Wortsman et al. , 2021 ) that contains a spectrum of networks that each have a different efficiency-accuracy trade-off . In Wortsman et al . ( 2021 ) , an architecture is chosen , and its collection of weights is denoted by ω . A linear subspace is parameterized by two sets of network weights , ω1 and ω2 . At training time , a network is sampled from the line defined by this pair of weights , ω∗ ( α ) = αω1 + ( 1−α ) ω2 , where α ∈ [ 0 , 1 ] . The forward and backward pass of gradient descent are computed using ω∗ ( α ) , and gradient updates are backpropagated to ω1 and ω2 . A cosine distance regularization term is used to ensure that ω1 and ω2 don ’ t converge to a single point . We propose training a linear subspace of networks in a similar manner , but we also bias the subspace to contain high-accuracy solutions at one end and high-efficiency solutions at the other end . To accomplish this , we introduce a parameter γ used to control the compression level and a compression function f ( ω , γ ) used to compress a model ’ s weights ω using a compression level γ . The parameter γ induces different compression levels at different positions in the linear subspace , and therefore can be considered a function γ ≡ γ ( α ) . When training , we first sample a network from the subspace , then compress it , obtaining a network with weights f ( ω∗ ( α ) , γ ( α ) ) . We then perform a standard forward and backward pass of gradient descent with it , backpropagating gradients to ω1 and ω2 . In summary , our training method adjusts the standard subspace training method to include the application of a compression function f at a compression level γ ( α ) . Note that we apply the compression after sampling the model ω∗ ( α ) from the subspace , since we want the sampled model to be compressed ( rather than ω1 and ω2 ) for efficient inference . We experiment with formulating our compression function as structured sparsity , unstructured sparsity , and quantization ( Section 4 ) . In all cases , the cost of computing f is small compared to the cost of a network forward pass ( Section A.1 ) . | The paper present a method for learning a compressible subspace of neural networks that contains a fine-grained spectrum of models that range from highly efficient to highly accurate. The proposed method allows choosing the proper point of trade-off between accuracy and efficiency at inference time, according to the available resources. There are also efforts to reduce the runtime tweaking overhead like replacing BatchNorm with GroupNorm. | SP:c773e2eefc2aa0e2ccc8aa8264015caf22a6617d |
LCS: Learning Compressible Subspaces for Adaptive Network Compression at Inference Time | When deploying deep learning models to a device , it is traditionally assumed that available computational resources ( compute , memory , and power ) remain static . However , real-world computing systems do not always provide stable resource guarantees . Computational resources need to be conserved when load from other processes is high or battery power is low . Inspired by recent works on neural network subspaces , we propose a method for training a compressible subspace of neural networks that contains a fine-grained spectrum of models that range from highly efficient to highly accurate . Our models require no retraining , thus our subspace of models can be deployed entirely on-device to allow adaptive network compression at inference time . We present results for achieving arbitrarily finegrained accuracy-efficiency trade-offs at inference time for structured and unstructured sparsity . We achieve accuracies on-par with standard models when testing our uncompressed models , and maintain high accuracy for sparsity rates above 90 % when testing our compressed models . We also demonstrate that our algorithm extends to quantization at variable bit widths , achieving accuracy on par with individually trained networks . 1 INTRODUCTION . Deep neural networks are deployed to a variety of computing platforms , including phones , tablets , and watches ( Dhar et al. , 2019 ) . Networks are generally designed to consume a fixed budget of resources , but the compute resources available on a device can vary while the device is in use . Computational burden from other processes , as well as battery life , may influence the availability of resources to a neural network . Adaptively adjusting inference-time load is beyond the capabilities of traditional neural networks , which are designed with a fixed architecture and a fixed resource usage . A simple approach to the problem of providing an accuracy-efficiency trade-off is to train multiple networks of different sizes . In this approach , multiple networks are stored on the device and loaded into memory when needed . There is a breadth of research in the design of efficient architectures that can be trained with different capacities , then deployed on a device ( Howard et al. , 2017 ; Sandler et al. , 2018 ; Howard et al. , 2019 ) . However , there are a few drawbacks with using multiple networks to provide an accuracy-efficiency trade-off : ( 1 ) it requires training and deploying multiple networks ( which induces training-time computational burden and on-device storage burden ) , ( 2 ) it requires all compression levels to be specified before deployment , and ( 3 ) it requires new networks to be loaded into memory when changing the compression level , which prohibits real-time adaptive compression . Previous methods address the first issue in the setting of structured sparsity by training a single network conditioned to perform well when varying numbers of channels are pruned ( Yu et al. , 2018 ; Yu & Huang , 2019 ) . However , these methods require BatchNorm ( Ioffe & Szegedy , 2015 ) statistics to be recalibrated for every accuracy-efficiency configuration before deployment . This requires users to know every compression level in advance and requires storage of extra parameters ( which can be problematic for low-compute devices ) . Another method trains a larger network that can be queried for efficient subnetworks ( Cai et al. , 2020 ) , but requires users to reload network weights , and to know every compression level before deployment . We address the issue of deploying a model that can be compressed in real-time without specifying the compression levels beforehand . Inspired by Wortsman et al . ( 2021 ) , we formulate this problem as computing an adaptively compressible network subspace ( Figure 1a ) . We train a linear subspace using two sets of weights , conditioning them so that a convex combination of them produces an accurate network . We expand on Wortsman et al . ( 2021 ) by ( 1 ) specializing our linear subspace to contain an arbitrarily fine-grained efficiency-accuracy trade-off ( meaning , any compression level within predefined limits can be chosen ) , and ( 2 ) replacing BatchNorm ( Ioffe & Szegedy , 2015 ) with GroupNorm ( Wu & He , 2018 ) to avoid BatchNorm recalibration . Contributions : Our contributions are as follows . ( 1 ) We introduce our method , Learning Compressible Subspaces ( LCS ) , for training models that can be compressed with arbitrarily fine-grained compression levels in real-time after deployment . To our knowledge this has not been done before . ( 2 ) We demonstrate a new use for neural network subspaces , specializing at one end for high-accuracy and at the other end for high-efficiency . ( 3 ) We provide an empirical evaluation of our method using structured sparsity , unstructured sparsity , and quantization . ( 4 ) We open source our code at https : //withheld.for.review . 2 RELATED WORK . Architectures Demonstrating Efficiency-Accuracy Trade-Offs : Several recent network architectures include a hyperparameter to control the number of filters in each layer ( Howard et al. , 2017 ; Sandler et al. , 2018 ; Howard et al. , 2019 ) or the number of blocks in the network ( Tan & Le , 2019 ) . In Once For All ( Cai et al. , 2020 ) , the need for individually training networks of different sizes is circumvented . Instead , a single large network is trained , then queried for efficient subnetworks . We differ from these methods in two ways . First , we compress on-device without specifying the compression levels before deployment . Previous works require training separate networks ( or in the case of Once For All , querying a larger model for a compressed network ) before deployment . Second , we don ’ t require deploying a set of weights for every compression level . A method for post-training quantization to variable bit widths appears in Shkolnik et al . ( 2020 ) , but it relies on calibration data and can not be run on low-compute edge devices . Thus , compression levels must be specified before deployment . They also present a method for quantization-aware training to variable bit widths , but most of their results keep activation bit widths fixed , whereas we vary it . Adaptive Compression : Recent works train a single neural network which can be adaptively configured at inference time to execute at different compression levels . These methods are the closest to our work . In Learning Efficient Convolutions ( LEC ) ( Liu et al. , 2017 ) , the authors train a single network , then fine-tune it at different structured sparsity rates ( though they also present results without fine-tuning , which is closer to our use case ) . Other methods train a single set of weights conditioned to perform well when channels are pruned , but require recalibration ( or preemptive storage ) of BatchNorm ( Ioffe & Szegedy , 2015 ) statistics at each sparsity level . These methods include Network Slimming ( NS ) ( Yu et al. , 2018 ) and Universal Slimming ( US ) ( Yu & Huang , 2019 ) . Similar methods train a single network to perform well at various levels of quantization by storing extra copies of BatchNorm statistics ( Guerra et al. , 2020 ) . We differ from these methods by avoiding the need to recalibrate or store BatchNorm statistics ( Section 3.3 ) and by allowing for fine-grained selection of compression levels at inference time , neither of which have been done before ( Table 1 ) . Additionally , our method is broadly applicable to a variety of compression methods , whereas previous works focus on a single compression method . Other Post-Training Compression Methods : Other works have investigated post-training compression . In Nagel et al . ( 2019 ) , a method is presented for compressing 32 bit models to 8 bits , though it has not been evaluated in the low-bit regime . It involves running an equalization step and assuming a Conv-BatchNorm-ReLU network structure . A related post-training compression method is shown in Horton et al . ( 2020 ) , which shows results for both quantization and sparsity . However , their sparsity method requires a lightweight training phase . We differ from these methods in providing real-time post-deployment compression for both sparsity and quantization without making assumptions about the network structure . Sparse Networks : Sparsity is a well-studied approach to reduce neural network compute . Recent works have achieved state-of-the-art accuracy using simple magnitude-based pruning ( Han et al. , 2015 ; Zhu & Gupta , 2017 ; See et al. , 2016 ; Narang et al. , 2017 ) . When experimenting with structured sparsity , we simply remove filters from the network , as described in Yu et al . ( 2018 ) . When investigating unstructured sparsity , we use TopK pruning ( Zhu & Gupta , 2017 ) . Quantized Networks : Network quantization represents the weights and/or activations of neural networks with lower-bit integral representations , rather than 32-bit floating point . This reduces model size and memory bandwidth and can accelerate inference . Our work follows the affine quantization scheme presented in Jacob et al . ( 2018 ) , in which a scale and offset are applied to an integer tensor to approximate the original floating-point tensor . However , our method is general enough to utilize any other quantization scheme . Neural Network Subspaces : The idea of learning a neural network subspace is introduced in Wortsman et al . ( 2021 ) ( though another formulation was introduced concurrently in Benton et al . ( 2021 ) ) . Multiple sets of network weights are treated as the corners of a simplex , and an optimization procedure updates these corners to find a region in weight space in which points inside the simplex correspond to accurate networks . We note that Wortsman et al . ( 2021 ) recalibrate BatchNorm statistics before evaluation , which we avoid . 3 COMPRESSIBLE SUBSPACES . 3.1 COMPRESSIBLE LINES . In our method , we train a neural network subspace ( Wortsman et al. , 2021 ) that contains a spectrum of networks that each have a different efficiency-accuracy trade-off . In Wortsman et al . ( 2021 ) , an architecture is chosen , and its collection of weights is denoted by ω . A linear subspace is parameterized by two sets of network weights , ω1 and ω2 . At training time , a network is sampled from the line defined by this pair of weights , ω∗ ( α ) = αω1 + ( 1−α ) ω2 , where α ∈ [ 0 , 1 ] . The forward and backward pass of gradient descent are computed using ω∗ ( α ) , and gradient updates are backpropagated to ω1 and ω2 . A cosine distance regularization term is used to ensure that ω1 and ω2 don ’ t converge to a single point . We propose training a linear subspace of networks in a similar manner , but we also bias the subspace to contain high-accuracy solutions at one end and high-efficiency solutions at the other end . To accomplish this , we introduce a parameter γ used to control the compression level and a compression function f ( ω , γ ) used to compress a model ’ s weights ω using a compression level γ . The parameter γ induces different compression levels at different positions in the linear subspace , and therefore can be considered a function γ ≡ γ ( α ) . When training , we first sample a network from the subspace , then compress it , obtaining a network with weights f ( ω∗ ( α ) , γ ( α ) ) . We then perform a standard forward and backward pass of gradient descent with it , backpropagating gradients to ω1 and ω2 . In summary , our training method adjusts the standard subspace training method to include the application of a compression function f at a compression level γ ( α ) . Note that we apply the compression after sampling the model ω∗ ( α ) from the subspace , since we want the sampled model to be compressed ( rather than ω1 and ω2 ) for efficient inference . We experiment with formulating our compression function as structured sparsity , unstructured sparsity , and quantization ( Section 4 ) . In all cases , the cost of computing f is small compared to the cost of a network forward pass ( Section A.1 ) . | The paper proposes to learn compressive subspaces which can adaptively compress the network during inference. It constructs either linear subspace or a single endpoint for compression. It replaces BN with GroupNorm to avoid re-calibrating during inference or after adjustment. Their method is evaluated in three different scenarios: structured sparsity, unstructured sparsity, and quantization. | SP:c773e2eefc2aa0e2ccc8aa8264015caf22a6617d |
Overcoming The Spectral Bias of Neural Value Approximation | 1 INTRODUCTION Approximating value functions with deep neural networks is a critical component of stateof-the-art reinforcement learning ( RL ) algorithms . It has been shown that even for onedimensional continuous state space and a simple ( i.e. , piece-wise linear ) forward dynamics , there exists many MDPs with highly non-linear optimal Q-functions ( Dong et al. , 2020 ) . The authors further suggest that , many real-world problems have similarly complex value functions that are challenging to approximate us- ing a deep neural network . To understand these challenges , we re-created one of the toy MDPs from Dong et al . ( 2020 ) . The forward dynamics and the corresponding optimal Q-function of this MDP are shown in Figure 1 . We use a multi-layer perceptron ( MLP ) ( 4 layers deep with 400 hidden units each layer ) to learn the optimal Q-function of the toy MDP with offline fitted Q iteration ( FQI ) . We use a dataset of transitions collected by first uniformly sampling state-action pairs from the toy MDP and then taking the sampled action on the sampled state to get the next state . Despite training for 400 epochs , we observe the MLP under-fitting the optimal Q-function . It is natural to ask why the under-fitting occurs despite MLPs being universal function approximators . There could be several possible reasons which we now investigate . Prior work of Kumar et al . ( 2021 ) has argued that minimizing TD ( Temporal-Difference ) error in value-based deep RL through bootstrapping resembles self-distillation ( Mobahi et al. , 2020 ) , which is known to induce under-parameterization . To check if the primary cause of under-fitting is bootstrapping , we learn the Q-function using the same MLP architecture with supervised learning using ground truth Q values . Figure 2 shows that the under-fitting still persists after 400 epochs , implying a potential issue with the MLP architecture / training paradigm . To test whether under-fitting is the result of an under-parameterized MLP architecture , we use a 12-layer deep ( with 400 hidden units each layer ) MLP to learn the Q-function with supervised learning . However , as seen in Figure 2 , under-fitting still persists implying that the under-parameterization in the MLP architecture might not be the issue . Finally , to test whether under-fitting is caused by the training paradigm , we train the original MLP architecture for 2000 epochs to learn the Q-function with supervised learning . From Figure 2 , we see that the MLP fit to the Q-function improves , thereby implying that training for a large number of epochs resolves the issue . Given that more gradient updates improve the MLP ’ s fit to the Q-function , could we solve the underfitting issue by making the training period arbitrarily long ? No , given a long training period increases compute requirements in offline FQI and additionally causes data inefficiency in online RL . This is because data collection is interleaved with Q learning in online RL . When MLP fit to the Q-function is bad , the resulting policy might take suboptimal actions with low returns resulting in data that might not be useful for Q learning and would need to be recollected . A potential solution to improve data efficiency in online RL is by taking more gradient steps for learning Q-functions between data collection . However , as pointed in Fu et al . ( 2019 ) , this can cause MLPs to overfit to off-policy samples thereby degrading the overall performance . Therefore , it is imperative to understand the reasons behind the training inefficiency in learning Q-functions so that we can speedup the training . Recent works ( Rahaman et al. , 2019 ; Shah et al. , 2020 ; Yang & Salman , 2019 ; Huh et al. , 2021 ) have suggested presence of spectral bias in MLPs which encourages them to learn the low-frequency components of the target function before the high frequency components . Since the optimal Qfunction of the toy MDP has a large number of high-frequency components in its spectrum ( as seen from Figure 1 ) , the spectral bias in MLPs might explain why they take a large number of epochs to fit the Q function . To evade the spectral bias of MLPs , some recent works ( Huh et al. , 2021 ; Sinha et al. , 2020 ) proposed use of residual connections to increase the rank of MLP features . While this approach improves the performance of RL algorithms on low-dimensional continuous control tasks such as HalfCheetah ( state dim of 17 ) , it fails to provide any dividends in complex high-dimensional continuous control tasks such as Ant ( state dimension of 111 ) and Humanoid ( state dimension of 376 ) ( Sinha et al. , 2020 ) . Another solution , proposed in the graphics literature ( Tancik et al. , 2020 ; Sitzmann et al. , 2020 ; Mildenhall et al. , 2020 ) , is to transform the input with random Fourier features before passing it through a MLP . Taking cues from these works , we propose Random Fourier Network ( RFN ) , as a drop-in replacement of standard MLPs , to improve neural value estimation in MDPs with complex optimal Q-functions . Using RFN ( 4 layers deep with 400 hidden units each layer ) to learn the optimal Q-function of the toy MDP with FQI leads to a near-perfect fit after 400 epochs , as seen in Figure 2 . This shows that RFN is successful in evading the spectral bias of the MLPs . In coming sections , we will first describe RFN in detail and finally demonstrate the advantage of using them with actor-critic algorithms ( RFAC ) on challenging continuous control tasks such as Ant and Humanoid . 2 PRELIMINARIES . A Markov decision process ( MDP , Puterman 2014 ) can be defined by the tuple 〈S , A , R , P , µ , γ〉 where S and A are the state and action spaces , P : S × A 7→ S is the transition function , R : S × A 7→ R is the reward and µ ( s ) is the initial state distribution . We consider an infinite horizon problem where γ is the discount factor . The goal of reinforcement learning is to maximize the expected future discounted return J = E [ ∑∞ t=0 γ tR ( st , at ) ] . We define Qπ ( s , a ) function as expected future discounted return following the policy π when starting from state s and taking action a i.e . Qπ ( s , a ) = E [ ∑∞ t=0 γ tR ( st , at ) | ( s0 , a0 ) = ( s , a ) ] . Furthermore , J = Es µ ( s ) , a π ( a|s ) [ Qπ ( s , a ) ] . The optimal Q∗ ( s , a ) is the fixed point of the Bellman optimality operator B∗ B∗Q ( s , a ) = R ( s , a ) + γEs′∼P ( s′|s , a ) [ max a∗ Q ( s′ , a∗ ) ] ( 1 ) When P isn ’ t known but accessible through a sampled dataset D , we can learn Q∗ ( s , a ) using a parameterized modelQθ ( s , a ) with offline fitted-Q-iteration ( FQI ) ( Riedmiller , 2005 ) that optimizes the TD loss with Adam ( Kingma & Ba , 2015 ) min θ E ( s , a , s′ ) ∼D‖Qθ ( s , a ) −B∗Qθ′ ( s , a ) ‖ ( 2 ) Here , θ′ is a running smoothed average of θ from past iterations of Adam optimizer and Qθ′ is called the target Q-network . We use offline FQI for our offline RL experiments . Additionally , we use DDPG as our base RL algorithm for online RL experiments . 2.1 A KERNEL-SPECTRAL PERSPECTIVE ON THE SIMPLICITY-BIAS . Rahaman et al . ( 2019 ) recently observed that it took less gradient steps for a piece-wise linear network with a ReLU activation to fit to a low-frequency signal than a high-frequency one . This intrinsic bias , called the “ spectral bias ” , is a variant of the “ simplicity bias ” that is observed by Zhang et al . ( 2021 ) and Valle-Perez et al . ( 2018 ) on different occasions . To understand the source of these biases , the community has made two important connections . The first is Conjugate Kernel ( CK ) or the equivalent Gaussian process kernel . CK describes the network parameterization at initialization by computing the gram matrix of the final feature layer ( right before the output ) over the support . The second is the Neural Tangent Kernel , or NTK , which is the gram matrix of the flattened gradient vectors . Its spectrum governs convergence under gradient based updates , in a linear fashion ( Rahaman et al. , 2019 ; Yang & Salman , 2019 ) . When the data is not uniformly distributed , the convergence is linear with respect to the density of the data ( Fan & Wang , 2020 ) . Connecting Effective Rank with Kernel Spectrum Consider a random matrix A sampled from a distribution p ( A ) with the discrete spectrum σ = { σ1 ≥ σ2 ≥ · · · ≥ σQ } , the effective rank ( Roy & Vetterli , 2007 ) is defined as the spectral entropy of the nominal distribution given by the spectrum of the matrix according to the following formula erank ( A ) = expH ( { σi ‖σ‖1 } ) where i ∼ { 1 , . . . Q } . ( 3 ) The ` 1 norm ‖σ‖1 is called the spectral norm , which acts as the partition function of this distribution . H ( σ ) is called the Shannon entropy . In other words , the effective rank is the exponential of the log likelihood-weighted , normalized sum of the kernel spectrum that describes the volume span by the random matrices . 3 OVERCOMING THE SPECTRAL BIAS OF NEURAL VALUE ESTIMATION . We now apply spectral analysis directly to a toy MDP problem . Setup We extend the toy MDP problem from Dong et al . 2020 to consider a general class of toy Markov decision processM with a state space S = R [ 0,1 ) defined on the real-line . The reward is a sine function R ( s ) = sin ( 2πs ) with a simple spectral signature . The action space is a discrete set { 0 , 1 } , each corresponds to a distinct forward dynamics that is randomly sampled from the space of piece-wise linear functions with k “ kinks ” . For all of the examples below , we use a fixed number of kinks k = 10 , and uniformly sample the value of each turning point in this dynamic function between 0 and 1 . The result is a distributionM that we can sample from M ∼M = p ( M ) . ( 4 ) Fitted Q Iteration Consider a sequence of value functions under fitted Q iteration ( Ernst et al. , 2005 ) { Q0 ( s , a ) , Q1 ( s , a ) , Q2 ( s , a ) , · · ·QH ( s , a ) } starting from Q0 ( s , a ) = R ( s , a ) , generated via the repeated application of the Bellman optimality operator BQ ( s , a ) = R ( s , a ) + γmax a∗ Q ( s′ , a∗ ) where s′ ∼ T ( s , a ) . ( 5 ) The Bellman optimality operator is non-linear and imprints a non-trivial spectrum to the resulting Qi as it is applied recursively . We can get an intuitive understanding of the evolution of this process by looking at the spectra of Qi at various horizon H , or by changing the discount factor γ . We present the evolving spectra in figure 3 . As the horizon of the problem increases , the value function attains a larger weight in the higher-frequency part of the spectrum . The same effect also takes place if we increase the discount factor from a small value 0.1 all the way up to 0.99 . We fix the horizon to 200 in this case , and observe a similar increase in the higher frequency components with a longer effective recursion depth . We can quantitatively describe this trend by taking the effective rank of each value function , which is equivalent to computing the Shannon entropy of the spectrum . We present these results in figure 4 . In other words , the complexity of the value function comes from the repeated application of the Bellman optimality operator in a process that is not dissimilar to an “ infinite corridor ” . The spectrum of the Bellman operated gets folded exponentially into each Q iteration . To match this complexity , we need a function approximator class that has a similar long-tail in the higher-frequency spectrum , to avoid an exponential convergence drop-off in these areas . | The paper discussed the problem of spectral bias in MLPs (i.e., dependence on the higher-frequency part of input feature is under-fitted) within RL domain. The authors first described the problem with toy examples, which clearly explained this problem. Then it was suggested to use random Fourier feature network (RFN) to transform the input to frequency domain and then feed to the network, to resolve this issue. Experiments demonstrated effectiveness of RFN to learn a complicated Q-function in low-dimensional state space. And it was also shown that RFN contribute to performance gain with DDPG on high-dimensional robotic tasks. The authors also did an “ablation study” (I would rather call it “sensitivity analysis” instead) to empirically show how the performance depends on the choice of hyper-parameters. | SP:d7ab352699524e42fd24a08aa568fec3f37f92c6 |
Overcoming The Spectral Bias of Neural Value Approximation | 1 INTRODUCTION Approximating value functions with deep neural networks is a critical component of stateof-the-art reinforcement learning ( RL ) algorithms . It has been shown that even for onedimensional continuous state space and a simple ( i.e. , piece-wise linear ) forward dynamics , there exists many MDPs with highly non-linear optimal Q-functions ( Dong et al. , 2020 ) . The authors further suggest that , many real-world problems have similarly complex value functions that are challenging to approximate us- ing a deep neural network . To understand these challenges , we re-created one of the toy MDPs from Dong et al . ( 2020 ) . The forward dynamics and the corresponding optimal Q-function of this MDP are shown in Figure 1 . We use a multi-layer perceptron ( MLP ) ( 4 layers deep with 400 hidden units each layer ) to learn the optimal Q-function of the toy MDP with offline fitted Q iteration ( FQI ) . We use a dataset of transitions collected by first uniformly sampling state-action pairs from the toy MDP and then taking the sampled action on the sampled state to get the next state . Despite training for 400 epochs , we observe the MLP under-fitting the optimal Q-function . It is natural to ask why the under-fitting occurs despite MLPs being universal function approximators . There could be several possible reasons which we now investigate . Prior work of Kumar et al . ( 2021 ) has argued that minimizing TD ( Temporal-Difference ) error in value-based deep RL through bootstrapping resembles self-distillation ( Mobahi et al. , 2020 ) , which is known to induce under-parameterization . To check if the primary cause of under-fitting is bootstrapping , we learn the Q-function using the same MLP architecture with supervised learning using ground truth Q values . Figure 2 shows that the under-fitting still persists after 400 epochs , implying a potential issue with the MLP architecture / training paradigm . To test whether under-fitting is the result of an under-parameterized MLP architecture , we use a 12-layer deep ( with 400 hidden units each layer ) MLP to learn the Q-function with supervised learning . However , as seen in Figure 2 , under-fitting still persists implying that the under-parameterization in the MLP architecture might not be the issue . Finally , to test whether under-fitting is caused by the training paradigm , we train the original MLP architecture for 2000 epochs to learn the Q-function with supervised learning . From Figure 2 , we see that the MLP fit to the Q-function improves , thereby implying that training for a large number of epochs resolves the issue . Given that more gradient updates improve the MLP ’ s fit to the Q-function , could we solve the underfitting issue by making the training period arbitrarily long ? No , given a long training period increases compute requirements in offline FQI and additionally causes data inefficiency in online RL . This is because data collection is interleaved with Q learning in online RL . When MLP fit to the Q-function is bad , the resulting policy might take suboptimal actions with low returns resulting in data that might not be useful for Q learning and would need to be recollected . A potential solution to improve data efficiency in online RL is by taking more gradient steps for learning Q-functions between data collection . However , as pointed in Fu et al . ( 2019 ) , this can cause MLPs to overfit to off-policy samples thereby degrading the overall performance . Therefore , it is imperative to understand the reasons behind the training inefficiency in learning Q-functions so that we can speedup the training . Recent works ( Rahaman et al. , 2019 ; Shah et al. , 2020 ; Yang & Salman , 2019 ; Huh et al. , 2021 ) have suggested presence of spectral bias in MLPs which encourages them to learn the low-frequency components of the target function before the high frequency components . Since the optimal Qfunction of the toy MDP has a large number of high-frequency components in its spectrum ( as seen from Figure 1 ) , the spectral bias in MLPs might explain why they take a large number of epochs to fit the Q function . To evade the spectral bias of MLPs , some recent works ( Huh et al. , 2021 ; Sinha et al. , 2020 ) proposed use of residual connections to increase the rank of MLP features . While this approach improves the performance of RL algorithms on low-dimensional continuous control tasks such as HalfCheetah ( state dim of 17 ) , it fails to provide any dividends in complex high-dimensional continuous control tasks such as Ant ( state dimension of 111 ) and Humanoid ( state dimension of 376 ) ( Sinha et al. , 2020 ) . Another solution , proposed in the graphics literature ( Tancik et al. , 2020 ; Sitzmann et al. , 2020 ; Mildenhall et al. , 2020 ) , is to transform the input with random Fourier features before passing it through a MLP . Taking cues from these works , we propose Random Fourier Network ( RFN ) , as a drop-in replacement of standard MLPs , to improve neural value estimation in MDPs with complex optimal Q-functions . Using RFN ( 4 layers deep with 400 hidden units each layer ) to learn the optimal Q-function of the toy MDP with FQI leads to a near-perfect fit after 400 epochs , as seen in Figure 2 . This shows that RFN is successful in evading the spectral bias of the MLPs . In coming sections , we will first describe RFN in detail and finally demonstrate the advantage of using them with actor-critic algorithms ( RFAC ) on challenging continuous control tasks such as Ant and Humanoid . 2 PRELIMINARIES . A Markov decision process ( MDP , Puterman 2014 ) can be defined by the tuple 〈S , A , R , P , µ , γ〉 where S and A are the state and action spaces , P : S × A 7→ S is the transition function , R : S × A 7→ R is the reward and µ ( s ) is the initial state distribution . We consider an infinite horizon problem where γ is the discount factor . The goal of reinforcement learning is to maximize the expected future discounted return J = E [ ∑∞ t=0 γ tR ( st , at ) ] . We define Qπ ( s , a ) function as expected future discounted return following the policy π when starting from state s and taking action a i.e . Qπ ( s , a ) = E [ ∑∞ t=0 γ tR ( st , at ) | ( s0 , a0 ) = ( s , a ) ] . Furthermore , J = Es µ ( s ) , a π ( a|s ) [ Qπ ( s , a ) ] . The optimal Q∗ ( s , a ) is the fixed point of the Bellman optimality operator B∗ B∗Q ( s , a ) = R ( s , a ) + γEs′∼P ( s′|s , a ) [ max a∗ Q ( s′ , a∗ ) ] ( 1 ) When P isn ’ t known but accessible through a sampled dataset D , we can learn Q∗ ( s , a ) using a parameterized modelQθ ( s , a ) with offline fitted-Q-iteration ( FQI ) ( Riedmiller , 2005 ) that optimizes the TD loss with Adam ( Kingma & Ba , 2015 ) min θ E ( s , a , s′ ) ∼D‖Qθ ( s , a ) −B∗Qθ′ ( s , a ) ‖ ( 2 ) Here , θ′ is a running smoothed average of θ from past iterations of Adam optimizer and Qθ′ is called the target Q-network . We use offline FQI for our offline RL experiments . Additionally , we use DDPG as our base RL algorithm for online RL experiments . 2.1 A KERNEL-SPECTRAL PERSPECTIVE ON THE SIMPLICITY-BIAS . Rahaman et al . ( 2019 ) recently observed that it took less gradient steps for a piece-wise linear network with a ReLU activation to fit to a low-frequency signal than a high-frequency one . This intrinsic bias , called the “ spectral bias ” , is a variant of the “ simplicity bias ” that is observed by Zhang et al . ( 2021 ) and Valle-Perez et al . ( 2018 ) on different occasions . To understand the source of these biases , the community has made two important connections . The first is Conjugate Kernel ( CK ) or the equivalent Gaussian process kernel . CK describes the network parameterization at initialization by computing the gram matrix of the final feature layer ( right before the output ) over the support . The second is the Neural Tangent Kernel , or NTK , which is the gram matrix of the flattened gradient vectors . Its spectrum governs convergence under gradient based updates , in a linear fashion ( Rahaman et al. , 2019 ; Yang & Salman , 2019 ) . When the data is not uniformly distributed , the convergence is linear with respect to the density of the data ( Fan & Wang , 2020 ) . Connecting Effective Rank with Kernel Spectrum Consider a random matrix A sampled from a distribution p ( A ) with the discrete spectrum σ = { σ1 ≥ σ2 ≥ · · · ≥ σQ } , the effective rank ( Roy & Vetterli , 2007 ) is defined as the spectral entropy of the nominal distribution given by the spectrum of the matrix according to the following formula erank ( A ) = expH ( { σi ‖σ‖1 } ) where i ∼ { 1 , . . . Q } . ( 3 ) The ` 1 norm ‖σ‖1 is called the spectral norm , which acts as the partition function of this distribution . H ( σ ) is called the Shannon entropy . In other words , the effective rank is the exponential of the log likelihood-weighted , normalized sum of the kernel spectrum that describes the volume span by the random matrices . 3 OVERCOMING THE SPECTRAL BIAS OF NEURAL VALUE ESTIMATION . We now apply spectral analysis directly to a toy MDP problem . Setup We extend the toy MDP problem from Dong et al . 2020 to consider a general class of toy Markov decision processM with a state space S = R [ 0,1 ) defined on the real-line . The reward is a sine function R ( s ) = sin ( 2πs ) with a simple spectral signature . The action space is a discrete set { 0 , 1 } , each corresponds to a distinct forward dynamics that is randomly sampled from the space of piece-wise linear functions with k “ kinks ” . For all of the examples below , we use a fixed number of kinks k = 10 , and uniformly sample the value of each turning point in this dynamic function between 0 and 1 . The result is a distributionM that we can sample from M ∼M = p ( M ) . ( 4 ) Fitted Q Iteration Consider a sequence of value functions under fitted Q iteration ( Ernst et al. , 2005 ) { Q0 ( s , a ) , Q1 ( s , a ) , Q2 ( s , a ) , · · ·QH ( s , a ) } starting from Q0 ( s , a ) = R ( s , a ) , generated via the repeated application of the Bellman optimality operator BQ ( s , a ) = R ( s , a ) + γmax a∗ Q ( s′ , a∗ ) where s′ ∼ T ( s , a ) . ( 5 ) The Bellman optimality operator is non-linear and imprints a non-trivial spectrum to the resulting Qi as it is applied recursively . We can get an intuitive understanding of the evolution of this process by looking at the spectra of Qi at various horizon H , or by changing the discount factor γ . We present the evolving spectra in figure 3 . As the horizon of the problem increases , the value function attains a larger weight in the higher-frequency part of the spectrum . The same effect also takes place if we increase the discount factor from a small value 0.1 all the way up to 0.99 . We fix the horizon to 200 in this case , and observe a similar increase in the higher frequency components with a longer effective recursion depth . We can quantitatively describe this trend by taking the effective rank of each value function , which is equivalent to computing the Shannon entropy of the spectrum . We present these results in figure 4 . In other words , the complexity of the value function comes from the repeated application of the Bellman optimality operator in a process that is not dissimilar to an “ infinite corridor ” . The spectrum of the Bellman operated gets folded exponentially into each Q iteration . To match this complexity , we need a function approximator class that has a similar long-tail in the higher-frequency spectrum , to avoid an exponential convergence drop-off in these areas . | This work proposes Random Fourier Networks (RFNs), MLPs with random Fourier featurization within the first layer. RFNs are supposed to learn high-frequency components of the value function more quickly than standard MLPs. The authors present an initialization scheme for the Fourier layer that is better-suited for high-dimensional inputs. RFNs are compared to non-Fourier-feature baselines on high-dimensional environments. | SP:d7ab352699524e42fd24a08aa568fec3f37f92c6 |
Overcoming The Spectral Bias of Neural Value Approximation | 1 INTRODUCTION Approximating value functions with deep neural networks is a critical component of stateof-the-art reinforcement learning ( RL ) algorithms . It has been shown that even for onedimensional continuous state space and a simple ( i.e. , piece-wise linear ) forward dynamics , there exists many MDPs with highly non-linear optimal Q-functions ( Dong et al. , 2020 ) . The authors further suggest that , many real-world problems have similarly complex value functions that are challenging to approximate us- ing a deep neural network . To understand these challenges , we re-created one of the toy MDPs from Dong et al . ( 2020 ) . The forward dynamics and the corresponding optimal Q-function of this MDP are shown in Figure 1 . We use a multi-layer perceptron ( MLP ) ( 4 layers deep with 400 hidden units each layer ) to learn the optimal Q-function of the toy MDP with offline fitted Q iteration ( FQI ) . We use a dataset of transitions collected by first uniformly sampling state-action pairs from the toy MDP and then taking the sampled action on the sampled state to get the next state . Despite training for 400 epochs , we observe the MLP under-fitting the optimal Q-function . It is natural to ask why the under-fitting occurs despite MLPs being universal function approximators . There could be several possible reasons which we now investigate . Prior work of Kumar et al . ( 2021 ) has argued that minimizing TD ( Temporal-Difference ) error in value-based deep RL through bootstrapping resembles self-distillation ( Mobahi et al. , 2020 ) , which is known to induce under-parameterization . To check if the primary cause of under-fitting is bootstrapping , we learn the Q-function using the same MLP architecture with supervised learning using ground truth Q values . Figure 2 shows that the under-fitting still persists after 400 epochs , implying a potential issue with the MLP architecture / training paradigm . To test whether under-fitting is the result of an under-parameterized MLP architecture , we use a 12-layer deep ( with 400 hidden units each layer ) MLP to learn the Q-function with supervised learning . However , as seen in Figure 2 , under-fitting still persists implying that the under-parameterization in the MLP architecture might not be the issue . Finally , to test whether under-fitting is caused by the training paradigm , we train the original MLP architecture for 2000 epochs to learn the Q-function with supervised learning . From Figure 2 , we see that the MLP fit to the Q-function improves , thereby implying that training for a large number of epochs resolves the issue . Given that more gradient updates improve the MLP ’ s fit to the Q-function , could we solve the underfitting issue by making the training period arbitrarily long ? No , given a long training period increases compute requirements in offline FQI and additionally causes data inefficiency in online RL . This is because data collection is interleaved with Q learning in online RL . When MLP fit to the Q-function is bad , the resulting policy might take suboptimal actions with low returns resulting in data that might not be useful for Q learning and would need to be recollected . A potential solution to improve data efficiency in online RL is by taking more gradient steps for learning Q-functions between data collection . However , as pointed in Fu et al . ( 2019 ) , this can cause MLPs to overfit to off-policy samples thereby degrading the overall performance . Therefore , it is imperative to understand the reasons behind the training inefficiency in learning Q-functions so that we can speedup the training . Recent works ( Rahaman et al. , 2019 ; Shah et al. , 2020 ; Yang & Salman , 2019 ; Huh et al. , 2021 ) have suggested presence of spectral bias in MLPs which encourages them to learn the low-frequency components of the target function before the high frequency components . Since the optimal Qfunction of the toy MDP has a large number of high-frequency components in its spectrum ( as seen from Figure 1 ) , the spectral bias in MLPs might explain why they take a large number of epochs to fit the Q function . To evade the spectral bias of MLPs , some recent works ( Huh et al. , 2021 ; Sinha et al. , 2020 ) proposed use of residual connections to increase the rank of MLP features . While this approach improves the performance of RL algorithms on low-dimensional continuous control tasks such as HalfCheetah ( state dim of 17 ) , it fails to provide any dividends in complex high-dimensional continuous control tasks such as Ant ( state dimension of 111 ) and Humanoid ( state dimension of 376 ) ( Sinha et al. , 2020 ) . Another solution , proposed in the graphics literature ( Tancik et al. , 2020 ; Sitzmann et al. , 2020 ; Mildenhall et al. , 2020 ) , is to transform the input with random Fourier features before passing it through a MLP . Taking cues from these works , we propose Random Fourier Network ( RFN ) , as a drop-in replacement of standard MLPs , to improve neural value estimation in MDPs with complex optimal Q-functions . Using RFN ( 4 layers deep with 400 hidden units each layer ) to learn the optimal Q-function of the toy MDP with FQI leads to a near-perfect fit after 400 epochs , as seen in Figure 2 . This shows that RFN is successful in evading the spectral bias of the MLPs . In coming sections , we will first describe RFN in detail and finally demonstrate the advantage of using them with actor-critic algorithms ( RFAC ) on challenging continuous control tasks such as Ant and Humanoid . 2 PRELIMINARIES . A Markov decision process ( MDP , Puterman 2014 ) can be defined by the tuple 〈S , A , R , P , µ , γ〉 where S and A are the state and action spaces , P : S × A 7→ S is the transition function , R : S × A 7→ R is the reward and µ ( s ) is the initial state distribution . We consider an infinite horizon problem where γ is the discount factor . The goal of reinforcement learning is to maximize the expected future discounted return J = E [ ∑∞ t=0 γ tR ( st , at ) ] . We define Qπ ( s , a ) function as expected future discounted return following the policy π when starting from state s and taking action a i.e . Qπ ( s , a ) = E [ ∑∞ t=0 γ tR ( st , at ) | ( s0 , a0 ) = ( s , a ) ] . Furthermore , J = Es µ ( s ) , a π ( a|s ) [ Qπ ( s , a ) ] . The optimal Q∗ ( s , a ) is the fixed point of the Bellman optimality operator B∗ B∗Q ( s , a ) = R ( s , a ) + γEs′∼P ( s′|s , a ) [ max a∗ Q ( s′ , a∗ ) ] ( 1 ) When P isn ’ t known but accessible through a sampled dataset D , we can learn Q∗ ( s , a ) using a parameterized modelQθ ( s , a ) with offline fitted-Q-iteration ( FQI ) ( Riedmiller , 2005 ) that optimizes the TD loss with Adam ( Kingma & Ba , 2015 ) min θ E ( s , a , s′ ) ∼D‖Qθ ( s , a ) −B∗Qθ′ ( s , a ) ‖ ( 2 ) Here , θ′ is a running smoothed average of θ from past iterations of Adam optimizer and Qθ′ is called the target Q-network . We use offline FQI for our offline RL experiments . Additionally , we use DDPG as our base RL algorithm for online RL experiments . 2.1 A KERNEL-SPECTRAL PERSPECTIVE ON THE SIMPLICITY-BIAS . Rahaman et al . ( 2019 ) recently observed that it took less gradient steps for a piece-wise linear network with a ReLU activation to fit to a low-frequency signal than a high-frequency one . This intrinsic bias , called the “ spectral bias ” , is a variant of the “ simplicity bias ” that is observed by Zhang et al . ( 2021 ) and Valle-Perez et al . ( 2018 ) on different occasions . To understand the source of these biases , the community has made two important connections . The first is Conjugate Kernel ( CK ) or the equivalent Gaussian process kernel . CK describes the network parameterization at initialization by computing the gram matrix of the final feature layer ( right before the output ) over the support . The second is the Neural Tangent Kernel , or NTK , which is the gram matrix of the flattened gradient vectors . Its spectrum governs convergence under gradient based updates , in a linear fashion ( Rahaman et al. , 2019 ; Yang & Salman , 2019 ) . When the data is not uniformly distributed , the convergence is linear with respect to the density of the data ( Fan & Wang , 2020 ) . Connecting Effective Rank with Kernel Spectrum Consider a random matrix A sampled from a distribution p ( A ) with the discrete spectrum σ = { σ1 ≥ σ2 ≥ · · · ≥ σQ } , the effective rank ( Roy & Vetterli , 2007 ) is defined as the spectral entropy of the nominal distribution given by the spectrum of the matrix according to the following formula erank ( A ) = expH ( { σi ‖σ‖1 } ) where i ∼ { 1 , . . . Q } . ( 3 ) The ` 1 norm ‖σ‖1 is called the spectral norm , which acts as the partition function of this distribution . H ( σ ) is called the Shannon entropy . In other words , the effective rank is the exponential of the log likelihood-weighted , normalized sum of the kernel spectrum that describes the volume span by the random matrices . 3 OVERCOMING THE SPECTRAL BIAS OF NEURAL VALUE ESTIMATION . We now apply spectral analysis directly to a toy MDP problem . Setup We extend the toy MDP problem from Dong et al . 2020 to consider a general class of toy Markov decision processM with a state space S = R [ 0,1 ) defined on the real-line . The reward is a sine function R ( s ) = sin ( 2πs ) with a simple spectral signature . The action space is a discrete set { 0 , 1 } , each corresponds to a distinct forward dynamics that is randomly sampled from the space of piece-wise linear functions with k “ kinks ” . For all of the examples below , we use a fixed number of kinks k = 10 , and uniformly sample the value of each turning point in this dynamic function between 0 and 1 . The result is a distributionM that we can sample from M ∼M = p ( M ) . ( 4 ) Fitted Q Iteration Consider a sequence of value functions under fitted Q iteration ( Ernst et al. , 2005 ) { Q0 ( s , a ) , Q1 ( s , a ) , Q2 ( s , a ) , · · ·QH ( s , a ) } starting from Q0 ( s , a ) = R ( s , a ) , generated via the repeated application of the Bellman optimality operator BQ ( s , a ) = R ( s , a ) + γmax a∗ Q ( s′ , a∗ ) where s′ ∼ T ( s , a ) . ( 5 ) The Bellman optimality operator is non-linear and imprints a non-trivial spectrum to the resulting Qi as it is applied recursively . We can get an intuitive understanding of the evolution of this process by looking at the spectra of Qi at various horizon H , or by changing the discount factor γ . We present the evolving spectra in figure 3 . As the horizon of the problem increases , the value function attains a larger weight in the higher-frequency part of the spectrum . The same effect also takes place if we increase the discount factor from a small value 0.1 all the way up to 0.99 . We fix the horizon to 200 in this case , and observe a similar increase in the higher frequency components with a longer effective recursion depth . We can quantitatively describe this trend by taking the effective rank of each value function , which is equivalent to computing the Shannon entropy of the spectrum . We present these results in figure 4 . In other words , the complexity of the value function comes from the repeated application of the Bellman optimality operator in a process that is not dissimilar to an “ infinite corridor ” . The spectrum of the Bellman operated gets folded exponentially into each Q iteration . To match this complexity , we need a function approximator class that has a similar long-tail in the higher-frequency spectrum , to avoid an exponential convergence drop-off in these areas . | This paper proposes a novel parameterization for MLPs, Random Fourier Features (RFF), which amount to using a sinusoidal activation, and initializing parameters to capture different frequencies (by initializing $w_{ij}$ with a variance proportional to a bandwidth hyperparameter $b$) and phases ($b_j \sim U(-\pi,\pi)$). This particular parameterization is motivated by the need, in RL, to learn value functions which have been found to potentially require high frequency components (whereas vanilla MLPs have a low-frequency/simplicity bias). The paper offers a very detailed exposition of why this is the case and of why RFFs can help. RFFs are then used on 3 standard control problems, showing some improvement when using DDPG with (vs without) RFFs. The choice of bandwidth as well as the number of features required are tested. | SP:d7ab352699524e42fd24a08aa568fec3f37f92c6 |
AutoMO-Mixer: An automated multi-objective multi-layer perspecton Mixer model for medical image based diagnosis | 1 INTRODUCTION . With the development of modern medicine , medical image has become an essential way to carry out personalized and accurate diagnosis . Due to the outstanding image analysis ability , deep learning has been widely used in medical image based diagnosis and has achieved great success ( Zhang & An , 2017 ) ( Shen et al. , 2017 ) in the past years . As there are so many parameters to train in current deep learning model such as convolutional neural network ( CNN ) ( Chua , 1998 ) , a large scale dataset is always required to feed the model . In particular , the parameters in convolutional layer accounted a majority of the parameters . However , it is very difficult to collect sufficient medical image samples for a particular clinical problem in practice . Recently , a new deep learning model termed MLP-Mixer ( Mixer ) ( Tolstikhin et al. , 2021 ) which was developed based on multi-layer perception ( MLP ) was proposed . Compared with CNN , the convolutional layer is removed from Mixer , leading to decreasing the architecture parameter scale sharply and Mixer can be trained sufficiently through small scale dataset . On the other hand , Mixer can achieve similar performance with CNN ( Tolstikhin et al. , 2021 ) . In summary , Mixer is a better architecture for building medical image based diagnostic model . Furthermore , building the balanced model between sensitivity and specificity is necessary ( Banerjee et al. , 2018 ) ( Mazurowski et al. , 2008 ) in clinical diagnosis . Sensitivity indicates the proportion of people who are actually sick that are diagnosed as sick , whilst specificity indicates the proportion of people who are truly healthy who are diagnosed as healthy ( Reitsma et al. , 2005 ) . As shown in Table 1 , although the accuracy is high , sensitivity and specificity imbalance , resulting in higher rate of missed diagnosis . Therefore , a more balanced model is necessary and a multi-objective model which considers sensitivity and specificity simultaneously is needed . As such , a new automated multi-objective Mixer ( AutoMO-Mixer ) model is developed in this study . In AutoMO-Mixer , both sensitivity and specificity are considered as the objective functions simultaneously and a Pareto-optimal model set can be obtained through the multi-objective optimization ( Zhou et al. , 2017 ) in training stage . In addition , since there are several hyperparameters which may affect the model performance in AutoMO-Mixer , Bayesian optimization ( Pelikan , 2005 ) is used to train the hyperparameters . In testing stage , the Pareto-optimal models with balanced sensitivity and specificity are chosen so as to improve model diversity and stability . To obtain more reliable result , evidential reasoning ( ER ) ( Yang & Xu , 2002 ) approach is used to fuse the output of selected Pareto-optimal models to obtain final outcome . The experimental studies on two public medical image datasets demonstrated that AutoMO-Mixer can outperform Mixer and CNN , and more balanced results can be achieved as well . 2 METHOD . 2.1 FRAMEWORK . The framework of AutoMO-Mixer is shown in figure 1 , which consists of training stage and testing stage . In training stage , medical images are fed into multiple Mixer models with randomly initialization . Then sensitivity and specificity are considered as the multi-objective functions simultaneously , and The Pareto-optimal Mixer model set can be obtained through multi-objective optimization . Meanwhile , since there are several hyperparameters which may affect the model performance , Bayesian optimization is used to optimize the hyperparameters . In testing stage , models with balanced sensitivity and specificity are fused using the ER approach to obtain more reliable final prediction model . 2.2 TRAINING STAGE . Assume α = { α1 , ... , αK } represents the hyperparameters , where K is the number of hyperparameter and β denotes the parameters in Mixer models . M = { m1 , ... , mq } represents the Mixer model , where q is the number of models . The MLP-Mixer network is a visual-oriented , all-MLP architecture as shown in figure 2 . It consists consisting of four parts ( Tolstikhin et al. , 2021 ) : splitting a picture into multiple patches shaped as a “ patches×channels ” table as an input ; converting all patches into feature embedding with a set of fully connected networks ; refining feature information through N mixer layers ; and classifying them with a full-connected layer after global average pooling . Mixer is divided into token-mixer ( feature refining along the columns direction of the table , i.e . spatial locations ) and channel-mixer ( feature refining along the rows direction of the table , i.e . channels ) , all using MLP for feature extraction , each MLP consists of two layers of full-connected and an activation function GELU . Since there are two groups ’ parameters to train , the training stage is a bilevel iterative optimization process . In other words , Mixers ’ model parameters and hyperparameters in AutoMO-Mixer are updated iteratively . The training stage is shown in figure 3 . In the beginning , all the parameters are initialized randomly . When the hyperparameters are determined , the Mixers ’ model parameters are trained first . To obtain the balanced model , sensitivity and specificity are considered as objective functions simultaneously , they are : fsen = TP TP + FN ( 1 ) fspe = TN TN + FP ( 2 ) where TP is true positive , TN is true negative , FP is false positive , FN is false negative . The goal is to maximize fsen , fspe simultaneously , that is : f = max β ( fsen , fspe ) ( 3 ) To optimize the above function , an iterative multi-objective immune algorithm ( IMIA ) ( Zhou et al. , 2017 ) ( Gong et al. , 2008 ) is used . IMIA consists of six steps : initialization , cloning , mutation , deletion , update , and termination . First , the initial solution set denoted by D ( t ) = { M1 , ... , MN } is generated , where Mi = { mi1 , ... , miq } , i = 1 , 2 , ... , N . Then the models with higher Mi = { mi1 , ... , miq } , i = 1 , 2 , ... , N will be replicated using the proportional cloning method . In the third step , a probability of mutation is randomly generated for each model , and the model performs mutation when its probability is larger than the mutation probability . After the mutation , the new models are generated . If the models have same sensitivity and specificity , only one model is remained and the all the other models are removed . Then the model size is kept through AUC based non-dominated sorting strategy . This training process will not stop until the maximum number of iterations is reached . Then the Pareto-optimal Mixer model set is generated , where the model set size is J . Now the optimal parameters for Mixer are obtained and hyperparameters are optimized . Since there are hyperparameters in Pareto-optimal model selection and fusion phase , the weight for each Pareto-optimal model should be estimated , which is denoted by wj . As the balanced model between sensitivity and specificity is desired , the ratio between them is considered , which is fsenfspe or fspe fsen . When the ratio is less than 0.5 or greater than 1 , the model is considered as extreme imbalance , setting wj as 0 . The expression of wj is as follows : wj = λ fjsen fjspe + ( 1− λ ) AUC , when 0.5 ≤ f j sen fjspe ≤ 1 λ fjspe fjsen + ( 1− λ ) AUC , when 0.5 ≤ f j spe fjsen ≤ 1 , j = 1 , 2 , ... , J , 0 Other situations ( 4 ) where λ indicates the importance of balance , and 1-λ indicates the importance of AUC . After calculating the wj for each model , the weights are normalized , that is : J∑ j=1 wj = 1 , 0 ≤ wj ≤ 1 ( 5 ) Then the Pareto-optimal models are fused through ER approach . Assume there are J models in Pareto-optimal model set , and the output probability ( normal and abnormal ) for each model is denoted by in Pj = { P 1j , P 2j } , j = 1 , 2 , ... , J , where P 1j is the output probability of abnormal , and P 2j is the output probability of normal . The final output probability P cfin , c = 1 , 2 is obtained through the ER fusion strategy ( Wang et al. , 2006 ) , that is : P cfin = ER ( P c j , wj ) , j = 1 , 2 , ... , J , c = 1 , 2 ( 6 ) where ER is : P cfin = µ× [ J∏ j=1 ( wjP c j + 1− wj ) − J∏ j=1 ( 1− wj ) ] 1− µ× [ J∏ j=1 ( 1− wj ) ] , c = 1 , 2 ( 7 ) The normalized factor µ is : µ = [ 2∑ c=1 J∏ j=1 ( wjP c j + 1− wj ) − J∏ j=1 ( 1− wj ) ] −1 ( 8 ) The hyperparameter α can be optimized through Bayesian optimization ( Pelikan , 2005 ) ( Springenberg et al. , 2016 ) , where the objective function is : fH = min α ( 1−AUC ) ( 9 ) Eqs . ( 3 ) and ( 9 ) are optimized iteratively until it reaches the termination critation . 2.3 TESTING STAGE . An illustration of testing stage is shown in figure 4 . The medical images are fed into the trained Pareto-optimal Mixer models and the output probabilities from each model can be obtained . Then ER approach is used to fuse the outputs of all the Mixer models and final output can be obtained . 3 EXPERIMENTS . 3.1 MATERIALS AND SETUP . The two public databases used in this paper are MRI images of brain tumors ( Panigrahi , 2021 ) and CT images of COVID-19 ( LuisBlanche , 2020 ) . The first dataset aims to help people for detecting brain tumors . It contains MRI scans of the brain , and each type of brain has 1500 images . We selected 900 images for modeling . The next dataset is collected from COVID19-related papers from medRxiv , bioRxiv , NEJM , JAMA , Lancet , etc . It contains 349 CT scans that are positive for COVID-19 , This dataset can be used to perform classification and automatically detect COVID-19 on CT scans . The distribution of the two types of data is shown in Table 2 . The examples of two datasets are shown in figure 5 . Before feeding the model , all the images are resized into 224 x 224 images , and each image is divided into 14 x 14 patches , where each patch size is 16 x 16 . There are two hyperparameters , Table 2 : Distribution of two types of data Train Train Test Test Abnormal Normal Abnormal normal Brain Tumor 360 360 90 90 COVID-19 280 318 69 79 Figure 5 : The examples of two datasets . MP and λ , which the range is set between 0 and 1 . The network structure contains five parameters , they are : the number of Mixer layers , the number of channels ( Hidden size C ) , the number of hidden layer neurons of token-mixing ( MLP dimension Ds ) , and the number of hidden layer neurons of channel-mixing ( MLP dimension Dc ) . The settings are shown in table 3 . In comparative study , Mixer and CNN model are evaluated . For fairness of comparison , the number of layers of the two models is required to be equal . We make the number of layers five . The four parameters of the Mixer network are set to 5 , 256 , 392 , 1024 , respectively . AUC ( Zhao et al. , 2011 ) is an ideal indicator to evaluate the reliability of the prediction results , and the larger the AUC shows that the better the classification of the model . Accuracy ( ACC ) represents the correct rate of diagnosis and is also an important indicator for evaluating the model . Therefore , sensitivity ( SEN ) , specificity ( SPE ) , AUC , ACC are used for evaluation . All the experiments are performed five times and the average results are shown . | This study is a simple combination of multiple-objective optimization and MLP Mixer on medical image application, with poor experiments to support any conclusion. Everything looks a direct application of existing technique. I don't understand why this study is submitted to a top conference. | SP:d1959df9bd53c144534b64e3e0c26d2617881f22 |
AutoMO-Mixer: An automated multi-objective multi-layer perspecton Mixer model for medical image based diagnosis | 1 INTRODUCTION . With the development of modern medicine , medical image has become an essential way to carry out personalized and accurate diagnosis . Due to the outstanding image analysis ability , deep learning has been widely used in medical image based diagnosis and has achieved great success ( Zhang & An , 2017 ) ( Shen et al. , 2017 ) in the past years . As there are so many parameters to train in current deep learning model such as convolutional neural network ( CNN ) ( Chua , 1998 ) , a large scale dataset is always required to feed the model . In particular , the parameters in convolutional layer accounted a majority of the parameters . However , it is very difficult to collect sufficient medical image samples for a particular clinical problem in practice . Recently , a new deep learning model termed MLP-Mixer ( Mixer ) ( Tolstikhin et al. , 2021 ) which was developed based on multi-layer perception ( MLP ) was proposed . Compared with CNN , the convolutional layer is removed from Mixer , leading to decreasing the architecture parameter scale sharply and Mixer can be trained sufficiently through small scale dataset . On the other hand , Mixer can achieve similar performance with CNN ( Tolstikhin et al. , 2021 ) . In summary , Mixer is a better architecture for building medical image based diagnostic model . Furthermore , building the balanced model between sensitivity and specificity is necessary ( Banerjee et al. , 2018 ) ( Mazurowski et al. , 2008 ) in clinical diagnosis . Sensitivity indicates the proportion of people who are actually sick that are diagnosed as sick , whilst specificity indicates the proportion of people who are truly healthy who are diagnosed as healthy ( Reitsma et al. , 2005 ) . As shown in Table 1 , although the accuracy is high , sensitivity and specificity imbalance , resulting in higher rate of missed diagnosis . Therefore , a more balanced model is necessary and a multi-objective model which considers sensitivity and specificity simultaneously is needed . As such , a new automated multi-objective Mixer ( AutoMO-Mixer ) model is developed in this study . In AutoMO-Mixer , both sensitivity and specificity are considered as the objective functions simultaneously and a Pareto-optimal model set can be obtained through the multi-objective optimization ( Zhou et al. , 2017 ) in training stage . In addition , since there are several hyperparameters which may affect the model performance in AutoMO-Mixer , Bayesian optimization ( Pelikan , 2005 ) is used to train the hyperparameters . In testing stage , the Pareto-optimal models with balanced sensitivity and specificity are chosen so as to improve model diversity and stability . To obtain more reliable result , evidential reasoning ( ER ) ( Yang & Xu , 2002 ) approach is used to fuse the output of selected Pareto-optimal models to obtain final outcome . The experimental studies on two public medical image datasets demonstrated that AutoMO-Mixer can outperform Mixer and CNN , and more balanced results can be achieved as well . 2 METHOD . 2.1 FRAMEWORK . The framework of AutoMO-Mixer is shown in figure 1 , which consists of training stage and testing stage . In training stage , medical images are fed into multiple Mixer models with randomly initialization . Then sensitivity and specificity are considered as the multi-objective functions simultaneously , and The Pareto-optimal Mixer model set can be obtained through multi-objective optimization . Meanwhile , since there are several hyperparameters which may affect the model performance , Bayesian optimization is used to optimize the hyperparameters . In testing stage , models with balanced sensitivity and specificity are fused using the ER approach to obtain more reliable final prediction model . 2.2 TRAINING STAGE . Assume α = { α1 , ... , αK } represents the hyperparameters , where K is the number of hyperparameter and β denotes the parameters in Mixer models . M = { m1 , ... , mq } represents the Mixer model , where q is the number of models . The MLP-Mixer network is a visual-oriented , all-MLP architecture as shown in figure 2 . It consists consisting of four parts ( Tolstikhin et al. , 2021 ) : splitting a picture into multiple patches shaped as a “ patches×channels ” table as an input ; converting all patches into feature embedding with a set of fully connected networks ; refining feature information through N mixer layers ; and classifying them with a full-connected layer after global average pooling . Mixer is divided into token-mixer ( feature refining along the columns direction of the table , i.e . spatial locations ) and channel-mixer ( feature refining along the rows direction of the table , i.e . channels ) , all using MLP for feature extraction , each MLP consists of two layers of full-connected and an activation function GELU . Since there are two groups ’ parameters to train , the training stage is a bilevel iterative optimization process . In other words , Mixers ’ model parameters and hyperparameters in AutoMO-Mixer are updated iteratively . The training stage is shown in figure 3 . In the beginning , all the parameters are initialized randomly . When the hyperparameters are determined , the Mixers ’ model parameters are trained first . To obtain the balanced model , sensitivity and specificity are considered as objective functions simultaneously , they are : fsen = TP TP + FN ( 1 ) fspe = TN TN + FP ( 2 ) where TP is true positive , TN is true negative , FP is false positive , FN is false negative . The goal is to maximize fsen , fspe simultaneously , that is : f = max β ( fsen , fspe ) ( 3 ) To optimize the above function , an iterative multi-objective immune algorithm ( IMIA ) ( Zhou et al. , 2017 ) ( Gong et al. , 2008 ) is used . IMIA consists of six steps : initialization , cloning , mutation , deletion , update , and termination . First , the initial solution set denoted by D ( t ) = { M1 , ... , MN } is generated , where Mi = { mi1 , ... , miq } , i = 1 , 2 , ... , N . Then the models with higher Mi = { mi1 , ... , miq } , i = 1 , 2 , ... , N will be replicated using the proportional cloning method . In the third step , a probability of mutation is randomly generated for each model , and the model performs mutation when its probability is larger than the mutation probability . After the mutation , the new models are generated . If the models have same sensitivity and specificity , only one model is remained and the all the other models are removed . Then the model size is kept through AUC based non-dominated sorting strategy . This training process will not stop until the maximum number of iterations is reached . Then the Pareto-optimal Mixer model set is generated , where the model set size is J . Now the optimal parameters for Mixer are obtained and hyperparameters are optimized . Since there are hyperparameters in Pareto-optimal model selection and fusion phase , the weight for each Pareto-optimal model should be estimated , which is denoted by wj . As the balanced model between sensitivity and specificity is desired , the ratio between them is considered , which is fsenfspe or fspe fsen . When the ratio is less than 0.5 or greater than 1 , the model is considered as extreme imbalance , setting wj as 0 . The expression of wj is as follows : wj = λ fjsen fjspe + ( 1− λ ) AUC , when 0.5 ≤ f j sen fjspe ≤ 1 λ fjspe fjsen + ( 1− λ ) AUC , when 0.5 ≤ f j spe fjsen ≤ 1 , j = 1 , 2 , ... , J , 0 Other situations ( 4 ) where λ indicates the importance of balance , and 1-λ indicates the importance of AUC . After calculating the wj for each model , the weights are normalized , that is : J∑ j=1 wj = 1 , 0 ≤ wj ≤ 1 ( 5 ) Then the Pareto-optimal models are fused through ER approach . Assume there are J models in Pareto-optimal model set , and the output probability ( normal and abnormal ) for each model is denoted by in Pj = { P 1j , P 2j } , j = 1 , 2 , ... , J , where P 1j is the output probability of abnormal , and P 2j is the output probability of normal . The final output probability P cfin , c = 1 , 2 is obtained through the ER fusion strategy ( Wang et al. , 2006 ) , that is : P cfin = ER ( P c j , wj ) , j = 1 , 2 , ... , J , c = 1 , 2 ( 6 ) where ER is : P cfin = µ× [ J∏ j=1 ( wjP c j + 1− wj ) − J∏ j=1 ( 1− wj ) ] 1− µ× [ J∏ j=1 ( 1− wj ) ] , c = 1 , 2 ( 7 ) The normalized factor µ is : µ = [ 2∑ c=1 J∏ j=1 ( wjP c j + 1− wj ) − J∏ j=1 ( 1− wj ) ] −1 ( 8 ) The hyperparameter α can be optimized through Bayesian optimization ( Pelikan , 2005 ) ( Springenberg et al. , 2016 ) , where the objective function is : fH = min α ( 1−AUC ) ( 9 ) Eqs . ( 3 ) and ( 9 ) are optimized iteratively until it reaches the termination critation . 2.3 TESTING STAGE . An illustration of testing stage is shown in figure 4 . The medical images are fed into the trained Pareto-optimal Mixer models and the output probabilities from each model can be obtained . Then ER approach is used to fuse the outputs of all the Mixer models and final output can be obtained . 3 EXPERIMENTS . 3.1 MATERIALS AND SETUP . The two public databases used in this paper are MRI images of brain tumors ( Panigrahi , 2021 ) and CT images of COVID-19 ( LuisBlanche , 2020 ) . The first dataset aims to help people for detecting brain tumors . It contains MRI scans of the brain , and each type of brain has 1500 images . We selected 900 images for modeling . The next dataset is collected from COVID19-related papers from medRxiv , bioRxiv , NEJM , JAMA , Lancet , etc . It contains 349 CT scans that are positive for COVID-19 , This dataset can be used to perform classification and automatically detect COVID-19 on CT scans . The distribution of the two types of data is shown in Table 2 . The examples of two datasets are shown in figure 5 . Before feeding the model , all the images are resized into 224 x 224 images , and each image is divided into 14 x 14 patches , where each patch size is 16 x 16 . There are two hyperparameters , Table 2 : Distribution of two types of data Train Train Test Test Abnormal Normal Abnormal normal Brain Tumor 360 360 90 90 COVID-19 280 318 69 79 Figure 5 : The examples of two datasets . MP and λ , which the range is set between 0 and 1 . The network structure contains five parameters , they are : the number of Mixer layers , the number of channels ( Hidden size C ) , the number of hidden layer neurons of token-mixing ( MLP dimension Ds ) , and the number of hidden layer neurons of channel-mixing ( MLP dimension Dc ) . The settings are shown in table 3 . In comparative study , Mixer and CNN model are evaluated . For fairness of comparison , the number of layers of the two models is required to be equal . We make the number of layers five . The four parameters of the Mixer network are set to 5 , 256 , 392 , 1024 , respectively . AUC ( Zhao et al. , 2011 ) is an ideal indicator to evaluate the reliability of the prediction results , and the larger the AUC shows that the better the classification of the model . Accuracy ( ACC ) represents the correct rate of diagnosis and is also an important indicator for evaluating the model . Therefore , sensitivity ( SEN ) , specificity ( SPE ) , AUC , ACC are used for evaluation . All the experiments are performed five times and the average results are shown . | The authors proposed a new method for learning imbalanced medical image datasets. They propose to use the recently propose MLP-Mixer instead of CNN to reduce the number of trainable parameters and thus can be trained with fewer images as compared to CNNs. To handle the class imbalance in the datasets, they use multi-objective loss functions to balance between sensitivity and specificity. Bayesian optimation is used for finding the optimal hyperparameters. The proposed method is evaluated on two medical image datasets, showing improvements over CNN and Mixer baselines. | SP:d1959df9bd53c144534b64e3e0c26d2617881f22 |
AutoMO-Mixer: An automated multi-objective multi-layer perspecton Mixer model for medical image based diagnosis | 1 INTRODUCTION . With the development of modern medicine , medical image has become an essential way to carry out personalized and accurate diagnosis . Due to the outstanding image analysis ability , deep learning has been widely used in medical image based diagnosis and has achieved great success ( Zhang & An , 2017 ) ( Shen et al. , 2017 ) in the past years . As there are so many parameters to train in current deep learning model such as convolutional neural network ( CNN ) ( Chua , 1998 ) , a large scale dataset is always required to feed the model . In particular , the parameters in convolutional layer accounted a majority of the parameters . However , it is very difficult to collect sufficient medical image samples for a particular clinical problem in practice . Recently , a new deep learning model termed MLP-Mixer ( Mixer ) ( Tolstikhin et al. , 2021 ) which was developed based on multi-layer perception ( MLP ) was proposed . Compared with CNN , the convolutional layer is removed from Mixer , leading to decreasing the architecture parameter scale sharply and Mixer can be trained sufficiently through small scale dataset . On the other hand , Mixer can achieve similar performance with CNN ( Tolstikhin et al. , 2021 ) . In summary , Mixer is a better architecture for building medical image based diagnostic model . Furthermore , building the balanced model between sensitivity and specificity is necessary ( Banerjee et al. , 2018 ) ( Mazurowski et al. , 2008 ) in clinical diagnosis . Sensitivity indicates the proportion of people who are actually sick that are diagnosed as sick , whilst specificity indicates the proportion of people who are truly healthy who are diagnosed as healthy ( Reitsma et al. , 2005 ) . As shown in Table 1 , although the accuracy is high , sensitivity and specificity imbalance , resulting in higher rate of missed diagnosis . Therefore , a more balanced model is necessary and a multi-objective model which considers sensitivity and specificity simultaneously is needed . As such , a new automated multi-objective Mixer ( AutoMO-Mixer ) model is developed in this study . In AutoMO-Mixer , both sensitivity and specificity are considered as the objective functions simultaneously and a Pareto-optimal model set can be obtained through the multi-objective optimization ( Zhou et al. , 2017 ) in training stage . In addition , since there are several hyperparameters which may affect the model performance in AutoMO-Mixer , Bayesian optimization ( Pelikan , 2005 ) is used to train the hyperparameters . In testing stage , the Pareto-optimal models with balanced sensitivity and specificity are chosen so as to improve model diversity and stability . To obtain more reliable result , evidential reasoning ( ER ) ( Yang & Xu , 2002 ) approach is used to fuse the output of selected Pareto-optimal models to obtain final outcome . The experimental studies on two public medical image datasets demonstrated that AutoMO-Mixer can outperform Mixer and CNN , and more balanced results can be achieved as well . 2 METHOD . 2.1 FRAMEWORK . The framework of AutoMO-Mixer is shown in figure 1 , which consists of training stage and testing stage . In training stage , medical images are fed into multiple Mixer models with randomly initialization . Then sensitivity and specificity are considered as the multi-objective functions simultaneously , and The Pareto-optimal Mixer model set can be obtained through multi-objective optimization . Meanwhile , since there are several hyperparameters which may affect the model performance , Bayesian optimization is used to optimize the hyperparameters . In testing stage , models with balanced sensitivity and specificity are fused using the ER approach to obtain more reliable final prediction model . 2.2 TRAINING STAGE . Assume α = { α1 , ... , αK } represents the hyperparameters , where K is the number of hyperparameter and β denotes the parameters in Mixer models . M = { m1 , ... , mq } represents the Mixer model , where q is the number of models . The MLP-Mixer network is a visual-oriented , all-MLP architecture as shown in figure 2 . It consists consisting of four parts ( Tolstikhin et al. , 2021 ) : splitting a picture into multiple patches shaped as a “ patches×channels ” table as an input ; converting all patches into feature embedding with a set of fully connected networks ; refining feature information through N mixer layers ; and classifying them with a full-connected layer after global average pooling . Mixer is divided into token-mixer ( feature refining along the columns direction of the table , i.e . spatial locations ) and channel-mixer ( feature refining along the rows direction of the table , i.e . channels ) , all using MLP for feature extraction , each MLP consists of two layers of full-connected and an activation function GELU . Since there are two groups ’ parameters to train , the training stage is a bilevel iterative optimization process . In other words , Mixers ’ model parameters and hyperparameters in AutoMO-Mixer are updated iteratively . The training stage is shown in figure 3 . In the beginning , all the parameters are initialized randomly . When the hyperparameters are determined , the Mixers ’ model parameters are trained first . To obtain the balanced model , sensitivity and specificity are considered as objective functions simultaneously , they are : fsen = TP TP + FN ( 1 ) fspe = TN TN + FP ( 2 ) where TP is true positive , TN is true negative , FP is false positive , FN is false negative . The goal is to maximize fsen , fspe simultaneously , that is : f = max β ( fsen , fspe ) ( 3 ) To optimize the above function , an iterative multi-objective immune algorithm ( IMIA ) ( Zhou et al. , 2017 ) ( Gong et al. , 2008 ) is used . IMIA consists of six steps : initialization , cloning , mutation , deletion , update , and termination . First , the initial solution set denoted by D ( t ) = { M1 , ... , MN } is generated , where Mi = { mi1 , ... , miq } , i = 1 , 2 , ... , N . Then the models with higher Mi = { mi1 , ... , miq } , i = 1 , 2 , ... , N will be replicated using the proportional cloning method . In the third step , a probability of mutation is randomly generated for each model , and the model performs mutation when its probability is larger than the mutation probability . After the mutation , the new models are generated . If the models have same sensitivity and specificity , only one model is remained and the all the other models are removed . Then the model size is kept through AUC based non-dominated sorting strategy . This training process will not stop until the maximum number of iterations is reached . Then the Pareto-optimal Mixer model set is generated , where the model set size is J . Now the optimal parameters for Mixer are obtained and hyperparameters are optimized . Since there are hyperparameters in Pareto-optimal model selection and fusion phase , the weight for each Pareto-optimal model should be estimated , which is denoted by wj . As the balanced model between sensitivity and specificity is desired , the ratio between them is considered , which is fsenfspe or fspe fsen . When the ratio is less than 0.5 or greater than 1 , the model is considered as extreme imbalance , setting wj as 0 . The expression of wj is as follows : wj = λ fjsen fjspe + ( 1− λ ) AUC , when 0.5 ≤ f j sen fjspe ≤ 1 λ fjspe fjsen + ( 1− λ ) AUC , when 0.5 ≤ f j spe fjsen ≤ 1 , j = 1 , 2 , ... , J , 0 Other situations ( 4 ) where λ indicates the importance of balance , and 1-λ indicates the importance of AUC . After calculating the wj for each model , the weights are normalized , that is : J∑ j=1 wj = 1 , 0 ≤ wj ≤ 1 ( 5 ) Then the Pareto-optimal models are fused through ER approach . Assume there are J models in Pareto-optimal model set , and the output probability ( normal and abnormal ) for each model is denoted by in Pj = { P 1j , P 2j } , j = 1 , 2 , ... , J , where P 1j is the output probability of abnormal , and P 2j is the output probability of normal . The final output probability P cfin , c = 1 , 2 is obtained through the ER fusion strategy ( Wang et al. , 2006 ) , that is : P cfin = ER ( P c j , wj ) , j = 1 , 2 , ... , J , c = 1 , 2 ( 6 ) where ER is : P cfin = µ× [ J∏ j=1 ( wjP c j + 1− wj ) − J∏ j=1 ( 1− wj ) ] 1− µ× [ J∏ j=1 ( 1− wj ) ] , c = 1 , 2 ( 7 ) The normalized factor µ is : µ = [ 2∑ c=1 J∏ j=1 ( wjP c j + 1− wj ) − J∏ j=1 ( 1− wj ) ] −1 ( 8 ) The hyperparameter α can be optimized through Bayesian optimization ( Pelikan , 2005 ) ( Springenberg et al. , 2016 ) , where the objective function is : fH = min α ( 1−AUC ) ( 9 ) Eqs . ( 3 ) and ( 9 ) are optimized iteratively until it reaches the termination critation . 2.3 TESTING STAGE . An illustration of testing stage is shown in figure 4 . The medical images are fed into the trained Pareto-optimal Mixer models and the output probabilities from each model can be obtained . Then ER approach is used to fuse the outputs of all the Mixer models and final output can be obtained . 3 EXPERIMENTS . 3.1 MATERIALS AND SETUP . The two public databases used in this paper are MRI images of brain tumors ( Panigrahi , 2021 ) and CT images of COVID-19 ( LuisBlanche , 2020 ) . The first dataset aims to help people for detecting brain tumors . It contains MRI scans of the brain , and each type of brain has 1500 images . We selected 900 images for modeling . The next dataset is collected from COVID19-related papers from medRxiv , bioRxiv , NEJM , JAMA , Lancet , etc . It contains 349 CT scans that are positive for COVID-19 , This dataset can be used to perform classification and automatically detect COVID-19 on CT scans . The distribution of the two types of data is shown in Table 2 . The examples of two datasets are shown in figure 5 . Before feeding the model , all the images are resized into 224 x 224 images , and each image is divided into 14 x 14 patches , where each patch size is 16 x 16 . There are two hyperparameters , Table 2 : Distribution of two types of data Train Train Test Test Abnormal Normal Abnormal normal Brain Tumor 360 360 90 90 COVID-19 280 318 69 79 Figure 5 : The examples of two datasets . MP and λ , which the range is set between 0 and 1 . The network structure contains five parameters , they are : the number of Mixer layers , the number of channels ( Hidden size C ) , the number of hidden layer neurons of token-mixing ( MLP dimension Ds ) , and the number of hidden layer neurons of channel-mixing ( MLP dimension Dc ) . The settings are shown in table 3 . In comparative study , Mixer and CNN model are evaluated . For fairness of comparison , the number of layers of the two models is required to be equal . We make the number of layers five . The four parameters of the Mixer network are set to 5 , 256 , 392 , 1024 , respectively . AUC ( Zhao et al. , 2011 ) is an ideal indicator to evaluate the reliability of the prediction results , and the larger the AUC shows that the better the classification of the model . Accuracy ( ACC ) represents the correct rate of diagnosis and is also an important indicator for evaluating the model . Therefore , sensitivity ( SEN ) , specificity ( SPE ) , AUC , ACC are used for evaluation . All the experiments are performed five times and the average results are shown . | This paper proposes an AutoMO-Mixer framework for medical image diagnosis, consisting of several features: Firstly, the use of the MLP-Mixer deep learning model architecture, which is stated to achieve reduced parameter scale via the elimination of convolutional layers, thus making the architecture more suited to the training of small-scale datasets. Secondly, the learning of a (Pareto-optimal) Mixer model set, by weighing the multiple objectives of achieving a balanced sensitivity/specificity, and overall performance as measured by AUC. Thirdly, the fusion of the outputs of these selected models in the Mixer model set, by an ER fusion strategy. The AutoMO-Mixer framework was compared against a single Mixer alone and a CNN with equivalent number of layers, on two publicly-available CT images datasets on brain tumor and COVID-19 detection respectively. While all three approaches performed similarly on the brain tumor classification dataset, AutoMO-Mixer was shown to perform appreciably better than the (single) Mixer and CNN approaches, on the COVID-19 dataset. | SP:d1959df9bd53c144534b64e3e0c26d2617881f22 |
Private Multi-Task Learning: Formulation and Applications to Federated Learning | 1 INTRODUCTION . Multi-task learning ( MTL ) aims to solve multiple learning tasks simultaneously while exploiting similarities/differences across tasks ( Caruana , 1997 ) . Multi-task learning is commonly used in applications that warrant strong privacy guarantees . For example , MTL has been used in healthcare , as a way to learn over diverse populations or between multiple institutions ( Baytas et al. , 2016 ; Suresh et al. , 2018 ; Harutyunyan et al. , 2019 ) ; in financial forecasting , to combine knowledge from multiple indicators or across organizations ( Ghosn & Bengio , 1997 ; Cheng et al. , 2020 ) ; and in IoT computing , as an approach for learning in federated networks of heterogeneous devices ( Smith et al. , 2017 ; Hanzely & Richtárik , 2020 ; Hanzely et al. , 2020 ; Ghosh et al. , 2020 ; Sattler et al. , 2020 ; Deng et al. , 2020 ; Mansour et al. , 2020 ) . While MTL can significantly improve accuracy when learning in these applications , there is a dearth of work studying the privacy implications of multi-task learning . In this work , we develop and theoretically analyze methods for MTL with formal privacy guarantees . Motivated by applications in federated learning , we aim to provide task-level privacy1 , where each task corresponds to a client/device/data silo , and the goal is to protect the sensitive information in each task ’ s data ( McMahan et al. , 2018 ) . We focus on incorporating differential privacy ( DP ) ( Dwork et al. , 2006 ) , which ( informally ) requires an algorithm ’ s output to be insensitive to the change of any single entity ’ s data . For MTL , using task-level DP directly would require the entire set of predictive models across all tasks to be insensitive to changes in the private data of any single task . This requirement is too stringent for most applications , as it implies that the predictive model for task k must have little dependence on the training data for task k , thus preventing the usefulness of the model ( see Figure 1 ) . To circumvent this limitation , we leverage a meaningful relaxation of DP known as joint differential privacy ( JDP ) ( Kearns et al. , 2014 ) , which requires that for each task k , the set of output predictive models for all other tasks except k is insensitive to k ’ s private data . As a consequence , the client ’ s private data in task k is protected even if all other clients/tasks collude and share their private data and output models ( as long as client k keeps their data private ) . In contrast to standard DP , JDP allows the predictive model for task k to depend on k ’ s private data , helping to preserve the task ’ s utility . Using JDP , we then develop new learning algorithms for MTL with rigorous privacy and utility guarantees . Specifically , we propose Private Mean-Regularized MTL , a simple framework for learning 1In federated learning applications , where each MTL task typically corresponds to a client ’ s local training task , this can be equivalently viewed as ‘ client-level ’ or ‘ user-level ’ privacy ( McMahan et al. , 2018 ) . multiple tasks while ensuring task-level privacy . We show that our method achieves ( , δ ) -JDP . Our scalable solver builds on FedAvg ( McMahan et al. , 2017 ) , a common method for communicationefficient federated optimization . We analyze the convergence of our solver on both nonconvex and convex objectives , demonstrating a tradeoff between privacy and utility , and evaluate this trade-off empirically on multiple federated learning benchmarks . We summarize our contributions below : • Our work is the first we are aware of to provide formal definitions of task-level differential privacy for multi-task learning objectives ( Section 3 ) . Our definitions rely on joint differential privacy and are applicable to commonly-used multi-task relationship learning objectives . • Using our privacy definitions , we propose Private Mean-Regularized MTL , a simple MTL framework that provides task-level privacy ( Section 4 ) . We prove that our method achieves ( , δ ) -JDP , and we analyze the convergence of our communication-efficient solver on convex and nonconvex objectives . Our convergence analysis extends to non-private settings with partial participation , which may be of independent interest for problems in cross-device federated learning . • Finally , we explore the performance of our approach on common federated learning benchmarks ( Section 5 ) . Our results show that it is possible to retain the accuracy benefits of MTL in these settings relative to global baselines while still providing meaningful privacy guarantees . Further , even in cases where the MTL objective achieves similar accuracy to the global objective , we find that privacy/utility benefits exist when employing the private MTL formulation . 2 BACKGROUND AND RELATED WORK . Multi-task learning . Multi-task learning considers jointly solving multiple related ML tasks . Our work focuses on the general and widely-used formulation of multi-task relationship learning ( Zhang & Yeung , 2010 ) , as discussed in Section 3 . This form of MTL is particularly useful in privacy-sensitive applications where datasets are shared among multiple heterogeneous entities ( Baytas et al. , 2016 ; Smith et al. , 2017 ; Ghosn & Bengio , 1997 ) . In these cases , it is natural to view each data source ( e.g. , financial institution , hospital , mobile phone ) as a separate ‘ task ’ that is learned in unison with the other tasks . This allows data to be shared , but the models to be personalized to each data silo . For example , in the setting of cross-device federated learning , MTL is commonly used to train a personalized model for each device in a distributed network ( Smith et al. , 2017 ; Liu et al. , 2017 ) . Federated learning . A motivation for our work is the application of federated learning ( FL ) , in which the goal is to collaboratively learn from data that has been generated by , and resides on , a number of private data silos , such as remote devices or servers ( McMahan et al. , 2017 ; Kairouz et al. , 2019 ; Li et al. , 2020a ) . To ensure client-level differential privacy in FL , a common technique is to learn one global model across the distributed data and then add noise to the aggregated model to sufficiently mask any specific client ’ s update ( Kairouz et al. , 2019 ; McMahan et al. , 2018 ; Geyer et al. , 2017 ) . However , a defining characteristic of federated learning is that the distributed data are likely to be heterogeneous , i.e. , each client may generate data via a distinct data distribution ( Kairouz et al. , 2019 ; Li et al. , 2020a ) . To model the ( possibly ) varying data distributions on each client , it is natural to instead consider learning a separate model for each client ’ s local dataset . To this end , a number of recent works have explored multi-task learning as a way to improve the accuracy of learning in federated networks ( Smith et al. , 2017 ; Hanzely & Richtárik , 2020 ; Hanzely et al. , 2020 ; Ghosh et al. , 2020 ; Sattler et al. , 2020 ; Deng et al. , 2020 ; Mansour et al. , 2020 ) . Despite the prevalence of multi-task federated learning , we are unaware of any work that has explored task-level privacy for commonly-used multi-task relationship models ( Section 3 ) in federated settings . Differentially private MTL . Prior work in private MTL differs from our own either in terms of the privacy formulation or MTL objective . For example , Wu et al . ( 2020 ) explore a specific MTL setting where a feature representation shared by all tasks is first learned , followed by task-specific models on top of this private representation . We instead study multi-task relationship learning ( Section 3 ) , which is a general and widely-used MTL framework , particularly in federated learning ( Smith et al. , 2017 ) . While our work focuses on task-level privacy , there has been work on data-level privacy for MTL , which aims to protect any single piece of local data rather than protecting the entire local dataset . For example , Xie et al . ( 2017 ) propose a method for data-level privacy by representing the model for each task as a sum of a public , shared weight and a task-specific weight that is only updated locally , and Gupta et al . ( 2016 ) study data-level privacy for a mean estimation MTL problem . Finally , Li et al . ( 2019 ) studies multiple notions of differential privacy for meta-learning . Although similarly motivated by personalization , their framework does not cover the multi-task setting , where there exists a separate model for each task . 3 MULTI-TASK LEARNING AND PRIVACY FORMULATION . In this section , we first formalize our multi-task learning objective , which is a form of meanregularized multi-task learning ( Section 3.1 ) , and then provide our privacy formulation ( Section 3.2 ) . 3.1 PROBLEM SETUP . In the classical setting of multi-task relationship learning ( Zhang & Yang , 2017 ; Zhang & Yeung , 2010 ) , there are m different task learners with their own task-specific data . The aim is to solve : min W , Ω { F ( W , Ω ) = { 1 m m∑ k=1 nk∑ i=1 lk ( xi , wk ) +R ( W , Ω ) } } , ( 1 ) where wk is model for task learner k ; { x1 , . . . , xnk } is the local data for the kth task ; lk ( · ) is the empirical loss for task k ; W = [ w1 ; · · · ; wm ] ; and Ω ∈ Rm×m characterizes the relationship between every pair of task learners . A common choice for setting the regularization termR ( W , Ω ) in previous works ( Zhang & Yeung , 2010 ; Smith et al. , 2017 ) is : R ( W , Ω ) = λ1tr ( WΩWT ) , where Ω can be viewed as a covariance matrix , used to learn/encode positive , negative , or unrelated task relationships ( Zhang & Yeung , 2010 ) . In this paper , we focus on studying the mean-regularized multi-task learning objective ( Evgeniou & Pontil , 2004 ) : a special case of ( 1 ) where Ω = ( Im×m − 1 m1m1 T m ) 2 is fixed . Here Im×m is the identity matrix of size m×m and 1m ∈ Rm is the vector with all entries equal to 1 . By picking λ1 = λ2 , we can rewrite the objective as : min W { F ( W ) = { 1 m m∑ k=1 λ 2 ‖wk − w̄‖2 + nk∑ i=1 lk ( xi , wk ) } } , ( 2 ) where w̄ is the average of task-specific models : w̄ = 1m ∑m i=1 wk . Note that w̄ is shared across all tasks , and each wk is kept locally for task learner k. During optimization , each task learner k solves : min wk { fk ( wk ; w̄ ) = λ 2 ‖wk − w̄‖2 + nk∑ i=1 lk ( xi , wk ) } . ( 3 ) Despite the prevalence of this simple form of multi-task learning and its recent use in applications such as federated learning with strong privacy motivations ( e.g. , Hanzely & Richtárik , 2020 ; Hanzely et al. , 2020 ; Dinh et al. , 2020 ) , we are unaware of prior work that has formalized task-level differential privacy in the context of solving Objective ( 2 ) . | In this paper, the authors formalize a notion of task-level differential privacy using joint differential privacy, a concept known in the differentially private mechanism design literature. They formulate the problem of multitask learning under differential privacy under this relaxed definition. The motivation is that there is no need for privacy of the data of a particular task from the task itself, but since you are sharing information in multitask learning, you want to protect against other tasks learning about your private information. They provide an algorithm with convergence guarantees to do multitask learning in this framework and perform some experiments to test this algorithm in the application of federated learning | SP:4ebb806b7305e6efec952bfae442949d1fbbced8 |
Private Multi-Task Learning: Formulation and Applications to Federated Learning | 1 INTRODUCTION . Multi-task learning ( MTL ) aims to solve multiple learning tasks simultaneously while exploiting similarities/differences across tasks ( Caruana , 1997 ) . Multi-task learning is commonly used in applications that warrant strong privacy guarantees . For example , MTL has been used in healthcare , as a way to learn over diverse populations or between multiple institutions ( Baytas et al. , 2016 ; Suresh et al. , 2018 ; Harutyunyan et al. , 2019 ) ; in financial forecasting , to combine knowledge from multiple indicators or across organizations ( Ghosn & Bengio , 1997 ; Cheng et al. , 2020 ) ; and in IoT computing , as an approach for learning in federated networks of heterogeneous devices ( Smith et al. , 2017 ; Hanzely & Richtárik , 2020 ; Hanzely et al. , 2020 ; Ghosh et al. , 2020 ; Sattler et al. , 2020 ; Deng et al. , 2020 ; Mansour et al. , 2020 ) . While MTL can significantly improve accuracy when learning in these applications , there is a dearth of work studying the privacy implications of multi-task learning . In this work , we develop and theoretically analyze methods for MTL with formal privacy guarantees . Motivated by applications in federated learning , we aim to provide task-level privacy1 , where each task corresponds to a client/device/data silo , and the goal is to protect the sensitive information in each task ’ s data ( McMahan et al. , 2018 ) . We focus on incorporating differential privacy ( DP ) ( Dwork et al. , 2006 ) , which ( informally ) requires an algorithm ’ s output to be insensitive to the change of any single entity ’ s data . For MTL , using task-level DP directly would require the entire set of predictive models across all tasks to be insensitive to changes in the private data of any single task . This requirement is too stringent for most applications , as it implies that the predictive model for task k must have little dependence on the training data for task k , thus preventing the usefulness of the model ( see Figure 1 ) . To circumvent this limitation , we leverage a meaningful relaxation of DP known as joint differential privacy ( JDP ) ( Kearns et al. , 2014 ) , which requires that for each task k , the set of output predictive models for all other tasks except k is insensitive to k ’ s private data . As a consequence , the client ’ s private data in task k is protected even if all other clients/tasks collude and share their private data and output models ( as long as client k keeps their data private ) . In contrast to standard DP , JDP allows the predictive model for task k to depend on k ’ s private data , helping to preserve the task ’ s utility . Using JDP , we then develop new learning algorithms for MTL with rigorous privacy and utility guarantees . Specifically , we propose Private Mean-Regularized MTL , a simple framework for learning 1In federated learning applications , where each MTL task typically corresponds to a client ’ s local training task , this can be equivalently viewed as ‘ client-level ’ or ‘ user-level ’ privacy ( McMahan et al. , 2018 ) . multiple tasks while ensuring task-level privacy . We show that our method achieves ( , δ ) -JDP . Our scalable solver builds on FedAvg ( McMahan et al. , 2017 ) , a common method for communicationefficient federated optimization . We analyze the convergence of our solver on both nonconvex and convex objectives , demonstrating a tradeoff between privacy and utility , and evaluate this trade-off empirically on multiple federated learning benchmarks . We summarize our contributions below : • Our work is the first we are aware of to provide formal definitions of task-level differential privacy for multi-task learning objectives ( Section 3 ) . Our definitions rely on joint differential privacy and are applicable to commonly-used multi-task relationship learning objectives . • Using our privacy definitions , we propose Private Mean-Regularized MTL , a simple MTL framework that provides task-level privacy ( Section 4 ) . We prove that our method achieves ( , δ ) -JDP , and we analyze the convergence of our communication-efficient solver on convex and nonconvex objectives . Our convergence analysis extends to non-private settings with partial participation , which may be of independent interest for problems in cross-device federated learning . • Finally , we explore the performance of our approach on common federated learning benchmarks ( Section 5 ) . Our results show that it is possible to retain the accuracy benefits of MTL in these settings relative to global baselines while still providing meaningful privacy guarantees . Further , even in cases where the MTL objective achieves similar accuracy to the global objective , we find that privacy/utility benefits exist when employing the private MTL formulation . 2 BACKGROUND AND RELATED WORK . Multi-task learning . Multi-task learning considers jointly solving multiple related ML tasks . Our work focuses on the general and widely-used formulation of multi-task relationship learning ( Zhang & Yeung , 2010 ) , as discussed in Section 3 . This form of MTL is particularly useful in privacy-sensitive applications where datasets are shared among multiple heterogeneous entities ( Baytas et al. , 2016 ; Smith et al. , 2017 ; Ghosn & Bengio , 1997 ) . In these cases , it is natural to view each data source ( e.g. , financial institution , hospital , mobile phone ) as a separate ‘ task ’ that is learned in unison with the other tasks . This allows data to be shared , but the models to be personalized to each data silo . For example , in the setting of cross-device federated learning , MTL is commonly used to train a personalized model for each device in a distributed network ( Smith et al. , 2017 ; Liu et al. , 2017 ) . Federated learning . A motivation for our work is the application of federated learning ( FL ) , in which the goal is to collaboratively learn from data that has been generated by , and resides on , a number of private data silos , such as remote devices or servers ( McMahan et al. , 2017 ; Kairouz et al. , 2019 ; Li et al. , 2020a ) . To ensure client-level differential privacy in FL , a common technique is to learn one global model across the distributed data and then add noise to the aggregated model to sufficiently mask any specific client ’ s update ( Kairouz et al. , 2019 ; McMahan et al. , 2018 ; Geyer et al. , 2017 ) . However , a defining characteristic of federated learning is that the distributed data are likely to be heterogeneous , i.e. , each client may generate data via a distinct data distribution ( Kairouz et al. , 2019 ; Li et al. , 2020a ) . To model the ( possibly ) varying data distributions on each client , it is natural to instead consider learning a separate model for each client ’ s local dataset . To this end , a number of recent works have explored multi-task learning as a way to improve the accuracy of learning in federated networks ( Smith et al. , 2017 ; Hanzely & Richtárik , 2020 ; Hanzely et al. , 2020 ; Ghosh et al. , 2020 ; Sattler et al. , 2020 ; Deng et al. , 2020 ; Mansour et al. , 2020 ) . Despite the prevalence of multi-task federated learning , we are unaware of any work that has explored task-level privacy for commonly-used multi-task relationship models ( Section 3 ) in federated settings . Differentially private MTL . Prior work in private MTL differs from our own either in terms of the privacy formulation or MTL objective . For example , Wu et al . ( 2020 ) explore a specific MTL setting where a feature representation shared by all tasks is first learned , followed by task-specific models on top of this private representation . We instead study multi-task relationship learning ( Section 3 ) , which is a general and widely-used MTL framework , particularly in federated learning ( Smith et al. , 2017 ) . While our work focuses on task-level privacy , there has been work on data-level privacy for MTL , which aims to protect any single piece of local data rather than protecting the entire local dataset . For example , Xie et al . ( 2017 ) propose a method for data-level privacy by representing the model for each task as a sum of a public , shared weight and a task-specific weight that is only updated locally , and Gupta et al . ( 2016 ) study data-level privacy for a mean estimation MTL problem . Finally , Li et al . ( 2019 ) studies multiple notions of differential privacy for meta-learning . Although similarly motivated by personalization , their framework does not cover the multi-task setting , where there exists a separate model for each task . 3 MULTI-TASK LEARNING AND PRIVACY FORMULATION . In this section , we first formalize our multi-task learning objective , which is a form of meanregularized multi-task learning ( Section 3.1 ) , and then provide our privacy formulation ( Section 3.2 ) . 3.1 PROBLEM SETUP . In the classical setting of multi-task relationship learning ( Zhang & Yang , 2017 ; Zhang & Yeung , 2010 ) , there are m different task learners with their own task-specific data . The aim is to solve : min W , Ω { F ( W , Ω ) = { 1 m m∑ k=1 nk∑ i=1 lk ( xi , wk ) +R ( W , Ω ) } } , ( 1 ) where wk is model for task learner k ; { x1 , . . . , xnk } is the local data for the kth task ; lk ( · ) is the empirical loss for task k ; W = [ w1 ; · · · ; wm ] ; and Ω ∈ Rm×m characterizes the relationship between every pair of task learners . A common choice for setting the regularization termR ( W , Ω ) in previous works ( Zhang & Yeung , 2010 ; Smith et al. , 2017 ) is : R ( W , Ω ) = λ1tr ( WΩWT ) , where Ω can be viewed as a covariance matrix , used to learn/encode positive , negative , or unrelated task relationships ( Zhang & Yeung , 2010 ) . In this paper , we focus on studying the mean-regularized multi-task learning objective ( Evgeniou & Pontil , 2004 ) : a special case of ( 1 ) where Ω = ( Im×m − 1 m1m1 T m ) 2 is fixed . Here Im×m is the identity matrix of size m×m and 1m ∈ Rm is the vector with all entries equal to 1 . By picking λ1 = λ2 , we can rewrite the objective as : min W { F ( W ) = { 1 m m∑ k=1 λ 2 ‖wk − w̄‖2 + nk∑ i=1 lk ( xi , wk ) } } , ( 2 ) where w̄ is the average of task-specific models : w̄ = 1m ∑m i=1 wk . Note that w̄ is shared across all tasks , and each wk is kept locally for task learner k. During optimization , each task learner k solves : min wk { fk ( wk ; w̄ ) = λ 2 ‖wk − w̄‖2 + nk∑ i=1 lk ( xi , wk ) } . ( 3 ) Despite the prevalence of this simple form of multi-task learning and its recent use in applications such as federated learning with strong privacy motivations ( e.g. , Hanzely & Richtárik , 2020 ; Hanzely et al. , 2020 ; Dinh et al. , 2020 ) , we are unaware of prior work that has formalized task-level differential privacy in the context of solving Objective ( 2 ) . | Many problems in machine learning rely on multi-task learning (MTL), in which the goal is to solve multiple related machine learning tasks simultaneously. In this work, authors formalize notions of task-level privacy for MTL via joint differential privacy (JDP). They propose an algorithm for mean-regularized MTL, an objective commonly used for applications in personalized federated learning, subject to JDP. Then analyze objective and solver, providing certifiable guarantees on both privacy and utility. The method allows for improved privacy/utility trade-offs relative to global baselines across common federated learning benchmarks. | SP:4ebb806b7305e6efec952bfae442949d1fbbced8 |
Private Multi-Task Learning: Formulation and Applications to Federated Learning | 1 INTRODUCTION . Multi-task learning ( MTL ) aims to solve multiple learning tasks simultaneously while exploiting similarities/differences across tasks ( Caruana , 1997 ) . Multi-task learning is commonly used in applications that warrant strong privacy guarantees . For example , MTL has been used in healthcare , as a way to learn over diverse populations or between multiple institutions ( Baytas et al. , 2016 ; Suresh et al. , 2018 ; Harutyunyan et al. , 2019 ) ; in financial forecasting , to combine knowledge from multiple indicators or across organizations ( Ghosn & Bengio , 1997 ; Cheng et al. , 2020 ) ; and in IoT computing , as an approach for learning in federated networks of heterogeneous devices ( Smith et al. , 2017 ; Hanzely & Richtárik , 2020 ; Hanzely et al. , 2020 ; Ghosh et al. , 2020 ; Sattler et al. , 2020 ; Deng et al. , 2020 ; Mansour et al. , 2020 ) . While MTL can significantly improve accuracy when learning in these applications , there is a dearth of work studying the privacy implications of multi-task learning . In this work , we develop and theoretically analyze methods for MTL with formal privacy guarantees . Motivated by applications in federated learning , we aim to provide task-level privacy1 , where each task corresponds to a client/device/data silo , and the goal is to protect the sensitive information in each task ’ s data ( McMahan et al. , 2018 ) . We focus on incorporating differential privacy ( DP ) ( Dwork et al. , 2006 ) , which ( informally ) requires an algorithm ’ s output to be insensitive to the change of any single entity ’ s data . For MTL , using task-level DP directly would require the entire set of predictive models across all tasks to be insensitive to changes in the private data of any single task . This requirement is too stringent for most applications , as it implies that the predictive model for task k must have little dependence on the training data for task k , thus preventing the usefulness of the model ( see Figure 1 ) . To circumvent this limitation , we leverage a meaningful relaxation of DP known as joint differential privacy ( JDP ) ( Kearns et al. , 2014 ) , which requires that for each task k , the set of output predictive models for all other tasks except k is insensitive to k ’ s private data . As a consequence , the client ’ s private data in task k is protected even if all other clients/tasks collude and share their private data and output models ( as long as client k keeps their data private ) . In contrast to standard DP , JDP allows the predictive model for task k to depend on k ’ s private data , helping to preserve the task ’ s utility . Using JDP , we then develop new learning algorithms for MTL with rigorous privacy and utility guarantees . Specifically , we propose Private Mean-Regularized MTL , a simple framework for learning 1In federated learning applications , where each MTL task typically corresponds to a client ’ s local training task , this can be equivalently viewed as ‘ client-level ’ or ‘ user-level ’ privacy ( McMahan et al. , 2018 ) . multiple tasks while ensuring task-level privacy . We show that our method achieves ( , δ ) -JDP . Our scalable solver builds on FedAvg ( McMahan et al. , 2017 ) , a common method for communicationefficient federated optimization . We analyze the convergence of our solver on both nonconvex and convex objectives , demonstrating a tradeoff between privacy and utility , and evaluate this trade-off empirically on multiple federated learning benchmarks . We summarize our contributions below : • Our work is the first we are aware of to provide formal definitions of task-level differential privacy for multi-task learning objectives ( Section 3 ) . Our definitions rely on joint differential privacy and are applicable to commonly-used multi-task relationship learning objectives . • Using our privacy definitions , we propose Private Mean-Regularized MTL , a simple MTL framework that provides task-level privacy ( Section 4 ) . We prove that our method achieves ( , δ ) -JDP , and we analyze the convergence of our communication-efficient solver on convex and nonconvex objectives . Our convergence analysis extends to non-private settings with partial participation , which may be of independent interest for problems in cross-device federated learning . • Finally , we explore the performance of our approach on common federated learning benchmarks ( Section 5 ) . Our results show that it is possible to retain the accuracy benefits of MTL in these settings relative to global baselines while still providing meaningful privacy guarantees . Further , even in cases where the MTL objective achieves similar accuracy to the global objective , we find that privacy/utility benefits exist when employing the private MTL formulation . 2 BACKGROUND AND RELATED WORK . Multi-task learning . Multi-task learning considers jointly solving multiple related ML tasks . Our work focuses on the general and widely-used formulation of multi-task relationship learning ( Zhang & Yeung , 2010 ) , as discussed in Section 3 . This form of MTL is particularly useful in privacy-sensitive applications where datasets are shared among multiple heterogeneous entities ( Baytas et al. , 2016 ; Smith et al. , 2017 ; Ghosn & Bengio , 1997 ) . In these cases , it is natural to view each data source ( e.g. , financial institution , hospital , mobile phone ) as a separate ‘ task ’ that is learned in unison with the other tasks . This allows data to be shared , but the models to be personalized to each data silo . For example , in the setting of cross-device federated learning , MTL is commonly used to train a personalized model for each device in a distributed network ( Smith et al. , 2017 ; Liu et al. , 2017 ) . Federated learning . A motivation for our work is the application of federated learning ( FL ) , in which the goal is to collaboratively learn from data that has been generated by , and resides on , a number of private data silos , such as remote devices or servers ( McMahan et al. , 2017 ; Kairouz et al. , 2019 ; Li et al. , 2020a ) . To ensure client-level differential privacy in FL , a common technique is to learn one global model across the distributed data and then add noise to the aggregated model to sufficiently mask any specific client ’ s update ( Kairouz et al. , 2019 ; McMahan et al. , 2018 ; Geyer et al. , 2017 ) . However , a defining characteristic of federated learning is that the distributed data are likely to be heterogeneous , i.e. , each client may generate data via a distinct data distribution ( Kairouz et al. , 2019 ; Li et al. , 2020a ) . To model the ( possibly ) varying data distributions on each client , it is natural to instead consider learning a separate model for each client ’ s local dataset . To this end , a number of recent works have explored multi-task learning as a way to improve the accuracy of learning in federated networks ( Smith et al. , 2017 ; Hanzely & Richtárik , 2020 ; Hanzely et al. , 2020 ; Ghosh et al. , 2020 ; Sattler et al. , 2020 ; Deng et al. , 2020 ; Mansour et al. , 2020 ) . Despite the prevalence of multi-task federated learning , we are unaware of any work that has explored task-level privacy for commonly-used multi-task relationship models ( Section 3 ) in federated settings . Differentially private MTL . Prior work in private MTL differs from our own either in terms of the privacy formulation or MTL objective . For example , Wu et al . ( 2020 ) explore a specific MTL setting where a feature representation shared by all tasks is first learned , followed by task-specific models on top of this private representation . We instead study multi-task relationship learning ( Section 3 ) , which is a general and widely-used MTL framework , particularly in federated learning ( Smith et al. , 2017 ) . While our work focuses on task-level privacy , there has been work on data-level privacy for MTL , which aims to protect any single piece of local data rather than protecting the entire local dataset . For example , Xie et al . ( 2017 ) propose a method for data-level privacy by representing the model for each task as a sum of a public , shared weight and a task-specific weight that is only updated locally , and Gupta et al . ( 2016 ) study data-level privacy for a mean estimation MTL problem . Finally , Li et al . ( 2019 ) studies multiple notions of differential privacy for meta-learning . Although similarly motivated by personalization , their framework does not cover the multi-task setting , where there exists a separate model for each task . 3 MULTI-TASK LEARNING AND PRIVACY FORMULATION . In this section , we first formalize our multi-task learning objective , which is a form of meanregularized multi-task learning ( Section 3.1 ) , and then provide our privacy formulation ( Section 3.2 ) . 3.1 PROBLEM SETUP . In the classical setting of multi-task relationship learning ( Zhang & Yang , 2017 ; Zhang & Yeung , 2010 ) , there are m different task learners with their own task-specific data . The aim is to solve : min W , Ω { F ( W , Ω ) = { 1 m m∑ k=1 nk∑ i=1 lk ( xi , wk ) +R ( W , Ω ) } } , ( 1 ) where wk is model for task learner k ; { x1 , . . . , xnk } is the local data for the kth task ; lk ( · ) is the empirical loss for task k ; W = [ w1 ; · · · ; wm ] ; and Ω ∈ Rm×m characterizes the relationship between every pair of task learners . A common choice for setting the regularization termR ( W , Ω ) in previous works ( Zhang & Yeung , 2010 ; Smith et al. , 2017 ) is : R ( W , Ω ) = λ1tr ( WΩWT ) , where Ω can be viewed as a covariance matrix , used to learn/encode positive , negative , or unrelated task relationships ( Zhang & Yeung , 2010 ) . In this paper , we focus on studying the mean-regularized multi-task learning objective ( Evgeniou & Pontil , 2004 ) : a special case of ( 1 ) where Ω = ( Im×m − 1 m1m1 T m ) 2 is fixed . Here Im×m is the identity matrix of size m×m and 1m ∈ Rm is the vector with all entries equal to 1 . By picking λ1 = λ2 , we can rewrite the objective as : min W { F ( W ) = { 1 m m∑ k=1 λ 2 ‖wk − w̄‖2 + nk∑ i=1 lk ( xi , wk ) } } , ( 2 ) where w̄ is the average of task-specific models : w̄ = 1m ∑m i=1 wk . Note that w̄ is shared across all tasks , and each wk is kept locally for task learner k. During optimization , each task learner k solves : min wk { fk ( wk ; w̄ ) = λ 2 ‖wk − w̄‖2 + nk∑ i=1 lk ( xi , wk ) } . ( 3 ) Despite the prevalence of this simple form of multi-task learning and its recent use in applications such as federated learning with strong privacy motivations ( e.g. , Hanzely & Richtárik , 2020 ; Hanzely et al. , 2020 ; Dinh et al. , 2020 ) , we are unaware of prior work that has formalized task-level differential privacy in the context of solving Objective ( 2 ) . | The paper considers the problem of multi-task learning (MTL) with task-level differential privacy (TLDP) constraints. The authors propose using joint differential privacy (JDP) for MTL and provide a JDP MTL algorithm, which is a DP variation of FedAvg. They prove the privacy of their algorithm and provide convergence results for smooth nonconvex and strongly convex losses. They then provide numerical experiments. | SP:4ebb806b7305e6efec952bfae442949d1fbbced8 |
Deep Representations for Time-varying Brain Datasets | 1 INTRODUCTION . Neuroimaging techniques such as fMRI ( functional magnetic resonance imaging ) and DWI ( diffusion-weighted imaging ) provide a window into complex brain processes . Yet , modeling and understanding these signals has always been a challenge . Network neuroscience ( Bassett & Sporns , 2017 ) views the brain as a multiscale networked system and models these signals in their graph representations : nodes represent brain ROIs ( regions of interest ) , and edges represent either structural or functional connections between pairs of regions . With larger imaging datasets and developments in Graph Neural Networks ( Scarselli et al. , 2009 ) , recent works leverage variants of the graph deep learning , modeling brain signals with data-driven models and getting rid of Gaussian assumptions typically existed in linear models ( Zhang et al. , 2019 ; Li et al. , 2019 ) . These methods are making progress on identifying physiological characteristics and brain disorders : In Kim & Ye ( 2020 ) , authors combine grad-CAM ( Selvaraju et al. , 2017 ) and GIN ( Xu et al. , 2018 ) to highlight brain regions that are responsible for gender classification with resting-state fMRI data . Li et al . ( 2020 ) utilizes the regularized pooling with GNN to identify fMRI biomarkers . Noman et al . ( 2021 ) embeds both topological structures and node signals of fMRI networks into low-dimensional latent representations for a better identification of depression . However , the first two works use time-averaged fMRI , losing rich dynamics in the temporal domain . The third combines nodes ’ temporal and feature dimensions instead of handling them separately , leading to a suboptimal representation ( as discussed in section 3.2 ) . To overcome these issues , we propose ReBraiD ( Deep Representations for Time-varying Brain Datasets ) , a graph neural network model that jointly models dynamic functional signals and structural connectivities , leading to a more comprehensive deep representation of brain dynamics . To simultaneously encode signals along spatial and temporal dimensions , some notable works in traffic prediction and activity recognition domains such as Graph WaveNet ( Wu et al. , 2019b ) alternate TCN ( temporal convolution network ) ( Lea et al. , 2016 ) and GCN ( graph convolutional network ) ( Kipf & Welling , 2017 ) . Others ( Song et al. , 2020 ; Liu et al. , 2020 ) use localized spatial-temporal graph to embed both domains ’ information in this extended graph . There are also works incorporating gated recurrent networks for the temporal domain such as ( Seo et al. , 2018 ; Ruiz et al. , 2020 ) . We choose the first option for ReBraiD , as it is more memory and time efficient , and can support much longer inputs . We also explore the best option when alternating spatial and temporal layers for encoding brain activities with extensive ablation studies . Upon this structure , we propose novel sample-level adaptive adjacency matrix learning and multi-resolution inner cluster smoothing , both of which learn and refine latent dynamic structures . We also make the model more efficient while being effective with the choice of the temporal layer . Equally important as finding a good representation of brain dynamics is interpreting them . We utilize integrated gradients ( Sundararajan et al. , 2017 ) to identify how brain ROIs participate in various processes . This can lead to better behavioral understanding , biomarker discoveries , and characterization of individuals or groups with their brain imagings . We also make the novel contribution of identifying temporally important frames with graph attribution techniques ; this can enable more fine-grained temporal analysis around keyframes when combined with other imaging modalities such as EEG ( electroencephalogram ) . In addition , our subject-level and group-level attribution studies unveil heterogeneities among ROIs , tasks , and individuals . 2 METHOD . 2.1 PRELIMINARIES . We utilize two brain imaging modalities mapped onto a same coordinate : SC ( structural connectivity ) from DWI scans , and time-varying fMRI scans . We represent them as a set of L graphs Gi = ( Ai , Xi ) with i ∈ [ 1 , L ] , in which Ai ∈ RN×N represents normalized adjacency matrix with an added self-loop : Ai = D̃ − 1 2 SCi ˜SCiD̃ − 1 2 SCi , ˜SCi = SCi + IN and D̃SCi = ∑ w ( ˜SCi ) vw is the diagonal node degree matrix . Graph signal matrix obtained from fMRI scans of the ith sample is represented as Xi ∈ RN×T . Here N is the number of nodes , and each node represents a brain region ; T is the input signal length on each node . Our objective focuses on classifying brain signals Gi into one of C task classes through learning latent graph structures . 2.2 MODEL . ReBraiD takes ( A , X ) as inputs , and outputs task class predictions . The overall model structure is shown in fig . 1 . For the ith sample Xi ∈ RN×1×T , the initial 1 × 1 convolution layer increases 1Axis order follows PyTorch conventions . Dimension at the second index is the expanded feature dimension . its hidden feature dimension to dh1 , outputting ( N , dh1 , T ) . The encoder then encodes temporal and spatial information alternately , reducing information to feature axis and generating a hidden representation of size ( N , dh2 , 1 ) . The encoder is followed by two linear layers to perform node embedding pooling and two MLP layers for classification . Cross entropy is used as the loss function : L ( i ) CE = − ∑ C yi log ŷi , where yi ∈ RC is the one-hot vector of ground truth task label and ŷi ∈ RC is model ’ s predicted distribution . We now explain different components of the model . ( I ) Learning sample-level latent graph structures . Structural scans serve as our graph adjacency matrices . However , they are static not only across temporal frames but also across different tasks . In contrast , functional connectivities ( FC ) are highly dynamic , as shown in appendix A.1.1 . To better capture dynamic graph structures , we assign an adaptive adjacency matrix to each input graph signal . Unlike other works such as Wu et al . ( 2019b ) that use a universal latent graph structure , our model do not assume all samples share the same latent graph . Instead , in ReBraiD , each sample has a unique latent structure reflecting its signal status . This implies that the latent adjacency matrix can not be treated as a learnable parameter as a part of the model . To solve this , we minimize the assumption down to a shared projection Θadp that projects each input sequence into an embedding space and use this embedding to generate the latent graph structure . Θadp can be learned in an endto-end manner . The generated adaptive adjacency matrix for the ith sample can be written as , where Softmax is applied column-wise : Ai adp = Softmax ( ReLU ( ( XiΘadp ) ( XiΘadp ) > ) ) , Θadp ∈ RT×hadp ( 1 ) ( II ) Gated TCN ( Temporal Convolutional Network ) . To encode temporal information , we use the gating mechanism as in Oord et al . ( 2016 ) in our temporal layers : H ( l+1 ) = tanh ( TCNemb ( H ( l ) ) ) σ ( TCNgate ( H ( l ) ) ) , where H ( l ) ∈ RN×d×t is one sample ’ s activation matrix of the lth layer , denotes the Hadamard product , and σ is the Sigmoid function . Different from TCNs generally used in sequence to sequence models that consist of dilated Conv1d and causal padding along the temporal dimension ( van den Oord et al . ( 2016 ) ) , we simply apply Conv1d with kernel 2 and stride 2 as our TCNemb and TCNgate to embed temporal information . The reason is twofold : first , for a sequence to sequence model with a length-T output , yτ should only depend on xt≤τ to avoid information leakage , and causal convolution can ensure this . In contrast , our model ’ s task is classification , and the goal of our encoder along the temporal dimension is to embed signal information into the feature axis while reducing temporal dimension to 1 . The receptive field of this single temporal point ( with multiple feature channels ) is meant to be the entire input sequence . Essentially , our TCN is the same as the last output node of a kernel 2 causal TCN whose dilation increases by 2 at each layer ( fig . 2 ) . Second , from a practical perspective , directly using strided non-causal TCN works the same as using dilated causal TCNs and taking the last node , while simplifies the model structure and reduces training time to less than a quarter . ( III ) Graph Network layer . In our model , every l temporal layers ( appendix A.2.3 studies the best l to choose ) are followed by a spatial layer to encode signals with the graph structure . Building temporal and spatial layers alternatively helps spatial modules to learn embeddings at different temporal scales , and this generates better results than putting spatial layers after all temporal ones . To encode spatial information , Kipf & Welling ( 2017 ) uses first-order approximation of spectral filters to form the layer-wise propagation rule of a GCN layer : H ( l+1 ) = GCN ( H ( l ) ) = f ( AH ( l ) W ( l ) ) . It can be understood as spatially aggregating information among neighboring nodes to form new node embeddings . In the original setting without temporal signals , H ( l ) ∈ RN×d is the activation matrix of lth layer , A ∈ RN×N denotes the normalized adjacency matrix with self-connections as discussed in section 2.1 , W ( l ) ∈ Rd×d ′ is learnable model parameters , and f is a nonlinear activation function of choice . Parameters d and d′ are the number of feature channels . We view a GCN layer as a local smoothing operation followed by an MLP , and simplify stacking K layers to AKH as in Wu et al . ( 2019a ) . In ReBraiD , every graph network layer aggregates information from each node ’ s K-hop neighborhoods based on both brain structural connectivity and the latent adaptive adjacency matrix : namely we have both AiKH ( l ) WK and Ai adpKH ( l ) WK adp for input H ( l ) . We also gather different levels ( from 0 to K ) of neighbor information with concatenation . In other words , one graph convolution layer here corresponds to a small module that is equivalent to K simple GCN layers with residual connections . We can write our layer as : H ( l+1 ) = GNN ( l ) ( H ( l ) ) = MLP [ ConcatKk=1 ( H ( l ) , ReLU ( Ai kH ( l ) ) , ReLU ( Ai adp kH ( l ) ) ) ] ( 2 ) With the additional temporal dimension , H ( l ) ∈ RN×d×t in eq . ( 2 ) , and Ai ∈ RN×N applies on H ( l ) ’ s first two dimensions while multiplying . Outputs of different GNN ( l ) layers are parametrized and then skip connected with a summation . Since the temporal lengths of these outputs are different because of TCNs , max-pooling is used before each summation to make the lengths identical . ( IV ) Multi-resolution inner cluster smoothing . While GNN layers can effectively passing information between neighboring nodes , long-range relationships among brain regions that neither appear in SC nor learned by latent Aadp can be better captured using soft assignments similar to DIFFPOOL ( Ying et al . ( 2018 ) ) . To generate the soft assignment tensor assigning N nodes into c clusters ( c chosen manually ) , we use GNN ( l ) pool that obeys the same propagation rule as in eq . ( 2 ) , followed by Softmax along c. This assignment is applied to the output of GNN ( l ) emb which carries out the spatial embedding for the lth layer input H ( l ) : S ( l ) = Softmax ( GNN ( l ) pool ( H ( ` ) ) , 1 ) ∈ RN×c×t Z ( l ) = GNN ( l ) emb ( H ( l ) ) ∈ RN×d×t H̃ ( l ) = S ( l ) > Z ( l ) ∈ Rc×d×t ( 3 ) The extra temporal dimension allows nodes to be assigned to heterogeneous clusters at different frames . We find that using coarsened A ( l+1 ) i = S ( l ) > A ( l ) i S ( l ) ∈ Rc×c as the graph adjacency matrix leads to worse performance compared to using SC-generated Ai and learned Ai adp ( comparison in section 3.1 ) . In addition , if the number of nodes is changed , residual connections coming from the beginning of temporal-spatial blocks can not be used and this impacts overall performance . To continue use Ai and Ai adp as graph adjacency matrices and allow residual connections , we reverseassign H̃ ( l ) with assignment tensor obtained from applying Softmax on S ( l ) > along N , so that the number of nodes is kept unchanged : S̃ ( l ) = Softmax ( S ( l ) > , 1 ) ∈ Rc×N×t H ( ` +1 ) = S̃ ( l ) > H̃ ( l ) ∈ RN×d×t ( 4 ) In fact , eqs . ( 3 ) and ( 4 ) perform signal smoothing on nodes within each soft-assigned cluster ( appendix A.1.2 shows a toy example ) . With the bottleneck c < N , the model is forced to pick up latent community structures . This inner-cluster smoothing is carried out at different spatial resolutions : as the spatial receptive field increases with more graph layers , we decrease cluster number c for the assignment operation . | This paper proposes a Graph Neural Network model to estimate latent dynamics in the human brain using functional Magnetic Resonance Imaging (fMRI) and Diffusion Weighted Imaging (DWI) while performing a classification task. The model consists of four parts 1) estimating each sample's adjacency matrix by learning a shared projection matrix 2) gated temporal convolutional neural network for learning information from time-series data 3) graph neural network to get embeddings of temporal and spatial information combined by 4) multi-resolution inner cluster smoothing. The authors use integrated gradients for estimating important features for the classification task helping with model interpretation. The authors show that the proposed method can perform better in the prediction task than GCN, GAT V2, etc. On the real dataset, it is shown that the method can capture temporal and spatial heterogeneity and provide regions important for the presented classification task. | SP:2be6665301406f0ca4f089c778acaf99a3bd8d35 |
Deep Representations for Time-varying Brain Datasets | 1 INTRODUCTION . Neuroimaging techniques such as fMRI ( functional magnetic resonance imaging ) and DWI ( diffusion-weighted imaging ) provide a window into complex brain processes . Yet , modeling and understanding these signals has always been a challenge . Network neuroscience ( Bassett & Sporns , 2017 ) views the brain as a multiscale networked system and models these signals in their graph representations : nodes represent brain ROIs ( regions of interest ) , and edges represent either structural or functional connections between pairs of regions . With larger imaging datasets and developments in Graph Neural Networks ( Scarselli et al. , 2009 ) , recent works leverage variants of the graph deep learning , modeling brain signals with data-driven models and getting rid of Gaussian assumptions typically existed in linear models ( Zhang et al. , 2019 ; Li et al. , 2019 ) . These methods are making progress on identifying physiological characteristics and brain disorders : In Kim & Ye ( 2020 ) , authors combine grad-CAM ( Selvaraju et al. , 2017 ) and GIN ( Xu et al. , 2018 ) to highlight brain regions that are responsible for gender classification with resting-state fMRI data . Li et al . ( 2020 ) utilizes the regularized pooling with GNN to identify fMRI biomarkers . Noman et al . ( 2021 ) embeds both topological structures and node signals of fMRI networks into low-dimensional latent representations for a better identification of depression . However , the first two works use time-averaged fMRI , losing rich dynamics in the temporal domain . The third combines nodes ’ temporal and feature dimensions instead of handling them separately , leading to a suboptimal representation ( as discussed in section 3.2 ) . To overcome these issues , we propose ReBraiD ( Deep Representations for Time-varying Brain Datasets ) , a graph neural network model that jointly models dynamic functional signals and structural connectivities , leading to a more comprehensive deep representation of brain dynamics . To simultaneously encode signals along spatial and temporal dimensions , some notable works in traffic prediction and activity recognition domains such as Graph WaveNet ( Wu et al. , 2019b ) alternate TCN ( temporal convolution network ) ( Lea et al. , 2016 ) and GCN ( graph convolutional network ) ( Kipf & Welling , 2017 ) . Others ( Song et al. , 2020 ; Liu et al. , 2020 ) use localized spatial-temporal graph to embed both domains ’ information in this extended graph . There are also works incorporating gated recurrent networks for the temporal domain such as ( Seo et al. , 2018 ; Ruiz et al. , 2020 ) . We choose the first option for ReBraiD , as it is more memory and time efficient , and can support much longer inputs . We also explore the best option when alternating spatial and temporal layers for encoding brain activities with extensive ablation studies . Upon this structure , we propose novel sample-level adaptive adjacency matrix learning and multi-resolution inner cluster smoothing , both of which learn and refine latent dynamic structures . We also make the model more efficient while being effective with the choice of the temporal layer . Equally important as finding a good representation of brain dynamics is interpreting them . We utilize integrated gradients ( Sundararajan et al. , 2017 ) to identify how brain ROIs participate in various processes . This can lead to better behavioral understanding , biomarker discoveries , and characterization of individuals or groups with their brain imagings . We also make the novel contribution of identifying temporally important frames with graph attribution techniques ; this can enable more fine-grained temporal analysis around keyframes when combined with other imaging modalities such as EEG ( electroencephalogram ) . In addition , our subject-level and group-level attribution studies unveil heterogeneities among ROIs , tasks , and individuals . 2 METHOD . 2.1 PRELIMINARIES . We utilize two brain imaging modalities mapped onto a same coordinate : SC ( structural connectivity ) from DWI scans , and time-varying fMRI scans . We represent them as a set of L graphs Gi = ( Ai , Xi ) with i ∈ [ 1 , L ] , in which Ai ∈ RN×N represents normalized adjacency matrix with an added self-loop : Ai = D̃ − 1 2 SCi ˜SCiD̃ − 1 2 SCi , ˜SCi = SCi + IN and D̃SCi = ∑ w ( ˜SCi ) vw is the diagonal node degree matrix . Graph signal matrix obtained from fMRI scans of the ith sample is represented as Xi ∈ RN×T . Here N is the number of nodes , and each node represents a brain region ; T is the input signal length on each node . Our objective focuses on classifying brain signals Gi into one of C task classes through learning latent graph structures . 2.2 MODEL . ReBraiD takes ( A , X ) as inputs , and outputs task class predictions . The overall model structure is shown in fig . 1 . For the ith sample Xi ∈ RN×1×T , the initial 1 × 1 convolution layer increases 1Axis order follows PyTorch conventions . Dimension at the second index is the expanded feature dimension . its hidden feature dimension to dh1 , outputting ( N , dh1 , T ) . The encoder then encodes temporal and spatial information alternately , reducing information to feature axis and generating a hidden representation of size ( N , dh2 , 1 ) . The encoder is followed by two linear layers to perform node embedding pooling and two MLP layers for classification . Cross entropy is used as the loss function : L ( i ) CE = − ∑ C yi log ŷi , where yi ∈ RC is the one-hot vector of ground truth task label and ŷi ∈ RC is model ’ s predicted distribution . We now explain different components of the model . ( I ) Learning sample-level latent graph structures . Structural scans serve as our graph adjacency matrices . However , they are static not only across temporal frames but also across different tasks . In contrast , functional connectivities ( FC ) are highly dynamic , as shown in appendix A.1.1 . To better capture dynamic graph structures , we assign an adaptive adjacency matrix to each input graph signal . Unlike other works such as Wu et al . ( 2019b ) that use a universal latent graph structure , our model do not assume all samples share the same latent graph . Instead , in ReBraiD , each sample has a unique latent structure reflecting its signal status . This implies that the latent adjacency matrix can not be treated as a learnable parameter as a part of the model . To solve this , we minimize the assumption down to a shared projection Θadp that projects each input sequence into an embedding space and use this embedding to generate the latent graph structure . Θadp can be learned in an endto-end manner . The generated adaptive adjacency matrix for the ith sample can be written as , where Softmax is applied column-wise : Ai adp = Softmax ( ReLU ( ( XiΘadp ) ( XiΘadp ) > ) ) , Θadp ∈ RT×hadp ( 1 ) ( II ) Gated TCN ( Temporal Convolutional Network ) . To encode temporal information , we use the gating mechanism as in Oord et al . ( 2016 ) in our temporal layers : H ( l+1 ) = tanh ( TCNemb ( H ( l ) ) ) σ ( TCNgate ( H ( l ) ) ) , where H ( l ) ∈ RN×d×t is one sample ’ s activation matrix of the lth layer , denotes the Hadamard product , and σ is the Sigmoid function . Different from TCNs generally used in sequence to sequence models that consist of dilated Conv1d and causal padding along the temporal dimension ( van den Oord et al . ( 2016 ) ) , we simply apply Conv1d with kernel 2 and stride 2 as our TCNemb and TCNgate to embed temporal information . The reason is twofold : first , for a sequence to sequence model with a length-T output , yτ should only depend on xt≤τ to avoid information leakage , and causal convolution can ensure this . In contrast , our model ’ s task is classification , and the goal of our encoder along the temporal dimension is to embed signal information into the feature axis while reducing temporal dimension to 1 . The receptive field of this single temporal point ( with multiple feature channels ) is meant to be the entire input sequence . Essentially , our TCN is the same as the last output node of a kernel 2 causal TCN whose dilation increases by 2 at each layer ( fig . 2 ) . Second , from a practical perspective , directly using strided non-causal TCN works the same as using dilated causal TCNs and taking the last node , while simplifies the model structure and reduces training time to less than a quarter . ( III ) Graph Network layer . In our model , every l temporal layers ( appendix A.2.3 studies the best l to choose ) are followed by a spatial layer to encode signals with the graph structure . Building temporal and spatial layers alternatively helps spatial modules to learn embeddings at different temporal scales , and this generates better results than putting spatial layers after all temporal ones . To encode spatial information , Kipf & Welling ( 2017 ) uses first-order approximation of spectral filters to form the layer-wise propagation rule of a GCN layer : H ( l+1 ) = GCN ( H ( l ) ) = f ( AH ( l ) W ( l ) ) . It can be understood as spatially aggregating information among neighboring nodes to form new node embeddings . In the original setting without temporal signals , H ( l ) ∈ RN×d is the activation matrix of lth layer , A ∈ RN×N denotes the normalized adjacency matrix with self-connections as discussed in section 2.1 , W ( l ) ∈ Rd×d ′ is learnable model parameters , and f is a nonlinear activation function of choice . Parameters d and d′ are the number of feature channels . We view a GCN layer as a local smoothing operation followed by an MLP , and simplify stacking K layers to AKH as in Wu et al . ( 2019a ) . In ReBraiD , every graph network layer aggregates information from each node ’ s K-hop neighborhoods based on both brain structural connectivity and the latent adaptive adjacency matrix : namely we have both AiKH ( l ) WK and Ai adpKH ( l ) WK adp for input H ( l ) . We also gather different levels ( from 0 to K ) of neighbor information with concatenation . In other words , one graph convolution layer here corresponds to a small module that is equivalent to K simple GCN layers with residual connections . We can write our layer as : H ( l+1 ) = GNN ( l ) ( H ( l ) ) = MLP [ ConcatKk=1 ( H ( l ) , ReLU ( Ai kH ( l ) ) , ReLU ( Ai adp kH ( l ) ) ) ] ( 2 ) With the additional temporal dimension , H ( l ) ∈ RN×d×t in eq . ( 2 ) , and Ai ∈ RN×N applies on H ( l ) ’ s first two dimensions while multiplying . Outputs of different GNN ( l ) layers are parametrized and then skip connected with a summation . Since the temporal lengths of these outputs are different because of TCNs , max-pooling is used before each summation to make the lengths identical . ( IV ) Multi-resolution inner cluster smoothing . While GNN layers can effectively passing information between neighboring nodes , long-range relationships among brain regions that neither appear in SC nor learned by latent Aadp can be better captured using soft assignments similar to DIFFPOOL ( Ying et al . ( 2018 ) ) . To generate the soft assignment tensor assigning N nodes into c clusters ( c chosen manually ) , we use GNN ( l ) pool that obeys the same propagation rule as in eq . ( 2 ) , followed by Softmax along c. This assignment is applied to the output of GNN ( l ) emb which carries out the spatial embedding for the lth layer input H ( l ) : S ( l ) = Softmax ( GNN ( l ) pool ( H ( ` ) ) , 1 ) ∈ RN×c×t Z ( l ) = GNN ( l ) emb ( H ( l ) ) ∈ RN×d×t H̃ ( l ) = S ( l ) > Z ( l ) ∈ Rc×d×t ( 3 ) The extra temporal dimension allows nodes to be assigned to heterogeneous clusters at different frames . We find that using coarsened A ( l+1 ) i = S ( l ) > A ( l ) i S ( l ) ∈ Rc×c as the graph adjacency matrix leads to worse performance compared to using SC-generated Ai and learned Ai adp ( comparison in section 3.1 ) . In addition , if the number of nodes is changed , residual connections coming from the beginning of temporal-spatial blocks can not be used and this impacts overall performance . To continue use Ai and Ai adp as graph adjacency matrices and allow residual connections , we reverseassign H̃ ( l ) with assignment tensor obtained from applying Softmax on S ( l ) > along N , so that the number of nodes is kept unchanged : S̃ ( l ) = Softmax ( S ( l ) > , 1 ) ∈ Rc×N×t H ( ` +1 ) = S̃ ( l ) > H̃ ( l ) ∈ RN×d×t ( 4 ) In fact , eqs . ( 3 ) and ( 4 ) perform signal smoothing on nodes within each soft-assigned cluster ( appendix A.1.2 shows a toy example ) . With the bottleneck c < N , the model is forced to pick up latent community structures . This inner-cluster smoothing is carried out at different spatial resolutions : as the spatial receptive field increases with more graph layers , we decrease cluster number c for the assignment operation . | This paper presents a graph neural network architecture for analyzing dynamic brain imaging data. The proposed approach uses both structural connectivity (via DWI) and functional connectivity (via fMRI) to setup the graph edge information, while the fMRI signals are used to define node features. The proposed network alternates between analyzing temporal information via gated temporal convolutional network layers and spatial information via GNN layers. A multi-resolution soft cluster smoothing is applied as the pooling operation in the GNN. Attribution of structural and functional imaging inputs is also explored using integrated gradients interpretation method. The proposed method is tested on a multi-task fMRI dataset and demonstrated better performance in both ablation studies and comparison to state-of-the-art GNN methods. | SP:2be6665301406f0ca4f089c778acaf99a3bd8d35 |
Deep Representations for Time-varying Brain Datasets | 1 INTRODUCTION . Neuroimaging techniques such as fMRI ( functional magnetic resonance imaging ) and DWI ( diffusion-weighted imaging ) provide a window into complex brain processes . Yet , modeling and understanding these signals has always been a challenge . Network neuroscience ( Bassett & Sporns , 2017 ) views the brain as a multiscale networked system and models these signals in their graph representations : nodes represent brain ROIs ( regions of interest ) , and edges represent either structural or functional connections between pairs of regions . With larger imaging datasets and developments in Graph Neural Networks ( Scarselli et al. , 2009 ) , recent works leverage variants of the graph deep learning , modeling brain signals with data-driven models and getting rid of Gaussian assumptions typically existed in linear models ( Zhang et al. , 2019 ; Li et al. , 2019 ) . These methods are making progress on identifying physiological characteristics and brain disorders : In Kim & Ye ( 2020 ) , authors combine grad-CAM ( Selvaraju et al. , 2017 ) and GIN ( Xu et al. , 2018 ) to highlight brain regions that are responsible for gender classification with resting-state fMRI data . Li et al . ( 2020 ) utilizes the regularized pooling with GNN to identify fMRI biomarkers . Noman et al . ( 2021 ) embeds both topological structures and node signals of fMRI networks into low-dimensional latent representations for a better identification of depression . However , the first two works use time-averaged fMRI , losing rich dynamics in the temporal domain . The third combines nodes ’ temporal and feature dimensions instead of handling them separately , leading to a suboptimal representation ( as discussed in section 3.2 ) . To overcome these issues , we propose ReBraiD ( Deep Representations for Time-varying Brain Datasets ) , a graph neural network model that jointly models dynamic functional signals and structural connectivities , leading to a more comprehensive deep representation of brain dynamics . To simultaneously encode signals along spatial and temporal dimensions , some notable works in traffic prediction and activity recognition domains such as Graph WaveNet ( Wu et al. , 2019b ) alternate TCN ( temporal convolution network ) ( Lea et al. , 2016 ) and GCN ( graph convolutional network ) ( Kipf & Welling , 2017 ) . Others ( Song et al. , 2020 ; Liu et al. , 2020 ) use localized spatial-temporal graph to embed both domains ’ information in this extended graph . There are also works incorporating gated recurrent networks for the temporal domain such as ( Seo et al. , 2018 ; Ruiz et al. , 2020 ) . We choose the first option for ReBraiD , as it is more memory and time efficient , and can support much longer inputs . We also explore the best option when alternating spatial and temporal layers for encoding brain activities with extensive ablation studies . Upon this structure , we propose novel sample-level adaptive adjacency matrix learning and multi-resolution inner cluster smoothing , both of which learn and refine latent dynamic structures . We also make the model more efficient while being effective with the choice of the temporal layer . Equally important as finding a good representation of brain dynamics is interpreting them . We utilize integrated gradients ( Sundararajan et al. , 2017 ) to identify how brain ROIs participate in various processes . This can lead to better behavioral understanding , biomarker discoveries , and characterization of individuals or groups with their brain imagings . We also make the novel contribution of identifying temporally important frames with graph attribution techniques ; this can enable more fine-grained temporal analysis around keyframes when combined with other imaging modalities such as EEG ( electroencephalogram ) . In addition , our subject-level and group-level attribution studies unveil heterogeneities among ROIs , tasks , and individuals . 2 METHOD . 2.1 PRELIMINARIES . We utilize two brain imaging modalities mapped onto a same coordinate : SC ( structural connectivity ) from DWI scans , and time-varying fMRI scans . We represent them as a set of L graphs Gi = ( Ai , Xi ) with i ∈ [ 1 , L ] , in which Ai ∈ RN×N represents normalized adjacency matrix with an added self-loop : Ai = D̃ − 1 2 SCi ˜SCiD̃ − 1 2 SCi , ˜SCi = SCi + IN and D̃SCi = ∑ w ( ˜SCi ) vw is the diagonal node degree matrix . Graph signal matrix obtained from fMRI scans of the ith sample is represented as Xi ∈ RN×T . Here N is the number of nodes , and each node represents a brain region ; T is the input signal length on each node . Our objective focuses on classifying brain signals Gi into one of C task classes through learning latent graph structures . 2.2 MODEL . ReBraiD takes ( A , X ) as inputs , and outputs task class predictions . The overall model structure is shown in fig . 1 . For the ith sample Xi ∈ RN×1×T , the initial 1 × 1 convolution layer increases 1Axis order follows PyTorch conventions . Dimension at the second index is the expanded feature dimension . its hidden feature dimension to dh1 , outputting ( N , dh1 , T ) . The encoder then encodes temporal and spatial information alternately , reducing information to feature axis and generating a hidden representation of size ( N , dh2 , 1 ) . The encoder is followed by two linear layers to perform node embedding pooling and two MLP layers for classification . Cross entropy is used as the loss function : L ( i ) CE = − ∑ C yi log ŷi , where yi ∈ RC is the one-hot vector of ground truth task label and ŷi ∈ RC is model ’ s predicted distribution . We now explain different components of the model . ( I ) Learning sample-level latent graph structures . Structural scans serve as our graph adjacency matrices . However , they are static not only across temporal frames but also across different tasks . In contrast , functional connectivities ( FC ) are highly dynamic , as shown in appendix A.1.1 . To better capture dynamic graph structures , we assign an adaptive adjacency matrix to each input graph signal . Unlike other works such as Wu et al . ( 2019b ) that use a universal latent graph structure , our model do not assume all samples share the same latent graph . Instead , in ReBraiD , each sample has a unique latent structure reflecting its signal status . This implies that the latent adjacency matrix can not be treated as a learnable parameter as a part of the model . To solve this , we minimize the assumption down to a shared projection Θadp that projects each input sequence into an embedding space and use this embedding to generate the latent graph structure . Θadp can be learned in an endto-end manner . The generated adaptive adjacency matrix for the ith sample can be written as , where Softmax is applied column-wise : Ai adp = Softmax ( ReLU ( ( XiΘadp ) ( XiΘadp ) > ) ) , Θadp ∈ RT×hadp ( 1 ) ( II ) Gated TCN ( Temporal Convolutional Network ) . To encode temporal information , we use the gating mechanism as in Oord et al . ( 2016 ) in our temporal layers : H ( l+1 ) = tanh ( TCNemb ( H ( l ) ) ) σ ( TCNgate ( H ( l ) ) ) , where H ( l ) ∈ RN×d×t is one sample ’ s activation matrix of the lth layer , denotes the Hadamard product , and σ is the Sigmoid function . Different from TCNs generally used in sequence to sequence models that consist of dilated Conv1d and causal padding along the temporal dimension ( van den Oord et al . ( 2016 ) ) , we simply apply Conv1d with kernel 2 and stride 2 as our TCNemb and TCNgate to embed temporal information . The reason is twofold : first , for a sequence to sequence model with a length-T output , yτ should only depend on xt≤τ to avoid information leakage , and causal convolution can ensure this . In contrast , our model ’ s task is classification , and the goal of our encoder along the temporal dimension is to embed signal information into the feature axis while reducing temporal dimension to 1 . The receptive field of this single temporal point ( with multiple feature channels ) is meant to be the entire input sequence . Essentially , our TCN is the same as the last output node of a kernel 2 causal TCN whose dilation increases by 2 at each layer ( fig . 2 ) . Second , from a practical perspective , directly using strided non-causal TCN works the same as using dilated causal TCNs and taking the last node , while simplifies the model structure and reduces training time to less than a quarter . ( III ) Graph Network layer . In our model , every l temporal layers ( appendix A.2.3 studies the best l to choose ) are followed by a spatial layer to encode signals with the graph structure . Building temporal and spatial layers alternatively helps spatial modules to learn embeddings at different temporal scales , and this generates better results than putting spatial layers after all temporal ones . To encode spatial information , Kipf & Welling ( 2017 ) uses first-order approximation of spectral filters to form the layer-wise propagation rule of a GCN layer : H ( l+1 ) = GCN ( H ( l ) ) = f ( AH ( l ) W ( l ) ) . It can be understood as spatially aggregating information among neighboring nodes to form new node embeddings . In the original setting without temporal signals , H ( l ) ∈ RN×d is the activation matrix of lth layer , A ∈ RN×N denotes the normalized adjacency matrix with self-connections as discussed in section 2.1 , W ( l ) ∈ Rd×d ′ is learnable model parameters , and f is a nonlinear activation function of choice . Parameters d and d′ are the number of feature channels . We view a GCN layer as a local smoothing operation followed by an MLP , and simplify stacking K layers to AKH as in Wu et al . ( 2019a ) . In ReBraiD , every graph network layer aggregates information from each node ’ s K-hop neighborhoods based on both brain structural connectivity and the latent adaptive adjacency matrix : namely we have both AiKH ( l ) WK and Ai adpKH ( l ) WK adp for input H ( l ) . We also gather different levels ( from 0 to K ) of neighbor information with concatenation . In other words , one graph convolution layer here corresponds to a small module that is equivalent to K simple GCN layers with residual connections . We can write our layer as : H ( l+1 ) = GNN ( l ) ( H ( l ) ) = MLP [ ConcatKk=1 ( H ( l ) , ReLU ( Ai kH ( l ) ) , ReLU ( Ai adp kH ( l ) ) ) ] ( 2 ) With the additional temporal dimension , H ( l ) ∈ RN×d×t in eq . ( 2 ) , and Ai ∈ RN×N applies on H ( l ) ’ s first two dimensions while multiplying . Outputs of different GNN ( l ) layers are parametrized and then skip connected with a summation . Since the temporal lengths of these outputs are different because of TCNs , max-pooling is used before each summation to make the lengths identical . ( IV ) Multi-resolution inner cluster smoothing . While GNN layers can effectively passing information between neighboring nodes , long-range relationships among brain regions that neither appear in SC nor learned by latent Aadp can be better captured using soft assignments similar to DIFFPOOL ( Ying et al . ( 2018 ) ) . To generate the soft assignment tensor assigning N nodes into c clusters ( c chosen manually ) , we use GNN ( l ) pool that obeys the same propagation rule as in eq . ( 2 ) , followed by Softmax along c. This assignment is applied to the output of GNN ( l ) emb which carries out the spatial embedding for the lth layer input H ( l ) : S ( l ) = Softmax ( GNN ( l ) pool ( H ( ` ) ) , 1 ) ∈ RN×c×t Z ( l ) = GNN ( l ) emb ( H ( l ) ) ∈ RN×d×t H̃ ( l ) = S ( l ) > Z ( l ) ∈ Rc×d×t ( 3 ) The extra temporal dimension allows nodes to be assigned to heterogeneous clusters at different frames . We find that using coarsened A ( l+1 ) i = S ( l ) > A ( l ) i S ( l ) ∈ Rc×c as the graph adjacency matrix leads to worse performance compared to using SC-generated Ai and learned Ai adp ( comparison in section 3.1 ) . In addition , if the number of nodes is changed , residual connections coming from the beginning of temporal-spatial blocks can not be used and this impacts overall performance . To continue use Ai and Ai adp as graph adjacency matrices and allow residual connections , we reverseassign H̃ ( l ) with assignment tensor obtained from applying Softmax on S ( l ) > along N , so that the number of nodes is kept unchanged : S̃ ( l ) = Softmax ( S ( l ) > , 1 ) ∈ Rc×N×t H ( ` +1 ) = S̃ ( l ) > H̃ ( l ) ∈ RN×d×t ( 4 ) In fact , eqs . ( 3 ) and ( 4 ) perform signal smoothing on nodes within each soft-assigned cluster ( appendix A.1.2 shows a toy example ) . With the bottleneck c < N , the model is forced to pick up latent community structures . This inner-cluster smoothing is carried out at different spatial resolutions : as the spatial receptive field increases with more graph layers , we decrease cluster number c for the assignment operation . | This paper proposes a method of graph neural network to jointly models dynamic functional signals and structural connectivities, to learn a good deep representation of brain dynamics. In this article, the author proposes some improved methods for graph neural networks, such as learning sample-level latent graph structures, temporal convolutional network and multi-resolution inner cluster smoothing methods to better learn insightful interpretations of brain dynamics. In the experiment, the author verified the effectiveness of the method in this paper on the fMRI signal data. | SP:2be6665301406f0ca4f089c778acaf99a3bd8d35 |
On Non-Random Missing Labels in Semi-Supervised Learning | 1 INTRODUCTION . Semi-supervised learning ( SSL ) aims to alleviate the strong demand for large-scale labeled data by leveraging unlabeled data ( Zhu , 2008 ; Yang et al. , 2021 ) . Prevailing SSL methods first train a model using the labeled data , then uses the model to impute the missing labels with the predicted pseudolabels for the unlabeled data ( Van Buuren , 2018 ) , and finally combine the true- and pseudo-labels to further improve the model ( Sohn et al. , 2020 ; Berthelot et al. , 2019a ) . Ideally , the “ improve ” is theoretically guaranteed if the missing label imputation is perfect ( Grandvalet & Bengio , 2005 ) ; otherwise , imperfect imputation causes the well-known confirmation bias ( Arazo et al. , 2019 ; Sohn et al. , 2020 ) . In particular , the bias is even more severe in practice because the underlying assumption that the labeled and unlabeled data are drawn from the same distribution does not hold . We term this scenario as label Missing Not At Random ( MNAR ) ( Hernán & Robins , 2020 ) , as compared to the naı̈ve assumption called label Missing Completely At Random ( MCAR ) . MNAR is inevitable in real-world SSL due to the limited label annotation budget ( Rosset et al. , 2005 ) —uniform label annotations that keep MCAR are expensive . For example , we usually deploy low-cost data collecting methods like crawling social media images from the Web ( Mahajan et al. , 2018 ) . However , the high-quality labels appear to be severely imbalanced over classes due to the imbalanced human preferences for the “ class ” ( Misra et al. , 2016 ; Colléony et al. , 2017 ) . For example , people are more willing to tag a “ Chihuahua ” rather than a “ leatherback ” ( a huge black turtle ) since the former is more lovely and easier to recognize . Thus , the imputation model trained by such biased supervision makes the model favoring “ Chihuahua ” rather than “ leatherback ” . The “ Chihuahua ” -favored pseudo-labels , in turn , negatively reinforce the model confidence in the false “ Chihuahua ” belief and thus exacerbate the confirmation bias . We design an experiment on CIFAR-10 to further illustrate how existing state-of-the-art SSL methods , e.g. , FixMatch ( Sohn et al. , 2020 ) , fail in the MNAR scenario . As shown in Figure 1 ( a ) , the overall training data is uniformly distributed over classes , but the labeled data is long-tailed distributed , which simulates the imbalanced class popularity . Trained on such MNAR training data , FixMatch even magnifies the bias towards the popular classes and ignores the rare classes ( Fig- ure 1 ( b ) ) . We point out that the devil is in the imputation . As shown in Figure 1 ( c ) , the confidence scores of FixMatch for popular classes are much higher than those for rare classes ( i.e. , averagely > 0.95 vs. < 0.05 ) . Since FixMatch adopts a fixed threshold for the imputation samples selection , i.e. , only the samples with confidence larger than 0.95 are imputed , FixMatch tends to impute the labels of more samples from the popular classes , which still keeps the updated labels with the newly added pseudo-labels long-tailed . As a result , FixMatch is easily trapped in MNAR . In fact , MNAR has attracted broad attention in statistics and Inverse Propensity Weighting ( IPW ) is one of the commonly used tools to tackle this challenge ( Seaman & White , 2013 ; Jones et al. , 2006 ) . IPW introduces a weight for each training sample via its propensity score , which reflects how likely the label is observed ( e.g. , its popularity ) . In this way , IPW makes up a pseudo-balanced dataset by duplicating each labeled data inversely proportional to its propensity—less popular samples should draw the same attention as the popular ones—a more balanced imputation . To combine the IPW true labels and imputed missing labels , a Doubly Robust ( DR ) estimator is used to guarantee a robust SSL model if either IPW or imputation is unbiased ( Seaman & Vansteelandt , 2018 ; Vansteelandt et al. , 2010 ) . However , the above framework overlooks the role of “ class ” in causing the MNAR problem of SSL ( Section 3 ) , and we therefore propose a unified Class-Aware Doubly Robust ( CADR ) framework to address this challenge ( Section 4 ) . CADR removes the bias from both the supervised model training and the unlabeled data imputation ends . For the former end , we propose Class-Aware Propensity ( CAP ) that exploits the unlabeled data to train an improved classifier using the biased labeled data ( Section 4.1 ) . We use an efficient moving averaging strategy to estimate the propensity . For the latter end , we design Class-Aware Imputation ( CAI ) that dynamically adjusts the pseudolabel assignment threshold with class-specific confidence scores to mitigate the bias in imputation ( Section 4.2 ) . Intuitively , CAI lowers the threshold requirement of rare class samples to balance with frequent class samples . Experiments on several image classification benchmarks demonstrate that our CADR framework achieves a consistent performance boost and can effectively tackle the MNAR problem . Besides , as MCAR is a special case of MNAR , our method maintains the competitive performance in the conventional SSL setting . The key contributions of this work are summarized as follows : • We propose a realistic and challenging label Missing Not At Random ( MNAR ) problem for semisupervised learning , which is not extensively studied in previous work . We systematically analyze the bias caused by non-random missing labels . • We proposes a unified doubly robust framework called Class-Aware Doubly Robust ( CADR ) estimator to remove the bias from both the supervised model training end—by using Class-Aware Prospesity ( CAP ) , and the unlabeled data imputation end—by using Class-Aware Imputation ( CAI ) . • Our proposed CADR achieves competitive performances in both MNAR and conventional label Missing Completely At Random ( MCAR ) . 2 RELATED WORKS . Missing Not At Random . Missing data problems are ubiquitous across the analysis in social , behavioral , and medical sciences ( Enders , 2010 ; Heckman , 1977 ) . When data is not missing at random , estimations based on the observed data only results in bias ( Heckman , 1977 ) . The solutions are three-fold : 1 ) Inverse probability weighting ( IPW ) assigns weights to each observed datum based on the propensity score , i.e. , the probability of being observed . A missing mechanism-based model is used to estimate the sample propensity , such as a logistic regression model ( Rosset et al. , 2005 ; Wang et al. , 1997 ) or a robit regression model ( Kang & Schafer , 2007 ; Liu , 2005 ) . 2 ) Imputation methods aim to fill in the missing values to produce a complete dataset ( Kenward & Carpenter , 2007 ; Little & Rubin , 2014 ) . An imputation model is regressed to predict the incomplete data from the observed data in a deterministic ( Kovar & Whitridge. , 1995 ) or stochastic ( Lo et al. , 2019 ) way . 3 ) As the propensity estimation or the regressed imputation are easy to be biased , doubly robust estimators propose to integrate IPW and imputation with double robustness ( Seaman & Vansteelandt , 2018 ; Vansteelandt et al. , 2010 ; Jonsson Funk et al. , 2011 ) : the capability to maintain unbiased when either the propensity or imputation model is biased . In this work , as the image labels are missing not at random , we design the class-aware propensity and imputation considering the causal role of label classes in missing , avoiding the uncertain model specification and generating unbiased estimation . These two class-aware modules can be naturally integrated into a doubly robust estimator . Semi-Supervised Learning ( SSL ) . It aims to exploit unlabeled data to improve the model learned on labeled data . Prevailing SSL methods ( Sohn et al. , 2020 ; Berthelot et al. , 2019b ; a ) share a similar strategy : training a model with the labeled data and generating pseudo-labels for unlabeled data based on the model predictions . Pseudo-labeling methods ( Lee , 2013 ; Xie et al. , 2020 ; Rizve et al. , 2021 ) predict pseudo-labels for unlabeled data and add them to the training data for re-training . Consistency-regularization methods ( Sajjadi et al. , 2016 ; Laine & Aila , 2016 ; Berthelot et al. , 2019b ) apply a random perturbation to an unlabeled image and then use the prediction as the pseudo-label of the same image under a different augmentation . Recent state-of-the-art SSL methods ( Sohn et al. , 2020 ; Berthelot et al. , 2019a ) combine the two existing techniques and predict improved pseudolabels . However , when labels are missing at random , these methods can be inefficient as the model learned on labeled data is biased and significantly harms the quality of pseudo labels . Though some works also notice the model bias ( Wei et al. , 2021 ; Kim et al. , 2020 ) , they neglect the causal relationship between the bias and the missing label mechanism in SSL , which is systematically discussed in our work . 3 MISSING LABELS IN SEMI-SUPERVISED LEARNING . In semi-supervised learning ( SSL ) , the training dataset D is divided into two disjoint sets : a labeled dataset DL and an unlabeled data DU . We denote DL as { ( x ( i ) , y ( i ) ) } NLi=1 ( usually NL≪N ) where x ( i ) ∈ Rd is a sample feature and y ( i ) ∈ { 0 , 1 } C is its one-hot label over C classes , and DU as { ( x ( i ) ) } Ni=NL+1 where the remaining N−NL labels are missing in DU . We further review SSL as a label missing problem , and define a label missing indicator set M with m ( i ) ∈ { 0 , 1 } , where m ( i ) =1 denotes the label is missing ( i.e. , unlabeled ) and m ( i ) =0 denotes the label is not missing ( i.e. , labeled ) . In this way , we can rewrite the dataset as D= ( X , Y , M ) = { ( x ( i ) , y ( i ) , m ( i ) ) } Ni=1 . Traditional SSL methods assume that M is independent with Y , i.e. , the labels are Missing Completely At Random ( MCAR ) . Under this assumption , prevailing SSL algorithms can be summarized as the following multi-task optimization of the supervised learning and the unlabeled imputation : θ̂ = argmin θ ∑ ( x , y ) ∈DL Ls ( x , y ; θ ) + ∑ x∈DU Lu ( x ; θ ) , ( 1 ) where Ls and Lu are the loss function designed separately for supervised learning on labeled data ( M =0 ) and regression imputation on unlabeled data ( M =1 ) . In general , SSL methods first train a model with parameters θ̂ using Ls on DL , then impute the missing labels ( Van Buuren , 2018 ) by predicting the pseudo-labels ŷ = f ( x ; θ̂ ) , and finally combine the true- and pseudo-labels to further improve the model for another SSL loop , e.g. , another optimization iteration of Eq . ( 1 ) . The implementation of Ls and Lu are open . For example , Ls is normally the standard cross-entropy loss , and Lu can be implemented as squared L2 loss ( Berthelot et al. , 2019b ) or cross-entropy loss ( Berthelot et al. , 2019a ; Sohn et al. , 2020 ) . As you may expect , the key to stable SSL methods is the unbiasedness of the imputation model . When M is independent with Y , we have P ( Y |X=x , M=0 ) = P ( Y |X=x ) , and thus E [ ŷ ] = E [ y|θ̂ ] = ∑ ( x , y ) ∈DL y · P ( y|x ) = ∑ ( x , y ) ∈D y · P ( y|x , M = 0 ) = ∑ ( x , y ) ∈D y · P ( y|x ) = E [ y ] , ( 2 ) which indicates that the model is an ideally unbiased estimator , and the imputed labels are unbiased . However , such MCAR assumption is too strong and impractical . For example , annotators may tend to tag a specific group of samples due to their preferences or experiences . This motivates us to ask the following realistic but overlooked question : what if M is dependent with Y , i.e. , the labels are missing not at random ( MNAR ) ? In this case , we have P ( Y |X = x , M = 0 ) ̸= P ( Y |X = x ) , and thus E [ ŷ ] = ∑ ( x , y ) ∈D y · P ( y|x , M = 0 ) = ∑ ( x , y ) ∈D y · P ( y|x ) · P ( M = 0|x , y ) P ( M = 0|x ) ̸= ∑ ( x , y ) ∈D y · P ( y|x ) = E [ y ] . ( 3 ) We can see it is no longer unbiased , further leading to biased imputed labels . As a result , the bias will be increasingly enhanced with the joint optimization loop in Eq . ( 1 ) moving forward . This analysis indicates that previous SSL methods are not applicable for the MNAR problem as they overlook the role of “ class ” Y in causing the non-randomness of M . In the following , we will introduce our Class-Aware Doubly Robust framework that targets at an unbiased estimator . | The paper addresses the semi-supervised learning problem under the setting of imbalanced label data by extending FixMatch with a class-aware method to reweight the loss and an adaptive thresholding method to select examples with pseudo labels. The two methods are termed Class-Aware Propensity (CAP) and Class-Aware Imputation (CAI), respectively. The paper also proposes the Class-Aware Doubly Robust (CADR) estimator by combining the two methods in the double robustness framework. Experiments are performed on Cifar-10/100, STL-10, and mini-ImageNet. | SP:972dccb2298d25af79062f3fb749519b42bc2d56 |
On Non-Random Missing Labels in Semi-Supervised Learning | 1 INTRODUCTION . Semi-supervised learning ( SSL ) aims to alleviate the strong demand for large-scale labeled data by leveraging unlabeled data ( Zhu , 2008 ; Yang et al. , 2021 ) . Prevailing SSL methods first train a model using the labeled data , then uses the model to impute the missing labels with the predicted pseudolabels for the unlabeled data ( Van Buuren , 2018 ) , and finally combine the true- and pseudo-labels to further improve the model ( Sohn et al. , 2020 ; Berthelot et al. , 2019a ) . Ideally , the “ improve ” is theoretically guaranteed if the missing label imputation is perfect ( Grandvalet & Bengio , 2005 ) ; otherwise , imperfect imputation causes the well-known confirmation bias ( Arazo et al. , 2019 ; Sohn et al. , 2020 ) . In particular , the bias is even more severe in practice because the underlying assumption that the labeled and unlabeled data are drawn from the same distribution does not hold . We term this scenario as label Missing Not At Random ( MNAR ) ( Hernán & Robins , 2020 ) , as compared to the naı̈ve assumption called label Missing Completely At Random ( MCAR ) . MNAR is inevitable in real-world SSL due to the limited label annotation budget ( Rosset et al. , 2005 ) —uniform label annotations that keep MCAR are expensive . For example , we usually deploy low-cost data collecting methods like crawling social media images from the Web ( Mahajan et al. , 2018 ) . However , the high-quality labels appear to be severely imbalanced over classes due to the imbalanced human preferences for the “ class ” ( Misra et al. , 2016 ; Colléony et al. , 2017 ) . For example , people are more willing to tag a “ Chihuahua ” rather than a “ leatherback ” ( a huge black turtle ) since the former is more lovely and easier to recognize . Thus , the imputation model trained by such biased supervision makes the model favoring “ Chihuahua ” rather than “ leatherback ” . The “ Chihuahua ” -favored pseudo-labels , in turn , negatively reinforce the model confidence in the false “ Chihuahua ” belief and thus exacerbate the confirmation bias . We design an experiment on CIFAR-10 to further illustrate how existing state-of-the-art SSL methods , e.g. , FixMatch ( Sohn et al. , 2020 ) , fail in the MNAR scenario . As shown in Figure 1 ( a ) , the overall training data is uniformly distributed over classes , but the labeled data is long-tailed distributed , which simulates the imbalanced class popularity . Trained on such MNAR training data , FixMatch even magnifies the bias towards the popular classes and ignores the rare classes ( Fig- ure 1 ( b ) ) . We point out that the devil is in the imputation . As shown in Figure 1 ( c ) , the confidence scores of FixMatch for popular classes are much higher than those for rare classes ( i.e. , averagely > 0.95 vs. < 0.05 ) . Since FixMatch adopts a fixed threshold for the imputation samples selection , i.e. , only the samples with confidence larger than 0.95 are imputed , FixMatch tends to impute the labels of more samples from the popular classes , which still keeps the updated labels with the newly added pseudo-labels long-tailed . As a result , FixMatch is easily trapped in MNAR . In fact , MNAR has attracted broad attention in statistics and Inverse Propensity Weighting ( IPW ) is one of the commonly used tools to tackle this challenge ( Seaman & White , 2013 ; Jones et al. , 2006 ) . IPW introduces a weight for each training sample via its propensity score , which reflects how likely the label is observed ( e.g. , its popularity ) . In this way , IPW makes up a pseudo-balanced dataset by duplicating each labeled data inversely proportional to its propensity—less popular samples should draw the same attention as the popular ones—a more balanced imputation . To combine the IPW true labels and imputed missing labels , a Doubly Robust ( DR ) estimator is used to guarantee a robust SSL model if either IPW or imputation is unbiased ( Seaman & Vansteelandt , 2018 ; Vansteelandt et al. , 2010 ) . However , the above framework overlooks the role of “ class ” in causing the MNAR problem of SSL ( Section 3 ) , and we therefore propose a unified Class-Aware Doubly Robust ( CADR ) framework to address this challenge ( Section 4 ) . CADR removes the bias from both the supervised model training and the unlabeled data imputation ends . For the former end , we propose Class-Aware Propensity ( CAP ) that exploits the unlabeled data to train an improved classifier using the biased labeled data ( Section 4.1 ) . We use an efficient moving averaging strategy to estimate the propensity . For the latter end , we design Class-Aware Imputation ( CAI ) that dynamically adjusts the pseudolabel assignment threshold with class-specific confidence scores to mitigate the bias in imputation ( Section 4.2 ) . Intuitively , CAI lowers the threshold requirement of rare class samples to balance with frequent class samples . Experiments on several image classification benchmarks demonstrate that our CADR framework achieves a consistent performance boost and can effectively tackle the MNAR problem . Besides , as MCAR is a special case of MNAR , our method maintains the competitive performance in the conventional SSL setting . The key contributions of this work are summarized as follows : • We propose a realistic and challenging label Missing Not At Random ( MNAR ) problem for semisupervised learning , which is not extensively studied in previous work . We systematically analyze the bias caused by non-random missing labels . • We proposes a unified doubly robust framework called Class-Aware Doubly Robust ( CADR ) estimator to remove the bias from both the supervised model training end—by using Class-Aware Prospesity ( CAP ) , and the unlabeled data imputation end—by using Class-Aware Imputation ( CAI ) . • Our proposed CADR achieves competitive performances in both MNAR and conventional label Missing Completely At Random ( MCAR ) . 2 RELATED WORKS . Missing Not At Random . Missing data problems are ubiquitous across the analysis in social , behavioral , and medical sciences ( Enders , 2010 ; Heckman , 1977 ) . When data is not missing at random , estimations based on the observed data only results in bias ( Heckman , 1977 ) . The solutions are three-fold : 1 ) Inverse probability weighting ( IPW ) assigns weights to each observed datum based on the propensity score , i.e. , the probability of being observed . A missing mechanism-based model is used to estimate the sample propensity , such as a logistic regression model ( Rosset et al. , 2005 ; Wang et al. , 1997 ) or a robit regression model ( Kang & Schafer , 2007 ; Liu , 2005 ) . 2 ) Imputation methods aim to fill in the missing values to produce a complete dataset ( Kenward & Carpenter , 2007 ; Little & Rubin , 2014 ) . An imputation model is regressed to predict the incomplete data from the observed data in a deterministic ( Kovar & Whitridge. , 1995 ) or stochastic ( Lo et al. , 2019 ) way . 3 ) As the propensity estimation or the regressed imputation are easy to be biased , doubly robust estimators propose to integrate IPW and imputation with double robustness ( Seaman & Vansteelandt , 2018 ; Vansteelandt et al. , 2010 ; Jonsson Funk et al. , 2011 ) : the capability to maintain unbiased when either the propensity or imputation model is biased . In this work , as the image labels are missing not at random , we design the class-aware propensity and imputation considering the causal role of label classes in missing , avoiding the uncertain model specification and generating unbiased estimation . These two class-aware modules can be naturally integrated into a doubly robust estimator . Semi-Supervised Learning ( SSL ) . It aims to exploit unlabeled data to improve the model learned on labeled data . Prevailing SSL methods ( Sohn et al. , 2020 ; Berthelot et al. , 2019b ; a ) share a similar strategy : training a model with the labeled data and generating pseudo-labels for unlabeled data based on the model predictions . Pseudo-labeling methods ( Lee , 2013 ; Xie et al. , 2020 ; Rizve et al. , 2021 ) predict pseudo-labels for unlabeled data and add them to the training data for re-training . Consistency-regularization methods ( Sajjadi et al. , 2016 ; Laine & Aila , 2016 ; Berthelot et al. , 2019b ) apply a random perturbation to an unlabeled image and then use the prediction as the pseudo-label of the same image under a different augmentation . Recent state-of-the-art SSL methods ( Sohn et al. , 2020 ; Berthelot et al. , 2019a ) combine the two existing techniques and predict improved pseudolabels . However , when labels are missing at random , these methods can be inefficient as the model learned on labeled data is biased and significantly harms the quality of pseudo labels . Though some works also notice the model bias ( Wei et al. , 2021 ; Kim et al. , 2020 ) , they neglect the causal relationship between the bias and the missing label mechanism in SSL , which is systematically discussed in our work . 3 MISSING LABELS IN SEMI-SUPERVISED LEARNING . In semi-supervised learning ( SSL ) , the training dataset D is divided into two disjoint sets : a labeled dataset DL and an unlabeled data DU . We denote DL as { ( x ( i ) , y ( i ) ) } NLi=1 ( usually NL≪N ) where x ( i ) ∈ Rd is a sample feature and y ( i ) ∈ { 0 , 1 } C is its one-hot label over C classes , and DU as { ( x ( i ) ) } Ni=NL+1 where the remaining N−NL labels are missing in DU . We further review SSL as a label missing problem , and define a label missing indicator set M with m ( i ) ∈ { 0 , 1 } , where m ( i ) =1 denotes the label is missing ( i.e. , unlabeled ) and m ( i ) =0 denotes the label is not missing ( i.e. , labeled ) . In this way , we can rewrite the dataset as D= ( X , Y , M ) = { ( x ( i ) , y ( i ) , m ( i ) ) } Ni=1 . Traditional SSL methods assume that M is independent with Y , i.e. , the labels are Missing Completely At Random ( MCAR ) . Under this assumption , prevailing SSL algorithms can be summarized as the following multi-task optimization of the supervised learning and the unlabeled imputation : θ̂ = argmin θ ∑ ( x , y ) ∈DL Ls ( x , y ; θ ) + ∑ x∈DU Lu ( x ; θ ) , ( 1 ) where Ls and Lu are the loss function designed separately for supervised learning on labeled data ( M =0 ) and regression imputation on unlabeled data ( M =1 ) . In general , SSL methods first train a model with parameters θ̂ using Ls on DL , then impute the missing labels ( Van Buuren , 2018 ) by predicting the pseudo-labels ŷ = f ( x ; θ̂ ) , and finally combine the true- and pseudo-labels to further improve the model for another SSL loop , e.g. , another optimization iteration of Eq . ( 1 ) . The implementation of Ls and Lu are open . For example , Ls is normally the standard cross-entropy loss , and Lu can be implemented as squared L2 loss ( Berthelot et al. , 2019b ) or cross-entropy loss ( Berthelot et al. , 2019a ; Sohn et al. , 2020 ) . As you may expect , the key to stable SSL methods is the unbiasedness of the imputation model . When M is independent with Y , we have P ( Y |X=x , M=0 ) = P ( Y |X=x ) , and thus E [ ŷ ] = E [ y|θ̂ ] = ∑ ( x , y ) ∈DL y · P ( y|x ) = ∑ ( x , y ) ∈D y · P ( y|x , M = 0 ) = ∑ ( x , y ) ∈D y · P ( y|x ) = E [ y ] , ( 2 ) which indicates that the model is an ideally unbiased estimator , and the imputed labels are unbiased . However , such MCAR assumption is too strong and impractical . For example , annotators may tend to tag a specific group of samples due to their preferences or experiences . This motivates us to ask the following realistic but overlooked question : what if M is dependent with Y , i.e. , the labels are missing not at random ( MNAR ) ? In this case , we have P ( Y |X = x , M = 0 ) ̸= P ( Y |X = x ) , and thus E [ ŷ ] = ∑ ( x , y ) ∈D y · P ( y|x , M = 0 ) = ∑ ( x , y ) ∈D y · P ( y|x ) · P ( M = 0|x , y ) P ( M = 0|x ) ̸= ∑ ( x , y ) ∈D y · P ( y|x ) = E [ y ] . ( 3 ) We can see it is no longer unbiased , further leading to biased imputed labels . As a result , the bias will be increasingly enhanced with the joint optimization loop in Eq . ( 1 ) moving forward . This analysis indicates that previous SSL methods are not applicable for the MNAR problem as they overlook the role of “ class ” Y in causing the non-randomness of M . In the following , we will introduce our Class-Aware Doubly Robust framework that targets at an unbiased estimator . | This paper formulates the problem of semi-supervised learning where the likelihood of an example being labeled is dependent on the class of the example. Given this assumption, the authors propose an approach to mitigate the resulting distribution shifts that occur in both the labeled and unlabeled data sets. Finally, experimental results are shown for the class-dependent labeling scenario, with the proposed algorithm outperforming standard SSL approaches that assume random labeling probability. | SP:972dccb2298d25af79062f3fb749519b42bc2d56 |
On Non-Random Missing Labels in Semi-Supervised Learning | 1 INTRODUCTION . Semi-supervised learning ( SSL ) aims to alleviate the strong demand for large-scale labeled data by leveraging unlabeled data ( Zhu , 2008 ; Yang et al. , 2021 ) . Prevailing SSL methods first train a model using the labeled data , then uses the model to impute the missing labels with the predicted pseudolabels for the unlabeled data ( Van Buuren , 2018 ) , and finally combine the true- and pseudo-labels to further improve the model ( Sohn et al. , 2020 ; Berthelot et al. , 2019a ) . Ideally , the “ improve ” is theoretically guaranteed if the missing label imputation is perfect ( Grandvalet & Bengio , 2005 ) ; otherwise , imperfect imputation causes the well-known confirmation bias ( Arazo et al. , 2019 ; Sohn et al. , 2020 ) . In particular , the bias is even more severe in practice because the underlying assumption that the labeled and unlabeled data are drawn from the same distribution does not hold . We term this scenario as label Missing Not At Random ( MNAR ) ( Hernán & Robins , 2020 ) , as compared to the naı̈ve assumption called label Missing Completely At Random ( MCAR ) . MNAR is inevitable in real-world SSL due to the limited label annotation budget ( Rosset et al. , 2005 ) —uniform label annotations that keep MCAR are expensive . For example , we usually deploy low-cost data collecting methods like crawling social media images from the Web ( Mahajan et al. , 2018 ) . However , the high-quality labels appear to be severely imbalanced over classes due to the imbalanced human preferences for the “ class ” ( Misra et al. , 2016 ; Colléony et al. , 2017 ) . For example , people are more willing to tag a “ Chihuahua ” rather than a “ leatherback ” ( a huge black turtle ) since the former is more lovely and easier to recognize . Thus , the imputation model trained by such biased supervision makes the model favoring “ Chihuahua ” rather than “ leatherback ” . The “ Chihuahua ” -favored pseudo-labels , in turn , negatively reinforce the model confidence in the false “ Chihuahua ” belief and thus exacerbate the confirmation bias . We design an experiment on CIFAR-10 to further illustrate how existing state-of-the-art SSL methods , e.g. , FixMatch ( Sohn et al. , 2020 ) , fail in the MNAR scenario . As shown in Figure 1 ( a ) , the overall training data is uniformly distributed over classes , but the labeled data is long-tailed distributed , which simulates the imbalanced class popularity . Trained on such MNAR training data , FixMatch even magnifies the bias towards the popular classes and ignores the rare classes ( Fig- ure 1 ( b ) ) . We point out that the devil is in the imputation . As shown in Figure 1 ( c ) , the confidence scores of FixMatch for popular classes are much higher than those for rare classes ( i.e. , averagely > 0.95 vs. < 0.05 ) . Since FixMatch adopts a fixed threshold for the imputation samples selection , i.e. , only the samples with confidence larger than 0.95 are imputed , FixMatch tends to impute the labels of more samples from the popular classes , which still keeps the updated labels with the newly added pseudo-labels long-tailed . As a result , FixMatch is easily trapped in MNAR . In fact , MNAR has attracted broad attention in statistics and Inverse Propensity Weighting ( IPW ) is one of the commonly used tools to tackle this challenge ( Seaman & White , 2013 ; Jones et al. , 2006 ) . IPW introduces a weight for each training sample via its propensity score , which reflects how likely the label is observed ( e.g. , its popularity ) . In this way , IPW makes up a pseudo-balanced dataset by duplicating each labeled data inversely proportional to its propensity—less popular samples should draw the same attention as the popular ones—a more balanced imputation . To combine the IPW true labels and imputed missing labels , a Doubly Robust ( DR ) estimator is used to guarantee a robust SSL model if either IPW or imputation is unbiased ( Seaman & Vansteelandt , 2018 ; Vansteelandt et al. , 2010 ) . However , the above framework overlooks the role of “ class ” in causing the MNAR problem of SSL ( Section 3 ) , and we therefore propose a unified Class-Aware Doubly Robust ( CADR ) framework to address this challenge ( Section 4 ) . CADR removes the bias from both the supervised model training and the unlabeled data imputation ends . For the former end , we propose Class-Aware Propensity ( CAP ) that exploits the unlabeled data to train an improved classifier using the biased labeled data ( Section 4.1 ) . We use an efficient moving averaging strategy to estimate the propensity . For the latter end , we design Class-Aware Imputation ( CAI ) that dynamically adjusts the pseudolabel assignment threshold with class-specific confidence scores to mitigate the bias in imputation ( Section 4.2 ) . Intuitively , CAI lowers the threshold requirement of rare class samples to balance with frequent class samples . Experiments on several image classification benchmarks demonstrate that our CADR framework achieves a consistent performance boost and can effectively tackle the MNAR problem . Besides , as MCAR is a special case of MNAR , our method maintains the competitive performance in the conventional SSL setting . The key contributions of this work are summarized as follows : • We propose a realistic and challenging label Missing Not At Random ( MNAR ) problem for semisupervised learning , which is not extensively studied in previous work . We systematically analyze the bias caused by non-random missing labels . • We proposes a unified doubly robust framework called Class-Aware Doubly Robust ( CADR ) estimator to remove the bias from both the supervised model training end—by using Class-Aware Prospesity ( CAP ) , and the unlabeled data imputation end—by using Class-Aware Imputation ( CAI ) . • Our proposed CADR achieves competitive performances in both MNAR and conventional label Missing Completely At Random ( MCAR ) . 2 RELATED WORKS . Missing Not At Random . Missing data problems are ubiquitous across the analysis in social , behavioral , and medical sciences ( Enders , 2010 ; Heckman , 1977 ) . When data is not missing at random , estimations based on the observed data only results in bias ( Heckman , 1977 ) . The solutions are three-fold : 1 ) Inverse probability weighting ( IPW ) assigns weights to each observed datum based on the propensity score , i.e. , the probability of being observed . A missing mechanism-based model is used to estimate the sample propensity , such as a logistic regression model ( Rosset et al. , 2005 ; Wang et al. , 1997 ) or a robit regression model ( Kang & Schafer , 2007 ; Liu , 2005 ) . 2 ) Imputation methods aim to fill in the missing values to produce a complete dataset ( Kenward & Carpenter , 2007 ; Little & Rubin , 2014 ) . An imputation model is regressed to predict the incomplete data from the observed data in a deterministic ( Kovar & Whitridge. , 1995 ) or stochastic ( Lo et al. , 2019 ) way . 3 ) As the propensity estimation or the regressed imputation are easy to be biased , doubly robust estimators propose to integrate IPW and imputation with double robustness ( Seaman & Vansteelandt , 2018 ; Vansteelandt et al. , 2010 ; Jonsson Funk et al. , 2011 ) : the capability to maintain unbiased when either the propensity or imputation model is biased . In this work , as the image labels are missing not at random , we design the class-aware propensity and imputation considering the causal role of label classes in missing , avoiding the uncertain model specification and generating unbiased estimation . These two class-aware modules can be naturally integrated into a doubly robust estimator . Semi-Supervised Learning ( SSL ) . It aims to exploit unlabeled data to improve the model learned on labeled data . Prevailing SSL methods ( Sohn et al. , 2020 ; Berthelot et al. , 2019b ; a ) share a similar strategy : training a model with the labeled data and generating pseudo-labels for unlabeled data based on the model predictions . Pseudo-labeling methods ( Lee , 2013 ; Xie et al. , 2020 ; Rizve et al. , 2021 ) predict pseudo-labels for unlabeled data and add them to the training data for re-training . Consistency-regularization methods ( Sajjadi et al. , 2016 ; Laine & Aila , 2016 ; Berthelot et al. , 2019b ) apply a random perturbation to an unlabeled image and then use the prediction as the pseudo-label of the same image under a different augmentation . Recent state-of-the-art SSL methods ( Sohn et al. , 2020 ; Berthelot et al. , 2019a ) combine the two existing techniques and predict improved pseudolabels . However , when labels are missing at random , these methods can be inefficient as the model learned on labeled data is biased and significantly harms the quality of pseudo labels . Though some works also notice the model bias ( Wei et al. , 2021 ; Kim et al. , 2020 ) , they neglect the causal relationship between the bias and the missing label mechanism in SSL , which is systematically discussed in our work . 3 MISSING LABELS IN SEMI-SUPERVISED LEARNING . In semi-supervised learning ( SSL ) , the training dataset D is divided into two disjoint sets : a labeled dataset DL and an unlabeled data DU . We denote DL as { ( x ( i ) , y ( i ) ) } NLi=1 ( usually NL≪N ) where x ( i ) ∈ Rd is a sample feature and y ( i ) ∈ { 0 , 1 } C is its one-hot label over C classes , and DU as { ( x ( i ) ) } Ni=NL+1 where the remaining N−NL labels are missing in DU . We further review SSL as a label missing problem , and define a label missing indicator set M with m ( i ) ∈ { 0 , 1 } , where m ( i ) =1 denotes the label is missing ( i.e. , unlabeled ) and m ( i ) =0 denotes the label is not missing ( i.e. , labeled ) . In this way , we can rewrite the dataset as D= ( X , Y , M ) = { ( x ( i ) , y ( i ) , m ( i ) ) } Ni=1 . Traditional SSL methods assume that M is independent with Y , i.e. , the labels are Missing Completely At Random ( MCAR ) . Under this assumption , prevailing SSL algorithms can be summarized as the following multi-task optimization of the supervised learning and the unlabeled imputation : θ̂ = argmin θ ∑ ( x , y ) ∈DL Ls ( x , y ; θ ) + ∑ x∈DU Lu ( x ; θ ) , ( 1 ) where Ls and Lu are the loss function designed separately for supervised learning on labeled data ( M =0 ) and regression imputation on unlabeled data ( M =1 ) . In general , SSL methods first train a model with parameters θ̂ using Ls on DL , then impute the missing labels ( Van Buuren , 2018 ) by predicting the pseudo-labels ŷ = f ( x ; θ̂ ) , and finally combine the true- and pseudo-labels to further improve the model for another SSL loop , e.g. , another optimization iteration of Eq . ( 1 ) . The implementation of Ls and Lu are open . For example , Ls is normally the standard cross-entropy loss , and Lu can be implemented as squared L2 loss ( Berthelot et al. , 2019b ) or cross-entropy loss ( Berthelot et al. , 2019a ; Sohn et al. , 2020 ) . As you may expect , the key to stable SSL methods is the unbiasedness of the imputation model . When M is independent with Y , we have P ( Y |X=x , M=0 ) = P ( Y |X=x ) , and thus E [ ŷ ] = E [ y|θ̂ ] = ∑ ( x , y ) ∈DL y · P ( y|x ) = ∑ ( x , y ) ∈D y · P ( y|x , M = 0 ) = ∑ ( x , y ) ∈D y · P ( y|x ) = E [ y ] , ( 2 ) which indicates that the model is an ideally unbiased estimator , and the imputed labels are unbiased . However , such MCAR assumption is too strong and impractical . For example , annotators may tend to tag a specific group of samples due to their preferences or experiences . This motivates us to ask the following realistic but overlooked question : what if M is dependent with Y , i.e. , the labels are missing not at random ( MNAR ) ? In this case , we have P ( Y |X = x , M = 0 ) ̸= P ( Y |X = x ) , and thus E [ ŷ ] = ∑ ( x , y ) ∈D y · P ( y|x , M = 0 ) = ∑ ( x , y ) ∈D y · P ( y|x ) · P ( M = 0|x , y ) P ( M = 0|x ) ̸= ∑ ( x , y ) ∈D y · P ( y|x ) = E [ y ] . ( 3 ) We can see it is no longer unbiased , further leading to biased imputed labels . As a result , the bias will be increasingly enhanced with the joint optimization loop in Eq . ( 1 ) moving forward . This analysis indicates that previous SSL methods are not applicable for the MNAR problem as they overlook the role of “ class ” Y in causing the non-randomness of M . In the following , we will introduce our Class-Aware Doubly Robust framework that targets at an unbiased estimator . | This work proposes a semi-supervised learning algorithm with systematic label missing, aka Missing Not At Random. The proposed solution is composed of two steps. First, to learn the classifier with the labelled data instances, a learnable weight, named propensity score, is proposed and attached to each labelled data instance to deliver an unbiased estimate (see Eq.10). Second, a class-wise threshold is tuned according to the class-specific propensity score (see Eq.11). The results show better semi-supervised classification accuracy compared to other baselines in the MNAR scenario. | SP:972dccb2298d25af79062f3fb749519b42bc2d56 |
L2BGAN: An image enhancement model for image quality improvement and image analysis tasks without paired supervision | 1 INTRODUCTION . Image enhancement is a prerequisite for many computer vision based image understanding tasks . In particular , it is very crucial to enhance low light or dark images to obtain images which not only have better image aesthetic quality but can also be suitably processed for object detection and face detection tasks . The task by itself is one of the earliest studied domains in computer vision , but the continuous evolution of computational resources and deep learning architectures has generated a paradigm shift towards the latter approach . A thorough literature review shows three main ways in which the problem is approached : histogram equalization ( Ibrahim & Pik Kong , 2007 ; Nakai et al. , 2013 ) , Retinex-based Guo et al . ( 2017 ) ; Wang et al . ( 2016 ) ; Fu et al . ( 2016 ) , and machine learning based ( Lv et al. , 2018 ; Wang et al. , 2019 ; Jiang et al. , 2021 ; Guo et al. , 2020 ) . The primary challenge while dealing with low light image enhancement tasks is that there are many noise sources in the acquisition of poorly lit scenes . These include readout , photon shot , dark current , and fixed pattern noises , in addition to photon response non-uniformities . The noise level increases while treating lightness and contrast of low light images , more so in case of compressed-dynamics images . Applying a denoising filter prior to light enhancement will result in blurring , while the reverse causes noise amplification as seen in Fig . 1 . Hence , dealing with denoising and low-light enhancement problems simultaneously using a learning based approach seems to be the optimal choice . The success of deep learning enhancement models depend on the availability of large scale anno- tated data . For the present problem , there is a requirement of paired images such that the low-light image serves as input while its brighter counterpart serves as the target image . The Adobe 5k dataset ( Vladimir et al. , 2011 ) serves as a benchmark used by many researchers for this task . This dataset provides an original low light image , retouched by five different photographic experts , one of which is used as the target of supervised training . Some researchers have also used a synthetic paired set for the same by intentionally transforming a bright image to generate its dark counterpart . This transformation being global , its suitability for challenging real time images is arguable . Ideally , a training procedure without the requirement of paired supervision is the most appropriate solution . Very few works have been reported on low light image enhancement using unpaired images ( Jiang et al. , 2021 ; Ni et al. , 2020 ) . Moreover , even though image to image style translation without paired supervision is a popular approach Anoosheh et al . ( 2019 ) ; Fu et al . ( 2019 ) ; Zhu et al . ( 2017b ) , not many have considered the mapping of low light images to bright light images as a style transfer problem . In this work , we consider the low light image enhancement task as an image style transfer problem . We train a deep neural architecture using unsupervised image pairs . This promotes the use of available real time dark and bright images without the need of pairwise annotations or synthetic treatment . We resort to GANS for training using two encoders and two decoders . We use three discriminators to learn color , texture , and edges separately . The unsupervised image to image translation problem is challenging as it aims to recover a joint probability given a marginal probability . For this purpose , one of the most common approaches is to add a cycle consistency constraint along with the adversarial losses . This bijective constraint becomes restrictive in cases as the task at hand , where the low light image domain may contain less information compared to its bright counterpart . To handle this situation we use a geometric consistency constraint which ensures that an image from one domain and its geometric transformed version generate the same image in the other domain . Additionally , a contextual loss constraint ensures that the context and semantics of the images are preserved . This paper has the following main contributions : ( i ) it poses the low to bright light enhancement problem as an unpaired image translation problem ; ( ii ) it uses a geometric and an illumination consistency constraint in the images ; ( iii ) it uses a contextual loss to measure semantic similarity ; ( iv ) it uses multiscale color , texture and edge discriminators per domain ; ( v ) it demonstrates the effectiveness of the approach for image understanding tasks . While none of such items are individually novel , exploiting their ensemble effect in this task is indeed a significant novel contribution . Our paper is organized in the following manner . We provide a related background of the task in Sec . 2 . The proposed technique is discussed in details in Sec . 3 . Experimental results and conclusion is provided in Secs . 4 and 5 respectively . 2 RELATED BACKGROUND . Histogram based enhancement aims to improve the image quality by modifying the image histogram . This can result in overstretched contrast which lacks in naturalness . Using this framework different techniques have been developed . BPDHE ( Ibrahim & Pik Kong , 2007 ) uses an HE on a dynamic range expanded version of sub-histograms obtained by the local maxima of the input image histogram . FHSABP ( Wang et al. , 2008 ) solves a convex optimization problem to obtain the flattest target histogram with the brightness preservation constraint . Due to their brightness preservation , ( Ibrahim & Pik Kong , 2007 ) and ( Wang et al. , 2008 ) are not suitable to tackle the low light image enhancement , but prevent overstretching . Morover , ( Ibrahim & Pik Kong , 2007 ) and ( Wang et al. , 2008 ) do not consider relationships between adjacent pixels , whereas methods such as HMF ( Arici et al. , 2009 ) , CEBGA ( Hashemi et al. , 2009 ) and DHECI ( Nakai et al. , 2013 ) do . In HMF ( Arici et al. , 2009 ) the target histogram is obtained via a parametric optimization problem , involving the local variance of pixels . In CEBGA ( Hashemi et al. , 2009 ) a genetic algorithm is adopted to enhance the contrast of the images modifying the histogram , using as a fitness function the number of edges in the enhanced image . DHECI ( Nakai et al. , 2013 ) performs a histogram equalization on the differential intensity histogram and the differential saturation histogram from the HSI color space . More advanced techniques which embed contextual information are CVC ( Celik & Tjahjadi , 2011 ) and LDR ( Lee et al. , 2013 ) , which use 2D histograms . Retinex based methods use the assumption that an image can be pixel-wise decomposed into reflectance and illumination . In ( Li et al. , 2011 ) a classic approach is proposed , where the lightness is first decomposed in reflex lightness and ambient illumination . Reflectance is then extracted from reflex lightness , while the ambient illumination is log-transformed and used for the output image . A widely used framework for the Retinex based enhancement methods is the fusion based framework , as in FEMWII Fu et al . ( 2016 ) and FMSBIE Wang et al . ( 2016 ) . Both estimate the illumination using the pixel-wise maximum in the RGB color space , which is used to obtain the reflectance . Three different modified illuminations are then obtained through different techniques to improve bright- ness and contrast . These illumination maps are then fused with a multiscale approach . Multiscale techniques are also used to extract reflectance ( Liu et al. , 2016 ) Another approach for the illumination estimation is proposed in LIME ( Guo et al. , 2017 ) , where an optimization problem is used to obtain a smooth , structure-preserving illumination map , which is then enhanced through a gamma correction . As the noise is critical in poorly illuminated images in ( Guo et al. , 2017 ) a denoising techinque is also proposed : the output reflectance is the linear combination of the original one and a BM3D-filtered one , using the illumination as the weight to prevent the oversmoothing of bright areas . In ( Li et al. , 2011 ) , Fu et al . ( 2016 ) , Wang et al . ( 2016 ) , ( Liu et al. , 2016 ) , and ( Guo et al. , 2017 ) reflectance is obtained by the estimated illumination . More advanced techniques , such as SRIE Fu et al . ( 2016 ) and JIEPMR Cai et al . ( 2017 ) , jointly decompose reflectance and illumination . While the Retinex theory has proved to be suited for low light image enhancement , this approach suffers from color distortion and hand-crafted illumination manipulation . Learning based methods can overcome these problems , while also providing better denoising , which is crucial in low light images . Data learning methods include a variety of methods from deep learning , such as autoencoders , Deep CNNs and GANs , all of which have proved to be suitable techniques to enhance image quality and brightness . In LLNet ( Lore et al. , 2017 ) , GLADNet ( Wang et al. , 2018 ) and LLED-Net ( Li et al. , 2020 ) , denoising autoencoders are used . Despite the good results , the simplicity of these methods limits their capability compared to more complex learning methods . In ( Ren et al. , 2019 ) multiple autoencoders are used to work separately on the content and on the edges of the image while also using CNN , RNN and a more advanced loss function , including a discriminator and a VGG-16 net . An autoencoder is also used for DeepUPE ( Wang et al. , 2019 ) to learn a image-to-illumination mapping used for a Retinex-fashioned enhancing , while considering reconstruction loss , color loss and smoothness of the illuminance . In ( Jiang & Zheng , 2019 ) , an end-to-end U-Net is used , with a 3D convolution in order to deal with videos , preventing flickering in consecutive frames , and using the GRBG components from the camera sensor as an input . In MBLLEN ( Lv et al. , 2018 ) , a CNN is applied to the input image . Then , the output of each layer is fed to independent autoencoders . The obtained output image is a weighted sum with learnable weights of the autoencoders output . Considering strutural , contextual and regional loss for the training . While autoencoders and U-Net are convenient for image-to-image nets , methods such as Tao et al . ( 2017 ) and ( Ignatov et al. , 2017 ) use only deep neural networks . In particular , these use residual convolutional neural networks to mitigate the vanishing gradient problem in deep networks . In ( Ignatov et al. , 2017 ) , the CNN enhances images from low-end devices to professional DSLR quality , using a dataset with multiple acquisition of the same scene from different devices for the training , which is difficult to obtain . Tao et al . ( 2017 ) uses special-designed residual CNN modules to create a deep CNN , but is then trained using only the SSIM . Apart from ( Wang et al. , 2019 ) , also RetinexNet ( Wei et al. , 2018 ) and Kind++ ( Zhang et al. , 2021 ) augment the Retinex theory , outperforming classic Retinex based methods . Both ( Wei et al. , 2018 ) and ( Zhang et al. , 2021 ) use a CNN to decompose the reflectance and illumination components . In both cases , denoising take advantage of the illumination map , as in ( Guo et al. , 2017 ) , to improve the result over plain denoising . In ( Wei et al. , 2018 ) , the BM3D is used for denoising whereas in ( Zhang et al. , 2021 ) a specific CNN with multi-scale illumination consideration is proposed . For illumination adjustment ( Wei et al. , 2018 ) uses an encoder decoder structure while ( Zhang et al. , 2021 ) adopt a CNN with a free parameter to modify the adjustment ratio . A common critical aspect about the methods considered above is data availability . Since these methods are supervised , they require paired low/normal light images of the same scene . A widely used way to obtain them is to artificially darken normal light images , but this impacts the naturalness of the results . Recently , methods such as ( Wei et al. , 2018 ) and ( Zhang et al. , 2021 ) used datasets with images of the same scenes with different exposures . This proved to be effective , but such datasets are scarce and tedious to create . To overcome the data availability issue , several unsupervised and unpaired supervised methods have been developed . ZDCE ( Guo et al. , 2020 ) is an unsupervised low-light image enhancer which uses a CNN to obtain pixel-wise enhancement curves to adjust the input image , using non-reference loss functions for the training . EGAN ( Jiang et al. , 2021 ) and UEGAN ( Ni et al. , 2020 ) use a GAN to obtain a light enhancement without paired supervision , using a decoder-encoder for the generation . In ( Jiang et al. , 2021 ) a local and a global discriminator are used while in ( Ni et al. , 2020 ) only one multi-scale discriminator is used . The promising results of ( Jiang et al. , 2021 ) and ( Ni et al. , 2020 ) , together with the availability of unpaired low/normal light images , makes GANs an appealing approach for low light image enhancement techniques . Our contribution is similar to EGAN and UEGAN as it uses a GAN architecture with unpaired supervision . Different from these , we do not use a global attention . We rather use separate discriminators for color , texture and edge . Further we make use of cycle consistency , geometric and illumination consistency with contextual loss instead of perceptual losses . | The authors propose a new image enhancement specific for low light images. They exploit the concepts of geometric and lighting consistency together with a contextual loss criterion. Extensive experiments are performed on benchmark datasets to compare their results both visually and objectively. | SP:1096a739cad46656d225fef19aa91af3a6553927 |
L2BGAN: An image enhancement model for image quality improvement and image analysis tasks without paired supervision | 1 INTRODUCTION . Image enhancement is a prerequisite for many computer vision based image understanding tasks . In particular , it is very crucial to enhance low light or dark images to obtain images which not only have better image aesthetic quality but can also be suitably processed for object detection and face detection tasks . The task by itself is one of the earliest studied domains in computer vision , but the continuous evolution of computational resources and deep learning architectures has generated a paradigm shift towards the latter approach . A thorough literature review shows three main ways in which the problem is approached : histogram equalization ( Ibrahim & Pik Kong , 2007 ; Nakai et al. , 2013 ) , Retinex-based Guo et al . ( 2017 ) ; Wang et al . ( 2016 ) ; Fu et al . ( 2016 ) , and machine learning based ( Lv et al. , 2018 ; Wang et al. , 2019 ; Jiang et al. , 2021 ; Guo et al. , 2020 ) . The primary challenge while dealing with low light image enhancement tasks is that there are many noise sources in the acquisition of poorly lit scenes . These include readout , photon shot , dark current , and fixed pattern noises , in addition to photon response non-uniformities . The noise level increases while treating lightness and contrast of low light images , more so in case of compressed-dynamics images . Applying a denoising filter prior to light enhancement will result in blurring , while the reverse causes noise amplification as seen in Fig . 1 . Hence , dealing with denoising and low-light enhancement problems simultaneously using a learning based approach seems to be the optimal choice . The success of deep learning enhancement models depend on the availability of large scale anno- tated data . For the present problem , there is a requirement of paired images such that the low-light image serves as input while its brighter counterpart serves as the target image . The Adobe 5k dataset ( Vladimir et al. , 2011 ) serves as a benchmark used by many researchers for this task . This dataset provides an original low light image , retouched by five different photographic experts , one of which is used as the target of supervised training . Some researchers have also used a synthetic paired set for the same by intentionally transforming a bright image to generate its dark counterpart . This transformation being global , its suitability for challenging real time images is arguable . Ideally , a training procedure without the requirement of paired supervision is the most appropriate solution . Very few works have been reported on low light image enhancement using unpaired images ( Jiang et al. , 2021 ; Ni et al. , 2020 ) . Moreover , even though image to image style translation without paired supervision is a popular approach Anoosheh et al . ( 2019 ) ; Fu et al . ( 2019 ) ; Zhu et al . ( 2017b ) , not many have considered the mapping of low light images to bright light images as a style transfer problem . In this work , we consider the low light image enhancement task as an image style transfer problem . We train a deep neural architecture using unsupervised image pairs . This promotes the use of available real time dark and bright images without the need of pairwise annotations or synthetic treatment . We resort to GANS for training using two encoders and two decoders . We use three discriminators to learn color , texture , and edges separately . The unsupervised image to image translation problem is challenging as it aims to recover a joint probability given a marginal probability . For this purpose , one of the most common approaches is to add a cycle consistency constraint along with the adversarial losses . This bijective constraint becomes restrictive in cases as the task at hand , where the low light image domain may contain less information compared to its bright counterpart . To handle this situation we use a geometric consistency constraint which ensures that an image from one domain and its geometric transformed version generate the same image in the other domain . Additionally , a contextual loss constraint ensures that the context and semantics of the images are preserved . This paper has the following main contributions : ( i ) it poses the low to bright light enhancement problem as an unpaired image translation problem ; ( ii ) it uses a geometric and an illumination consistency constraint in the images ; ( iii ) it uses a contextual loss to measure semantic similarity ; ( iv ) it uses multiscale color , texture and edge discriminators per domain ; ( v ) it demonstrates the effectiveness of the approach for image understanding tasks . While none of such items are individually novel , exploiting their ensemble effect in this task is indeed a significant novel contribution . Our paper is organized in the following manner . We provide a related background of the task in Sec . 2 . The proposed technique is discussed in details in Sec . 3 . Experimental results and conclusion is provided in Secs . 4 and 5 respectively . 2 RELATED BACKGROUND . Histogram based enhancement aims to improve the image quality by modifying the image histogram . This can result in overstretched contrast which lacks in naturalness . Using this framework different techniques have been developed . BPDHE ( Ibrahim & Pik Kong , 2007 ) uses an HE on a dynamic range expanded version of sub-histograms obtained by the local maxima of the input image histogram . FHSABP ( Wang et al. , 2008 ) solves a convex optimization problem to obtain the flattest target histogram with the brightness preservation constraint . Due to their brightness preservation , ( Ibrahim & Pik Kong , 2007 ) and ( Wang et al. , 2008 ) are not suitable to tackle the low light image enhancement , but prevent overstretching . Morover , ( Ibrahim & Pik Kong , 2007 ) and ( Wang et al. , 2008 ) do not consider relationships between adjacent pixels , whereas methods such as HMF ( Arici et al. , 2009 ) , CEBGA ( Hashemi et al. , 2009 ) and DHECI ( Nakai et al. , 2013 ) do . In HMF ( Arici et al. , 2009 ) the target histogram is obtained via a parametric optimization problem , involving the local variance of pixels . In CEBGA ( Hashemi et al. , 2009 ) a genetic algorithm is adopted to enhance the contrast of the images modifying the histogram , using as a fitness function the number of edges in the enhanced image . DHECI ( Nakai et al. , 2013 ) performs a histogram equalization on the differential intensity histogram and the differential saturation histogram from the HSI color space . More advanced techniques which embed contextual information are CVC ( Celik & Tjahjadi , 2011 ) and LDR ( Lee et al. , 2013 ) , which use 2D histograms . Retinex based methods use the assumption that an image can be pixel-wise decomposed into reflectance and illumination . In ( Li et al. , 2011 ) a classic approach is proposed , where the lightness is first decomposed in reflex lightness and ambient illumination . Reflectance is then extracted from reflex lightness , while the ambient illumination is log-transformed and used for the output image . A widely used framework for the Retinex based enhancement methods is the fusion based framework , as in FEMWII Fu et al . ( 2016 ) and FMSBIE Wang et al . ( 2016 ) . Both estimate the illumination using the pixel-wise maximum in the RGB color space , which is used to obtain the reflectance . Three different modified illuminations are then obtained through different techniques to improve bright- ness and contrast . These illumination maps are then fused with a multiscale approach . Multiscale techniques are also used to extract reflectance ( Liu et al. , 2016 ) Another approach for the illumination estimation is proposed in LIME ( Guo et al. , 2017 ) , where an optimization problem is used to obtain a smooth , structure-preserving illumination map , which is then enhanced through a gamma correction . As the noise is critical in poorly illuminated images in ( Guo et al. , 2017 ) a denoising techinque is also proposed : the output reflectance is the linear combination of the original one and a BM3D-filtered one , using the illumination as the weight to prevent the oversmoothing of bright areas . In ( Li et al. , 2011 ) , Fu et al . ( 2016 ) , Wang et al . ( 2016 ) , ( Liu et al. , 2016 ) , and ( Guo et al. , 2017 ) reflectance is obtained by the estimated illumination . More advanced techniques , such as SRIE Fu et al . ( 2016 ) and JIEPMR Cai et al . ( 2017 ) , jointly decompose reflectance and illumination . While the Retinex theory has proved to be suited for low light image enhancement , this approach suffers from color distortion and hand-crafted illumination manipulation . Learning based methods can overcome these problems , while also providing better denoising , which is crucial in low light images . Data learning methods include a variety of methods from deep learning , such as autoencoders , Deep CNNs and GANs , all of which have proved to be suitable techniques to enhance image quality and brightness . In LLNet ( Lore et al. , 2017 ) , GLADNet ( Wang et al. , 2018 ) and LLED-Net ( Li et al. , 2020 ) , denoising autoencoders are used . Despite the good results , the simplicity of these methods limits their capability compared to more complex learning methods . In ( Ren et al. , 2019 ) multiple autoencoders are used to work separately on the content and on the edges of the image while also using CNN , RNN and a more advanced loss function , including a discriminator and a VGG-16 net . An autoencoder is also used for DeepUPE ( Wang et al. , 2019 ) to learn a image-to-illumination mapping used for a Retinex-fashioned enhancing , while considering reconstruction loss , color loss and smoothness of the illuminance . In ( Jiang & Zheng , 2019 ) , an end-to-end U-Net is used , with a 3D convolution in order to deal with videos , preventing flickering in consecutive frames , and using the GRBG components from the camera sensor as an input . In MBLLEN ( Lv et al. , 2018 ) , a CNN is applied to the input image . Then , the output of each layer is fed to independent autoencoders . The obtained output image is a weighted sum with learnable weights of the autoencoders output . Considering strutural , contextual and regional loss for the training . While autoencoders and U-Net are convenient for image-to-image nets , methods such as Tao et al . ( 2017 ) and ( Ignatov et al. , 2017 ) use only deep neural networks . In particular , these use residual convolutional neural networks to mitigate the vanishing gradient problem in deep networks . In ( Ignatov et al. , 2017 ) , the CNN enhances images from low-end devices to professional DSLR quality , using a dataset with multiple acquisition of the same scene from different devices for the training , which is difficult to obtain . Tao et al . ( 2017 ) uses special-designed residual CNN modules to create a deep CNN , but is then trained using only the SSIM . Apart from ( Wang et al. , 2019 ) , also RetinexNet ( Wei et al. , 2018 ) and Kind++ ( Zhang et al. , 2021 ) augment the Retinex theory , outperforming classic Retinex based methods . Both ( Wei et al. , 2018 ) and ( Zhang et al. , 2021 ) use a CNN to decompose the reflectance and illumination components . In both cases , denoising take advantage of the illumination map , as in ( Guo et al. , 2017 ) , to improve the result over plain denoising . In ( Wei et al. , 2018 ) , the BM3D is used for denoising whereas in ( Zhang et al. , 2021 ) a specific CNN with multi-scale illumination consideration is proposed . For illumination adjustment ( Wei et al. , 2018 ) uses an encoder decoder structure while ( Zhang et al. , 2021 ) adopt a CNN with a free parameter to modify the adjustment ratio . A common critical aspect about the methods considered above is data availability . Since these methods are supervised , they require paired low/normal light images of the same scene . A widely used way to obtain them is to artificially darken normal light images , but this impacts the naturalness of the results . Recently , methods such as ( Wei et al. , 2018 ) and ( Zhang et al. , 2021 ) used datasets with images of the same scenes with different exposures . This proved to be effective , but such datasets are scarce and tedious to create . To overcome the data availability issue , several unsupervised and unpaired supervised methods have been developed . ZDCE ( Guo et al. , 2020 ) is an unsupervised low-light image enhancer which uses a CNN to obtain pixel-wise enhancement curves to adjust the input image , using non-reference loss functions for the training . EGAN ( Jiang et al. , 2021 ) and UEGAN ( Ni et al. , 2020 ) use a GAN to obtain a light enhancement without paired supervision , using a decoder-encoder for the generation . In ( Jiang et al. , 2021 ) a local and a global discriminator are used while in ( Ni et al. , 2020 ) only one multi-scale discriminator is used . The promising results of ( Jiang et al. , 2021 ) and ( Ni et al. , 2020 ) , together with the availability of unpaired low/normal light images , makes GANs an appealing approach for low light image enhancement techniques . Our contribution is similar to EGAN and UEGAN as it uses a GAN architecture with unpaired supervision . Different from these , we do not use a global attention . We rather use separate discriminators for color , texture and edge . Further we make use of cycle consistency , geometric and illumination consistency with contextual loss instead of perceptual losses . | This paper proposes an image enhancement method using an unpaired-GAN based translation network (cycleGAN). It combines geometric, lighting consistency, and a contextual loss criterion. The geometric consistency is basically 90 rotations of the input image, while lighting consistency is basically gamma transformation. | SP:1096a739cad46656d225fef19aa91af3a6553927 |
L2BGAN: An image enhancement model for image quality improvement and image analysis tasks without paired supervision | 1 INTRODUCTION . Image enhancement is a prerequisite for many computer vision based image understanding tasks . In particular , it is very crucial to enhance low light or dark images to obtain images which not only have better image aesthetic quality but can also be suitably processed for object detection and face detection tasks . The task by itself is one of the earliest studied domains in computer vision , but the continuous evolution of computational resources and deep learning architectures has generated a paradigm shift towards the latter approach . A thorough literature review shows three main ways in which the problem is approached : histogram equalization ( Ibrahim & Pik Kong , 2007 ; Nakai et al. , 2013 ) , Retinex-based Guo et al . ( 2017 ) ; Wang et al . ( 2016 ) ; Fu et al . ( 2016 ) , and machine learning based ( Lv et al. , 2018 ; Wang et al. , 2019 ; Jiang et al. , 2021 ; Guo et al. , 2020 ) . The primary challenge while dealing with low light image enhancement tasks is that there are many noise sources in the acquisition of poorly lit scenes . These include readout , photon shot , dark current , and fixed pattern noises , in addition to photon response non-uniformities . The noise level increases while treating lightness and contrast of low light images , more so in case of compressed-dynamics images . Applying a denoising filter prior to light enhancement will result in blurring , while the reverse causes noise amplification as seen in Fig . 1 . Hence , dealing with denoising and low-light enhancement problems simultaneously using a learning based approach seems to be the optimal choice . The success of deep learning enhancement models depend on the availability of large scale anno- tated data . For the present problem , there is a requirement of paired images such that the low-light image serves as input while its brighter counterpart serves as the target image . The Adobe 5k dataset ( Vladimir et al. , 2011 ) serves as a benchmark used by many researchers for this task . This dataset provides an original low light image , retouched by five different photographic experts , one of which is used as the target of supervised training . Some researchers have also used a synthetic paired set for the same by intentionally transforming a bright image to generate its dark counterpart . This transformation being global , its suitability for challenging real time images is arguable . Ideally , a training procedure without the requirement of paired supervision is the most appropriate solution . Very few works have been reported on low light image enhancement using unpaired images ( Jiang et al. , 2021 ; Ni et al. , 2020 ) . Moreover , even though image to image style translation without paired supervision is a popular approach Anoosheh et al . ( 2019 ) ; Fu et al . ( 2019 ) ; Zhu et al . ( 2017b ) , not many have considered the mapping of low light images to bright light images as a style transfer problem . In this work , we consider the low light image enhancement task as an image style transfer problem . We train a deep neural architecture using unsupervised image pairs . This promotes the use of available real time dark and bright images without the need of pairwise annotations or synthetic treatment . We resort to GANS for training using two encoders and two decoders . We use three discriminators to learn color , texture , and edges separately . The unsupervised image to image translation problem is challenging as it aims to recover a joint probability given a marginal probability . For this purpose , one of the most common approaches is to add a cycle consistency constraint along with the adversarial losses . This bijective constraint becomes restrictive in cases as the task at hand , where the low light image domain may contain less information compared to its bright counterpart . To handle this situation we use a geometric consistency constraint which ensures that an image from one domain and its geometric transformed version generate the same image in the other domain . Additionally , a contextual loss constraint ensures that the context and semantics of the images are preserved . This paper has the following main contributions : ( i ) it poses the low to bright light enhancement problem as an unpaired image translation problem ; ( ii ) it uses a geometric and an illumination consistency constraint in the images ; ( iii ) it uses a contextual loss to measure semantic similarity ; ( iv ) it uses multiscale color , texture and edge discriminators per domain ; ( v ) it demonstrates the effectiveness of the approach for image understanding tasks . While none of such items are individually novel , exploiting their ensemble effect in this task is indeed a significant novel contribution . Our paper is organized in the following manner . We provide a related background of the task in Sec . 2 . The proposed technique is discussed in details in Sec . 3 . Experimental results and conclusion is provided in Secs . 4 and 5 respectively . 2 RELATED BACKGROUND . Histogram based enhancement aims to improve the image quality by modifying the image histogram . This can result in overstretched contrast which lacks in naturalness . Using this framework different techniques have been developed . BPDHE ( Ibrahim & Pik Kong , 2007 ) uses an HE on a dynamic range expanded version of sub-histograms obtained by the local maxima of the input image histogram . FHSABP ( Wang et al. , 2008 ) solves a convex optimization problem to obtain the flattest target histogram with the brightness preservation constraint . Due to their brightness preservation , ( Ibrahim & Pik Kong , 2007 ) and ( Wang et al. , 2008 ) are not suitable to tackle the low light image enhancement , but prevent overstretching . Morover , ( Ibrahim & Pik Kong , 2007 ) and ( Wang et al. , 2008 ) do not consider relationships between adjacent pixels , whereas methods such as HMF ( Arici et al. , 2009 ) , CEBGA ( Hashemi et al. , 2009 ) and DHECI ( Nakai et al. , 2013 ) do . In HMF ( Arici et al. , 2009 ) the target histogram is obtained via a parametric optimization problem , involving the local variance of pixels . In CEBGA ( Hashemi et al. , 2009 ) a genetic algorithm is adopted to enhance the contrast of the images modifying the histogram , using as a fitness function the number of edges in the enhanced image . DHECI ( Nakai et al. , 2013 ) performs a histogram equalization on the differential intensity histogram and the differential saturation histogram from the HSI color space . More advanced techniques which embed contextual information are CVC ( Celik & Tjahjadi , 2011 ) and LDR ( Lee et al. , 2013 ) , which use 2D histograms . Retinex based methods use the assumption that an image can be pixel-wise decomposed into reflectance and illumination . In ( Li et al. , 2011 ) a classic approach is proposed , where the lightness is first decomposed in reflex lightness and ambient illumination . Reflectance is then extracted from reflex lightness , while the ambient illumination is log-transformed and used for the output image . A widely used framework for the Retinex based enhancement methods is the fusion based framework , as in FEMWII Fu et al . ( 2016 ) and FMSBIE Wang et al . ( 2016 ) . Both estimate the illumination using the pixel-wise maximum in the RGB color space , which is used to obtain the reflectance . Three different modified illuminations are then obtained through different techniques to improve bright- ness and contrast . These illumination maps are then fused with a multiscale approach . Multiscale techniques are also used to extract reflectance ( Liu et al. , 2016 ) Another approach for the illumination estimation is proposed in LIME ( Guo et al. , 2017 ) , where an optimization problem is used to obtain a smooth , structure-preserving illumination map , which is then enhanced through a gamma correction . As the noise is critical in poorly illuminated images in ( Guo et al. , 2017 ) a denoising techinque is also proposed : the output reflectance is the linear combination of the original one and a BM3D-filtered one , using the illumination as the weight to prevent the oversmoothing of bright areas . In ( Li et al. , 2011 ) , Fu et al . ( 2016 ) , Wang et al . ( 2016 ) , ( Liu et al. , 2016 ) , and ( Guo et al. , 2017 ) reflectance is obtained by the estimated illumination . More advanced techniques , such as SRIE Fu et al . ( 2016 ) and JIEPMR Cai et al . ( 2017 ) , jointly decompose reflectance and illumination . While the Retinex theory has proved to be suited for low light image enhancement , this approach suffers from color distortion and hand-crafted illumination manipulation . Learning based methods can overcome these problems , while also providing better denoising , which is crucial in low light images . Data learning methods include a variety of methods from deep learning , such as autoencoders , Deep CNNs and GANs , all of which have proved to be suitable techniques to enhance image quality and brightness . In LLNet ( Lore et al. , 2017 ) , GLADNet ( Wang et al. , 2018 ) and LLED-Net ( Li et al. , 2020 ) , denoising autoencoders are used . Despite the good results , the simplicity of these methods limits their capability compared to more complex learning methods . In ( Ren et al. , 2019 ) multiple autoencoders are used to work separately on the content and on the edges of the image while also using CNN , RNN and a more advanced loss function , including a discriminator and a VGG-16 net . An autoencoder is also used for DeepUPE ( Wang et al. , 2019 ) to learn a image-to-illumination mapping used for a Retinex-fashioned enhancing , while considering reconstruction loss , color loss and smoothness of the illuminance . In ( Jiang & Zheng , 2019 ) , an end-to-end U-Net is used , with a 3D convolution in order to deal with videos , preventing flickering in consecutive frames , and using the GRBG components from the camera sensor as an input . In MBLLEN ( Lv et al. , 2018 ) , a CNN is applied to the input image . Then , the output of each layer is fed to independent autoencoders . The obtained output image is a weighted sum with learnable weights of the autoencoders output . Considering strutural , contextual and regional loss for the training . While autoencoders and U-Net are convenient for image-to-image nets , methods such as Tao et al . ( 2017 ) and ( Ignatov et al. , 2017 ) use only deep neural networks . In particular , these use residual convolutional neural networks to mitigate the vanishing gradient problem in deep networks . In ( Ignatov et al. , 2017 ) , the CNN enhances images from low-end devices to professional DSLR quality , using a dataset with multiple acquisition of the same scene from different devices for the training , which is difficult to obtain . Tao et al . ( 2017 ) uses special-designed residual CNN modules to create a deep CNN , but is then trained using only the SSIM . Apart from ( Wang et al. , 2019 ) , also RetinexNet ( Wei et al. , 2018 ) and Kind++ ( Zhang et al. , 2021 ) augment the Retinex theory , outperforming classic Retinex based methods . Both ( Wei et al. , 2018 ) and ( Zhang et al. , 2021 ) use a CNN to decompose the reflectance and illumination components . In both cases , denoising take advantage of the illumination map , as in ( Guo et al. , 2017 ) , to improve the result over plain denoising . In ( Wei et al. , 2018 ) , the BM3D is used for denoising whereas in ( Zhang et al. , 2021 ) a specific CNN with multi-scale illumination consideration is proposed . For illumination adjustment ( Wei et al. , 2018 ) uses an encoder decoder structure while ( Zhang et al. , 2021 ) adopt a CNN with a free parameter to modify the adjustment ratio . A common critical aspect about the methods considered above is data availability . Since these methods are supervised , they require paired low/normal light images of the same scene . A widely used way to obtain them is to artificially darken normal light images , but this impacts the naturalness of the results . Recently , methods such as ( Wei et al. , 2018 ) and ( Zhang et al. , 2021 ) used datasets with images of the same scenes with different exposures . This proved to be effective , but such datasets are scarce and tedious to create . To overcome the data availability issue , several unsupervised and unpaired supervised methods have been developed . ZDCE ( Guo et al. , 2020 ) is an unsupervised low-light image enhancer which uses a CNN to obtain pixel-wise enhancement curves to adjust the input image , using non-reference loss functions for the training . EGAN ( Jiang et al. , 2021 ) and UEGAN ( Ni et al. , 2020 ) use a GAN to obtain a light enhancement without paired supervision , using a decoder-encoder for the generation . In ( Jiang et al. , 2021 ) a local and a global discriminator are used while in ( Ni et al. , 2020 ) only one multi-scale discriminator is used . The promising results of ( Jiang et al. , 2021 ) and ( Ni et al. , 2020 ) , together with the availability of unpaired low/normal light images , makes GANs an appealing approach for low light image enhancement techniques . Our contribution is similar to EGAN and UEGAN as it uses a GAN architecture with unpaired supervision . Different from these , we do not use a global attention . We rather use separate discriminators for color , texture and edge . Further we make use of cycle consistency , geometric and illumination consistency with contextual loss instead of perceptual losses . | This paper proposes an image enhancement model to translate a low light image to a bright image without a paired supervision through CycleGAN. Compared to similar recent GAN-based works such as EnligthenGAN (Jiang et al., 2021) and UEGAN (Ni et al., 2020), the proposed work relies on cycle-consistency, as well as geometric and illumination consistency. They also separate their discriminators for color, texture and edges. | SP:1096a739cad46656d225fef19aa91af3a6553927 |
Training Structured Neural Networks Through Manifold Identification and Variance Reduction | 1 Introduction . Training neural networks ( NNs ) with regularization to obtain a certain desired structure such as structured sparsity or discrete-valued parameters is a problem of increasing interest . Existing approaches either use stochastic subgradients of the regularized objective ( Wen et al. , 2016 ; 2018 ) or combine popular stochastic gradient algorithms for NNs , like SGD with momentum ( MSGD ) or Adam ( Kingma & Ba , 2015 ) , with the proximal operator associated with the regularizer to conduct proximal stochastic gradient updates to obtain a model with preferred structures ( Bai et al. , 2018 ; Yang et al. , 2019 ; Yun et al. , 2020 ; Deleu & Bengio , 2021 ) . Such methods come with proven convergence for certain measures of first-order optimality and have shown some empirical success in applications . However , we notice that an essential theoretical support lacking in existing methods is the guarantee for the output iterate to possess the same structure as that at the point of convergence . More specifically , often the imposed regularization is only known to induce a desired structure exactly at optimal or stationary points of the underlying optimization problem ( see for example , Zhao & Yu , 2006 ) , but training algorithms are only able to generate iterates asymptotically converging to a stationary point . Without further theoretical guarantees , it is unknown whether the output iterate , which is just an approximation of the stationary point , still has the same structure . For example , let us assume that sparsity is desired , the point of convergence is x∗ = ( 1 , 0 , 0 ) , and two algorithms respectively produce iterates { yt = ( 1 , t−1 , t−1 ) } and { zt = ( 1 + t−1 , 0 , 0 ) } . Clearly , both iterate sequences converge to x∗ , but only zt has the same desired structure as its limit point x∗ , while yt is not useful for sparsity despite that the point of convergence is . This work aims at filling this gap to propose an algorithm for training structured NNs that can provably make all its iterates after a finite number of iterations possess the desired structure of the stationary point to which the iterates converge . We term the structure at a stationary point a stationary structure , and it should be understood that for multiple stationary points , each might correspond to a different stationary structure , and we aim at identifying the one at the limit point of the iterates of an algorithm , instead of selecting the optimal one among all stationary structures . Although finding the structure at an inferior stationary point might seem not very meaningful , another reason for studying this identification property is that for the same point of convergence , the structure at the limit point is the most preferable one . Consider the same example above , we note that for any sequence { xt } converging to x∗ , xt1 6= 0 for all t large enough , for otherwise xt does not converge to x∗ . Therefore , xt can not be sparser than x∗ if xt → x∗.1 Identifying the structure of the point of convergence thus also amounts to finding the locally most ideal structure under the same convergence premise . It is well-known in the literature of nonlinear optimization that generating iterates consistently possessing the structure at the stationary point of convergence is possible if all points with the same structure near the stationary point can be presented locally as a manifold along which the regularizer is smooth . This manifold is often termed as the active manifold ( relative to the given stationary point ) , and the task of generating iterates staying in the active manifold relative to the point of convergence after finite iterations is called manifold identification ( Lewis , 2002 ; Hare & Lewis , 2004 ; Lewis & Zhang , 2013 ) . To identify the active manifold of a stationary point , we need the regularizer to be partly smooth ( Lewis , 2002 ; Hare & Lewis , 2004 ) at that point , roughly meaning that the regularizer is smooth along the active manifold around the point , while the change in its value is drastic along directions leaving the manifold . A more technical definition will be given in Section 3 . Fortunately , most regularizers used in machine learning are partly smooth , so stationary structure identification is possible , and various deterministic algorithms are known to achieve so ( Hare & Lewis , 2007 ; Hare , 2011 ; Wright , 2012 ; Liang et al. , 2017a ; b ; Li et al. , 2020 ; Lee , 2020 ; Bareilles et al. , 2020 ) . On the other hand , for stochastic gradient-related methods to identify a stationary structure , existing theory suggests that the variance of the gradient estimation needs to vanish as the iterates approach a stationary point ( Poon et al. , 2018 ) , and indeed , it is observed empirically that proximal stochastic gradient descent ( SGD ) is incapable of manifold identification due to the presence of the variance in the gradient estimation ( Lee & Wright , 2012 ; Sun et al. , 2019 ) .2 Poon et al . ( 2018 ) showed that variance-reduction methods such as SVRG ( Johnson & Zhang , 2013 ; Xiao & Zhang , 2014 ) and SAGA ( Defazio et al. , 2014 ) that utilize the finite-sum structure of empirical risk minimization to drive the variance of their gradient estimators to zero are suitable for this task . Unfortunately , with the standard practice of data augmentation in deep learning , training of deep learning models with a regularizer should be treated as the following stochastic optimization problem that minimizes the expected loss over a distribution , instead of the commonly seen finite-sum form : min W∈E F ( W ) : = Eξ∼D [ fξ ( W ) ] + ψ ( W ) , ( 1 ) where E is a Euclidean space with inner product 〈· , ·〉 and the associated norm ‖·‖ , D is a distribution over a space Ω , fξ is differentiable almost everywhere for all ξ ∈ Ω , and ψ ( W ) is a regularizer that might be nondifferentiable . We will also use the notation f ( W ) : = Eξ∼D [ fξ ( W ) ] . Without a finite-sum structure in ( 1 ) , Defazio & Bottou ( 2019 ) pointed out that classical variance-reduction methods are ineffective for deep learning , and one major reason is the necessity of periodically evaluating ∇f ( W ) ( or at least using a large batch from D to get a precise approximation of it ) in variance-reduction methods is intractable , hence manifold identification and therefore finding the stationary structure becomes an extremely tough task for deep learning . Although recently there are efforts in developing variancereduction methods for ( 1 ) inspired by online problems ( Wang et al. , 2019 ; Nguyen et al. , 2021 ; Pham et al. , 2020 ; Cutkosky & Orabona , 2019 ; Tran-Dinh et al. , 2019 ) , these methods all have multiple hyperparameters to tune and incur computational cost at least twice or 1See a more detailed discussion in Appendix B.1 . 2An exception is the interpolation case , in which the variance of plain SGD vanishes asymptot- ically . But data augmentation often fails this interpolation condition . thrice to that of ( proximal ) SGD . As the training of deep learning models is time- and resource-consuming , these drawbacks make such methods less ideal for deep learning . To tackle these difficulties , we extend the recently proposed modernized dual averaging framework ( Jelassi & Defazio , 2020 ) to the regularized setting by incorporating proximal operations , and obtain a new algorithm RMDA ( Regularized Modernized Dual Averaging ) for ( 1 ) . The proposed algorithm provably achieves variance reduction beyond finite-sum problems without any cost or hard-to-tune hyperparameters additional to those of proximal momentum SGD ( proxMSGD ) , and we provide theoretical guarantees for its convergence and ability for manifold identification . The key difference between RMDA and the original regularized dual averaging ( RDA ) of Xiao ( 2010 ) is that RMDA incorporates momentum and can achieve better performance for deep learning in terms of the generalization ability , and the new algorithm requires nontrivial proofs for its guarantees . We further conduct experiments on training deep learning models with a regularizer for structured-sparsity to demonstrate the ability of RMDA to identify the stationary structure without sacrificing the prediction accuracy . When the desired structure is ( unstructured ) sparsity , a popular approach is pruning that trims a given dense model to a specified level , and works like ( Gale et al. , 2019 ; Blalock et al. , 2020 ; Evci et al. , 2020 ; Verma & Pesquet , 2021 ) have shown promising results . However , as a post-processing approach , pruning is essentially different from structured training considered in this work , because pruning is mainly used when a model is available , while structured training combines training and structure inducing in one procedure to potentially reduce the computational cost and memory footprint when resources are scarce . We will also show in our experiment that RMDA can achieve better performance than a state-of-the-art pruning method , suggesting that structured training indeed has its merits for obtaining sparse NNs . The main contributions of this work are summarized as follows . • Principled analysis : We use the theory of manifold identification from nonlinear opti- mization to provide a unified way towards better understanding of algorithms for training structured neural networks . • Variance reduction beyond finite-sum with low cost : RMDA achieves variance reduction for problems that consist of an infinite-sum term plus a regularizer ( see Lemma 2 ) while incorporating momentum to improve the generalization performance . Its spatial and computational cost is almost the same as proxMSGD , and there is no additional hyperparameters to tune , making RMDA suitable for large-scale deep learning . • Structure identification : With the help of variance reduction , our theory shows that under suitable conditions , after a finite number of iterations , iterates of RMDA stay in the active manifold of its limit point . • Superior empirical performance : Experiments on neural networks with structured sparsity exemplify that RMDA can identify a stationary structure without reducing the validation accuracy , thus outperforming existing methods by achieving higher group sparsity . Another experiment on unstructured sparsity also shows RMDA outperforms a state-of-the-art pruning method . After this work is finished , we found a very recent paper Kungurtsev & Shikhman ( 2021 ) that proposed the same algorithm ( with slightly differences in the parameters setting in Line 5 of Algorithm 1 ) and analyzed the expected convergence of ( 1 ) under a specific scheduling of ct = st+1α−1t+1 when both terms are convex . In conrast , our work focuses on nonconvex deep learning problems , and especially on the manifold identification aspect . 2 Algorithm . Details of the proposed RMDA are in Algorithm 1 . At the t-th iteration with the iterate W t−1 , we draw an independent sample ξt ∼ D to compute the stochastic gradient ∇fξt ( W t−1 ) , decide a learning rate ηt , and update the weighted sum Vt of previous stochastic gradients using ηt and the scaling factor βt : = √ t : V0 : = 0 , Vt : = ∑t k=1 ηkβk∇fξk ( W k−1 ) = Vt−1 + ηtβt∇fξt ( W t−1 ) , ∀t > 0 . Algorithm 1 : RMDA ( W 0 , T , η ( · ) , c ( · ) ) input : Initial point W 0 , learning rate schedule η ( · ) , momentum schedule c ( · ) , number of epochs T 1 V0 ← 0 , α0 ← 0 2 for t = 1 , . . . , T do 3 βt ← √ t , st ← η ( t ) βt , αt ← αt−1 + st 4 Sample ξt ∼ D and compute V t ← V t−1 + st∇fξt ( W t−1 ) 5 W̃ t ← arg minW 〈V t , W 〉+ βt2 ∥∥W −W 0∥∥2 + αtψ ( W ) // ( 2 ) 6 W t ← ( 1− c ( t ) ) W t−1 + c ( t ) W̃ t output : The final model WT The tentative iterate W̃ t is then obtained by the proximal operation associated with ψ : W̃ t = proxαtβ−1t ψ ( W 0 − β−1t V t ) , αt : = ∑t k=1 βkηk , ( 2 ) where for any function g , proxg ( x ) : = arg miny ‖y − x‖ 2 /2 + g ( y ) is its proximal operator . The iterate is then updated along the direction W̃ t −W t−1 with a factor of ct ∈ [ 0 , 1 ] : W t = ( 1− ct ) W t−1 + ctW̃ t = W t−1 + ct ( W̃ t −W t−1 ) . ( 3 ) When ψ ≡ 0 , RMDA reduces to the modernized dual averaging algorithm of Jelassi & Defazio ( 2020 ) , in which case it has been shown that mixing W t−1 and W̃ t in ( 3 ) equals to introducing momentum ( Jelassi & Defazio , 2020 ; Tao et al. , 2018 ) . We found that this introduction of momentum greatly improves the performance of RMDA and is therefore essential for applying it on deep learning problems . | This paper proposes an algorithm for training neural networks with a regularization term for promoting desired structures in the model. The paper (claims to) prove that the proposed method can correctly identify within finite steps the underlying structure. The simulations then show that the method outperforms existing packages in identifying structured sparsity without compromising prediction accuracy. | SP:17e475950f72d3ffb95b6bd20cfc0c068b34e4ac |
Training Structured Neural Networks Through Manifold Identification and Variance Reduction | 1 Introduction . Training neural networks ( NNs ) with regularization to obtain a certain desired structure such as structured sparsity or discrete-valued parameters is a problem of increasing interest . Existing approaches either use stochastic subgradients of the regularized objective ( Wen et al. , 2016 ; 2018 ) or combine popular stochastic gradient algorithms for NNs , like SGD with momentum ( MSGD ) or Adam ( Kingma & Ba , 2015 ) , with the proximal operator associated with the regularizer to conduct proximal stochastic gradient updates to obtain a model with preferred structures ( Bai et al. , 2018 ; Yang et al. , 2019 ; Yun et al. , 2020 ; Deleu & Bengio , 2021 ) . Such methods come with proven convergence for certain measures of first-order optimality and have shown some empirical success in applications . However , we notice that an essential theoretical support lacking in existing methods is the guarantee for the output iterate to possess the same structure as that at the point of convergence . More specifically , often the imposed regularization is only known to induce a desired structure exactly at optimal or stationary points of the underlying optimization problem ( see for example , Zhao & Yu , 2006 ) , but training algorithms are only able to generate iterates asymptotically converging to a stationary point . Without further theoretical guarantees , it is unknown whether the output iterate , which is just an approximation of the stationary point , still has the same structure . For example , let us assume that sparsity is desired , the point of convergence is x∗ = ( 1 , 0 , 0 ) , and two algorithms respectively produce iterates { yt = ( 1 , t−1 , t−1 ) } and { zt = ( 1 + t−1 , 0 , 0 ) } . Clearly , both iterate sequences converge to x∗ , but only zt has the same desired structure as its limit point x∗ , while yt is not useful for sparsity despite that the point of convergence is . This work aims at filling this gap to propose an algorithm for training structured NNs that can provably make all its iterates after a finite number of iterations possess the desired structure of the stationary point to which the iterates converge . We term the structure at a stationary point a stationary structure , and it should be understood that for multiple stationary points , each might correspond to a different stationary structure , and we aim at identifying the one at the limit point of the iterates of an algorithm , instead of selecting the optimal one among all stationary structures . Although finding the structure at an inferior stationary point might seem not very meaningful , another reason for studying this identification property is that for the same point of convergence , the structure at the limit point is the most preferable one . Consider the same example above , we note that for any sequence { xt } converging to x∗ , xt1 6= 0 for all t large enough , for otherwise xt does not converge to x∗ . Therefore , xt can not be sparser than x∗ if xt → x∗.1 Identifying the structure of the point of convergence thus also amounts to finding the locally most ideal structure under the same convergence premise . It is well-known in the literature of nonlinear optimization that generating iterates consistently possessing the structure at the stationary point of convergence is possible if all points with the same structure near the stationary point can be presented locally as a manifold along which the regularizer is smooth . This manifold is often termed as the active manifold ( relative to the given stationary point ) , and the task of generating iterates staying in the active manifold relative to the point of convergence after finite iterations is called manifold identification ( Lewis , 2002 ; Hare & Lewis , 2004 ; Lewis & Zhang , 2013 ) . To identify the active manifold of a stationary point , we need the regularizer to be partly smooth ( Lewis , 2002 ; Hare & Lewis , 2004 ) at that point , roughly meaning that the regularizer is smooth along the active manifold around the point , while the change in its value is drastic along directions leaving the manifold . A more technical definition will be given in Section 3 . Fortunately , most regularizers used in machine learning are partly smooth , so stationary structure identification is possible , and various deterministic algorithms are known to achieve so ( Hare & Lewis , 2007 ; Hare , 2011 ; Wright , 2012 ; Liang et al. , 2017a ; b ; Li et al. , 2020 ; Lee , 2020 ; Bareilles et al. , 2020 ) . On the other hand , for stochastic gradient-related methods to identify a stationary structure , existing theory suggests that the variance of the gradient estimation needs to vanish as the iterates approach a stationary point ( Poon et al. , 2018 ) , and indeed , it is observed empirically that proximal stochastic gradient descent ( SGD ) is incapable of manifold identification due to the presence of the variance in the gradient estimation ( Lee & Wright , 2012 ; Sun et al. , 2019 ) .2 Poon et al . ( 2018 ) showed that variance-reduction methods such as SVRG ( Johnson & Zhang , 2013 ; Xiao & Zhang , 2014 ) and SAGA ( Defazio et al. , 2014 ) that utilize the finite-sum structure of empirical risk minimization to drive the variance of their gradient estimators to zero are suitable for this task . Unfortunately , with the standard practice of data augmentation in deep learning , training of deep learning models with a regularizer should be treated as the following stochastic optimization problem that minimizes the expected loss over a distribution , instead of the commonly seen finite-sum form : min W∈E F ( W ) : = Eξ∼D [ fξ ( W ) ] + ψ ( W ) , ( 1 ) where E is a Euclidean space with inner product 〈· , ·〉 and the associated norm ‖·‖ , D is a distribution over a space Ω , fξ is differentiable almost everywhere for all ξ ∈ Ω , and ψ ( W ) is a regularizer that might be nondifferentiable . We will also use the notation f ( W ) : = Eξ∼D [ fξ ( W ) ] . Without a finite-sum structure in ( 1 ) , Defazio & Bottou ( 2019 ) pointed out that classical variance-reduction methods are ineffective for deep learning , and one major reason is the necessity of periodically evaluating ∇f ( W ) ( or at least using a large batch from D to get a precise approximation of it ) in variance-reduction methods is intractable , hence manifold identification and therefore finding the stationary structure becomes an extremely tough task for deep learning . Although recently there are efforts in developing variancereduction methods for ( 1 ) inspired by online problems ( Wang et al. , 2019 ; Nguyen et al. , 2021 ; Pham et al. , 2020 ; Cutkosky & Orabona , 2019 ; Tran-Dinh et al. , 2019 ) , these methods all have multiple hyperparameters to tune and incur computational cost at least twice or 1See a more detailed discussion in Appendix B.1 . 2An exception is the interpolation case , in which the variance of plain SGD vanishes asymptot- ically . But data augmentation often fails this interpolation condition . thrice to that of ( proximal ) SGD . As the training of deep learning models is time- and resource-consuming , these drawbacks make such methods less ideal for deep learning . To tackle these difficulties , we extend the recently proposed modernized dual averaging framework ( Jelassi & Defazio , 2020 ) to the regularized setting by incorporating proximal operations , and obtain a new algorithm RMDA ( Regularized Modernized Dual Averaging ) for ( 1 ) . The proposed algorithm provably achieves variance reduction beyond finite-sum problems without any cost or hard-to-tune hyperparameters additional to those of proximal momentum SGD ( proxMSGD ) , and we provide theoretical guarantees for its convergence and ability for manifold identification . The key difference between RMDA and the original regularized dual averaging ( RDA ) of Xiao ( 2010 ) is that RMDA incorporates momentum and can achieve better performance for deep learning in terms of the generalization ability , and the new algorithm requires nontrivial proofs for its guarantees . We further conduct experiments on training deep learning models with a regularizer for structured-sparsity to demonstrate the ability of RMDA to identify the stationary structure without sacrificing the prediction accuracy . When the desired structure is ( unstructured ) sparsity , a popular approach is pruning that trims a given dense model to a specified level , and works like ( Gale et al. , 2019 ; Blalock et al. , 2020 ; Evci et al. , 2020 ; Verma & Pesquet , 2021 ) have shown promising results . However , as a post-processing approach , pruning is essentially different from structured training considered in this work , because pruning is mainly used when a model is available , while structured training combines training and structure inducing in one procedure to potentially reduce the computational cost and memory footprint when resources are scarce . We will also show in our experiment that RMDA can achieve better performance than a state-of-the-art pruning method , suggesting that structured training indeed has its merits for obtaining sparse NNs . The main contributions of this work are summarized as follows . • Principled analysis : We use the theory of manifold identification from nonlinear opti- mization to provide a unified way towards better understanding of algorithms for training structured neural networks . • Variance reduction beyond finite-sum with low cost : RMDA achieves variance reduction for problems that consist of an infinite-sum term plus a regularizer ( see Lemma 2 ) while incorporating momentum to improve the generalization performance . Its spatial and computational cost is almost the same as proxMSGD , and there is no additional hyperparameters to tune , making RMDA suitable for large-scale deep learning . • Structure identification : With the help of variance reduction , our theory shows that under suitable conditions , after a finite number of iterations , iterates of RMDA stay in the active manifold of its limit point . • Superior empirical performance : Experiments on neural networks with structured sparsity exemplify that RMDA can identify a stationary structure without reducing the validation accuracy , thus outperforming existing methods by achieving higher group sparsity . Another experiment on unstructured sparsity also shows RMDA outperforms a state-of-the-art pruning method . After this work is finished , we found a very recent paper Kungurtsev & Shikhman ( 2021 ) that proposed the same algorithm ( with slightly differences in the parameters setting in Line 5 of Algorithm 1 ) and analyzed the expected convergence of ( 1 ) under a specific scheduling of ct = st+1α−1t+1 when both terms are convex . In conrast , our work focuses on nonconvex deep learning problems , and especially on the manifold identification aspect . 2 Algorithm . Details of the proposed RMDA are in Algorithm 1 . At the t-th iteration with the iterate W t−1 , we draw an independent sample ξt ∼ D to compute the stochastic gradient ∇fξt ( W t−1 ) , decide a learning rate ηt , and update the weighted sum Vt of previous stochastic gradients using ηt and the scaling factor βt : = √ t : V0 : = 0 , Vt : = ∑t k=1 ηkβk∇fξk ( W k−1 ) = Vt−1 + ηtβt∇fξt ( W t−1 ) , ∀t > 0 . Algorithm 1 : RMDA ( W 0 , T , η ( · ) , c ( · ) ) input : Initial point W 0 , learning rate schedule η ( · ) , momentum schedule c ( · ) , number of epochs T 1 V0 ← 0 , α0 ← 0 2 for t = 1 , . . . , T do 3 βt ← √ t , st ← η ( t ) βt , αt ← αt−1 + st 4 Sample ξt ∼ D and compute V t ← V t−1 + st∇fξt ( W t−1 ) 5 W̃ t ← arg minW 〈V t , W 〉+ βt2 ∥∥W −W 0∥∥2 + αtψ ( W ) // ( 2 ) 6 W t ← ( 1− c ( t ) ) W t−1 + c ( t ) W̃ t output : The final model WT The tentative iterate W̃ t is then obtained by the proximal operation associated with ψ : W̃ t = proxαtβ−1t ψ ( W 0 − β−1t V t ) , αt : = ∑t k=1 βkηk , ( 2 ) where for any function g , proxg ( x ) : = arg miny ‖y − x‖ 2 /2 + g ( y ) is its proximal operator . The iterate is then updated along the direction W̃ t −W t−1 with a factor of ct ∈ [ 0 , 1 ] : W t = ( 1− ct ) W t−1 + ctW̃ t = W t−1 + ct ( W̃ t −W t−1 ) . ( 3 ) When ψ ≡ 0 , RMDA reduces to the modernized dual averaging algorithm of Jelassi & Defazio ( 2020 ) , in which case it has been shown that mixing W t−1 and W̃ t in ( 3 ) equals to introducing momentum ( Jelassi & Defazio , 2020 ; Tao et al. , 2018 ) . We found that this introduction of momentum greatly improves the performance of RMDA and is therefore essential for applying it on deep learning problems . | In this paper, the authors propose Regularized Modernized Dual Averaging (RDMA) algorithm to train structured neural networks. This is a proximal method that achieves variance reduction without any extra cost per iteration. The algorithm does not require any extra hyperparameters than what stochastic gradient descent requires. Authors theoretically prove that structure identification is guaranteed after a finite number of iterations. Experiments have been performed to obtain group sparse neural networks. Networks and datasets used in the experiments are simple logistic regression network on MNIST, 7-layer fully-connected network on FashionMNIST, LeNet5 on MNIST, and VGG16 on CIFAR10. The method has been compared with SGD, ProxSGD, and ProxSSI. | SP:17e475950f72d3ffb95b6bd20cfc0c068b34e4ac |
Training Structured Neural Networks Through Manifold Identification and Variance Reduction | 1 Introduction . Training neural networks ( NNs ) with regularization to obtain a certain desired structure such as structured sparsity or discrete-valued parameters is a problem of increasing interest . Existing approaches either use stochastic subgradients of the regularized objective ( Wen et al. , 2016 ; 2018 ) or combine popular stochastic gradient algorithms for NNs , like SGD with momentum ( MSGD ) or Adam ( Kingma & Ba , 2015 ) , with the proximal operator associated with the regularizer to conduct proximal stochastic gradient updates to obtain a model with preferred structures ( Bai et al. , 2018 ; Yang et al. , 2019 ; Yun et al. , 2020 ; Deleu & Bengio , 2021 ) . Such methods come with proven convergence for certain measures of first-order optimality and have shown some empirical success in applications . However , we notice that an essential theoretical support lacking in existing methods is the guarantee for the output iterate to possess the same structure as that at the point of convergence . More specifically , often the imposed regularization is only known to induce a desired structure exactly at optimal or stationary points of the underlying optimization problem ( see for example , Zhao & Yu , 2006 ) , but training algorithms are only able to generate iterates asymptotically converging to a stationary point . Without further theoretical guarantees , it is unknown whether the output iterate , which is just an approximation of the stationary point , still has the same structure . For example , let us assume that sparsity is desired , the point of convergence is x∗ = ( 1 , 0 , 0 ) , and two algorithms respectively produce iterates { yt = ( 1 , t−1 , t−1 ) } and { zt = ( 1 + t−1 , 0 , 0 ) } . Clearly , both iterate sequences converge to x∗ , but only zt has the same desired structure as its limit point x∗ , while yt is not useful for sparsity despite that the point of convergence is . This work aims at filling this gap to propose an algorithm for training structured NNs that can provably make all its iterates after a finite number of iterations possess the desired structure of the stationary point to which the iterates converge . We term the structure at a stationary point a stationary structure , and it should be understood that for multiple stationary points , each might correspond to a different stationary structure , and we aim at identifying the one at the limit point of the iterates of an algorithm , instead of selecting the optimal one among all stationary structures . Although finding the structure at an inferior stationary point might seem not very meaningful , another reason for studying this identification property is that for the same point of convergence , the structure at the limit point is the most preferable one . Consider the same example above , we note that for any sequence { xt } converging to x∗ , xt1 6= 0 for all t large enough , for otherwise xt does not converge to x∗ . Therefore , xt can not be sparser than x∗ if xt → x∗.1 Identifying the structure of the point of convergence thus also amounts to finding the locally most ideal structure under the same convergence premise . It is well-known in the literature of nonlinear optimization that generating iterates consistently possessing the structure at the stationary point of convergence is possible if all points with the same structure near the stationary point can be presented locally as a manifold along which the regularizer is smooth . This manifold is often termed as the active manifold ( relative to the given stationary point ) , and the task of generating iterates staying in the active manifold relative to the point of convergence after finite iterations is called manifold identification ( Lewis , 2002 ; Hare & Lewis , 2004 ; Lewis & Zhang , 2013 ) . To identify the active manifold of a stationary point , we need the regularizer to be partly smooth ( Lewis , 2002 ; Hare & Lewis , 2004 ) at that point , roughly meaning that the regularizer is smooth along the active manifold around the point , while the change in its value is drastic along directions leaving the manifold . A more technical definition will be given in Section 3 . Fortunately , most regularizers used in machine learning are partly smooth , so stationary structure identification is possible , and various deterministic algorithms are known to achieve so ( Hare & Lewis , 2007 ; Hare , 2011 ; Wright , 2012 ; Liang et al. , 2017a ; b ; Li et al. , 2020 ; Lee , 2020 ; Bareilles et al. , 2020 ) . On the other hand , for stochastic gradient-related methods to identify a stationary structure , existing theory suggests that the variance of the gradient estimation needs to vanish as the iterates approach a stationary point ( Poon et al. , 2018 ) , and indeed , it is observed empirically that proximal stochastic gradient descent ( SGD ) is incapable of manifold identification due to the presence of the variance in the gradient estimation ( Lee & Wright , 2012 ; Sun et al. , 2019 ) .2 Poon et al . ( 2018 ) showed that variance-reduction methods such as SVRG ( Johnson & Zhang , 2013 ; Xiao & Zhang , 2014 ) and SAGA ( Defazio et al. , 2014 ) that utilize the finite-sum structure of empirical risk minimization to drive the variance of their gradient estimators to zero are suitable for this task . Unfortunately , with the standard practice of data augmentation in deep learning , training of deep learning models with a regularizer should be treated as the following stochastic optimization problem that minimizes the expected loss over a distribution , instead of the commonly seen finite-sum form : min W∈E F ( W ) : = Eξ∼D [ fξ ( W ) ] + ψ ( W ) , ( 1 ) where E is a Euclidean space with inner product 〈· , ·〉 and the associated norm ‖·‖ , D is a distribution over a space Ω , fξ is differentiable almost everywhere for all ξ ∈ Ω , and ψ ( W ) is a regularizer that might be nondifferentiable . We will also use the notation f ( W ) : = Eξ∼D [ fξ ( W ) ] . Without a finite-sum structure in ( 1 ) , Defazio & Bottou ( 2019 ) pointed out that classical variance-reduction methods are ineffective for deep learning , and one major reason is the necessity of periodically evaluating ∇f ( W ) ( or at least using a large batch from D to get a precise approximation of it ) in variance-reduction methods is intractable , hence manifold identification and therefore finding the stationary structure becomes an extremely tough task for deep learning . Although recently there are efforts in developing variancereduction methods for ( 1 ) inspired by online problems ( Wang et al. , 2019 ; Nguyen et al. , 2021 ; Pham et al. , 2020 ; Cutkosky & Orabona , 2019 ; Tran-Dinh et al. , 2019 ) , these methods all have multiple hyperparameters to tune and incur computational cost at least twice or 1See a more detailed discussion in Appendix B.1 . 2An exception is the interpolation case , in which the variance of plain SGD vanishes asymptot- ically . But data augmentation often fails this interpolation condition . thrice to that of ( proximal ) SGD . As the training of deep learning models is time- and resource-consuming , these drawbacks make such methods less ideal for deep learning . To tackle these difficulties , we extend the recently proposed modernized dual averaging framework ( Jelassi & Defazio , 2020 ) to the regularized setting by incorporating proximal operations , and obtain a new algorithm RMDA ( Regularized Modernized Dual Averaging ) for ( 1 ) . The proposed algorithm provably achieves variance reduction beyond finite-sum problems without any cost or hard-to-tune hyperparameters additional to those of proximal momentum SGD ( proxMSGD ) , and we provide theoretical guarantees for its convergence and ability for manifold identification . The key difference between RMDA and the original regularized dual averaging ( RDA ) of Xiao ( 2010 ) is that RMDA incorporates momentum and can achieve better performance for deep learning in terms of the generalization ability , and the new algorithm requires nontrivial proofs for its guarantees . We further conduct experiments on training deep learning models with a regularizer for structured-sparsity to demonstrate the ability of RMDA to identify the stationary structure without sacrificing the prediction accuracy . When the desired structure is ( unstructured ) sparsity , a popular approach is pruning that trims a given dense model to a specified level , and works like ( Gale et al. , 2019 ; Blalock et al. , 2020 ; Evci et al. , 2020 ; Verma & Pesquet , 2021 ) have shown promising results . However , as a post-processing approach , pruning is essentially different from structured training considered in this work , because pruning is mainly used when a model is available , while structured training combines training and structure inducing in one procedure to potentially reduce the computational cost and memory footprint when resources are scarce . We will also show in our experiment that RMDA can achieve better performance than a state-of-the-art pruning method , suggesting that structured training indeed has its merits for obtaining sparse NNs . The main contributions of this work are summarized as follows . • Principled analysis : We use the theory of manifold identification from nonlinear opti- mization to provide a unified way towards better understanding of algorithms for training structured neural networks . • Variance reduction beyond finite-sum with low cost : RMDA achieves variance reduction for problems that consist of an infinite-sum term plus a regularizer ( see Lemma 2 ) while incorporating momentum to improve the generalization performance . Its spatial and computational cost is almost the same as proxMSGD , and there is no additional hyperparameters to tune , making RMDA suitable for large-scale deep learning . • Structure identification : With the help of variance reduction , our theory shows that under suitable conditions , after a finite number of iterations , iterates of RMDA stay in the active manifold of its limit point . • Superior empirical performance : Experiments on neural networks with structured sparsity exemplify that RMDA can identify a stationary structure without reducing the validation accuracy , thus outperforming existing methods by achieving higher group sparsity . Another experiment on unstructured sparsity also shows RMDA outperforms a state-of-the-art pruning method . After this work is finished , we found a very recent paper Kungurtsev & Shikhman ( 2021 ) that proposed the same algorithm ( with slightly differences in the parameters setting in Line 5 of Algorithm 1 ) and analyzed the expected convergence of ( 1 ) under a specific scheduling of ct = st+1α−1t+1 when both terms are convex . In conrast , our work focuses on nonconvex deep learning problems , and especially on the manifold identification aspect . 2 Algorithm . Details of the proposed RMDA are in Algorithm 1 . At the t-th iteration with the iterate W t−1 , we draw an independent sample ξt ∼ D to compute the stochastic gradient ∇fξt ( W t−1 ) , decide a learning rate ηt , and update the weighted sum Vt of previous stochastic gradients using ηt and the scaling factor βt : = √ t : V0 : = 0 , Vt : = ∑t k=1 ηkβk∇fξk ( W k−1 ) = Vt−1 + ηtβt∇fξt ( W t−1 ) , ∀t > 0 . Algorithm 1 : RMDA ( W 0 , T , η ( · ) , c ( · ) ) input : Initial point W 0 , learning rate schedule η ( · ) , momentum schedule c ( · ) , number of epochs T 1 V0 ← 0 , α0 ← 0 2 for t = 1 , . . . , T do 3 βt ← √ t , st ← η ( t ) βt , αt ← αt−1 + st 4 Sample ξt ∼ D and compute V t ← V t−1 + st∇fξt ( W t−1 ) 5 W̃ t ← arg minW 〈V t , W 〉+ βt2 ∥∥W −W 0∥∥2 + αtψ ( W ) // ( 2 ) 6 W t ← ( 1− c ( t ) ) W t−1 + c ( t ) W̃ t output : The final model WT The tentative iterate W̃ t is then obtained by the proximal operation associated with ψ : W̃ t = proxαtβ−1t ψ ( W 0 − β−1t V t ) , αt : = ∑t k=1 βkηk , ( 2 ) where for any function g , proxg ( x ) : = arg miny ‖y − x‖ 2 /2 + g ( y ) is its proximal operator . The iterate is then updated along the direction W̃ t −W t−1 with a factor of ct ∈ [ 0 , 1 ] : W t = ( 1− ct ) W t−1 + ctW̃ t = W t−1 + ct ( W̃ t −W t−1 ) . ( 3 ) When ψ ≡ 0 , RMDA reduces to the modernized dual averaging algorithm of Jelassi & Defazio ( 2020 ) , in which case it has been shown that mixing W t−1 and W̃ t in ( 3 ) equals to introducing momentum ( Jelassi & Defazio , 2020 ; Tao et al. , 2018 ) . We found that this introduction of momentum greatly improves the performance of RMDA and is therefore essential for applying it on deep learning problems . | Regularization is generally used to impose desired structure on NN during training. The authors developed RMDA (Regularized Modernized Dual Averaging) which uses the weighted average of the previous SG to compute the tentative update via proximal operation associated with the regularizer. Then the parameters of the model are updated in the direction of this tentative update with a pre-defined factor. The authors theoretically analyzed the performance of their algorithm and showed that under some assumptions, RMDA can identify the structure of model in finite iterations. | SP:17e475950f72d3ffb95b6bd20cfc0c068b34e4ac |
Bayesian Modeling and Uncertainty Quantification for Learning to Optimize: What, Why, and How | 1 INTRODUCTION . Computational models of many real-world applications involve optimizing non-convex objective functions . As the non-convex optimization problem is NP-hard , no optimization algorithm ( or optimizer ) could guarantee the global optima in general . Instead their solutions ’ usefulness ( sometimes based on their proximity to optima ) , when the optima are unknown , can be very uncertain . Being able to quantify solution uncertainty directly provides calibration with ensured awareness of the solution quality and usefulness ( and another potential benefit is in optimization performance by enhancing the search efficiency ) . For instance , reliable and trustworthy machine learning models demand uncertainty awareness and quantification ( UQ ) during training ( optimizing ) such models , whereas in reality deep neural networks without proper modelling of uncertainty suffer from overconfidence and miscalibration ( Guo et al. , 2017 ) . In another example of 3D prediction of proteinprotein interactions , even though there exists the model uncertainty of the objective function and the data uncertainty of the protein structure data ( Cao & Shen , 2020 ) , state-of-the-art methods only predict several ranked solutions ( Porter et al. , 2019 ) without any associated uncertainty , which is hard for biologists to interpret . Despite progress in optimization with uncertainty-awareness , fundamental open questions remain : existing methods consider uncertainty either within the data or the model ( including objective functions ) ( Kendall & Gal , 2017 ; Ortega et al. , 2012 ; Cao & Shen , 2020 ) , whereas inconspicuous attention was paid to the uncertainty arising from the optimizer that is directly responsible for deriving the end solutions . The optimizer is usually prefabricated and fixed . For instance , there are several popular update rules in Bayesian optimization , such as expected improvement ( Vazquez & Bect , 2010 ) or upper confidence bound ( Srinivas et al. , 2009 ) , that are chosen and unaltered for the entire process . For Bayesian neural networks training , the update rule of the iterative optimizer is usu- ally chosen off-the-shelf like Adam , SGD , or RMSDrop . In principle , it is important to recognize the existence of an optimization algorithm space where the specific optimizer lies as well as the importance of the optimizer uncertainty , intrinsically defined in the space to the optimization and UQ solutions . In practice , such uncertainty is unwittingly omitted in the current context where an optimizer is treated as a de facto specified sample in the space . A naı̈ve characterization for a hand-built optimizer is to rely on a few of its hyper-parameters ( Wenzel et al. , 2020 ; Lorraine & Duvenaud , 2018 ) , whereas such a parameterization space could be too biased and restricted to span a broader and more complicated optimizer manifold , potentially resulting in inaccurate UQ results ( see Section 4 , confidence estimation for test functions ) . Fortunately , the recent surge of learning to optimize ( L2O ) ( Andrychowicz et al. , 2016a ; Li & Malik , 2016 ; Chen et al. , 2021 ) which is another prominent optimization paradigm , parameterized by a neural network using high-dimensional weights and following the data-driven ethos to learn the update rule adaptively , therefore introducing the less inductive bias and accompanied with the universal approximation ability , indicates a plausible solution to depict the sophisticated and more complete optimizer space . Contributions . The aforementioned introduction reveals and discusses the fundamental question of why modelling the optimizer uncertainty , and our contingent questions would be , what defines the optimizer uncertainty and how to enable UQ during optimization . We give the following answers . ( i ) We define the prior and likelihood of the optimizer ( Neal , 2012 ) , which routinely determine the optimizer posterior with the general product rule and Bayes ’ theorem . The optimizer uncertainty is therefore well-defined . ( ii ) To unseal UQ within optimization , we treat an optimizer as a random sample from an algorithmic space of iterative optimizers . We leverage the surging L2O technique ( Andrychowicz et al. , 2016a ; Li & Malik , 2016 ) with high-dimensional weights for the optimizer space parameterization . ( iii ) We further construct the end-to-end training pipeline via variational inference ( Kingma & Welling , 2013 ; Higgins et al. , 2016 ) to avoid the expensive computational cost of Markov chain Monte Carlo ( MCMC ) and degenerated posterior . The newly trained L2O is referred as uncertainty-aware L2O ( UA-L2O ) . In summary , the core intellectual value of this work is for the first time , we recognize and quantify a novel form of uncertainty that lies in the optimization algorithm space parameterized by L2O , apart from the classical data- or model-based uncertainties ( also known as epistemic and aleatoric uncertainties ( Fox & Ülkümen , 2011 ) ) . Extensive experiments show that UA-L2O had superior capability in uncertainty calibration thanks to the accurate estimation of solution posteriors . It confidence levels well match the chance for the global optimum falling in the corresponding intervals . Intriguingly , although not directly targeted , UA-L2O also outperformed competing methods in optimization performance , as seen in optimizing two out of three test functions in high dimensions , the loss function in data privacy attack , energy functions in four out of five protein-docking cases . 2 PRELIMINARIES . 2.1 LEARNING TO OPTIMIZE . Let us consider an optimization problem : minx f ( x ) where x ∈ Rd . A classic optimizer often iteratively updates x based on a handcrafted rule . For example , the first-order gradient descent algorithm takes an update at iteration t based on the local gradient at the instantaneous point xt : xt+1 = xt − α∇f ( xt ) , where α is the step size . Learning to Optimize ( L2O ) has lots of freedom to use the available information . We define zt as optimization trajectories ’ historical information up to time t , e.g. , the existing iterates x0 , . . . , xt , and/or their gradients ∇f ( x0 ) , . . . , ∇f ( xt ) . L2O models an update rule by a predictor function g of zt : xt+1 = xt − g ( zt ; φ ) , where the mapping of g is parameterized by φ . Finding an optimal update rule can be formulated mathematically as searching for a good φ over the parameter space of g. Practically , g is often a neural network . Since neural networks are universal approximators , L2O has the potential to discover completely new update rules without relying on existing rules . In order to find a desired φ associated with a fast optimizer , ( Andrychowicz et al. , 2016b ) proposed to minimize the weighted sum of the objective function f ( xt ) over a time span T : min φ T∑ t=1 wtf ( xt ) , with xt+1 = xt − g ( zt ; φ ) , t = 0 , . . . , T − 1 , ( 1 ) where w1 , . . . , wT are the weights whose choices vary from case to case and depend on empirical settings . Note that φ determines the objective value through determining the iterates xt . L2O solves the problem ( 1 ) for a desirable φ and correspondingly the update rule g ( zt ; φ ) . A typical L2O workflow is divided into two stages ( Chen et al. , 2021 ) : a meta-training stage that learns the optimizer with a set of similar optimizees from the task distribution ; and a meta-testing stage that applies the learned optimizer to training new unseen optimizees . The meta-training process often occurs offline and is time consuming . However , the online application of the method is ( aimed to be ) time saving . 2.2 THE UNCERTAINTY OF OPTIMIZATION . The choice of optimizers is recognized to remarkably impact the solution quality , especially for non-convex and rugged objectives such as various loss functions for training deep networks . While non-convex optimization is NP-hard and the global optimum is never guaranteed , domain users usually can only blindly take the solutions given by a particular optimizer , or choose from several well-known algorithms based on human experiences or on an ad hoc basis . Such trial-and-error selections are biased and restricted to span a more complete optimizer manifold , and computationally expensive , even intractable when new algorithms are to be discovered by L2O , whose “ fitness ” or confidence on certain problem instances ( especially instances with shifts from the target task distributions ) is never known . Given a specific problem instance , if we can provide a confidence score or quantify the uncertainty of each candidate optimizer , it will certainly improve the selection and calibration of optimization algorithms , in particular the learned optimizers since they are essentially all “ new ” , and hence enhancing the reliability of L2O . As for non-convex objectives , different choices of optimizers , even each algorithm ’ s hyperparameter or initialization variations , can lead to vastly different solutions , implying a new type of uncertainty arising from choosing optimizers . Stochastic optimization methods like random search ( Zhigljavsky , 2012 ) , simulated annealing ( Kirkpatrick et al. , 1983 ) and genetic algorithms ( Goldenberg , 1989 ) inject the randomness into algorithms to reduce solution uncertainty . However , they can not reliably quantify its effect on the final solutions . Several works explored uncertainty quantification during optimization , by Bayesian optimization ( Hennig & Schuler , 2012 ; Wang & Jegelka , 2017 ) or Monte Carlo sampling ( Ortega et al. , 2012 ) . However , those methods are often computationally too expensive , not to mention applied within the already costly L2O process . More importantly , they neither explicitly consider the uncertainty within the optimizer itself , nor concern the automatic learning and discovery of the most suitable optimizer . 3 TECHNICAL APPROACH . To quantify and address such “ fitness ” especially for the L2O parameterization in a principled way , we will introduce this new optimizer uncertainty arising from the choice of optimization algorithms , which is different from the classical data- or model-based uncertainties ( also known as epistemic and aleatoric uncertainties ( Fox & Ülkümen , 2011 ) ) . We will explore : how to quantify optimizer uncertainty ? how to design a learned optimizer so that its uncertainty can be more accurately quantified ? what is the best calibrated optimizer we can choose or learn for a given problem ? The core innovation is to treat an optimizer as a random sample from a continuous algorithmic space , rather than one of a few hand-crafted update rules , so as to model the intrinsic uncertainty within the optimizer . This novel view of algorithmic space is particularly enabled by L2O . Note an L2O update rule is typically parameterized by a neural network g , with its inputs zt and learnable parameters φ . Its learning capacity allows us to “ sample ” optimizers by taking g ( · ; φ ) with different weights φ . That is sufficiently versatile and flexible in practice . 3.1 CONCEPTS FOR OPTIMIZER UNCERTAINTY . Without loss of generality , we define am iterative algorithmic space G , where each point g ∈ G produces an update g ( zt ) dependent on the current/past zero-th order and/or first-order information zt . We treat g as a random vector from G , that leads to defining the optimizer uncertainty as follows : Definition 1 ( Optimizer Uncertainty ) Let G be the algorithmic space , where each point g ∈ G is an optimizer ( omitting φ parameterization ) . We assume that 1. g has a prior distribution p ( g ) ; 2 . Its likelihood can be interpreted as p ( zt|zt0 , g ) = ∏t i=t0+1 p ( xi|zi−1 , g ) , ∀t0 < t. The likelihood factorization is based on causality of first-order optimizers , i.e. , ( xi , zi ) depends solely on { ( xi0 , zi0 ) } i0 < i given g. Thereby , we define the optimizer uncertainty at step t as the posterior of g , that is a conditional distribution on the t steps of the trajectory , using Bayes ’ theorem : p ( g|zt ) ∝ p ( g ) t∏ i=1 p ( xi|zi−1 , g ) . ( 2 ) Intuitively , the prior p ( g ) represents the belief about well-performing optimizers , the likelihood p ( zt|zt0 , g ) represents the probability of observing an optimization trajectory ( data ) under a given optimizer g , and the posterior p ( g|zt ) represents the probability for g being the optimizer generating the observed data . Prior work on hyper-parameter optimization ( HPO ) for classical algorithms ( Feurer & Hutter , 2019 ) could be viewed as a special case of L2O ( e.g. , only a few hyper-parameters are “ learnable ” , which resulting in a much biased and restricted prior p ( g ) ) . The seminal work Bergstra et al . ( 2011 ) optimized hyper-parameters using posterior-based fitness modeling . Recently , Wenzel et al . ( 2020 ) proposed a non-Bayesian approach of hyper-parameter ensembling that can estimate the predictive uncertainty of an optimization algorithm by varying hyper-parameters . Our work generalizes from tuning a few hyper-parameters to learning the entire optimizer space , and extends a Bayesian treatment . Since L2O involves much higher-dimensional parameters compared to HPO , its uncertainty quantification calls for computationally tractable and scalable approaches , which is detailed next . | This paper proposes a Bayesian Learning to Optimize technique called Uncertainty-Aware Learning to Optimize (UA-L2O). The main contribution of this paper is its introduction of the concept of the space of optimization algorithms and treating an optimizer as a random sample from it, and deriving a proper Bayesian inference algorithm based on that concept. The space of optimization algorithms, to simplify, is expressed as a space of parameters of learned optimizers $\phi$, and a Gaussian prior is placed on those parameters. The posterior inference procedure is approximated with variational inference with reparameterization tricks, and the actual deployment of the learned optimizer is done with Monte-Carlo approximation with learned variational distribution for the optimizer parameters $\phi$. The proposed algorithm is applied to various synthetic and real-world optimization problems and showed some useful calibration behaviors. | SP:a8bdcabcf44211bbf6dd7778f71792771ed619f4 |
Bayesian Modeling and Uncertainty Quantification for Learning to Optimize: What, Why, and How | 1 INTRODUCTION . Computational models of many real-world applications involve optimizing non-convex objective functions . As the non-convex optimization problem is NP-hard , no optimization algorithm ( or optimizer ) could guarantee the global optima in general . Instead their solutions ’ usefulness ( sometimes based on their proximity to optima ) , when the optima are unknown , can be very uncertain . Being able to quantify solution uncertainty directly provides calibration with ensured awareness of the solution quality and usefulness ( and another potential benefit is in optimization performance by enhancing the search efficiency ) . For instance , reliable and trustworthy machine learning models demand uncertainty awareness and quantification ( UQ ) during training ( optimizing ) such models , whereas in reality deep neural networks without proper modelling of uncertainty suffer from overconfidence and miscalibration ( Guo et al. , 2017 ) . In another example of 3D prediction of proteinprotein interactions , even though there exists the model uncertainty of the objective function and the data uncertainty of the protein structure data ( Cao & Shen , 2020 ) , state-of-the-art methods only predict several ranked solutions ( Porter et al. , 2019 ) without any associated uncertainty , which is hard for biologists to interpret . Despite progress in optimization with uncertainty-awareness , fundamental open questions remain : existing methods consider uncertainty either within the data or the model ( including objective functions ) ( Kendall & Gal , 2017 ; Ortega et al. , 2012 ; Cao & Shen , 2020 ) , whereas inconspicuous attention was paid to the uncertainty arising from the optimizer that is directly responsible for deriving the end solutions . The optimizer is usually prefabricated and fixed . For instance , there are several popular update rules in Bayesian optimization , such as expected improvement ( Vazquez & Bect , 2010 ) or upper confidence bound ( Srinivas et al. , 2009 ) , that are chosen and unaltered for the entire process . For Bayesian neural networks training , the update rule of the iterative optimizer is usu- ally chosen off-the-shelf like Adam , SGD , or RMSDrop . In principle , it is important to recognize the existence of an optimization algorithm space where the specific optimizer lies as well as the importance of the optimizer uncertainty , intrinsically defined in the space to the optimization and UQ solutions . In practice , such uncertainty is unwittingly omitted in the current context where an optimizer is treated as a de facto specified sample in the space . A naı̈ve characterization for a hand-built optimizer is to rely on a few of its hyper-parameters ( Wenzel et al. , 2020 ; Lorraine & Duvenaud , 2018 ) , whereas such a parameterization space could be too biased and restricted to span a broader and more complicated optimizer manifold , potentially resulting in inaccurate UQ results ( see Section 4 , confidence estimation for test functions ) . Fortunately , the recent surge of learning to optimize ( L2O ) ( Andrychowicz et al. , 2016a ; Li & Malik , 2016 ; Chen et al. , 2021 ) which is another prominent optimization paradigm , parameterized by a neural network using high-dimensional weights and following the data-driven ethos to learn the update rule adaptively , therefore introducing the less inductive bias and accompanied with the universal approximation ability , indicates a plausible solution to depict the sophisticated and more complete optimizer space . Contributions . The aforementioned introduction reveals and discusses the fundamental question of why modelling the optimizer uncertainty , and our contingent questions would be , what defines the optimizer uncertainty and how to enable UQ during optimization . We give the following answers . ( i ) We define the prior and likelihood of the optimizer ( Neal , 2012 ) , which routinely determine the optimizer posterior with the general product rule and Bayes ’ theorem . The optimizer uncertainty is therefore well-defined . ( ii ) To unseal UQ within optimization , we treat an optimizer as a random sample from an algorithmic space of iterative optimizers . We leverage the surging L2O technique ( Andrychowicz et al. , 2016a ; Li & Malik , 2016 ) with high-dimensional weights for the optimizer space parameterization . ( iii ) We further construct the end-to-end training pipeline via variational inference ( Kingma & Welling , 2013 ; Higgins et al. , 2016 ) to avoid the expensive computational cost of Markov chain Monte Carlo ( MCMC ) and degenerated posterior . The newly trained L2O is referred as uncertainty-aware L2O ( UA-L2O ) . In summary , the core intellectual value of this work is for the first time , we recognize and quantify a novel form of uncertainty that lies in the optimization algorithm space parameterized by L2O , apart from the classical data- or model-based uncertainties ( also known as epistemic and aleatoric uncertainties ( Fox & Ülkümen , 2011 ) ) . Extensive experiments show that UA-L2O had superior capability in uncertainty calibration thanks to the accurate estimation of solution posteriors . It confidence levels well match the chance for the global optimum falling in the corresponding intervals . Intriguingly , although not directly targeted , UA-L2O also outperformed competing methods in optimization performance , as seen in optimizing two out of three test functions in high dimensions , the loss function in data privacy attack , energy functions in four out of five protein-docking cases . 2 PRELIMINARIES . 2.1 LEARNING TO OPTIMIZE . Let us consider an optimization problem : minx f ( x ) where x ∈ Rd . A classic optimizer often iteratively updates x based on a handcrafted rule . For example , the first-order gradient descent algorithm takes an update at iteration t based on the local gradient at the instantaneous point xt : xt+1 = xt − α∇f ( xt ) , where α is the step size . Learning to Optimize ( L2O ) has lots of freedom to use the available information . We define zt as optimization trajectories ’ historical information up to time t , e.g. , the existing iterates x0 , . . . , xt , and/or their gradients ∇f ( x0 ) , . . . , ∇f ( xt ) . L2O models an update rule by a predictor function g of zt : xt+1 = xt − g ( zt ; φ ) , where the mapping of g is parameterized by φ . Finding an optimal update rule can be formulated mathematically as searching for a good φ over the parameter space of g. Practically , g is often a neural network . Since neural networks are universal approximators , L2O has the potential to discover completely new update rules without relying on existing rules . In order to find a desired φ associated with a fast optimizer , ( Andrychowicz et al. , 2016b ) proposed to minimize the weighted sum of the objective function f ( xt ) over a time span T : min φ T∑ t=1 wtf ( xt ) , with xt+1 = xt − g ( zt ; φ ) , t = 0 , . . . , T − 1 , ( 1 ) where w1 , . . . , wT are the weights whose choices vary from case to case and depend on empirical settings . Note that φ determines the objective value through determining the iterates xt . L2O solves the problem ( 1 ) for a desirable φ and correspondingly the update rule g ( zt ; φ ) . A typical L2O workflow is divided into two stages ( Chen et al. , 2021 ) : a meta-training stage that learns the optimizer with a set of similar optimizees from the task distribution ; and a meta-testing stage that applies the learned optimizer to training new unseen optimizees . The meta-training process often occurs offline and is time consuming . However , the online application of the method is ( aimed to be ) time saving . 2.2 THE UNCERTAINTY OF OPTIMIZATION . The choice of optimizers is recognized to remarkably impact the solution quality , especially for non-convex and rugged objectives such as various loss functions for training deep networks . While non-convex optimization is NP-hard and the global optimum is never guaranteed , domain users usually can only blindly take the solutions given by a particular optimizer , or choose from several well-known algorithms based on human experiences or on an ad hoc basis . Such trial-and-error selections are biased and restricted to span a more complete optimizer manifold , and computationally expensive , even intractable when new algorithms are to be discovered by L2O , whose “ fitness ” or confidence on certain problem instances ( especially instances with shifts from the target task distributions ) is never known . Given a specific problem instance , if we can provide a confidence score or quantify the uncertainty of each candidate optimizer , it will certainly improve the selection and calibration of optimization algorithms , in particular the learned optimizers since they are essentially all “ new ” , and hence enhancing the reliability of L2O . As for non-convex objectives , different choices of optimizers , even each algorithm ’ s hyperparameter or initialization variations , can lead to vastly different solutions , implying a new type of uncertainty arising from choosing optimizers . Stochastic optimization methods like random search ( Zhigljavsky , 2012 ) , simulated annealing ( Kirkpatrick et al. , 1983 ) and genetic algorithms ( Goldenberg , 1989 ) inject the randomness into algorithms to reduce solution uncertainty . However , they can not reliably quantify its effect on the final solutions . Several works explored uncertainty quantification during optimization , by Bayesian optimization ( Hennig & Schuler , 2012 ; Wang & Jegelka , 2017 ) or Monte Carlo sampling ( Ortega et al. , 2012 ) . However , those methods are often computationally too expensive , not to mention applied within the already costly L2O process . More importantly , they neither explicitly consider the uncertainty within the optimizer itself , nor concern the automatic learning and discovery of the most suitable optimizer . 3 TECHNICAL APPROACH . To quantify and address such “ fitness ” especially for the L2O parameterization in a principled way , we will introduce this new optimizer uncertainty arising from the choice of optimization algorithms , which is different from the classical data- or model-based uncertainties ( also known as epistemic and aleatoric uncertainties ( Fox & Ülkümen , 2011 ) ) . We will explore : how to quantify optimizer uncertainty ? how to design a learned optimizer so that its uncertainty can be more accurately quantified ? what is the best calibrated optimizer we can choose or learn for a given problem ? The core innovation is to treat an optimizer as a random sample from a continuous algorithmic space , rather than one of a few hand-crafted update rules , so as to model the intrinsic uncertainty within the optimizer . This novel view of algorithmic space is particularly enabled by L2O . Note an L2O update rule is typically parameterized by a neural network g , with its inputs zt and learnable parameters φ . Its learning capacity allows us to “ sample ” optimizers by taking g ( · ; φ ) with different weights φ . That is sufficiently versatile and flexible in practice . 3.1 CONCEPTS FOR OPTIMIZER UNCERTAINTY . Without loss of generality , we define am iterative algorithmic space G , where each point g ∈ G produces an update g ( zt ) dependent on the current/past zero-th order and/or first-order information zt . We treat g as a random vector from G , that leads to defining the optimizer uncertainty as follows : Definition 1 ( Optimizer Uncertainty ) Let G be the algorithmic space , where each point g ∈ G is an optimizer ( omitting φ parameterization ) . We assume that 1. g has a prior distribution p ( g ) ; 2 . Its likelihood can be interpreted as p ( zt|zt0 , g ) = ∏t i=t0+1 p ( xi|zi−1 , g ) , ∀t0 < t. The likelihood factorization is based on causality of first-order optimizers , i.e. , ( xi , zi ) depends solely on { ( xi0 , zi0 ) } i0 < i given g. Thereby , we define the optimizer uncertainty at step t as the posterior of g , that is a conditional distribution on the t steps of the trajectory , using Bayes ’ theorem : p ( g|zt ) ∝ p ( g ) t∏ i=1 p ( xi|zi−1 , g ) . ( 2 ) Intuitively , the prior p ( g ) represents the belief about well-performing optimizers , the likelihood p ( zt|zt0 , g ) represents the probability of observing an optimization trajectory ( data ) under a given optimizer g , and the posterior p ( g|zt ) represents the probability for g being the optimizer generating the observed data . Prior work on hyper-parameter optimization ( HPO ) for classical algorithms ( Feurer & Hutter , 2019 ) could be viewed as a special case of L2O ( e.g. , only a few hyper-parameters are “ learnable ” , which resulting in a much biased and restricted prior p ( g ) ) . The seminal work Bergstra et al . ( 2011 ) optimized hyper-parameters using posterior-based fitness modeling . Recently , Wenzel et al . ( 2020 ) proposed a non-Bayesian approach of hyper-parameter ensembling that can estimate the predictive uncertainty of an optimization algorithm by varying hyper-parameters . Our work generalizes from tuning a few hyper-parameters to learning the entire optimizer space , and extends a Bayesian treatment . Since L2O involves much higher-dimensional parameters compared to HPO , its uncertainty quantification calls for computationally tractable and scalable approaches , which is detailed next . | This paper considers the problem of quantifying the uncertainty of an optimizer used to do inference on a given model. The authors take a Bayesian approach and treat the optimizer as a random variable in the space of algorithms. They derive an approximate posterior via variational inference. | SP:a8bdcabcf44211bbf6dd7778f71792771ed619f4 |
Bayesian Modeling and Uncertainty Quantification for Learning to Optimize: What, Why, and How | 1 INTRODUCTION . Computational models of many real-world applications involve optimizing non-convex objective functions . As the non-convex optimization problem is NP-hard , no optimization algorithm ( or optimizer ) could guarantee the global optima in general . Instead their solutions ’ usefulness ( sometimes based on their proximity to optima ) , when the optima are unknown , can be very uncertain . Being able to quantify solution uncertainty directly provides calibration with ensured awareness of the solution quality and usefulness ( and another potential benefit is in optimization performance by enhancing the search efficiency ) . For instance , reliable and trustworthy machine learning models demand uncertainty awareness and quantification ( UQ ) during training ( optimizing ) such models , whereas in reality deep neural networks without proper modelling of uncertainty suffer from overconfidence and miscalibration ( Guo et al. , 2017 ) . In another example of 3D prediction of proteinprotein interactions , even though there exists the model uncertainty of the objective function and the data uncertainty of the protein structure data ( Cao & Shen , 2020 ) , state-of-the-art methods only predict several ranked solutions ( Porter et al. , 2019 ) without any associated uncertainty , which is hard for biologists to interpret . Despite progress in optimization with uncertainty-awareness , fundamental open questions remain : existing methods consider uncertainty either within the data or the model ( including objective functions ) ( Kendall & Gal , 2017 ; Ortega et al. , 2012 ; Cao & Shen , 2020 ) , whereas inconspicuous attention was paid to the uncertainty arising from the optimizer that is directly responsible for deriving the end solutions . The optimizer is usually prefabricated and fixed . For instance , there are several popular update rules in Bayesian optimization , such as expected improvement ( Vazquez & Bect , 2010 ) or upper confidence bound ( Srinivas et al. , 2009 ) , that are chosen and unaltered for the entire process . For Bayesian neural networks training , the update rule of the iterative optimizer is usu- ally chosen off-the-shelf like Adam , SGD , or RMSDrop . In principle , it is important to recognize the existence of an optimization algorithm space where the specific optimizer lies as well as the importance of the optimizer uncertainty , intrinsically defined in the space to the optimization and UQ solutions . In practice , such uncertainty is unwittingly omitted in the current context where an optimizer is treated as a de facto specified sample in the space . A naı̈ve characterization for a hand-built optimizer is to rely on a few of its hyper-parameters ( Wenzel et al. , 2020 ; Lorraine & Duvenaud , 2018 ) , whereas such a parameterization space could be too biased and restricted to span a broader and more complicated optimizer manifold , potentially resulting in inaccurate UQ results ( see Section 4 , confidence estimation for test functions ) . Fortunately , the recent surge of learning to optimize ( L2O ) ( Andrychowicz et al. , 2016a ; Li & Malik , 2016 ; Chen et al. , 2021 ) which is another prominent optimization paradigm , parameterized by a neural network using high-dimensional weights and following the data-driven ethos to learn the update rule adaptively , therefore introducing the less inductive bias and accompanied with the universal approximation ability , indicates a plausible solution to depict the sophisticated and more complete optimizer space . Contributions . The aforementioned introduction reveals and discusses the fundamental question of why modelling the optimizer uncertainty , and our contingent questions would be , what defines the optimizer uncertainty and how to enable UQ during optimization . We give the following answers . ( i ) We define the prior and likelihood of the optimizer ( Neal , 2012 ) , which routinely determine the optimizer posterior with the general product rule and Bayes ’ theorem . The optimizer uncertainty is therefore well-defined . ( ii ) To unseal UQ within optimization , we treat an optimizer as a random sample from an algorithmic space of iterative optimizers . We leverage the surging L2O technique ( Andrychowicz et al. , 2016a ; Li & Malik , 2016 ) with high-dimensional weights for the optimizer space parameterization . ( iii ) We further construct the end-to-end training pipeline via variational inference ( Kingma & Welling , 2013 ; Higgins et al. , 2016 ) to avoid the expensive computational cost of Markov chain Monte Carlo ( MCMC ) and degenerated posterior . The newly trained L2O is referred as uncertainty-aware L2O ( UA-L2O ) . In summary , the core intellectual value of this work is for the first time , we recognize and quantify a novel form of uncertainty that lies in the optimization algorithm space parameterized by L2O , apart from the classical data- or model-based uncertainties ( also known as epistemic and aleatoric uncertainties ( Fox & Ülkümen , 2011 ) ) . Extensive experiments show that UA-L2O had superior capability in uncertainty calibration thanks to the accurate estimation of solution posteriors . It confidence levels well match the chance for the global optimum falling in the corresponding intervals . Intriguingly , although not directly targeted , UA-L2O also outperformed competing methods in optimization performance , as seen in optimizing two out of three test functions in high dimensions , the loss function in data privacy attack , energy functions in four out of five protein-docking cases . 2 PRELIMINARIES . 2.1 LEARNING TO OPTIMIZE . Let us consider an optimization problem : minx f ( x ) where x ∈ Rd . A classic optimizer often iteratively updates x based on a handcrafted rule . For example , the first-order gradient descent algorithm takes an update at iteration t based on the local gradient at the instantaneous point xt : xt+1 = xt − α∇f ( xt ) , where α is the step size . Learning to Optimize ( L2O ) has lots of freedom to use the available information . We define zt as optimization trajectories ’ historical information up to time t , e.g. , the existing iterates x0 , . . . , xt , and/or their gradients ∇f ( x0 ) , . . . , ∇f ( xt ) . L2O models an update rule by a predictor function g of zt : xt+1 = xt − g ( zt ; φ ) , where the mapping of g is parameterized by φ . Finding an optimal update rule can be formulated mathematically as searching for a good φ over the parameter space of g. Practically , g is often a neural network . Since neural networks are universal approximators , L2O has the potential to discover completely new update rules without relying on existing rules . In order to find a desired φ associated with a fast optimizer , ( Andrychowicz et al. , 2016b ) proposed to minimize the weighted sum of the objective function f ( xt ) over a time span T : min φ T∑ t=1 wtf ( xt ) , with xt+1 = xt − g ( zt ; φ ) , t = 0 , . . . , T − 1 , ( 1 ) where w1 , . . . , wT are the weights whose choices vary from case to case and depend on empirical settings . Note that φ determines the objective value through determining the iterates xt . L2O solves the problem ( 1 ) for a desirable φ and correspondingly the update rule g ( zt ; φ ) . A typical L2O workflow is divided into two stages ( Chen et al. , 2021 ) : a meta-training stage that learns the optimizer with a set of similar optimizees from the task distribution ; and a meta-testing stage that applies the learned optimizer to training new unseen optimizees . The meta-training process often occurs offline and is time consuming . However , the online application of the method is ( aimed to be ) time saving . 2.2 THE UNCERTAINTY OF OPTIMIZATION . The choice of optimizers is recognized to remarkably impact the solution quality , especially for non-convex and rugged objectives such as various loss functions for training deep networks . While non-convex optimization is NP-hard and the global optimum is never guaranteed , domain users usually can only blindly take the solutions given by a particular optimizer , or choose from several well-known algorithms based on human experiences or on an ad hoc basis . Such trial-and-error selections are biased and restricted to span a more complete optimizer manifold , and computationally expensive , even intractable when new algorithms are to be discovered by L2O , whose “ fitness ” or confidence on certain problem instances ( especially instances with shifts from the target task distributions ) is never known . Given a specific problem instance , if we can provide a confidence score or quantify the uncertainty of each candidate optimizer , it will certainly improve the selection and calibration of optimization algorithms , in particular the learned optimizers since they are essentially all “ new ” , and hence enhancing the reliability of L2O . As for non-convex objectives , different choices of optimizers , even each algorithm ’ s hyperparameter or initialization variations , can lead to vastly different solutions , implying a new type of uncertainty arising from choosing optimizers . Stochastic optimization methods like random search ( Zhigljavsky , 2012 ) , simulated annealing ( Kirkpatrick et al. , 1983 ) and genetic algorithms ( Goldenberg , 1989 ) inject the randomness into algorithms to reduce solution uncertainty . However , they can not reliably quantify its effect on the final solutions . Several works explored uncertainty quantification during optimization , by Bayesian optimization ( Hennig & Schuler , 2012 ; Wang & Jegelka , 2017 ) or Monte Carlo sampling ( Ortega et al. , 2012 ) . However , those methods are often computationally too expensive , not to mention applied within the already costly L2O process . More importantly , they neither explicitly consider the uncertainty within the optimizer itself , nor concern the automatic learning and discovery of the most suitable optimizer . 3 TECHNICAL APPROACH . To quantify and address such “ fitness ” especially for the L2O parameterization in a principled way , we will introduce this new optimizer uncertainty arising from the choice of optimization algorithms , which is different from the classical data- or model-based uncertainties ( also known as epistemic and aleatoric uncertainties ( Fox & Ülkümen , 2011 ) ) . We will explore : how to quantify optimizer uncertainty ? how to design a learned optimizer so that its uncertainty can be more accurately quantified ? what is the best calibrated optimizer we can choose or learn for a given problem ? The core innovation is to treat an optimizer as a random sample from a continuous algorithmic space , rather than one of a few hand-crafted update rules , so as to model the intrinsic uncertainty within the optimizer . This novel view of algorithmic space is particularly enabled by L2O . Note an L2O update rule is typically parameterized by a neural network g , with its inputs zt and learnable parameters φ . Its learning capacity allows us to “ sample ” optimizers by taking g ( · ; φ ) with different weights φ . That is sufficiently versatile and flexible in practice . 3.1 CONCEPTS FOR OPTIMIZER UNCERTAINTY . Without loss of generality , we define am iterative algorithmic space G , where each point g ∈ G produces an update g ( zt ) dependent on the current/past zero-th order and/or first-order information zt . We treat g as a random vector from G , that leads to defining the optimizer uncertainty as follows : Definition 1 ( Optimizer Uncertainty ) Let G be the algorithmic space , where each point g ∈ G is an optimizer ( omitting φ parameterization ) . We assume that 1. g has a prior distribution p ( g ) ; 2 . Its likelihood can be interpreted as p ( zt|zt0 , g ) = ∏t i=t0+1 p ( xi|zi−1 , g ) , ∀t0 < t. The likelihood factorization is based on causality of first-order optimizers , i.e. , ( xi , zi ) depends solely on { ( xi0 , zi0 ) } i0 < i given g. Thereby , we define the optimizer uncertainty at step t as the posterior of g , that is a conditional distribution on the t steps of the trajectory , using Bayes ’ theorem : p ( g|zt ) ∝ p ( g ) t∏ i=1 p ( xi|zi−1 , g ) . ( 2 ) Intuitively , the prior p ( g ) represents the belief about well-performing optimizers , the likelihood p ( zt|zt0 , g ) represents the probability of observing an optimization trajectory ( data ) under a given optimizer g , and the posterior p ( g|zt ) represents the probability for g being the optimizer generating the observed data . Prior work on hyper-parameter optimization ( HPO ) for classical algorithms ( Feurer & Hutter , 2019 ) could be viewed as a special case of L2O ( e.g. , only a few hyper-parameters are “ learnable ” , which resulting in a much biased and restricted prior p ( g ) ) . The seminal work Bergstra et al . ( 2011 ) optimized hyper-parameters using posterior-based fitness modeling . Recently , Wenzel et al . ( 2020 ) proposed a non-Bayesian approach of hyper-parameter ensembling that can estimate the predictive uncertainty of an optimization algorithm by varying hyper-parameters . Our work generalizes from tuning a few hyper-parameters to learning the entire optimizer space , and extends a Bayesian treatment . Since L2O involves much higher-dimensional parameters compared to HPO , its uncertainty quantification calls for computationally tractable and scalable approaches , which is detailed next . | The authors looked at uncertainty quantification (UQ) of optimization algorithms. Working under the L2O framework and adopting the Bayesian approach, they used a neural network to model the updating rule, and endowed the network weights with a prior. By treating the solution iterates and their gradients as data, the authors defined a conditional likelihood on them. The resulting posterior on the network weights is then approximated using a variational algorithm. To conduct inference, the authors computed the predictive density of the solution through Monte Carlo sampling. This end-to-end pipeline is called uncertainty aware L2O (UA-L2O) and it is applied to quantify uncertainty in various learning tasks. | SP:a8bdcabcf44211bbf6dd7778f71792771ed619f4 |
Training invariances and the low-rank phenomenon: beyond linear networks | 1 INTRODUCTION . Recently , great progress has been made in understanding the trajectory of gradient flow ( GF ) ( Ji & Telgarsky , 2019 ; 2020 ; Lyu & Li , 2020 ) , gradient descent ( GD ) ( Ji & Telgarsky , 2019 ; Arora et al. , 2018 ) and stochastic gradient descent ( SGD ) ( Neyshabur et al. , 2015 ; 2017 ) in the training of neural networks . While good theory has been developed for deep linear networks ( Zhou & Liang , 2018 ; Arora et al. , 2018 ) , practical architectures such as ReLU fully-connected networks or ResNets are highly non-linear . This causes the underlying optimization problem ( usually empirical risk minimization ) to be highly non-smooth ( e.g . for ReLUs ) and non-convex , necessitating special tools such as the Clarke subdifferential ( Clarke , 1983 ) . One of the many exciting results of this body of literature is that gradient-based algorithms exhibit some form of implicit regularization : the optimization algorithm prefers some stationary points to others . In particular , a wide range of implicit biases has been shown in practice ( Huh et al. , 2021 ) and proven for deep linear networks ( Arora et al. , 2018 ; Ji & Telgarsky , 2019 ) , convolutional neural networks ( Gunasekar et al. , 2018 ) and homogeneous networks ( Ji & Telgarsky , 2020 ) . One well known result for linearly separable data is that in various practical settings , linear networks converge to the solution of the hard SVM problem , i.e. , a max-margin classifier ( Ji & Telgarsky , 2019 ) , while a relaxed version is true for CNNs ( Gunasekar et al. , 2018 ) . This holds even when the margin does not explicitly appear in the optimization objective - hence the name implicit regularization . Another strong form of implicit regularization relates to the structure of weight matrices of fully connected networks . In particular , Ji & Telgarsky ( 2019 ) prove that for deep linear networks for binary classification , weight matrices tend to rank-1 matrices in Frobenius norm as a result of GF/GD training , and that adjacent layers ’ singular vectors align . The max-margin phenomenon follows as a result . In practice , Huh et al . ( 2021 ) empirically document the low rank bias across different non-linear architectures . However , their results include ReLU fully-connected networks , CNNs and ReNet , which are not all covered by the existing theory . Beyond linear fully connected networks , Du et al . ( 2018 ) show vertex-wise invariances for fully-connected ReLU networks and invariances in Frobenius norm differences between layers for CNNs . Yet , despite the evidence in ( Huh et al. , 2021 ) , it has been an open theoretical question how more detailed structural relations between layers , which , e.g. , imply the low-rank result , generalize to other , structured or local nonlinear and possibly non-homogeneous architectures , and how to even characterize these . Hence , in this work , we take steps to addressing a wider set of architectures and invariances . First , we show a class of vertex and edge-wise quantities that remain invariant during gradient flow training . Applying these invariances to architectures containing fully connected , convolutional and residual blocks , arranged appropriately , we obtain invariances of the singular values in adjacent ( weight ) matrices . Second , we prove how the controlled singular values imply low-rank results for fully connected ReLU networks . Third , we obtain low-rank results for arbitrary non-homogeneous networks whose last few layers contain fully-connected and ResNet blocks . To the best of our knowledge , this is the first time a low-rank phenomenon is proven rigorously for these architectures . Our theoretical results offer explanations for empirical observations on more general architectures , and apply to the experiments in ( Huh et al. , 2021 ) for ResNet and CNNs . They also include the squared loss used there , in addition to the exponential or logistic loss used in most theoretical low-rank results . Moreover , our Theorem 2 gives an explanation for the “ reduced alignment ” phenomenon observed by Ji & Telgarsky ( 2019 ) , where in experiments on AlexNet over CIFAR-10 the ratio ‖W‖2/‖W‖F converges to a value strictly less than 1 for some fully-connected layer W towards the end of the network . One challenge in the analysis is the non-smoothness of the networks and ensuring an “ operational ” chain rule . To cope with this setting , we use a specific decomposition of an arbitrary ReLU architecture into a multilinear function and a ReLU network with +1/-1 weights . This reduction holds in the stable sign regime , a certain convergence setting of the parameters . This regime is different from stable activations , and is implied , e.g. , by directional convergence of the parameters to a vector with non-zero entries ( Lemma 2 ) . This construction may be of independent interest . In short , we make the following contributions to analyzing implicit biases of general architectures : • We show vertex and edge-wise weight invariances during training with gradient flow . Using these invariances , we prove that for architectures containing fully-connected layers , convolutional layers and residual blocks , when appropriately organized into matrices , adjacent matrices have the same singular value , up to initialization ( Theorem 1 ) . • We prove that in the stable sign regime , weight matrices in a fully-connected ReLU-activated network tend to rank-1 matrices ( Corollary 1 ) . We also show a low-rank bias for arbitrary nonhomogeneous feedforward networks whose last few layers are a composition of fully-connected and ResNet blocks ( Theorem 2 ) . In particular , if the Frobenius norms of these layers diverge , then the ratio between their operator norm and Frobenius norm is bounded non-trivially by an expression C fully specified by the architecture . To the best of our knowledge , this is the first time this type of bias is shown for nonlinear , nonhomogeneous networks . • We prove our results via a decomposition that reduces arbitrarily structured deep feedforward networks with positively-homogeneous activation ( e.g. , ReLU or linear ) to a multilinear structure ( Lemma 2 ) . 1.1 RELATED WORKS . Decomposition of fully-connected neural networks into a multilinear part and a 0-1 part has been utilized by Choromanska et al . ( 2015 ) ; Kawaguchi ( 2016 ) but their formulation does not apply for trajectory studies . In Section 3 , we give a detailed comparison between their approach and ours . Our decomposition makes use of the construction of a tree net that has been used by Khim & Loh ( 2019 ) in analyzing generalization of fully-connected networks . We describe their approach in 2 and show how we extend their construction to arbitrary feedforward neural nets . This construction makes up the first part of the proof of our decomposition lemma . The paper also makes use of path enumeration of neural nets , which overlaps with the path-norm literature of Neyshabur et al . ( 2015 ; 2017 ) . The distinction is that we are studying classical gradient flow , as opposed to SGD ( Neyshabur et al. , 2015 ) or its variants ( Neyshabur et al. , 2017 ) . For linear networks , low-rank bias is proven for separable data and exponential-tailed loss in Ji & Telgarsky ( 2019 ) . Du et al . ( 2018 ) give certain vertex-wise invariances for fully-connected ReLU networks and Frobenius norm difference invariances for CNNs . Compared to their results , ours are slightly stronger since we prove that our invariances hold for almost every time t on the gradient flow trajectory , thus allowing for the use of a Fundamental Theorem of Calculus and downstream analysis . Moreover , the set of invariances we show is strictly larger . Radhakrishnan et al . ( 2020 ) show negative results when generalizing the low-rank bias from ( Ji & Telgarsky , 2019 ) to vectorvalued neural networks . In our work , we only consider scalar-valued neural networks performing binary classification . 2 PRELIMINARIES AND NOTATION . For an integer k ∈ N , we write the set [ k ] : = { 1 , 2 , . . . , k } . For vectors , we extend the sign function sgn : R → { −1 , 1 } coordinatewise as sgn : ( xi ) i∈ [ d ] 7→ ( sgn ( xi ) ) i∈ [ d ] . For some ( usually the canonical ) basis ( ei ) i∈ [ n ] in some vector space Rn , for all x ∈ Rn we use the notation [ x ] i = 〈x , ei〉 to denote the i-th coordinate of x. Clarke subdifferential , definability and nonsmooth analysis . The analysis of non-smooth functions is central to our results . For a locally Lipschitz function f : D → R with open domain D , there exists a set Dc ⊆ D of full Lebesgue measure on which the derivative ∇f exists everywhere by Rademacher ’ s theorem . As a result , calculus can usually be done over the Clarke subdifferential defined as the set ∂f ( x ) : = CONV { lim i→∞ ∇f ( xi ) | xi ∈ Dc , xi → x } where CONV denotes the convex hull . The Clarke subdifferential generalizes both the smooth derivative when f ∈ C1 ( continuously differentiable ) and the convex subdifferential when f is convex . However , it only admits a chain rule with an inclusion and not equality , which is though necessary for backpropagation in deep learning . If one is willing to work with a slightly restricted set of functions - formally known as tame , Whitney stratifiable , path differentiable or definable in an o-minimal structure ( Davis et al. , 2020 ; Ji & Telgarsky , 2020 ; Bolte & Pauwels , 2020 ) , the Clarke subdifferential admits an operational chain rule . All architectures considered in this paper are definable ( Ji & Telgarsky , 2020 ) . Here , we use the form from Ji & Telgarsky ( 2020 ) . Lemma 1 ( Lemma B.9 in Ji & Telgarsky ( 2020 ) ) . If f : D open → R is locally Lipschitz and defineable , then for any interval I , arc z : I → D , a.e . t ∈ I , df ( z ( t ) ) dt = 〈 y , dztdt 〉 , ∀y ∈ ∂f ( z ( t ) ) . Neural networks . Consider a neural network ν : Rd → R. The computation graph of ν is a weighted directed graph G = ( V , E , w ) with weight function w : E → R. For each neuron v ∈ V , let INv : = { u ∈ V : uv ∈ E } and OUTv : = { w ∈ V : vw ∈ E } be the input and output neurons of v. Let { i1 , i2 , . . . , id } = : I ⊂ V and O : = { o } ⊂ V be the set of input and output neurons defined as IN ( i ) = ∅ = OUT ( o ) , ∀i ∈ I . Each neuron v ∈ V \I is equipped with a positively-1-homogeneous activation function σv ( such as the ReLU x 7→ max ( x , 0 ) , leaky ReLU x 7→ max ( x , αx ) for some small positive α , or the linear activation ) . To avoid unnecessary brackets , we write we : = w ( e ) for some e ∈ E. We will also abuse notation and write w ∈ RE where E is the set of learnable weights as the vector of learnable parameters . Let P be a path in G , i.e. , a set of edges in E that forms a path . We will abuse notation and write v ∈ P for some v ∈ V if there exists u ∈ V such that uv ∈ P or vu ∈ P . Let ρ be the number of distinct paths from any i ∈ I to o ∈ O . Let P : = { p1 , . . . , pρ } be the enumeration of these paths . For a path p ∈ P and an input x to the neural net , denote xp the coordinate of x used in p. Given a binary classification dataset { ( xi , yi ) } i∈ [ n ] with xi ∈ R d , ‖xi‖ ≤ 1 and yi ∈ { −1 , 1 } , we minimize the empirical risk R ( w ) = 1n ∑n i=1 ` ( yiν ( xi ) ) = 1 n ∑n i=1 ` ( ν ( yixi ) ) with loss ` : R → R , using gradient flow dw ( t ) dt ∈ −∂R ( w ( t ) ) . As we detail the architectures used in this paper , we recall that the activation of each neuron is still positively-homogeneous . The networks considered here are assumed to be bias-free unless stated otherwise . Definition 1 ( Feedforward networks ) . A neural net ν with graph G is a feedforward network if G is a directed acyclic graph ( DAG ) . Definition 2 ( Fully-connected networks ) . A feedforward network ν with graph G is a fullyconnected network if there exists partition of V into V = ( I ≡ V1 ) t V2 t . . . t ( VL+1 ≡ O ) such that for all u , v ∈ V , uv ∈ E iff there exists i ∈ [ L ] such that u ∈ Vi and v ∈ Vi+1 . Definition 3 ( Tree networks ) . A feedforward network ν with graph G is a tree network if the underlying undirected graph of G is a tree ( undirected acyclic graph ) . Examples of feedforwards networks include ResNet ( He et al. , 2016 ) , DenseNet ( Huang et al. , 2017 ) , CNNs ( Fukushima , 1980 ; LeCun et al. , 2015 ) and other fully-connected ReLU architectures . For a fully-connected network ν with layer partition V = : V1 t . . . t VL+1 where L is the number of ( hidden ) layers , let ni : = |Vi| be the number of neurons in the i-th layer and enumerate Vi = { vi , j } j∈ [ ni ] . Weights in this architecture can be organized into matricesW [ 1 ] , W [ 2 ] , . . . , W [ L ] where Rni+1×ni 3W [ i ] = ( ( wvi , jvi+1 , k ) ) j∈ [ ni ] , k∈ [ ni+1 ] , for all i ∈ [ L ] . Tree networks . Most practical architectures are not tree networks , but they have been used to prove generalization bounds for adversarial risks . In particular , for fullyconnected neural networks f whose activations are monotonically increasing and 1- Lipschitz , Khim & Loh ( 2019 ) defined the tree transform as the tree network Tf ( x ; w ) =∑nL pL=1 W [ L ] 1 , pL σ ( . . . ∑n2 p2=1 W [ 2 ] p3 , p2σ ( wp2 .. pL + ∑n1 p1=1 W [ 1 ] p2 , p1xp1 ) ) for vectors w with∏L j=2 nj entries , indexed by an L-tuple ( p2 , . . . , pL ) . We extend this idea in the next section . | This paper studies the invariance in training nonlinear networks under gradient flow or differential inclusion. It is shown that, for various network architectures, there are time-invariant quantities related to networks weights, if the trajectory is in the sign-stable regime (the sign of the weights does not change). This sign-stable regime invariance suggests the weight matrices are necessarily low-rank, provided that they diverge to infinity along some non-degenerate directions. | SP:f460a3c153c2946c31ed6fc7ac4f54e1fb148f27 |
Training invariances and the low-rank phenomenon: beyond linear networks | 1 INTRODUCTION . Recently , great progress has been made in understanding the trajectory of gradient flow ( GF ) ( Ji & Telgarsky , 2019 ; 2020 ; Lyu & Li , 2020 ) , gradient descent ( GD ) ( Ji & Telgarsky , 2019 ; Arora et al. , 2018 ) and stochastic gradient descent ( SGD ) ( Neyshabur et al. , 2015 ; 2017 ) in the training of neural networks . While good theory has been developed for deep linear networks ( Zhou & Liang , 2018 ; Arora et al. , 2018 ) , practical architectures such as ReLU fully-connected networks or ResNets are highly non-linear . This causes the underlying optimization problem ( usually empirical risk minimization ) to be highly non-smooth ( e.g . for ReLUs ) and non-convex , necessitating special tools such as the Clarke subdifferential ( Clarke , 1983 ) . One of the many exciting results of this body of literature is that gradient-based algorithms exhibit some form of implicit regularization : the optimization algorithm prefers some stationary points to others . In particular , a wide range of implicit biases has been shown in practice ( Huh et al. , 2021 ) and proven for deep linear networks ( Arora et al. , 2018 ; Ji & Telgarsky , 2019 ) , convolutional neural networks ( Gunasekar et al. , 2018 ) and homogeneous networks ( Ji & Telgarsky , 2020 ) . One well known result for linearly separable data is that in various practical settings , linear networks converge to the solution of the hard SVM problem , i.e. , a max-margin classifier ( Ji & Telgarsky , 2019 ) , while a relaxed version is true for CNNs ( Gunasekar et al. , 2018 ) . This holds even when the margin does not explicitly appear in the optimization objective - hence the name implicit regularization . Another strong form of implicit regularization relates to the structure of weight matrices of fully connected networks . In particular , Ji & Telgarsky ( 2019 ) prove that for deep linear networks for binary classification , weight matrices tend to rank-1 matrices in Frobenius norm as a result of GF/GD training , and that adjacent layers ’ singular vectors align . The max-margin phenomenon follows as a result . In practice , Huh et al . ( 2021 ) empirically document the low rank bias across different non-linear architectures . However , their results include ReLU fully-connected networks , CNNs and ReNet , which are not all covered by the existing theory . Beyond linear fully connected networks , Du et al . ( 2018 ) show vertex-wise invariances for fully-connected ReLU networks and invariances in Frobenius norm differences between layers for CNNs . Yet , despite the evidence in ( Huh et al. , 2021 ) , it has been an open theoretical question how more detailed structural relations between layers , which , e.g. , imply the low-rank result , generalize to other , structured or local nonlinear and possibly non-homogeneous architectures , and how to even characterize these . Hence , in this work , we take steps to addressing a wider set of architectures and invariances . First , we show a class of vertex and edge-wise quantities that remain invariant during gradient flow training . Applying these invariances to architectures containing fully connected , convolutional and residual blocks , arranged appropriately , we obtain invariances of the singular values in adjacent ( weight ) matrices . Second , we prove how the controlled singular values imply low-rank results for fully connected ReLU networks . Third , we obtain low-rank results for arbitrary non-homogeneous networks whose last few layers contain fully-connected and ResNet blocks . To the best of our knowledge , this is the first time a low-rank phenomenon is proven rigorously for these architectures . Our theoretical results offer explanations for empirical observations on more general architectures , and apply to the experiments in ( Huh et al. , 2021 ) for ResNet and CNNs . They also include the squared loss used there , in addition to the exponential or logistic loss used in most theoretical low-rank results . Moreover , our Theorem 2 gives an explanation for the “ reduced alignment ” phenomenon observed by Ji & Telgarsky ( 2019 ) , where in experiments on AlexNet over CIFAR-10 the ratio ‖W‖2/‖W‖F converges to a value strictly less than 1 for some fully-connected layer W towards the end of the network . One challenge in the analysis is the non-smoothness of the networks and ensuring an “ operational ” chain rule . To cope with this setting , we use a specific decomposition of an arbitrary ReLU architecture into a multilinear function and a ReLU network with +1/-1 weights . This reduction holds in the stable sign regime , a certain convergence setting of the parameters . This regime is different from stable activations , and is implied , e.g. , by directional convergence of the parameters to a vector with non-zero entries ( Lemma 2 ) . This construction may be of independent interest . In short , we make the following contributions to analyzing implicit biases of general architectures : • We show vertex and edge-wise weight invariances during training with gradient flow . Using these invariances , we prove that for architectures containing fully-connected layers , convolutional layers and residual blocks , when appropriately organized into matrices , adjacent matrices have the same singular value , up to initialization ( Theorem 1 ) . • We prove that in the stable sign regime , weight matrices in a fully-connected ReLU-activated network tend to rank-1 matrices ( Corollary 1 ) . We also show a low-rank bias for arbitrary nonhomogeneous feedforward networks whose last few layers are a composition of fully-connected and ResNet blocks ( Theorem 2 ) . In particular , if the Frobenius norms of these layers diverge , then the ratio between their operator norm and Frobenius norm is bounded non-trivially by an expression C fully specified by the architecture . To the best of our knowledge , this is the first time this type of bias is shown for nonlinear , nonhomogeneous networks . • We prove our results via a decomposition that reduces arbitrarily structured deep feedforward networks with positively-homogeneous activation ( e.g. , ReLU or linear ) to a multilinear structure ( Lemma 2 ) . 1.1 RELATED WORKS . Decomposition of fully-connected neural networks into a multilinear part and a 0-1 part has been utilized by Choromanska et al . ( 2015 ) ; Kawaguchi ( 2016 ) but their formulation does not apply for trajectory studies . In Section 3 , we give a detailed comparison between their approach and ours . Our decomposition makes use of the construction of a tree net that has been used by Khim & Loh ( 2019 ) in analyzing generalization of fully-connected networks . We describe their approach in 2 and show how we extend their construction to arbitrary feedforward neural nets . This construction makes up the first part of the proof of our decomposition lemma . The paper also makes use of path enumeration of neural nets , which overlaps with the path-norm literature of Neyshabur et al . ( 2015 ; 2017 ) . The distinction is that we are studying classical gradient flow , as opposed to SGD ( Neyshabur et al. , 2015 ) or its variants ( Neyshabur et al. , 2017 ) . For linear networks , low-rank bias is proven for separable data and exponential-tailed loss in Ji & Telgarsky ( 2019 ) . Du et al . ( 2018 ) give certain vertex-wise invariances for fully-connected ReLU networks and Frobenius norm difference invariances for CNNs . Compared to their results , ours are slightly stronger since we prove that our invariances hold for almost every time t on the gradient flow trajectory , thus allowing for the use of a Fundamental Theorem of Calculus and downstream analysis . Moreover , the set of invariances we show is strictly larger . Radhakrishnan et al . ( 2020 ) show negative results when generalizing the low-rank bias from ( Ji & Telgarsky , 2019 ) to vectorvalued neural networks . In our work , we only consider scalar-valued neural networks performing binary classification . 2 PRELIMINARIES AND NOTATION . For an integer k ∈ N , we write the set [ k ] : = { 1 , 2 , . . . , k } . For vectors , we extend the sign function sgn : R → { −1 , 1 } coordinatewise as sgn : ( xi ) i∈ [ d ] 7→ ( sgn ( xi ) ) i∈ [ d ] . For some ( usually the canonical ) basis ( ei ) i∈ [ n ] in some vector space Rn , for all x ∈ Rn we use the notation [ x ] i = 〈x , ei〉 to denote the i-th coordinate of x. Clarke subdifferential , definability and nonsmooth analysis . The analysis of non-smooth functions is central to our results . For a locally Lipschitz function f : D → R with open domain D , there exists a set Dc ⊆ D of full Lebesgue measure on which the derivative ∇f exists everywhere by Rademacher ’ s theorem . As a result , calculus can usually be done over the Clarke subdifferential defined as the set ∂f ( x ) : = CONV { lim i→∞ ∇f ( xi ) | xi ∈ Dc , xi → x } where CONV denotes the convex hull . The Clarke subdifferential generalizes both the smooth derivative when f ∈ C1 ( continuously differentiable ) and the convex subdifferential when f is convex . However , it only admits a chain rule with an inclusion and not equality , which is though necessary for backpropagation in deep learning . If one is willing to work with a slightly restricted set of functions - formally known as tame , Whitney stratifiable , path differentiable or definable in an o-minimal structure ( Davis et al. , 2020 ; Ji & Telgarsky , 2020 ; Bolte & Pauwels , 2020 ) , the Clarke subdifferential admits an operational chain rule . All architectures considered in this paper are definable ( Ji & Telgarsky , 2020 ) . Here , we use the form from Ji & Telgarsky ( 2020 ) . Lemma 1 ( Lemma B.9 in Ji & Telgarsky ( 2020 ) ) . If f : D open → R is locally Lipschitz and defineable , then for any interval I , arc z : I → D , a.e . t ∈ I , df ( z ( t ) ) dt = 〈 y , dztdt 〉 , ∀y ∈ ∂f ( z ( t ) ) . Neural networks . Consider a neural network ν : Rd → R. The computation graph of ν is a weighted directed graph G = ( V , E , w ) with weight function w : E → R. For each neuron v ∈ V , let INv : = { u ∈ V : uv ∈ E } and OUTv : = { w ∈ V : vw ∈ E } be the input and output neurons of v. Let { i1 , i2 , . . . , id } = : I ⊂ V and O : = { o } ⊂ V be the set of input and output neurons defined as IN ( i ) = ∅ = OUT ( o ) , ∀i ∈ I . Each neuron v ∈ V \I is equipped with a positively-1-homogeneous activation function σv ( such as the ReLU x 7→ max ( x , 0 ) , leaky ReLU x 7→ max ( x , αx ) for some small positive α , or the linear activation ) . To avoid unnecessary brackets , we write we : = w ( e ) for some e ∈ E. We will also abuse notation and write w ∈ RE where E is the set of learnable weights as the vector of learnable parameters . Let P be a path in G , i.e. , a set of edges in E that forms a path . We will abuse notation and write v ∈ P for some v ∈ V if there exists u ∈ V such that uv ∈ P or vu ∈ P . Let ρ be the number of distinct paths from any i ∈ I to o ∈ O . Let P : = { p1 , . . . , pρ } be the enumeration of these paths . For a path p ∈ P and an input x to the neural net , denote xp the coordinate of x used in p. Given a binary classification dataset { ( xi , yi ) } i∈ [ n ] with xi ∈ R d , ‖xi‖ ≤ 1 and yi ∈ { −1 , 1 } , we minimize the empirical risk R ( w ) = 1n ∑n i=1 ` ( yiν ( xi ) ) = 1 n ∑n i=1 ` ( ν ( yixi ) ) with loss ` : R → R , using gradient flow dw ( t ) dt ∈ −∂R ( w ( t ) ) . As we detail the architectures used in this paper , we recall that the activation of each neuron is still positively-homogeneous . The networks considered here are assumed to be bias-free unless stated otherwise . Definition 1 ( Feedforward networks ) . A neural net ν with graph G is a feedforward network if G is a directed acyclic graph ( DAG ) . Definition 2 ( Fully-connected networks ) . A feedforward network ν with graph G is a fullyconnected network if there exists partition of V into V = ( I ≡ V1 ) t V2 t . . . t ( VL+1 ≡ O ) such that for all u , v ∈ V , uv ∈ E iff there exists i ∈ [ L ] such that u ∈ Vi and v ∈ Vi+1 . Definition 3 ( Tree networks ) . A feedforward network ν with graph G is a tree network if the underlying undirected graph of G is a tree ( undirected acyclic graph ) . Examples of feedforwards networks include ResNet ( He et al. , 2016 ) , DenseNet ( Huang et al. , 2017 ) , CNNs ( Fukushima , 1980 ; LeCun et al. , 2015 ) and other fully-connected ReLU architectures . For a fully-connected network ν with layer partition V = : V1 t . . . t VL+1 where L is the number of ( hidden ) layers , let ni : = |Vi| be the number of neurons in the i-th layer and enumerate Vi = { vi , j } j∈ [ ni ] . Weights in this architecture can be organized into matricesW [ 1 ] , W [ 2 ] , . . . , W [ L ] where Rni+1×ni 3W [ i ] = ( ( wvi , jvi+1 , k ) ) j∈ [ ni ] , k∈ [ ni+1 ] , for all i ∈ [ L ] . Tree networks . Most practical architectures are not tree networks , but they have been used to prove generalization bounds for adversarial risks . In particular , for fullyconnected neural networks f whose activations are monotonically increasing and 1- Lipschitz , Khim & Loh ( 2019 ) defined the tree transform as the tree network Tf ( x ; w ) =∑nL pL=1 W [ L ] 1 , pL σ ( . . . ∑n2 p2=1 W [ 2 ] p3 , p2σ ( wp2 .. pL + ∑n1 p1=1 W [ 1 ] p2 , p1xp1 ) ) for vectors w with∏L j=2 nj entries , indexed by an L-tuple ( p2 , . . . , pL ) . We extend this idea in the next section . | This paper studies the low-rank phenomena in the context of *non*linear neural networks. In this work, the authors prove, via a tree network transformation of their initial network, that there exists some matrix invariance across consecutive layers (thm 1). Their assumptions are relatively mild (except maybe Assumption 1 that I discuss in my main review) They then leverage that invariance results in order to show a low-rank phenomenon (thm 2) for a wide range of neural networks with positively-1-homogeneous activation functions. | SP:f460a3c153c2946c31ed6fc7ac4f54e1fb148f27 |
Training invariances and the low-rank phenomenon: beyond linear networks | 1 INTRODUCTION . Recently , great progress has been made in understanding the trajectory of gradient flow ( GF ) ( Ji & Telgarsky , 2019 ; 2020 ; Lyu & Li , 2020 ) , gradient descent ( GD ) ( Ji & Telgarsky , 2019 ; Arora et al. , 2018 ) and stochastic gradient descent ( SGD ) ( Neyshabur et al. , 2015 ; 2017 ) in the training of neural networks . While good theory has been developed for deep linear networks ( Zhou & Liang , 2018 ; Arora et al. , 2018 ) , practical architectures such as ReLU fully-connected networks or ResNets are highly non-linear . This causes the underlying optimization problem ( usually empirical risk minimization ) to be highly non-smooth ( e.g . for ReLUs ) and non-convex , necessitating special tools such as the Clarke subdifferential ( Clarke , 1983 ) . One of the many exciting results of this body of literature is that gradient-based algorithms exhibit some form of implicit regularization : the optimization algorithm prefers some stationary points to others . In particular , a wide range of implicit biases has been shown in practice ( Huh et al. , 2021 ) and proven for deep linear networks ( Arora et al. , 2018 ; Ji & Telgarsky , 2019 ) , convolutional neural networks ( Gunasekar et al. , 2018 ) and homogeneous networks ( Ji & Telgarsky , 2020 ) . One well known result for linearly separable data is that in various practical settings , linear networks converge to the solution of the hard SVM problem , i.e. , a max-margin classifier ( Ji & Telgarsky , 2019 ) , while a relaxed version is true for CNNs ( Gunasekar et al. , 2018 ) . This holds even when the margin does not explicitly appear in the optimization objective - hence the name implicit regularization . Another strong form of implicit regularization relates to the structure of weight matrices of fully connected networks . In particular , Ji & Telgarsky ( 2019 ) prove that for deep linear networks for binary classification , weight matrices tend to rank-1 matrices in Frobenius norm as a result of GF/GD training , and that adjacent layers ’ singular vectors align . The max-margin phenomenon follows as a result . In practice , Huh et al . ( 2021 ) empirically document the low rank bias across different non-linear architectures . However , their results include ReLU fully-connected networks , CNNs and ReNet , which are not all covered by the existing theory . Beyond linear fully connected networks , Du et al . ( 2018 ) show vertex-wise invariances for fully-connected ReLU networks and invariances in Frobenius norm differences between layers for CNNs . Yet , despite the evidence in ( Huh et al. , 2021 ) , it has been an open theoretical question how more detailed structural relations between layers , which , e.g. , imply the low-rank result , generalize to other , structured or local nonlinear and possibly non-homogeneous architectures , and how to even characterize these . Hence , in this work , we take steps to addressing a wider set of architectures and invariances . First , we show a class of vertex and edge-wise quantities that remain invariant during gradient flow training . Applying these invariances to architectures containing fully connected , convolutional and residual blocks , arranged appropriately , we obtain invariances of the singular values in adjacent ( weight ) matrices . Second , we prove how the controlled singular values imply low-rank results for fully connected ReLU networks . Third , we obtain low-rank results for arbitrary non-homogeneous networks whose last few layers contain fully-connected and ResNet blocks . To the best of our knowledge , this is the first time a low-rank phenomenon is proven rigorously for these architectures . Our theoretical results offer explanations for empirical observations on more general architectures , and apply to the experiments in ( Huh et al. , 2021 ) for ResNet and CNNs . They also include the squared loss used there , in addition to the exponential or logistic loss used in most theoretical low-rank results . Moreover , our Theorem 2 gives an explanation for the “ reduced alignment ” phenomenon observed by Ji & Telgarsky ( 2019 ) , where in experiments on AlexNet over CIFAR-10 the ratio ‖W‖2/‖W‖F converges to a value strictly less than 1 for some fully-connected layer W towards the end of the network . One challenge in the analysis is the non-smoothness of the networks and ensuring an “ operational ” chain rule . To cope with this setting , we use a specific decomposition of an arbitrary ReLU architecture into a multilinear function and a ReLU network with +1/-1 weights . This reduction holds in the stable sign regime , a certain convergence setting of the parameters . This regime is different from stable activations , and is implied , e.g. , by directional convergence of the parameters to a vector with non-zero entries ( Lemma 2 ) . This construction may be of independent interest . In short , we make the following contributions to analyzing implicit biases of general architectures : • We show vertex and edge-wise weight invariances during training with gradient flow . Using these invariances , we prove that for architectures containing fully-connected layers , convolutional layers and residual blocks , when appropriately organized into matrices , adjacent matrices have the same singular value , up to initialization ( Theorem 1 ) . • We prove that in the stable sign regime , weight matrices in a fully-connected ReLU-activated network tend to rank-1 matrices ( Corollary 1 ) . We also show a low-rank bias for arbitrary nonhomogeneous feedforward networks whose last few layers are a composition of fully-connected and ResNet blocks ( Theorem 2 ) . In particular , if the Frobenius norms of these layers diverge , then the ratio between their operator norm and Frobenius norm is bounded non-trivially by an expression C fully specified by the architecture . To the best of our knowledge , this is the first time this type of bias is shown for nonlinear , nonhomogeneous networks . • We prove our results via a decomposition that reduces arbitrarily structured deep feedforward networks with positively-homogeneous activation ( e.g. , ReLU or linear ) to a multilinear structure ( Lemma 2 ) . 1.1 RELATED WORKS . Decomposition of fully-connected neural networks into a multilinear part and a 0-1 part has been utilized by Choromanska et al . ( 2015 ) ; Kawaguchi ( 2016 ) but their formulation does not apply for trajectory studies . In Section 3 , we give a detailed comparison between their approach and ours . Our decomposition makes use of the construction of a tree net that has been used by Khim & Loh ( 2019 ) in analyzing generalization of fully-connected networks . We describe their approach in 2 and show how we extend their construction to arbitrary feedforward neural nets . This construction makes up the first part of the proof of our decomposition lemma . The paper also makes use of path enumeration of neural nets , which overlaps with the path-norm literature of Neyshabur et al . ( 2015 ; 2017 ) . The distinction is that we are studying classical gradient flow , as opposed to SGD ( Neyshabur et al. , 2015 ) or its variants ( Neyshabur et al. , 2017 ) . For linear networks , low-rank bias is proven for separable data and exponential-tailed loss in Ji & Telgarsky ( 2019 ) . Du et al . ( 2018 ) give certain vertex-wise invariances for fully-connected ReLU networks and Frobenius norm difference invariances for CNNs . Compared to their results , ours are slightly stronger since we prove that our invariances hold for almost every time t on the gradient flow trajectory , thus allowing for the use of a Fundamental Theorem of Calculus and downstream analysis . Moreover , the set of invariances we show is strictly larger . Radhakrishnan et al . ( 2020 ) show negative results when generalizing the low-rank bias from ( Ji & Telgarsky , 2019 ) to vectorvalued neural networks . In our work , we only consider scalar-valued neural networks performing binary classification . 2 PRELIMINARIES AND NOTATION . For an integer k ∈ N , we write the set [ k ] : = { 1 , 2 , . . . , k } . For vectors , we extend the sign function sgn : R → { −1 , 1 } coordinatewise as sgn : ( xi ) i∈ [ d ] 7→ ( sgn ( xi ) ) i∈ [ d ] . For some ( usually the canonical ) basis ( ei ) i∈ [ n ] in some vector space Rn , for all x ∈ Rn we use the notation [ x ] i = 〈x , ei〉 to denote the i-th coordinate of x. Clarke subdifferential , definability and nonsmooth analysis . The analysis of non-smooth functions is central to our results . For a locally Lipschitz function f : D → R with open domain D , there exists a set Dc ⊆ D of full Lebesgue measure on which the derivative ∇f exists everywhere by Rademacher ’ s theorem . As a result , calculus can usually be done over the Clarke subdifferential defined as the set ∂f ( x ) : = CONV { lim i→∞ ∇f ( xi ) | xi ∈ Dc , xi → x } where CONV denotes the convex hull . The Clarke subdifferential generalizes both the smooth derivative when f ∈ C1 ( continuously differentiable ) and the convex subdifferential when f is convex . However , it only admits a chain rule with an inclusion and not equality , which is though necessary for backpropagation in deep learning . If one is willing to work with a slightly restricted set of functions - formally known as tame , Whitney stratifiable , path differentiable or definable in an o-minimal structure ( Davis et al. , 2020 ; Ji & Telgarsky , 2020 ; Bolte & Pauwels , 2020 ) , the Clarke subdifferential admits an operational chain rule . All architectures considered in this paper are definable ( Ji & Telgarsky , 2020 ) . Here , we use the form from Ji & Telgarsky ( 2020 ) . Lemma 1 ( Lemma B.9 in Ji & Telgarsky ( 2020 ) ) . If f : D open → R is locally Lipschitz and defineable , then for any interval I , arc z : I → D , a.e . t ∈ I , df ( z ( t ) ) dt = 〈 y , dztdt 〉 , ∀y ∈ ∂f ( z ( t ) ) . Neural networks . Consider a neural network ν : Rd → R. The computation graph of ν is a weighted directed graph G = ( V , E , w ) with weight function w : E → R. For each neuron v ∈ V , let INv : = { u ∈ V : uv ∈ E } and OUTv : = { w ∈ V : vw ∈ E } be the input and output neurons of v. Let { i1 , i2 , . . . , id } = : I ⊂ V and O : = { o } ⊂ V be the set of input and output neurons defined as IN ( i ) = ∅ = OUT ( o ) , ∀i ∈ I . Each neuron v ∈ V \I is equipped with a positively-1-homogeneous activation function σv ( such as the ReLU x 7→ max ( x , 0 ) , leaky ReLU x 7→ max ( x , αx ) for some small positive α , or the linear activation ) . To avoid unnecessary brackets , we write we : = w ( e ) for some e ∈ E. We will also abuse notation and write w ∈ RE where E is the set of learnable weights as the vector of learnable parameters . Let P be a path in G , i.e. , a set of edges in E that forms a path . We will abuse notation and write v ∈ P for some v ∈ V if there exists u ∈ V such that uv ∈ P or vu ∈ P . Let ρ be the number of distinct paths from any i ∈ I to o ∈ O . Let P : = { p1 , . . . , pρ } be the enumeration of these paths . For a path p ∈ P and an input x to the neural net , denote xp the coordinate of x used in p. Given a binary classification dataset { ( xi , yi ) } i∈ [ n ] with xi ∈ R d , ‖xi‖ ≤ 1 and yi ∈ { −1 , 1 } , we minimize the empirical risk R ( w ) = 1n ∑n i=1 ` ( yiν ( xi ) ) = 1 n ∑n i=1 ` ( ν ( yixi ) ) with loss ` : R → R , using gradient flow dw ( t ) dt ∈ −∂R ( w ( t ) ) . As we detail the architectures used in this paper , we recall that the activation of each neuron is still positively-homogeneous . The networks considered here are assumed to be bias-free unless stated otherwise . Definition 1 ( Feedforward networks ) . A neural net ν with graph G is a feedforward network if G is a directed acyclic graph ( DAG ) . Definition 2 ( Fully-connected networks ) . A feedforward network ν with graph G is a fullyconnected network if there exists partition of V into V = ( I ≡ V1 ) t V2 t . . . t ( VL+1 ≡ O ) such that for all u , v ∈ V , uv ∈ E iff there exists i ∈ [ L ] such that u ∈ Vi and v ∈ Vi+1 . Definition 3 ( Tree networks ) . A feedforward network ν with graph G is a tree network if the underlying undirected graph of G is a tree ( undirected acyclic graph ) . Examples of feedforwards networks include ResNet ( He et al. , 2016 ) , DenseNet ( Huang et al. , 2017 ) , CNNs ( Fukushima , 1980 ; LeCun et al. , 2015 ) and other fully-connected ReLU architectures . For a fully-connected network ν with layer partition V = : V1 t . . . t VL+1 where L is the number of ( hidden ) layers , let ni : = |Vi| be the number of neurons in the i-th layer and enumerate Vi = { vi , j } j∈ [ ni ] . Weights in this architecture can be organized into matricesW [ 1 ] , W [ 2 ] , . . . , W [ L ] where Rni+1×ni 3W [ i ] = ( ( wvi , jvi+1 , k ) ) j∈ [ ni ] , k∈ [ ni+1 ] , for all i ∈ [ L ] . Tree networks . Most practical architectures are not tree networks , but they have been used to prove generalization bounds for adversarial risks . In particular , for fullyconnected neural networks f whose activations are monotonically increasing and 1- Lipschitz , Khim & Loh ( 2019 ) defined the tree transform as the tree network Tf ( x ; w ) =∑nL pL=1 W [ L ] 1 , pL σ ( . . . ∑n2 p2=1 W [ 2 ] p3 , p2σ ( wp2 .. pL + ∑n1 p1=1 W [ 1 ] p2 , p1xp1 ) ) for vectors w with∏L j=2 nj entries , indexed by an L-tuple ( p2 , . . . , pL ) . We extend this idea in the next section . | The paper shows under certain assumptions, there exist invariants in DNNs with ReLU (or leaky ReLU and identity) activations - similar to the invariants observed in linear networks. To show this invariance a decomposition of the DNN as the composition of a multilinear function and a network with {+1,-1} weights. Using these invariants they show that for linearly separable data, the absolute value of the weight matrices converge to rank one matrices (assuming directional convergence). | SP:f460a3c153c2946c31ed6fc7ac4f54e1fb148f27 |
How to Inject Backdoors with Better Consistency: Logit Anchoring on Clean Data | 1 INTRODUCTION . Deep neural networks ( DNNs ) have gained promising performances in many computer vision ( Krizhevsky et al. , 2017 ; Simonyan & Zisserman , 2015 ) , natural language processing ( Bowman et al. , 2016 ; Sehovac & Grolinger , 2020 ; Vaswani et al. , 2017 ) , and computer speech ( van den Oord et al. , 2016 ) tasks . However , it has been discovered that DNNs are vulnerable to many threats , one of which is backdoor attack ( Gu et al. , 2019 ; Liu et al. , 2018b ) , which aims to inject certain data patterns into neural networks without altering the model behavior on the clean data . Ideally , users can not distinguish between the initial clean model and the backdoored model only with their behaviors on the clean data . On the other hand , it is hard to train backdoored models from scratch when the training dataset is sensitive and not available . Recently , Garg et al . ( 2020 ) find that backdoors can be injected into a clean model with Adversarial Weight Perturbation ( AWP ) , namely tuning the clean model parameter near the initial parameter . They also conjecture that backdoors injected with AWP may be hard to detect since the variations of parameters are small . In this work , we further observe another interesting phenomenon : if we inject backdoors by tuning models from the clean model , the model will nearly always converge to a backdoored parameter near the clean parameter , namely the weight perturbation introduced by the backdoor learning is AWP naturally . To better understand this phenomenon , we first give a visualization explanation as below : In Figure 1a , there are different loss basins around local minima , a backdoored model trained from scratch tends to converge into other local minima different from the initial clean model ; In Figure 1b , backdoored models tuned from the clean model , including BadNets ( Gu et al. , 2019 ) and our proposed anchoring methods , will converge into the same loss basin where the initial clean model was located in.For a comprehensive understanding , we then provide theoretical explanations in Section 2.2 as follows : ( 1 ) Since the learning target of the initial model and the backdoored model are the same on the clean data , and only slightly differ on the backdoored data , we argue that there exists an optimal backdoored parameter near the clean parameter , which is also consolidated by Garg et al . ( 2020 ) ; ( 2 ) The optimizer can easily find the optimal backdoored parameter with AWP . Once the optimizer converges to it , it is hard to escape from it . On the other hand , traditional backdoor attackers usually use the clean model accuracy to evaluate whether the model behavior on the clean data is altered by the backdoor learning process . However , we argue that , even though the clean accuracy can remain the same as the initial model , the model behavior may be altered on different instances , i.e. , instance-wise behavior . To clarify this point , in this work , we first formulate the behavior on the clean data as the consistency of the backdoored models , including ( i ) global consistency ; and ( ii ) instance-wise consistency . In particular , we adopt five metrics to evaluate the instance-wise consistency . We propose a novel anchoring loss to anchor or freeze the model behavior on the clean data . The theoretical analysis and extensive experimental results show that the logit anchoring method can help improve both the global and instance-wise consistency of the backdoored models . As illustrated in Figure 1b , although both BadNets and the anchoring method can converge into the backdoored region near the initial clean model , compared with BadNets ( Gu et al. , 2019 ) , the parameter with our anchoring method is closer to the test local minimum and the initial model , which indicates that our anchoring method has a better global and instance-wise consistency . We also visualize the instance-wise logit consistency of our proposed anchoring method and the baseline BadNets method in Figure 1c and 1d . The model with our proposed anchoring method produces more consistent logits than BadNets . Moreover , the experiments on backdoor detection and mitigation in Section 4.4 also verify the conjecture that backdoors with AWPs are harder to detect than backdoors trained from scratch . To summarize , our contributions include : • We are the first to offer a theoretical explanation of the adversarial weight perturbation and formulate the concept of global and instance-wise consistency in backdoor learning . • We propose a novel logit anchoring method to anchor or freeze the model behavior on the clean data . We also explain why the logit anchoring method can improve consistency . • Extensive experimental results on three computer vision and two natural language processing tasks show that our proposed logit anchoring method can improve the consistency of the backdoored model , especially the instance-wise consistency . 2 PRELIMINARY . 2.1 PROBLEM DEFINITION . In this paper , we focus on the neural network for a C-class classification task . Suppose D denotes the clean training dataset , θ ∈ Rn denotes the optimal parameter on the clean training dataset , where n is the number of parameters , L ( D ; θ ) denotes the loss function on dataset D and parameter θ , and L ( ( x , y ) ; θ ) denotes the loss on data instance ( x , y ) , here θ can be omitted for brevity . Since modern deep neural networks ( DNNs ) often have multiple local minima ( Ding et al. , 2019 ) , and the optimizer does not necessarily converge to the global optimum , we may assume θ is a local minimum of the clean loss , ∇θL ( D ; θ ) = 0 . Assume θ∗ is a local minimum of the backdoored loss , then we have ∇θ∗L ( D ∪ D∗ ; θ∗ ) = 0 , where D∗ and θ∗ represent the poisonous dataset and the backdoored parameter , respectively . 2.2 ADVERSARIAL WEIGHT PERTURBATIONS AND BACKDOOR LEARNING . Adversarial Weight Perturbations ( AWPs ) ( Garg et al. , 2020 ) , or parameter corruptions ( Sun et al. , 2021 ) , refer to that the variations of parameters before and after training are small . Garg et al . ( 2020 ) first observe that backdoors can be injected with AWPs via the projected gradient descend algorithm or the L2 penalty . In this paper , we observe an interesting phenomenon that , if we train from a well-trained clean parameter θ , θ∗− θ tends to be adversarial weight perturbation , namely finding the closest local minimum in the backdoored loss curve θ∗ to the initial parameter . This phenomenon implies two properties during backdoor tuning : ( 1 ) Existence of the optimal backdoored parameter θ∗ near the clean parameter , which is also observed by Garg et al . ( 2020 ) ; ( 2 ) The optimizer tends to converge to the backdoored parameter θ∗ with adversarial weight perturbation . Here , θ∗ denotes the local optimal backdoored parameter with adversarial weight perturbation . Existence of Adversarial Weight Perturbation δ . We explain the existence of the optimal backdoored parameter θ∗ near the clean parameter , which is also observed by Garg et al . ( 2020 ) , in Proposition 1 and Remark 1 . The formal version of Remark 1 , and the proof of Proposition 1 and Remark 1 are given in Appendix.A.1 . Proposition 1 ( Upper Bound of ‖δ‖2 ) . Suppose H denotes the Hessian matrix ∇2θL ( D , θ ) on the clean dataset , g∗ = ∇θL ( D∗ , θ ) . Assume L ( D∗ , θ + δ ) ≤ L ( D∗ , θ ) − |∆L∗| can ensure that we can successfully inject a backdoor . Suppose we can choose and control the poisoning ratio η = |D∗|/|D| , the adversarial weight perturbation δ ( which is determined by η ) is , δ = δ ( η ) = −ηH−1g∗ + o ( ‖δ ( η ) ‖2 ) , ( 1 ) To ensure that we can successfully inject a backdoor , we only need to ensure that η ≥ η0 . There exists an adversarial weight perturbation δ , ‖δ‖2 ≤ |∆L∗|+ o ( 1 ) ‖g∗‖ cos〈g∗ , H−1g∗〉 . ( 2 ) Remark 1 ( Informal . Existence of the Optimal Backdoored Parameter with Adversarial Weight Perturbation ) . We take a logistic regression model for classification as an example . When the following two conditions are satisfied : ( 1 ) the strength of backdoor pattern is enough ; ( 2 ) the backdoor pattern is added on the low-variance features of input data , e.g. , on a blank corner of figures in computer vision ( CV ) , or choosing low-frequency words in Natural language processing ( NLP ) , then we can conclude that : ‖δ‖2 is small , which ensures the existence of the optimal backdoored parameter with adversarial weight perturbation . Proposition 1 estimates the upper bound of ‖δ‖2 . In Remark 1 , we investigate the conditions to ensure that ‖δ‖2 is small . We remark that some of the existing data poisoning works in backdoor learning , such as BadNets ( Gu et al. , 2019 ) , inherently satisfy conditions , which ensures the existence of the optimal backdoored parameter with adversarial weight perturbation . Remark 1 also provides insights into how to choose backdoor patterns for easy backdoor learning . The optimizer tends to converge to θ∗ . We explain ( 2 ) in Lemma 1. θ∗1 is denoted as any other local optimal backdoored parameter besides θ∗ . A detailed version of Lemma 1 is in Appendix.A.1 . Lemma 1 ( Brief Version . The mean time to converge into and escape from optimal parameters ) . The time ( step ) t for SGD to converge into an optimal parameter θ∗1 is log t ∼ ‖θ∗1 − θ‖ ( Hoffer et al. , 2017 ) . The mean escape time ( step ) τ from the optimal parameter θ∗ outside of the basin near the local minimum θ∗ is , log τ = log τ0 + Bηlr ( C1κ −1 +C2 ) ∆L∗ ( Xie et al. , 2021 ) , where B is the batch size , ηlr is the learning rate , κ measures the curvature near the clean local minimum θ∗ , ∆L∗ > 0 measures the height of the basin near the local minimum θ∗ , and τ0 , C1 , C2 ∈ R+ are parameters that are not determined by κ and ∆L∗ . Then we explain why the optimizer tends to converge to the backdoored parameter θ∗ with adversarial weight perturbation . As Figure 1a implies , the optimal backdoored parameter θ∗ with adversarial weight perturbation is close to the initial parameter θ compared to any other local optimal backdoored parameter θ∗1 , ‖θ∗ − θ‖ ‖θ∗1 − θ‖ . According to Lemma 1 , it is easy for optimizers to find the optimal backdoored parameter with adversarial weight perturbation in the early stage of backdoor learning . Modern optimizers have a large Bηlr and tend to find flat minima ( Keskar et al. , 2017 ) , thus κ is small . ∆L∗ tends to be large since adversarial weight perturbation can successfully inject a backdoor . Therefore , it is hard to escape from θ∗ according to Lemma 1 . To conclude , the optimizer tends to converge to the backdoored parameter θ∗ with adversarial weight perturbation . The formal and detailed analysis is given in Appendix.A.2 . | This paper focuses on injecting backdoors into a trained clean model. The authors provide a theoretical analysis to illustrate why the variations are always AWP or small weight perturbations in this circumstance. The concept of consistency is firstly formulated, and the authors propose a logit anchoring method to improve the consistency, especially the instance-wise consistency, under the circumstance of injecting backdoors into a trained clean model. The main contribution of the paper includes two aspects: (1) The paper observes an interesting phenomenon that the variations of parameters are always AWPs when tuning the trained clean model to inject backdoors, and provide theoretical analysis to explain this phenomenon. (2) The paper first formulates the consistency of backdoored models, and proposes a novel anchoring loss to anchor or freeze the model behaviors on the clean data. | SP:ee19009ea2b3a0e23ca9607bbe2d5aaf2e108ba8 |
How to Inject Backdoors with Better Consistency: Logit Anchoring on Clean Data | 1 INTRODUCTION . Deep neural networks ( DNNs ) have gained promising performances in many computer vision ( Krizhevsky et al. , 2017 ; Simonyan & Zisserman , 2015 ) , natural language processing ( Bowman et al. , 2016 ; Sehovac & Grolinger , 2020 ; Vaswani et al. , 2017 ) , and computer speech ( van den Oord et al. , 2016 ) tasks . However , it has been discovered that DNNs are vulnerable to many threats , one of which is backdoor attack ( Gu et al. , 2019 ; Liu et al. , 2018b ) , which aims to inject certain data patterns into neural networks without altering the model behavior on the clean data . Ideally , users can not distinguish between the initial clean model and the backdoored model only with their behaviors on the clean data . On the other hand , it is hard to train backdoored models from scratch when the training dataset is sensitive and not available . Recently , Garg et al . ( 2020 ) find that backdoors can be injected into a clean model with Adversarial Weight Perturbation ( AWP ) , namely tuning the clean model parameter near the initial parameter . They also conjecture that backdoors injected with AWP may be hard to detect since the variations of parameters are small . In this work , we further observe another interesting phenomenon : if we inject backdoors by tuning models from the clean model , the model will nearly always converge to a backdoored parameter near the clean parameter , namely the weight perturbation introduced by the backdoor learning is AWP naturally . To better understand this phenomenon , we first give a visualization explanation as below : In Figure 1a , there are different loss basins around local minima , a backdoored model trained from scratch tends to converge into other local minima different from the initial clean model ; In Figure 1b , backdoored models tuned from the clean model , including BadNets ( Gu et al. , 2019 ) and our proposed anchoring methods , will converge into the same loss basin where the initial clean model was located in.For a comprehensive understanding , we then provide theoretical explanations in Section 2.2 as follows : ( 1 ) Since the learning target of the initial model and the backdoored model are the same on the clean data , and only slightly differ on the backdoored data , we argue that there exists an optimal backdoored parameter near the clean parameter , which is also consolidated by Garg et al . ( 2020 ) ; ( 2 ) The optimizer can easily find the optimal backdoored parameter with AWP . Once the optimizer converges to it , it is hard to escape from it . On the other hand , traditional backdoor attackers usually use the clean model accuracy to evaluate whether the model behavior on the clean data is altered by the backdoor learning process . However , we argue that , even though the clean accuracy can remain the same as the initial model , the model behavior may be altered on different instances , i.e. , instance-wise behavior . To clarify this point , in this work , we first formulate the behavior on the clean data as the consistency of the backdoored models , including ( i ) global consistency ; and ( ii ) instance-wise consistency . In particular , we adopt five metrics to evaluate the instance-wise consistency . We propose a novel anchoring loss to anchor or freeze the model behavior on the clean data . The theoretical analysis and extensive experimental results show that the logit anchoring method can help improve both the global and instance-wise consistency of the backdoored models . As illustrated in Figure 1b , although both BadNets and the anchoring method can converge into the backdoored region near the initial clean model , compared with BadNets ( Gu et al. , 2019 ) , the parameter with our anchoring method is closer to the test local minimum and the initial model , which indicates that our anchoring method has a better global and instance-wise consistency . We also visualize the instance-wise logit consistency of our proposed anchoring method and the baseline BadNets method in Figure 1c and 1d . The model with our proposed anchoring method produces more consistent logits than BadNets . Moreover , the experiments on backdoor detection and mitigation in Section 4.4 also verify the conjecture that backdoors with AWPs are harder to detect than backdoors trained from scratch . To summarize , our contributions include : • We are the first to offer a theoretical explanation of the adversarial weight perturbation and formulate the concept of global and instance-wise consistency in backdoor learning . • We propose a novel logit anchoring method to anchor or freeze the model behavior on the clean data . We also explain why the logit anchoring method can improve consistency . • Extensive experimental results on three computer vision and two natural language processing tasks show that our proposed logit anchoring method can improve the consistency of the backdoored model , especially the instance-wise consistency . 2 PRELIMINARY . 2.1 PROBLEM DEFINITION . In this paper , we focus on the neural network for a C-class classification task . Suppose D denotes the clean training dataset , θ ∈ Rn denotes the optimal parameter on the clean training dataset , where n is the number of parameters , L ( D ; θ ) denotes the loss function on dataset D and parameter θ , and L ( ( x , y ) ; θ ) denotes the loss on data instance ( x , y ) , here θ can be omitted for brevity . Since modern deep neural networks ( DNNs ) often have multiple local minima ( Ding et al. , 2019 ) , and the optimizer does not necessarily converge to the global optimum , we may assume θ is a local minimum of the clean loss , ∇θL ( D ; θ ) = 0 . Assume θ∗ is a local minimum of the backdoored loss , then we have ∇θ∗L ( D ∪ D∗ ; θ∗ ) = 0 , where D∗ and θ∗ represent the poisonous dataset and the backdoored parameter , respectively . 2.2 ADVERSARIAL WEIGHT PERTURBATIONS AND BACKDOOR LEARNING . Adversarial Weight Perturbations ( AWPs ) ( Garg et al. , 2020 ) , or parameter corruptions ( Sun et al. , 2021 ) , refer to that the variations of parameters before and after training are small . Garg et al . ( 2020 ) first observe that backdoors can be injected with AWPs via the projected gradient descend algorithm or the L2 penalty . In this paper , we observe an interesting phenomenon that , if we train from a well-trained clean parameter θ , θ∗− θ tends to be adversarial weight perturbation , namely finding the closest local minimum in the backdoored loss curve θ∗ to the initial parameter . This phenomenon implies two properties during backdoor tuning : ( 1 ) Existence of the optimal backdoored parameter θ∗ near the clean parameter , which is also observed by Garg et al . ( 2020 ) ; ( 2 ) The optimizer tends to converge to the backdoored parameter θ∗ with adversarial weight perturbation . Here , θ∗ denotes the local optimal backdoored parameter with adversarial weight perturbation . Existence of Adversarial Weight Perturbation δ . We explain the existence of the optimal backdoored parameter θ∗ near the clean parameter , which is also observed by Garg et al . ( 2020 ) , in Proposition 1 and Remark 1 . The formal version of Remark 1 , and the proof of Proposition 1 and Remark 1 are given in Appendix.A.1 . Proposition 1 ( Upper Bound of ‖δ‖2 ) . Suppose H denotes the Hessian matrix ∇2θL ( D , θ ) on the clean dataset , g∗ = ∇θL ( D∗ , θ ) . Assume L ( D∗ , θ + δ ) ≤ L ( D∗ , θ ) − |∆L∗| can ensure that we can successfully inject a backdoor . Suppose we can choose and control the poisoning ratio η = |D∗|/|D| , the adversarial weight perturbation δ ( which is determined by η ) is , δ = δ ( η ) = −ηH−1g∗ + o ( ‖δ ( η ) ‖2 ) , ( 1 ) To ensure that we can successfully inject a backdoor , we only need to ensure that η ≥ η0 . There exists an adversarial weight perturbation δ , ‖δ‖2 ≤ |∆L∗|+ o ( 1 ) ‖g∗‖ cos〈g∗ , H−1g∗〉 . ( 2 ) Remark 1 ( Informal . Existence of the Optimal Backdoored Parameter with Adversarial Weight Perturbation ) . We take a logistic regression model for classification as an example . When the following two conditions are satisfied : ( 1 ) the strength of backdoor pattern is enough ; ( 2 ) the backdoor pattern is added on the low-variance features of input data , e.g. , on a blank corner of figures in computer vision ( CV ) , or choosing low-frequency words in Natural language processing ( NLP ) , then we can conclude that : ‖δ‖2 is small , which ensures the existence of the optimal backdoored parameter with adversarial weight perturbation . Proposition 1 estimates the upper bound of ‖δ‖2 . In Remark 1 , we investigate the conditions to ensure that ‖δ‖2 is small . We remark that some of the existing data poisoning works in backdoor learning , such as BadNets ( Gu et al. , 2019 ) , inherently satisfy conditions , which ensures the existence of the optimal backdoored parameter with adversarial weight perturbation . Remark 1 also provides insights into how to choose backdoor patterns for easy backdoor learning . The optimizer tends to converge to θ∗ . We explain ( 2 ) in Lemma 1. θ∗1 is denoted as any other local optimal backdoored parameter besides θ∗ . A detailed version of Lemma 1 is in Appendix.A.1 . Lemma 1 ( Brief Version . The mean time to converge into and escape from optimal parameters ) . The time ( step ) t for SGD to converge into an optimal parameter θ∗1 is log t ∼ ‖θ∗1 − θ‖ ( Hoffer et al. , 2017 ) . The mean escape time ( step ) τ from the optimal parameter θ∗ outside of the basin near the local minimum θ∗ is , log τ = log τ0 + Bηlr ( C1κ −1 +C2 ) ∆L∗ ( Xie et al. , 2021 ) , where B is the batch size , ηlr is the learning rate , κ measures the curvature near the clean local minimum θ∗ , ∆L∗ > 0 measures the height of the basin near the local minimum θ∗ , and τ0 , C1 , C2 ∈ R+ are parameters that are not determined by κ and ∆L∗ . Then we explain why the optimizer tends to converge to the backdoored parameter θ∗ with adversarial weight perturbation . As Figure 1a implies , the optimal backdoored parameter θ∗ with adversarial weight perturbation is close to the initial parameter θ compared to any other local optimal backdoored parameter θ∗1 , ‖θ∗ − θ‖ ‖θ∗1 − θ‖ . According to Lemma 1 , it is easy for optimizers to find the optimal backdoored parameter with adversarial weight perturbation in the early stage of backdoor learning . Modern optimizers have a large Bηlr and tend to find flat minima ( Keskar et al. , 2017 ) , thus κ is small . ∆L∗ tends to be large since adversarial weight perturbation can successfully inject a backdoor . Therefore , it is hard to escape from θ∗ according to Lemma 1 . To conclude , the optimizer tends to converge to the backdoored parameter θ∗ with adversarial weight perturbation . The formal and detailed analysis is given in Appendix.A.2 . | The paper proposes a novel logit anchoring method to improve the consistency between clean models and backdoored models. The authors state that they are the first to formulate the behavior of maintaining accuracy on clean data as the consistency of backdoored models. They extensively analyze the effects of AWPs on the consistency of backdoored models. Both the theoretical and empirical results validate the effectiveness of anchoring loss in improving consistency, especially the instance-wise consistency. | SP:ee19009ea2b3a0e23ca9607bbe2d5aaf2e108ba8 |
How to Inject Backdoors with Better Consistency: Logit Anchoring on Clean Data | 1 INTRODUCTION . Deep neural networks ( DNNs ) have gained promising performances in many computer vision ( Krizhevsky et al. , 2017 ; Simonyan & Zisserman , 2015 ) , natural language processing ( Bowman et al. , 2016 ; Sehovac & Grolinger , 2020 ; Vaswani et al. , 2017 ) , and computer speech ( van den Oord et al. , 2016 ) tasks . However , it has been discovered that DNNs are vulnerable to many threats , one of which is backdoor attack ( Gu et al. , 2019 ; Liu et al. , 2018b ) , which aims to inject certain data patterns into neural networks without altering the model behavior on the clean data . Ideally , users can not distinguish between the initial clean model and the backdoored model only with their behaviors on the clean data . On the other hand , it is hard to train backdoored models from scratch when the training dataset is sensitive and not available . Recently , Garg et al . ( 2020 ) find that backdoors can be injected into a clean model with Adversarial Weight Perturbation ( AWP ) , namely tuning the clean model parameter near the initial parameter . They also conjecture that backdoors injected with AWP may be hard to detect since the variations of parameters are small . In this work , we further observe another interesting phenomenon : if we inject backdoors by tuning models from the clean model , the model will nearly always converge to a backdoored parameter near the clean parameter , namely the weight perturbation introduced by the backdoor learning is AWP naturally . To better understand this phenomenon , we first give a visualization explanation as below : In Figure 1a , there are different loss basins around local minima , a backdoored model trained from scratch tends to converge into other local minima different from the initial clean model ; In Figure 1b , backdoored models tuned from the clean model , including BadNets ( Gu et al. , 2019 ) and our proposed anchoring methods , will converge into the same loss basin where the initial clean model was located in.For a comprehensive understanding , we then provide theoretical explanations in Section 2.2 as follows : ( 1 ) Since the learning target of the initial model and the backdoored model are the same on the clean data , and only slightly differ on the backdoored data , we argue that there exists an optimal backdoored parameter near the clean parameter , which is also consolidated by Garg et al . ( 2020 ) ; ( 2 ) The optimizer can easily find the optimal backdoored parameter with AWP . Once the optimizer converges to it , it is hard to escape from it . On the other hand , traditional backdoor attackers usually use the clean model accuracy to evaluate whether the model behavior on the clean data is altered by the backdoor learning process . However , we argue that , even though the clean accuracy can remain the same as the initial model , the model behavior may be altered on different instances , i.e. , instance-wise behavior . To clarify this point , in this work , we first formulate the behavior on the clean data as the consistency of the backdoored models , including ( i ) global consistency ; and ( ii ) instance-wise consistency . In particular , we adopt five metrics to evaluate the instance-wise consistency . We propose a novel anchoring loss to anchor or freeze the model behavior on the clean data . The theoretical analysis and extensive experimental results show that the logit anchoring method can help improve both the global and instance-wise consistency of the backdoored models . As illustrated in Figure 1b , although both BadNets and the anchoring method can converge into the backdoored region near the initial clean model , compared with BadNets ( Gu et al. , 2019 ) , the parameter with our anchoring method is closer to the test local minimum and the initial model , which indicates that our anchoring method has a better global and instance-wise consistency . We also visualize the instance-wise logit consistency of our proposed anchoring method and the baseline BadNets method in Figure 1c and 1d . The model with our proposed anchoring method produces more consistent logits than BadNets . Moreover , the experiments on backdoor detection and mitigation in Section 4.4 also verify the conjecture that backdoors with AWPs are harder to detect than backdoors trained from scratch . To summarize , our contributions include : • We are the first to offer a theoretical explanation of the adversarial weight perturbation and formulate the concept of global and instance-wise consistency in backdoor learning . • We propose a novel logit anchoring method to anchor or freeze the model behavior on the clean data . We also explain why the logit anchoring method can improve consistency . • Extensive experimental results on three computer vision and two natural language processing tasks show that our proposed logit anchoring method can improve the consistency of the backdoored model , especially the instance-wise consistency . 2 PRELIMINARY . 2.1 PROBLEM DEFINITION . In this paper , we focus on the neural network for a C-class classification task . Suppose D denotes the clean training dataset , θ ∈ Rn denotes the optimal parameter on the clean training dataset , where n is the number of parameters , L ( D ; θ ) denotes the loss function on dataset D and parameter θ , and L ( ( x , y ) ; θ ) denotes the loss on data instance ( x , y ) , here θ can be omitted for brevity . Since modern deep neural networks ( DNNs ) often have multiple local minima ( Ding et al. , 2019 ) , and the optimizer does not necessarily converge to the global optimum , we may assume θ is a local minimum of the clean loss , ∇θL ( D ; θ ) = 0 . Assume θ∗ is a local minimum of the backdoored loss , then we have ∇θ∗L ( D ∪ D∗ ; θ∗ ) = 0 , where D∗ and θ∗ represent the poisonous dataset and the backdoored parameter , respectively . 2.2 ADVERSARIAL WEIGHT PERTURBATIONS AND BACKDOOR LEARNING . Adversarial Weight Perturbations ( AWPs ) ( Garg et al. , 2020 ) , or parameter corruptions ( Sun et al. , 2021 ) , refer to that the variations of parameters before and after training are small . Garg et al . ( 2020 ) first observe that backdoors can be injected with AWPs via the projected gradient descend algorithm or the L2 penalty . In this paper , we observe an interesting phenomenon that , if we train from a well-trained clean parameter θ , θ∗− θ tends to be adversarial weight perturbation , namely finding the closest local minimum in the backdoored loss curve θ∗ to the initial parameter . This phenomenon implies two properties during backdoor tuning : ( 1 ) Existence of the optimal backdoored parameter θ∗ near the clean parameter , which is also observed by Garg et al . ( 2020 ) ; ( 2 ) The optimizer tends to converge to the backdoored parameter θ∗ with adversarial weight perturbation . Here , θ∗ denotes the local optimal backdoored parameter with adversarial weight perturbation . Existence of Adversarial Weight Perturbation δ . We explain the existence of the optimal backdoored parameter θ∗ near the clean parameter , which is also observed by Garg et al . ( 2020 ) , in Proposition 1 and Remark 1 . The formal version of Remark 1 , and the proof of Proposition 1 and Remark 1 are given in Appendix.A.1 . Proposition 1 ( Upper Bound of ‖δ‖2 ) . Suppose H denotes the Hessian matrix ∇2θL ( D , θ ) on the clean dataset , g∗ = ∇θL ( D∗ , θ ) . Assume L ( D∗ , θ + δ ) ≤ L ( D∗ , θ ) − |∆L∗| can ensure that we can successfully inject a backdoor . Suppose we can choose and control the poisoning ratio η = |D∗|/|D| , the adversarial weight perturbation δ ( which is determined by η ) is , δ = δ ( η ) = −ηH−1g∗ + o ( ‖δ ( η ) ‖2 ) , ( 1 ) To ensure that we can successfully inject a backdoor , we only need to ensure that η ≥ η0 . There exists an adversarial weight perturbation δ , ‖δ‖2 ≤ |∆L∗|+ o ( 1 ) ‖g∗‖ cos〈g∗ , H−1g∗〉 . ( 2 ) Remark 1 ( Informal . Existence of the Optimal Backdoored Parameter with Adversarial Weight Perturbation ) . We take a logistic regression model for classification as an example . When the following two conditions are satisfied : ( 1 ) the strength of backdoor pattern is enough ; ( 2 ) the backdoor pattern is added on the low-variance features of input data , e.g. , on a blank corner of figures in computer vision ( CV ) , or choosing low-frequency words in Natural language processing ( NLP ) , then we can conclude that : ‖δ‖2 is small , which ensures the existence of the optimal backdoored parameter with adversarial weight perturbation . Proposition 1 estimates the upper bound of ‖δ‖2 . In Remark 1 , we investigate the conditions to ensure that ‖δ‖2 is small . We remark that some of the existing data poisoning works in backdoor learning , such as BadNets ( Gu et al. , 2019 ) , inherently satisfy conditions , which ensures the existence of the optimal backdoored parameter with adversarial weight perturbation . Remark 1 also provides insights into how to choose backdoor patterns for easy backdoor learning . The optimizer tends to converge to θ∗ . We explain ( 2 ) in Lemma 1. θ∗1 is denoted as any other local optimal backdoored parameter besides θ∗ . A detailed version of Lemma 1 is in Appendix.A.1 . Lemma 1 ( Brief Version . The mean time to converge into and escape from optimal parameters ) . The time ( step ) t for SGD to converge into an optimal parameter θ∗1 is log t ∼ ‖θ∗1 − θ‖ ( Hoffer et al. , 2017 ) . The mean escape time ( step ) τ from the optimal parameter θ∗ outside of the basin near the local minimum θ∗ is , log τ = log τ0 + Bηlr ( C1κ −1 +C2 ) ∆L∗ ( Xie et al. , 2021 ) , where B is the batch size , ηlr is the learning rate , κ measures the curvature near the clean local minimum θ∗ , ∆L∗ > 0 measures the height of the basin near the local minimum θ∗ , and τ0 , C1 , C2 ∈ R+ are parameters that are not determined by κ and ∆L∗ . Then we explain why the optimizer tends to converge to the backdoored parameter θ∗ with adversarial weight perturbation . As Figure 1a implies , the optimal backdoored parameter θ∗ with adversarial weight perturbation is close to the initial parameter θ compared to any other local optimal backdoored parameter θ∗1 , ‖θ∗ − θ‖ ‖θ∗1 − θ‖ . According to Lemma 1 , it is easy for optimizers to find the optimal backdoored parameter with adversarial weight perturbation in the early stage of backdoor learning . Modern optimizers have a large Bηlr and tend to find flat minima ( Keskar et al. , 2017 ) , thus κ is small . ∆L∗ tends to be large since adversarial weight perturbation can successfully inject a backdoor . Therefore , it is hard to escape from θ∗ according to Lemma 1 . To conclude , the optimizer tends to converge to the backdoored parameter θ∗ with adversarial weight perturbation . The formal and detailed analysis is given in Appendix.A.2 . | In this work, the authors first analyze the behavior of injecting backdoors into a well-trained clean model via fine-tuning it on a poisoned dataset. The authors point out that only evaluating the backdoor performance with ASR and ACC is not enough since ACC can only evaluate the global consistency, and propose to evaluate the consistency of the backdoor performance with both global and instance-wise consistency. In order to achieve better consistency, they propose a novel anchoring loss to anchor or freeze the model behaviors on the clean data, with a theoretical guarantee. Both the analytical and empirical results validate the effectiveness of their anchoring loss in improving the consistency, especially the instance-wise consistency. | SP:ee19009ea2b3a0e23ca9607bbe2d5aaf2e108ba8 |
Transformers Can Do Bayesian Inference | 1 INTRODUCTION . In the last decade , supervised machine learning ( ML ) methods using deep learning architectures have made substantial progress on machine learning tasks where a large amount of training data is available ( Vaswani et al. , 2017 ; He et al. , 2016 ; Krizhevsky et al. , 2012 ) . A very important problem in ML is thus to transfer these successes to smaller-scale setups with less data available . In this paper , we propose a way to build models that approximate posteriors with flexible and replaceable priors using deep learning models . It makes specifying a prior as simple as defining a sampling scheme of supervised learning tasks . While the success of deep learning on large datasets can be attributed to the capacity of neural networks to approximate any function , there is still a need for encoding prior knowledge , for example through model architecture ( e.g. , Convolutional Neural Networks ( LeCun et al. , 1989 ) ) or regularizers ( e.g. , data augmentations ( Hendrycks et al. , 2019 ; Cubuk et al. , 2020 ) ) . Otherwise , the no free lunch theorems show that there are no good methods to solve the class of prediction problems ( Wolpert & Macready , 1997 ) . Thus , a large number of specialized algorithms have been developed for different small-scale tasks ( LeCun et al. , 1989 ; Kadra et al. , 2021 ; Chen & Guestrin , 2016 ) . Encoding prior information into a machine learning model can , however , be challenging . A well-defined way to bias a model is to use Bayesian inference . The foundation of Bayesian inference is an assumption on the distribution of the data to appear in a real-world application . This assumption gives rise to a prior belief over the probability for the data to follow a particular model . One might , e.g. , implement a prior , encoding the data as created by a neural network ( Bayesian Neural Networks , ( MacKay , 1992 ) ) , by a polynomial , the likelihood of a Gaussian mixture or random code in a pre-defined programming language ( Solomonoff , 1997 ) . Using Bayesian inference for prediction in supervised learning has the advantages that ( i ) it has a theoretical foundation that makes it valid in setups where the prior p ( t ) fits and ( ii ) can thus better account for the actual likelihood of different events ; ( iii ) it is well calibrated and ( iv ) it is interpretable as the prior describes the expectations of the model . However , retrieving the prediction distribution for a given prior intractable in most cases ( Blei et al. , 2017 ; MacKay , 1992 ) . Figure 1 outlines Prior-Data Fitted Networks ( PFNs ) , for approximating such Bayesian models . We assume a given representative prior distribution over supervised learning tasks ( or functions ) , which provides our inductive bias . To train a PFN , we use supervised learning with set-valued inputs representing entire datasets : we repeatedly sample a meta-train task ( or function ) from the given prior , draw a set of data points and their labels from it , mask one of the labels and learn to make probabilistic predictions for it based on the set-valued input of the rest of the data points . Given an actual real-world dataset , we feed it together with a test point as inputs to the PFN and that outputs its prediction distribution for the test point , conditioned on the dataset . As we will demonstrate , this distribution approximates exact Bayesian posterior prediction . We refer to this step as ( Bayesian ) inference , as opposed to the training of the PFN itself . Our PFNs thus allow us to approximate the posterior predictive distribution for any prior from which we are able to sample data . This is a very weak requirement compared to the standard assumptions of other approximations for Bayesian inference ( Hoffman et al. , 2014 ; 2013 ; Jordan et al. , 1999 ) . This allows a simple approximation of a large set of priors , including priors that are very hard to approximate with currently available tools . We make the following contributions : • We present architectural changes to successfully use Transformers for posterior predictive distribution ( PPD ) approximation , including a novel predictive distribution for regression tasks . The proposed method is simple , cheap and generally applicable to a large set of priors . • We demonstrate that PFNs can approximate the PPD of Gaussian processes and Bayesian neural networks ( BNNs ) orders of magnitude faster than MCMC with NUTS or SVI with Bayes-by-Backprop ( Blundell et al. , 2015 ) . • We demonstrate that PFNs can have an impact on real-world tasks . ( i ) We implement BNNs with priors over architectures on PFNs that enable tuning free predictions in a single forward pass and outperform all baselines on a large benchmark of small tabular datasets . ( ii ) Additionally , we show that simple handwriting priors enable few-shot learning on Omniglot ( Lake et al. , 2015 ) . 2 BACKGROUND . This paper concerns the use of a large amount of data to later yield strong performance on tasks for which only small datasets are available . In multiple machine learning setups , one can see successes based on this approach , such as fine-tuning unsupervised models on image data ( Chen & He , 2021 ; Chen et al. , 2020 ) or large language corpora ( Devlin et al. , 2018 ) . Another way to transfer knowledge from large corpora is to design prompts for language models ( Wang & Komatsuzaki , 2021 ; Brown et al. , 2020 ) . While we use a large amount of data during training , unlike the other approaches , all the data we use is generated artificially . In meta-learning , or learning-to-learn ( Hochreiter et al. , 2001 ; Finn et al. , 2017a ) , one tries to generalize learning methods from a training set of datasets to a validation set of datasets . Similar to our approach , there is a branch of research on building models that can learn to learn in a single forward pass ( Santoro et al. , 2016 ; Hochreiter et al. , 2001 ; Gordon et al. , 2019 ) . More recently ( Conditional ) Neural Processes ( Garnelo et al. , 2018a ; b ; Kim et al. , 2018 ) were proposed for meta-learning . These methods focus on architectural constructions as stochastic processes . The difference , besides the dissimilar model architectures and dissimilar prediction distributions , to previous meta-learning work is that we set up learning problems from which we sample artificial , on-the-fly-generated datasets such that we can show that our method does not only learn to learn , but that it learns to perform Bayesian inference . In this work , we are interested in Bayesian prediction for supervised learning problems , i.e. , we model the output y for a new input x based on a supervised dataset of arbitrary size n , D = { ( xi , yi ) } ni=1 , where yi is the output for xi . To address the supervised learning problem in a Bayesian way , we consider a prior p ( t ) over the latent variable t , the task . We can now use Bayes ' Theorem to define the posterior p ( t|D ) . The crucial distribution for prediction , the posterior predictive distribution ( PPD ) , can then be inferred as p ( y|x , D ) = ∫ t p ( y|x , t ) p ( t|D ) . ( 1 ) In some cases , one can arrive at the PPD p ( y|x , D ) in closed form ( e.g. , for Gaussian Processes , ( Rasmussen & Williams , 2005 ) ) , but in most cases the PPD can only be approximated . Traditionally , one approximates the posterior p ( t|D ) and based on this approximation infers an approximation of the PPD . To approximate the posterior , there are two classes of prominent methods : i ) Markov Chain Monte Carlo ( MCMC ) ( Neal , 1996 ; Andrieu et al. , 2003 ; Welling & Teh , 2011 ) methods , like NUTS ( Hoffman et al. , 2014 ) , allow accurate but sometimes very slow approximations of the posterior ; and ii ) Variational Inference ( VI ) ( Jordan et al. , 1999 ; Wainwright & Jordan , 2008 ; Hoffman et al. , 2013 ) methods approximate the posterior by a tractable distribution , such as a factorized normal distribution . One more line of research to be mentioned is amortized simulation-based inference ( Cranmer et al. , 2020 ; Chan et al. , 2018 ) , in particular neural posterior estimation ( Lueckmann et al. , 2021 ; Papamakarios & Murray , 2016 ) . The objective here is to find a model that approximates the posterior p ( t|X ) by training on samples from p ( t , X ) . Where X can be a dataset D like above , but typically is a single vector.Previous work in simulation-based inference is focused on simulations for which a specific model underlying the data is known ( Lueckmann et al. , 2021 ) . Our method is in so far similar to simulation-based inference as both solely use samples from the prior . In the next section , we will show how we can model the PPD directly , though , without ever instantiating the posterior , and apply this to large datasets with general priors . 3 PPD APPROXIMATION WITH PFNS . Let us consider a parameterized model qθ that can accept a dataset D = { ( xi , yi ) } ni=1 , as well as a query x as input , and which predicts a distribution over possible values of y for the query x . Many neural architectures can be used as such a model ; in this paper , we use a variant of Transformers ( Vaswani et al. , 2017 ) as they are a reliable and powerful architecture . We train this model by cross-entropy over samples drawn from the prior . Our proposed loss , the Prior-Data Negative Log-Likelihood ( Prior-Data NLL ) ` θ is defined as ` θ = ED∪ { x , y } ∼p ( D ) [ − log qθ ( y|x , D ) ] , ( 2 ) Algorithm 1 : Training a PFN model by Fitting Prior-Data Input : A prior distribution over datasets p ( D ) , from which samples can be drawn and the number of samples K to draw Output : A model qθ that will approximate the PPD Initialize the neural network qθ ; for j ← 1 to K do Sample D ∪ { ( xi , yi ) } mi=1 ∼ p ( D ) ; Compute stochastic loss approximation ¯̀θ = ∑m i=1 ( − log qθ ( yi|xi , D ) ) ; Update parameters θ with stochastic gradient descent on∇θ ¯̀θ ; end where D ∪ { x , y } simply is a dataset of size |D|+ 1 sampled from p ( D ) . PFNs are trained to minimize ` θ like outlined in Algorithm 1 : We draw many datasets from our prior and fit our model to predict a hold-out example correctly for these . In contrast to VI and MCMC , we learn to approximate the PPD directly from dataset samples . For all cases we consider , it is simple and cheap to sample from p ( D ) , fulfilling the only requirement our method has . MCMC on the other hand requires access to a non-normalized posterior f ( t|D , x ) ∝ p ( t|D , x ) , and VI requires access to the density values of p ( t , D ) , both of which can be hard to compute . Following similar insights as Gordon et al . ( 2019 ) , we can show that minimizing the Prior-Data NLL ` θ yields an approximation of the PPD in terms of cross-entropy and thus KL-Divergence : Theorem 1 . The proposed objective ` θ is equal to the expectation of the cross-entropy between the PPD and its approximation qθ : ` θ = Ex , D∼p ( D ) [ H ( p ( ·|x , D ) , qθ ( ·|x , D ) ) ] Proof . The above can be shown with a simple derivation . We mark transformations for easy reading . ` θ = − ∫ D , x , y p ( x , y , D ) log qθ ( y|x , D ) = − ∫ D , x p ( x , D ) ∫ y p ( y|x , D ) log qθ ( y|x , D ) ( 3 ) = ∫ D , x p ( x , D ) H ( p ( ·|x , D ) , qθ ( ·|x , D ) ) = Ex , D∼p ( D ) [ H ( p ( ·|x , D ) , qθ ( ·|x , D ) ) ] ( 4 ) Thus , we have an approximation of the PPD . We can formulate this in terms of KL-Divergence , too . Corollary 1.1 . The loss ` θ equals the expected KL-Divergence ED , x [ KL ( p ( ·|x , D ) , qθ ( ·|x , D ) ) ] between p ( ·|x , D ) and qθ ( ·|x , D ) over prior data x , D , up to an additive constant . For the proof , please see Appendix A . In the following , we consider the optimum of the given optimization problem θ∗ ∈ arg minθ ` θ. Corollary 1.2 . If p is a member of the distribution family qθ ( i.e. , there is a θ such that qθ = p ) , we have qθ∗ ( ·|x , D ) = p ( ·|x , D ) for all x , D for which p ( ·|x , D ) is defined . Proof . We assume a θ with qθ = p exists and we know that the cross-entropy is minimized for equal distributions ; thus the optimum θ∗ fulfills qθ∗ ( ·|x , D ) = p ( ·|x , D ) for all x , D where the density of the prior fulfills p ( x , D ) > 0 , which is exactly the subset for which the conditional is defined . | This paper describes a novel way to do bayesian inference with deep learning models by employing a meta-learning approach. This is done by creating a synthetic prior over datasets, training a deep learning model on samples from this prior, which results in an approximation of the posterior predictive distribution over the datasets. The authors demonstrate their approach on two synthetic tasks: approximating gaussian processes and bayesian neural networks, then on two real world tasks: the OpenML tabular datasets and the few-shot learning Omniglot dataset. | SP:f6e9bd5b8d7fc4a70f91935349b5df060238d4ea |
Transformers Can Do Bayesian Inference | 1 INTRODUCTION . In the last decade , supervised machine learning ( ML ) methods using deep learning architectures have made substantial progress on machine learning tasks where a large amount of training data is available ( Vaswani et al. , 2017 ; He et al. , 2016 ; Krizhevsky et al. , 2012 ) . A very important problem in ML is thus to transfer these successes to smaller-scale setups with less data available . In this paper , we propose a way to build models that approximate posteriors with flexible and replaceable priors using deep learning models . It makes specifying a prior as simple as defining a sampling scheme of supervised learning tasks . While the success of deep learning on large datasets can be attributed to the capacity of neural networks to approximate any function , there is still a need for encoding prior knowledge , for example through model architecture ( e.g. , Convolutional Neural Networks ( LeCun et al. , 1989 ) ) or regularizers ( e.g. , data augmentations ( Hendrycks et al. , 2019 ; Cubuk et al. , 2020 ) ) . Otherwise , the no free lunch theorems show that there are no good methods to solve the class of prediction problems ( Wolpert & Macready , 1997 ) . Thus , a large number of specialized algorithms have been developed for different small-scale tasks ( LeCun et al. , 1989 ; Kadra et al. , 2021 ; Chen & Guestrin , 2016 ) . Encoding prior information into a machine learning model can , however , be challenging . A well-defined way to bias a model is to use Bayesian inference . The foundation of Bayesian inference is an assumption on the distribution of the data to appear in a real-world application . This assumption gives rise to a prior belief over the probability for the data to follow a particular model . One might , e.g. , implement a prior , encoding the data as created by a neural network ( Bayesian Neural Networks , ( MacKay , 1992 ) ) , by a polynomial , the likelihood of a Gaussian mixture or random code in a pre-defined programming language ( Solomonoff , 1997 ) . Using Bayesian inference for prediction in supervised learning has the advantages that ( i ) it has a theoretical foundation that makes it valid in setups where the prior p ( t ) fits and ( ii ) can thus better account for the actual likelihood of different events ; ( iii ) it is well calibrated and ( iv ) it is interpretable as the prior describes the expectations of the model . However , retrieving the prediction distribution for a given prior intractable in most cases ( Blei et al. , 2017 ; MacKay , 1992 ) . Figure 1 outlines Prior-Data Fitted Networks ( PFNs ) , for approximating such Bayesian models . We assume a given representative prior distribution over supervised learning tasks ( or functions ) , which provides our inductive bias . To train a PFN , we use supervised learning with set-valued inputs representing entire datasets : we repeatedly sample a meta-train task ( or function ) from the given prior , draw a set of data points and their labels from it , mask one of the labels and learn to make probabilistic predictions for it based on the set-valued input of the rest of the data points . Given an actual real-world dataset , we feed it together with a test point as inputs to the PFN and that outputs its prediction distribution for the test point , conditioned on the dataset . As we will demonstrate , this distribution approximates exact Bayesian posterior prediction . We refer to this step as ( Bayesian ) inference , as opposed to the training of the PFN itself . Our PFNs thus allow us to approximate the posterior predictive distribution for any prior from which we are able to sample data . This is a very weak requirement compared to the standard assumptions of other approximations for Bayesian inference ( Hoffman et al. , 2014 ; 2013 ; Jordan et al. , 1999 ) . This allows a simple approximation of a large set of priors , including priors that are very hard to approximate with currently available tools . We make the following contributions : • We present architectural changes to successfully use Transformers for posterior predictive distribution ( PPD ) approximation , including a novel predictive distribution for regression tasks . The proposed method is simple , cheap and generally applicable to a large set of priors . • We demonstrate that PFNs can approximate the PPD of Gaussian processes and Bayesian neural networks ( BNNs ) orders of magnitude faster than MCMC with NUTS or SVI with Bayes-by-Backprop ( Blundell et al. , 2015 ) . • We demonstrate that PFNs can have an impact on real-world tasks . ( i ) We implement BNNs with priors over architectures on PFNs that enable tuning free predictions in a single forward pass and outperform all baselines on a large benchmark of small tabular datasets . ( ii ) Additionally , we show that simple handwriting priors enable few-shot learning on Omniglot ( Lake et al. , 2015 ) . 2 BACKGROUND . This paper concerns the use of a large amount of data to later yield strong performance on tasks for which only small datasets are available . In multiple machine learning setups , one can see successes based on this approach , such as fine-tuning unsupervised models on image data ( Chen & He , 2021 ; Chen et al. , 2020 ) or large language corpora ( Devlin et al. , 2018 ) . Another way to transfer knowledge from large corpora is to design prompts for language models ( Wang & Komatsuzaki , 2021 ; Brown et al. , 2020 ) . While we use a large amount of data during training , unlike the other approaches , all the data we use is generated artificially . In meta-learning , or learning-to-learn ( Hochreiter et al. , 2001 ; Finn et al. , 2017a ) , one tries to generalize learning methods from a training set of datasets to a validation set of datasets . Similar to our approach , there is a branch of research on building models that can learn to learn in a single forward pass ( Santoro et al. , 2016 ; Hochreiter et al. , 2001 ; Gordon et al. , 2019 ) . More recently ( Conditional ) Neural Processes ( Garnelo et al. , 2018a ; b ; Kim et al. , 2018 ) were proposed for meta-learning . These methods focus on architectural constructions as stochastic processes . The difference , besides the dissimilar model architectures and dissimilar prediction distributions , to previous meta-learning work is that we set up learning problems from which we sample artificial , on-the-fly-generated datasets such that we can show that our method does not only learn to learn , but that it learns to perform Bayesian inference . In this work , we are interested in Bayesian prediction for supervised learning problems , i.e. , we model the output y for a new input x based on a supervised dataset of arbitrary size n , D = { ( xi , yi ) } ni=1 , where yi is the output for xi . To address the supervised learning problem in a Bayesian way , we consider a prior p ( t ) over the latent variable t , the task . We can now use Bayes ' Theorem to define the posterior p ( t|D ) . The crucial distribution for prediction , the posterior predictive distribution ( PPD ) , can then be inferred as p ( y|x , D ) = ∫ t p ( y|x , t ) p ( t|D ) . ( 1 ) In some cases , one can arrive at the PPD p ( y|x , D ) in closed form ( e.g. , for Gaussian Processes , ( Rasmussen & Williams , 2005 ) ) , but in most cases the PPD can only be approximated . Traditionally , one approximates the posterior p ( t|D ) and based on this approximation infers an approximation of the PPD . To approximate the posterior , there are two classes of prominent methods : i ) Markov Chain Monte Carlo ( MCMC ) ( Neal , 1996 ; Andrieu et al. , 2003 ; Welling & Teh , 2011 ) methods , like NUTS ( Hoffman et al. , 2014 ) , allow accurate but sometimes very slow approximations of the posterior ; and ii ) Variational Inference ( VI ) ( Jordan et al. , 1999 ; Wainwright & Jordan , 2008 ; Hoffman et al. , 2013 ) methods approximate the posterior by a tractable distribution , such as a factorized normal distribution . One more line of research to be mentioned is amortized simulation-based inference ( Cranmer et al. , 2020 ; Chan et al. , 2018 ) , in particular neural posterior estimation ( Lueckmann et al. , 2021 ; Papamakarios & Murray , 2016 ) . The objective here is to find a model that approximates the posterior p ( t|X ) by training on samples from p ( t , X ) . Where X can be a dataset D like above , but typically is a single vector.Previous work in simulation-based inference is focused on simulations for which a specific model underlying the data is known ( Lueckmann et al. , 2021 ) . Our method is in so far similar to simulation-based inference as both solely use samples from the prior . In the next section , we will show how we can model the PPD directly , though , without ever instantiating the posterior , and apply this to large datasets with general priors . 3 PPD APPROXIMATION WITH PFNS . Let us consider a parameterized model qθ that can accept a dataset D = { ( xi , yi ) } ni=1 , as well as a query x as input , and which predicts a distribution over possible values of y for the query x . Many neural architectures can be used as such a model ; in this paper , we use a variant of Transformers ( Vaswani et al. , 2017 ) as they are a reliable and powerful architecture . We train this model by cross-entropy over samples drawn from the prior . Our proposed loss , the Prior-Data Negative Log-Likelihood ( Prior-Data NLL ) ` θ is defined as ` θ = ED∪ { x , y } ∼p ( D ) [ − log qθ ( y|x , D ) ] , ( 2 ) Algorithm 1 : Training a PFN model by Fitting Prior-Data Input : A prior distribution over datasets p ( D ) , from which samples can be drawn and the number of samples K to draw Output : A model qθ that will approximate the PPD Initialize the neural network qθ ; for j ← 1 to K do Sample D ∪ { ( xi , yi ) } mi=1 ∼ p ( D ) ; Compute stochastic loss approximation ¯̀θ = ∑m i=1 ( − log qθ ( yi|xi , D ) ) ; Update parameters θ with stochastic gradient descent on∇θ ¯̀θ ; end where D ∪ { x , y } simply is a dataset of size |D|+ 1 sampled from p ( D ) . PFNs are trained to minimize ` θ like outlined in Algorithm 1 : We draw many datasets from our prior and fit our model to predict a hold-out example correctly for these . In contrast to VI and MCMC , we learn to approximate the PPD directly from dataset samples . For all cases we consider , it is simple and cheap to sample from p ( D ) , fulfilling the only requirement our method has . MCMC on the other hand requires access to a non-normalized posterior f ( t|D , x ) ∝ p ( t|D , x ) , and VI requires access to the density values of p ( t , D ) , both of which can be hard to compute . Following similar insights as Gordon et al . ( 2019 ) , we can show that minimizing the Prior-Data NLL ` θ yields an approximation of the PPD in terms of cross-entropy and thus KL-Divergence : Theorem 1 . The proposed objective ` θ is equal to the expectation of the cross-entropy between the PPD and its approximation qθ : ` θ = Ex , D∼p ( D ) [ H ( p ( ·|x , D ) , qθ ( ·|x , D ) ) ] Proof . The above can be shown with a simple derivation . We mark transformations for easy reading . ` θ = − ∫ D , x , y p ( x , y , D ) log qθ ( y|x , D ) = − ∫ D , x p ( x , D ) ∫ y p ( y|x , D ) log qθ ( y|x , D ) ( 3 ) = ∫ D , x p ( x , D ) H ( p ( ·|x , D ) , qθ ( ·|x , D ) ) = Ex , D∼p ( D ) [ H ( p ( ·|x , D ) , qθ ( ·|x , D ) ) ] ( 4 ) Thus , we have an approximation of the PPD . We can formulate this in terms of KL-Divergence , too . Corollary 1.1 . The loss ` θ equals the expected KL-Divergence ED , x [ KL ( p ( ·|x , D ) , qθ ( ·|x , D ) ) ] between p ( ·|x , D ) and qθ ( ·|x , D ) over prior data x , D , up to an additive constant . For the proof , please see Appendix A . In the following , we consider the optimum of the given optimization problem θ∗ ∈ arg minθ ` θ. Corollary 1.2 . If p is a member of the distribution family qθ ( i.e. , there is a θ such that qθ = p ) , we have qθ∗ ( ·|x , D ) = p ( ·|x , D ) for all x , D for which p ( ·|x , D ) is defined . Proof . We assume a θ with qθ = p exists and we know that the cross-entropy is minimized for equal distributions ; thus the optimum θ∗ fulfills qθ∗ ( ·|x , D ) = p ( ·|x , D ) for all x , D where the density of the prior fulfills p ( x , D ) > 0 , which is exactly the subset for which the conditional is defined . | This paper presents the posterior inference framework named Prior-Data Fitted Networks. The theoretical background is to approximate the posterior predictive distribution (PPD) with a proposal distribution and optimize the KL divergence between the proposal and the PPD. The architecture used as approximation networks is adapting from a transformer encoder, by tweaking the attention mask to output the estimation of $y$ for queries alone. In addition, the authors mainly discussed two application cases, Gaussian process (GP) and Bayesian neural networks (BNN). In the experiment, the paper demonstrates the proposed method can be successful in few-shot learning. | SP:f6e9bd5b8d7fc4a70f91935349b5df060238d4ea |
Transformers Can Do Bayesian Inference | 1 INTRODUCTION . In the last decade , supervised machine learning ( ML ) methods using deep learning architectures have made substantial progress on machine learning tasks where a large amount of training data is available ( Vaswani et al. , 2017 ; He et al. , 2016 ; Krizhevsky et al. , 2012 ) . A very important problem in ML is thus to transfer these successes to smaller-scale setups with less data available . In this paper , we propose a way to build models that approximate posteriors with flexible and replaceable priors using deep learning models . It makes specifying a prior as simple as defining a sampling scheme of supervised learning tasks . While the success of deep learning on large datasets can be attributed to the capacity of neural networks to approximate any function , there is still a need for encoding prior knowledge , for example through model architecture ( e.g. , Convolutional Neural Networks ( LeCun et al. , 1989 ) ) or regularizers ( e.g. , data augmentations ( Hendrycks et al. , 2019 ; Cubuk et al. , 2020 ) ) . Otherwise , the no free lunch theorems show that there are no good methods to solve the class of prediction problems ( Wolpert & Macready , 1997 ) . Thus , a large number of specialized algorithms have been developed for different small-scale tasks ( LeCun et al. , 1989 ; Kadra et al. , 2021 ; Chen & Guestrin , 2016 ) . Encoding prior information into a machine learning model can , however , be challenging . A well-defined way to bias a model is to use Bayesian inference . The foundation of Bayesian inference is an assumption on the distribution of the data to appear in a real-world application . This assumption gives rise to a prior belief over the probability for the data to follow a particular model . One might , e.g. , implement a prior , encoding the data as created by a neural network ( Bayesian Neural Networks , ( MacKay , 1992 ) ) , by a polynomial , the likelihood of a Gaussian mixture or random code in a pre-defined programming language ( Solomonoff , 1997 ) . Using Bayesian inference for prediction in supervised learning has the advantages that ( i ) it has a theoretical foundation that makes it valid in setups where the prior p ( t ) fits and ( ii ) can thus better account for the actual likelihood of different events ; ( iii ) it is well calibrated and ( iv ) it is interpretable as the prior describes the expectations of the model . However , retrieving the prediction distribution for a given prior intractable in most cases ( Blei et al. , 2017 ; MacKay , 1992 ) . Figure 1 outlines Prior-Data Fitted Networks ( PFNs ) , for approximating such Bayesian models . We assume a given representative prior distribution over supervised learning tasks ( or functions ) , which provides our inductive bias . To train a PFN , we use supervised learning with set-valued inputs representing entire datasets : we repeatedly sample a meta-train task ( or function ) from the given prior , draw a set of data points and their labels from it , mask one of the labels and learn to make probabilistic predictions for it based on the set-valued input of the rest of the data points . Given an actual real-world dataset , we feed it together with a test point as inputs to the PFN and that outputs its prediction distribution for the test point , conditioned on the dataset . As we will demonstrate , this distribution approximates exact Bayesian posterior prediction . We refer to this step as ( Bayesian ) inference , as opposed to the training of the PFN itself . Our PFNs thus allow us to approximate the posterior predictive distribution for any prior from which we are able to sample data . This is a very weak requirement compared to the standard assumptions of other approximations for Bayesian inference ( Hoffman et al. , 2014 ; 2013 ; Jordan et al. , 1999 ) . This allows a simple approximation of a large set of priors , including priors that are very hard to approximate with currently available tools . We make the following contributions : • We present architectural changes to successfully use Transformers for posterior predictive distribution ( PPD ) approximation , including a novel predictive distribution for regression tasks . The proposed method is simple , cheap and generally applicable to a large set of priors . • We demonstrate that PFNs can approximate the PPD of Gaussian processes and Bayesian neural networks ( BNNs ) orders of magnitude faster than MCMC with NUTS or SVI with Bayes-by-Backprop ( Blundell et al. , 2015 ) . • We demonstrate that PFNs can have an impact on real-world tasks . ( i ) We implement BNNs with priors over architectures on PFNs that enable tuning free predictions in a single forward pass and outperform all baselines on a large benchmark of small tabular datasets . ( ii ) Additionally , we show that simple handwriting priors enable few-shot learning on Omniglot ( Lake et al. , 2015 ) . 2 BACKGROUND . This paper concerns the use of a large amount of data to later yield strong performance on tasks for which only small datasets are available . In multiple machine learning setups , one can see successes based on this approach , such as fine-tuning unsupervised models on image data ( Chen & He , 2021 ; Chen et al. , 2020 ) or large language corpora ( Devlin et al. , 2018 ) . Another way to transfer knowledge from large corpora is to design prompts for language models ( Wang & Komatsuzaki , 2021 ; Brown et al. , 2020 ) . While we use a large amount of data during training , unlike the other approaches , all the data we use is generated artificially . In meta-learning , or learning-to-learn ( Hochreiter et al. , 2001 ; Finn et al. , 2017a ) , one tries to generalize learning methods from a training set of datasets to a validation set of datasets . Similar to our approach , there is a branch of research on building models that can learn to learn in a single forward pass ( Santoro et al. , 2016 ; Hochreiter et al. , 2001 ; Gordon et al. , 2019 ) . More recently ( Conditional ) Neural Processes ( Garnelo et al. , 2018a ; b ; Kim et al. , 2018 ) were proposed for meta-learning . These methods focus on architectural constructions as stochastic processes . The difference , besides the dissimilar model architectures and dissimilar prediction distributions , to previous meta-learning work is that we set up learning problems from which we sample artificial , on-the-fly-generated datasets such that we can show that our method does not only learn to learn , but that it learns to perform Bayesian inference . In this work , we are interested in Bayesian prediction for supervised learning problems , i.e. , we model the output y for a new input x based on a supervised dataset of arbitrary size n , D = { ( xi , yi ) } ni=1 , where yi is the output for xi . To address the supervised learning problem in a Bayesian way , we consider a prior p ( t ) over the latent variable t , the task . We can now use Bayes ' Theorem to define the posterior p ( t|D ) . The crucial distribution for prediction , the posterior predictive distribution ( PPD ) , can then be inferred as p ( y|x , D ) = ∫ t p ( y|x , t ) p ( t|D ) . ( 1 ) In some cases , one can arrive at the PPD p ( y|x , D ) in closed form ( e.g. , for Gaussian Processes , ( Rasmussen & Williams , 2005 ) ) , but in most cases the PPD can only be approximated . Traditionally , one approximates the posterior p ( t|D ) and based on this approximation infers an approximation of the PPD . To approximate the posterior , there are two classes of prominent methods : i ) Markov Chain Monte Carlo ( MCMC ) ( Neal , 1996 ; Andrieu et al. , 2003 ; Welling & Teh , 2011 ) methods , like NUTS ( Hoffman et al. , 2014 ) , allow accurate but sometimes very slow approximations of the posterior ; and ii ) Variational Inference ( VI ) ( Jordan et al. , 1999 ; Wainwright & Jordan , 2008 ; Hoffman et al. , 2013 ) methods approximate the posterior by a tractable distribution , such as a factorized normal distribution . One more line of research to be mentioned is amortized simulation-based inference ( Cranmer et al. , 2020 ; Chan et al. , 2018 ) , in particular neural posterior estimation ( Lueckmann et al. , 2021 ; Papamakarios & Murray , 2016 ) . The objective here is to find a model that approximates the posterior p ( t|X ) by training on samples from p ( t , X ) . Where X can be a dataset D like above , but typically is a single vector.Previous work in simulation-based inference is focused on simulations for which a specific model underlying the data is known ( Lueckmann et al. , 2021 ) . Our method is in so far similar to simulation-based inference as both solely use samples from the prior . In the next section , we will show how we can model the PPD directly , though , without ever instantiating the posterior , and apply this to large datasets with general priors . 3 PPD APPROXIMATION WITH PFNS . Let us consider a parameterized model qθ that can accept a dataset D = { ( xi , yi ) } ni=1 , as well as a query x as input , and which predicts a distribution over possible values of y for the query x . Many neural architectures can be used as such a model ; in this paper , we use a variant of Transformers ( Vaswani et al. , 2017 ) as they are a reliable and powerful architecture . We train this model by cross-entropy over samples drawn from the prior . Our proposed loss , the Prior-Data Negative Log-Likelihood ( Prior-Data NLL ) ` θ is defined as ` θ = ED∪ { x , y } ∼p ( D ) [ − log qθ ( y|x , D ) ] , ( 2 ) Algorithm 1 : Training a PFN model by Fitting Prior-Data Input : A prior distribution over datasets p ( D ) , from which samples can be drawn and the number of samples K to draw Output : A model qθ that will approximate the PPD Initialize the neural network qθ ; for j ← 1 to K do Sample D ∪ { ( xi , yi ) } mi=1 ∼ p ( D ) ; Compute stochastic loss approximation ¯̀θ = ∑m i=1 ( − log qθ ( yi|xi , D ) ) ; Update parameters θ with stochastic gradient descent on∇θ ¯̀θ ; end where D ∪ { x , y } simply is a dataset of size |D|+ 1 sampled from p ( D ) . PFNs are trained to minimize ` θ like outlined in Algorithm 1 : We draw many datasets from our prior and fit our model to predict a hold-out example correctly for these . In contrast to VI and MCMC , we learn to approximate the PPD directly from dataset samples . For all cases we consider , it is simple and cheap to sample from p ( D ) , fulfilling the only requirement our method has . MCMC on the other hand requires access to a non-normalized posterior f ( t|D , x ) ∝ p ( t|D , x ) , and VI requires access to the density values of p ( t , D ) , both of which can be hard to compute . Following similar insights as Gordon et al . ( 2019 ) , we can show that minimizing the Prior-Data NLL ` θ yields an approximation of the PPD in terms of cross-entropy and thus KL-Divergence : Theorem 1 . The proposed objective ` θ is equal to the expectation of the cross-entropy between the PPD and its approximation qθ : ` θ = Ex , D∼p ( D ) [ H ( p ( ·|x , D ) , qθ ( ·|x , D ) ) ] Proof . The above can be shown with a simple derivation . We mark transformations for easy reading . ` θ = − ∫ D , x , y p ( x , y , D ) log qθ ( y|x , D ) = − ∫ D , x p ( x , D ) ∫ y p ( y|x , D ) log qθ ( y|x , D ) ( 3 ) = ∫ D , x p ( x , D ) H ( p ( ·|x , D ) , qθ ( ·|x , D ) ) = Ex , D∼p ( D ) [ H ( p ( ·|x , D ) , qθ ( ·|x , D ) ) ] ( 4 ) Thus , we have an approximation of the PPD . We can formulate this in terms of KL-Divergence , too . Corollary 1.1 . The loss ` θ equals the expected KL-Divergence ED , x [ KL ( p ( ·|x , D ) , qθ ( ·|x , D ) ) ] between p ( ·|x , D ) and qθ ( ·|x , D ) over prior data x , D , up to an additive constant . For the proof , please see Appendix A . In the following , we consider the optimum of the given optimization problem θ∗ ∈ arg minθ ` θ. Corollary 1.2 . If p is a member of the distribution family qθ ( i.e. , there is a θ such that qθ = p ) , we have qθ∗ ( ·|x , D ) = p ( ·|x , D ) for all x , D for which p ( ·|x , D ) is defined . Proof . We assume a θ with qθ = p exists and we know that the cross-entropy is minimized for equal distributions ; thus the optimum θ∗ fulfills qθ∗ ( ·|x , D ) = p ( ·|x , D ) for all x , D where the density of the prior fulfills p ( x , D ) > 0 , which is exactly the subset for which the conditional is defined . | In this paper the authors show a simple architecture (simple on top of transformer pieces) that can learn to perform supervised learning on new datasets given collections of existing datasets. The model is trained on a collection of supervised learning datasets, and, at test time a novel training dataset and the corresponding test inputs are given and a single forward pass through the network produces the predictive distributions for those test inputs. Several different types of data are tested with close to state-of-the-art results provided, but in much less time. | SP:f6e9bd5b8d7fc4a70f91935349b5df060238d4ea |
Initializing ReLU networks in an expressive subspace of weights | 1 INTRODUCTION . Rectified Linear Unit ( ReLU ) Fukushima ( 1969 ) ; Fukushima & Miyake ( 1982 ) is the most widely used non-linear activation function in Deep Neural Networks ( DNNs ) LeCun et al . ( 2015 ) ; Ramachandran et al . ( 2018 ) ; Nair & Hinton ( 2010 ) , applied to various tasks like computer vision Glorot et al . ( 2011b ) ; Krizhevsky et al . ( 2012 ) ; He et al . ( 2015 ) , speech recognition Maas et al . ( 2013 ) ; Tóth ( 2013 ) ; Hinton et al . ( 2012 ) , intelligent gaming Silver et al . ( 2016 ) , and solving scientific problems Seif et al . ( 2019 ) . ReLU , φ ( x ) = max ( 0 , x ) , outperforms most of the other activation functions proposed Glorot et al . ( 2011a ) . It has several advantages over other activations . ReLU activation function is computationally simple as it essentially involves only a comparison operation . ReLU suffers less from the vanishing gradients , a major problem in training networks with sigmoid-type activations that saturate at both ends Glorot et al . ( 2011b ) . They generalize well even in the overly parameterized regime Maennel et al . ( 2018 ) . Despite its success , ReLU also has a few drawbacks , one of which is the dying ReLU problem He et al . ( 2015 ) ; Trottier et al . ( 2017 ) . The dying ReLU is a type of vanishing gradient problem in which the network outputs zero for all inputs and is dead . There is no gradient flow in this state . ReLU also suffers from exploding gradient problem , which occurs when backpropagating gradients become large Hanin ( 2018 ) . Several methods are proposed to overcome the vanishing/exploding gradient problem ; these can be classified into three categories Lu et al . ( 2020 ) . The first approach modifies the architecture , which includes using modified activation functions Ramachandran et al . ( 2018 ) ; He et al . ( 2015 ) ; Trottier et al . ( 2017 ) ; Clevert et al . ( 2016 ) ; Klambauer et al . ( 2017 ) ; Hendrycks & Gimpel ( 2016 ) , adding connections between non-consecutive layers ( residual connections ) He et al . ( 2016 ) , and optimizing network depth and width . The proposed activations are often computationally less efficient and require a fine-tuned parameter Lu et al . ( 2020 ) . The second approach relies on normalization techniques Ba et al . ( 2016 ) ; Ioffe & Szegedy ( 2015 ) ; Salimans & Kingma ( 2016 ) ; Ulyanov et al . ( 2016 ) ; Wu & He ( 2018 ) , the most popular one being batch normalization Ioffe & Szegedy ( 2015 ) . Batch normalization prevents the vanishing and exploding gradients by normalizing the output at each layer but with an additional computational cost of up to 30 % Mishkin & Matas ( 2016 ) . A related strategy involves using the self-normalizing activation ( SeLU ) , which by construction ensures output with zero mean and unit variance Klambauer et al . ( 2017 ) . The third approach focuses on the initialization of the weights and biases . As local ( gradient-based ) algorithms are used for optimization Kingma & Ba ( 2015 ) ; Zeiler ( 2012 ) ; Duchi et al . ( 2011 ) , it is challenging to train deep networks with millions of parameters Du et al . ( 2019 ) ; Srivastava et al . ( 2015 ) , and optimal initialization is essential for efficient training Nesterov ( 2014 ) . He-initialization He et al . ( 2015 ) is a commonly used strategy that uses uncorrelated Gaussian weights with variance 2N , where N is the width of the network . Recently , Lu et al . ( 2020 ) proposed Random asymmetric initialization ( RAI ) , which reduces the probability of dead ReLU at the initialization . In this paper , we aim to further improve the initialization scheme for ReLU networks . A growing body of work has analyzed signal propagation in infinitely wide networks to understand the phase diagram of forward-propagation in DNNs Saxe et al . ( 2014 ) ; Poole et al . ( 2016 ) ; Raghu et al . ( 2017 ) ; Schoenholz et al . ( 2017 ) ; Lee et al . ( 2018 ) ; Hayou et al . ( 2019a ) ; Li & Saad ( 2018 ; 2020 ) ; Bahri et al . ( 2020 ) . We mention a few results for ReLU networks . Hayou et al . ( 2019a ) showed that correlations in input signals propagating through a ReLU network always converge to one . Many other works found that ReLU networks are in general biased towards computing simpler functions De Palma et al . ( 2019 ) ; Rahaman et al . ( 2019 ) ; He et al . ( 2020 ) ; Valle-Perez et al . ( 2019 ) ; Hanin & Rolnick ( 2019 ) , which may account for their better generalization properties even in the overly parameterized regime . However , from their successful application in different domains , one may guess that they should be capable of computing more complex functions . There might be a subspace of the parameters where the network can represent complex functions . Li & Saad ( 2018 ; 2020 ) applied weight and input perturbations to analyze the function space of ReLU networks . They found that ReLU networks with anti-correlated weights compute richer functions than uncorrelated/positively correlated weights . Consistent with this , Shang et al . ( 2016 ) found that ReLU CNN ’ s produce anti-correlated feature matrices after training . These studies motivated us to analyze the phase diagram of signal propagation in ReLU networks with anti-correlated weights . Following the mean-field theory of signal propagation proposed by Poole et al . ( 2016 ) , we found that ReLU networks with anti-correlated weights have a chaotic phase , which implies higher expressivity . In contrast , ReLU networks with uncorrelated weights do not have a chaotic phase . Furthermore , we find that initializing ReLU networks with anti-correlated weights results in faster training . We call it Anti-correlated initialization ( ACI ) . Additional improvement in performance is achieved by incorporating RAI , which reduces the dead node probability . This combined scheme , which we call Random asymmetric anti-correlated initialization ( RAAI ) , is the main result of this work and is defined as follows . We pick weights and bias incoming to each node from anti-correlated Gaussian distribution and replace one randomly picked weight/bias with a random variable drawn from a beta distribution . The code to generate weights drawn from the RAAI distribution is given in Appendix G. We analyze the correlation properties of RAAI and show that it performs better than the best-known initialization schemes on tasks of varying complexity . It may be of concern that initialization in an expressive space may lead to overfitting , and we do observe the same for ACI for deeper networks and complex tasks . In contrast , RAAI shows no signs of overfitting and performs consistently better than all other initialization schemes . We organize the article as follows . First , we contrast the mean-field analysis of ReLU networks with correlated weights with uncorrelated in Section 2 . Next , Section 3 analyzes the critical properties of correlations in input signals for RAI and RAAI . Then , in Section 4 , we describe the various tasks used to validate the performance of different initialization schemes in Section 5 . Lastly , Section 6 concludes the article . 2 MEAN-FIELD ANALYSIS OF SIGNAL PROPAGATION WITH CORRELATED WEIGHTS . This section presents the mean-field theory of signal propagation ( proposed by Ref . Poole et al . ( 2016 ) ) in ReLU networks with correlated weights and compares it with uncorrelated weights . Unlike Ref . Li & Saad ( 2018 ; 2020 ) , which study perturbation to a ReLU network , we aim to understand the phase diagram of the signal propagation . Furthermore , we provide numerical results to corroborate the mean-field results . Consider a fully connected neural network with L layers ( in addition to the input layer ) and Nl nodes in layer l. The layer index ranges between 0 and L. For an input signal s0 = x , we denote the pre-activation at node i in layer l by hli ( x ) and activation by s l i ( x ) . A signal ( s l−1 1 , . . , s l−1 Nl ) at layer l − 1 propagates to layer l by the rule hli ( x ) = Nl−1∑ j=1 wlijs l−1 j ( x ) + b l i where l ∈ { 1 , L } sli ( x ) = φ ( h l i ( x ) ) , where φ is the non-linear activation function and wlij , b l i are the weights and biases . We consider correlations within the set of weights ( wli ) incoming to each node i . The correlated Gaussian distribution is P ( wl1 , w l 2 , w l 3 . . . ) = Nl∏ i e ( − 1 2 ( w l i ) TA−1wli ) √ ( 2π ) Nl−1 |A| with A = σ2w Nl−1 ( I− k 1 + k J Nl−1 ) , ( 1 ) where I is the identity matrix , J is an all-ones matrix , and k parameterizes the correlation strength . Positively correlated and anti-correlated regimes correspond to the regions −1 < k < 0 and k > 0 , respectively , whereas k = 0 generates uncorrelated weights . The overall scaling by 1/Nl−1 in the covariance matrix ensures that the input contribution from the last layer to each node is O ( 1 ) . The bias is drawn from a Gaussian distribution bli ∼ N ( 0 , σ2b ) . Note that weights reaching two different nodes are uncorrelated , and also the bias is uncorrelated with the weights . To track the layer-wise information flow , consider the squared length and overlap of the preactivations for two input signals , s0 = x1 and s0 = x2 , after propagating to layer l qlh ( xa ) = 1 Nl Nl∑ i=1 ( hli ( xa ) ) 2 where a ∈ { 1 , 2 } and 1 ≤ l ≤ L qlh ( x1 , x2 ) = 1 Nl Nl∑ i=1 hli ( x1 ) h l i ( x2 ) . Assuming self averaging , consider an average over the weights and the bias incoming to layer l. For simplicity of notations later , we use the same symbol for averaged qlh . qlh ( xa ) = σ2w Nl−1 Nl−1∑ j , m=1 ( δj , m − k 1 + k 1 Nl−1 ) φ ( hl−1j ( xa ) ) φ ( h l−1 m ( xa ) ) + σ 2 b qlh ( x1 , x2 ) = σ2w Nl−1 Nl−1∑ j , m=1 ( δj , m − k 1 + k 1 Nl−1 ) φ ( hl−1j ( x1 ) ) φ ( h l−1 m ( x2 ) ) + σ 2 b , For large width , each hl−1i is a weighted sum of a large number of zero-mean random variables . Thus , we expect the joint distribution of hl−1i ( x1 ) and h l−1 i ( x2 ) to converge to a zero-mean Gaussian with a covariance matrix with diagonal entries ql−1h ( x1 ) , q l−1 h ( x2 ) and off-diagonal entries ql−1h ( x1 , x2 ) . On replacing the average over h l−1 i ( this is equivalent to considering an average over all previous layers ) in the last layer with an average over this Gaussian distribution , we obtain iterative maps for the length and overlap . Specializing to ReLU activation yeilds the equations qlh ( x ) = σ2w 2 ( 1− k 1 + k 1 π ) ql−1h ( x ) + σ 2 b qlh ( x1 , x2 ) = σ2w 2 ( f ( cl−1h ) − k 1 + k 1 π ) √ ql−1h ( x1 ) q l−1 h ( x2 ) + σ 2 b f ( cl−1h ) = cl−1h 2 + cl−1h π sin−1 ( cl−1h ) + 1 π √ 1− ( cl−1h ) 2 , ( 2 ) where clh = qlh ( x1 , x2 ) √ qlh ( x1 ) q l h ( x2 ) is the correlation coefficient between the two signals reaching layer l ( for details of the derivation , see Appendix A ) . Poole et al . ( 2016 ) found that the signal ’ s length reaches its fixed point within a few layers , and the fixed point of the correlation coefficient , c∗h , can be estimated with the assumption that q l h ( x ) has reached its fixed point q∗h . We can check that c ∗ h = 1 is always a fixed point of the recursive map ( Eqn . 2 ) under this assumption . The stability of the fixed point c∗h = 1 is determined by χ1 ≡ ∂clh ∂cl−1h ∣∣∣ cl−1h =1 , which evaluates to σ 2 w 2 . χ1 separates the parameter space into two phases —first , an ordered phase with χ1 < 1 , where the c∗h = 1 fixed point is stable ; and second , a chaotic phase with χ1 > 1 , where the c∗h = 1 fixed point is unstable . χ1 = 1 defines the phase boundary line . In the ordered phase , two distinct signals will become perfectly correlated asymptotically . In the chaotic phase , the correlations converge to a stable fixed point below unity . Two closely related signals will eventually lose correlations in this phase . This suggests that initializing the network with parameters ( σ2w , σ 2 b ) at the phase transition boundary ( corresponding to an infinite depth of correlations ) allows for an optimal information flow through the network Poole et al . ( 2016 ) ; Schoenholz et al . ( 2017 ) ReLU networks with uncorrelated weights ( k = 0 ) The above analysis is applied assuming q∗h is finite shows that ReLU networks with uncorrelated weights do not have a chaotic phase , and any two signals propagating through a ReLU network become asymptotically correlated for all values of ( σ2w , σ 2 b ) . In other words , c ∗ h = 1 is always a stable fixed point . However , the parameter space can be classified into two phases based on the boundedness of the fixed point q∗h of the length map ( Eqn . 2 ) - first , a bounded phase where q∗h is finite and non-zero ; second , an unbounded phase , where q ∗ h is either zero or infinite Lee et al . ( 2018 ) ; Hayou et al . ( 2019b ) . The two phases are separated by the boundary σ2w = 2 . Figure 1a depicts the phase diagram for ReLU networks with uncorrelated weights . Note that the analysis of the stability of c∗h = 1 fixed point in ReLU networks is valid only in the bounded phase . However , numerical results presented in Fig . 2 indicate that the fixed point remains stable even in the unbounded phase . ReLU networks with correlated weights The phase diagram for ReLU networks with correlated weights can be analyzed similarly . The length is bounded if σ2w < gk = 2 ( 1− k1+k 1 π ) . Thus , for anti- correlated weights ( k > 0 ) , the boundary gk moves upwards relative to the k = 0 case ( see Fig . 1a ) . The c∗h = 1 fixed point of the correlations is unstable in this region of the bounded phase . In summary , anti-correlations induce a bounded chaotic phase in 2 < σ2w < gk ( see Fig . 1b ) . We demonstrate these results numerically in Fig . 3 for a correlation strength of k = 100 . As predicted by the above equations , the stability of the fixed point c∗h = 1 changes at σ 2 w = 2 , and the length diverges at gk=100 = 2.92 . In contrast , for positively correlated weights , the length ’ s fixed point boundary shifts downward resulting in a similar phase diagram as uncorrelated weights . As a result , a ReLU network with anti-correlated weights can be more expressive by taking advantage of a chaotic phase , and it may be beneficial for a ReLU network to remain in this subspace . Thus , we propose initializing ReLU networks with anti-correlated weights at the order to chaos boundary ( σ2w , σ 2 b ) = ( 2 , 0 ) . We call it Anti-Correlated Initialization ( ACI ) . Appendix B demonstrates that ReLU networks initialized with anti-correlated weights give an advantage over He initializations for a range of tasks . Many alternatives are proposed to improve ReLU networks Trottier et al . ( 2017 ) ; Lu et al . ( 2020 ) ; Clevert et al . ( 2016 ) . Of particular interest is Random asymmetric initialization ( RAI ) , which aims to increase expressivity through an independent strategy of reducing the dead node probability . In the next section , we analyze the correlation properties of RAI and then combine it with ACI to propose a new initialization scheme RAAI , which has both a chaotic phase and low dead node probability . | The authors propose an initialization method called random asymmetric anti-correlated initialization (RAAI), which initializes residual networks in an expressive subspace of weights. RAAI is a combined initialization of anti-correlated initialization (ACI) and random asymmetric initialization (RAI), where the last initialization method is already proposed. Through both theoretical analysis and empirical evaluations, the authors show that RAAI has both a chaotic phase and low dead node probability, which accelerates the rate of convergence. | SP:2cb0d51035de9f4dee675ab99796c8981e4ee6cc |
Initializing ReLU networks in an expressive subspace of weights | 1 INTRODUCTION . Rectified Linear Unit ( ReLU ) Fukushima ( 1969 ) ; Fukushima & Miyake ( 1982 ) is the most widely used non-linear activation function in Deep Neural Networks ( DNNs ) LeCun et al . ( 2015 ) ; Ramachandran et al . ( 2018 ) ; Nair & Hinton ( 2010 ) , applied to various tasks like computer vision Glorot et al . ( 2011b ) ; Krizhevsky et al . ( 2012 ) ; He et al . ( 2015 ) , speech recognition Maas et al . ( 2013 ) ; Tóth ( 2013 ) ; Hinton et al . ( 2012 ) , intelligent gaming Silver et al . ( 2016 ) , and solving scientific problems Seif et al . ( 2019 ) . ReLU , φ ( x ) = max ( 0 , x ) , outperforms most of the other activation functions proposed Glorot et al . ( 2011a ) . It has several advantages over other activations . ReLU activation function is computationally simple as it essentially involves only a comparison operation . ReLU suffers less from the vanishing gradients , a major problem in training networks with sigmoid-type activations that saturate at both ends Glorot et al . ( 2011b ) . They generalize well even in the overly parameterized regime Maennel et al . ( 2018 ) . Despite its success , ReLU also has a few drawbacks , one of which is the dying ReLU problem He et al . ( 2015 ) ; Trottier et al . ( 2017 ) . The dying ReLU is a type of vanishing gradient problem in which the network outputs zero for all inputs and is dead . There is no gradient flow in this state . ReLU also suffers from exploding gradient problem , which occurs when backpropagating gradients become large Hanin ( 2018 ) . Several methods are proposed to overcome the vanishing/exploding gradient problem ; these can be classified into three categories Lu et al . ( 2020 ) . The first approach modifies the architecture , which includes using modified activation functions Ramachandran et al . ( 2018 ) ; He et al . ( 2015 ) ; Trottier et al . ( 2017 ) ; Clevert et al . ( 2016 ) ; Klambauer et al . ( 2017 ) ; Hendrycks & Gimpel ( 2016 ) , adding connections between non-consecutive layers ( residual connections ) He et al . ( 2016 ) , and optimizing network depth and width . The proposed activations are often computationally less efficient and require a fine-tuned parameter Lu et al . ( 2020 ) . The second approach relies on normalization techniques Ba et al . ( 2016 ) ; Ioffe & Szegedy ( 2015 ) ; Salimans & Kingma ( 2016 ) ; Ulyanov et al . ( 2016 ) ; Wu & He ( 2018 ) , the most popular one being batch normalization Ioffe & Szegedy ( 2015 ) . Batch normalization prevents the vanishing and exploding gradients by normalizing the output at each layer but with an additional computational cost of up to 30 % Mishkin & Matas ( 2016 ) . A related strategy involves using the self-normalizing activation ( SeLU ) , which by construction ensures output with zero mean and unit variance Klambauer et al . ( 2017 ) . The third approach focuses on the initialization of the weights and biases . As local ( gradient-based ) algorithms are used for optimization Kingma & Ba ( 2015 ) ; Zeiler ( 2012 ) ; Duchi et al . ( 2011 ) , it is challenging to train deep networks with millions of parameters Du et al . ( 2019 ) ; Srivastava et al . ( 2015 ) , and optimal initialization is essential for efficient training Nesterov ( 2014 ) . He-initialization He et al . ( 2015 ) is a commonly used strategy that uses uncorrelated Gaussian weights with variance 2N , where N is the width of the network . Recently , Lu et al . ( 2020 ) proposed Random asymmetric initialization ( RAI ) , which reduces the probability of dead ReLU at the initialization . In this paper , we aim to further improve the initialization scheme for ReLU networks . A growing body of work has analyzed signal propagation in infinitely wide networks to understand the phase diagram of forward-propagation in DNNs Saxe et al . ( 2014 ) ; Poole et al . ( 2016 ) ; Raghu et al . ( 2017 ) ; Schoenholz et al . ( 2017 ) ; Lee et al . ( 2018 ) ; Hayou et al . ( 2019a ) ; Li & Saad ( 2018 ; 2020 ) ; Bahri et al . ( 2020 ) . We mention a few results for ReLU networks . Hayou et al . ( 2019a ) showed that correlations in input signals propagating through a ReLU network always converge to one . Many other works found that ReLU networks are in general biased towards computing simpler functions De Palma et al . ( 2019 ) ; Rahaman et al . ( 2019 ) ; He et al . ( 2020 ) ; Valle-Perez et al . ( 2019 ) ; Hanin & Rolnick ( 2019 ) , which may account for their better generalization properties even in the overly parameterized regime . However , from their successful application in different domains , one may guess that they should be capable of computing more complex functions . There might be a subspace of the parameters where the network can represent complex functions . Li & Saad ( 2018 ; 2020 ) applied weight and input perturbations to analyze the function space of ReLU networks . They found that ReLU networks with anti-correlated weights compute richer functions than uncorrelated/positively correlated weights . Consistent with this , Shang et al . ( 2016 ) found that ReLU CNN ’ s produce anti-correlated feature matrices after training . These studies motivated us to analyze the phase diagram of signal propagation in ReLU networks with anti-correlated weights . Following the mean-field theory of signal propagation proposed by Poole et al . ( 2016 ) , we found that ReLU networks with anti-correlated weights have a chaotic phase , which implies higher expressivity . In contrast , ReLU networks with uncorrelated weights do not have a chaotic phase . Furthermore , we find that initializing ReLU networks with anti-correlated weights results in faster training . We call it Anti-correlated initialization ( ACI ) . Additional improvement in performance is achieved by incorporating RAI , which reduces the dead node probability . This combined scheme , which we call Random asymmetric anti-correlated initialization ( RAAI ) , is the main result of this work and is defined as follows . We pick weights and bias incoming to each node from anti-correlated Gaussian distribution and replace one randomly picked weight/bias with a random variable drawn from a beta distribution . The code to generate weights drawn from the RAAI distribution is given in Appendix G. We analyze the correlation properties of RAAI and show that it performs better than the best-known initialization schemes on tasks of varying complexity . It may be of concern that initialization in an expressive space may lead to overfitting , and we do observe the same for ACI for deeper networks and complex tasks . In contrast , RAAI shows no signs of overfitting and performs consistently better than all other initialization schemes . We organize the article as follows . First , we contrast the mean-field analysis of ReLU networks with correlated weights with uncorrelated in Section 2 . Next , Section 3 analyzes the critical properties of correlations in input signals for RAI and RAAI . Then , in Section 4 , we describe the various tasks used to validate the performance of different initialization schemes in Section 5 . Lastly , Section 6 concludes the article . 2 MEAN-FIELD ANALYSIS OF SIGNAL PROPAGATION WITH CORRELATED WEIGHTS . This section presents the mean-field theory of signal propagation ( proposed by Ref . Poole et al . ( 2016 ) ) in ReLU networks with correlated weights and compares it with uncorrelated weights . Unlike Ref . Li & Saad ( 2018 ; 2020 ) , which study perturbation to a ReLU network , we aim to understand the phase diagram of the signal propagation . Furthermore , we provide numerical results to corroborate the mean-field results . Consider a fully connected neural network with L layers ( in addition to the input layer ) and Nl nodes in layer l. The layer index ranges between 0 and L. For an input signal s0 = x , we denote the pre-activation at node i in layer l by hli ( x ) and activation by s l i ( x ) . A signal ( s l−1 1 , . . , s l−1 Nl ) at layer l − 1 propagates to layer l by the rule hli ( x ) = Nl−1∑ j=1 wlijs l−1 j ( x ) + b l i where l ∈ { 1 , L } sli ( x ) = φ ( h l i ( x ) ) , where φ is the non-linear activation function and wlij , b l i are the weights and biases . We consider correlations within the set of weights ( wli ) incoming to each node i . The correlated Gaussian distribution is P ( wl1 , w l 2 , w l 3 . . . ) = Nl∏ i e ( − 1 2 ( w l i ) TA−1wli ) √ ( 2π ) Nl−1 |A| with A = σ2w Nl−1 ( I− k 1 + k J Nl−1 ) , ( 1 ) where I is the identity matrix , J is an all-ones matrix , and k parameterizes the correlation strength . Positively correlated and anti-correlated regimes correspond to the regions −1 < k < 0 and k > 0 , respectively , whereas k = 0 generates uncorrelated weights . The overall scaling by 1/Nl−1 in the covariance matrix ensures that the input contribution from the last layer to each node is O ( 1 ) . The bias is drawn from a Gaussian distribution bli ∼ N ( 0 , σ2b ) . Note that weights reaching two different nodes are uncorrelated , and also the bias is uncorrelated with the weights . To track the layer-wise information flow , consider the squared length and overlap of the preactivations for two input signals , s0 = x1 and s0 = x2 , after propagating to layer l qlh ( xa ) = 1 Nl Nl∑ i=1 ( hli ( xa ) ) 2 where a ∈ { 1 , 2 } and 1 ≤ l ≤ L qlh ( x1 , x2 ) = 1 Nl Nl∑ i=1 hli ( x1 ) h l i ( x2 ) . Assuming self averaging , consider an average over the weights and the bias incoming to layer l. For simplicity of notations later , we use the same symbol for averaged qlh . qlh ( xa ) = σ2w Nl−1 Nl−1∑ j , m=1 ( δj , m − k 1 + k 1 Nl−1 ) φ ( hl−1j ( xa ) ) φ ( h l−1 m ( xa ) ) + σ 2 b qlh ( x1 , x2 ) = σ2w Nl−1 Nl−1∑ j , m=1 ( δj , m − k 1 + k 1 Nl−1 ) φ ( hl−1j ( x1 ) ) φ ( h l−1 m ( x2 ) ) + σ 2 b , For large width , each hl−1i is a weighted sum of a large number of zero-mean random variables . Thus , we expect the joint distribution of hl−1i ( x1 ) and h l−1 i ( x2 ) to converge to a zero-mean Gaussian with a covariance matrix with diagonal entries ql−1h ( x1 ) , q l−1 h ( x2 ) and off-diagonal entries ql−1h ( x1 , x2 ) . On replacing the average over h l−1 i ( this is equivalent to considering an average over all previous layers ) in the last layer with an average over this Gaussian distribution , we obtain iterative maps for the length and overlap . Specializing to ReLU activation yeilds the equations qlh ( x ) = σ2w 2 ( 1− k 1 + k 1 π ) ql−1h ( x ) + σ 2 b qlh ( x1 , x2 ) = σ2w 2 ( f ( cl−1h ) − k 1 + k 1 π ) √ ql−1h ( x1 ) q l−1 h ( x2 ) + σ 2 b f ( cl−1h ) = cl−1h 2 + cl−1h π sin−1 ( cl−1h ) + 1 π √ 1− ( cl−1h ) 2 , ( 2 ) where clh = qlh ( x1 , x2 ) √ qlh ( x1 ) q l h ( x2 ) is the correlation coefficient between the two signals reaching layer l ( for details of the derivation , see Appendix A ) . Poole et al . ( 2016 ) found that the signal ’ s length reaches its fixed point within a few layers , and the fixed point of the correlation coefficient , c∗h , can be estimated with the assumption that q l h ( x ) has reached its fixed point q∗h . We can check that c ∗ h = 1 is always a fixed point of the recursive map ( Eqn . 2 ) under this assumption . The stability of the fixed point c∗h = 1 is determined by χ1 ≡ ∂clh ∂cl−1h ∣∣∣ cl−1h =1 , which evaluates to σ 2 w 2 . χ1 separates the parameter space into two phases —first , an ordered phase with χ1 < 1 , where the c∗h = 1 fixed point is stable ; and second , a chaotic phase with χ1 > 1 , where the c∗h = 1 fixed point is unstable . χ1 = 1 defines the phase boundary line . In the ordered phase , two distinct signals will become perfectly correlated asymptotically . In the chaotic phase , the correlations converge to a stable fixed point below unity . Two closely related signals will eventually lose correlations in this phase . This suggests that initializing the network with parameters ( σ2w , σ 2 b ) at the phase transition boundary ( corresponding to an infinite depth of correlations ) allows for an optimal information flow through the network Poole et al . ( 2016 ) ; Schoenholz et al . ( 2017 ) ReLU networks with uncorrelated weights ( k = 0 ) The above analysis is applied assuming q∗h is finite shows that ReLU networks with uncorrelated weights do not have a chaotic phase , and any two signals propagating through a ReLU network become asymptotically correlated for all values of ( σ2w , σ 2 b ) . In other words , c ∗ h = 1 is always a stable fixed point . However , the parameter space can be classified into two phases based on the boundedness of the fixed point q∗h of the length map ( Eqn . 2 ) - first , a bounded phase where q∗h is finite and non-zero ; second , an unbounded phase , where q ∗ h is either zero or infinite Lee et al . ( 2018 ) ; Hayou et al . ( 2019b ) . The two phases are separated by the boundary σ2w = 2 . Figure 1a depicts the phase diagram for ReLU networks with uncorrelated weights . Note that the analysis of the stability of c∗h = 1 fixed point in ReLU networks is valid only in the bounded phase . However , numerical results presented in Fig . 2 indicate that the fixed point remains stable even in the unbounded phase . ReLU networks with correlated weights The phase diagram for ReLU networks with correlated weights can be analyzed similarly . The length is bounded if σ2w < gk = 2 ( 1− k1+k 1 π ) . Thus , for anti- correlated weights ( k > 0 ) , the boundary gk moves upwards relative to the k = 0 case ( see Fig . 1a ) . The c∗h = 1 fixed point of the correlations is unstable in this region of the bounded phase . In summary , anti-correlations induce a bounded chaotic phase in 2 < σ2w < gk ( see Fig . 1b ) . We demonstrate these results numerically in Fig . 3 for a correlation strength of k = 100 . As predicted by the above equations , the stability of the fixed point c∗h = 1 changes at σ 2 w = 2 , and the length diverges at gk=100 = 2.92 . In contrast , for positively correlated weights , the length ’ s fixed point boundary shifts downward resulting in a similar phase diagram as uncorrelated weights . As a result , a ReLU network with anti-correlated weights can be more expressive by taking advantage of a chaotic phase , and it may be beneficial for a ReLU network to remain in this subspace . Thus , we propose initializing ReLU networks with anti-correlated weights at the order to chaos boundary ( σ2w , σ 2 b ) = ( 2 , 0 ) . We call it Anti-Correlated Initialization ( ACI ) . Appendix B demonstrates that ReLU networks initialized with anti-correlated weights give an advantage over He initializations for a range of tasks . Many alternatives are proposed to improve ReLU networks Trottier et al . ( 2017 ) ; Lu et al . ( 2020 ) ; Clevert et al . ( 2016 ) . Of particular interest is Random asymmetric initialization ( RAI ) , which aims to increase expressivity through an independent strategy of reducing the dead node probability . In the next section , we analyze the correlation properties of RAI and then combine it with ACI to propose a new initialization scheme RAAI , which has both a chaotic phase and low dead node probability . | The paper studies the signal propagation properties of deep ReLU networks at initialization time. For a standard ReLU network, the correlation between activations of two training examples converges to one as the depth goes to infinity. To resolve that, the authors proposed to use correlated weights at initialization time to avoid this pathology. With correlated weights, the correlation could instead converge to a value smaller than one (so-called chaotic phase). Empirically, the authors found the networks initialized with correlated weights train faster. | SP:2cb0d51035de9f4dee675ab99796c8981e4ee6cc |
Initializing ReLU networks in an expressive subspace of weights | 1 INTRODUCTION . Rectified Linear Unit ( ReLU ) Fukushima ( 1969 ) ; Fukushima & Miyake ( 1982 ) is the most widely used non-linear activation function in Deep Neural Networks ( DNNs ) LeCun et al . ( 2015 ) ; Ramachandran et al . ( 2018 ) ; Nair & Hinton ( 2010 ) , applied to various tasks like computer vision Glorot et al . ( 2011b ) ; Krizhevsky et al . ( 2012 ) ; He et al . ( 2015 ) , speech recognition Maas et al . ( 2013 ) ; Tóth ( 2013 ) ; Hinton et al . ( 2012 ) , intelligent gaming Silver et al . ( 2016 ) , and solving scientific problems Seif et al . ( 2019 ) . ReLU , φ ( x ) = max ( 0 , x ) , outperforms most of the other activation functions proposed Glorot et al . ( 2011a ) . It has several advantages over other activations . ReLU activation function is computationally simple as it essentially involves only a comparison operation . ReLU suffers less from the vanishing gradients , a major problem in training networks with sigmoid-type activations that saturate at both ends Glorot et al . ( 2011b ) . They generalize well even in the overly parameterized regime Maennel et al . ( 2018 ) . Despite its success , ReLU also has a few drawbacks , one of which is the dying ReLU problem He et al . ( 2015 ) ; Trottier et al . ( 2017 ) . The dying ReLU is a type of vanishing gradient problem in which the network outputs zero for all inputs and is dead . There is no gradient flow in this state . ReLU also suffers from exploding gradient problem , which occurs when backpropagating gradients become large Hanin ( 2018 ) . Several methods are proposed to overcome the vanishing/exploding gradient problem ; these can be classified into three categories Lu et al . ( 2020 ) . The first approach modifies the architecture , which includes using modified activation functions Ramachandran et al . ( 2018 ) ; He et al . ( 2015 ) ; Trottier et al . ( 2017 ) ; Clevert et al . ( 2016 ) ; Klambauer et al . ( 2017 ) ; Hendrycks & Gimpel ( 2016 ) , adding connections between non-consecutive layers ( residual connections ) He et al . ( 2016 ) , and optimizing network depth and width . The proposed activations are often computationally less efficient and require a fine-tuned parameter Lu et al . ( 2020 ) . The second approach relies on normalization techniques Ba et al . ( 2016 ) ; Ioffe & Szegedy ( 2015 ) ; Salimans & Kingma ( 2016 ) ; Ulyanov et al . ( 2016 ) ; Wu & He ( 2018 ) , the most popular one being batch normalization Ioffe & Szegedy ( 2015 ) . Batch normalization prevents the vanishing and exploding gradients by normalizing the output at each layer but with an additional computational cost of up to 30 % Mishkin & Matas ( 2016 ) . A related strategy involves using the self-normalizing activation ( SeLU ) , which by construction ensures output with zero mean and unit variance Klambauer et al . ( 2017 ) . The third approach focuses on the initialization of the weights and biases . As local ( gradient-based ) algorithms are used for optimization Kingma & Ba ( 2015 ) ; Zeiler ( 2012 ) ; Duchi et al . ( 2011 ) , it is challenging to train deep networks with millions of parameters Du et al . ( 2019 ) ; Srivastava et al . ( 2015 ) , and optimal initialization is essential for efficient training Nesterov ( 2014 ) . He-initialization He et al . ( 2015 ) is a commonly used strategy that uses uncorrelated Gaussian weights with variance 2N , where N is the width of the network . Recently , Lu et al . ( 2020 ) proposed Random asymmetric initialization ( RAI ) , which reduces the probability of dead ReLU at the initialization . In this paper , we aim to further improve the initialization scheme for ReLU networks . A growing body of work has analyzed signal propagation in infinitely wide networks to understand the phase diagram of forward-propagation in DNNs Saxe et al . ( 2014 ) ; Poole et al . ( 2016 ) ; Raghu et al . ( 2017 ) ; Schoenholz et al . ( 2017 ) ; Lee et al . ( 2018 ) ; Hayou et al . ( 2019a ) ; Li & Saad ( 2018 ; 2020 ) ; Bahri et al . ( 2020 ) . We mention a few results for ReLU networks . Hayou et al . ( 2019a ) showed that correlations in input signals propagating through a ReLU network always converge to one . Many other works found that ReLU networks are in general biased towards computing simpler functions De Palma et al . ( 2019 ) ; Rahaman et al . ( 2019 ) ; He et al . ( 2020 ) ; Valle-Perez et al . ( 2019 ) ; Hanin & Rolnick ( 2019 ) , which may account for their better generalization properties even in the overly parameterized regime . However , from their successful application in different domains , one may guess that they should be capable of computing more complex functions . There might be a subspace of the parameters where the network can represent complex functions . Li & Saad ( 2018 ; 2020 ) applied weight and input perturbations to analyze the function space of ReLU networks . They found that ReLU networks with anti-correlated weights compute richer functions than uncorrelated/positively correlated weights . Consistent with this , Shang et al . ( 2016 ) found that ReLU CNN ’ s produce anti-correlated feature matrices after training . These studies motivated us to analyze the phase diagram of signal propagation in ReLU networks with anti-correlated weights . Following the mean-field theory of signal propagation proposed by Poole et al . ( 2016 ) , we found that ReLU networks with anti-correlated weights have a chaotic phase , which implies higher expressivity . In contrast , ReLU networks with uncorrelated weights do not have a chaotic phase . Furthermore , we find that initializing ReLU networks with anti-correlated weights results in faster training . We call it Anti-correlated initialization ( ACI ) . Additional improvement in performance is achieved by incorporating RAI , which reduces the dead node probability . This combined scheme , which we call Random asymmetric anti-correlated initialization ( RAAI ) , is the main result of this work and is defined as follows . We pick weights and bias incoming to each node from anti-correlated Gaussian distribution and replace one randomly picked weight/bias with a random variable drawn from a beta distribution . The code to generate weights drawn from the RAAI distribution is given in Appendix G. We analyze the correlation properties of RAAI and show that it performs better than the best-known initialization schemes on tasks of varying complexity . It may be of concern that initialization in an expressive space may lead to overfitting , and we do observe the same for ACI for deeper networks and complex tasks . In contrast , RAAI shows no signs of overfitting and performs consistently better than all other initialization schemes . We organize the article as follows . First , we contrast the mean-field analysis of ReLU networks with correlated weights with uncorrelated in Section 2 . Next , Section 3 analyzes the critical properties of correlations in input signals for RAI and RAAI . Then , in Section 4 , we describe the various tasks used to validate the performance of different initialization schemes in Section 5 . Lastly , Section 6 concludes the article . 2 MEAN-FIELD ANALYSIS OF SIGNAL PROPAGATION WITH CORRELATED WEIGHTS . This section presents the mean-field theory of signal propagation ( proposed by Ref . Poole et al . ( 2016 ) ) in ReLU networks with correlated weights and compares it with uncorrelated weights . Unlike Ref . Li & Saad ( 2018 ; 2020 ) , which study perturbation to a ReLU network , we aim to understand the phase diagram of the signal propagation . Furthermore , we provide numerical results to corroborate the mean-field results . Consider a fully connected neural network with L layers ( in addition to the input layer ) and Nl nodes in layer l. The layer index ranges between 0 and L. For an input signal s0 = x , we denote the pre-activation at node i in layer l by hli ( x ) and activation by s l i ( x ) . A signal ( s l−1 1 , . . , s l−1 Nl ) at layer l − 1 propagates to layer l by the rule hli ( x ) = Nl−1∑ j=1 wlijs l−1 j ( x ) + b l i where l ∈ { 1 , L } sli ( x ) = φ ( h l i ( x ) ) , where φ is the non-linear activation function and wlij , b l i are the weights and biases . We consider correlations within the set of weights ( wli ) incoming to each node i . The correlated Gaussian distribution is P ( wl1 , w l 2 , w l 3 . . . ) = Nl∏ i e ( − 1 2 ( w l i ) TA−1wli ) √ ( 2π ) Nl−1 |A| with A = σ2w Nl−1 ( I− k 1 + k J Nl−1 ) , ( 1 ) where I is the identity matrix , J is an all-ones matrix , and k parameterizes the correlation strength . Positively correlated and anti-correlated regimes correspond to the regions −1 < k < 0 and k > 0 , respectively , whereas k = 0 generates uncorrelated weights . The overall scaling by 1/Nl−1 in the covariance matrix ensures that the input contribution from the last layer to each node is O ( 1 ) . The bias is drawn from a Gaussian distribution bli ∼ N ( 0 , σ2b ) . Note that weights reaching two different nodes are uncorrelated , and also the bias is uncorrelated with the weights . To track the layer-wise information flow , consider the squared length and overlap of the preactivations for two input signals , s0 = x1 and s0 = x2 , after propagating to layer l qlh ( xa ) = 1 Nl Nl∑ i=1 ( hli ( xa ) ) 2 where a ∈ { 1 , 2 } and 1 ≤ l ≤ L qlh ( x1 , x2 ) = 1 Nl Nl∑ i=1 hli ( x1 ) h l i ( x2 ) . Assuming self averaging , consider an average over the weights and the bias incoming to layer l. For simplicity of notations later , we use the same symbol for averaged qlh . qlh ( xa ) = σ2w Nl−1 Nl−1∑ j , m=1 ( δj , m − k 1 + k 1 Nl−1 ) φ ( hl−1j ( xa ) ) φ ( h l−1 m ( xa ) ) + σ 2 b qlh ( x1 , x2 ) = σ2w Nl−1 Nl−1∑ j , m=1 ( δj , m − k 1 + k 1 Nl−1 ) φ ( hl−1j ( x1 ) ) φ ( h l−1 m ( x2 ) ) + σ 2 b , For large width , each hl−1i is a weighted sum of a large number of zero-mean random variables . Thus , we expect the joint distribution of hl−1i ( x1 ) and h l−1 i ( x2 ) to converge to a zero-mean Gaussian with a covariance matrix with diagonal entries ql−1h ( x1 ) , q l−1 h ( x2 ) and off-diagonal entries ql−1h ( x1 , x2 ) . On replacing the average over h l−1 i ( this is equivalent to considering an average over all previous layers ) in the last layer with an average over this Gaussian distribution , we obtain iterative maps for the length and overlap . Specializing to ReLU activation yeilds the equations qlh ( x ) = σ2w 2 ( 1− k 1 + k 1 π ) ql−1h ( x ) + σ 2 b qlh ( x1 , x2 ) = σ2w 2 ( f ( cl−1h ) − k 1 + k 1 π ) √ ql−1h ( x1 ) q l−1 h ( x2 ) + σ 2 b f ( cl−1h ) = cl−1h 2 + cl−1h π sin−1 ( cl−1h ) + 1 π √ 1− ( cl−1h ) 2 , ( 2 ) where clh = qlh ( x1 , x2 ) √ qlh ( x1 ) q l h ( x2 ) is the correlation coefficient between the two signals reaching layer l ( for details of the derivation , see Appendix A ) . Poole et al . ( 2016 ) found that the signal ’ s length reaches its fixed point within a few layers , and the fixed point of the correlation coefficient , c∗h , can be estimated with the assumption that q l h ( x ) has reached its fixed point q∗h . We can check that c ∗ h = 1 is always a fixed point of the recursive map ( Eqn . 2 ) under this assumption . The stability of the fixed point c∗h = 1 is determined by χ1 ≡ ∂clh ∂cl−1h ∣∣∣ cl−1h =1 , which evaluates to σ 2 w 2 . χ1 separates the parameter space into two phases —first , an ordered phase with χ1 < 1 , where the c∗h = 1 fixed point is stable ; and second , a chaotic phase with χ1 > 1 , where the c∗h = 1 fixed point is unstable . χ1 = 1 defines the phase boundary line . In the ordered phase , two distinct signals will become perfectly correlated asymptotically . In the chaotic phase , the correlations converge to a stable fixed point below unity . Two closely related signals will eventually lose correlations in this phase . This suggests that initializing the network with parameters ( σ2w , σ 2 b ) at the phase transition boundary ( corresponding to an infinite depth of correlations ) allows for an optimal information flow through the network Poole et al . ( 2016 ) ; Schoenholz et al . ( 2017 ) ReLU networks with uncorrelated weights ( k = 0 ) The above analysis is applied assuming q∗h is finite shows that ReLU networks with uncorrelated weights do not have a chaotic phase , and any two signals propagating through a ReLU network become asymptotically correlated for all values of ( σ2w , σ 2 b ) . In other words , c ∗ h = 1 is always a stable fixed point . However , the parameter space can be classified into two phases based on the boundedness of the fixed point q∗h of the length map ( Eqn . 2 ) - first , a bounded phase where q∗h is finite and non-zero ; second , an unbounded phase , where q ∗ h is either zero or infinite Lee et al . ( 2018 ) ; Hayou et al . ( 2019b ) . The two phases are separated by the boundary σ2w = 2 . Figure 1a depicts the phase diagram for ReLU networks with uncorrelated weights . Note that the analysis of the stability of c∗h = 1 fixed point in ReLU networks is valid only in the bounded phase . However , numerical results presented in Fig . 2 indicate that the fixed point remains stable even in the unbounded phase . ReLU networks with correlated weights The phase diagram for ReLU networks with correlated weights can be analyzed similarly . The length is bounded if σ2w < gk = 2 ( 1− k1+k 1 π ) . Thus , for anti- correlated weights ( k > 0 ) , the boundary gk moves upwards relative to the k = 0 case ( see Fig . 1a ) . The c∗h = 1 fixed point of the correlations is unstable in this region of the bounded phase . In summary , anti-correlations induce a bounded chaotic phase in 2 < σ2w < gk ( see Fig . 1b ) . We demonstrate these results numerically in Fig . 3 for a correlation strength of k = 100 . As predicted by the above equations , the stability of the fixed point c∗h = 1 changes at σ 2 w = 2 , and the length diverges at gk=100 = 2.92 . In contrast , for positively correlated weights , the length ’ s fixed point boundary shifts downward resulting in a similar phase diagram as uncorrelated weights . As a result , a ReLU network with anti-correlated weights can be more expressive by taking advantage of a chaotic phase , and it may be beneficial for a ReLU network to remain in this subspace . Thus , we propose initializing ReLU networks with anti-correlated weights at the order to chaos boundary ( σ2w , σ 2 b ) = ( 2 , 0 ) . We call it Anti-Correlated Initialization ( ACI ) . Appendix B demonstrates that ReLU networks initialized with anti-correlated weights give an advantage over He initializations for a range of tasks . Many alternatives are proposed to improve ReLU networks Trottier et al . ( 2017 ) ; Lu et al . ( 2020 ) ; Clevert et al . ( 2016 ) . Of particular interest is Random asymmetric initialization ( RAI ) , which aims to increase expressivity through an independent strategy of reducing the dead node probability . In the next section , we analyze the correlation properties of RAI and then combine it with ACI to propose a new initialization scheme RAAI , which has both a chaotic phase and low dead node probability . | This paper proposes and studies the initialization of ReLU networks with correlated Gaussian random variables. Using the language of mean field theory, the authors define an ordered phase as two distinct signals becoming perfectly correlated asymptotically, and a chaotic phase as two signals losing all correlations. They find that while He init (uncorrelated Gaussians) only results in ordered phases, there exists an initialization with negative correlations that results in a bounded chaotic phase. They suggest that the use of anti-correlated initializations can speed up training. | SP:2cb0d51035de9f4dee675ab99796c8981e4ee6cc |
An object-centric sensitivity analysis of deep learning based instance segmentation | 1 INTRODUCTION . In this study , we want to learn how deep learning models for instance segmentation generalize to novel appearances of familiar objects . Despite their remarkable success in computer vision , deep neural networks still struggle in challenging real-world scenarios ( Yuille & Liu , 2018 ; Michaelis et al. , 2019 ; Recht et al. , 2019 ; Madan et al. , 2021 ) . Consider for instance a pedestrian with an unconventionally textured dress or a rare horse statue made from bronze . The model might have seen many pedestrians or natural horses during training but still fails to detect these unseen and out of context examples , often with high confidence . Generalizing to such naturally adversarial objects is typically described as out-of-distribution robustness in the literature ( Hendrycks et al. , 2021 ; Lau et al. , 2021 ) . Interestingly , Hendrycks et al . ( 2021 ) suggest that improvements in this direction are more likely to come from computer vision architectures than from existing data augmentation or additional public datasets . With the ever increasing number of competitive models , our objective is therefore to contribute an extensive comparison of instance segmentation models to unveil promising future research directions . The perspective we take is inspired by the work of Baker et al . ( 2018 ) and Geirhos et al . ( 2019 ) on texture bias in classification models . More precisely , both groups found that when compared to humans , convolutional neural networks ( CNNs ) mostly ignore object shapes , i.e . ignore the defining structure of an object . In fact , Brendel & Bethge ( 2019 ) have further shown that CNNs can robustly classify objects in texturized images where the global appearance of objects is fully mixed up . In summary , these findings indicate that a revision of contemporary deep learning architectures is a much needed contribution on the pathway to more systematic generalization . To compare the robustness of instance segmentation models , we introduce a novel negative test in the form of an object-centric sensitivity analysis . More precisely , we investigate the impact of increasingly novel object texture while controlling for the effect of corrupted color , shape and contour features . By object-centric , we mean that the appearance of visual objects is changed in a semantics preserving and causally plausible way , i.e . is controlled at the instance level . Since we generally expect that segmentation performance will degrade under novel textures and increasing corruptions , our benchmark can be understood as a negative test , i.e . if a specific model appears to be significantly more robust than others , we can consider it a promising candidate for more in depth research on generalization . To simulate novel appearances of familiar objects we utilize a stylized version of MS COCO ( Lin et al. , 2014 ) as shown Figure 1 left . As can be seen , the AdaIN method ( Huang & Belongie , 2017 ) effectively replaces local texture cues but preserves the global shape of objects . In addition , we create two object-centric versions of the stylized COCO dataset as displayed in Figure 1 right . By comparing the performance on all three datasets we can control for spurious correlations that might have been introduced in the fully stylized dataset . Note that the style masking encodes ground truth information from the test set in the data which could potentially be exploited by the models . While this would be an interesting finding in itself , we do not see this to happen in practice . A limitation of our approach is the use of artistic style images . This leads to novel object appearances that can not be found in real-life directly . However , we compromise on this choice since it ensures that textures are truly novel and not biased which could happen with natural style images . We discuss more alternatives to our simulation method in the related work section . A closely related perspective on segmentation robustness can be found in work that acknowledges the inherent long-tail distribution of real-world data . In such settings , the challenge is to become robust against the bias of extreme class imbalance in existing datsets . Common approaches to resolve this issue are re-sampling ( Wang et al. , 2020b ; Chang et al. , 2021 ) and regularization strategies ( Tang et al. , 2020 ; Pan et al. , 2021 ; Hsieh et al. , 2021 ; Wang et al. , 2021b ) . The long-tail problem can also be understood as a low resource setting where data collection is expensive or class labels are missing . In such cases , the challenge is to efficiently adapt to novel objects or uncommon appearances in a semi-supervised manner ( Hu et al. , 2018b ; Fan et al. , 2020 ) . A particular instantiation of this problem is object occlusion . Since objects can occlude each other in almost infinitely different ways , a common strategy is to model object features more explicitly , i.e . to decouple shape and appearance for instance ( Chen et al. , 2015 ; Cheng et al. , 2020 ; Ke et al. , 2021 ; Fan et al. , 2020 ) . The idea is to learn representations that generalize more systematically and we expect these methods to be strong contenders in our comparison . We hope that our comprehensive benchmark motivates more research in this direction which we believe , will lead to improvements in all of the related problem spaces . 2 METHODS . In this section we describe the datasets , frameworks and models that are used in this study . The code to reproduce our results , as well as ≈ 1.5TB of detection and evaluation data can be found here : link-to-project-page-when-published . 2.1 AN OBJECT-CENTRIC CAUSAL VERSION OF STYLIZED COCO . Stylized COCO as shown in Figure 1 left is an adaptation of Stylized-ImageNet by Geirhos et al . ( 2019 ) . It was first used by Michaelis et al . ( 2019 ) 1 as data augmentation technique during training to improve robustness of detection models against common corruption types such as gaussian noise or motion blur . We instead use a stylized version of the val2017 subset to test instance segmentation models on this data directly . By manual inspection of Stylized COCO , we found that strong 1 Stylized Datasets : https : //github.com/bethgelab/stylize-datasets stylization can sometimes lead to images where the object contour starts to vanish , up to the point where objects and their boundaries dissolve completely . This effect depends on the style image used in the creation process but affects objects of all scales alike . As shown in Figure 2 , we resolve this issue by using the ground truth mask annotations to limit the style transfer to the actual objects or the background . This not only ensures that object contours are preserved but also controls for global stylization as a confounding variable . By assuming an object-centric causal model , Stylized COCO allows us to ask interventional questions regarding the original COCO dataset , e.g . “ What happens if we change the texture of images ? ” . By masking the style transfer to objects or background , we can also ask counterfactual questions such as “ Was it actually the object that caused the change in performance ? ” , “ What if we change the background instead ? ” . We will refer to the different dataset versions as Stylized COCO ( l ) , Stylized Objects ( s ) and Stylized Background ( n ) . A related , second problem that remains after masking is that shape information within the object can also be lost due to strong stylization . We address this issue by controlling the strength of the AdaIN style transfer . This can be done with an α parameter that acts as a mixing coefficient between the content and style image . More precisely , AdaIN employs a pre-trained VGG encoder f on both images , performs an interpolation step between the resulting feature maps and produces the final output with a learned decoder network g. In summary , a stylized image t is produced by T ( c , s , α ) = g ( ( 1− α ) f ( c ) + αAdaIN ( f ( c ) , f ( s ) ) ) where c and s are the content and style images respectively . We will refer to this method as blending in feature space . The top row of Figure 3 shows two examples of the extreme points α = 0 and α = 1 . Note that at α = 0 , the image colors are mostly preserved but the algorithm has already introduced artifacts in the form of subtle texture and shape changes . In response we create a control group where we perform alpha blending between the pixel values of the original content image c and the fully stylized image tα=1 : P ( c , tα=1 , α ) = ( ( 1− α ) ∗ c+ α ∗ tα=1 ) . We will refer to this method as blending in pixel space . In contrast to the feature space sequence , the control group should preserve textures and object shape over a longer range . The idea is to compare models on both sequences in order to attribute performance changes to either color and texture or shape , depending on the objects size . In contrast to Geirhos et al . ( 2019 ) who used a fixed style strength to modify ImageNet features ( α = 1 ) , we produce the full alpha-range α ∈ ( 0.0 , 0.1 , 0.2 , ... , 1.0 ) for both blending spaces . Note that every alpha value depicts a separate and complete version of the accordingly styled COCO val2017 subset . The qualitative differences can be inspected in Figure 3 bottom left ( zoom in for better visibility ) . We also went for quantitive measures to validate our subjective impression of Stylized COCO . Figure 3 bottom right shows a comparison of image gradients and RGB histograms at the extreme points . Compared to the original image we can see the subtle shape changes in the gradient map of α = 0 and a significantly different color histogram at α = 1 . To describe this effect over the full alpha range , we compute the structural similarity index ( SSIM ) ( Wang et al. , 2004 ) between gradient images of corresponding image pairs . Between RGB histograms we compute the Wasserstein distance alike . We always compare against the original COCO data and report the mean distance averaged over the full dataset at a specific alpha . In addition to the image-to-image scores we also include an instance level comparison for the COCO scales S , M and L. Instances have been cropped based on bbox information . This addition was added after we observed that small objects appear to be more affected by the AdaIN artifacts compared to medium and large instances . Figure 4 displays the results and confirms our assumption . Structural similarity depends on object size and is in fact , almost constant over the full feature space range for small objects . Furthermore , the control group preserves structural similarity over a longer range as intended . Color distance in contrast converges at around α = 0.3 . Based on these insights , we feel confident to better attribute potential performance dips and subsequently , determine the relative importance of each feature type . 2.2 MODEL SELECTION . To contribute a comprehensive overview on model robustness , we opted for a broad comparison of popular frameworks and architectures . The dimensions we consider to be impactful are framework , architecture and pre-training . The selected models can be found in Table 1 . Frameworks for instance segmentation can be categorized in different ways . A first distinction can be made between methods that solve the detection problem as a refinement process of box proposals ( multi stage ) and methods that predict bounding boxes directly ( one stage ) . We include the popular multi-stage frameworks Mask R-CNN ( He et al. , 2017 ) and Cascade Mask R-CNN ( Cai & Vasconcelos , 2018 ) that uses multiple refinement stages instead of one . Both frameworks formulate instance segmentation as a pixel-wise classification problem . Since this rather naive extension to Faster R-CNN ( Ren et al. , 2015 ) can ignore object boundaries and shapes , we include the boundarypreserving mask head alternative ( Cascade- ) BMask ( Cheng et al. , 2020 ) for comparison . A remaining challenge to boundary detection are overlapping objects that occlude the ground truth contour of other instances . We therefore include the Bilayer Convolutional Network ( BCNet ) ( Ke et al. , 2021 ) as another mask head alternative . In BCNet , the occluded and occluding object are separately detected and modeled explicitly in a layered representation . The mask head can then ” consider the interaction between [ the decoupled boundaries ] during mask regression ( Ke et al. , 2021 ) . ” A second distinction between frameworks concerns the use of predefined anchor boxes . Anchor based methods predict relative transformations on these priors whereas anchor free methods predict absolute bounding boxes . We include YOLACT ( ++ ) ( Bolya et al. , 2019 ; 2020 ) as a one-stage , anchor based framework . YOLACT is a real-time method that solves instance segmentation without explicit localization ( feature pooling ) . Instead , it generates prototype masks over the entire image which are combined with per-instance mask coefficients to form the final output . The ( ++ ) version improves by adding a mask re-scoring branch ( Huang et al. , 2019a ) and deformable convolutions ( v2 ) ( Dai et al. , 2017 ; Zhu et al. , 2019 ) . We include DETR ( Carion et al. , 2020 ) as a one-stage , anchor free framework that formulates object detection as a set prediction problem over image features . Note that it was not primarily designed for instance segmentation but offers a corresponding extension that we use in our study . Based on model availability we include BCNet in the FCOS ( Tian et al. , 2019 ) variant ( F-BCNet ) . FCOS is a fully convolutional , one-stage , anchor-free alternative to Faster R-CNN that ” solves object detection in a per-pixel prediction fashion , analogue to semantic segmentation ( Tian et al. , 2019 ) . ” Finally , we distinguish between top down frameworks where detection precedes segmentation and bottom up methods where bounding boxes are derived from mask predictions . We include the bottom-up methods SOLOv2 ( Wang et al. , 2020d ) and SOTR ( Guo et al. , 2021 ) . SOLO ( Wang et al. , 2020c ) divides the input into a fixed grid and predicts a semantic category and corresponding instance mask at each location . The final segmentation is obtained with non-maximum-suppression on the gathered grid results to resolve similar predictions of adjacent grid cells . SOLOv2 improves by introducing dynamic convolutions to the mask prediction branch , i.e . an additional input dependent branch that dynamically predicts the convolution kernel weights . A similar idea was used by Tian et al . ( 2020b ) . SOTR uses a twin attention mechanism ( Huang et al. , 2019b ) to model global and semantic dependencies between encoded image patches . The final result is obtained by patch wise classification and a multi-level upsampling module with dynamic convolution kernels for mask predictions , similar to SOLOv2 . For completeness , we also include YOLO ( v3,4 and scaled v4 ) to our comparison since detection is a vital sub-task of top down frameworks ( Redmon & Farhadi , 2018 ; Bochkovskiy et al. , 2020 ; Wang et al. , 2021a ) . Architectures used in instance segmentation can be divided into backbone , neck and functional heads . The latter output the final results and are framework specific . Backbones and necks however are typically chosen from a pool of established models which allows for a controlled comparison . The role of backbone networks is to extract meaningful feature representations from the input , i.e . to encode the input . The neck modules define which representations are available to the functional heads , i.e . define the information flow . We include the CNN backbones ResNet ( He et al. , 2016 ) , ResNext ( Xie et al. , 2017 ) and RegNet ( Radosavovic et al. , 2020 ) , a network found with meta architecture search that outperforms EfficientNet ( Tan & Le , 2019 ) . Note that BCNet utilizes a Graph Convolutional Network ( GCN ) ( Kipf & Welling , 2017 ) within its mask heads to model long-range dependencies between pixels ( to evade local occlusion ) . Furthermore , DETR and SOTR are hybrid frameworks that use transformer architectures to process the encoded backbone features . With Swin Transformer ( Liu et al. , 2021 ) we also include a convolution free backbone alternative based on the Vision Transformer approach ( ViT ) ( Dosovitskiy et al. , 2021 ) . The most popular neck choice is the Feature Pyramid Network ( FPN ) ( Lin et al. , 2017 ) . It builds a hierarchical feature representation from intermediate layers to improve performance at different scales , e.g . small objects . For comparison we also include a ResNet conv4 neck ( C4 ) as used in Ren et al . ( 2015 ) and a ResNet conv5 neck with dilated convolution ( DC5 ) as used by Dai et al . ( 2017 ) . Finally we abbreviate FPN models that use deformable convolutions as DCN ( Dai et al. , 2017 ; Zhu et al. , 2019 ) . Similar to dynamic convolutions which predict kernel weights , DCNs learn to dynamically transform the sampling location of the otherwise fixed convolution filters . Pre-training of backbone networks is commonly done as supervised learning on ImageNet ( IN ) . Due to the recent success of self supervised learning ( SSL ) in classification , we are interested in how these representations perform in terms of object-centric robustness . In particular we are interested in the contrastive learning framework that seeks to learn “ representations with enough invariance to be robust to inconsequential variations ( Tian et al. , 2020a ) ” . Based on availability we include the methods InstDis ( Wu et al. , 2018 ) , MoCo ( He et al. , 2020 ; Chen et al. , 2020 ) , PIRL ( Misra & van der Maaten , 2020 ) and InfoMin ( Tian et al. , 2020a ) . Note that pre-trained backbones were only used as initialization for a supervised training on COCO . As a final comparison we include models that have been trained with random initialization and Large Scale Jittering ( LSJ ) ( Ghiasi et al. , 2021 ) data augmentation as an alternative to pre-training . The complete list of models can be inspected in Figure 5 . From the overview in Table 1 we can see that our selection allows for a fair comparison of frameworks as long as we fix the backbone and neck architecture to ResNet+FPN . Vice versa we can compare backbone and neck combinations within a fixed framework , in particular Mask R-CNN . Note that we also compared different learning schedules but did not include this dimension more prominent in the categorization after finding it to be the least significant factor in our evaluation . | The authors studied the "object-centric" robustness of various instance segmentation models. They used stylized objects/background to evaluate the performance which is adopted from a work by Geirhos et al. [1]. The authors performed large number of experiments to evaluate different aspects of instance segmentation models including framework, architecture, and pre-training. | SP:b78e7343f585c0d7b7d77cfff67d33f1c2f2a230 |
An object-centric sensitivity analysis of deep learning based instance segmentation | 1 INTRODUCTION . In this study , we want to learn how deep learning models for instance segmentation generalize to novel appearances of familiar objects . Despite their remarkable success in computer vision , deep neural networks still struggle in challenging real-world scenarios ( Yuille & Liu , 2018 ; Michaelis et al. , 2019 ; Recht et al. , 2019 ; Madan et al. , 2021 ) . Consider for instance a pedestrian with an unconventionally textured dress or a rare horse statue made from bronze . The model might have seen many pedestrians or natural horses during training but still fails to detect these unseen and out of context examples , often with high confidence . Generalizing to such naturally adversarial objects is typically described as out-of-distribution robustness in the literature ( Hendrycks et al. , 2021 ; Lau et al. , 2021 ) . Interestingly , Hendrycks et al . ( 2021 ) suggest that improvements in this direction are more likely to come from computer vision architectures than from existing data augmentation or additional public datasets . With the ever increasing number of competitive models , our objective is therefore to contribute an extensive comparison of instance segmentation models to unveil promising future research directions . The perspective we take is inspired by the work of Baker et al . ( 2018 ) and Geirhos et al . ( 2019 ) on texture bias in classification models . More precisely , both groups found that when compared to humans , convolutional neural networks ( CNNs ) mostly ignore object shapes , i.e . ignore the defining structure of an object . In fact , Brendel & Bethge ( 2019 ) have further shown that CNNs can robustly classify objects in texturized images where the global appearance of objects is fully mixed up . In summary , these findings indicate that a revision of contemporary deep learning architectures is a much needed contribution on the pathway to more systematic generalization . To compare the robustness of instance segmentation models , we introduce a novel negative test in the form of an object-centric sensitivity analysis . More precisely , we investigate the impact of increasingly novel object texture while controlling for the effect of corrupted color , shape and contour features . By object-centric , we mean that the appearance of visual objects is changed in a semantics preserving and causally plausible way , i.e . is controlled at the instance level . Since we generally expect that segmentation performance will degrade under novel textures and increasing corruptions , our benchmark can be understood as a negative test , i.e . if a specific model appears to be significantly more robust than others , we can consider it a promising candidate for more in depth research on generalization . To simulate novel appearances of familiar objects we utilize a stylized version of MS COCO ( Lin et al. , 2014 ) as shown Figure 1 left . As can be seen , the AdaIN method ( Huang & Belongie , 2017 ) effectively replaces local texture cues but preserves the global shape of objects . In addition , we create two object-centric versions of the stylized COCO dataset as displayed in Figure 1 right . By comparing the performance on all three datasets we can control for spurious correlations that might have been introduced in the fully stylized dataset . Note that the style masking encodes ground truth information from the test set in the data which could potentially be exploited by the models . While this would be an interesting finding in itself , we do not see this to happen in practice . A limitation of our approach is the use of artistic style images . This leads to novel object appearances that can not be found in real-life directly . However , we compromise on this choice since it ensures that textures are truly novel and not biased which could happen with natural style images . We discuss more alternatives to our simulation method in the related work section . A closely related perspective on segmentation robustness can be found in work that acknowledges the inherent long-tail distribution of real-world data . In such settings , the challenge is to become robust against the bias of extreme class imbalance in existing datsets . Common approaches to resolve this issue are re-sampling ( Wang et al. , 2020b ; Chang et al. , 2021 ) and regularization strategies ( Tang et al. , 2020 ; Pan et al. , 2021 ; Hsieh et al. , 2021 ; Wang et al. , 2021b ) . The long-tail problem can also be understood as a low resource setting where data collection is expensive or class labels are missing . In such cases , the challenge is to efficiently adapt to novel objects or uncommon appearances in a semi-supervised manner ( Hu et al. , 2018b ; Fan et al. , 2020 ) . A particular instantiation of this problem is object occlusion . Since objects can occlude each other in almost infinitely different ways , a common strategy is to model object features more explicitly , i.e . to decouple shape and appearance for instance ( Chen et al. , 2015 ; Cheng et al. , 2020 ; Ke et al. , 2021 ; Fan et al. , 2020 ) . The idea is to learn representations that generalize more systematically and we expect these methods to be strong contenders in our comparison . We hope that our comprehensive benchmark motivates more research in this direction which we believe , will lead to improvements in all of the related problem spaces . 2 METHODS . In this section we describe the datasets , frameworks and models that are used in this study . The code to reproduce our results , as well as ≈ 1.5TB of detection and evaluation data can be found here : link-to-project-page-when-published . 2.1 AN OBJECT-CENTRIC CAUSAL VERSION OF STYLIZED COCO . Stylized COCO as shown in Figure 1 left is an adaptation of Stylized-ImageNet by Geirhos et al . ( 2019 ) . It was first used by Michaelis et al . ( 2019 ) 1 as data augmentation technique during training to improve robustness of detection models against common corruption types such as gaussian noise or motion blur . We instead use a stylized version of the val2017 subset to test instance segmentation models on this data directly . By manual inspection of Stylized COCO , we found that strong 1 Stylized Datasets : https : //github.com/bethgelab/stylize-datasets stylization can sometimes lead to images where the object contour starts to vanish , up to the point where objects and their boundaries dissolve completely . This effect depends on the style image used in the creation process but affects objects of all scales alike . As shown in Figure 2 , we resolve this issue by using the ground truth mask annotations to limit the style transfer to the actual objects or the background . This not only ensures that object contours are preserved but also controls for global stylization as a confounding variable . By assuming an object-centric causal model , Stylized COCO allows us to ask interventional questions regarding the original COCO dataset , e.g . “ What happens if we change the texture of images ? ” . By masking the style transfer to objects or background , we can also ask counterfactual questions such as “ Was it actually the object that caused the change in performance ? ” , “ What if we change the background instead ? ” . We will refer to the different dataset versions as Stylized COCO ( l ) , Stylized Objects ( s ) and Stylized Background ( n ) . A related , second problem that remains after masking is that shape information within the object can also be lost due to strong stylization . We address this issue by controlling the strength of the AdaIN style transfer . This can be done with an α parameter that acts as a mixing coefficient between the content and style image . More precisely , AdaIN employs a pre-trained VGG encoder f on both images , performs an interpolation step between the resulting feature maps and produces the final output with a learned decoder network g. In summary , a stylized image t is produced by T ( c , s , α ) = g ( ( 1− α ) f ( c ) + αAdaIN ( f ( c ) , f ( s ) ) ) where c and s are the content and style images respectively . We will refer to this method as blending in feature space . The top row of Figure 3 shows two examples of the extreme points α = 0 and α = 1 . Note that at α = 0 , the image colors are mostly preserved but the algorithm has already introduced artifacts in the form of subtle texture and shape changes . In response we create a control group where we perform alpha blending between the pixel values of the original content image c and the fully stylized image tα=1 : P ( c , tα=1 , α ) = ( ( 1− α ) ∗ c+ α ∗ tα=1 ) . We will refer to this method as blending in pixel space . In contrast to the feature space sequence , the control group should preserve textures and object shape over a longer range . The idea is to compare models on both sequences in order to attribute performance changes to either color and texture or shape , depending on the objects size . In contrast to Geirhos et al . ( 2019 ) who used a fixed style strength to modify ImageNet features ( α = 1 ) , we produce the full alpha-range α ∈ ( 0.0 , 0.1 , 0.2 , ... , 1.0 ) for both blending spaces . Note that every alpha value depicts a separate and complete version of the accordingly styled COCO val2017 subset . The qualitative differences can be inspected in Figure 3 bottom left ( zoom in for better visibility ) . We also went for quantitive measures to validate our subjective impression of Stylized COCO . Figure 3 bottom right shows a comparison of image gradients and RGB histograms at the extreme points . Compared to the original image we can see the subtle shape changes in the gradient map of α = 0 and a significantly different color histogram at α = 1 . To describe this effect over the full alpha range , we compute the structural similarity index ( SSIM ) ( Wang et al. , 2004 ) between gradient images of corresponding image pairs . Between RGB histograms we compute the Wasserstein distance alike . We always compare against the original COCO data and report the mean distance averaged over the full dataset at a specific alpha . In addition to the image-to-image scores we also include an instance level comparison for the COCO scales S , M and L. Instances have been cropped based on bbox information . This addition was added after we observed that small objects appear to be more affected by the AdaIN artifacts compared to medium and large instances . Figure 4 displays the results and confirms our assumption . Structural similarity depends on object size and is in fact , almost constant over the full feature space range for small objects . Furthermore , the control group preserves structural similarity over a longer range as intended . Color distance in contrast converges at around α = 0.3 . Based on these insights , we feel confident to better attribute potential performance dips and subsequently , determine the relative importance of each feature type . 2.2 MODEL SELECTION . To contribute a comprehensive overview on model robustness , we opted for a broad comparison of popular frameworks and architectures . The dimensions we consider to be impactful are framework , architecture and pre-training . The selected models can be found in Table 1 . Frameworks for instance segmentation can be categorized in different ways . A first distinction can be made between methods that solve the detection problem as a refinement process of box proposals ( multi stage ) and methods that predict bounding boxes directly ( one stage ) . We include the popular multi-stage frameworks Mask R-CNN ( He et al. , 2017 ) and Cascade Mask R-CNN ( Cai & Vasconcelos , 2018 ) that uses multiple refinement stages instead of one . Both frameworks formulate instance segmentation as a pixel-wise classification problem . Since this rather naive extension to Faster R-CNN ( Ren et al. , 2015 ) can ignore object boundaries and shapes , we include the boundarypreserving mask head alternative ( Cascade- ) BMask ( Cheng et al. , 2020 ) for comparison . A remaining challenge to boundary detection are overlapping objects that occlude the ground truth contour of other instances . We therefore include the Bilayer Convolutional Network ( BCNet ) ( Ke et al. , 2021 ) as another mask head alternative . In BCNet , the occluded and occluding object are separately detected and modeled explicitly in a layered representation . The mask head can then ” consider the interaction between [ the decoupled boundaries ] during mask regression ( Ke et al. , 2021 ) . ” A second distinction between frameworks concerns the use of predefined anchor boxes . Anchor based methods predict relative transformations on these priors whereas anchor free methods predict absolute bounding boxes . We include YOLACT ( ++ ) ( Bolya et al. , 2019 ; 2020 ) as a one-stage , anchor based framework . YOLACT is a real-time method that solves instance segmentation without explicit localization ( feature pooling ) . Instead , it generates prototype masks over the entire image which are combined with per-instance mask coefficients to form the final output . The ( ++ ) version improves by adding a mask re-scoring branch ( Huang et al. , 2019a ) and deformable convolutions ( v2 ) ( Dai et al. , 2017 ; Zhu et al. , 2019 ) . We include DETR ( Carion et al. , 2020 ) as a one-stage , anchor free framework that formulates object detection as a set prediction problem over image features . Note that it was not primarily designed for instance segmentation but offers a corresponding extension that we use in our study . Based on model availability we include BCNet in the FCOS ( Tian et al. , 2019 ) variant ( F-BCNet ) . FCOS is a fully convolutional , one-stage , anchor-free alternative to Faster R-CNN that ” solves object detection in a per-pixel prediction fashion , analogue to semantic segmentation ( Tian et al. , 2019 ) . ” Finally , we distinguish between top down frameworks where detection precedes segmentation and bottom up methods where bounding boxes are derived from mask predictions . We include the bottom-up methods SOLOv2 ( Wang et al. , 2020d ) and SOTR ( Guo et al. , 2021 ) . SOLO ( Wang et al. , 2020c ) divides the input into a fixed grid and predicts a semantic category and corresponding instance mask at each location . The final segmentation is obtained with non-maximum-suppression on the gathered grid results to resolve similar predictions of adjacent grid cells . SOLOv2 improves by introducing dynamic convolutions to the mask prediction branch , i.e . an additional input dependent branch that dynamically predicts the convolution kernel weights . A similar idea was used by Tian et al . ( 2020b ) . SOTR uses a twin attention mechanism ( Huang et al. , 2019b ) to model global and semantic dependencies between encoded image patches . The final result is obtained by patch wise classification and a multi-level upsampling module with dynamic convolution kernels for mask predictions , similar to SOLOv2 . For completeness , we also include YOLO ( v3,4 and scaled v4 ) to our comparison since detection is a vital sub-task of top down frameworks ( Redmon & Farhadi , 2018 ; Bochkovskiy et al. , 2020 ; Wang et al. , 2021a ) . Architectures used in instance segmentation can be divided into backbone , neck and functional heads . The latter output the final results and are framework specific . Backbones and necks however are typically chosen from a pool of established models which allows for a controlled comparison . The role of backbone networks is to extract meaningful feature representations from the input , i.e . to encode the input . The neck modules define which representations are available to the functional heads , i.e . define the information flow . We include the CNN backbones ResNet ( He et al. , 2016 ) , ResNext ( Xie et al. , 2017 ) and RegNet ( Radosavovic et al. , 2020 ) , a network found with meta architecture search that outperforms EfficientNet ( Tan & Le , 2019 ) . Note that BCNet utilizes a Graph Convolutional Network ( GCN ) ( Kipf & Welling , 2017 ) within its mask heads to model long-range dependencies between pixels ( to evade local occlusion ) . Furthermore , DETR and SOTR are hybrid frameworks that use transformer architectures to process the encoded backbone features . With Swin Transformer ( Liu et al. , 2021 ) we also include a convolution free backbone alternative based on the Vision Transformer approach ( ViT ) ( Dosovitskiy et al. , 2021 ) . The most popular neck choice is the Feature Pyramid Network ( FPN ) ( Lin et al. , 2017 ) . It builds a hierarchical feature representation from intermediate layers to improve performance at different scales , e.g . small objects . For comparison we also include a ResNet conv4 neck ( C4 ) as used in Ren et al . ( 2015 ) and a ResNet conv5 neck with dilated convolution ( DC5 ) as used by Dai et al . ( 2017 ) . Finally we abbreviate FPN models that use deformable convolutions as DCN ( Dai et al. , 2017 ; Zhu et al. , 2019 ) . Similar to dynamic convolutions which predict kernel weights , DCNs learn to dynamically transform the sampling location of the otherwise fixed convolution filters . Pre-training of backbone networks is commonly done as supervised learning on ImageNet ( IN ) . Due to the recent success of self supervised learning ( SSL ) in classification , we are interested in how these representations perform in terms of object-centric robustness . In particular we are interested in the contrastive learning framework that seeks to learn “ representations with enough invariance to be robust to inconsequential variations ( Tian et al. , 2020a ) ” . Based on availability we include the methods InstDis ( Wu et al. , 2018 ) , MoCo ( He et al. , 2020 ; Chen et al. , 2020 ) , PIRL ( Misra & van der Maaten , 2020 ) and InfoMin ( Tian et al. , 2020a ) . Note that pre-trained backbones were only used as initialization for a supervised training on COCO . As a final comparison we include models that have been trained with random initialization and Large Scale Jittering ( LSJ ) ( Ghiasi et al. , 2021 ) data augmentation as an alternative to pre-training . The complete list of models can be inspected in Figure 5 . From the overview in Table 1 we can see that our selection allows for a fair comparison of frameworks as long as we fix the backbone and neck architecture to ResNet+FPN . Vice versa we can compare backbone and neck combinations within a fixed framework , in particular Mask R-CNN . Note that we also compared different learning schedules but did not include this dimension more prominent in the categorization after finding it to be the least significant factor in our evaluation . | This paper presents a new setting for instance segmentation and compares a set of literature instance segmentation methods on this new setting. The new settings are: 1) use AdaIN (a style transfer method) to create stylized image, 2) only perform AdaIn on objects (use COCO's ground truth instance mask), 3) only perform AdaIN on background. This paper presents the instance segmentation AP numbers for many state-of-the-art methods (e.g. mask rcnn, swimtransformer, DETR) on the three settings with different ratio of the style transfer. | SP:b78e7343f585c0d7b7d77cfff67d33f1c2f2a230 |
An object-centric sensitivity analysis of deep learning based instance segmentation | 1 INTRODUCTION . In this study , we want to learn how deep learning models for instance segmentation generalize to novel appearances of familiar objects . Despite their remarkable success in computer vision , deep neural networks still struggle in challenging real-world scenarios ( Yuille & Liu , 2018 ; Michaelis et al. , 2019 ; Recht et al. , 2019 ; Madan et al. , 2021 ) . Consider for instance a pedestrian with an unconventionally textured dress or a rare horse statue made from bronze . The model might have seen many pedestrians or natural horses during training but still fails to detect these unseen and out of context examples , often with high confidence . Generalizing to such naturally adversarial objects is typically described as out-of-distribution robustness in the literature ( Hendrycks et al. , 2021 ; Lau et al. , 2021 ) . Interestingly , Hendrycks et al . ( 2021 ) suggest that improvements in this direction are more likely to come from computer vision architectures than from existing data augmentation or additional public datasets . With the ever increasing number of competitive models , our objective is therefore to contribute an extensive comparison of instance segmentation models to unveil promising future research directions . The perspective we take is inspired by the work of Baker et al . ( 2018 ) and Geirhos et al . ( 2019 ) on texture bias in classification models . More precisely , both groups found that when compared to humans , convolutional neural networks ( CNNs ) mostly ignore object shapes , i.e . ignore the defining structure of an object . In fact , Brendel & Bethge ( 2019 ) have further shown that CNNs can robustly classify objects in texturized images where the global appearance of objects is fully mixed up . In summary , these findings indicate that a revision of contemporary deep learning architectures is a much needed contribution on the pathway to more systematic generalization . To compare the robustness of instance segmentation models , we introduce a novel negative test in the form of an object-centric sensitivity analysis . More precisely , we investigate the impact of increasingly novel object texture while controlling for the effect of corrupted color , shape and contour features . By object-centric , we mean that the appearance of visual objects is changed in a semantics preserving and causally plausible way , i.e . is controlled at the instance level . Since we generally expect that segmentation performance will degrade under novel textures and increasing corruptions , our benchmark can be understood as a negative test , i.e . if a specific model appears to be significantly more robust than others , we can consider it a promising candidate for more in depth research on generalization . To simulate novel appearances of familiar objects we utilize a stylized version of MS COCO ( Lin et al. , 2014 ) as shown Figure 1 left . As can be seen , the AdaIN method ( Huang & Belongie , 2017 ) effectively replaces local texture cues but preserves the global shape of objects . In addition , we create two object-centric versions of the stylized COCO dataset as displayed in Figure 1 right . By comparing the performance on all three datasets we can control for spurious correlations that might have been introduced in the fully stylized dataset . Note that the style masking encodes ground truth information from the test set in the data which could potentially be exploited by the models . While this would be an interesting finding in itself , we do not see this to happen in practice . A limitation of our approach is the use of artistic style images . This leads to novel object appearances that can not be found in real-life directly . However , we compromise on this choice since it ensures that textures are truly novel and not biased which could happen with natural style images . We discuss more alternatives to our simulation method in the related work section . A closely related perspective on segmentation robustness can be found in work that acknowledges the inherent long-tail distribution of real-world data . In such settings , the challenge is to become robust against the bias of extreme class imbalance in existing datsets . Common approaches to resolve this issue are re-sampling ( Wang et al. , 2020b ; Chang et al. , 2021 ) and regularization strategies ( Tang et al. , 2020 ; Pan et al. , 2021 ; Hsieh et al. , 2021 ; Wang et al. , 2021b ) . The long-tail problem can also be understood as a low resource setting where data collection is expensive or class labels are missing . In such cases , the challenge is to efficiently adapt to novel objects or uncommon appearances in a semi-supervised manner ( Hu et al. , 2018b ; Fan et al. , 2020 ) . A particular instantiation of this problem is object occlusion . Since objects can occlude each other in almost infinitely different ways , a common strategy is to model object features more explicitly , i.e . to decouple shape and appearance for instance ( Chen et al. , 2015 ; Cheng et al. , 2020 ; Ke et al. , 2021 ; Fan et al. , 2020 ) . The idea is to learn representations that generalize more systematically and we expect these methods to be strong contenders in our comparison . We hope that our comprehensive benchmark motivates more research in this direction which we believe , will lead to improvements in all of the related problem spaces . 2 METHODS . In this section we describe the datasets , frameworks and models that are used in this study . The code to reproduce our results , as well as ≈ 1.5TB of detection and evaluation data can be found here : link-to-project-page-when-published . 2.1 AN OBJECT-CENTRIC CAUSAL VERSION OF STYLIZED COCO . Stylized COCO as shown in Figure 1 left is an adaptation of Stylized-ImageNet by Geirhos et al . ( 2019 ) . It was first used by Michaelis et al . ( 2019 ) 1 as data augmentation technique during training to improve robustness of detection models against common corruption types such as gaussian noise or motion blur . We instead use a stylized version of the val2017 subset to test instance segmentation models on this data directly . By manual inspection of Stylized COCO , we found that strong 1 Stylized Datasets : https : //github.com/bethgelab/stylize-datasets stylization can sometimes lead to images where the object contour starts to vanish , up to the point where objects and their boundaries dissolve completely . This effect depends on the style image used in the creation process but affects objects of all scales alike . As shown in Figure 2 , we resolve this issue by using the ground truth mask annotations to limit the style transfer to the actual objects or the background . This not only ensures that object contours are preserved but also controls for global stylization as a confounding variable . By assuming an object-centric causal model , Stylized COCO allows us to ask interventional questions regarding the original COCO dataset , e.g . “ What happens if we change the texture of images ? ” . By masking the style transfer to objects or background , we can also ask counterfactual questions such as “ Was it actually the object that caused the change in performance ? ” , “ What if we change the background instead ? ” . We will refer to the different dataset versions as Stylized COCO ( l ) , Stylized Objects ( s ) and Stylized Background ( n ) . A related , second problem that remains after masking is that shape information within the object can also be lost due to strong stylization . We address this issue by controlling the strength of the AdaIN style transfer . This can be done with an α parameter that acts as a mixing coefficient between the content and style image . More precisely , AdaIN employs a pre-trained VGG encoder f on both images , performs an interpolation step between the resulting feature maps and produces the final output with a learned decoder network g. In summary , a stylized image t is produced by T ( c , s , α ) = g ( ( 1− α ) f ( c ) + αAdaIN ( f ( c ) , f ( s ) ) ) where c and s are the content and style images respectively . We will refer to this method as blending in feature space . The top row of Figure 3 shows two examples of the extreme points α = 0 and α = 1 . Note that at α = 0 , the image colors are mostly preserved but the algorithm has already introduced artifacts in the form of subtle texture and shape changes . In response we create a control group where we perform alpha blending between the pixel values of the original content image c and the fully stylized image tα=1 : P ( c , tα=1 , α ) = ( ( 1− α ) ∗ c+ α ∗ tα=1 ) . We will refer to this method as blending in pixel space . In contrast to the feature space sequence , the control group should preserve textures and object shape over a longer range . The idea is to compare models on both sequences in order to attribute performance changes to either color and texture or shape , depending on the objects size . In contrast to Geirhos et al . ( 2019 ) who used a fixed style strength to modify ImageNet features ( α = 1 ) , we produce the full alpha-range α ∈ ( 0.0 , 0.1 , 0.2 , ... , 1.0 ) for both blending spaces . Note that every alpha value depicts a separate and complete version of the accordingly styled COCO val2017 subset . The qualitative differences can be inspected in Figure 3 bottom left ( zoom in for better visibility ) . We also went for quantitive measures to validate our subjective impression of Stylized COCO . Figure 3 bottom right shows a comparison of image gradients and RGB histograms at the extreme points . Compared to the original image we can see the subtle shape changes in the gradient map of α = 0 and a significantly different color histogram at α = 1 . To describe this effect over the full alpha range , we compute the structural similarity index ( SSIM ) ( Wang et al. , 2004 ) between gradient images of corresponding image pairs . Between RGB histograms we compute the Wasserstein distance alike . We always compare against the original COCO data and report the mean distance averaged over the full dataset at a specific alpha . In addition to the image-to-image scores we also include an instance level comparison for the COCO scales S , M and L. Instances have been cropped based on bbox information . This addition was added after we observed that small objects appear to be more affected by the AdaIN artifacts compared to medium and large instances . Figure 4 displays the results and confirms our assumption . Structural similarity depends on object size and is in fact , almost constant over the full feature space range for small objects . Furthermore , the control group preserves structural similarity over a longer range as intended . Color distance in contrast converges at around α = 0.3 . Based on these insights , we feel confident to better attribute potential performance dips and subsequently , determine the relative importance of each feature type . 2.2 MODEL SELECTION . To contribute a comprehensive overview on model robustness , we opted for a broad comparison of popular frameworks and architectures . The dimensions we consider to be impactful are framework , architecture and pre-training . The selected models can be found in Table 1 . Frameworks for instance segmentation can be categorized in different ways . A first distinction can be made between methods that solve the detection problem as a refinement process of box proposals ( multi stage ) and methods that predict bounding boxes directly ( one stage ) . We include the popular multi-stage frameworks Mask R-CNN ( He et al. , 2017 ) and Cascade Mask R-CNN ( Cai & Vasconcelos , 2018 ) that uses multiple refinement stages instead of one . Both frameworks formulate instance segmentation as a pixel-wise classification problem . Since this rather naive extension to Faster R-CNN ( Ren et al. , 2015 ) can ignore object boundaries and shapes , we include the boundarypreserving mask head alternative ( Cascade- ) BMask ( Cheng et al. , 2020 ) for comparison . A remaining challenge to boundary detection are overlapping objects that occlude the ground truth contour of other instances . We therefore include the Bilayer Convolutional Network ( BCNet ) ( Ke et al. , 2021 ) as another mask head alternative . In BCNet , the occluded and occluding object are separately detected and modeled explicitly in a layered representation . The mask head can then ” consider the interaction between [ the decoupled boundaries ] during mask regression ( Ke et al. , 2021 ) . ” A second distinction between frameworks concerns the use of predefined anchor boxes . Anchor based methods predict relative transformations on these priors whereas anchor free methods predict absolute bounding boxes . We include YOLACT ( ++ ) ( Bolya et al. , 2019 ; 2020 ) as a one-stage , anchor based framework . YOLACT is a real-time method that solves instance segmentation without explicit localization ( feature pooling ) . Instead , it generates prototype masks over the entire image which are combined with per-instance mask coefficients to form the final output . The ( ++ ) version improves by adding a mask re-scoring branch ( Huang et al. , 2019a ) and deformable convolutions ( v2 ) ( Dai et al. , 2017 ; Zhu et al. , 2019 ) . We include DETR ( Carion et al. , 2020 ) as a one-stage , anchor free framework that formulates object detection as a set prediction problem over image features . Note that it was not primarily designed for instance segmentation but offers a corresponding extension that we use in our study . Based on model availability we include BCNet in the FCOS ( Tian et al. , 2019 ) variant ( F-BCNet ) . FCOS is a fully convolutional , one-stage , anchor-free alternative to Faster R-CNN that ” solves object detection in a per-pixel prediction fashion , analogue to semantic segmentation ( Tian et al. , 2019 ) . ” Finally , we distinguish between top down frameworks where detection precedes segmentation and bottom up methods where bounding boxes are derived from mask predictions . We include the bottom-up methods SOLOv2 ( Wang et al. , 2020d ) and SOTR ( Guo et al. , 2021 ) . SOLO ( Wang et al. , 2020c ) divides the input into a fixed grid and predicts a semantic category and corresponding instance mask at each location . The final segmentation is obtained with non-maximum-suppression on the gathered grid results to resolve similar predictions of adjacent grid cells . SOLOv2 improves by introducing dynamic convolutions to the mask prediction branch , i.e . an additional input dependent branch that dynamically predicts the convolution kernel weights . A similar idea was used by Tian et al . ( 2020b ) . SOTR uses a twin attention mechanism ( Huang et al. , 2019b ) to model global and semantic dependencies between encoded image patches . The final result is obtained by patch wise classification and a multi-level upsampling module with dynamic convolution kernels for mask predictions , similar to SOLOv2 . For completeness , we also include YOLO ( v3,4 and scaled v4 ) to our comparison since detection is a vital sub-task of top down frameworks ( Redmon & Farhadi , 2018 ; Bochkovskiy et al. , 2020 ; Wang et al. , 2021a ) . Architectures used in instance segmentation can be divided into backbone , neck and functional heads . The latter output the final results and are framework specific . Backbones and necks however are typically chosen from a pool of established models which allows for a controlled comparison . The role of backbone networks is to extract meaningful feature representations from the input , i.e . to encode the input . The neck modules define which representations are available to the functional heads , i.e . define the information flow . We include the CNN backbones ResNet ( He et al. , 2016 ) , ResNext ( Xie et al. , 2017 ) and RegNet ( Radosavovic et al. , 2020 ) , a network found with meta architecture search that outperforms EfficientNet ( Tan & Le , 2019 ) . Note that BCNet utilizes a Graph Convolutional Network ( GCN ) ( Kipf & Welling , 2017 ) within its mask heads to model long-range dependencies between pixels ( to evade local occlusion ) . Furthermore , DETR and SOTR are hybrid frameworks that use transformer architectures to process the encoded backbone features . With Swin Transformer ( Liu et al. , 2021 ) we also include a convolution free backbone alternative based on the Vision Transformer approach ( ViT ) ( Dosovitskiy et al. , 2021 ) . The most popular neck choice is the Feature Pyramid Network ( FPN ) ( Lin et al. , 2017 ) . It builds a hierarchical feature representation from intermediate layers to improve performance at different scales , e.g . small objects . For comparison we also include a ResNet conv4 neck ( C4 ) as used in Ren et al . ( 2015 ) and a ResNet conv5 neck with dilated convolution ( DC5 ) as used by Dai et al . ( 2017 ) . Finally we abbreviate FPN models that use deformable convolutions as DCN ( Dai et al. , 2017 ; Zhu et al. , 2019 ) . Similar to dynamic convolutions which predict kernel weights , DCNs learn to dynamically transform the sampling location of the otherwise fixed convolution filters . Pre-training of backbone networks is commonly done as supervised learning on ImageNet ( IN ) . Due to the recent success of self supervised learning ( SSL ) in classification , we are interested in how these representations perform in terms of object-centric robustness . In particular we are interested in the contrastive learning framework that seeks to learn “ representations with enough invariance to be robust to inconsequential variations ( Tian et al. , 2020a ) ” . Based on availability we include the methods InstDis ( Wu et al. , 2018 ) , MoCo ( He et al. , 2020 ; Chen et al. , 2020 ) , PIRL ( Misra & van der Maaten , 2020 ) and InfoMin ( Tian et al. , 2020a ) . Note that pre-trained backbones were only used as initialization for a supervised training on COCO . As a final comparison we include models that have been trained with random initialization and Large Scale Jittering ( LSJ ) ( Ghiasi et al. , 2021 ) data augmentation as an alternative to pre-training . The complete list of models can be inspected in Figure 5 . From the overview in Table 1 we can see that our selection allows for a fair comparison of frameworks as long as we fix the backbone and neck architecture to ResNet+FPN . Vice versa we can compare backbone and neck combinations within a fixed framework , in particular Mask R-CNN . Note that we also compared different learning schedules but did not include this dimension more prominent in the categorization after finding it to be the least significant factor in our evaluation . | In this paper, the authors study whether deep learning based techniques for instance segmentation are robust to changes in object texture or contour. This is inspired from a previous work in ICLR 2019 where the authors perform a similar study for image classification and show that existing CNN models learn classes based on texture and do not take the overall shape into account. The authors take the task of instance segmentation where it is necessary for the model to learn the overall shape and measure the impact of texture changes. They use a stylized version of coco but also create two different types, one stylizing only the objects and the other stylizing only the background. Moreover, for each dataset type they create 10 variants by varying the blending weight. The evaluation is done on four dataset types, default coco val, stylized coco (everything stylized), stylized objects and stylized images. Except the default coco, every dataset type has 20 variants (different levels of blending plus pixel space vs feature space blending) which leads to a total of 61 datasets. Following this, the authors perform an evaluation of various instance segmentation techniques. They take three paradigms - architectures (backbone / neck), frameworks and pre-training approaches and study the robustness of each to changes in texture. | SP:b78e7343f585c0d7b7d77cfff67d33f1c2f2a230 |
Bit-aware Randomized Response for Local Differential Privacy in Federated Learning | 1 INTRODUCTION . Recent data privacy and security regulations ( GDPR , 2018 ; Regulation , 2018 ; Cybersecurity Law , 2016 ) pose major challenges in collecting and using personally sensitive data in different places for machine learning ( ML ) applications . Federated Learning ( FL ) ( McMahan et al. , 2017 ; Kairouz et al. , 2019 ) is a promising way to address these challenges , enabling clients to jointly train ML models by sharing and aggregating gradients computed from clients ’ local data through a coordinating server for model updates . However , recent attacks ( Zhu et al. , 2019 ; Y. et al. , 2021 ; Zhao et al. , 2020a ) have shown that clients ’ training samples , each of which includes an input x and a ground-truth label yx , can be extracted from the shared gradients . These attacks underscore the implicit privacy risk in FL . Our main goal is to provide a strong guarantee that the shared gradients protect the privacy of clients ’ local data without undue sacrifice in model utility . Local differential privacy ( LDP ) has emerged as a crucial component in various FL applications ( Yang et al. , 2019 ; Kairouz et al. , 2019 ) . To achieve our goal , we focus on preserving LDP in cross-device FL , i.e. , in which clients jointly train an FL model ( Kairouz et al. , 2019 ) . In cross-device FL , existing LDP-preserving approaches can be categorized into three lines : Clients ( 1 ) add noise into local gradients derived from their local training samples , e.g. , using Gaussian mechanism ( Abadi et al. , 2016 ) , to protect membership information at the training sample level with DP guarantees ( Zheng et al. , 2021 ; Dong et al. , 2019 ; Malekzadeh et al. , 2021 ; Geyer et al. , 2017 ; Huang et al. , 2020 ) , ( 2 ) add noise to local gradients using Randomized Response ( RR ) mechanisms to protect the values of the local gradients with LDP guarantees ( Sun et al. , 2021 ; Liu et al. , 2020 ; Zhao et al. , 2020b ; Wang et al. , 2019a ) , and ( 3 ) add noise into each training sample , e.g. , embedded features and labels , using RR mechanisms to protect the value of each training sample with LDP guarantees ( Arachchige et al. , 2019 ; Lyu et al. , 2020a ) , then the clients use LDP-preserved training samples to derive local gradients . For all three approaches , in each training round , clients send DP or LDP-preserved local gradients to the coordinating server for model updates , which will be sent back to the clients for the next training round . In this paper , we focus on protecting clients ’ training data at the value level with LDP guarantees . Existing RR mechanisms to preserve LDP in FL suffer from the curse of privacy composition , in which excessive privacy budgets are consumed proportionally to the large dimensions of input or embedded features ( Arachchige et al. , 2019 ) , gradients ( Zhao et al. , 2020b ; Wang et al. , 2019a ) , and training rounds ( Zhao et al. , 2020b ; Wang et al. , 2019a ) , causing loose privacy protection or inferior model accuracy ( Wagh et al. , 2021 ) . Addressing the curse of privacy composition is non-trivial . Existing approaches , such as anonymizers ( assumed to be trusted ) , i.e. , shuffler ( Erlingsson et al. , 2019 ; Sun et al. , 2021 ; L. et al. , 2020 ; Wang et al. , 2019b ; Cheu et al. , 2019 ; Balle et al. , 2019 ) or anonymity approaches ( e.g. , faking source IP , VPN , Proxy , etc . ( Sun et al. , 2021 ; Cormode et al. , 2018 ) ) , and dimension reduction ( Liu et al. , 2020 ; Zhao et al. , 2020b ; Shin et al. , 2018 ; Xu et al. , 2019 ) , mitigate the problem but also have limitations . In the real world , it is possible that the anonymizers can either be compromised or collude with the coordinating server to extract sensitive information from observing LDP-preserved local gradients ( Erlingsson et al. , 2019 ) . Meanwhile , applying RR mechanisms on reduced sets of embedded features or gradients using dimension reduction techniques can work well with lightweight models , such as logistic regression and SVM ( Liu et al. , 2020 ; Zhao et al. , 2020b ; Wang et al. , 2019a ) . However , it is challenging for these techniques to achieve good model utility under tight LDP guarantees given complex models and tasks , such as DNNs , since the dimensions of reduced embedded features , gradients , and training rounds still need to be sufficiently large ( Zhao et al. , 2020b ; Liu et al. , 2020 ) . Hence , the curse of privacy composition in preserving LDP by applying RR mechanisms in FL remains a largely open problem . Orthogonal to this , preserving LDP to protect ground-truth labels yx in FL has not been well-studied . Two known approaches for centralized training are 1 ) injecting Laplace noise into the labels ( Phan et al. , 2020 ) and 2 ) applying RR mechanisms on the labels to achieve DP at the label level ( Ghazi et al. , 2021 ) . However , centralized training in Ghazi et al . ( 2021 ) has not been designed for FL with LDP guarantees since they require centralized and trusted databases . The model utility in Phan et al . ( 2020 ) is notably affected by the number of model outcomes . Key Contributions . To mitigate the curse of privacy composition and optimize the trade-off between privacy and model utility , our paper is structured around the following contributions : 1 ) We propose BitRand , which is a combination of a novel bit-aware f -RR mechanism and label-RR mechanism , to preserve LDP at both levels of embedded features and labels in FL . In f -RR , we encode embedded features ( extracted from x ) into a binary-bit string , which will be adaptively randomized such that bits with a more substantial impact on model utility will have smaller randomization probabilities and vice-versa under the same privacy budget . To preserve LDP on yx , we develop a generalized randomization , in which the probability of randomizing label yx from one to another class is a function of the number of model outcomes C. By doing that , we can optimize the trade-off between model utility and privacy loss with significantly tighter expected error bounds . 2 ) By incorporating sensitivities of binary encoding bits into a generalized privacy loss bound , we show that increasing the dimensions of embedded features r , encoding bits l , and model outcomes C marginally affect the randomization probabilities in BitRand under the same privacy budget . This dimension-elastic property is crucial to evade the curse of privacy composition by retaining a high value of data transmitted correctly through our randomization given large dimensions of r , l , and C. 3 ) These bit-aware and dimension-elastic properties allow us to work with complex models and tasks with formal LDP guarantees for training samples ( x , yx ) while retaining high model utility . Extensive theoretical analysis and experimental results conducted on fundamental FL tasks , i.e. , text and image classification , using benchmark datasets and our collected Security and Exchange Commission financial contract dataset show that our BitRand significantly outperforms a variety of baseline approaches in terms of model utility under the same privacy budget . 2 BACKGROUND . LDP-preserving mechanisms ( Erlingsson et al. , 2014 ; Duchi et al. , 2018 ; Wang et al. , 2017 ; Acharya et al. , 2019 ; Bassily & Smith , 2015 ) generally build on the ideas of randomized response ( Warner , 1965 ) , which was initially introduced to allow survey respondents to provide their correct inputs while maintaining their confidentiality . -LDP is presented as follows : Definition 1 . -LDP . A randomized algorithmM fulfills -LDP , if for any two inputs x and x′ , and for all possible outputs O ∈ Range ( M ) , we have : Pr [ M ( x ) = O ] ≤ e Pr [ M ( x′ ) = O ] , where is a privacy budget and Range ( M ) denotes every possible output of the algorithmM . The privacy budget controls the amount by which the distributions induced by inputs x and x′ may differ . A smaller enforces a stronger privacy guarantee . We revisit RR mechanisms for LDP preservation in Appendix A . Our approach is a binary encoding-based approach , similar to ( Arachchige et al. , 2019 ; Lyu et al. , 2020a ) , since it has the potential to overcome the curse of privacy composition . In binary encoding , x is converted into an l-bit vector v consisting of 1 sign bit , m bits for the integer part , and l−m−1 bits for the fraction part ( Figure 1 ) , as follows : ∀i ∈ [ 0 , l − 1 ] : vi = b2i−m|x|c mod 2 ( 1 ) Each bit in v is randomized by applying a RR mechanism , e.g. , ( Erlingsson et al. , 2014 ; Bassily & Smith , 2015 ; Wang et al. , 2017 ) , to generate a perturbed l-bit vector v′ , which preserves LDP . However , in our theoretical reassessment ( Appendices I and J ) , directly applying RR mechanisms on binary encoded vectors as in existing mechanisms , i.e. , LATENT ( Arachchige et al. , 2019 ) and OME ( Lyu et al. , 2020a ) , consumes huge privacy budgets since each binary encoding bit can not be treated as a bit in a hash . Each binary encoding bit i has a different sensitivity , i.e. , ∆i = 2m−i for the integer and fraction parts or ∆i = 2m+1 for the sign bit ( Lemma 1 ) , compared with a bit Bi in a hash , i.e. , ∀Bi : ∆Bi = 1 . Our mechanism does not suffer from this problem , thanks to our bit-aware randomization in binary encoding ( Theorem 2 ) . 3 BITRAND ALGORITHM . Let us now present our FL setting , threat model , and BitRand algorithm ( Figure 2 and Alg . 1 , Appendix B ) , and privacy guarantees . Then , we will show that our algorithm is dimension-elastic and the ability to opti- mize the randomization probabilities with expected error bounds in our theoretical analysis . Federated Learning Given N clients , each client u ∈ [ 1 , N ] has a set of training samples Du = { ( x , yx ) } nu where x ∈ Rd is the input features , and its associated ground-truth label yx ∈ ZC is one-hot encoded with C categorical model outcomes { yx,1 , . . . , yx , C } , and nu is the number of training samples . In a pre-processing step , each client u extracts r numerical embedded features from x , denoted ex , by using a pre-trained model fpre . In practice , fpre could be trained on large-scale and publicly available datasets without introducing any extra privacy cost to the clients ’ local data ( He et al. , 2016 ; Devlin et al. , 2018 ) . N clients jointly train the model fθ : Rr → RC by minimizing a loss function L ( fθ ( ex ) , yx ) on their local training samples in Du that penalizes mismatching between the prediction fθ ( ex ) and the ground-truth label yx , given the model ’ s parameters θ . In each training round t , each client u receives the most updated model parameters θt from the coordinating server and then computes local gradients5uθt = ∑ ( vx , yx ) ∈Du 5θtL ( f ( ex ) , yx ) /nu , which are sent to the coordinating server for aggregating and model updating : θt+1 = θt − ηt ∑ u∈ [ 1 , N ] 5uθt/N . Threat Model . The coordinating server strictly follows the training procedure but curious about the training data Du . This is a practical threat model in the real world since service providers always aim at providing the best services to the clients ( Haeberlen et al. , 2011 ; Truex et al. , 2019 ; Lyu et al. , 2020b ) . Given the observed gradients 5uθt , the coordinating server can extract the clients ’ data { ex , yx } nu by using recently developed attacks ( Carlini et al. , 2020 ; Fredrikson et al. , 2015 ) . In a defense-free environment , { ex , yx } nu can be used to infer the sensitive training data Du = { ( x , yx ) } nu using the pre-trained model fpre , since fpre ( x ) = ex ( Song & Raghunathan , 2020 ) . This poses a severe privacy risk to the sensitive data Du . BitRand Algorithm . To protect the sensitive training data Du against the threat model , in our algorithm , we preserve LDP on both embedded features ex and labels yx . Each of the r embedded features in ex is encoded into l binary bits following Eq . 1 . Binary encoded features are concatenated together into a vector vx consisting of rl binary bits to represent the embedded features ex ( Alg . 1 , line 16 ) . Each bit i ∈ [ 0 , rl − 1 ] in vx is randomized by our f -RR mechanism ( Alg . 1 , line 17 ) with a bit-aware term i % ll optimizing randomization probabilities : ( f -RR mechanism ) ∀i ∈ [ 0 , rl − 1 ] : P ( v′x ( i ) = 1 ) = pX = 1 1 + α exp ( i % l l X ) , if vx ( i ) = 1 qX = α exp ( i % l l X ) 1 + α exp ( i % l l X ) , if vx ( i ) = 0 ( 2 ) where vx ( i ) ∈ { 0 , 1 } is the value of vx at the bit i , v′x is the perturbed vector created by randomizing all the bits in vx , X is a privacy budget , and α is a parameter bounded in Theorem 2 . From Eq . 2 , we also have that P ( v′x ( i ) = 0 ) = 1− pX if vx ( i ) = 1 , and P ( v′x ( i ) = 0 ) = 1− qX if vx ( i ) = 0 . We use the bit-aware term i % ll to indicate the location of bit i , which is associated with the sensitivity of the bit at that location , in its l-bit binary encoded vector among rl concatenated binary bits . One of the key differences between our mechanism and existing works ( Sun et al. , 2021 ; Zhao et al. , 2020b ; Wang et al. , 2019a ; Liu et al. , 2020 ; Arachchige et al. , 2019 ; Lyu et al. , 2020a ) is the bit-aware randomization probabilities . By introducing the bit-aware term i % ll , we are able to : 1 ) Derive significantly tighter privacy loss and expected error bounds compared with existing approaches ( Sections 4 and 5 ) ; and 2 ) Adaptively control the randomization probabilities across bits , such that bits with a stronger influence on the model utility , e.g. , sign bits and integer bits , have smaller randomization probabilities qX , and vice-versa ( Section 5 ) . These advantages are crucial to evade the curse of privacy composition enabling us to work with complex tasks and models ( Section 6 ) . In addition , inspired by the LabelDP ( Ghazi et al. , 2021 ) , we randomize yx using the following label-RR mechanism ( Alg . 1 , line 18 ) : ( label-RR mechanism ) P ( y′x = ȳx ) = pY = exp ( β ) 1 + exp ( β ) , if ȳx = yx qY = 1 ( 1 + exp ( β ) ) ( C − 1 ) , if ȳx 6= yx , ȳx ∈ Z C ( 3 ) where ȳx is one-hot encoded , and β is a parameter bounded in Theorem 3 under a privacy budget Y . Randomizing the label yx provides a complete LDP protection to each local training sample ( ex , yx ) . All the perturbed training samples ( e′x , y ′ x ) are included in a local dataset D ′ u , which will be used to train the model fθ : Rr → RC , i.e. , e′x = E ( v′x ) where E ( · ) is a decoding function , ( Alg . 1 , lines 20-22 ) . The training will never access the original data Du . All other operations remain the same with our aforementioned FL setting . | The importance of rigorously taking care of privacy leakage in a DP algorithm on the bit level is well-know, see e.g. Mironov, Ilya. On significance of the least significant bits for differential privacy. In: Proceedings of the 2012 ACM conference on Computer and communications security. 2012. p. 650-661. This paper considers locally differentially private (LDP) mechanisms for binary representations of floating point numbers. The technique seems like a natural thing to do: the individual bits are flipped with a probability that scales with their importance. | SP:6debf1791907f13aecf04565586d6f845fdeffbd |
Bit-aware Randomized Response for Local Differential Privacy in Federated Learning | 1 INTRODUCTION . Recent data privacy and security regulations ( GDPR , 2018 ; Regulation , 2018 ; Cybersecurity Law , 2016 ) pose major challenges in collecting and using personally sensitive data in different places for machine learning ( ML ) applications . Federated Learning ( FL ) ( McMahan et al. , 2017 ; Kairouz et al. , 2019 ) is a promising way to address these challenges , enabling clients to jointly train ML models by sharing and aggregating gradients computed from clients ’ local data through a coordinating server for model updates . However , recent attacks ( Zhu et al. , 2019 ; Y. et al. , 2021 ; Zhao et al. , 2020a ) have shown that clients ’ training samples , each of which includes an input x and a ground-truth label yx , can be extracted from the shared gradients . These attacks underscore the implicit privacy risk in FL . Our main goal is to provide a strong guarantee that the shared gradients protect the privacy of clients ’ local data without undue sacrifice in model utility . Local differential privacy ( LDP ) has emerged as a crucial component in various FL applications ( Yang et al. , 2019 ; Kairouz et al. , 2019 ) . To achieve our goal , we focus on preserving LDP in cross-device FL , i.e. , in which clients jointly train an FL model ( Kairouz et al. , 2019 ) . In cross-device FL , existing LDP-preserving approaches can be categorized into three lines : Clients ( 1 ) add noise into local gradients derived from their local training samples , e.g. , using Gaussian mechanism ( Abadi et al. , 2016 ) , to protect membership information at the training sample level with DP guarantees ( Zheng et al. , 2021 ; Dong et al. , 2019 ; Malekzadeh et al. , 2021 ; Geyer et al. , 2017 ; Huang et al. , 2020 ) , ( 2 ) add noise to local gradients using Randomized Response ( RR ) mechanisms to protect the values of the local gradients with LDP guarantees ( Sun et al. , 2021 ; Liu et al. , 2020 ; Zhao et al. , 2020b ; Wang et al. , 2019a ) , and ( 3 ) add noise into each training sample , e.g. , embedded features and labels , using RR mechanisms to protect the value of each training sample with LDP guarantees ( Arachchige et al. , 2019 ; Lyu et al. , 2020a ) , then the clients use LDP-preserved training samples to derive local gradients . For all three approaches , in each training round , clients send DP or LDP-preserved local gradients to the coordinating server for model updates , which will be sent back to the clients for the next training round . In this paper , we focus on protecting clients ’ training data at the value level with LDP guarantees . Existing RR mechanisms to preserve LDP in FL suffer from the curse of privacy composition , in which excessive privacy budgets are consumed proportionally to the large dimensions of input or embedded features ( Arachchige et al. , 2019 ) , gradients ( Zhao et al. , 2020b ; Wang et al. , 2019a ) , and training rounds ( Zhao et al. , 2020b ; Wang et al. , 2019a ) , causing loose privacy protection or inferior model accuracy ( Wagh et al. , 2021 ) . Addressing the curse of privacy composition is non-trivial . Existing approaches , such as anonymizers ( assumed to be trusted ) , i.e. , shuffler ( Erlingsson et al. , 2019 ; Sun et al. , 2021 ; L. et al. , 2020 ; Wang et al. , 2019b ; Cheu et al. , 2019 ; Balle et al. , 2019 ) or anonymity approaches ( e.g. , faking source IP , VPN , Proxy , etc . ( Sun et al. , 2021 ; Cormode et al. , 2018 ) ) , and dimension reduction ( Liu et al. , 2020 ; Zhao et al. , 2020b ; Shin et al. , 2018 ; Xu et al. , 2019 ) , mitigate the problem but also have limitations . In the real world , it is possible that the anonymizers can either be compromised or collude with the coordinating server to extract sensitive information from observing LDP-preserved local gradients ( Erlingsson et al. , 2019 ) . Meanwhile , applying RR mechanisms on reduced sets of embedded features or gradients using dimension reduction techniques can work well with lightweight models , such as logistic regression and SVM ( Liu et al. , 2020 ; Zhao et al. , 2020b ; Wang et al. , 2019a ) . However , it is challenging for these techniques to achieve good model utility under tight LDP guarantees given complex models and tasks , such as DNNs , since the dimensions of reduced embedded features , gradients , and training rounds still need to be sufficiently large ( Zhao et al. , 2020b ; Liu et al. , 2020 ) . Hence , the curse of privacy composition in preserving LDP by applying RR mechanisms in FL remains a largely open problem . Orthogonal to this , preserving LDP to protect ground-truth labels yx in FL has not been well-studied . Two known approaches for centralized training are 1 ) injecting Laplace noise into the labels ( Phan et al. , 2020 ) and 2 ) applying RR mechanisms on the labels to achieve DP at the label level ( Ghazi et al. , 2021 ) . However , centralized training in Ghazi et al . ( 2021 ) has not been designed for FL with LDP guarantees since they require centralized and trusted databases . The model utility in Phan et al . ( 2020 ) is notably affected by the number of model outcomes . Key Contributions . To mitigate the curse of privacy composition and optimize the trade-off between privacy and model utility , our paper is structured around the following contributions : 1 ) We propose BitRand , which is a combination of a novel bit-aware f -RR mechanism and label-RR mechanism , to preserve LDP at both levels of embedded features and labels in FL . In f -RR , we encode embedded features ( extracted from x ) into a binary-bit string , which will be adaptively randomized such that bits with a more substantial impact on model utility will have smaller randomization probabilities and vice-versa under the same privacy budget . To preserve LDP on yx , we develop a generalized randomization , in which the probability of randomizing label yx from one to another class is a function of the number of model outcomes C. By doing that , we can optimize the trade-off between model utility and privacy loss with significantly tighter expected error bounds . 2 ) By incorporating sensitivities of binary encoding bits into a generalized privacy loss bound , we show that increasing the dimensions of embedded features r , encoding bits l , and model outcomes C marginally affect the randomization probabilities in BitRand under the same privacy budget . This dimension-elastic property is crucial to evade the curse of privacy composition by retaining a high value of data transmitted correctly through our randomization given large dimensions of r , l , and C. 3 ) These bit-aware and dimension-elastic properties allow us to work with complex models and tasks with formal LDP guarantees for training samples ( x , yx ) while retaining high model utility . Extensive theoretical analysis and experimental results conducted on fundamental FL tasks , i.e. , text and image classification , using benchmark datasets and our collected Security and Exchange Commission financial contract dataset show that our BitRand significantly outperforms a variety of baseline approaches in terms of model utility under the same privacy budget . 2 BACKGROUND . LDP-preserving mechanisms ( Erlingsson et al. , 2014 ; Duchi et al. , 2018 ; Wang et al. , 2017 ; Acharya et al. , 2019 ; Bassily & Smith , 2015 ) generally build on the ideas of randomized response ( Warner , 1965 ) , which was initially introduced to allow survey respondents to provide their correct inputs while maintaining their confidentiality . -LDP is presented as follows : Definition 1 . -LDP . A randomized algorithmM fulfills -LDP , if for any two inputs x and x′ , and for all possible outputs O ∈ Range ( M ) , we have : Pr [ M ( x ) = O ] ≤ e Pr [ M ( x′ ) = O ] , where is a privacy budget and Range ( M ) denotes every possible output of the algorithmM . The privacy budget controls the amount by which the distributions induced by inputs x and x′ may differ . A smaller enforces a stronger privacy guarantee . We revisit RR mechanisms for LDP preservation in Appendix A . Our approach is a binary encoding-based approach , similar to ( Arachchige et al. , 2019 ; Lyu et al. , 2020a ) , since it has the potential to overcome the curse of privacy composition . In binary encoding , x is converted into an l-bit vector v consisting of 1 sign bit , m bits for the integer part , and l−m−1 bits for the fraction part ( Figure 1 ) , as follows : ∀i ∈ [ 0 , l − 1 ] : vi = b2i−m|x|c mod 2 ( 1 ) Each bit in v is randomized by applying a RR mechanism , e.g. , ( Erlingsson et al. , 2014 ; Bassily & Smith , 2015 ; Wang et al. , 2017 ) , to generate a perturbed l-bit vector v′ , which preserves LDP . However , in our theoretical reassessment ( Appendices I and J ) , directly applying RR mechanisms on binary encoded vectors as in existing mechanisms , i.e. , LATENT ( Arachchige et al. , 2019 ) and OME ( Lyu et al. , 2020a ) , consumes huge privacy budgets since each binary encoding bit can not be treated as a bit in a hash . Each binary encoding bit i has a different sensitivity , i.e. , ∆i = 2m−i for the integer and fraction parts or ∆i = 2m+1 for the sign bit ( Lemma 1 ) , compared with a bit Bi in a hash , i.e. , ∀Bi : ∆Bi = 1 . Our mechanism does not suffer from this problem , thanks to our bit-aware randomization in binary encoding ( Theorem 2 ) . 3 BITRAND ALGORITHM . Let us now present our FL setting , threat model , and BitRand algorithm ( Figure 2 and Alg . 1 , Appendix B ) , and privacy guarantees . Then , we will show that our algorithm is dimension-elastic and the ability to opti- mize the randomization probabilities with expected error bounds in our theoretical analysis . Federated Learning Given N clients , each client u ∈ [ 1 , N ] has a set of training samples Du = { ( x , yx ) } nu where x ∈ Rd is the input features , and its associated ground-truth label yx ∈ ZC is one-hot encoded with C categorical model outcomes { yx,1 , . . . , yx , C } , and nu is the number of training samples . In a pre-processing step , each client u extracts r numerical embedded features from x , denoted ex , by using a pre-trained model fpre . In practice , fpre could be trained on large-scale and publicly available datasets without introducing any extra privacy cost to the clients ’ local data ( He et al. , 2016 ; Devlin et al. , 2018 ) . N clients jointly train the model fθ : Rr → RC by minimizing a loss function L ( fθ ( ex ) , yx ) on their local training samples in Du that penalizes mismatching between the prediction fθ ( ex ) and the ground-truth label yx , given the model ’ s parameters θ . In each training round t , each client u receives the most updated model parameters θt from the coordinating server and then computes local gradients5uθt = ∑ ( vx , yx ) ∈Du 5θtL ( f ( ex ) , yx ) /nu , which are sent to the coordinating server for aggregating and model updating : θt+1 = θt − ηt ∑ u∈ [ 1 , N ] 5uθt/N . Threat Model . The coordinating server strictly follows the training procedure but curious about the training data Du . This is a practical threat model in the real world since service providers always aim at providing the best services to the clients ( Haeberlen et al. , 2011 ; Truex et al. , 2019 ; Lyu et al. , 2020b ) . Given the observed gradients 5uθt , the coordinating server can extract the clients ’ data { ex , yx } nu by using recently developed attacks ( Carlini et al. , 2020 ; Fredrikson et al. , 2015 ) . In a defense-free environment , { ex , yx } nu can be used to infer the sensitive training data Du = { ( x , yx ) } nu using the pre-trained model fpre , since fpre ( x ) = ex ( Song & Raghunathan , 2020 ) . This poses a severe privacy risk to the sensitive data Du . BitRand Algorithm . To protect the sensitive training data Du against the threat model , in our algorithm , we preserve LDP on both embedded features ex and labels yx . Each of the r embedded features in ex is encoded into l binary bits following Eq . 1 . Binary encoded features are concatenated together into a vector vx consisting of rl binary bits to represent the embedded features ex ( Alg . 1 , line 16 ) . Each bit i ∈ [ 0 , rl − 1 ] in vx is randomized by our f -RR mechanism ( Alg . 1 , line 17 ) with a bit-aware term i % ll optimizing randomization probabilities : ( f -RR mechanism ) ∀i ∈ [ 0 , rl − 1 ] : P ( v′x ( i ) = 1 ) = pX = 1 1 + α exp ( i % l l X ) , if vx ( i ) = 1 qX = α exp ( i % l l X ) 1 + α exp ( i % l l X ) , if vx ( i ) = 0 ( 2 ) where vx ( i ) ∈ { 0 , 1 } is the value of vx at the bit i , v′x is the perturbed vector created by randomizing all the bits in vx , X is a privacy budget , and α is a parameter bounded in Theorem 2 . From Eq . 2 , we also have that P ( v′x ( i ) = 0 ) = 1− pX if vx ( i ) = 1 , and P ( v′x ( i ) = 0 ) = 1− qX if vx ( i ) = 0 . We use the bit-aware term i % ll to indicate the location of bit i , which is associated with the sensitivity of the bit at that location , in its l-bit binary encoded vector among rl concatenated binary bits . One of the key differences between our mechanism and existing works ( Sun et al. , 2021 ; Zhao et al. , 2020b ; Wang et al. , 2019a ; Liu et al. , 2020 ; Arachchige et al. , 2019 ; Lyu et al. , 2020a ) is the bit-aware randomization probabilities . By introducing the bit-aware term i % ll , we are able to : 1 ) Derive significantly tighter privacy loss and expected error bounds compared with existing approaches ( Sections 4 and 5 ) ; and 2 ) Adaptively control the randomization probabilities across bits , such that bits with a stronger influence on the model utility , e.g. , sign bits and integer bits , have smaller randomization probabilities qX , and vice-versa ( Section 5 ) . These advantages are crucial to evade the curse of privacy composition enabling us to work with complex tasks and models ( Section 6 ) . In addition , inspired by the LabelDP ( Ghazi et al. , 2021 ) , we randomize yx using the following label-RR mechanism ( Alg . 1 , line 18 ) : ( label-RR mechanism ) P ( y′x = ȳx ) = pY = exp ( β ) 1 + exp ( β ) , if ȳx = yx qY = 1 ( 1 + exp ( β ) ) ( C − 1 ) , if ȳx 6= yx , ȳx ∈ Z C ( 3 ) where ȳx is one-hot encoded , and β is a parameter bounded in Theorem 3 under a privacy budget Y . Randomizing the label yx provides a complete LDP protection to each local training sample ( ex , yx ) . All the perturbed training samples ( e′x , y ′ x ) are included in a local dataset D ′ u , which will be used to train the model fθ : Rr → RC , i.e. , e′x = E ( v′x ) where E ( · ) is a decoding function , ( Alg . 1 , lines 20-22 ) . The training will never access the original data Du . All other operations remain the same with our aforementioned FL setting . | The paper proposes a randomized-response algorithm that takes into the bit indices and prioritises higher order bits. As a result, the utility is higher than other competitive algorithms. Additionally, the analysis allows the bit randomization probabilities not to be affected too much by the dimension of the data. | SP:6debf1791907f13aecf04565586d6f845fdeffbd |
Bit-aware Randomized Response for Local Differential Privacy in Federated Learning | 1 INTRODUCTION . Recent data privacy and security regulations ( GDPR , 2018 ; Regulation , 2018 ; Cybersecurity Law , 2016 ) pose major challenges in collecting and using personally sensitive data in different places for machine learning ( ML ) applications . Federated Learning ( FL ) ( McMahan et al. , 2017 ; Kairouz et al. , 2019 ) is a promising way to address these challenges , enabling clients to jointly train ML models by sharing and aggregating gradients computed from clients ’ local data through a coordinating server for model updates . However , recent attacks ( Zhu et al. , 2019 ; Y. et al. , 2021 ; Zhao et al. , 2020a ) have shown that clients ’ training samples , each of which includes an input x and a ground-truth label yx , can be extracted from the shared gradients . These attacks underscore the implicit privacy risk in FL . Our main goal is to provide a strong guarantee that the shared gradients protect the privacy of clients ’ local data without undue sacrifice in model utility . Local differential privacy ( LDP ) has emerged as a crucial component in various FL applications ( Yang et al. , 2019 ; Kairouz et al. , 2019 ) . To achieve our goal , we focus on preserving LDP in cross-device FL , i.e. , in which clients jointly train an FL model ( Kairouz et al. , 2019 ) . In cross-device FL , existing LDP-preserving approaches can be categorized into three lines : Clients ( 1 ) add noise into local gradients derived from their local training samples , e.g. , using Gaussian mechanism ( Abadi et al. , 2016 ) , to protect membership information at the training sample level with DP guarantees ( Zheng et al. , 2021 ; Dong et al. , 2019 ; Malekzadeh et al. , 2021 ; Geyer et al. , 2017 ; Huang et al. , 2020 ) , ( 2 ) add noise to local gradients using Randomized Response ( RR ) mechanisms to protect the values of the local gradients with LDP guarantees ( Sun et al. , 2021 ; Liu et al. , 2020 ; Zhao et al. , 2020b ; Wang et al. , 2019a ) , and ( 3 ) add noise into each training sample , e.g. , embedded features and labels , using RR mechanisms to protect the value of each training sample with LDP guarantees ( Arachchige et al. , 2019 ; Lyu et al. , 2020a ) , then the clients use LDP-preserved training samples to derive local gradients . For all three approaches , in each training round , clients send DP or LDP-preserved local gradients to the coordinating server for model updates , which will be sent back to the clients for the next training round . In this paper , we focus on protecting clients ’ training data at the value level with LDP guarantees . Existing RR mechanisms to preserve LDP in FL suffer from the curse of privacy composition , in which excessive privacy budgets are consumed proportionally to the large dimensions of input or embedded features ( Arachchige et al. , 2019 ) , gradients ( Zhao et al. , 2020b ; Wang et al. , 2019a ) , and training rounds ( Zhao et al. , 2020b ; Wang et al. , 2019a ) , causing loose privacy protection or inferior model accuracy ( Wagh et al. , 2021 ) . Addressing the curse of privacy composition is non-trivial . Existing approaches , such as anonymizers ( assumed to be trusted ) , i.e. , shuffler ( Erlingsson et al. , 2019 ; Sun et al. , 2021 ; L. et al. , 2020 ; Wang et al. , 2019b ; Cheu et al. , 2019 ; Balle et al. , 2019 ) or anonymity approaches ( e.g. , faking source IP , VPN , Proxy , etc . ( Sun et al. , 2021 ; Cormode et al. , 2018 ) ) , and dimension reduction ( Liu et al. , 2020 ; Zhao et al. , 2020b ; Shin et al. , 2018 ; Xu et al. , 2019 ) , mitigate the problem but also have limitations . In the real world , it is possible that the anonymizers can either be compromised or collude with the coordinating server to extract sensitive information from observing LDP-preserved local gradients ( Erlingsson et al. , 2019 ) . Meanwhile , applying RR mechanisms on reduced sets of embedded features or gradients using dimension reduction techniques can work well with lightweight models , such as logistic regression and SVM ( Liu et al. , 2020 ; Zhao et al. , 2020b ; Wang et al. , 2019a ) . However , it is challenging for these techniques to achieve good model utility under tight LDP guarantees given complex models and tasks , such as DNNs , since the dimensions of reduced embedded features , gradients , and training rounds still need to be sufficiently large ( Zhao et al. , 2020b ; Liu et al. , 2020 ) . Hence , the curse of privacy composition in preserving LDP by applying RR mechanisms in FL remains a largely open problem . Orthogonal to this , preserving LDP to protect ground-truth labels yx in FL has not been well-studied . Two known approaches for centralized training are 1 ) injecting Laplace noise into the labels ( Phan et al. , 2020 ) and 2 ) applying RR mechanisms on the labels to achieve DP at the label level ( Ghazi et al. , 2021 ) . However , centralized training in Ghazi et al . ( 2021 ) has not been designed for FL with LDP guarantees since they require centralized and trusted databases . The model utility in Phan et al . ( 2020 ) is notably affected by the number of model outcomes . Key Contributions . To mitigate the curse of privacy composition and optimize the trade-off between privacy and model utility , our paper is structured around the following contributions : 1 ) We propose BitRand , which is a combination of a novel bit-aware f -RR mechanism and label-RR mechanism , to preserve LDP at both levels of embedded features and labels in FL . In f -RR , we encode embedded features ( extracted from x ) into a binary-bit string , which will be adaptively randomized such that bits with a more substantial impact on model utility will have smaller randomization probabilities and vice-versa under the same privacy budget . To preserve LDP on yx , we develop a generalized randomization , in which the probability of randomizing label yx from one to another class is a function of the number of model outcomes C. By doing that , we can optimize the trade-off between model utility and privacy loss with significantly tighter expected error bounds . 2 ) By incorporating sensitivities of binary encoding bits into a generalized privacy loss bound , we show that increasing the dimensions of embedded features r , encoding bits l , and model outcomes C marginally affect the randomization probabilities in BitRand under the same privacy budget . This dimension-elastic property is crucial to evade the curse of privacy composition by retaining a high value of data transmitted correctly through our randomization given large dimensions of r , l , and C. 3 ) These bit-aware and dimension-elastic properties allow us to work with complex models and tasks with formal LDP guarantees for training samples ( x , yx ) while retaining high model utility . Extensive theoretical analysis and experimental results conducted on fundamental FL tasks , i.e. , text and image classification , using benchmark datasets and our collected Security and Exchange Commission financial contract dataset show that our BitRand significantly outperforms a variety of baseline approaches in terms of model utility under the same privacy budget . 2 BACKGROUND . LDP-preserving mechanisms ( Erlingsson et al. , 2014 ; Duchi et al. , 2018 ; Wang et al. , 2017 ; Acharya et al. , 2019 ; Bassily & Smith , 2015 ) generally build on the ideas of randomized response ( Warner , 1965 ) , which was initially introduced to allow survey respondents to provide their correct inputs while maintaining their confidentiality . -LDP is presented as follows : Definition 1 . -LDP . A randomized algorithmM fulfills -LDP , if for any two inputs x and x′ , and for all possible outputs O ∈ Range ( M ) , we have : Pr [ M ( x ) = O ] ≤ e Pr [ M ( x′ ) = O ] , where is a privacy budget and Range ( M ) denotes every possible output of the algorithmM . The privacy budget controls the amount by which the distributions induced by inputs x and x′ may differ . A smaller enforces a stronger privacy guarantee . We revisit RR mechanisms for LDP preservation in Appendix A . Our approach is a binary encoding-based approach , similar to ( Arachchige et al. , 2019 ; Lyu et al. , 2020a ) , since it has the potential to overcome the curse of privacy composition . In binary encoding , x is converted into an l-bit vector v consisting of 1 sign bit , m bits for the integer part , and l−m−1 bits for the fraction part ( Figure 1 ) , as follows : ∀i ∈ [ 0 , l − 1 ] : vi = b2i−m|x|c mod 2 ( 1 ) Each bit in v is randomized by applying a RR mechanism , e.g. , ( Erlingsson et al. , 2014 ; Bassily & Smith , 2015 ; Wang et al. , 2017 ) , to generate a perturbed l-bit vector v′ , which preserves LDP . However , in our theoretical reassessment ( Appendices I and J ) , directly applying RR mechanisms on binary encoded vectors as in existing mechanisms , i.e. , LATENT ( Arachchige et al. , 2019 ) and OME ( Lyu et al. , 2020a ) , consumes huge privacy budgets since each binary encoding bit can not be treated as a bit in a hash . Each binary encoding bit i has a different sensitivity , i.e. , ∆i = 2m−i for the integer and fraction parts or ∆i = 2m+1 for the sign bit ( Lemma 1 ) , compared with a bit Bi in a hash , i.e. , ∀Bi : ∆Bi = 1 . Our mechanism does not suffer from this problem , thanks to our bit-aware randomization in binary encoding ( Theorem 2 ) . 3 BITRAND ALGORITHM . Let us now present our FL setting , threat model , and BitRand algorithm ( Figure 2 and Alg . 1 , Appendix B ) , and privacy guarantees . Then , we will show that our algorithm is dimension-elastic and the ability to opti- mize the randomization probabilities with expected error bounds in our theoretical analysis . Federated Learning Given N clients , each client u ∈ [ 1 , N ] has a set of training samples Du = { ( x , yx ) } nu where x ∈ Rd is the input features , and its associated ground-truth label yx ∈ ZC is one-hot encoded with C categorical model outcomes { yx,1 , . . . , yx , C } , and nu is the number of training samples . In a pre-processing step , each client u extracts r numerical embedded features from x , denoted ex , by using a pre-trained model fpre . In practice , fpre could be trained on large-scale and publicly available datasets without introducing any extra privacy cost to the clients ’ local data ( He et al. , 2016 ; Devlin et al. , 2018 ) . N clients jointly train the model fθ : Rr → RC by minimizing a loss function L ( fθ ( ex ) , yx ) on their local training samples in Du that penalizes mismatching between the prediction fθ ( ex ) and the ground-truth label yx , given the model ’ s parameters θ . In each training round t , each client u receives the most updated model parameters θt from the coordinating server and then computes local gradients5uθt = ∑ ( vx , yx ) ∈Du 5θtL ( f ( ex ) , yx ) /nu , which are sent to the coordinating server for aggregating and model updating : θt+1 = θt − ηt ∑ u∈ [ 1 , N ] 5uθt/N . Threat Model . The coordinating server strictly follows the training procedure but curious about the training data Du . This is a practical threat model in the real world since service providers always aim at providing the best services to the clients ( Haeberlen et al. , 2011 ; Truex et al. , 2019 ; Lyu et al. , 2020b ) . Given the observed gradients 5uθt , the coordinating server can extract the clients ’ data { ex , yx } nu by using recently developed attacks ( Carlini et al. , 2020 ; Fredrikson et al. , 2015 ) . In a defense-free environment , { ex , yx } nu can be used to infer the sensitive training data Du = { ( x , yx ) } nu using the pre-trained model fpre , since fpre ( x ) = ex ( Song & Raghunathan , 2020 ) . This poses a severe privacy risk to the sensitive data Du . BitRand Algorithm . To protect the sensitive training data Du against the threat model , in our algorithm , we preserve LDP on both embedded features ex and labels yx . Each of the r embedded features in ex is encoded into l binary bits following Eq . 1 . Binary encoded features are concatenated together into a vector vx consisting of rl binary bits to represent the embedded features ex ( Alg . 1 , line 16 ) . Each bit i ∈ [ 0 , rl − 1 ] in vx is randomized by our f -RR mechanism ( Alg . 1 , line 17 ) with a bit-aware term i % ll optimizing randomization probabilities : ( f -RR mechanism ) ∀i ∈ [ 0 , rl − 1 ] : P ( v′x ( i ) = 1 ) = pX = 1 1 + α exp ( i % l l X ) , if vx ( i ) = 1 qX = α exp ( i % l l X ) 1 + α exp ( i % l l X ) , if vx ( i ) = 0 ( 2 ) where vx ( i ) ∈ { 0 , 1 } is the value of vx at the bit i , v′x is the perturbed vector created by randomizing all the bits in vx , X is a privacy budget , and α is a parameter bounded in Theorem 2 . From Eq . 2 , we also have that P ( v′x ( i ) = 0 ) = 1− pX if vx ( i ) = 1 , and P ( v′x ( i ) = 0 ) = 1− qX if vx ( i ) = 0 . We use the bit-aware term i % ll to indicate the location of bit i , which is associated with the sensitivity of the bit at that location , in its l-bit binary encoded vector among rl concatenated binary bits . One of the key differences between our mechanism and existing works ( Sun et al. , 2021 ; Zhao et al. , 2020b ; Wang et al. , 2019a ; Liu et al. , 2020 ; Arachchige et al. , 2019 ; Lyu et al. , 2020a ) is the bit-aware randomization probabilities . By introducing the bit-aware term i % ll , we are able to : 1 ) Derive significantly tighter privacy loss and expected error bounds compared with existing approaches ( Sections 4 and 5 ) ; and 2 ) Adaptively control the randomization probabilities across bits , such that bits with a stronger influence on the model utility , e.g. , sign bits and integer bits , have smaller randomization probabilities qX , and vice-versa ( Section 5 ) . These advantages are crucial to evade the curse of privacy composition enabling us to work with complex tasks and models ( Section 6 ) . In addition , inspired by the LabelDP ( Ghazi et al. , 2021 ) , we randomize yx using the following label-RR mechanism ( Alg . 1 , line 18 ) : ( label-RR mechanism ) P ( y′x = ȳx ) = pY = exp ( β ) 1 + exp ( β ) , if ȳx = yx qY = 1 ( 1 + exp ( β ) ) ( C − 1 ) , if ȳx 6= yx , ȳx ∈ Z C ( 3 ) where ȳx is one-hot encoded , and β is a parameter bounded in Theorem 3 under a privacy budget Y . Randomizing the label yx provides a complete LDP protection to each local training sample ( ex , yx ) . All the perturbed training samples ( e′x , y ′ x ) are included in a local dataset D ′ u , which will be used to train the model fθ : Rr → RC , i.e. , e′x = E ( v′x ) where E ( · ) is a decoding function , ( Alg . 1 , lines 20-22 ) . The training will never access the original data Du . All other operations remain the same with our aforementioned FL setting . | The paper proposes an $\epsilon$-LDP mechanism, termed $f$-RR, to privatize a real number. The mechanism first maps $v$ into its binary representation (with a sign bit) and then flips each bit with probability $p_i$. The authors then extend their mechanism to privatize a $r$-dimensional vector by sequentially performing the (scalar version) algorithm for each of the $r$ coordinates. By picking proper parameters, the proposed mechanism preserves $\epsilon$-LDP. Finally, several experimental results compared with other previous methods are provided. | SP:6debf1791907f13aecf04565586d6f845fdeffbd |
Data Scaling Laws in NMT: The Effect of Noise and Architecture | 1 INTRODUCTION . In deep learning , a reliable recipe to improve the generalization performance of a model is to increase the amount of compute and data used to train it ( Krizhevsky et al. , 2012 ; Brown et al. , 2020 ) . Many recent advances in deep learning are directed towards increasing the efficiency of digesting data through advancements in architecture ( Vaswani et al. , 2017 ) , improving the quality of the data with filtering , or incorporating entirely new sources of data into training ( Radford et al. , 2021 ; Chen et al. , 2020 ) . In this new paradigm of machine learning , it is crucial to understand the data-efficiency of our training methods , and whether improvements to them at small scale translate into improvements at large scale . Recent work ( Hestness et al. , 2017 ; Rosenfeld et al. , 2019 ; Kaplan et al. , 2020 ) on scaling laws offers a useful tool to answer such questions — they show that the test loss of a model scales predictably and smoothly as a power law in the relevant quantities of interest such as dataset size ( D ) , model size ( N ) and amount of compute ( C ) . We take these findings a step further and ask how different interventions to the training setup impact the data scaling curves in the setup of neural machine translation ( NMT ) : How do changes to the training setup ( such as architecture , noise ) impact the data scaling curves in NMT ? Practically , data scaling laws can be leveraged to make experimental decisions for future large scale experiments , and to decide where computational and research efforts should be focused . Currently , NMT models are trained using massive web-scale data ; Arivazhagan et al . ( 2019 ) used 25B training examples ( approx.1T tokens ) and with the advent of the self-supervised learning techniques ( Liu et al. , 2020 ; Raffel et al. , 2020 ; Siddhant et al. , 2020 ) this number can easily reach 10+T tokens . At such large scales of data , it is unfeasible to ‘ just perform the experiment ’ , and scaling laws can be used to drive training decisions . For instance , if small changes in architecture do not lead to a change in scaling exponent ( as shown in Figure 1B ) , then architecture choice can be driven by other factors such as computational efficiency by paying a small penalty in the form of more data . In the opposite scenario , if a training setup performs worse at a given dataset size but scales much better , it should be chosen for future larger scale experiments . 1.1 OUR CONTRIBUTIONS . In this work , we first establish that the test log-perplexity of encoder-decoder transformer models trained to perform neural machine translation ( NMT ) follows a power law in the dataset size , with a dependence on the model size ( Figure 1A ) . We demonstrate that our scaling law predicts experimental results over 3 orders of magnitude ( from 500K-512M ) training examples ( sentence pairs in NMT ) 1 . Then , we systematically vary aspects of the training setup to understand how these impact the scaling laws . In particular , we consider the effect of ( 1 ) Changing architecture and task setup from a vanilla Transformer Encoder-Decoder to Transformer Enoder-LSTM Decoder Hybrid as well as a Decoder-only Transformer with language modeling objective ( 2 ) Changing the level of filtering in the dataset ( 3 ) Changing the amount of noise on the source ( input ) side and the target ( output ) side ( 4 ) Using backtranslated data . Surprisingly , we find that , with the exception of back-translation , these changes do not impact the scaling exponents much ( See Fig . 1 for example of changing model size , architecture and level of noise ) . Some of these changes affect the bias or the final loss value at infinite data . Our work suggests that many of the common operations used to boost performance , such as small changes to the architecture or data filtering , can be replaced by adding an additional constant factor of data . That is , in some cases , sub-optimalities in the architectures and noise in the datasets can both be considered as ( model and data ) scaling penalties . 1.2 EXPERIMENTAL SETUP . Models : Our experiments are conducted on pre-layer transformer networks ( Xiong et al. , 2020 ) . Models are trained with per-token cross-entropy loss and Adafactor optimizer ( Shazeer & Stern , 2018 ) . All models are trained with a fixed batch-size of 500K tokens and dropout rate of 0.1 for residuals , feed-forward activations and attention . For the small dataset sizes , the models are trained to early stopping ( as measured on the log-perplexity of a held-out development set ) and for large dataset sizes they are trained for up to 500K gradient steps . The hyperparameters for these models were optimized for a 6 encoder layer and 6 decoder layer model trained on 2.2 billion sentence pairs . We train 5 different model sizes { 2L6L , 6L2L , 6L6L , 6L28L , 28L6L } , where 28L6L means 28 encoder layers and 6 decoder layers . We also train two decoder-only models with a language modeling loss with { 9L , 13L } , and three Hybrid-LSTM model with { 6L2L , 6L6L , 6L12L } . All the hyperparameters are matched as closely as possible between these models to provide an apples-to-apples comparison . 1Corresponding to 27.6 billion tokens . Training data In our experiments , the models are trained on two large scale datasets . The first set of experiments on data size scaling are using the dataset sampled from an in-house parallel corpora containing up to 2.2B sentences translated from English to German . We sample training datasets of sizes { 1M , 2M , 4M , 8M , 16M , 32M , 64M , 128M , 256M , 512M } independently to study the data scaling laws . The second set of experiments are conducted with Paracrawl dataset ( Bañón et al. , 2020 ) and with and without filtering applied . The details are described in Section 4 . Test data The model performance is measured on a held-out dataset from the training distribution . Additionally , we also measure performance on various out-of-distribution test datasets . These test datasets have different domain composition and sampling methods . The domains considered are ( i ) Web-Domain ( ii ) News-Domain ( iii ) Wikipedia and ( iv ) Patents . The news-domain test sets come from the WMT2019 evaluation campaign ( newstest2019 ) for all language pairs . The other test sets are internal test sets representing the different domains , ranging from 500 to 5000 sentence pairs for each set . 2 DATA SCALING LAWS . We begin our investigation by training a series of large scale encoder-decoder transformer models on the in-house English to German parallel corpus , with the parameters ranging from 170M to 800M . Our dataset sizes range from 500K to 512M sentence pairs , covers 28B tokens , which is 10 times larger than the experiments conducted in prior work on scaling laws for NMT Gordon et al . ( 2021 ) . Our goal is to find a function in the relevant variables that predicts test performance of our experiments . We will mainly focus on the test log-perplexity on a heldout dataset from the training distribution , but we will also discuss scaling of BLEU scores ( Section 2.1 ) and performance on other out-of-distribution test sets ( Section 2.2 ) in later sections . Form of the scaling law : The chosen scaling law must exhibit decreasing loss with dataset size D , and at infinite data D =∞ , the model must converge to a finite constant . Additionally , Kaplan et al . ( 2020 ) ; Bahri et al . ( 2021 ) , conjecture that when D → ∞ , the models are in a “ variance-limited ” regime and the loss should scale as O ( 1/D ) . These desiderata are satisfied by the following scaling law for a fixed model size : L = α ( D0 D + C ) p ( 1 ) where α is a multiplicative constant , p is the scaling exponent and C is a model-dependent constant that are fitted empirically ( D0 = 1e6 is a fixed normalization constant use for numerical stability ) . We find that this scaling law indeed provides a good fit for the experimental observations . Moreover , when we fit just the last few datapoints ( See Figure 5 ) , we find that the loss scales as O ( 1/D ) , thus confirming the conjecture even for large-scale supervised learning setup . Now as we change the model size ( depth , width , or depth-width aspect ratio etc ) , it is not apriori obvious if these different models , say encoder-heavy vs. decoder-heavy models , should have the same data scaling parameters α , p. For instance , Ghorbani et al . ( 2021 ) observe that parameter scaling for encoder-decoder models depends separately on the number of encoder and number of decoder models . Thus , we train 5 different models { 2L6L , 6L2L , 6L6L , 28L6L , 6L28L } including very asymmetric ones and find that their scaling parameters α , p are in fact very similar ( See Appendix A.1 for individual fits for Equation 1 to each model ) . Additionally , the constant C must depend on the model size , since at infinite data D = ∞ different models will converge to different loss values αCp , with larger models converging to lower loss values . Figure 1A shows the fit for a common α , p and 5 different { Ci } 5i=1 for each different model . We find that a common exponent is sufficient to provide a good fit for the experimental data . We can go a step further and replace the constant C such that it recovers the parameter scaling curve at D =∞ . To do so , we leverage the parameter scaling law found by Ghorbani et al . ( 2021 ) and fit the following final scaling law : L ( D , Ne , Nd ) = α ( D0 D + β ( 1 Npee 1 Npdd + L∞ ) 1/p ) p ( 2 ) The only free parameters in this equation are α and p , and the parameters in the right term ( β , Ne , Nd , L∞ ) are directly borrowed from Ghorbani et al . ( 2021 ) , such that they converge to the parameter scaling law at D = ∞ . The fit using this scaling law is shown in Figure 2A . Since we have a joint scaling law with dataset size and parameters , we can use this to predict the test loss of models that were not used to fit the scaling law . For example , in Figure 2A we find α , p for all models while holding out the model with 6L28L and later we are able to predict the performance of this out-of-sample model . Note that this scaling law differs from Gordon et al . ( 2021 ) in two ways ( 1 ) Using the encoder and decoder parameters separately vs. using the total number of parameters ( 2 ) An additional L∞ term2 that remains even when the Ne , Nd , D =∞ . Implications : Equation 1 suggests that there exists two operating regimes for data scaling : ( i ) datalimited regime where D0D C , and ( ii ) capacity limited regime where D0 D C. Fitted exponents in Figure 1 suggest that , in the data limited regime , loss scales as O ( D−1/4 ) , suggesting a marginal value of O ( D−5/4 ) for additional data . Increasing the model capacity in this regime has negligible impact on the loss . In the capacity limited regime however , the loss scales as O ( D−1 ) suggesting a ( significantly smaller ) marginal value of O ( D−2 ) for additional data . In this regime , the loss value is dominated by the model-dependent constant C and most of the improvement can be had by increasing the model size . There is a smooth phase transition between these two regimes at approximately CDD0 = 1 ( See Appendix C for an illustration ) . Thus , by increasing the model size ( which reduces C ) , one can push the transition to larger values of D and leverage the available data more efficiently . | The paper studies data scaling laws for NMT. Specifically, it investigates the following factors empirically: - model architecture - model sizes (different numbers of encoder or decoder layers) - data filtering - different types of manually-added noises. The paper has performed a large number of studies to demonstrate some empirically-useful findings for training the NMT models. | SP:4283e66992efaa8b02d4670556cb306310d5915e |
Data Scaling Laws in NMT: The Effect of Noise and Architecture | 1 INTRODUCTION . In deep learning , a reliable recipe to improve the generalization performance of a model is to increase the amount of compute and data used to train it ( Krizhevsky et al. , 2012 ; Brown et al. , 2020 ) . Many recent advances in deep learning are directed towards increasing the efficiency of digesting data through advancements in architecture ( Vaswani et al. , 2017 ) , improving the quality of the data with filtering , or incorporating entirely new sources of data into training ( Radford et al. , 2021 ; Chen et al. , 2020 ) . In this new paradigm of machine learning , it is crucial to understand the data-efficiency of our training methods , and whether improvements to them at small scale translate into improvements at large scale . Recent work ( Hestness et al. , 2017 ; Rosenfeld et al. , 2019 ; Kaplan et al. , 2020 ) on scaling laws offers a useful tool to answer such questions — they show that the test loss of a model scales predictably and smoothly as a power law in the relevant quantities of interest such as dataset size ( D ) , model size ( N ) and amount of compute ( C ) . We take these findings a step further and ask how different interventions to the training setup impact the data scaling curves in the setup of neural machine translation ( NMT ) : How do changes to the training setup ( such as architecture , noise ) impact the data scaling curves in NMT ? Practically , data scaling laws can be leveraged to make experimental decisions for future large scale experiments , and to decide where computational and research efforts should be focused . Currently , NMT models are trained using massive web-scale data ; Arivazhagan et al . ( 2019 ) used 25B training examples ( approx.1T tokens ) and with the advent of the self-supervised learning techniques ( Liu et al. , 2020 ; Raffel et al. , 2020 ; Siddhant et al. , 2020 ) this number can easily reach 10+T tokens . At such large scales of data , it is unfeasible to ‘ just perform the experiment ’ , and scaling laws can be used to drive training decisions . For instance , if small changes in architecture do not lead to a change in scaling exponent ( as shown in Figure 1B ) , then architecture choice can be driven by other factors such as computational efficiency by paying a small penalty in the form of more data . In the opposite scenario , if a training setup performs worse at a given dataset size but scales much better , it should be chosen for future larger scale experiments . 1.1 OUR CONTRIBUTIONS . In this work , we first establish that the test log-perplexity of encoder-decoder transformer models trained to perform neural machine translation ( NMT ) follows a power law in the dataset size , with a dependence on the model size ( Figure 1A ) . We demonstrate that our scaling law predicts experimental results over 3 orders of magnitude ( from 500K-512M ) training examples ( sentence pairs in NMT ) 1 . Then , we systematically vary aspects of the training setup to understand how these impact the scaling laws . In particular , we consider the effect of ( 1 ) Changing architecture and task setup from a vanilla Transformer Encoder-Decoder to Transformer Enoder-LSTM Decoder Hybrid as well as a Decoder-only Transformer with language modeling objective ( 2 ) Changing the level of filtering in the dataset ( 3 ) Changing the amount of noise on the source ( input ) side and the target ( output ) side ( 4 ) Using backtranslated data . Surprisingly , we find that , with the exception of back-translation , these changes do not impact the scaling exponents much ( See Fig . 1 for example of changing model size , architecture and level of noise ) . Some of these changes affect the bias or the final loss value at infinite data . Our work suggests that many of the common operations used to boost performance , such as small changes to the architecture or data filtering , can be replaced by adding an additional constant factor of data . That is , in some cases , sub-optimalities in the architectures and noise in the datasets can both be considered as ( model and data ) scaling penalties . 1.2 EXPERIMENTAL SETUP . Models : Our experiments are conducted on pre-layer transformer networks ( Xiong et al. , 2020 ) . Models are trained with per-token cross-entropy loss and Adafactor optimizer ( Shazeer & Stern , 2018 ) . All models are trained with a fixed batch-size of 500K tokens and dropout rate of 0.1 for residuals , feed-forward activations and attention . For the small dataset sizes , the models are trained to early stopping ( as measured on the log-perplexity of a held-out development set ) and for large dataset sizes they are trained for up to 500K gradient steps . The hyperparameters for these models were optimized for a 6 encoder layer and 6 decoder layer model trained on 2.2 billion sentence pairs . We train 5 different model sizes { 2L6L , 6L2L , 6L6L , 6L28L , 28L6L } , where 28L6L means 28 encoder layers and 6 decoder layers . We also train two decoder-only models with a language modeling loss with { 9L , 13L } , and three Hybrid-LSTM model with { 6L2L , 6L6L , 6L12L } . All the hyperparameters are matched as closely as possible between these models to provide an apples-to-apples comparison . 1Corresponding to 27.6 billion tokens . Training data In our experiments , the models are trained on two large scale datasets . The first set of experiments on data size scaling are using the dataset sampled from an in-house parallel corpora containing up to 2.2B sentences translated from English to German . We sample training datasets of sizes { 1M , 2M , 4M , 8M , 16M , 32M , 64M , 128M , 256M , 512M } independently to study the data scaling laws . The second set of experiments are conducted with Paracrawl dataset ( Bañón et al. , 2020 ) and with and without filtering applied . The details are described in Section 4 . Test data The model performance is measured on a held-out dataset from the training distribution . Additionally , we also measure performance on various out-of-distribution test datasets . These test datasets have different domain composition and sampling methods . The domains considered are ( i ) Web-Domain ( ii ) News-Domain ( iii ) Wikipedia and ( iv ) Patents . The news-domain test sets come from the WMT2019 evaluation campaign ( newstest2019 ) for all language pairs . The other test sets are internal test sets representing the different domains , ranging from 500 to 5000 sentence pairs for each set . 2 DATA SCALING LAWS . We begin our investigation by training a series of large scale encoder-decoder transformer models on the in-house English to German parallel corpus , with the parameters ranging from 170M to 800M . Our dataset sizes range from 500K to 512M sentence pairs , covers 28B tokens , which is 10 times larger than the experiments conducted in prior work on scaling laws for NMT Gordon et al . ( 2021 ) . Our goal is to find a function in the relevant variables that predicts test performance of our experiments . We will mainly focus on the test log-perplexity on a heldout dataset from the training distribution , but we will also discuss scaling of BLEU scores ( Section 2.1 ) and performance on other out-of-distribution test sets ( Section 2.2 ) in later sections . Form of the scaling law : The chosen scaling law must exhibit decreasing loss with dataset size D , and at infinite data D =∞ , the model must converge to a finite constant . Additionally , Kaplan et al . ( 2020 ) ; Bahri et al . ( 2021 ) , conjecture that when D → ∞ , the models are in a “ variance-limited ” regime and the loss should scale as O ( 1/D ) . These desiderata are satisfied by the following scaling law for a fixed model size : L = α ( D0 D + C ) p ( 1 ) where α is a multiplicative constant , p is the scaling exponent and C is a model-dependent constant that are fitted empirically ( D0 = 1e6 is a fixed normalization constant use for numerical stability ) . We find that this scaling law indeed provides a good fit for the experimental observations . Moreover , when we fit just the last few datapoints ( See Figure 5 ) , we find that the loss scales as O ( 1/D ) , thus confirming the conjecture even for large-scale supervised learning setup . Now as we change the model size ( depth , width , or depth-width aspect ratio etc ) , it is not apriori obvious if these different models , say encoder-heavy vs. decoder-heavy models , should have the same data scaling parameters α , p. For instance , Ghorbani et al . ( 2021 ) observe that parameter scaling for encoder-decoder models depends separately on the number of encoder and number of decoder models . Thus , we train 5 different models { 2L6L , 6L2L , 6L6L , 28L6L , 6L28L } including very asymmetric ones and find that their scaling parameters α , p are in fact very similar ( See Appendix A.1 for individual fits for Equation 1 to each model ) . Additionally , the constant C must depend on the model size , since at infinite data D = ∞ different models will converge to different loss values αCp , with larger models converging to lower loss values . Figure 1A shows the fit for a common α , p and 5 different { Ci } 5i=1 for each different model . We find that a common exponent is sufficient to provide a good fit for the experimental data . We can go a step further and replace the constant C such that it recovers the parameter scaling curve at D =∞ . To do so , we leverage the parameter scaling law found by Ghorbani et al . ( 2021 ) and fit the following final scaling law : L ( D , Ne , Nd ) = α ( D0 D + β ( 1 Npee 1 Npdd + L∞ ) 1/p ) p ( 2 ) The only free parameters in this equation are α and p , and the parameters in the right term ( β , Ne , Nd , L∞ ) are directly borrowed from Ghorbani et al . ( 2021 ) , such that they converge to the parameter scaling law at D = ∞ . The fit using this scaling law is shown in Figure 2A . Since we have a joint scaling law with dataset size and parameters , we can use this to predict the test loss of models that were not used to fit the scaling law . For example , in Figure 2A we find α , p for all models while holding out the model with 6L28L and later we are able to predict the performance of this out-of-sample model . Note that this scaling law differs from Gordon et al . ( 2021 ) in two ways ( 1 ) Using the encoder and decoder parameters separately vs. using the total number of parameters ( 2 ) An additional L∞ term2 that remains even when the Ne , Nd , D =∞ . Implications : Equation 1 suggests that there exists two operating regimes for data scaling : ( i ) datalimited regime where D0D C , and ( ii ) capacity limited regime where D0 D C. Fitted exponents in Figure 1 suggest that , in the data limited regime , loss scales as O ( D−1/4 ) , suggesting a marginal value of O ( D−5/4 ) for additional data . Increasing the model capacity in this regime has negligible impact on the loss . In the capacity limited regime however , the loss scales as O ( D−1 ) suggesting a ( significantly smaller ) marginal value of O ( D−2 ) for additional data . In this regime , the loss value is dominated by the model-dependent constant C and most of the improvement can be had by increasing the model size . There is a smooth phase transition between these two regimes at approximately CDD0 = 1 ( See Appendix C for an illustration ) . Thus , by increasing the model size ( which reduces C ) , one can push the transition to larger values of D and leverage the available data more efficiently . | The paper provides an empirical study of scaling laws for neural machine translation with respect to data noise (filtered/unfiltered/back-translation) and model architectures (transformer encoder-decoder, transformer decoder, transformer-encoder LSTM decoder). Focus on data aspect in scaling laws, the paper carried out a series of experiments on multiple data scales ranging from low-resource (500K sentence pairs) to large scale in industrial setup (512M sentence pairs) Scaling Laws: the paper shows that their scaling laws (in equation 1) can be fit five different architectures (2L6L, 6L2L, 6L6L, 28L6L, 6L28L) on in-domain testsets and 11 out-of-domain testsets using 6L6L models. The scaling laws also can be used to predict the test log-likelihood of an unseen model (Figure 2A). Architecture: Experimenting with two different encoder-decoder architectures, namely transformer encoder-decoder and transformer-encoder LSTM decoder, the paper shows that marginally worse architecture can be boosted up by adding more data. Data noise: Throughout a series of control experiments, the experiments show that data filtering can be replaced by adding more unfiltered data. The scaling laws can fit both independent noise and dependent noise (via back-translation) | SP:4283e66992efaa8b02d4670556cb306310d5915e |
Data Scaling Laws in NMT: The Effect of Noise and Architecture | 1 INTRODUCTION . In deep learning , a reliable recipe to improve the generalization performance of a model is to increase the amount of compute and data used to train it ( Krizhevsky et al. , 2012 ; Brown et al. , 2020 ) . Many recent advances in deep learning are directed towards increasing the efficiency of digesting data through advancements in architecture ( Vaswani et al. , 2017 ) , improving the quality of the data with filtering , or incorporating entirely new sources of data into training ( Radford et al. , 2021 ; Chen et al. , 2020 ) . In this new paradigm of machine learning , it is crucial to understand the data-efficiency of our training methods , and whether improvements to them at small scale translate into improvements at large scale . Recent work ( Hestness et al. , 2017 ; Rosenfeld et al. , 2019 ; Kaplan et al. , 2020 ) on scaling laws offers a useful tool to answer such questions — they show that the test loss of a model scales predictably and smoothly as a power law in the relevant quantities of interest such as dataset size ( D ) , model size ( N ) and amount of compute ( C ) . We take these findings a step further and ask how different interventions to the training setup impact the data scaling curves in the setup of neural machine translation ( NMT ) : How do changes to the training setup ( such as architecture , noise ) impact the data scaling curves in NMT ? Practically , data scaling laws can be leveraged to make experimental decisions for future large scale experiments , and to decide where computational and research efforts should be focused . Currently , NMT models are trained using massive web-scale data ; Arivazhagan et al . ( 2019 ) used 25B training examples ( approx.1T tokens ) and with the advent of the self-supervised learning techniques ( Liu et al. , 2020 ; Raffel et al. , 2020 ; Siddhant et al. , 2020 ) this number can easily reach 10+T tokens . At such large scales of data , it is unfeasible to ‘ just perform the experiment ’ , and scaling laws can be used to drive training decisions . For instance , if small changes in architecture do not lead to a change in scaling exponent ( as shown in Figure 1B ) , then architecture choice can be driven by other factors such as computational efficiency by paying a small penalty in the form of more data . In the opposite scenario , if a training setup performs worse at a given dataset size but scales much better , it should be chosen for future larger scale experiments . 1.1 OUR CONTRIBUTIONS . In this work , we first establish that the test log-perplexity of encoder-decoder transformer models trained to perform neural machine translation ( NMT ) follows a power law in the dataset size , with a dependence on the model size ( Figure 1A ) . We demonstrate that our scaling law predicts experimental results over 3 orders of magnitude ( from 500K-512M ) training examples ( sentence pairs in NMT ) 1 . Then , we systematically vary aspects of the training setup to understand how these impact the scaling laws . In particular , we consider the effect of ( 1 ) Changing architecture and task setup from a vanilla Transformer Encoder-Decoder to Transformer Enoder-LSTM Decoder Hybrid as well as a Decoder-only Transformer with language modeling objective ( 2 ) Changing the level of filtering in the dataset ( 3 ) Changing the amount of noise on the source ( input ) side and the target ( output ) side ( 4 ) Using backtranslated data . Surprisingly , we find that , with the exception of back-translation , these changes do not impact the scaling exponents much ( See Fig . 1 for example of changing model size , architecture and level of noise ) . Some of these changes affect the bias or the final loss value at infinite data . Our work suggests that many of the common operations used to boost performance , such as small changes to the architecture or data filtering , can be replaced by adding an additional constant factor of data . That is , in some cases , sub-optimalities in the architectures and noise in the datasets can both be considered as ( model and data ) scaling penalties . 1.2 EXPERIMENTAL SETUP . Models : Our experiments are conducted on pre-layer transformer networks ( Xiong et al. , 2020 ) . Models are trained with per-token cross-entropy loss and Adafactor optimizer ( Shazeer & Stern , 2018 ) . All models are trained with a fixed batch-size of 500K tokens and dropout rate of 0.1 for residuals , feed-forward activations and attention . For the small dataset sizes , the models are trained to early stopping ( as measured on the log-perplexity of a held-out development set ) and for large dataset sizes they are trained for up to 500K gradient steps . The hyperparameters for these models were optimized for a 6 encoder layer and 6 decoder layer model trained on 2.2 billion sentence pairs . We train 5 different model sizes { 2L6L , 6L2L , 6L6L , 6L28L , 28L6L } , where 28L6L means 28 encoder layers and 6 decoder layers . We also train two decoder-only models with a language modeling loss with { 9L , 13L } , and three Hybrid-LSTM model with { 6L2L , 6L6L , 6L12L } . All the hyperparameters are matched as closely as possible between these models to provide an apples-to-apples comparison . 1Corresponding to 27.6 billion tokens . Training data In our experiments , the models are trained on two large scale datasets . The first set of experiments on data size scaling are using the dataset sampled from an in-house parallel corpora containing up to 2.2B sentences translated from English to German . We sample training datasets of sizes { 1M , 2M , 4M , 8M , 16M , 32M , 64M , 128M , 256M , 512M } independently to study the data scaling laws . The second set of experiments are conducted with Paracrawl dataset ( Bañón et al. , 2020 ) and with and without filtering applied . The details are described in Section 4 . Test data The model performance is measured on a held-out dataset from the training distribution . Additionally , we also measure performance on various out-of-distribution test datasets . These test datasets have different domain composition and sampling methods . The domains considered are ( i ) Web-Domain ( ii ) News-Domain ( iii ) Wikipedia and ( iv ) Patents . The news-domain test sets come from the WMT2019 evaluation campaign ( newstest2019 ) for all language pairs . The other test sets are internal test sets representing the different domains , ranging from 500 to 5000 sentence pairs for each set . 2 DATA SCALING LAWS . We begin our investigation by training a series of large scale encoder-decoder transformer models on the in-house English to German parallel corpus , with the parameters ranging from 170M to 800M . Our dataset sizes range from 500K to 512M sentence pairs , covers 28B tokens , which is 10 times larger than the experiments conducted in prior work on scaling laws for NMT Gordon et al . ( 2021 ) . Our goal is to find a function in the relevant variables that predicts test performance of our experiments . We will mainly focus on the test log-perplexity on a heldout dataset from the training distribution , but we will also discuss scaling of BLEU scores ( Section 2.1 ) and performance on other out-of-distribution test sets ( Section 2.2 ) in later sections . Form of the scaling law : The chosen scaling law must exhibit decreasing loss with dataset size D , and at infinite data D =∞ , the model must converge to a finite constant . Additionally , Kaplan et al . ( 2020 ) ; Bahri et al . ( 2021 ) , conjecture that when D → ∞ , the models are in a “ variance-limited ” regime and the loss should scale as O ( 1/D ) . These desiderata are satisfied by the following scaling law for a fixed model size : L = α ( D0 D + C ) p ( 1 ) where α is a multiplicative constant , p is the scaling exponent and C is a model-dependent constant that are fitted empirically ( D0 = 1e6 is a fixed normalization constant use for numerical stability ) . We find that this scaling law indeed provides a good fit for the experimental observations . Moreover , when we fit just the last few datapoints ( See Figure 5 ) , we find that the loss scales as O ( 1/D ) , thus confirming the conjecture even for large-scale supervised learning setup . Now as we change the model size ( depth , width , or depth-width aspect ratio etc ) , it is not apriori obvious if these different models , say encoder-heavy vs. decoder-heavy models , should have the same data scaling parameters α , p. For instance , Ghorbani et al . ( 2021 ) observe that parameter scaling for encoder-decoder models depends separately on the number of encoder and number of decoder models . Thus , we train 5 different models { 2L6L , 6L2L , 6L6L , 28L6L , 6L28L } including very asymmetric ones and find that their scaling parameters α , p are in fact very similar ( See Appendix A.1 for individual fits for Equation 1 to each model ) . Additionally , the constant C must depend on the model size , since at infinite data D = ∞ different models will converge to different loss values αCp , with larger models converging to lower loss values . Figure 1A shows the fit for a common α , p and 5 different { Ci } 5i=1 for each different model . We find that a common exponent is sufficient to provide a good fit for the experimental data . We can go a step further and replace the constant C such that it recovers the parameter scaling curve at D =∞ . To do so , we leverage the parameter scaling law found by Ghorbani et al . ( 2021 ) and fit the following final scaling law : L ( D , Ne , Nd ) = α ( D0 D + β ( 1 Npee 1 Npdd + L∞ ) 1/p ) p ( 2 ) The only free parameters in this equation are α and p , and the parameters in the right term ( β , Ne , Nd , L∞ ) are directly borrowed from Ghorbani et al . ( 2021 ) , such that they converge to the parameter scaling law at D = ∞ . The fit using this scaling law is shown in Figure 2A . Since we have a joint scaling law with dataset size and parameters , we can use this to predict the test loss of models that were not used to fit the scaling law . For example , in Figure 2A we find α , p for all models while holding out the model with 6L28L and later we are able to predict the performance of this out-of-sample model . Note that this scaling law differs from Gordon et al . ( 2021 ) in two ways ( 1 ) Using the encoder and decoder parameters separately vs. using the total number of parameters ( 2 ) An additional L∞ term2 that remains even when the Ne , Nd , D =∞ . Implications : Equation 1 suggests that there exists two operating regimes for data scaling : ( i ) datalimited regime where D0D C , and ( ii ) capacity limited regime where D0 D C. Fitted exponents in Figure 1 suggest that , in the data limited regime , loss scales as O ( D−1/4 ) , suggesting a marginal value of O ( D−5/4 ) for additional data . Increasing the model capacity in this regime has negligible impact on the loss . In the capacity limited regime however , the loss scales as O ( D−1 ) suggesting a ( significantly smaller ) marginal value of O ( D−2 ) for additional data . In this regime , the loss value is dominated by the model-dependent constant C and most of the improvement can be had by increasing the model size . There is a smooth phase transition between these two regimes at approximately CDD0 = 1 ( See Appendix C for an illustration ) . Thus , by increasing the model size ( which reduces C ) , one can push the transition to larger values of D and leverage the available data more efficiently . | This paper verifies the scaling laws for neural machine translation models in terms of dataset size. In addition, with different model sizes, model architectures, and different noise level of the training data, the scaling law still holds. This means the effect of suboptimal model architectures and noisy data can be compensated with simply adding more data. | SP:4283e66992efaa8b02d4670556cb306310d5915e |
Sound Adversarial Audio-Visual Navigation | 1 INTRODUCTION . Audio-visual navigation , as currently a vital task for embodied vision ( Gordon et al. , 2018 ; Lohmann et al. , 2020 ; Nagarajan & Grauman , 2020 ) , requires the agent to find a sound target in a realistic and unmapped 3D environment by exploring with egocentric audio-visual observations ( Chen et al. , 2019 ; Gupta et al. , 2017 ; Chaplot et al. , 2020 ) . Inspired by the simultaneous usage of eyes and ears in human exploration ( Wilcox et al. , 2007 ; Flom & Bahrick , 2007 ) , audio-visual association benefits the learning of the agent ( Dean et al. , 2020 ) . A recent work Look , Listen , and Act ( LLA ) has proposed a three-step navigation solution of perception , inference , and decision-making ( Gan et al. , 2020 ) . SoundSpaces is the first work to establish an audio-visual embodied navigation simulation platform equipped with the proposed Audio-Visual embodied Navigation ( AVN ) baseline that resorts to reinforcement learning ( Chen et al. , 2020 ) . In response to the long-term exploration problem that is caused by the large layout of the 3D scene and the long distance to the target place , Audio-Visual Waypoint Navigation ( AV-WaN ) proposes an audio-visual navigation algorithm by setting waypoints as sub-goals to facilitate sound source discovering ( Chen et al. , 2021b ) . Besides , Semantic Audio-Visual navigation ( SAVi ) develops a navigation algorithm in a scene where the target sound is not periodic and has a variable length ; that is , it may stop during the navigation process ( Chen et al. , 2021a ) . Despite the fruitful progress in audio-visual navigation , existing works assume an acoustically simple or clean environment , meaning there is no other sound but the source itself . Nevertheless , this ∗Corresponding author : Fuchun Sun . assumption is hardly the case in real life . For example , a kettle in the kitchen beeps to tell the robot that the water is boiling , and the robot in the living room needs to navigate to the kitchen and turn off the stove ; while in the living room , two children are playing a game , chuckling loudly from time to time . Such an example poses a crucial challenge on current techniques : can an agent still find its way to the destination without being distracted by all non-target sounds around the agent ? Intuitively , the answer is no if the agent has not been trained in acoustically complex environments as in the example listed above . Although the answer is no , this ability is what we expect the agent to possess in real life . In light of these limitations , we propose first to construct such an acoustically complex environment . In this environment , we add a sound attacker to intervene . This sound attacker can move and change the volume and type of the sound at each time step . In particular , the objective of the sound attacker is to make the agent frustrated by creating a distraction . In contrast , the agent decides how to move at every time step , tries to dodge the sound attack , and explores for the sound target well under the sound attack , as illustrated in Fig . 1 . The competition between the attacker and the agent can be modeled as a zero-sum two-player game . Notably , this is not a fair game and is more biased towards the agent for two reasons . First , the sound attack is just single-modal and will not intervene in any visual information obtained by the agent . Second , as will be specified in our methodology , the sound volume of the attacker is bounded via a relative ratio ( less than 1 ) of the sound target . We anticipate constraining the attacker ’ s power and encouraging it to intervene but not defeat the agent with these two considerations . With such a design , we can improve the agent ’ s robustness between the agent and the sound attacker during the game . On the other hand , our environment is more demanding than reality since there are few attackers in our lives . Instead , most behaviors , such as someone walking and chatting past the robot , are not deliberately embarrassing the robot but just a distraction to the robot , exhibiting weaker intervention strength than our adversarial setting . Even so , our experiments reveal that an agent trained in a worst-case setting can perform promisingly when the environment is acoustically clean or contains a natural sound intervenor using a random policy . On the contrary , the agent trained in a clean environment becomes disabled in an acoustically complex environment . Our training algorithm is built upon the architecture by ( Chen et al. , 2020 ) , with a novel decisionmaking branch for the attacker . Training two agents separately ( Tampuu et al. , 2017 ) leads to divergence . Hence we propose a joint Actor-Critic ( AC ) training framework . We define the policies for the attacker based on three types of information : position , sound volume , and sound category . Exciting discoveries from experiments demonstrate that the joint training converges promisingly in contrast to the independent training counterpart . This work is the first audio-visual navigation method with a sound attacker to the best of our knowledge . To sum up , our contributions are as follows . • We construct a sound attacker to intervene environment for audio-visual navigation that aims to improve the agent ’ s robustness . In contrast to the environment used by prior experiments ( Chen et al. , 2020 ) , our setting better simulates the practical case in which there exist other moving intervenor sounds . • We develop a joint training paradigm for the agent and the attacker . Moreover , we have justified the effectiveness of this paradigm , both theoretically and empirically . • Experiments on two real-world 3D scenes , Replica ( Straub et al. , 2019 ) and Matterport3D ( Chang et al. , 2017 ) validate the effectiveness and robustness of the agent trained under our designed environment when transferred to various cases , including the clean environment and the one that contains sound attacker with random policy . 2 RELATED WORK . We introduce the research related to our work , including audio-visual navigation , adversarial training in RL , and multi-agent learning . Audio-visual embodied navigation . This task demands a robot equipped with a camera and a microphone to interact with the environment and navigate to the source sound . Existing algorithms towards this task can be divided into two categories according to whether topological maps are constructed or not . For the first category ( Gan et al. , 2020 ; Chen et al. , 2021b ) , LLA ( Gan et al. , 2020 ) plans the robot ’ s navigation strategy based on graph-based shortest path planning . Following LLA , AV-WaN ( Chen et al. , 2021b ) combines dynamically setting waypoints with the shortest path algorithm to solve the long-period audio-visual navigation problem . The second category of methods works in the absence of a topological map ( Chen et al. , 2021a ; 2020 ) . In particular , SAVi ( Chen et al. , 2021a ) aims to solve the audio-visual navigation problem with temporary sound source by introducing the category information of the source sound and pre-training the displacement from the robot to the sound source ; AVN ( Chen et al. , 2020 ) constructs the first audio-visual embodied navigation simulation platform—SoundSpaces and makes use of Reinforcement Learning ( RL ) for the training of the navigation policy . As presented in the Introduction , all environments used previously ( including SoundSpaces ) assume clean sound sources , which is hardly the case in real and noisy life . By contrast , we build an acoustically complex environment that allows a sound attacker to move and change the volume and category of sound at each time step in an episode . In this environment , we train the navigation policy of the agent under the sound attack , which delivers a more robust solution in real applications . Adversarial attacks and adversarial training in RL . In general , adversarial attacks ( Tian & Xu , 2021 ) /training in RL are divided into two classes : learning to attack ( Huang et al. , 2017 ; Kos & Song , 2017 ; Lin et al. , 2017 ; Pattanaik et al. , 2018 ) and learning to defence ( Pinto et al. , 2017 ; Gleave et al. , 2020 ; Zhang et al. , 2020 ) that targets on learn a robustness policy by state adversarial through external forces or sensor noise . Our paper falls into the second class . A close work to our method is State Adversarial MDP ( SA-MDP ) ( Zhang et al. , 2020 ) that leverages sensor noise in vision to improve the robustness of the algorithm . The main difference between our method and SA-MDP is that our method precisely permits a sound attacker to move in the room and employs the resulting sound as a distractor , while in SA-MDP , the adversarial state is created arbitrarily and thus not necessarily fits the actual scene . Besides , SA-MDP initially copes with the visual modality ; hence , we have changed SA-MDP for the attack of the sound modality for the comparison with our method ( See § 4 ) . Multi-agent learning . We design two frameworks similar to independent learning ( Tampuu et al. , 2017 ) and multi-agent learning ( Sunehag et al. , 2018 ) . However , the framework of independent learning does not converge ( See § 4 ) . We formulate our learning algorithm as a two-player game employed the property of a centralized critic with decentralized actors ( Wang et al. , 2021 ) to guarantee the training convergence of our method in theory ( See Theorem 1 ) . 3 SOUND ADVERSARIAL AUDIO-VISUAL NAVIGATION . 3.1 PROBLEM DEFINITION . Problem modeling of ours . We model the agent as playing against an attacker in a two-player Markov game ( Simon , 2016 ) . We denote the agent and attacker by superscript ω and ν , respectively . The gameM = ( S , ( Aω , Aν ) , P , ( Rω , Rν ) ) consists of state set S , action sets Aω and Aν , and a joint state transition functionP : S×Aω×Aν → S . The reward functionRω : S×Aω×Aν×S → R for agent and Rν : S × Aω × Aν × S → R for attacker respectively depends on the current state , next state and both the agent ’ s and the attacker ’ s actions . Each player wishes to maximize their discounted sum of rewards , where Rω = r , Rν = −r . r is the reward given by the environment at every time step in an episode . Our problem is modeled as following ( See Fig . 2 ( c ) ) : π⋆ = ( π⋆ , ω , π⋆ , ν ) = argmax πω∈Πω { argmin πν∈Πν { G ( πω , πν , r ) } } ( 1 ) Inspired by value decomposition networks ( Sunehag et al. , 2018 ) and QMIX ( Rashid et al. , 2018 ) , we design G ( πω , πν , r ) as Equation ( 2 ) , where G ( πω , r ) and G ( πν , r ) are expected discounted , cumulative rewards of the agent and the attacker respectively . G ( πω , πν , r ) = [ G ( πω , r ) , G ( πν , r ) ] ( 2 ) SA-MDP . As a reference , we introduce the previous adversarial MDP proposed by ( Zhang et al. , 2021 ) as well . In SA-MDP ( See Fig . 2 ( b ) ) , we optimize δadv : = argmax δ : ∥δ∥≤ϵ DKL [ π ω ( a|s ) | πω ( a|s+ δ ) ] . Intuitively , the state of SA-MDP is on the ball with radius ϵ . | The paper proposes an interference-robust training method for audio-visual navigation. Unlike existing approaches that focus on clean environments, the system is trained in simulated acoustically complex environments. A single-source adversarial attacker is introduced, which determines position, noise type and volume that would make the agent to suffer most. This is claimed to improve robustness to random attacks in AVN. Results are compared to a small selection of previous works. | SP:d4b9081707eec501a329f8fe33be879084a0336f |
Sound Adversarial Audio-Visual Navigation | 1 INTRODUCTION . Audio-visual navigation , as currently a vital task for embodied vision ( Gordon et al. , 2018 ; Lohmann et al. , 2020 ; Nagarajan & Grauman , 2020 ) , requires the agent to find a sound target in a realistic and unmapped 3D environment by exploring with egocentric audio-visual observations ( Chen et al. , 2019 ; Gupta et al. , 2017 ; Chaplot et al. , 2020 ) . Inspired by the simultaneous usage of eyes and ears in human exploration ( Wilcox et al. , 2007 ; Flom & Bahrick , 2007 ) , audio-visual association benefits the learning of the agent ( Dean et al. , 2020 ) . A recent work Look , Listen , and Act ( LLA ) has proposed a three-step navigation solution of perception , inference , and decision-making ( Gan et al. , 2020 ) . SoundSpaces is the first work to establish an audio-visual embodied navigation simulation platform equipped with the proposed Audio-Visual embodied Navigation ( AVN ) baseline that resorts to reinforcement learning ( Chen et al. , 2020 ) . In response to the long-term exploration problem that is caused by the large layout of the 3D scene and the long distance to the target place , Audio-Visual Waypoint Navigation ( AV-WaN ) proposes an audio-visual navigation algorithm by setting waypoints as sub-goals to facilitate sound source discovering ( Chen et al. , 2021b ) . Besides , Semantic Audio-Visual navigation ( SAVi ) develops a navigation algorithm in a scene where the target sound is not periodic and has a variable length ; that is , it may stop during the navigation process ( Chen et al. , 2021a ) . Despite the fruitful progress in audio-visual navigation , existing works assume an acoustically simple or clean environment , meaning there is no other sound but the source itself . Nevertheless , this ∗Corresponding author : Fuchun Sun . assumption is hardly the case in real life . For example , a kettle in the kitchen beeps to tell the robot that the water is boiling , and the robot in the living room needs to navigate to the kitchen and turn off the stove ; while in the living room , two children are playing a game , chuckling loudly from time to time . Such an example poses a crucial challenge on current techniques : can an agent still find its way to the destination without being distracted by all non-target sounds around the agent ? Intuitively , the answer is no if the agent has not been trained in acoustically complex environments as in the example listed above . Although the answer is no , this ability is what we expect the agent to possess in real life . In light of these limitations , we propose first to construct such an acoustically complex environment . In this environment , we add a sound attacker to intervene . This sound attacker can move and change the volume and type of the sound at each time step . In particular , the objective of the sound attacker is to make the agent frustrated by creating a distraction . In contrast , the agent decides how to move at every time step , tries to dodge the sound attack , and explores for the sound target well under the sound attack , as illustrated in Fig . 1 . The competition between the attacker and the agent can be modeled as a zero-sum two-player game . Notably , this is not a fair game and is more biased towards the agent for two reasons . First , the sound attack is just single-modal and will not intervene in any visual information obtained by the agent . Second , as will be specified in our methodology , the sound volume of the attacker is bounded via a relative ratio ( less than 1 ) of the sound target . We anticipate constraining the attacker ’ s power and encouraging it to intervene but not defeat the agent with these two considerations . With such a design , we can improve the agent ’ s robustness between the agent and the sound attacker during the game . On the other hand , our environment is more demanding than reality since there are few attackers in our lives . Instead , most behaviors , such as someone walking and chatting past the robot , are not deliberately embarrassing the robot but just a distraction to the robot , exhibiting weaker intervention strength than our adversarial setting . Even so , our experiments reveal that an agent trained in a worst-case setting can perform promisingly when the environment is acoustically clean or contains a natural sound intervenor using a random policy . On the contrary , the agent trained in a clean environment becomes disabled in an acoustically complex environment . Our training algorithm is built upon the architecture by ( Chen et al. , 2020 ) , with a novel decisionmaking branch for the attacker . Training two agents separately ( Tampuu et al. , 2017 ) leads to divergence . Hence we propose a joint Actor-Critic ( AC ) training framework . We define the policies for the attacker based on three types of information : position , sound volume , and sound category . Exciting discoveries from experiments demonstrate that the joint training converges promisingly in contrast to the independent training counterpart . This work is the first audio-visual navigation method with a sound attacker to the best of our knowledge . To sum up , our contributions are as follows . • We construct a sound attacker to intervene environment for audio-visual navigation that aims to improve the agent ’ s robustness . In contrast to the environment used by prior experiments ( Chen et al. , 2020 ) , our setting better simulates the practical case in which there exist other moving intervenor sounds . • We develop a joint training paradigm for the agent and the attacker . Moreover , we have justified the effectiveness of this paradigm , both theoretically and empirically . • Experiments on two real-world 3D scenes , Replica ( Straub et al. , 2019 ) and Matterport3D ( Chang et al. , 2017 ) validate the effectiveness and robustness of the agent trained under our designed environment when transferred to various cases , including the clean environment and the one that contains sound attacker with random policy . 2 RELATED WORK . We introduce the research related to our work , including audio-visual navigation , adversarial training in RL , and multi-agent learning . Audio-visual embodied navigation . This task demands a robot equipped with a camera and a microphone to interact with the environment and navigate to the source sound . Existing algorithms towards this task can be divided into two categories according to whether topological maps are constructed or not . For the first category ( Gan et al. , 2020 ; Chen et al. , 2021b ) , LLA ( Gan et al. , 2020 ) plans the robot ’ s navigation strategy based on graph-based shortest path planning . Following LLA , AV-WaN ( Chen et al. , 2021b ) combines dynamically setting waypoints with the shortest path algorithm to solve the long-period audio-visual navigation problem . The second category of methods works in the absence of a topological map ( Chen et al. , 2021a ; 2020 ) . In particular , SAVi ( Chen et al. , 2021a ) aims to solve the audio-visual navigation problem with temporary sound source by introducing the category information of the source sound and pre-training the displacement from the robot to the sound source ; AVN ( Chen et al. , 2020 ) constructs the first audio-visual embodied navigation simulation platform—SoundSpaces and makes use of Reinforcement Learning ( RL ) for the training of the navigation policy . As presented in the Introduction , all environments used previously ( including SoundSpaces ) assume clean sound sources , which is hardly the case in real and noisy life . By contrast , we build an acoustically complex environment that allows a sound attacker to move and change the volume and category of sound at each time step in an episode . In this environment , we train the navigation policy of the agent under the sound attack , which delivers a more robust solution in real applications . Adversarial attacks and adversarial training in RL . In general , adversarial attacks ( Tian & Xu , 2021 ) /training in RL are divided into two classes : learning to attack ( Huang et al. , 2017 ; Kos & Song , 2017 ; Lin et al. , 2017 ; Pattanaik et al. , 2018 ) and learning to defence ( Pinto et al. , 2017 ; Gleave et al. , 2020 ; Zhang et al. , 2020 ) that targets on learn a robustness policy by state adversarial through external forces or sensor noise . Our paper falls into the second class . A close work to our method is State Adversarial MDP ( SA-MDP ) ( Zhang et al. , 2020 ) that leverages sensor noise in vision to improve the robustness of the algorithm . The main difference between our method and SA-MDP is that our method precisely permits a sound attacker to move in the room and employs the resulting sound as a distractor , while in SA-MDP , the adversarial state is created arbitrarily and thus not necessarily fits the actual scene . Besides , SA-MDP initially copes with the visual modality ; hence , we have changed SA-MDP for the attack of the sound modality for the comparison with our method ( See § 4 ) . Multi-agent learning . We design two frameworks similar to independent learning ( Tampuu et al. , 2017 ) and multi-agent learning ( Sunehag et al. , 2018 ) . However , the framework of independent learning does not converge ( See § 4 ) . We formulate our learning algorithm as a two-player game employed the property of a centralized critic with decentralized actors ( Wang et al. , 2021 ) to guarantee the training convergence of our method in theory ( See Theorem 1 ) . 3 SOUND ADVERSARIAL AUDIO-VISUAL NAVIGATION . 3.1 PROBLEM DEFINITION . Problem modeling of ours . We model the agent as playing against an attacker in a two-player Markov game ( Simon , 2016 ) . We denote the agent and attacker by superscript ω and ν , respectively . The gameM = ( S , ( Aω , Aν ) , P , ( Rω , Rν ) ) consists of state set S , action sets Aω and Aν , and a joint state transition functionP : S×Aω×Aν → S . The reward functionRω : S×Aω×Aν×S → R for agent and Rν : S × Aω × Aν × S → R for attacker respectively depends on the current state , next state and both the agent ’ s and the attacker ’ s actions . Each player wishes to maximize their discounted sum of rewards , where Rω = r , Rν = −r . r is the reward given by the environment at every time step in an episode . Our problem is modeled as following ( See Fig . 2 ( c ) ) : π⋆ = ( π⋆ , ω , π⋆ , ν ) = argmax πω∈Πω { argmin πν∈Πν { G ( πω , πν , r ) } } ( 1 ) Inspired by value decomposition networks ( Sunehag et al. , 2018 ) and QMIX ( Rashid et al. , 2018 ) , we design G ( πω , πν , r ) as Equation ( 2 ) , where G ( πω , r ) and G ( πν , r ) are expected discounted , cumulative rewards of the agent and the attacker respectively . G ( πω , πν , r ) = [ G ( πω , r ) , G ( πν , r ) ] ( 2 ) SA-MDP . As a reference , we introduce the previous adversarial MDP proposed by ( Zhang et al. , 2021 ) as well . In SA-MDP ( See Fig . 2 ( b ) ) , we optimize δadv : = argmax δ : ∥δ∥≤ϵ DKL [ π ω ( a|s ) | πω ( a|s+ δ ) ] . Intuitively , the state of SA-MDP is on the ball with radius ϵ . | This paper addressed the audio-visual navigation task in the environment of sound attacker. The authors formulated the problem as zero-sum game between sound attacker and the agent, and provide a reasonable proof to their formulation and solution. They showed better results than existing works which don't considered this kind of attack (but, I am not sure for SA-MDP). | SP:d4b9081707eec501a329f8fe33be879084a0336f |
Sound Adversarial Audio-Visual Navigation | 1 INTRODUCTION . Audio-visual navigation , as currently a vital task for embodied vision ( Gordon et al. , 2018 ; Lohmann et al. , 2020 ; Nagarajan & Grauman , 2020 ) , requires the agent to find a sound target in a realistic and unmapped 3D environment by exploring with egocentric audio-visual observations ( Chen et al. , 2019 ; Gupta et al. , 2017 ; Chaplot et al. , 2020 ) . Inspired by the simultaneous usage of eyes and ears in human exploration ( Wilcox et al. , 2007 ; Flom & Bahrick , 2007 ) , audio-visual association benefits the learning of the agent ( Dean et al. , 2020 ) . A recent work Look , Listen , and Act ( LLA ) has proposed a three-step navigation solution of perception , inference , and decision-making ( Gan et al. , 2020 ) . SoundSpaces is the first work to establish an audio-visual embodied navigation simulation platform equipped with the proposed Audio-Visual embodied Navigation ( AVN ) baseline that resorts to reinforcement learning ( Chen et al. , 2020 ) . In response to the long-term exploration problem that is caused by the large layout of the 3D scene and the long distance to the target place , Audio-Visual Waypoint Navigation ( AV-WaN ) proposes an audio-visual navigation algorithm by setting waypoints as sub-goals to facilitate sound source discovering ( Chen et al. , 2021b ) . Besides , Semantic Audio-Visual navigation ( SAVi ) develops a navigation algorithm in a scene where the target sound is not periodic and has a variable length ; that is , it may stop during the navigation process ( Chen et al. , 2021a ) . Despite the fruitful progress in audio-visual navigation , existing works assume an acoustically simple or clean environment , meaning there is no other sound but the source itself . Nevertheless , this ∗Corresponding author : Fuchun Sun . assumption is hardly the case in real life . For example , a kettle in the kitchen beeps to tell the robot that the water is boiling , and the robot in the living room needs to navigate to the kitchen and turn off the stove ; while in the living room , two children are playing a game , chuckling loudly from time to time . Such an example poses a crucial challenge on current techniques : can an agent still find its way to the destination without being distracted by all non-target sounds around the agent ? Intuitively , the answer is no if the agent has not been trained in acoustically complex environments as in the example listed above . Although the answer is no , this ability is what we expect the agent to possess in real life . In light of these limitations , we propose first to construct such an acoustically complex environment . In this environment , we add a sound attacker to intervene . This sound attacker can move and change the volume and type of the sound at each time step . In particular , the objective of the sound attacker is to make the agent frustrated by creating a distraction . In contrast , the agent decides how to move at every time step , tries to dodge the sound attack , and explores for the sound target well under the sound attack , as illustrated in Fig . 1 . The competition between the attacker and the agent can be modeled as a zero-sum two-player game . Notably , this is not a fair game and is more biased towards the agent for two reasons . First , the sound attack is just single-modal and will not intervene in any visual information obtained by the agent . Second , as will be specified in our methodology , the sound volume of the attacker is bounded via a relative ratio ( less than 1 ) of the sound target . We anticipate constraining the attacker ’ s power and encouraging it to intervene but not defeat the agent with these two considerations . With such a design , we can improve the agent ’ s robustness between the agent and the sound attacker during the game . On the other hand , our environment is more demanding than reality since there are few attackers in our lives . Instead , most behaviors , such as someone walking and chatting past the robot , are not deliberately embarrassing the robot but just a distraction to the robot , exhibiting weaker intervention strength than our adversarial setting . Even so , our experiments reveal that an agent trained in a worst-case setting can perform promisingly when the environment is acoustically clean or contains a natural sound intervenor using a random policy . On the contrary , the agent trained in a clean environment becomes disabled in an acoustically complex environment . Our training algorithm is built upon the architecture by ( Chen et al. , 2020 ) , with a novel decisionmaking branch for the attacker . Training two agents separately ( Tampuu et al. , 2017 ) leads to divergence . Hence we propose a joint Actor-Critic ( AC ) training framework . We define the policies for the attacker based on three types of information : position , sound volume , and sound category . Exciting discoveries from experiments demonstrate that the joint training converges promisingly in contrast to the independent training counterpart . This work is the first audio-visual navigation method with a sound attacker to the best of our knowledge . To sum up , our contributions are as follows . • We construct a sound attacker to intervene environment for audio-visual navigation that aims to improve the agent ’ s robustness . In contrast to the environment used by prior experiments ( Chen et al. , 2020 ) , our setting better simulates the practical case in which there exist other moving intervenor sounds . • We develop a joint training paradigm for the agent and the attacker . Moreover , we have justified the effectiveness of this paradigm , both theoretically and empirically . • Experiments on two real-world 3D scenes , Replica ( Straub et al. , 2019 ) and Matterport3D ( Chang et al. , 2017 ) validate the effectiveness and robustness of the agent trained under our designed environment when transferred to various cases , including the clean environment and the one that contains sound attacker with random policy . 2 RELATED WORK . We introduce the research related to our work , including audio-visual navigation , adversarial training in RL , and multi-agent learning . Audio-visual embodied navigation . This task demands a robot equipped with a camera and a microphone to interact with the environment and navigate to the source sound . Existing algorithms towards this task can be divided into two categories according to whether topological maps are constructed or not . For the first category ( Gan et al. , 2020 ; Chen et al. , 2021b ) , LLA ( Gan et al. , 2020 ) plans the robot ’ s navigation strategy based on graph-based shortest path planning . Following LLA , AV-WaN ( Chen et al. , 2021b ) combines dynamically setting waypoints with the shortest path algorithm to solve the long-period audio-visual navigation problem . The second category of methods works in the absence of a topological map ( Chen et al. , 2021a ; 2020 ) . In particular , SAVi ( Chen et al. , 2021a ) aims to solve the audio-visual navigation problem with temporary sound source by introducing the category information of the source sound and pre-training the displacement from the robot to the sound source ; AVN ( Chen et al. , 2020 ) constructs the first audio-visual embodied navigation simulation platform—SoundSpaces and makes use of Reinforcement Learning ( RL ) for the training of the navigation policy . As presented in the Introduction , all environments used previously ( including SoundSpaces ) assume clean sound sources , which is hardly the case in real and noisy life . By contrast , we build an acoustically complex environment that allows a sound attacker to move and change the volume and category of sound at each time step in an episode . In this environment , we train the navigation policy of the agent under the sound attack , which delivers a more robust solution in real applications . Adversarial attacks and adversarial training in RL . In general , adversarial attacks ( Tian & Xu , 2021 ) /training in RL are divided into two classes : learning to attack ( Huang et al. , 2017 ; Kos & Song , 2017 ; Lin et al. , 2017 ; Pattanaik et al. , 2018 ) and learning to defence ( Pinto et al. , 2017 ; Gleave et al. , 2020 ; Zhang et al. , 2020 ) that targets on learn a robustness policy by state adversarial through external forces or sensor noise . Our paper falls into the second class . A close work to our method is State Adversarial MDP ( SA-MDP ) ( Zhang et al. , 2020 ) that leverages sensor noise in vision to improve the robustness of the algorithm . The main difference between our method and SA-MDP is that our method precisely permits a sound attacker to move in the room and employs the resulting sound as a distractor , while in SA-MDP , the adversarial state is created arbitrarily and thus not necessarily fits the actual scene . Besides , SA-MDP initially copes with the visual modality ; hence , we have changed SA-MDP for the attack of the sound modality for the comparison with our method ( See § 4 ) . Multi-agent learning . We design two frameworks similar to independent learning ( Tampuu et al. , 2017 ) and multi-agent learning ( Sunehag et al. , 2018 ) . However , the framework of independent learning does not converge ( See § 4 ) . We formulate our learning algorithm as a two-player game employed the property of a centralized critic with decentralized actors ( Wang et al. , 2021 ) to guarantee the training convergence of our method in theory ( See Theorem 1 ) . 3 SOUND ADVERSARIAL AUDIO-VISUAL NAVIGATION . 3.1 PROBLEM DEFINITION . Problem modeling of ours . We model the agent as playing against an attacker in a two-player Markov game ( Simon , 2016 ) . We denote the agent and attacker by superscript ω and ν , respectively . The gameM = ( S , ( Aω , Aν ) , P , ( Rω , Rν ) ) consists of state set S , action sets Aω and Aν , and a joint state transition functionP : S×Aω×Aν → S . The reward functionRω : S×Aω×Aν×S → R for agent and Rν : S × Aω × Aν × S → R for attacker respectively depends on the current state , next state and both the agent ’ s and the attacker ’ s actions . Each player wishes to maximize their discounted sum of rewards , where Rω = r , Rν = −r . r is the reward given by the environment at every time step in an episode . Our problem is modeled as following ( See Fig . 2 ( c ) ) : π⋆ = ( π⋆ , ω , π⋆ , ν ) = argmax πω∈Πω { argmin πν∈Πν { G ( πω , πν , r ) } } ( 1 ) Inspired by value decomposition networks ( Sunehag et al. , 2018 ) and QMIX ( Rashid et al. , 2018 ) , we design G ( πω , πν , r ) as Equation ( 2 ) , where G ( πω , r ) and G ( πν , r ) are expected discounted , cumulative rewards of the agent and the attacker respectively . G ( πω , πν , r ) = [ G ( πω , r ) , G ( πν , r ) ] ( 2 ) SA-MDP . As a reference , we introduce the previous adversarial MDP proposed by ( Zhang et al. , 2021 ) as well . In SA-MDP ( See Fig . 2 ( b ) ) , we optimize δadv : = argmax δ : ∥δ∥≤ϵ DKL [ π ω ( a|s ) | πω ( a|s+ δ ) ] . Intuitively , the state of SA-MDP is on the ball with radius ϵ . | The authors address the audio-visual navigation task in this paper. Previous works usually assume that the interacted environment is clean containing solely the target sound. Different from them, this work explores an acoustically complex environment in which, besides the target sound, there exists a sound attacker playing a zero-sum game with the agent. Specifically, the attacker can move and change the volume and sound category to fool the agent while the agent tries to defend against the attack and navigate to the goal under the intervention. Experiments on Replica and Matterport3D can verify the effectiveness and the robustness of proposed model. | SP:d4b9081707eec501a329f8fe33be879084a0336f |
Conditioning Sequence-to-sequence Networks with Learned Activations | Conditional neural networks play an important role in a number of sequenceto-sequence modeling tasks , including personalized sound enhancement ( PSE ) , speaker dependent automatic speech recognition ( ASR ) , and generative modeling such as text-to-speech synthesis . In conditional neural networks , the output of a model is often influenced by a conditioning vector , in addition to the input . Common approaches of conditioning include input concatenation or modulation with the conditioning vector , which comes at a cost of increased model size . In this work , we introduce a novel approach of neural network conditioning by learning intermediate layer activations based on the conditioning vector . We systematically explore and show that learned activation functions can produce conditional models with comparable or better quality , while decreasing model sizes , thus making them ideal candidates for resource-efficient on-device deployment . As exemplary target use-cases we consider ( i ) the task of PSE as a pre-processing technique for improving telephony or pre-trained ASR performance under noise , and ( ii ) personalized ASR in single speaker scenarios . We find that conditioning via activation function learning is an effective modeling strategy , suggesting a broad applicability of the proposed technique across a number of application domains . 1 INTRODUCTION . The use of latent or embedding vectors to condition neural networks is common in a number of machine learning tasks . For example , in personalized sound enhancement ( PSE ) prior knowledge of a speaker ’ s voice profile is used to filter out noise from an audio recording ( Choi et al. , 2021 ; Hu et al. , 2020 ; Wang et al. , 2020 ; 2019 ) , in speaker-dependent or personalized Automatic Speech Recognition ( ASR ) a speaker ’ s voice profile is also used to improve the overall transcription quality ( Bell et al. , 2021 ; He et al. , 2019 ; Samarakoon et al. , 2016 ; Saon et al. , 2013 ) , in personalized Text-To-Speech ( TTS ) systems synthesized voice profile can be purposefully adapted ( van den Oord et al. , 2018 ) , in computer vision tasks , such as in visual reasoning applications ( Chen et al. , 2019 ; Perez et al. , 2018 ) , questions are used as the conditioning vectors , and similarly in conditional domain adaptation techniques ( Long et al. , 2018 ) . More generally , conditional neural networks accept an additional conditioning vector , that influences how the networks process inputs to produce outputs . Most common approaches for conditioning neural networks either concatenate or modulate the conditioning vector with one or more intermediate representations of the network , before the updated representations are processed by a layer , e.g. , see Figure 1a-b for an overview . Such conditioning techniques come at the cost of significantly increasing the network parameters by inflating the dimensionality of intermediate features or by requiring additional network parameters proportional to the dimensionality of the conditioning vectors and the number of channels present in the representations . In this work , we introduce a new approach for neural network conditioning and show that effective conditioning can be achieved by learning layer-specific activation functions based on the conditioning vectors . Unlike previous approaches , our learned activation ( LA ) functions approach does not increase the model parameters significantly , since the number of additional parameters it requires depends only on the size of the conditioning vector , and not on the shape of the feature representations nor on the output shapes of any subsequent layers . LA uses the conditioning vectors to dynamically modify intermediate activation functions , which are R→ R ( 1-D ) mappings , see Figure 1c . Dynamic LAs allow us to extract important insights on how the model is being adapted for different conditioning vectors by simply analyzing the learned activation functions , which are agnostic to the input . In this work we consider two popular and timely sequence-to-sequence modeling tasks : personalized sound enhancement ( PSE ) and personalized ASR ( PASR ) as exemplary tasks for modeling conditional neural networks . PSE leverages a speaker embedding vector , i.e. , a unique encoded voice profile of a speaker , for filtering out everything but the speaker ’ s voice from an audio recording corrupted with babble or ambient noise ( Wang et al. , 2020 ; 2019 ) . Speaker embeddings can generally be obtained by using an embedding network once during an enrolment phase , e.g. , from recorded utterances like “ Hey Alexa ” or “ Hey Bixby ” . PSE networks can be evaluated for improving signal quality for telephony or can also be used to improve the quality of downstream tasks , such as a pre-trained ASR . PASR on the other hand , aims to improve ASR quality in single speaker scenarios , by leveraging user ’ s enrollment data to enhance performance directly without any pre-processing . We evaluate LA on three PSE model families ( §4.2 ) , on two datasets Librispeech ( Panayotov et al. , 2015 ) and Voxforge ( vox , 2006 ) . We show that the use of LA on all models achieves competitive performance to conditioning using concatenation and modulation approaches . At the same time , concatenation approaches require 10–95 % more model parameters over our solution . For PASR , we compare the performance of non-personalized and personalized versions of the conformer encoder model architecture ( Gulati et al. , 2020 ) with a dense layer for character or subword text encoder trained with CTC loss and decoded via CTC decoder ( §5.2 ) . Results on Librispeech ( Panayotov et al. , 2015 ) show that LA yields effective ASR personalization , i.e. , increased performance across all users while using two seconds of enrollment data , with up to 19 % relative WER improvement across all users , and up to 40 % for some users . 2 RELATED WORK . Conditioning through tensor concatenation The concatenation of intermediate features with latent vectors before being passed to subsequent layers is the most common form of conditioning , but leads to inflated model sizes , which hinder their deployment to low-resource constrained devices ( Wang et al. , 2019 ; 2020 ; Valin et al. , 2020 ; Hu et al. , 2020 ; Comon & Jutten , 2010 ; Wang et al. , 2021 ; Lam et al. , 2021 ; Vincent et al. , 2018 ; Luo & Mesgarani , 2019 ; Xu et al. , 2020 ; Abdulatif et al. , 2020 ; Wisdom et al. , 2020 ; Isik et al. , 2020 ; Luo et al. , 2020 ; Choi et al. , 2021 ; Snyder et al. , 2018 ; Panayotov et al. , 2015 ; Bell et al. , 2021 ; He et al. , 2019 ; van den Oord et al. , 2018 ) . Our approach overcomes this issue and learns smaller models with competitive quality . Conditioning via normalization layers Another family of techniques is based on having per channel learned linear transformation based on the conditioning vector , which yields a form of conditional normalization ( Perez et al. , 2018 ; de Vries et al. , 2017 ; Huang & Belongie , 2017 ) . Our approach distinguishes itself from this line of work since it learns the non-linear components of the network rather than the linear ones , and thus offers greater modelling at lower cost . Learning activations without conditioning Outside the context of conditional neural networks , there is work on learning an optimal activation function as a good default to be used in all layers of most neural network architectures ( Apicella et al. , 2021 ; Liu et al. , 2020 ; Ramachandran et al. , 2018 ; Agostinelli et al. , 2015 ) . Our work instead i ) learns conditional activations based on conditioning vectors , and ii ) uses differently learnt activations throughout the network . 3 CONDITIONING BY LEARNING ACTIVATIONS . Conditioning a neural network corresponds to using some form of latent vector or additional prior knowledge , e.g. , encoded typically in the form of an embedding vector , to influence the output of the network for a given input . We show in the evaluation that the influence of the conditioning vector can be successfully modeled by learning a weighted combination of a set of basic activation functions ( §3.1 ) and carefully selecting hyperparameters ( §3.2 ) . 3.1 DYNAMICALLY LEARNED ACTIVATIONS . To introduce our conditioning approach using dynamically weighted activation functions , we begin by defining a few key variables : z ∈ Rb×d is a 2-D tensor representing b number of d-dimensional conditioning vectors , where b is the batch size , x ∈ Rb×··· is the input data with arbitrary tensor dimensions ( e.g. , vectors , matrices , higher order tensors ) , h ∈ Rb×··· is the hidden pre-activation of the previous layer , and { Ai : R → R } ai=1 is an ordered family of a basic activations , e.g. , { relu , sigmoid , tanh } ( we will discuss below more on the elements of this ordered set of activations ) . Dynamically learned activation ( LA ) functions require a small number of trainable variables w ∈ Rd×a and b ∈ R1×a , and are defined by transforming input tuples ( z , h ) into output tensors y through ( note the parallel between the following equations and the pictorial representation in Figure 1c , where there is a direct correspondence on the roles of z , h and y between the formulas and the diagram ) : s : = softmaxrowwise ( z ×w + b ) , h ∈ R 7→ LA ( h | zj ) : = a∑ i=1 sj , i ·Ai ( h ) , yj , ... : = LAelementwise ( hj , ... | zj ) , where softmaxrowwise denotes the matrix-matrix operation with entries defined rowwise via softmaxrowwise ( m ) j : = softmax ( mj ) , and LAelementwise ( hj , ... | zj ) denotes the result of applying LA ( · |zj ) elementwise to each entry of hj , .... Note that during training , batch size is greater than one in which case z is a matrix , whereas during inference batch size is one for each user in which case z is a row vector . So during training zj is the conditioning vector corresponding to the j-th sample , but during inference zj is the conditioning vector corresponding to the j-th user in the discussion below . Figure 1 highlights the qualitative and quantitative differences between our approach ( Figure 1c ) and existing state-of-the-art ( SOTA ) solutions ( Figure 1a-b ) . Concatenation approaches as depicted in Fig . 1a can be defined by Aelementwise ( Fθ ( [ z > j , x > j , ... , : ] > ) ) , where Fθ denotes a common learnable transformation such as a dense , conv1d , conv2d or LSTM layer without activation and A : R→ R denotes a generic activation such as the rectified linear unit . Whereas , as shown in Fig . 1b , modulation approaches are defined as Aelementwise ( Gη ( Uµ ( zj ) xj , ... , : + Vν ( zj ) ) ) , where Gη represents a common learnable transformation ( which may be slightly different than Fθ given their inputs have different shapes ) and Uµ : Rd → Rf and Vν : Rd → Rf are often taken as linear mappings ( where d denotes the conditioning vectors dimension and f denotes the number of channels of x ) . In comparison to these SOTA approaches , our learned activation functions mechanism can simply be formulated as LAelementwise ( Gη ( xj , ... ) | zj ) . For simplicity , we use a dense layer in the figure ( i.e. , we take Fθ and Gη to be dense layers and f = 1 ) , however , our approach is general and can be applied to any layer type , e.g , dense , conv1d , conv2d and LSTM . From a qualitative point of view , LAs conditions the non-linearities rather than the linearities of the network . From a quantitative point of view , Figure 1 also highlights the superior compression abilities achieved by our proposed method . In particular , concatenation approaches ( Figure 1a ) require ( d+ u ) ∗ v parameters and modulation approaches ( Figure 1b ) require u ∗ v + d ∗ 2 ∗ f , where f denotes the number of channels in the input tensor x , which per channel is multiplied by a scaling factor and offset by a bias term . The learned activation functions approach on the other hand , requires only u ∗ v + d ∗ a parameters . For example , in most audio and video applications , our approach yields significant savings of d ∗ ( v − a ) given that d 1 and v a , when compared to concatenation approaches . The saving becomes d∗ ( 2∗f −a ) when compared to modulation approaches , given that often in such cases 2∗f −a > 0 . For temporal data , such as audio and video , the savings of our approach are even more significant as in those applications the conditioning vector is concatenated with each time frame of the inputs and for f 1 the model requires larger parameter size . In our approach the operational requirements do not change across data type , i.e. , tensor dimensions . | This paper proposes a way of conditioning information on neural networks. In literature a common way to condition a neural with an input would be to either concatenate the conditioning vector to the input vector, or inject it before several layers (modulation approach in Figure 1-b). In this paper they instead propose to pass the conditioning vector through weighted sum of output of neural-net activation functions. The claim is that this way of training the neural network leads to reduction in neural network parameters without sacrificing performance in speech enhancement / ASR tasks. | SP:ae8bbff3899a5ae3af9fbd18b4316f38e8e9a95b |
Conditioning Sequence-to-sequence Networks with Learned Activations | Conditional neural networks play an important role in a number of sequenceto-sequence modeling tasks , including personalized sound enhancement ( PSE ) , speaker dependent automatic speech recognition ( ASR ) , and generative modeling such as text-to-speech synthesis . In conditional neural networks , the output of a model is often influenced by a conditioning vector , in addition to the input . Common approaches of conditioning include input concatenation or modulation with the conditioning vector , which comes at a cost of increased model size . In this work , we introduce a novel approach of neural network conditioning by learning intermediate layer activations based on the conditioning vector . We systematically explore and show that learned activation functions can produce conditional models with comparable or better quality , while decreasing model sizes , thus making them ideal candidates for resource-efficient on-device deployment . As exemplary target use-cases we consider ( i ) the task of PSE as a pre-processing technique for improving telephony or pre-trained ASR performance under noise , and ( ii ) personalized ASR in single speaker scenarios . We find that conditioning via activation function learning is an effective modeling strategy , suggesting a broad applicability of the proposed technique across a number of application domains . 1 INTRODUCTION . The use of latent or embedding vectors to condition neural networks is common in a number of machine learning tasks . For example , in personalized sound enhancement ( PSE ) prior knowledge of a speaker ’ s voice profile is used to filter out noise from an audio recording ( Choi et al. , 2021 ; Hu et al. , 2020 ; Wang et al. , 2020 ; 2019 ) , in speaker-dependent or personalized Automatic Speech Recognition ( ASR ) a speaker ’ s voice profile is also used to improve the overall transcription quality ( Bell et al. , 2021 ; He et al. , 2019 ; Samarakoon et al. , 2016 ; Saon et al. , 2013 ) , in personalized Text-To-Speech ( TTS ) systems synthesized voice profile can be purposefully adapted ( van den Oord et al. , 2018 ) , in computer vision tasks , such as in visual reasoning applications ( Chen et al. , 2019 ; Perez et al. , 2018 ) , questions are used as the conditioning vectors , and similarly in conditional domain adaptation techniques ( Long et al. , 2018 ) . More generally , conditional neural networks accept an additional conditioning vector , that influences how the networks process inputs to produce outputs . Most common approaches for conditioning neural networks either concatenate or modulate the conditioning vector with one or more intermediate representations of the network , before the updated representations are processed by a layer , e.g. , see Figure 1a-b for an overview . Such conditioning techniques come at the cost of significantly increasing the network parameters by inflating the dimensionality of intermediate features or by requiring additional network parameters proportional to the dimensionality of the conditioning vectors and the number of channels present in the representations . In this work , we introduce a new approach for neural network conditioning and show that effective conditioning can be achieved by learning layer-specific activation functions based on the conditioning vectors . Unlike previous approaches , our learned activation ( LA ) functions approach does not increase the model parameters significantly , since the number of additional parameters it requires depends only on the size of the conditioning vector , and not on the shape of the feature representations nor on the output shapes of any subsequent layers . LA uses the conditioning vectors to dynamically modify intermediate activation functions , which are R→ R ( 1-D ) mappings , see Figure 1c . Dynamic LAs allow us to extract important insights on how the model is being adapted for different conditioning vectors by simply analyzing the learned activation functions , which are agnostic to the input . In this work we consider two popular and timely sequence-to-sequence modeling tasks : personalized sound enhancement ( PSE ) and personalized ASR ( PASR ) as exemplary tasks for modeling conditional neural networks . PSE leverages a speaker embedding vector , i.e. , a unique encoded voice profile of a speaker , for filtering out everything but the speaker ’ s voice from an audio recording corrupted with babble or ambient noise ( Wang et al. , 2020 ; 2019 ) . Speaker embeddings can generally be obtained by using an embedding network once during an enrolment phase , e.g. , from recorded utterances like “ Hey Alexa ” or “ Hey Bixby ” . PSE networks can be evaluated for improving signal quality for telephony or can also be used to improve the quality of downstream tasks , such as a pre-trained ASR . PASR on the other hand , aims to improve ASR quality in single speaker scenarios , by leveraging user ’ s enrollment data to enhance performance directly without any pre-processing . We evaluate LA on three PSE model families ( §4.2 ) , on two datasets Librispeech ( Panayotov et al. , 2015 ) and Voxforge ( vox , 2006 ) . We show that the use of LA on all models achieves competitive performance to conditioning using concatenation and modulation approaches . At the same time , concatenation approaches require 10–95 % more model parameters over our solution . For PASR , we compare the performance of non-personalized and personalized versions of the conformer encoder model architecture ( Gulati et al. , 2020 ) with a dense layer for character or subword text encoder trained with CTC loss and decoded via CTC decoder ( §5.2 ) . Results on Librispeech ( Panayotov et al. , 2015 ) show that LA yields effective ASR personalization , i.e. , increased performance across all users while using two seconds of enrollment data , with up to 19 % relative WER improvement across all users , and up to 40 % for some users . 2 RELATED WORK . Conditioning through tensor concatenation The concatenation of intermediate features with latent vectors before being passed to subsequent layers is the most common form of conditioning , but leads to inflated model sizes , which hinder their deployment to low-resource constrained devices ( Wang et al. , 2019 ; 2020 ; Valin et al. , 2020 ; Hu et al. , 2020 ; Comon & Jutten , 2010 ; Wang et al. , 2021 ; Lam et al. , 2021 ; Vincent et al. , 2018 ; Luo & Mesgarani , 2019 ; Xu et al. , 2020 ; Abdulatif et al. , 2020 ; Wisdom et al. , 2020 ; Isik et al. , 2020 ; Luo et al. , 2020 ; Choi et al. , 2021 ; Snyder et al. , 2018 ; Panayotov et al. , 2015 ; Bell et al. , 2021 ; He et al. , 2019 ; van den Oord et al. , 2018 ) . Our approach overcomes this issue and learns smaller models with competitive quality . Conditioning via normalization layers Another family of techniques is based on having per channel learned linear transformation based on the conditioning vector , which yields a form of conditional normalization ( Perez et al. , 2018 ; de Vries et al. , 2017 ; Huang & Belongie , 2017 ) . Our approach distinguishes itself from this line of work since it learns the non-linear components of the network rather than the linear ones , and thus offers greater modelling at lower cost . Learning activations without conditioning Outside the context of conditional neural networks , there is work on learning an optimal activation function as a good default to be used in all layers of most neural network architectures ( Apicella et al. , 2021 ; Liu et al. , 2020 ; Ramachandran et al. , 2018 ; Agostinelli et al. , 2015 ) . Our work instead i ) learns conditional activations based on conditioning vectors , and ii ) uses differently learnt activations throughout the network . 3 CONDITIONING BY LEARNING ACTIVATIONS . Conditioning a neural network corresponds to using some form of latent vector or additional prior knowledge , e.g. , encoded typically in the form of an embedding vector , to influence the output of the network for a given input . We show in the evaluation that the influence of the conditioning vector can be successfully modeled by learning a weighted combination of a set of basic activation functions ( §3.1 ) and carefully selecting hyperparameters ( §3.2 ) . 3.1 DYNAMICALLY LEARNED ACTIVATIONS . To introduce our conditioning approach using dynamically weighted activation functions , we begin by defining a few key variables : z ∈ Rb×d is a 2-D tensor representing b number of d-dimensional conditioning vectors , where b is the batch size , x ∈ Rb×··· is the input data with arbitrary tensor dimensions ( e.g. , vectors , matrices , higher order tensors ) , h ∈ Rb×··· is the hidden pre-activation of the previous layer , and { Ai : R → R } ai=1 is an ordered family of a basic activations , e.g. , { relu , sigmoid , tanh } ( we will discuss below more on the elements of this ordered set of activations ) . Dynamically learned activation ( LA ) functions require a small number of trainable variables w ∈ Rd×a and b ∈ R1×a , and are defined by transforming input tuples ( z , h ) into output tensors y through ( note the parallel between the following equations and the pictorial representation in Figure 1c , where there is a direct correspondence on the roles of z , h and y between the formulas and the diagram ) : s : = softmaxrowwise ( z ×w + b ) , h ∈ R 7→ LA ( h | zj ) : = a∑ i=1 sj , i ·Ai ( h ) , yj , ... : = LAelementwise ( hj , ... | zj ) , where softmaxrowwise denotes the matrix-matrix operation with entries defined rowwise via softmaxrowwise ( m ) j : = softmax ( mj ) , and LAelementwise ( hj , ... | zj ) denotes the result of applying LA ( · |zj ) elementwise to each entry of hj , .... Note that during training , batch size is greater than one in which case z is a matrix , whereas during inference batch size is one for each user in which case z is a row vector . So during training zj is the conditioning vector corresponding to the j-th sample , but during inference zj is the conditioning vector corresponding to the j-th user in the discussion below . Figure 1 highlights the qualitative and quantitative differences between our approach ( Figure 1c ) and existing state-of-the-art ( SOTA ) solutions ( Figure 1a-b ) . Concatenation approaches as depicted in Fig . 1a can be defined by Aelementwise ( Fθ ( [ z > j , x > j , ... , : ] > ) ) , where Fθ denotes a common learnable transformation such as a dense , conv1d , conv2d or LSTM layer without activation and A : R→ R denotes a generic activation such as the rectified linear unit . Whereas , as shown in Fig . 1b , modulation approaches are defined as Aelementwise ( Gη ( Uµ ( zj ) xj , ... , : + Vν ( zj ) ) ) , where Gη represents a common learnable transformation ( which may be slightly different than Fθ given their inputs have different shapes ) and Uµ : Rd → Rf and Vν : Rd → Rf are often taken as linear mappings ( where d denotes the conditioning vectors dimension and f denotes the number of channels of x ) . In comparison to these SOTA approaches , our learned activation functions mechanism can simply be formulated as LAelementwise ( Gη ( xj , ... ) | zj ) . For simplicity , we use a dense layer in the figure ( i.e. , we take Fθ and Gη to be dense layers and f = 1 ) , however , our approach is general and can be applied to any layer type , e.g , dense , conv1d , conv2d and LSTM . From a qualitative point of view , LAs conditions the non-linearities rather than the linearities of the network . From a quantitative point of view , Figure 1 also highlights the superior compression abilities achieved by our proposed method . In particular , concatenation approaches ( Figure 1a ) require ( d+ u ) ∗ v parameters and modulation approaches ( Figure 1b ) require u ∗ v + d ∗ 2 ∗ f , where f denotes the number of channels in the input tensor x , which per channel is multiplied by a scaling factor and offset by a bias term . The learned activation functions approach on the other hand , requires only u ∗ v + d ∗ a parameters . For example , in most audio and video applications , our approach yields significant savings of d ∗ ( v − a ) given that d 1 and v a , when compared to concatenation approaches . The saving becomes d∗ ( 2∗f −a ) when compared to modulation approaches , given that often in such cases 2∗f −a > 0 . For temporal data , such as audio and video , the savings of our approach are even more significant as in those applications the conditioning vector is concatenated with each time frame of the inputs and for f 1 the model requires larger parameter size . In our approach the operational requirements do not change across data type , i.e. , tensor dimensions . | This paper presents a very interesting idea (if I understand it correctly), which is to implement conditioning on e.g. a speaker embedding vector via a parametrization of the layer-to-layer activation functions of an overall deep neural net architecture. The motivation is to achieve the same effect as the well-known concatenation approach, but without requiring as many new parameters. I found the formalism hard to follow, impeding my grasp of the fundamental proposal. However, eventually I got the idea. The results are promising, showing good preservation of e.g. WER quality on the unconditioned scenario, with good WER on the specialized scenario, and with fewer parameters than the concatenation method. I think the name "learned activations" somewhat undersells the idea -- wouldn't it be better named as "learned activation _functions_"? That immediately would clarify the fundamental concept -- and highlight it's originality. | SP:ae8bbff3899a5ae3af9fbd18b4316f38e8e9a95b |
Conditioning Sequence-to-sequence Networks with Learned Activations | Conditional neural networks play an important role in a number of sequenceto-sequence modeling tasks , including personalized sound enhancement ( PSE ) , speaker dependent automatic speech recognition ( ASR ) , and generative modeling such as text-to-speech synthesis . In conditional neural networks , the output of a model is often influenced by a conditioning vector , in addition to the input . Common approaches of conditioning include input concatenation or modulation with the conditioning vector , which comes at a cost of increased model size . In this work , we introduce a novel approach of neural network conditioning by learning intermediate layer activations based on the conditioning vector . We systematically explore and show that learned activation functions can produce conditional models with comparable or better quality , while decreasing model sizes , thus making them ideal candidates for resource-efficient on-device deployment . As exemplary target use-cases we consider ( i ) the task of PSE as a pre-processing technique for improving telephony or pre-trained ASR performance under noise , and ( ii ) personalized ASR in single speaker scenarios . We find that conditioning via activation function learning is an effective modeling strategy , suggesting a broad applicability of the proposed technique across a number of application domains . 1 INTRODUCTION . The use of latent or embedding vectors to condition neural networks is common in a number of machine learning tasks . For example , in personalized sound enhancement ( PSE ) prior knowledge of a speaker ’ s voice profile is used to filter out noise from an audio recording ( Choi et al. , 2021 ; Hu et al. , 2020 ; Wang et al. , 2020 ; 2019 ) , in speaker-dependent or personalized Automatic Speech Recognition ( ASR ) a speaker ’ s voice profile is also used to improve the overall transcription quality ( Bell et al. , 2021 ; He et al. , 2019 ; Samarakoon et al. , 2016 ; Saon et al. , 2013 ) , in personalized Text-To-Speech ( TTS ) systems synthesized voice profile can be purposefully adapted ( van den Oord et al. , 2018 ) , in computer vision tasks , such as in visual reasoning applications ( Chen et al. , 2019 ; Perez et al. , 2018 ) , questions are used as the conditioning vectors , and similarly in conditional domain adaptation techniques ( Long et al. , 2018 ) . More generally , conditional neural networks accept an additional conditioning vector , that influences how the networks process inputs to produce outputs . Most common approaches for conditioning neural networks either concatenate or modulate the conditioning vector with one or more intermediate representations of the network , before the updated representations are processed by a layer , e.g. , see Figure 1a-b for an overview . Such conditioning techniques come at the cost of significantly increasing the network parameters by inflating the dimensionality of intermediate features or by requiring additional network parameters proportional to the dimensionality of the conditioning vectors and the number of channels present in the representations . In this work , we introduce a new approach for neural network conditioning and show that effective conditioning can be achieved by learning layer-specific activation functions based on the conditioning vectors . Unlike previous approaches , our learned activation ( LA ) functions approach does not increase the model parameters significantly , since the number of additional parameters it requires depends only on the size of the conditioning vector , and not on the shape of the feature representations nor on the output shapes of any subsequent layers . LA uses the conditioning vectors to dynamically modify intermediate activation functions , which are R→ R ( 1-D ) mappings , see Figure 1c . Dynamic LAs allow us to extract important insights on how the model is being adapted for different conditioning vectors by simply analyzing the learned activation functions , which are agnostic to the input . In this work we consider two popular and timely sequence-to-sequence modeling tasks : personalized sound enhancement ( PSE ) and personalized ASR ( PASR ) as exemplary tasks for modeling conditional neural networks . PSE leverages a speaker embedding vector , i.e. , a unique encoded voice profile of a speaker , for filtering out everything but the speaker ’ s voice from an audio recording corrupted with babble or ambient noise ( Wang et al. , 2020 ; 2019 ) . Speaker embeddings can generally be obtained by using an embedding network once during an enrolment phase , e.g. , from recorded utterances like “ Hey Alexa ” or “ Hey Bixby ” . PSE networks can be evaluated for improving signal quality for telephony or can also be used to improve the quality of downstream tasks , such as a pre-trained ASR . PASR on the other hand , aims to improve ASR quality in single speaker scenarios , by leveraging user ’ s enrollment data to enhance performance directly without any pre-processing . We evaluate LA on three PSE model families ( §4.2 ) , on two datasets Librispeech ( Panayotov et al. , 2015 ) and Voxforge ( vox , 2006 ) . We show that the use of LA on all models achieves competitive performance to conditioning using concatenation and modulation approaches . At the same time , concatenation approaches require 10–95 % more model parameters over our solution . For PASR , we compare the performance of non-personalized and personalized versions of the conformer encoder model architecture ( Gulati et al. , 2020 ) with a dense layer for character or subword text encoder trained with CTC loss and decoded via CTC decoder ( §5.2 ) . Results on Librispeech ( Panayotov et al. , 2015 ) show that LA yields effective ASR personalization , i.e. , increased performance across all users while using two seconds of enrollment data , with up to 19 % relative WER improvement across all users , and up to 40 % for some users . 2 RELATED WORK . Conditioning through tensor concatenation The concatenation of intermediate features with latent vectors before being passed to subsequent layers is the most common form of conditioning , but leads to inflated model sizes , which hinder their deployment to low-resource constrained devices ( Wang et al. , 2019 ; 2020 ; Valin et al. , 2020 ; Hu et al. , 2020 ; Comon & Jutten , 2010 ; Wang et al. , 2021 ; Lam et al. , 2021 ; Vincent et al. , 2018 ; Luo & Mesgarani , 2019 ; Xu et al. , 2020 ; Abdulatif et al. , 2020 ; Wisdom et al. , 2020 ; Isik et al. , 2020 ; Luo et al. , 2020 ; Choi et al. , 2021 ; Snyder et al. , 2018 ; Panayotov et al. , 2015 ; Bell et al. , 2021 ; He et al. , 2019 ; van den Oord et al. , 2018 ) . Our approach overcomes this issue and learns smaller models with competitive quality . Conditioning via normalization layers Another family of techniques is based on having per channel learned linear transformation based on the conditioning vector , which yields a form of conditional normalization ( Perez et al. , 2018 ; de Vries et al. , 2017 ; Huang & Belongie , 2017 ) . Our approach distinguishes itself from this line of work since it learns the non-linear components of the network rather than the linear ones , and thus offers greater modelling at lower cost . Learning activations without conditioning Outside the context of conditional neural networks , there is work on learning an optimal activation function as a good default to be used in all layers of most neural network architectures ( Apicella et al. , 2021 ; Liu et al. , 2020 ; Ramachandran et al. , 2018 ; Agostinelli et al. , 2015 ) . Our work instead i ) learns conditional activations based on conditioning vectors , and ii ) uses differently learnt activations throughout the network . 3 CONDITIONING BY LEARNING ACTIVATIONS . Conditioning a neural network corresponds to using some form of latent vector or additional prior knowledge , e.g. , encoded typically in the form of an embedding vector , to influence the output of the network for a given input . We show in the evaluation that the influence of the conditioning vector can be successfully modeled by learning a weighted combination of a set of basic activation functions ( §3.1 ) and carefully selecting hyperparameters ( §3.2 ) . 3.1 DYNAMICALLY LEARNED ACTIVATIONS . To introduce our conditioning approach using dynamically weighted activation functions , we begin by defining a few key variables : z ∈ Rb×d is a 2-D tensor representing b number of d-dimensional conditioning vectors , where b is the batch size , x ∈ Rb×··· is the input data with arbitrary tensor dimensions ( e.g. , vectors , matrices , higher order tensors ) , h ∈ Rb×··· is the hidden pre-activation of the previous layer , and { Ai : R → R } ai=1 is an ordered family of a basic activations , e.g. , { relu , sigmoid , tanh } ( we will discuss below more on the elements of this ordered set of activations ) . Dynamically learned activation ( LA ) functions require a small number of trainable variables w ∈ Rd×a and b ∈ R1×a , and are defined by transforming input tuples ( z , h ) into output tensors y through ( note the parallel between the following equations and the pictorial representation in Figure 1c , where there is a direct correspondence on the roles of z , h and y between the formulas and the diagram ) : s : = softmaxrowwise ( z ×w + b ) , h ∈ R 7→ LA ( h | zj ) : = a∑ i=1 sj , i ·Ai ( h ) , yj , ... : = LAelementwise ( hj , ... | zj ) , where softmaxrowwise denotes the matrix-matrix operation with entries defined rowwise via softmaxrowwise ( m ) j : = softmax ( mj ) , and LAelementwise ( hj , ... | zj ) denotes the result of applying LA ( · |zj ) elementwise to each entry of hj , .... Note that during training , batch size is greater than one in which case z is a matrix , whereas during inference batch size is one for each user in which case z is a row vector . So during training zj is the conditioning vector corresponding to the j-th sample , but during inference zj is the conditioning vector corresponding to the j-th user in the discussion below . Figure 1 highlights the qualitative and quantitative differences between our approach ( Figure 1c ) and existing state-of-the-art ( SOTA ) solutions ( Figure 1a-b ) . Concatenation approaches as depicted in Fig . 1a can be defined by Aelementwise ( Fθ ( [ z > j , x > j , ... , : ] > ) ) , where Fθ denotes a common learnable transformation such as a dense , conv1d , conv2d or LSTM layer without activation and A : R→ R denotes a generic activation such as the rectified linear unit . Whereas , as shown in Fig . 1b , modulation approaches are defined as Aelementwise ( Gη ( Uµ ( zj ) xj , ... , : + Vν ( zj ) ) ) , where Gη represents a common learnable transformation ( which may be slightly different than Fθ given their inputs have different shapes ) and Uµ : Rd → Rf and Vν : Rd → Rf are often taken as linear mappings ( where d denotes the conditioning vectors dimension and f denotes the number of channels of x ) . In comparison to these SOTA approaches , our learned activation functions mechanism can simply be formulated as LAelementwise ( Gη ( xj , ... ) | zj ) . For simplicity , we use a dense layer in the figure ( i.e. , we take Fθ and Gη to be dense layers and f = 1 ) , however , our approach is general and can be applied to any layer type , e.g , dense , conv1d , conv2d and LSTM . From a qualitative point of view , LAs conditions the non-linearities rather than the linearities of the network . From a quantitative point of view , Figure 1 also highlights the superior compression abilities achieved by our proposed method . In particular , concatenation approaches ( Figure 1a ) require ( d+ u ) ∗ v parameters and modulation approaches ( Figure 1b ) require u ∗ v + d ∗ 2 ∗ f , where f denotes the number of channels in the input tensor x , which per channel is multiplied by a scaling factor and offset by a bias term . The learned activation functions approach on the other hand , requires only u ∗ v + d ∗ a parameters . For example , in most audio and video applications , our approach yields significant savings of d ∗ ( v − a ) given that d 1 and v a , when compared to concatenation approaches . The saving becomes d∗ ( 2∗f −a ) when compared to modulation approaches , given that often in such cases 2∗f −a > 0 . For temporal data , such as audio and video , the savings of our approach are even more significant as in those applications the conditioning vector is concatenated with each time frame of the inputs and for f 1 the model requires larger parameter size . In our approach the operational requirements do not change across data type , i.e. , tensor dimensions . | This paper introduces a method called learned activations for personalized speech enhancement and personalized automatic speech recognition. The learned activations are obtained by a weighted sum of nonlinear activations of hidden layer outputs and the weights are computed from softmax of the projected speaker embeddings such as x-vectors. The main benefit of the model as compared to concatenation or modulation based approaches is that Learned Activations result in smaller number of learnable parameters and hence a smaller model size. Experimental results show that in terms of SDR improvement, the proposed method achieves comparable performance to the baseline models with a smaller model size. In the case of ASR, the proposed approach provides WER reduction as compared to an unadapted model. | SP:ae8bbff3899a5ae3af9fbd18b4316f38e8e9a95b |
SPIRAL: Self-supervised Perturbation-Invariant Representation Learning for Speech Pre-Training | 1 INTRODUCTION . Industrial-scale automatic speech recognition ( ASR ) systems are usually trained with ten-thousands of hours of hand-transcribed speech data ( Galvez et al. , 2021 ) . However , labeling speech data is expensive and time-consuming , especially for languages with small speaker populations , or for specific domains ( e.g. , legal , financial , scientific ) . Recently , methods of utilizing unlabeled speech data to improve speech recognition system have achieved remarkable progress . Amongst them , self-training ( Manohar et al. , 2015 ; Kahn et al. , 2020a ; Synnaeve et al. , 2020a ; Chen et al. , 2020b ; Xu et al. , 2020 ; Park et al. , 2020b ; Xiao et al. , 2021 ) , also known as pseudo-labeling , starts by training an ASR model with labeled speech data , which is referred to as teacher model . Then the teacher model , usually combined with a language model ( LM ) , is used to produce pseudo-labels for unlabeled speech data . Finally , the labeled data and the pseudo-labeled data are combined to train a new model , which is referred to as student model . The process is repeated by taking the student model as the teacher in next iteration . Another line of work is speech pre-training ( van den Oord et al. , 2019 ; Chung & Glass , 2020 ; Wang et al. , 2020 ; Baevski et al. , 2020b ; Liu et al. , 2020 ) . Pre-training learns speech representation from unlabeled data in a self-supervised way . The pre-trained model is then fine-tuned on the labeled data . Self-training and pre-training are complementary as shown in recent work ( Xu et al. , 2021 ; Zhang et al. , 2020 ) . In this paper , we introduce a new speech pre-training method which works by learning denoising representation of perturbed data with the teacher-student framework , named as Self-supervised Perturbation-Invariant Representation Learning ( SPIRAL ) . Compared to state-of-the-art speech pretraining methods such as wav2vec 2.0 ( Baevski et al. , 2020b ) and HuBERT ( Hsu et al. , 2021 ) , our method allows end-to-end training with a single contrastive loss , and without relying on discrete unit discovery techniques such as vector quantization ( Jégou et al. , 2011 ; Baevski et al. , 2020a ; b ) or iterative clustering process ( Hsu et al. , 2021 ) . We apply multi-condition training with SPIRAL ( Seltzer et al. , 2013 ; Ko et al. , 2015 ) to improve noise-robustness for the downstream speech tasks . SPIRAL is motivated by the observation that human tolerates speech perturbations or distortions fairly well . For example , people can communicate effectively in a noisy environment , or over a distorted telephone channel . Therefore , we hypothesize that by learning representation invariant to perturbation , the model will learn high-level representation which can enhance speech applications . To learn perturbation-invariant representation in a self-supervised way , we employ a teacher-student framework similar to Tarvainen & Valpola ( 2017 ) . During pre-training , given a speech utterance , we guide the student network which consumes the perturbed utterance to learn from the teacher network which consumes the clean utterance . The student is trained to produce denoised representation of the perturbed utterance similar to teacher ’ s representation of the clean utterance . Meanwhile , the teacher , which shares the same model architecture with student , is updated as moving average of the student ’ s weights over past training steps . We apply the in-utterance contrastive loss to avoid model collapse to trivial constant representation ( Chopra et al. , 2005 ) . As speech utterance are sequential data , there is another possible trivial solution which we call positional collapse . Positional collapse occurs when the student “ cheats ” by exploiting position correlation in teacher ’ s representation to minimize the loss , while ignoring the content of the input utterance . To prevent positional collapse , we propose position randomization by adding random number of paddings on both sides of input utterance to the teacher . Large-scale speech pre-training is computationally demanding . To reduce computation cost , we adopt a gradual down-sampling strategy in SPIRAL model , which has been verified effective in speech recognition literatures with negligible performance degradation ( Peddinti et al. , 2018 ; Han et al. , 2020b ; Huang et al. , 2020 ) . We also speculate that aggressive down-sampling helps to remove redundancy in speech . To evaluate the effectiveness of SPIRAL , we conduct experiments on LibriSpeech and Libri-Light datasets . By training a small convolutional classifier on the representation of a frozen SPIRAL model , we can achieve WER of 3.5 % and 6.4 % on Librispeech test-clean and test-other respectively . SPIRAL achieves competitive or better results compared to state-of-the-art speech pre-training methods , while being much more training-efficient . We also demonstrate that multi-condition pretrained SPIRAL are more robust to noisy speech with 9.0 % - 13.3 % relative word error rate ( WER ) reduction on real noisy test data from ChiME-3 ( Barker et al. , 2015 ) , compared to the model applying multi-condition training solely in fine-tuning stage . 2 RELATED WORK . Mean Teacher ( MT ) ( Tarvainen & Valpola , 2017 ) proposes using a student network to learn from a teacher network which is the moving average version of the student in the semi-supervised learning setting . The authors apply a supervised loss for labeled data and a consistency loss between teacher and student predictions for unlabeled data . However , direct application of MT to self-supervised learning leads to representation collapse ( Grill et al. , 2020 ) . Noisy student training ( NST ) ( Xie et al. , 2020 ; Park et al. , 2020b ) is a self-training method . NST demonstrates the importance of the aggressive injection of noise into the student . Although not emphasized , no noise is injected into pseudo-labeling process of the teacher . We consider our work as an extension of self-training approach to the self-supervised learning regime . Instead of using the teacher to provide pseudo-labels , we utilize the teacher for pseudo-reference representation . Denoising autoencoders ( Vincent et al. , 2008 ) learn to recover a clean input from a corrupted version . However , speech data contain redundancy which is irrelevant to some speech applications such as speech recognition . Previous work ( Baevski et al. , 2019 ) shows that speech pre-training by recovering masked input speech features is not effective . In SPIRAL , we instead enforce latent representation of a corrupted input to resemble that of the corresponding clean input . Bootstrap Your Own Latent ( BYOL ) ( Grill et al. , 2020 ) is a self-supervised image representation learning method . The method is based on a teacher-student framework similar to MT . The authors refer to student network as online network and teacher network as target network . They observe that naive application of MT to self-supervised learning leads to trivial constant representation . They prevent the representation collapse by appending a predictor to the student network . The theory behind is under investigation ( Chen & He , 2021 ; Tian et al. , 2021 ) . Our method draws inspirations from BYOL and shares the similar architecture , but there are crucial differences . Instead of learning a single global representation for an image as in BYOL , SPIRAL learns a sequence of representation for an utterance . We aim for sequence applications such as speech recognition . In our preliminary experiments , we observe that appending a predictor to student network is not sufficient to prevent trivial constant representation for sequential representation learning . We use in-utterance contrastive loss ( Baevski et al. , 2020b ) combined with input position randomization to successfully avoid representation collapse . We still keep the predictor in SPIRAL , but only for the sake of performance improvement from our observation . Another difference is that BYOL does not perform representation denoising . BYOL applies perturbation , which they call augmentation , to both the inputs of the teacher and the student . We demonstrate that representation denoising is crucial for speech pre-training . When perturbation is applied to the teacher ’ s input , the effectiveness of speech pre-training degrades drastically . Wav2vec 2.0 ( Baevski et al. , 2020b ) is a self-supervised speech representation learning method which belongs to the masked prediction family . Masked prediction methods are effective for text pre-training ( Devlin et al. , 2019 ) , but not for speech pre-training when naively applied ( Baevski et al. , 2019 ) . The reason is that speech data contains redundancy such as speaker information , pronunciation variations , which are irrelevant to the semantic meaning of the utterance . To overcome this problem , wav2vec 2.0 perform masking in intermediate latent space and performs target discretization with a differentiable quantization scheme . However , quantization leads to a more complex model by introducing additional hyper-parameters and an additional diversity loss . SPIRAL does not utilize quantization , and still achieves competitive performance compared to wav2vec 2.0 . We hypothesize that aggressive down-sampling and learning by matching output representation may help to remove redundancy from the learned representation . We leave the investigation of whether target discretization could further improve SPIRAL for future work . Liang et al . ( 2018 ) demonstrates that under the supervised learning setting , enforcing noise-invariant representation by penalizing difference between clean and noisy data improves ASR model accuracy . 3 METHOD . 3.1 SELF-SUPERVISED PERTURBATION-INVARIANT REPRESENTATION LEARNING . ( SPIRAL ) Figure 1 shows the diagram of SPIRAL in the pre-training stage , where we use two neural networks , a student Fθ and a teacher Fθ′ . The weights of the teacher θ′ is the moving average of the weights of the student θ . At step t , the weights of the teacher θ′t are updated as θ′t ← αtθ′t−1 + ( 1− αt ) θt , ( 1 ) where αt determines the rate of weight updates . Given a speech utterance X = ( x1 , . . . , xT ) of length T , the student takes a perturbed version X̃ = s ( X ) = ( x̃1 , . . . , x̃T ) as input where s ( · ) is a perturbation function . The output of the student is a representation sequence Z = F ( X̃ ; θ ) = ( z1 , . . . , zT ) . The teacher takes the same utterance without perturbation as input and output another representation sequence Z ′ = F ( X ; θ′ ) = ( z′1 , . . . , z ′ T ) . For each representation zi ∈ Z , the student is trained to match the teacher ’ s representation z′i at the same position amongst k distracting samples . The distracting samples are randomly drawn from other positions of the same utterance in Z ′ , which is found to be more effective than samples drawn from an entire batch of utterances ( Baevski et al. , 2020b ) . The in-utterance contrastive loss is defined following Sohn ( 2016 ) ; Wu et al . ( 2018 ) as , L = − T∑ i=1 log exp ( φ ( zi , z ′ i ) /κ ) ∑ j∈Di exp ( φ ( zi , z ′ j ) /κ ) , ( 2 ) where φ ( a , b ) = aTb/‖a‖‖b‖ is cosine similarity , Di is the set of indices of distractors for the i-th position , and κ is the temperature parameter . However , applying in-utterance contrastive loss could cause a kind of representation collapse which we refer to as positional collapse . Contrastive candidates are sampled based on their positions in utterances . When a teacher ’ s representation z′i is correlated with its position i ( e.g. , correlation introduced by positional encoding in Transformer ) , the student could exploit this correlation to generate its representation zi solely based on the position index i , while ignoring content of the input . In this case , the model does not learn meaningful representation of the input content . Therefore , we prevent positional collapse by randomizing positions of teacher ’ s representation . In particular , we add random number of padding data at both ends of the input to the teacher to randomly shift the position information for each output representation z′i . The student thereby is unable to exploit the spurious position information to minimize the contrastive loss . Note that when calculating the contrastive loss , we exclude the corresponding representation of the padded data . | This paper describes a self supervision training approach to pretrain speech encoders. This is related to recent work on wav2vec 2.0, and SimCLR. The contrastive loss is similar to wav2vec 2.0, while the invariance to perturbation (i.e. augmentation) is akin to SimCLR. Performance is competitive with wav2vec 2 on Librispeech. | SP:06c6269a39dae7127f7f54483c75131388a10738 |
SPIRAL: Self-supervised Perturbation-Invariant Representation Learning for Speech Pre-Training | 1 INTRODUCTION . Industrial-scale automatic speech recognition ( ASR ) systems are usually trained with ten-thousands of hours of hand-transcribed speech data ( Galvez et al. , 2021 ) . However , labeling speech data is expensive and time-consuming , especially for languages with small speaker populations , or for specific domains ( e.g. , legal , financial , scientific ) . Recently , methods of utilizing unlabeled speech data to improve speech recognition system have achieved remarkable progress . Amongst them , self-training ( Manohar et al. , 2015 ; Kahn et al. , 2020a ; Synnaeve et al. , 2020a ; Chen et al. , 2020b ; Xu et al. , 2020 ; Park et al. , 2020b ; Xiao et al. , 2021 ) , also known as pseudo-labeling , starts by training an ASR model with labeled speech data , which is referred to as teacher model . Then the teacher model , usually combined with a language model ( LM ) , is used to produce pseudo-labels for unlabeled speech data . Finally , the labeled data and the pseudo-labeled data are combined to train a new model , which is referred to as student model . The process is repeated by taking the student model as the teacher in next iteration . Another line of work is speech pre-training ( van den Oord et al. , 2019 ; Chung & Glass , 2020 ; Wang et al. , 2020 ; Baevski et al. , 2020b ; Liu et al. , 2020 ) . Pre-training learns speech representation from unlabeled data in a self-supervised way . The pre-trained model is then fine-tuned on the labeled data . Self-training and pre-training are complementary as shown in recent work ( Xu et al. , 2021 ; Zhang et al. , 2020 ) . In this paper , we introduce a new speech pre-training method which works by learning denoising representation of perturbed data with the teacher-student framework , named as Self-supervised Perturbation-Invariant Representation Learning ( SPIRAL ) . Compared to state-of-the-art speech pretraining methods such as wav2vec 2.0 ( Baevski et al. , 2020b ) and HuBERT ( Hsu et al. , 2021 ) , our method allows end-to-end training with a single contrastive loss , and without relying on discrete unit discovery techniques such as vector quantization ( Jégou et al. , 2011 ; Baevski et al. , 2020a ; b ) or iterative clustering process ( Hsu et al. , 2021 ) . We apply multi-condition training with SPIRAL ( Seltzer et al. , 2013 ; Ko et al. , 2015 ) to improve noise-robustness for the downstream speech tasks . SPIRAL is motivated by the observation that human tolerates speech perturbations or distortions fairly well . For example , people can communicate effectively in a noisy environment , or over a distorted telephone channel . Therefore , we hypothesize that by learning representation invariant to perturbation , the model will learn high-level representation which can enhance speech applications . To learn perturbation-invariant representation in a self-supervised way , we employ a teacher-student framework similar to Tarvainen & Valpola ( 2017 ) . During pre-training , given a speech utterance , we guide the student network which consumes the perturbed utterance to learn from the teacher network which consumes the clean utterance . The student is trained to produce denoised representation of the perturbed utterance similar to teacher ’ s representation of the clean utterance . Meanwhile , the teacher , which shares the same model architecture with student , is updated as moving average of the student ’ s weights over past training steps . We apply the in-utterance contrastive loss to avoid model collapse to trivial constant representation ( Chopra et al. , 2005 ) . As speech utterance are sequential data , there is another possible trivial solution which we call positional collapse . Positional collapse occurs when the student “ cheats ” by exploiting position correlation in teacher ’ s representation to minimize the loss , while ignoring the content of the input utterance . To prevent positional collapse , we propose position randomization by adding random number of paddings on both sides of input utterance to the teacher . Large-scale speech pre-training is computationally demanding . To reduce computation cost , we adopt a gradual down-sampling strategy in SPIRAL model , which has been verified effective in speech recognition literatures with negligible performance degradation ( Peddinti et al. , 2018 ; Han et al. , 2020b ; Huang et al. , 2020 ) . We also speculate that aggressive down-sampling helps to remove redundancy in speech . To evaluate the effectiveness of SPIRAL , we conduct experiments on LibriSpeech and Libri-Light datasets . By training a small convolutional classifier on the representation of a frozen SPIRAL model , we can achieve WER of 3.5 % and 6.4 % on Librispeech test-clean and test-other respectively . SPIRAL achieves competitive or better results compared to state-of-the-art speech pre-training methods , while being much more training-efficient . We also demonstrate that multi-condition pretrained SPIRAL are more robust to noisy speech with 9.0 % - 13.3 % relative word error rate ( WER ) reduction on real noisy test data from ChiME-3 ( Barker et al. , 2015 ) , compared to the model applying multi-condition training solely in fine-tuning stage . 2 RELATED WORK . Mean Teacher ( MT ) ( Tarvainen & Valpola , 2017 ) proposes using a student network to learn from a teacher network which is the moving average version of the student in the semi-supervised learning setting . The authors apply a supervised loss for labeled data and a consistency loss between teacher and student predictions for unlabeled data . However , direct application of MT to self-supervised learning leads to representation collapse ( Grill et al. , 2020 ) . Noisy student training ( NST ) ( Xie et al. , 2020 ; Park et al. , 2020b ) is a self-training method . NST demonstrates the importance of the aggressive injection of noise into the student . Although not emphasized , no noise is injected into pseudo-labeling process of the teacher . We consider our work as an extension of self-training approach to the self-supervised learning regime . Instead of using the teacher to provide pseudo-labels , we utilize the teacher for pseudo-reference representation . Denoising autoencoders ( Vincent et al. , 2008 ) learn to recover a clean input from a corrupted version . However , speech data contain redundancy which is irrelevant to some speech applications such as speech recognition . Previous work ( Baevski et al. , 2019 ) shows that speech pre-training by recovering masked input speech features is not effective . In SPIRAL , we instead enforce latent representation of a corrupted input to resemble that of the corresponding clean input . Bootstrap Your Own Latent ( BYOL ) ( Grill et al. , 2020 ) is a self-supervised image representation learning method . The method is based on a teacher-student framework similar to MT . The authors refer to student network as online network and teacher network as target network . They observe that naive application of MT to self-supervised learning leads to trivial constant representation . They prevent the representation collapse by appending a predictor to the student network . The theory behind is under investigation ( Chen & He , 2021 ; Tian et al. , 2021 ) . Our method draws inspirations from BYOL and shares the similar architecture , but there are crucial differences . Instead of learning a single global representation for an image as in BYOL , SPIRAL learns a sequence of representation for an utterance . We aim for sequence applications such as speech recognition . In our preliminary experiments , we observe that appending a predictor to student network is not sufficient to prevent trivial constant representation for sequential representation learning . We use in-utterance contrastive loss ( Baevski et al. , 2020b ) combined with input position randomization to successfully avoid representation collapse . We still keep the predictor in SPIRAL , but only for the sake of performance improvement from our observation . Another difference is that BYOL does not perform representation denoising . BYOL applies perturbation , which they call augmentation , to both the inputs of the teacher and the student . We demonstrate that representation denoising is crucial for speech pre-training . When perturbation is applied to the teacher ’ s input , the effectiveness of speech pre-training degrades drastically . Wav2vec 2.0 ( Baevski et al. , 2020b ) is a self-supervised speech representation learning method which belongs to the masked prediction family . Masked prediction methods are effective for text pre-training ( Devlin et al. , 2019 ) , but not for speech pre-training when naively applied ( Baevski et al. , 2019 ) . The reason is that speech data contains redundancy such as speaker information , pronunciation variations , which are irrelevant to the semantic meaning of the utterance . To overcome this problem , wav2vec 2.0 perform masking in intermediate latent space and performs target discretization with a differentiable quantization scheme . However , quantization leads to a more complex model by introducing additional hyper-parameters and an additional diversity loss . SPIRAL does not utilize quantization , and still achieves competitive performance compared to wav2vec 2.0 . We hypothesize that aggressive down-sampling and learning by matching output representation may help to remove redundancy from the learned representation . We leave the investigation of whether target discretization could further improve SPIRAL for future work . Liang et al . ( 2018 ) demonstrates that under the supervised learning setting , enforcing noise-invariant representation by penalizing difference between clean and noisy data improves ASR model accuracy . 3 METHOD . 3.1 SELF-SUPERVISED PERTURBATION-INVARIANT REPRESENTATION LEARNING . ( SPIRAL ) Figure 1 shows the diagram of SPIRAL in the pre-training stage , where we use two neural networks , a student Fθ and a teacher Fθ′ . The weights of the teacher θ′ is the moving average of the weights of the student θ . At step t , the weights of the teacher θ′t are updated as θ′t ← αtθ′t−1 + ( 1− αt ) θt , ( 1 ) where αt determines the rate of weight updates . Given a speech utterance X = ( x1 , . . . , xT ) of length T , the student takes a perturbed version X̃ = s ( X ) = ( x̃1 , . . . , x̃T ) as input where s ( · ) is a perturbation function . The output of the student is a representation sequence Z = F ( X̃ ; θ ) = ( z1 , . . . , zT ) . The teacher takes the same utterance without perturbation as input and output another representation sequence Z ′ = F ( X ; θ′ ) = ( z′1 , . . . , z ′ T ) . For each representation zi ∈ Z , the student is trained to match the teacher ’ s representation z′i at the same position amongst k distracting samples . The distracting samples are randomly drawn from other positions of the same utterance in Z ′ , which is found to be more effective than samples drawn from an entire batch of utterances ( Baevski et al. , 2020b ) . The in-utterance contrastive loss is defined following Sohn ( 2016 ) ; Wu et al . ( 2018 ) as , L = − T∑ i=1 log exp ( φ ( zi , z ′ i ) /κ ) ∑ j∈Di exp ( φ ( zi , z ′ j ) /κ ) , ( 2 ) where φ ( a , b ) = aTb/‖a‖‖b‖ is cosine similarity , Di is the set of indices of distractors for the i-th position , and κ is the temperature parameter . However , applying in-utterance contrastive loss could cause a kind of representation collapse which we refer to as positional collapse . Contrastive candidates are sampled based on their positions in utterances . When a teacher ’ s representation z′i is correlated with its position i ( e.g. , correlation introduced by positional encoding in Transformer ) , the student could exploit this correlation to generate its representation zi solely based on the position index i , while ignoring content of the input . In this case , the model does not learn meaningful representation of the input content . Therefore , we prevent positional collapse by randomizing positions of teacher ’ s representation . In particular , we add random number of padding data at both ends of the input to the teacher to randomly shift the position information for each output representation z′i . The student thereby is unable to exploit the spurious position information to minimize the contrastive loss . Note that when calculating the contrastive loss , we exclude the corresponding representation of the padded data . | The paper proposes a new speech pre-training approach named SPIRAL. The proposed method is trained by learning representation denoising of perturbed data with the teacher-student framework in a self-supervised manner. The motivation of the method is to learn the representation that is invariant to perturbation so that the learnt representation is a high-level one (e.g. carrying content information) that can enhance the downstream speech applications. Compared to the state-of-the-art speech pre-training method wav2vec 2.0, the proposed method can achieve competitive or better results but with a significant reduction of the training cost. The proposed method is also able to deal with the noise-robustness problem. | SP:06c6269a39dae7127f7f54483c75131388a10738 |
SPIRAL: Self-supervised Perturbation-Invariant Representation Learning for Speech Pre-Training | 1 INTRODUCTION . Industrial-scale automatic speech recognition ( ASR ) systems are usually trained with ten-thousands of hours of hand-transcribed speech data ( Galvez et al. , 2021 ) . However , labeling speech data is expensive and time-consuming , especially for languages with small speaker populations , or for specific domains ( e.g. , legal , financial , scientific ) . Recently , methods of utilizing unlabeled speech data to improve speech recognition system have achieved remarkable progress . Amongst them , self-training ( Manohar et al. , 2015 ; Kahn et al. , 2020a ; Synnaeve et al. , 2020a ; Chen et al. , 2020b ; Xu et al. , 2020 ; Park et al. , 2020b ; Xiao et al. , 2021 ) , also known as pseudo-labeling , starts by training an ASR model with labeled speech data , which is referred to as teacher model . Then the teacher model , usually combined with a language model ( LM ) , is used to produce pseudo-labels for unlabeled speech data . Finally , the labeled data and the pseudo-labeled data are combined to train a new model , which is referred to as student model . The process is repeated by taking the student model as the teacher in next iteration . Another line of work is speech pre-training ( van den Oord et al. , 2019 ; Chung & Glass , 2020 ; Wang et al. , 2020 ; Baevski et al. , 2020b ; Liu et al. , 2020 ) . Pre-training learns speech representation from unlabeled data in a self-supervised way . The pre-trained model is then fine-tuned on the labeled data . Self-training and pre-training are complementary as shown in recent work ( Xu et al. , 2021 ; Zhang et al. , 2020 ) . In this paper , we introduce a new speech pre-training method which works by learning denoising representation of perturbed data with the teacher-student framework , named as Self-supervised Perturbation-Invariant Representation Learning ( SPIRAL ) . Compared to state-of-the-art speech pretraining methods such as wav2vec 2.0 ( Baevski et al. , 2020b ) and HuBERT ( Hsu et al. , 2021 ) , our method allows end-to-end training with a single contrastive loss , and without relying on discrete unit discovery techniques such as vector quantization ( Jégou et al. , 2011 ; Baevski et al. , 2020a ; b ) or iterative clustering process ( Hsu et al. , 2021 ) . We apply multi-condition training with SPIRAL ( Seltzer et al. , 2013 ; Ko et al. , 2015 ) to improve noise-robustness for the downstream speech tasks . SPIRAL is motivated by the observation that human tolerates speech perturbations or distortions fairly well . For example , people can communicate effectively in a noisy environment , or over a distorted telephone channel . Therefore , we hypothesize that by learning representation invariant to perturbation , the model will learn high-level representation which can enhance speech applications . To learn perturbation-invariant representation in a self-supervised way , we employ a teacher-student framework similar to Tarvainen & Valpola ( 2017 ) . During pre-training , given a speech utterance , we guide the student network which consumes the perturbed utterance to learn from the teacher network which consumes the clean utterance . The student is trained to produce denoised representation of the perturbed utterance similar to teacher ’ s representation of the clean utterance . Meanwhile , the teacher , which shares the same model architecture with student , is updated as moving average of the student ’ s weights over past training steps . We apply the in-utterance contrastive loss to avoid model collapse to trivial constant representation ( Chopra et al. , 2005 ) . As speech utterance are sequential data , there is another possible trivial solution which we call positional collapse . Positional collapse occurs when the student “ cheats ” by exploiting position correlation in teacher ’ s representation to minimize the loss , while ignoring the content of the input utterance . To prevent positional collapse , we propose position randomization by adding random number of paddings on both sides of input utterance to the teacher . Large-scale speech pre-training is computationally demanding . To reduce computation cost , we adopt a gradual down-sampling strategy in SPIRAL model , which has been verified effective in speech recognition literatures with negligible performance degradation ( Peddinti et al. , 2018 ; Han et al. , 2020b ; Huang et al. , 2020 ) . We also speculate that aggressive down-sampling helps to remove redundancy in speech . To evaluate the effectiveness of SPIRAL , we conduct experiments on LibriSpeech and Libri-Light datasets . By training a small convolutional classifier on the representation of a frozen SPIRAL model , we can achieve WER of 3.5 % and 6.4 % on Librispeech test-clean and test-other respectively . SPIRAL achieves competitive or better results compared to state-of-the-art speech pre-training methods , while being much more training-efficient . We also demonstrate that multi-condition pretrained SPIRAL are more robust to noisy speech with 9.0 % - 13.3 % relative word error rate ( WER ) reduction on real noisy test data from ChiME-3 ( Barker et al. , 2015 ) , compared to the model applying multi-condition training solely in fine-tuning stage . 2 RELATED WORK . Mean Teacher ( MT ) ( Tarvainen & Valpola , 2017 ) proposes using a student network to learn from a teacher network which is the moving average version of the student in the semi-supervised learning setting . The authors apply a supervised loss for labeled data and a consistency loss between teacher and student predictions for unlabeled data . However , direct application of MT to self-supervised learning leads to representation collapse ( Grill et al. , 2020 ) . Noisy student training ( NST ) ( Xie et al. , 2020 ; Park et al. , 2020b ) is a self-training method . NST demonstrates the importance of the aggressive injection of noise into the student . Although not emphasized , no noise is injected into pseudo-labeling process of the teacher . We consider our work as an extension of self-training approach to the self-supervised learning regime . Instead of using the teacher to provide pseudo-labels , we utilize the teacher for pseudo-reference representation . Denoising autoencoders ( Vincent et al. , 2008 ) learn to recover a clean input from a corrupted version . However , speech data contain redundancy which is irrelevant to some speech applications such as speech recognition . Previous work ( Baevski et al. , 2019 ) shows that speech pre-training by recovering masked input speech features is not effective . In SPIRAL , we instead enforce latent representation of a corrupted input to resemble that of the corresponding clean input . Bootstrap Your Own Latent ( BYOL ) ( Grill et al. , 2020 ) is a self-supervised image representation learning method . The method is based on a teacher-student framework similar to MT . The authors refer to student network as online network and teacher network as target network . They observe that naive application of MT to self-supervised learning leads to trivial constant representation . They prevent the representation collapse by appending a predictor to the student network . The theory behind is under investigation ( Chen & He , 2021 ; Tian et al. , 2021 ) . Our method draws inspirations from BYOL and shares the similar architecture , but there are crucial differences . Instead of learning a single global representation for an image as in BYOL , SPIRAL learns a sequence of representation for an utterance . We aim for sequence applications such as speech recognition . In our preliminary experiments , we observe that appending a predictor to student network is not sufficient to prevent trivial constant representation for sequential representation learning . We use in-utterance contrastive loss ( Baevski et al. , 2020b ) combined with input position randomization to successfully avoid representation collapse . We still keep the predictor in SPIRAL , but only for the sake of performance improvement from our observation . Another difference is that BYOL does not perform representation denoising . BYOL applies perturbation , which they call augmentation , to both the inputs of the teacher and the student . We demonstrate that representation denoising is crucial for speech pre-training . When perturbation is applied to the teacher ’ s input , the effectiveness of speech pre-training degrades drastically . Wav2vec 2.0 ( Baevski et al. , 2020b ) is a self-supervised speech representation learning method which belongs to the masked prediction family . Masked prediction methods are effective for text pre-training ( Devlin et al. , 2019 ) , but not for speech pre-training when naively applied ( Baevski et al. , 2019 ) . The reason is that speech data contains redundancy such as speaker information , pronunciation variations , which are irrelevant to the semantic meaning of the utterance . To overcome this problem , wav2vec 2.0 perform masking in intermediate latent space and performs target discretization with a differentiable quantization scheme . However , quantization leads to a more complex model by introducing additional hyper-parameters and an additional diversity loss . SPIRAL does not utilize quantization , and still achieves competitive performance compared to wav2vec 2.0 . We hypothesize that aggressive down-sampling and learning by matching output representation may help to remove redundancy from the learned representation . We leave the investigation of whether target discretization could further improve SPIRAL for future work . Liang et al . ( 2018 ) demonstrates that under the supervised learning setting , enforcing noise-invariant representation by penalizing difference between clean and noisy data improves ASR model accuracy . 3 METHOD . 3.1 SELF-SUPERVISED PERTURBATION-INVARIANT REPRESENTATION LEARNING . ( SPIRAL ) Figure 1 shows the diagram of SPIRAL in the pre-training stage , where we use two neural networks , a student Fθ and a teacher Fθ′ . The weights of the teacher θ′ is the moving average of the weights of the student θ . At step t , the weights of the teacher θ′t are updated as θ′t ← αtθ′t−1 + ( 1− αt ) θt , ( 1 ) where αt determines the rate of weight updates . Given a speech utterance X = ( x1 , . . . , xT ) of length T , the student takes a perturbed version X̃ = s ( X ) = ( x̃1 , . . . , x̃T ) as input where s ( · ) is a perturbation function . The output of the student is a representation sequence Z = F ( X̃ ; θ ) = ( z1 , . . . , zT ) . The teacher takes the same utterance without perturbation as input and output another representation sequence Z ′ = F ( X ; θ′ ) = ( z′1 , . . . , z ′ T ) . For each representation zi ∈ Z , the student is trained to match the teacher ’ s representation z′i at the same position amongst k distracting samples . The distracting samples are randomly drawn from other positions of the same utterance in Z ′ , which is found to be more effective than samples drawn from an entire batch of utterances ( Baevski et al. , 2020b ) . The in-utterance contrastive loss is defined following Sohn ( 2016 ) ; Wu et al . ( 2018 ) as , L = − T∑ i=1 log exp ( φ ( zi , z ′ i ) /κ ) ∑ j∈Di exp ( φ ( zi , z ′ j ) /κ ) , ( 2 ) where φ ( a , b ) = aTb/‖a‖‖b‖ is cosine similarity , Di is the set of indices of distractors for the i-th position , and κ is the temperature parameter . However , applying in-utterance contrastive loss could cause a kind of representation collapse which we refer to as positional collapse . Contrastive candidates are sampled based on their positions in utterances . When a teacher ’ s representation z′i is correlated with its position i ( e.g. , correlation introduced by positional encoding in Transformer ) , the student could exploit this correlation to generate its representation zi solely based on the position index i , while ignoring content of the input . In this case , the model does not learn meaningful representation of the input content . Therefore , we prevent positional collapse by randomizing positions of teacher ’ s representation . In particular , we add random number of padding data at both ends of the input to the teacher to randomly shift the position information for each output representation z′i . The student thereby is unable to exploit the spurious position information to minimize the contrastive loss . Note that when calculating the contrastive loss , we exclude the corresponding representation of the padded data . | The paper introduces SPIRAL, a new method for self-supervised pre-training for speech. SPIRAL is based on the teacher-student framework similar to Mean Teacher (Tarvainen and Valpola, 2017) and BYOL (Grill et al., 2020) where the teacher’s weights are updated as a moving average of the student’s weights, but makes additional modifications for sequence tasks like speech: * An in-utterance contrastive loss is used as the pre-training objective. * Position randomization of the teacher’s input is used to avoid representation collapse. * Ablation experiments are done to show that the predictor (which was essential in earlier works like BYOL and SimSiam to avoid collapse) can be replaced with a convolutional projection head without performance degradation. Empirically, the main contributions of the paper are: 1. Achieving similar/better WER on LibriSpeech compared to wav2vec 2.0 with 35% of the training cost; and 2. Incorporating multi-condition training, which has been used in supervised training in the past, for noise-robust ASR. | SP:06c6269a39dae7127f7f54483c75131388a10738 |
Surreal-GAN:Semi-Supervised Representation Learning via GAN for uncovering heterogeneous disease-related imaging patterns | 1 INTRODUCTION . Neuroimaging , conventional machine learning , and deep learning have offered unprecedented opportunities to understand the underlying mechanism of brain disorders over the past decades ( Davatzikos ( 2018 ) ) , and pave the road towards individualized precision medicine ( Bzdok & MeyerLindenberg ( 2018 ) ) . A large body of case-control studies leverage mass univariate group comparisons to derive structural or functional neuroimaging signatures ( Habeck et al . ( 2008 ) , Hampel et al . ( 2008 ) , Ewers et al . ( 2011 ) ) . However , these studies suffer from under-powered statistical inferences since the heterogeneous nature of neurological diseases usually violate the assumption that each group population are pathologically homogeneous . A developing body of methodologies aim to disentangle this heterogeneity with various machine learning methods . Zhang et al . ( 2016 ) used the Bayesian Latent Dirichlet Allocation ( LDA ) model to identify latent atrophy patterns from voxel-wise gray matter ( GM ) density maps . However , due to the nature of the LDA model , the density maps need to be first discretized , and the model hypothesized to exclusively capture brain atrophy while ignoring the potential regional enlargement . Young et al . ( 2018 ) proposed another method , Sustain , to uncover temporal and phenotypic heterogeneity by inferring both subtypes and stages . However , the model only handles around 10-20 large brain regions without more detailed information . Notably , both methods applied directly in the PT domain , confront main limitations in avoiding potential disease-unrelated brain variations . In con- trast , semi-supervised clustering methods ( Varol et al . ( 2016 ) , Dong et al . ( 2015 ) , Wen et al . ( 2021 ) , Yang et al . ( 2021 ) ) were proposed to cluster patients via the patterns or transformations between the reference group ( CN ) and the target patient group ( PT ) . A recent proposed deep learning-based semi-supervised clustering method , termed Smile-GAN ( Yang et al . ( 2021 ) ) , achieved better clustering performance by learning multiple mappings from CN to PT with an inverse clustering function for both regularization and clustering . Albeit these methods demonstrated potential in clinical applications , they have a major limitation . In particular , these methods model disease heterogeneity as a dichotomous process and derive a discrete output , i.e. , subtype , ignoring the fact that brain disorders progress along a continuum . Moreover , variations among subtypes were contributed by both spatial and temporal differences in disease patterns , thus confounding further clinical analysis. ( Fig . 1a ) To address the aforementioned limitations , we propose a novel method , Surreal-GAN ( SemiSupervised Representation Learning via GAN ) , for deriving heterogeneity-refined imaging signatures . Surreal-GAN is a significant extension of Smile-GAN under the same principle of semisupervised learning by transforming data from CN domain X to PT domain Y. Herein , the key extension is to represent complex disease-related heterogeneity with low dimensional representations with each dimension indicating the severity of one relatively homogeneous imaging patterns ( Fig . 1b ) . We refer to these low dimensional representations as R-indices ( ri , where i represent the ith dimension ) of disease pattern . The first key point of the method is modelling disease as a continuous process and learning infinite transformation directions from CN to PT , with each direction capturing a specific combination of patterns and severity . The idea is realized by learning one transformation function which takes both normal data and a continuous latent variable as inputs and output synthesized-PT data whose distribution is indistinguishable from that of real PT data . The second key point is controlling the monotonicity ( from light to severe with increasing index value ) of disease patterns through one monotonicity loss and double sampling procedure . The third key point is boosting the separation of captured disease patterns through one orthogonality regularization . The fourth key point is introducing a inverse mapping function consisting of a decomposition part and a reconstruction part which further ensure that patterns synthesized through transformation are exactly captured for inferring representations of disease patterns , the R-indices . Besides the above mentioned regularization , function continuity , transformation sparsity and inverse consistency further guide the model to capture meaningful imaging patterns . To support our claims , we first validated Surreal-GAN on semi-synthetic data with known ground truth of disease patterns and severity . We compared performance of Surreal-GAN to NMF ( Lee & Seung ( 1999 ) ) , Factor Analysis and LDA ( Blei et al . ( 2001 ) ) models , and subsequently studied the robustness of model under various conditions . Finally , we applied the model to one real dataset for Alzheimer ’ s disease ( AD ) , and demonstrated significant correlations between the proposed imaging signatures and clincial variables . 2 METHODS . The schematic diagram of Surreal-GAN is shown in Fig . 1d . The model is applied on regional volume data ( volumes of different graymatter ( GM ) and whitematter ( WM ) regions ) derived from structural MRI . The essential idea is to learn one transformation function f : X ∗ Z → Y which transforms CN data x to different synthesized PT data y′ = f ( x , z ) , with latent variable z specifying distinct combinations of patterns and severity . Here , the Latent ( LAT ) domain , Z = { z : 0 ≤ zi ≤ 1 ∀1 ≤ i ≤ M } , is a class of vectors with dimension M ( predefined number of patterns ) . We denote four different data distributions as x ∼ pcn ( x ) , y ∼ ppt ( y ) , y′ ∼ psyn ( y′ ) and z ∼ plat ( z ) , respectively , where z ∼ plat ( z ) is sampled from a multivariate uniform distribution U [ 0 , 1 ] M , rather than a categorical distribution as in Smile-GAN . A continuous z variable lay the foundation for learning continuous representations . In addition to the transformation function , an adversarial discriminator D is introduced to distinguish between real PT data y and synthesized PT data y′ , thereby ensuring that the synthesized PT data are indistinguishable from real PT data ( i.e . minimizing the distance between real PT data distribution and synthesized PT data distribution ) . A continuous latent variable does not necessarily lead to desired properties of CN to PT transformation ( e.g . separation/monotonicity of captured patterns ) . That is , there are a number of functions potentially achieving equality in distributions , thus making it hard to guarantee that the transformation function learned by the model is closely related to the underlying pathology progression process . Moreover , during the training procedure , the transformation function backboned by the neural network tends to ignore the latent variable z . Even when the Latent variable z is emphasized through regularization , different components of z variable do not naturally lead to separate disease patterns and are not positively correlated with pattern severity . Therefore , with the assumption that there is one true underlying function for real PT data y = h ( x , z ) , Surreal-GAN aims to boost the transformation function f to approximate the true underlying function h , while having the latent variable , z , contributing to recognizable imaging patterns rather than being random ” activators ” of the GAN . For this purpose , we constrain the function class of f via different types of regularization as follows : 1 ) encourage sparse transformations ; 2 ) enforce Lipschitz continuity of functions ; 3 ) introduce one inverse function g : Y → Z serving to decompose and reconstruct ; 4 ) boost orthogonality among synthesized/captured patterns ; 5 ) enforce monotonicity of synthesized patterns and their positive correlations with components of z . The training procedure of Surreal-GAN is thus a adversarial learning process constrained by these regularization . 2.1 ADVERSARIAL LOSS . The adversarial loss ( Goodfellow et al . ( 2014 ) ) is used for iterative training of discriminator D and the transformation function f , which can be written as : LGAN ( D , f ) = Ey∼ppt ( y ) [ log ( D ( y ) ) ] + Ex∼pcn ( x ) , z∼Plat ( z ) [ log ( 1−D ( f ( x , z ) ) ) ] ( 1 ) = Ey∼ppt ( y ) [ log ( D ( y ) ) ] + Ey′∼psyn ( y′ ) [ log ( 1−D ( y ′ ) ) ] ( 2 ) The transformation function f attempts to transform CN data to synthesized PT data so that they follow similar distributions as real PT data . The discriminator , providing a probability that y comes from the real data rather than transformation function , tries to identify the synthesized PT data and distinguish it from real PT data . Therefore , the discriminator D attempts to maximize the adversarial loss function while the transformation function f attempts to minimize against it . The training process can be denoted as : min f max D LGAN ( D , f ) = Ey∼ppt ( y ) [ log ( D ( y ) ) ] + Ey′∼psyn ( y′ ) [ log ( 1−D ( y ′ ) ) ] ( 3 ) 2.2 REGULARIZATION . 2.2.1 SPARSE TRANSFORMATION . We assumed that disease process will not change brain anatomy dramatically and primarily only affect certain regions throughout most of disease stages , which means that the true underlying transformation only moderately changes some regions while keeping the rest mildly affected with most of z variable values . Therefore , to encourage sparsity and control the distance of transformations , we defined one change loss to be the l1 distance between the synthesized PT data and the original CN data : Lchange ( f ) = Ex∼pcn ( x ) , z∼plat ( z ) [ ||f ( x , z ) − x||1 ] ( 4 ) 2.2.2 LIPSCHITIZ CONTINUITY AND INVERSE MAPPING . First , by enforcing the transformation function f to be K1-Lipschitz continuous , we can derive that , for fixed latent variable z = a and ∀x1 , x2 ∈ X , ||f ( x1 , a ) − f ( x2 , a ) ||2 ≤ K1||x1−x2||2 . Thus , by controlling the constant K1 , we constrained the transformation function to preserve the original distances among CN data instead of scattering them into the PT domain if a same combination of disease patterns is imposed to them . Second , to prevent latent variable z from being ignored , we introduced an inverse mapping function from PT domain to Latent domain , g : Y → Z . By Lemma1 ( section A.1 ) , with function g being K2-Lipschitz continuous and d ( · , · ) being any distance metric satisfying triangular inequality , we can derive that , ∀z1 , z2 ∼ plat ( z ) , z1 6= z2 , and x̄ ∼ pcn ( x ) , d ( f ( x̄ , z1 ) , f ( x̄ , z2 ) ) is lower bounded by ( d ( z1 , z2 ) K2 − 1 K2 ( d ( g ( f ( x̄ , z1 ) ) , z1 ) + d ( g ( f ( x̄ , z2 ) ) , z2 ) ) ) . Therefore , by minimizing the distance between sampled latent variable z and reconstructed latent variable g ( f ( x , z ) ) , we can control differences between synthesized patterns to be positively related to the distances between latent variables , and thus to be non-trivial ( i.e. , same CN data is transformed to significantly different PT data with different z variables ) . Therefore , we define a reconstruction loss as the l2 distance between g ( f ( x , z ) ) and z : Lrecons ( f , g ) = Ex∼pcn ( x ) , z∼plat ( z ) [ ||g ( f ( x , z ) ) − z||2 ] ( 5 ) | In this paper, the authors pointed out the lack of a good method to predict disease progression in a continuum based on representations explicitly modeling specific disease effects. To tackle this problem, they proposed a novel method called Surreal-GAN, a tailored version of generative adversarial networks, to learn separate representations of neurological and neuropsychiatric diseases in an unsupervised manner. The method frames the diseased brains as multiple disease-related features at various severity imposed on normal brains, and by learning these features and severities, it can generate a representation with improved reliability and explanability. | SP:b6bd63dca07fa144b3248eb357cb23af0212f01a |
Surreal-GAN:Semi-Supervised Representation Learning via GAN for uncovering heterogeneous disease-related imaging patterns | 1 INTRODUCTION . Neuroimaging , conventional machine learning , and deep learning have offered unprecedented opportunities to understand the underlying mechanism of brain disorders over the past decades ( Davatzikos ( 2018 ) ) , and pave the road towards individualized precision medicine ( Bzdok & MeyerLindenberg ( 2018 ) ) . A large body of case-control studies leverage mass univariate group comparisons to derive structural or functional neuroimaging signatures ( Habeck et al . ( 2008 ) , Hampel et al . ( 2008 ) , Ewers et al . ( 2011 ) ) . However , these studies suffer from under-powered statistical inferences since the heterogeneous nature of neurological diseases usually violate the assumption that each group population are pathologically homogeneous . A developing body of methodologies aim to disentangle this heterogeneity with various machine learning methods . Zhang et al . ( 2016 ) used the Bayesian Latent Dirichlet Allocation ( LDA ) model to identify latent atrophy patterns from voxel-wise gray matter ( GM ) density maps . However , due to the nature of the LDA model , the density maps need to be first discretized , and the model hypothesized to exclusively capture brain atrophy while ignoring the potential regional enlargement . Young et al . ( 2018 ) proposed another method , Sustain , to uncover temporal and phenotypic heterogeneity by inferring both subtypes and stages . However , the model only handles around 10-20 large brain regions without more detailed information . Notably , both methods applied directly in the PT domain , confront main limitations in avoiding potential disease-unrelated brain variations . In con- trast , semi-supervised clustering methods ( Varol et al . ( 2016 ) , Dong et al . ( 2015 ) , Wen et al . ( 2021 ) , Yang et al . ( 2021 ) ) were proposed to cluster patients via the patterns or transformations between the reference group ( CN ) and the target patient group ( PT ) . A recent proposed deep learning-based semi-supervised clustering method , termed Smile-GAN ( Yang et al . ( 2021 ) ) , achieved better clustering performance by learning multiple mappings from CN to PT with an inverse clustering function for both regularization and clustering . Albeit these methods demonstrated potential in clinical applications , they have a major limitation . In particular , these methods model disease heterogeneity as a dichotomous process and derive a discrete output , i.e. , subtype , ignoring the fact that brain disorders progress along a continuum . Moreover , variations among subtypes were contributed by both spatial and temporal differences in disease patterns , thus confounding further clinical analysis. ( Fig . 1a ) To address the aforementioned limitations , we propose a novel method , Surreal-GAN ( SemiSupervised Representation Learning via GAN ) , for deriving heterogeneity-refined imaging signatures . Surreal-GAN is a significant extension of Smile-GAN under the same principle of semisupervised learning by transforming data from CN domain X to PT domain Y. Herein , the key extension is to represent complex disease-related heterogeneity with low dimensional representations with each dimension indicating the severity of one relatively homogeneous imaging patterns ( Fig . 1b ) . We refer to these low dimensional representations as R-indices ( ri , where i represent the ith dimension ) of disease pattern . The first key point of the method is modelling disease as a continuous process and learning infinite transformation directions from CN to PT , with each direction capturing a specific combination of patterns and severity . The idea is realized by learning one transformation function which takes both normal data and a continuous latent variable as inputs and output synthesized-PT data whose distribution is indistinguishable from that of real PT data . The second key point is controlling the monotonicity ( from light to severe with increasing index value ) of disease patterns through one monotonicity loss and double sampling procedure . The third key point is boosting the separation of captured disease patterns through one orthogonality regularization . The fourth key point is introducing a inverse mapping function consisting of a decomposition part and a reconstruction part which further ensure that patterns synthesized through transformation are exactly captured for inferring representations of disease patterns , the R-indices . Besides the above mentioned regularization , function continuity , transformation sparsity and inverse consistency further guide the model to capture meaningful imaging patterns . To support our claims , we first validated Surreal-GAN on semi-synthetic data with known ground truth of disease patterns and severity . We compared performance of Surreal-GAN to NMF ( Lee & Seung ( 1999 ) ) , Factor Analysis and LDA ( Blei et al . ( 2001 ) ) models , and subsequently studied the robustness of model under various conditions . Finally , we applied the model to one real dataset for Alzheimer ’ s disease ( AD ) , and demonstrated significant correlations between the proposed imaging signatures and clincial variables . 2 METHODS . The schematic diagram of Surreal-GAN is shown in Fig . 1d . The model is applied on regional volume data ( volumes of different graymatter ( GM ) and whitematter ( WM ) regions ) derived from structural MRI . The essential idea is to learn one transformation function f : X ∗ Z → Y which transforms CN data x to different synthesized PT data y′ = f ( x , z ) , with latent variable z specifying distinct combinations of patterns and severity . Here , the Latent ( LAT ) domain , Z = { z : 0 ≤ zi ≤ 1 ∀1 ≤ i ≤ M } , is a class of vectors with dimension M ( predefined number of patterns ) . We denote four different data distributions as x ∼ pcn ( x ) , y ∼ ppt ( y ) , y′ ∼ psyn ( y′ ) and z ∼ plat ( z ) , respectively , where z ∼ plat ( z ) is sampled from a multivariate uniform distribution U [ 0 , 1 ] M , rather than a categorical distribution as in Smile-GAN . A continuous z variable lay the foundation for learning continuous representations . In addition to the transformation function , an adversarial discriminator D is introduced to distinguish between real PT data y and synthesized PT data y′ , thereby ensuring that the synthesized PT data are indistinguishable from real PT data ( i.e . minimizing the distance between real PT data distribution and synthesized PT data distribution ) . A continuous latent variable does not necessarily lead to desired properties of CN to PT transformation ( e.g . separation/monotonicity of captured patterns ) . That is , there are a number of functions potentially achieving equality in distributions , thus making it hard to guarantee that the transformation function learned by the model is closely related to the underlying pathology progression process . Moreover , during the training procedure , the transformation function backboned by the neural network tends to ignore the latent variable z . Even when the Latent variable z is emphasized through regularization , different components of z variable do not naturally lead to separate disease patterns and are not positively correlated with pattern severity . Therefore , with the assumption that there is one true underlying function for real PT data y = h ( x , z ) , Surreal-GAN aims to boost the transformation function f to approximate the true underlying function h , while having the latent variable , z , contributing to recognizable imaging patterns rather than being random ” activators ” of the GAN . For this purpose , we constrain the function class of f via different types of regularization as follows : 1 ) encourage sparse transformations ; 2 ) enforce Lipschitz continuity of functions ; 3 ) introduce one inverse function g : Y → Z serving to decompose and reconstruct ; 4 ) boost orthogonality among synthesized/captured patterns ; 5 ) enforce monotonicity of synthesized patterns and their positive correlations with components of z . The training procedure of Surreal-GAN is thus a adversarial learning process constrained by these regularization . 2.1 ADVERSARIAL LOSS . The adversarial loss ( Goodfellow et al . ( 2014 ) ) is used for iterative training of discriminator D and the transformation function f , which can be written as : LGAN ( D , f ) = Ey∼ppt ( y ) [ log ( D ( y ) ) ] + Ex∼pcn ( x ) , z∼Plat ( z ) [ log ( 1−D ( f ( x , z ) ) ) ] ( 1 ) = Ey∼ppt ( y ) [ log ( D ( y ) ) ] + Ey′∼psyn ( y′ ) [ log ( 1−D ( y ′ ) ) ] ( 2 ) The transformation function f attempts to transform CN data to synthesized PT data so that they follow similar distributions as real PT data . The discriminator , providing a probability that y comes from the real data rather than transformation function , tries to identify the synthesized PT data and distinguish it from real PT data . Therefore , the discriminator D attempts to maximize the adversarial loss function while the transformation function f attempts to minimize against it . The training process can be denoted as : min f max D LGAN ( D , f ) = Ey∼ppt ( y ) [ log ( D ( y ) ) ] + Ey′∼psyn ( y′ ) [ log ( 1−D ( y ′ ) ) ] ( 3 ) 2.2 REGULARIZATION . 2.2.1 SPARSE TRANSFORMATION . We assumed that disease process will not change brain anatomy dramatically and primarily only affect certain regions throughout most of disease stages , which means that the true underlying transformation only moderately changes some regions while keeping the rest mildly affected with most of z variable values . Therefore , to encourage sparsity and control the distance of transformations , we defined one change loss to be the l1 distance between the synthesized PT data and the original CN data : Lchange ( f ) = Ex∼pcn ( x ) , z∼plat ( z ) [ ||f ( x , z ) − x||1 ] ( 4 ) 2.2.2 LIPSCHITIZ CONTINUITY AND INVERSE MAPPING . First , by enforcing the transformation function f to be K1-Lipschitz continuous , we can derive that , for fixed latent variable z = a and ∀x1 , x2 ∈ X , ||f ( x1 , a ) − f ( x2 , a ) ||2 ≤ K1||x1−x2||2 . Thus , by controlling the constant K1 , we constrained the transformation function to preserve the original distances among CN data instead of scattering them into the PT domain if a same combination of disease patterns is imposed to them . Second , to prevent latent variable z from being ignored , we introduced an inverse mapping function from PT domain to Latent domain , g : Y → Z . By Lemma1 ( section A.1 ) , with function g being K2-Lipschitz continuous and d ( · , · ) being any distance metric satisfying triangular inequality , we can derive that , ∀z1 , z2 ∼ plat ( z ) , z1 6= z2 , and x̄ ∼ pcn ( x ) , d ( f ( x̄ , z1 ) , f ( x̄ , z2 ) ) is lower bounded by ( d ( z1 , z2 ) K2 − 1 K2 ( d ( g ( f ( x̄ , z1 ) ) , z1 ) + d ( g ( f ( x̄ , z2 ) ) , z2 ) ) ) . Therefore , by minimizing the distance between sampled latent variable z and reconstructed latent variable g ( f ( x , z ) ) , we can control differences between synthesized patterns to be positively related to the distances between latent variables , and thus to be non-trivial ( i.e. , same CN data is transformed to significantly different PT data with different z variables ) . Therefore , we define a reconstruction loss as the l2 distance between g ( f ( x , z ) ) and z : Lrecons ( f , g ) = Ex∼pcn ( x ) , z∼plat ( z ) [ ||g ( f ( x , z ) ) − z||2 ] ( 5 ) | In this paper, the authors present a method for learning a representation of disease-related image patterns from regional volume information generated from structural MRI images. The method is based on a GAN approach, and different regularization methods on the latent representation are presented to improve the learning of disease-related representations. There are four contributions presented in the paper: 1. Modelling a disease as a continuous process 2. Controlling the monotonicity of the disease pattern 3. Separation of captured disease pattern 4. Inverse Mapping to ensure that disease patterns synthesized are captured The evaluation of the method is performed on semi-synthetic data sets and an actual Alzheimer’s disease data set. The results show that the method can identify two clinically informative patterns. | SP:b6bd63dca07fa144b3248eb357cb23af0212f01a |
Surreal-GAN:Semi-Supervised Representation Learning via GAN for uncovering heterogeneous disease-related imaging patterns | 1 INTRODUCTION . Neuroimaging , conventional machine learning , and deep learning have offered unprecedented opportunities to understand the underlying mechanism of brain disorders over the past decades ( Davatzikos ( 2018 ) ) , and pave the road towards individualized precision medicine ( Bzdok & MeyerLindenberg ( 2018 ) ) . A large body of case-control studies leverage mass univariate group comparisons to derive structural or functional neuroimaging signatures ( Habeck et al . ( 2008 ) , Hampel et al . ( 2008 ) , Ewers et al . ( 2011 ) ) . However , these studies suffer from under-powered statistical inferences since the heterogeneous nature of neurological diseases usually violate the assumption that each group population are pathologically homogeneous . A developing body of methodologies aim to disentangle this heterogeneity with various machine learning methods . Zhang et al . ( 2016 ) used the Bayesian Latent Dirichlet Allocation ( LDA ) model to identify latent atrophy patterns from voxel-wise gray matter ( GM ) density maps . However , due to the nature of the LDA model , the density maps need to be first discretized , and the model hypothesized to exclusively capture brain atrophy while ignoring the potential regional enlargement . Young et al . ( 2018 ) proposed another method , Sustain , to uncover temporal and phenotypic heterogeneity by inferring both subtypes and stages . However , the model only handles around 10-20 large brain regions without more detailed information . Notably , both methods applied directly in the PT domain , confront main limitations in avoiding potential disease-unrelated brain variations . In con- trast , semi-supervised clustering methods ( Varol et al . ( 2016 ) , Dong et al . ( 2015 ) , Wen et al . ( 2021 ) , Yang et al . ( 2021 ) ) were proposed to cluster patients via the patterns or transformations between the reference group ( CN ) and the target patient group ( PT ) . A recent proposed deep learning-based semi-supervised clustering method , termed Smile-GAN ( Yang et al . ( 2021 ) ) , achieved better clustering performance by learning multiple mappings from CN to PT with an inverse clustering function for both regularization and clustering . Albeit these methods demonstrated potential in clinical applications , they have a major limitation . In particular , these methods model disease heterogeneity as a dichotomous process and derive a discrete output , i.e. , subtype , ignoring the fact that brain disorders progress along a continuum . Moreover , variations among subtypes were contributed by both spatial and temporal differences in disease patterns , thus confounding further clinical analysis. ( Fig . 1a ) To address the aforementioned limitations , we propose a novel method , Surreal-GAN ( SemiSupervised Representation Learning via GAN ) , for deriving heterogeneity-refined imaging signatures . Surreal-GAN is a significant extension of Smile-GAN under the same principle of semisupervised learning by transforming data from CN domain X to PT domain Y. Herein , the key extension is to represent complex disease-related heterogeneity with low dimensional representations with each dimension indicating the severity of one relatively homogeneous imaging patterns ( Fig . 1b ) . We refer to these low dimensional representations as R-indices ( ri , where i represent the ith dimension ) of disease pattern . The first key point of the method is modelling disease as a continuous process and learning infinite transformation directions from CN to PT , with each direction capturing a specific combination of patterns and severity . The idea is realized by learning one transformation function which takes both normal data and a continuous latent variable as inputs and output synthesized-PT data whose distribution is indistinguishable from that of real PT data . The second key point is controlling the monotonicity ( from light to severe with increasing index value ) of disease patterns through one monotonicity loss and double sampling procedure . The third key point is boosting the separation of captured disease patterns through one orthogonality regularization . The fourth key point is introducing a inverse mapping function consisting of a decomposition part and a reconstruction part which further ensure that patterns synthesized through transformation are exactly captured for inferring representations of disease patterns , the R-indices . Besides the above mentioned regularization , function continuity , transformation sparsity and inverse consistency further guide the model to capture meaningful imaging patterns . To support our claims , we first validated Surreal-GAN on semi-synthetic data with known ground truth of disease patterns and severity . We compared performance of Surreal-GAN to NMF ( Lee & Seung ( 1999 ) ) , Factor Analysis and LDA ( Blei et al . ( 2001 ) ) models , and subsequently studied the robustness of model under various conditions . Finally , we applied the model to one real dataset for Alzheimer ’ s disease ( AD ) , and demonstrated significant correlations between the proposed imaging signatures and clincial variables . 2 METHODS . The schematic diagram of Surreal-GAN is shown in Fig . 1d . The model is applied on regional volume data ( volumes of different graymatter ( GM ) and whitematter ( WM ) regions ) derived from structural MRI . The essential idea is to learn one transformation function f : X ∗ Z → Y which transforms CN data x to different synthesized PT data y′ = f ( x , z ) , with latent variable z specifying distinct combinations of patterns and severity . Here , the Latent ( LAT ) domain , Z = { z : 0 ≤ zi ≤ 1 ∀1 ≤ i ≤ M } , is a class of vectors with dimension M ( predefined number of patterns ) . We denote four different data distributions as x ∼ pcn ( x ) , y ∼ ppt ( y ) , y′ ∼ psyn ( y′ ) and z ∼ plat ( z ) , respectively , where z ∼ plat ( z ) is sampled from a multivariate uniform distribution U [ 0 , 1 ] M , rather than a categorical distribution as in Smile-GAN . A continuous z variable lay the foundation for learning continuous representations . In addition to the transformation function , an adversarial discriminator D is introduced to distinguish between real PT data y and synthesized PT data y′ , thereby ensuring that the synthesized PT data are indistinguishable from real PT data ( i.e . minimizing the distance between real PT data distribution and synthesized PT data distribution ) . A continuous latent variable does not necessarily lead to desired properties of CN to PT transformation ( e.g . separation/monotonicity of captured patterns ) . That is , there are a number of functions potentially achieving equality in distributions , thus making it hard to guarantee that the transformation function learned by the model is closely related to the underlying pathology progression process . Moreover , during the training procedure , the transformation function backboned by the neural network tends to ignore the latent variable z . Even when the Latent variable z is emphasized through regularization , different components of z variable do not naturally lead to separate disease patterns and are not positively correlated with pattern severity . Therefore , with the assumption that there is one true underlying function for real PT data y = h ( x , z ) , Surreal-GAN aims to boost the transformation function f to approximate the true underlying function h , while having the latent variable , z , contributing to recognizable imaging patterns rather than being random ” activators ” of the GAN . For this purpose , we constrain the function class of f via different types of regularization as follows : 1 ) encourage sparse transformations ; 2 ) enforce Lipschitz continuity of functions ; 3 ) introduce one inverse function g : Y → Z serving to decompose and reconstruct ; 4 ) boost orthogonality among synthesized/captured patterns ; 5 ) enforce monotonicity of synthesized patterns and their positive correlations with components of z . The training procedure of Surreal-GAN is thus a adversarial learning process constrained by these regularization . 2.1 ADVERSARIAL LOSS . The adversarial loss ( Goodfellow et al . ( 2014 ) ) is used for iterative training of discriminator D and the transformation function f , which can be written as : LGAN ( D , f ) = Ey∼ppt ( y ) [ log ( D ( y ) ) ] + Ex∼pcn ( x ) , z∼Plat ( z ) [ log ( 1−D ( f ( x , z ) ) ) ] ( 1 ) = Ey∼ppt ( y ) [ log ( D ( y ) ) ] + Ey′∼psyn ( y′ ) [ log ( 1−D ( y ′ ) ) ] ( 2 ) The transformation function f attempts to transform CN data to synthesized PT data so that they follow similar distributions as real PT data . The discriminator , providing a probability that y comes from the real data rather than transformation function , tries to identify the synthesized PT data and distinguish it from real PT data . Therefore , the discriminator D attempts to maximize the adversarial loss function while the transformation function f attempts to minimize against it . The training process can be denoted as : min f max D LGAN ( D , f ) = Ey∼ppt ( y ) [ log ( D ( y ) ) ] + Ey′∼psyn ( y′ ) [ log ( 1−D ( y ′ ) ) ] ( 3 ) 2.2 REGULARIZATION . 2.2.1 SPARSE TRANSFORMATION . We assumed that disease process will not change brain anatomy dramatically and primarily only affect certain regions throughout most of disease stages , which means that the true underlying transformation only moderately changes some regions while keeping the rest mildly affected with most of z variable values . Therefore , to encourage sparsity and control the distance of transformations , we defined one change loss to be the l1 distance between the synthesized PT data and the original CN data : Lchange ( f ) = Ex∼pcn ( x ) , z∼plat ( z ) [ ||f ( x , z ) − x||1 ] ( 4 ) 2.2.2 LIPSCHITIZ CONTINUITY AND INVERSE MAPPING . First , by enforcing the transformation function f to be K1-Lipschitz continuous , we can derive that , for fixed latent variable z = a and ∀x1 , x2 ∈ X , ||f ( x1 , a ) − f ( x2 , a ) ||2 ≤ K1||x1−x2||2 . Thus , by controlling the constant K1 , we constrained the transformation function to preserve the original distances among CN data instead of scattering them into the PT domain if a same combination of disease patterns is imposed to them . Second , to prevent latent variable z from being ignored , we introduced an inverse mapping function from PT domain to Latent domain , g : Y → Z . By Lemma1 ( section A.1 ) , with function g being K2-Lipschitz continuous and d ( · , · ) being any distance metric satisfying triangular inequality , we can derive that , ∀z1 , z2 ∼ plat ( z ) , z1 6= z2 , and x̄ ∼ pcn ( x ) , d ( f ( x̄ , z1 ) , f ( x̄ , z2 ) ) is lower bounded by ( d ( z1 , z2 ) K2 − 1 K2 ( d ( g ( f ( x̄ , z1 ) ) , z1 ) + d ( g ( f ( x̄ , z2 ) ) , z2 ) ) ) . Therefore , by minimizing the distance between sampled latent variable z and reconstructed latent variable g ( f ( x , z ) ) , we can control differences between synthesized patterns to be positively related to the distances between latent variables , and thus to be non-trivial ( i.e. , same CN data is transformed to significantly different PT data with different z variables ) . Therefore , we define a reconstruction loss as the l2 distance between g ( f ( x , z ) ) and z : Lrecons ( f , g ) = Ex∼pcn ( x ) , z∼plat ( z ) [ ||g ( f ( x , z ) ) − z||2 ] ( 5 ) | Surreal-GAN aims to create fake pathological data with a latent variable and a healthy input and includes an inverse function that predicts the latent variable from a fake/real pathological data. However, unlike its predecessor model Smile-GAN, this adds 5 regularizations (L1 loss between generated output and input, L2 loss between the latent variable and the reverse generated latent variable, decomposing the latent variable, making the latent variables orthogonal to each other, and adding positive correlation to disease pattern and the latent variable) to make the latent variable more interpretable and continuous. This would increase the interpretability since instead of clustering the real data it could be used as understanding how severe the patient’s disease progress is. The results show that the model has a higher c-index than NMF, LDA and FA model predictions. It also shows that the best number of patterns for the model to predict is two, and it indeed has positive correlation to the severity of the disease. | SP:b6bd63dca07fa144b3248eb357cb23af0212f01a |
On the Importance of Difficulty Calibration in Membership Inference Attacks | The vulnerability of machine learning models to membership inference attacks has received much attention in recent years . However , existing attacks mostly remain impractical due to having high false positive rates , where non-member samples are often erroneously predicted as members . This type of error makes the predicted membership signal unreliable , especially since most samples are non-members in real world applications . In this work , we argue that membership inference attacks can benefit drastically from difficulty calibration , where an attack ’ s predicted membership score is adjusted to the difficulty of correctly classifying the target sample . We show that difficulty calibration can significantly reduce the false positive rate of a variety of existing attacks without a loss in accuracy . 1 INTRODUCTION . Modern applications of machine learning often involve training models on sensitive data such as health records and personal information . Unfortunately , recent studies have found that these models can memorize their training data to a large extent , compromising the privacy of participants in the training dataset ( Fredrikson et al. , 2014 ; 2015 ; Shokri et al. , 2017 ; Carlini et al. , 2019 ) . One prominent category of privacy attacks against machine learning is the so-called membership inference attack ( Shokri et al. , 2017 ; Yeom et al. , 2018 ) , where the adversary aims to infer the participation of an individual in the target model ’ s training set . Such an attack is undoubtedly damaging when the status of participation itself is considered sensitive , e.g. , if the training dataset consists of health records of cancer patients . Moreover , the ability to infer membership can be viewed as a lower bound for the model ’ s degree of memorization ( Yeom et al. , 2018 ) , which is useful in itself as an empirical quantifier of privacy loss ( Jagielski et al. , 2020 ; Nasr et al. , 2021 ) . The efficacy of membership inference attacks has been improved significantly since the first attempts ( Salem et al. , 2018 ; Sablayrolles et al. , 2019 ; Leino & Fredrikson , 2020 ) . However , the most common evaluation metric , attack accuracy , overlooks the crucial factor of the false positive rate ( FPR ) of non-members ( Rezaei & Liu , 2021 ) . Indeed , most attacks operate by first defining a membership score s ( h , z ) for the model h and a target input-label pair z = ( x , y ) that measures how much h memorized the sample z . The attack subsequently selects a threshold τ and predicts that z is a member if and only if s ( h , z ) > τ . For typical choices of the membership scoring function , there is usually a large overlap in the distribution of s ( h , z ) between members and non-members ( see Figure 1a ) . As a result , an attack that determines the membership of z by thresholding on s ( h , z ) will have a high FPR . This drawback renders most existing attacks unreliable since the vast majority of samples likely belong to the non-member class . In this study , we identify the lack of difficulty calibration as a core contributor to the high FPR of existing attacks . Specifically , a non-member sample may have a high membership score simply because it is over-represented in the data distribution . Consequently , an attack that determines a sample is likely to be a member due to having a high score will inevitably fail on these over-represented samples . To remedy this problem , we make the acute observation that if the membership score is measured in comparison to a typical model trained on data drawn from the same data distribution , this difference in behavior can serve as a much more reliable membership signal . Indeed , Figure 1b shows the histogram of scores s ( h , z ) after difficulty calibration , where the member and non-member scores have significantly better separation and low FPR is now attainable . We propose difficulty calibration as a general technique for improving score-based membership inference attacks , and modify several membership scoring functions such as confidence ( Salem et al. , 2018 ) , loss ( Yeom et al. , 2018 ) , and gradient norm ( Nasr et al. , 2019 ) to construct their calibrated variants . Evaluated on a comprehensive suite of benchmark datasets , we show that calibrated attacks achieve a significantly lower FPR compared to prior work . In particular , we measure the trade-off between true positives and false positives using the area under ROC curve ( AUC ) metric , and show that difficulty calibration drastically improves this trade-off compared to uncalibrated attacks , by up to 0.10 AUC on common ML benchmarks . In addition , calibrated attacks also drastically improve the precision-recall trade-off , while remaining on-par with or better than uncalibrated attacks in terms attack accuracy . Our results suggest that it may be important for future work to apply difficulty calibration to design more reliable and practical membership inference attacks . 2 BACKGROUND . Membership inference attacks are concerned with determining whether a given sample was part of a target model ’ s training set . Homer et al . ( 2008 ) showed in their pioneering study that it is possible to infer an individual ’ s presence in a complex genomic DNA mixture , which led to increased caution around releases of DNA data ( Zerhouni & Nabel , 2008 ) . Recent interest in member inference attacks was sparked by the work of Shokri et al . ( 2017 ) , who introduced the shadow models method : An adversary trains substitute models ( called shadow models ) to mimic the behavior of the model under attack ( called the target model ) . The adversary then observes the behavior of the shadow models when exposed to member and non-member samples , and uses this observation to train an attack meta-model for predicting membership on any given sample . Shokri et al . ( 2017 ) evaluated this attack on ML models trained on cloud APIs , and showed that the shadow models approach attains high levels of accuracy . Score-based attacks . Yeom et al . ( 2018 ) discovered a connection between membership inference attacks and overfitting , arguing that in principle , attack accuracy can be determined by how much the target model memorizes ( or overfits to ) the given sample ( x , y ) . This discovery led to a series of work on quantifying the degree of memorization via membership scores , which can be used for predicting that the given sample is a member when the score is high . The membership score can be computed using the loss ( Yeom et al. , 2018 ) , the gradient norm ( GN ) ( Nasr et al. , 2019 ) or the confidence of the model ’ s prediction ( Salem et al. , 2018 ) , often yielding state-of-the-art results ( Salem et al. , 2018 ; Choquette-Choo et al. , 2021 ) . We define these scores for the cross-entropy loss ` : sloss ( h , ( x , y ) ) = − ` ( h ( x ) , y ) : = log ( h ( x ) y ) , ( 1 ) sGN ( h , ( x , y ) ) = −‖∇ ` ( h ( x ) , y ) ‖2 , ( 2 ) sconfidence ( h , ( x , y ) ) = −max y′ ` ( h ( x ) , y′ ) = max i log ( h ( x ) i ) . ( 3 ) Label-only attacks . The above score-based attacks rely on continuous-valued predictions from the model in order to define the membership score . To counter these attacks , prior work considered obfuscating the model ’ s output by returning only the top label or modifying the predicted values ( Shokri et al. , 2017 ; Jia et al. , 2019 ) . However , subsequent studies showed that even with only hard-label output , it is still possible to define membership scores that attain close to state-of-the-art accuracy ( Li & Zhang , 2020 ; Choquette-Choo et al. , 2021 ) . High-precision attacks . Various forms of difficulty calibration have been considered in the context of high-precision attacks . Long et al . ( 2018 ) selected samples that differ the most in loss between the target and a set of reference models , and showed that the resulting attack has high precision even for well-generalized target models . Carlini et al . ( 2020 ) showed that such privacy attacks are also possible on large-scale language models such as GPT-2 ( Radford et al. , 2019 ) . Their attack operates by first generating a large number of sentences from the language model and then ranking these sentences by the ( log ) perplexity , with lower perplexity indicating a more plausible memorized training sample . These perplexity values are then divided by either the z-lib entropy or the perplexity given by a smaller language model to account for the sentence ’ s rarity . In effect , only rare sentences with low perplexity can minimize the resulting score . Both attacks leverage a form of difficulty calibration by comparing the target model ’ s loss with that of reference models , predicting membership only when the difference ( or ratio ) is large . Differential privacy as a mitigation . Differential privacy ( Dwork et al. , 2006 ) ( DP ) is a powerful mathematical framework for privacy-preserving data analysis . A randomized algorithmM satisfies ( , δ ) -differential privacy if , given any two datasets D and D′ that differ in at most one sample , and for any subset R of the output space , we have : P ( M ( D ) ∈ R ) ≤ exp ( ) P ( M ( D′ ) ∈ R ) + δ . ( 4 ) Under mild assumptions , DP provably protects against a variety of privacy attacks , in particular membership inference ( Yeom et al. , 2018 ; Sablayrolles et al. , 2019 ) . Abadi et al . ( 2016 ) proposed a differentially private version of stochastic gradient descent ( SGD ) , called DP-SGD , to enable differentially private training of generic ML models . Their analysis has further been refined ( Mironov , 2017 ; Mironov et al. , 2019 ) and has been shown experimentally to be tight ( Nasr et al. , 2021 ) . 3 DIFFICULTY CALIBRATION . As depicted in Figure 1 , prior works on score-based membership inference attack are very unreliable for separating easy-to-predict non-members from hard-to-predict members since both can attain a high membership score . We argue that a simple modification to the score , which we call difficulty calibration , can drastically improve the attack ’ s reliability . This approach has been applied to the loss score for high-precision attack against well-generalized models ( Long et al. , 2018 ) . Let s ( h , ( x , y ) ) be the membership score , where higher score indicates a stronger signal that the sample ( x , y ) is a member . Instead of computing the membership score only on the target model h , we sample multiple “ typical ” models trained on the same data distribution as h and evaluate the membership score on these models . Doing so calibrates s ( h , ( x , y ) ) to the difficulty of the sample . For instance , if ( x , y ) is an easy-to-predict non-member , then s ( h , ( x , y ) ) is high but typical models g would also perform well on ( x , y ) , hence s ( g , ( x , y ) ) would also be high . The small gap between s ( h , ( x , y ) ) and s ( g , ( x , y ) ) suggests that ( x , y ) is likely a non-member . Formally , let Dshadow be a shadow dataset drawn from the same data distribution as the training set of h , and let A be a randomized training algorithm that samples from a distribution over models trained on Dshadow . We define the calibrated score as : scal ( h , ( x , y ) ) = s ( h , ( x , y ) ) − Eg←A ( Dshadow ) [ s ( g , ( x , y ) ) ] , ( 5 ) where the expectation is approximated by sampling one or more models from A ( Dshadow ) . The membership inference attack proceeds by thresholding on the score scal ( h , ( x , y ) ) . Efficient difficulty calibration via forgetting . Faithfully executing the difficulty calibration algorithm in Equation 5 requires training multiple models g using the randomized training algorithm A . This can be prohibitively expensive if the model is large , which is the case with modern neural networks such as large-scale transformers ( Brown et al. , 2020 ) . An alternative , more efficient approach if given white-box access to the target model h is to warmstart training on h. In fact , this approach establishes an explicit connection between membership inference attacks and catastrophic forgetting in neural networks ( Goodfellow et al. , 2013 ; Kirkpatrick et al. , 2017 ) . Toneva et al . ( 2018 ) observed that when a trained model resumes training on a separate dataset drawn from the same data distribution , it is very likely to “ forget ” about its original training samples . The training examples that are most likely forgotten are ones with abnormal or distinctive features , and this set of examples is stable across different training runs . We leverage this phenomenon to define a more efficient variant of difficulty calibration . Connection to posterior inference . Under a simplifying assumption of the distribution A ( D ) induced by the training algorithm , it is possible to derive difficulty calibration as an approximation to an optimal white-box attack . Sablayrolles et al . ( 2019 ) proposed a formal analysis of membership inference , where they assumed that the density function of A ( D ) has the form : p ( h ; D ) ∝ e− ∑ ( x , y ) ∈D ` ( h ( x ) , y ) , ( 6 ) which can be formally derived for optimization using SGD under certain conditions ( Sato & Nakagawa , 2014 ) . The implied threat model in differential privacy assumes that the adversary has knowledge that the training dataset is either D or D′ = D ∪ { ( x , y ) } for some inference target ( x , y ) , and D is known to the adversary . It can be shown that the Bayes-optimal attack strategy under this setting is to threshold on the calibrated score in Equation 5 , where s = sloss andD = Dshadow ( Sablayrolles et al. , 2019 ) . This analysis can be generalized to any scoring function s ( h , ( x , y ) ) , such as gradient norm ( Equation 2 ) and confidence ( Equation 3 ) . | This paper focuses on the analysis of membership inference attacks (MIAs), in particular addressing the problem of high false positive rate (FPR) that still affects the state-of-the-art solutions. The authors suggest an approach to MIA that is based on difficulty calibration, i.e., a method where the predicted membership score is adjusted to the difficulty of obtaining the correct classification for the target sample, in order to reduce the FPR. As illustrated in Figure 1, previous work on the score-based membership inference attack is highly unreliable for separating easy-to-predict non-members from hard-to-predict members, as both can achieve high membership scores. This technique appears to be particularly beneficial in helping to distinguish between member and non-member samples that are overrepresented in the data distribution. The authors support the proposed method with a large body of mostly favorable experimental results. | SP:3a93d4de45b7e741239ef3be0eded717fe8ca453 |
On the Importance of Difficulty Calibration in Membership Inference Attacks | The vulnerability of machine learning models to membership inference attacks has received much attention in recent years . However , existing attacks mostly remain impractical due to having high false positive rates , where non-member samples are often erroneously predicted as members . This type of error makes the predicted membership signal unreliable , especially since most samples are non-members in real world applications . In this work , we argue that membership inference attacks can benefit drastically from difficulty calibration , where an attack ’ s predicted membership score is adjusted to the difficulty of correctly classifying the target sample . We show that difficulty calibration can significantly reduce the false positive rate of a variety of existing attacks without a loss in accuracy . 1 INTRODUCTION . Modern applications of machine learning often involve training models on sensitive data such as health records and personal information . Unfortunately , recent studies have found that these models can memorize their training data to a large extent , compromising the privacy of participants in the training dataset ( Fredrikson et al. , 2014 ; 2015 ; Shokri et al. , 2017 ; Carlini et al. , 2019 ) . One prominent category of privacy attacks against machine learning is the so-called membership inference attack ( Shokri et al. , 2017 ; Yeom et al. , 2018 ) , where the adversary aims to infer the participation of an individual in the target model ’ s training set . Such an attack is undoubtedly damaging when the status of participation itself is considered sensitive , e.g. , if the training dataset consists of health records of cancer patients . Moreover , the ability to infer membership can be viewed as a lower bound for the model ’ s degree of memorization ( Yeom et al. , 2018 ) , which is useful in itself as an empirical quantifier of privacy loss ( Jagielski et al. , 2020 ; Nasr et al. , 2021 ) . The efficacy of membership inference attacks has been improved significantly since the first attempts ( Salem et al. , 2018 ; Sablayrolles et al. , 2019 ; Leino & Fredrikson , 2020 ) . However , the most common evaluation metric , attack accuracy , overlooks the crucial factor of the false positive rate ( FPR ) of non-members ( Rezaei & Liu , 2021 ) . Indeed , most attacks operate by first defining a membership score s ( h , z ) for the model h and a target input-label pair z = ( x , y ) that measures how much h memorized the sample z . The attack subsequently selects a threshold τ and predicts that z is a member if and only if s ( h , z ) > τ . For typical choices of the membership scoring function , there is usually a large overlap in the distribution of s ( h , z ) between members and non-members ( see Figure 1a ) . As a result , an attack that determines the membership of z by thresholding on s ( h , z ) will have a high FPR . This drawback renders most existing attacks unreliable since the vast majority of samples likely belong to the non-member class . In this study , we identify the lack of difficulty calibration as a core contributor to the high FPR of existing attacks . Specifically , a non-member sample may have a high membership score simply because it is over-represented in the data distribution . Consequently , an attack that determines a sample is likely to be a member due to having a high score will inevitably fail on these over-represented samples . To remedy this problem , we make the acute observation that if the membership score is measured in comparison to a typical model trained on data drawn from the same data distribution , this difference in behavior can serve as a much more reliable membership signal . Indeed , Figure 1b shows the histogram of scores s ( h , z ) after difficulty calibration , where the member and non-member scores have significantly better separation and low FPR is now attainable . We propose difficulty calibration as a general technique for improving score-based membership inference attacks , and modify several membership scoring functions such as confidence ( Salem et al. , 2018 ) , loss ( Yeom et al. , 2018 ) , and gradient norm ( Nasr et al. , 2019 ) to construct their calibrated variants . Evaluated on a comprehensive suite of benchmark datasets , we show that calibrated attacks achieve a significantly lower FPR compared to prior work . In particular , we measure the trade-off between true positives and false positives using the area under ROC curve ( AUC ) metric , and show that difficulty calibration drastically improves this trade-off compared to uncalibrated attacks , by up to 0.10 AUC on common ML benchmarks . In addition , calibrated attacks also drastically improve the precision-recall trade-off , while remaining on-par with or better than uncalibrated attacks in terms attack accuracy . Our results suggest that it may be important for future work to apply difficulty calibration to design more reliable and practical membership inference attacks . 2 BACKGROUND . Membership inference attacks are concerned with determining whether a given sample was part of a target model ’ s training set . Homer et al . ( 2008 ) showed in their pioneering study that it is possible to infer an individual ’ s presence in a complex genomic DNA mixture , which led to increased caution around releases of DNA data ( Zerhouni & Nabel , 2008 ) . Recent interest in member inference attacks was sparked by the work of Shokri et al . ( 2017 ) , who introduced the shadow models method : An adversary trains substitute models ( called shadow models ) to mimic the behavior of the model under attack ( called the target model ) . The adversary then observes the behavior of the shadow models when exposed to member and non-member samples , and uses this observation to train an attack meta-model for predicting membership on any given sample . Shokri et al . ( 2017 ) evaluated this attack on ML models trained on cloud APIs , and showed that the shadow models approach attains high levels of accuracy . Score-based attacks . Yeom et al . ( 2018 ) discovered a connection between membership inference attacks and overfitting , arguing that in principle , attack accuracy can be determined by how much the target model memorizes ( or overfits to ) the given sample ( x , y ) . This discovery led to a series of work on quantifying the degree of memorization via membership scores , which can be used for predicting that the given sample is a member when the score is high . The membership score can be computed using the loss ( Yeom et al. , 2018 ) , the gradient norm ( GN ) ( Nasr et al. , 2019 ) or the confidence of the model ’ s prediction ( Salem et al. , 2018 ) , often yielding state-of-the-art results ( Salem et al. , 2018 ; Choquette-Choo et al. , 2021 ) . We define these scores for the cross-entropy loss ` : sloss ( h , ( x , y ) ) = − ` ( h ( x ) , y ) : = log ( h ( x ) y ) , ( 1 ) sGN ( h , ( x , y ) ) = −‖∇ ` ( h ( x ) , y ) ‖2 , ( 2 ) sconfidence ( h , ( x , y ) ) = −max y′ ` ( h ( x ) , y′ ) = max i log ( h ( x ) i ) . ( 3 ) Label-only attacks . The above score-based attacks rely on continuous-valued predictions from the model in order to define the membership score . To counter these attacks , prior work considered obfuscating the model ’ s output by returning only the top label or modifying the predicted values ( Shokri et al. , 2017 ; Jia et al. , 2019 ) . However , subsequent studies showed that even with only hard-label output , it is still possible to define membership scores that attain close to state-of-the-art accuracy ( Li & Zhang , 2020 ; Choquette-Choo et al. , 2021 ) . High-precision attacks . Various forms of difficulty calibration have been considered in the context of high-precision attacks . Long et al . ( 2018 ) selected samples that differ the most in loss between the target and a set of reference models , and showed that the resulting attack has high precision even for well-generalized target models . Carlini et al . ( 2020 ) showed that such privacy attacks are also possible on large-scale language models such as GPT-2 ( Radford et al. , 2019 ) . Their attack operates by first generating a large number of sentences from the language model and then ranking these sentences by the ( log ) perplexity , with lower perplexity indicating a more plausible memorized training sample . These perplexity values are then divided by either the z-lib entropy or the perplexity given by a smaller language model to account for the sentence ’ s rarity . In effect , only rare sentences with low perplexity can minimize the resulting score . Both attacks leverage a form of difficulty calibration by comparing the target model ’ s loss with that of reference models , predicting membership only when the difference ( or ratio ) is large . Differential privacy as a mitigation . Differential privacy ( Dwork et al. , 2006 ) ( DP ) is a powerful mathematical framework for privacy-preserving data analysis . A randomized algorithmM satisfies ( , δ ) -differential privacy if , given any two datasets D and D′ that differ in at most one sample , and for any subset R of the output space , we have : P ( M ( D ) ∈ R ) ≤ exp ( ) P ( M ( D′ ) ∈ R ) + δ . ( 4 ) Under mild assumptions , DP provably protects against a variety of privacy attacks , in particular membership inference ( Yeom et al. , 2018 ; Sablayrolles et al. , 2019 ) . Abadi et al . ( 2016 ) proposed a differentially private version of stochastic gradient descent ( SGD ) , called DP-SGD , to enable differentially private training of generic ML models . Their analysis has further been refined ( Mironov , 2017 ; Mironov et al. , 2019 ) and has been shown experimentally to be tight ( Nasr et al. , 2021 ) . 3 DIFFICULTY CALIBRATION . As depicted in Figure 1 , prior works on score-based membership inference attack are very unreliable for separating easy-to-predict non-members from hard-to-predict members since both can attain a high membership score . We argue that a simple modification to the score , which we call difficulty calibration , can drastically improve the attack ’ s reliability . This approach has been applied to the loss score for high-precision attack against well-generalized models ( Long et al. , 2018 ) . Let s ( h , ( x , y ) ) be the membership score , where higher score indicates a stronger signal that the sample ( x , y ) is a member . Instead of computing the membership score only on the target model h , we sample multiple “ typical ” models trained on the same data distribution as h and evaluate the membership score on these models . Doing so calibrates s ( h , ( x , y ) ) to the difficulty of the sample . For instance , if ( x , y ) is an easy-to-predict non-member , then s ( h , ( x , y ) ) is high but typical models g would also perform well on ( x , y ) , hence s ( g , ( x , y ) ) would also be high . The small gap between s ( h , ( x , y ) ) and s ( g , ( x , y ) ) suggests that ( x , y ) is likely a non-member . Formally , let Dshadow be a shadow dataset drawn from the same data distribution as the training set of h , and let A be a randomized training algorithm that samples from a distribution over models trained on Dshadow . We define the calibrated score as : scal ( h , ( x , y ) ) = s ( h , ( x , y ) ) − Eg←A ( Dshadow ) [ s ( g , ( x , y ) ) ] , ( 5 ) where the expectation is approximated by sampling one or more models from A ( Dshadow ) . The membership inference attack proceeds by thresholding on the score scal ( h , ( x , y ) ) . Efficient difficulty calibration via forgetting . Faithfully executing the difficulty calibration algorithm in Equation 5 requires training multiple models g using the randomized training algorithm A . This can be prohibitively expensive if the model is large , which is the case with modern neural networks such as large-scale transformers ( Brown et al. , 2020 ) . An alternative , more efficient approach if given white-box access to the target model h is to warmstart training on h. In fact , this approach establishes an explicit connection between membership inference attacks and catastrophic forgetting in neural networks ( Goodfellow et al. , 2013 ; Kirkpatrick et al. , 2017 ) . Toneva et al . ( 2018 ) observed that when a trained model resumes training on a separate dataset drawn from the same data distribution , it is very likely to “ forget ” about its original training samples . The training examples that are most likely forgotten are ones with abnormal or distinctive features , and this set of examples is stable across different training runs . We leverage this phenomenon to define a more efficient variant of difficulty calibration . Connection to posterior inference . Under a simplifying assumption of the distribution A ( D ) induced by the training algorithm , it is possible to derive difficulty calibration as an approximation to an optimal white-box attack . Sablayrolles et al . ( 2019 ) proposed a formal analysis of membership inference , where they assumed that the density function of A ( D ) has the form : p ( h ; D ) ∝ e− ∑ ( x , y ) ∈D ` ( h ( x ) , y ) , ( 6 ) which can be formally derived for optimization using SGD under certain conditions ( Sato & Nakagawa , 2014 ) . The implied threat model in differential privacy assumes that the adversary has knowledge that the training dataset is either D or D′ = D ∪ { ( x , y ) } for some inference target ( x , y ) , and D is known to the adversary . It can be shown that the Bayes-optimal attack strategy under this setting is to threshold on the calibrated score in Equation 5 , where s = sloss andD = Dshadow ( Sablayrolles et al. , 2019 ) . This analysis can be generalized to any scoring function s ( h , ( x , y ) ) , such as gradient norm ( Equation 2 ) and confidence ( Equation 3 ) . | The paper aims to solve the issue of high false positive rates in modern membership inference attack methods by computing the difference in model prediction metrics (e.g., loss, confidence) between the target model and a reference model. The intuition is that “easy-to-predict non-members” will have a small difference between the target and the reference model, while “hard-to-predict members” will have a large difference. Experimental results on multiple datasets also validate the effectiveness of proposed method. | SP:3a93d4de45b7e741239ef3be0eded717fe8ca453 |
On the Importance of Difficulty Calibration in Membership Inference Attacks | The vulnerability of machine learning models to membership inference attacks has received much attention in recent years . However , existing attacks mostly remain impractical due to having high false positive rates , where non-member samples are often erroneously predicted as members . This type of error makes the predicted membership signal unreliable , especially since most samples are non-members in real world applications . In this work , we argue that membership inference attacks can benefit drastically from difficulty calibration , where an attack ’ s predicted membership score is adjusted to the difficulty of correctly classifying the target sample . We show that difficulty calibration can significantly reduce the false positive rate of a variety of existing attacks without a loss in accuracy . 1 INTRODUCTION . Modern applications of machine learning often involve training models on sensitive data such as health records and personal information . Unfortunately , recent studies have found that these models can memorize their training data to a large extent , compromising the privacy of participants in the training dataset ( Fredrikson et al. , 2014 ; 2015 ; Shokri et al. , 2017 ; Carlini et al. , 2019 ) . One prominent category of privacy attacks against machine learning is the so-called membership inference attack ( Shokri et al. , 2017 ; Yeom et al. , 2018 ) , where the adversary aims to infer the participation of an individual in the target model ’ s training set . Such an attack is undoubtedly damaging when the status of participation itself is considered sensitive , e.g. , if the training dataset consists of health records of cancer patients . Moreover , the ability to infer membership can be viewed as a lower bound for the model ’ s degree of memorization ( Yeom et al. , 2018 ) , which is useful in itself as an empirical quantifier of privacy loss ( Jagielski et al. , 2020 ; Nasr et al. , 2021 ) . The efficacy of membership inference attacks has been improved significantly since the first attempts ( Salem et al. , 2018 ; Sablayrolles et al. , 2019 ; Leino & Fredrikson , 2020 ) . However , the most common evaluation metric , attack accuracy , overlooks the crucial factor of the false positive rate ( FPR ) of non-members ( Rezaei & Liu , 2021 ) . Indeed , most attacks operate by first defining a membership score s ( h , z ) for the model h and a target input-label pair z = ( x , y ) that measures how much h memorized the sample z . The attack subsequently selects a threshold τ and predicts that z is a member if and only if s ( h , z ) > τ . For typical choices of the membership scoring function , there is usually a large overlap in the distribution of s ( h , z ) between members and non-members ( see Figure 1a ) . As a result , an attack that determines the membership of z by thresholding on s ( h , z ) will have a high FPR . This drawback renders most existing attacks unreliable since the vast majority of samples likely belong to the non-member class . In this study , we identify the lack of difficulty calibration as a core contributor to the high FPR of existing attacks . Specifically , a non-member sample may have a high membership score simply because it is over-represented in the data distribution . Consequently , an attack that determines a sample is likely to be a member due to having a high score will inevitably fail on these over-represented samples . To remedy this problem , we make the acute observation that if the membership score is measured in comparison to a typical model trained on data drawn from the same data distribution , this difference in behavior can serve as a much more reliable membership signal . Indeed , Figure 1b shows the histogram of scores s ( h , z ) after difficulty calibration , where the member and non-member scores have significantly better separation and low FPR is now attainable . We propose difficulty calibration as a general technique for improving score-based membership inference attacks , and modify several membership scoring functions such as confidence ( Salem et al. , 2018 ) , loss ( Yeom et al. , 2018 ) , and gradient norm ( Nasr et al. , 2019 ) to construct their calibrated variants . Evaluated on a comprehensive suite of benchmark datasets , we show that calibrated attacks achieve a significantly lower FPR compared to prior work . In particular , we measure the trade-off between true positives and false positives using the area under ROC curve ( AUC ) metric , and show that difficulty calibration drastically improves this trade-off compared to uncalibrated attacks , by up to 0.10 AUC on common ML benchmarks . In addition , calibrated attacks also drastically improve the precision-recall trade-off , while remaining on-par with or better than uncalibrated attacks in terms attack accuracy . Our results suggest that it may be important for future work to apply difficulty calibration to design more reliable and practical membership inference attacks . 2 BACKGROUND . Membership inference attacks are concerned with determining whether a given sample was part of a target model ’ s training set . Homer et al . ( 2008 ) showed in their pioneering study that it is possible to infer an individual ’ s presence in a complex genomic DNA mixture , which led to increased caution around releases of DNA data ( Zerhouni & Nabel , 2008 ) . Recent interest in member inference attacks was sparked by the work of Shokri et al . ( 2017 ) , who introduced the shadow models method : An adversary trains substitute models ( called shadow models ) to mimic the behavior of the model under attack ( called the target model ) . The adversary then observes the behavior of the shadow models when exposed to member and non-member samples , and uses this observation to train an attack meta-model for predicting membership on any given sample . Shokri et al . ( 2017 ) evaluated this attack on ML models trained on cloud APIs , and showed that the shadow models approach attains high levels of accuracy . Score-based attacks . Yeom et al . ( 2018 ) discovered a connection between membership inference attacks and overfitting , arguing that in principle , attack accuracy can be determined by how much the target model memorizes ( or overfits to ) the given sample ( x , y ) . This discovery led to a series of work on quantifying the degree of memorization via membership scores , which can be used for predicting that the given sample is a member when the score is high . The membership score can be computed using the loss ( Yeom et al. , 2018 ) , the gradient norm ( GN ) ( Nasr et al. , 2019 ) or the confidence of the model ’ s prediction ( Salem et al. , 2018 ) , often yielding state-of-the-art results ( Salem et al. , 2018 ; Choquette-Choo et al. , 2021 ) . We define these scores for the cross-entropy loss ` : sloss ( h , ( x , y ) ) = − ` ( h ( x ) , y ) : = log ( h ( x ) y ) , ( 1 ) sGN ( h , ( x , y ) ) = −‖∇ ` ( h ( x ) , y ) ‖2 , ( 2 ) sconfidence ( h , ( x , y ) ) = −max y′ ` ( h ( x ) , y′ ) = max i log ( h ( x ) i ) . ( 3 ) Label-only attacks . The above score-based attacks rely on continuous-valued predictions from the model in order to define the membership score . To counter these attacks , prior work considered obfuscating the model ’ s output by returning only the top label or modifying the predicted values ( Shokri et al. , 2017 ; Jia et al. , 2019 ) . However , subsequent studies showed that even with only hard-label output , it is still possible to define membership scores that attain close to state-of-the-art accuracy ( Li & Zhang , 2020 ; Choquette-Choo et al. , 2021 ) . High-precision attacks . Various forms of difficulty calibration have been considered in the context of high-precision attacks . Long et al . ( 2018 ) selected samples that differ the most in loss between the target and a set of reference models , and showed that the resulting attack has high precision even for well-generalized target models . Carlini et al . ( 2020 ) showed that such privacy attacks are also possible on large-scale language models such as GPT-2 ( Radford et al. , 2019 ) . Their attack operates by first generating a large number of sentences from the language model and then ranking these sentences by the ( log ) perplexity , with lower perplexity indicating a more plausible memorized training sample . These perplexity values are then divided by either the z-lib entropy or the perplexity given by a smaller language model to account for the sentence ’ s rarity . In effect , only rare sentences with low perplexity can minimize the resulting score . Both attacks leverage a form of difficulty calibration by comparing the target model ’ s loss with that of reference models , predicting membership only when the difference ( or ratio ) is large . Differential privacy as a mitigation . Differential privacy ( Dwork et al. , 2006 ) ( DP ) is a powerful mathematical framework for privacy-preserving data analysis . A randomized algorithmM satisfies ( , δ ) -differential privacy if , given any two datasets D and D′ that differ in at most one sample , and for any subset R of the output space , we have : P ( M ( D ) ∈ R ) ≤ exp ( ) P ( M ( D′ ) ∈ R ) + δ . ( 4 ) Under mild assumptions , DP provably protects against a variety of privacy attacks , in particular membership inference ( Yeom et al. , 2018 ; Sablayrolles et al. , 2019 ) . Abadi et al . ( 2016 ) proposed a differentially private version of stochastic gradient descent ( SGD ) , called DP-SGD , to enable differentially private training of generic ML models . Their analysis has further been refined ( Mironov , 2017 ; Mironov et al. , 2019 ) and has been shown experimentally to be tight ( Nasr et al. , 2021 ) . 3 DIFFICULTY CALIBRATION . As depicted in Figure 1 , prior works on score-based membership inference attack are very unreliable for separating easy-to-predict non-members from hard-to-predict members since both can attain a high membership score . We argue that a simple modification to the score , which we call difficulty calibration , can drastically improve the attack ’ s reliability . This approach has been applied to the loss score for high-precision attack against well-generalized models ( Long et al. , 2018 ) . Let s ( h , ( x , y ) ) be the membership score , where higher score indicates a stronger signal that the sample ( x , y ) is a member . Instead of computing the membership score only on the target model h , we sample multiple “ typical ” models trained on the same data distribution as h and evaluate the membership score on these models . Doing so calibrates s ( h , ( x , y ) ) to the difficulty of the sample . For instance , if ( x , y ) is an easy-to-predict non-member , then s ( h , ( x , y ) ) is high but typical models g would also perform well on ( x , y ) , hence s ( g , ( x , y ) ) would also be high . The small gap between s ( h , ( x , y ) ) and s ( g , ( x , y ) ) suggests that ( x , y ) is likely a non-member . Formally , let Dshadow be a shadow dataset drawn from the same data distribution as the training set of h , and let A be a randomized training algorithm that samples from a distribution over models trained on Dshadow . We define the calibrated score as : scal ( h , ( x , y ) ) = s ( h , ( x , y ) ) − Eg←A ( Dshadow ) [ s ( g , ( x , y ) ) ] , ( 5 ) where the expectation is approximated by sampling one or more models from A ( Dshadow ) . The membership inference attack proceeds by thresholding on the score scal ( h , ( x , y ) ) . Efficient difficulty calibration via forgetting . Faithfully executing the difficulty calibration algorithm in Equation 5 requires training multiple models g using the randomized training algorithm A . This can be prohibitively expensive if the model is large , which is the case with modern neural networks such as large-scale transformers ( Brown et al. , 2020 ) . An alternative , more efficient approach if given white-box access to the target model h is to warmstart training on h. In fact , this approach establishes an explicit connection between membership inference attacks and catastrophic forgetting in neural networks ( Goodfellow et al. , 2013 ; Kirkpatrick et al. , 2017 ) . Toneva et al . ( 2018 ) observed that when a trained model resumes training on a separate dataset drawn from the same data distribution , it is very likely to “ forget ” about its original training samples . The training examples that are most likely forgotten are ones with abnormal or distinctive features , and this set of examples is stable across different training runs . We leverage this phenomenon to define a more efficient variant of difficulty calibration . Connection to posterior inference . Under a simplifying assumption of the distribution A ( D ) induced by the training algorithm , it is possible to derive difficulty calibration as an approximation to an optimal white-box attack . Sablayrolles et al . ( 2019 ) proposed a formal analysis of membership inference , where they assumed that the density function of A ( D ) has the form : p ( h ; D ) ∝ e− ∑ ( x , y ) ∈D ` ( h ( x ) , y ) , ( 6 ) which can be formally derived for optimization using SGD under certain conditions ( Sato & Nakagawa , 2014 ) . The implied threat model in differential privacy assumes that the adversary has knowledge that the training dataset is either D or D′ = D ∪ { ( x , y ) } for some inference target ( x , y ) , and D is known to the adversary . It can be shown that the Bayes-optimal attack strategy under this setting is to threshold on the calibrated score in Equation 5 , where s = sloss andD = Dshadow ( Sablayrolles et al. , 2019 ) . This analysis can be generalized to any scoring function s ( h , ( x , y ) ) , such as gradient norm ( Equation 2 ) and confidence ( Equation 3 ) . | This work proposes a simple output calibration method to suppress false positive errors of membership attacks. The core idea is to define a calibrated decision score as the difference between the original membership score and the expected membership score trained by a randomized training algorithm using a shadow dataset (a dataset following the same distribution as the true training data set). The calibrated membership decision score can provide a lower false positive rate than the original membership score. | SP:3a93d4de45b7e741239ef3be0eded717fe8ca453 |
In a Nutshell, the Human Asked for This: Latent Goals for Following Temporal Specifications | 1 INTRODUCTION . Building agents that generalize their learning to satisfy new specifications is a crucial goal of artificial intelligence ( Oh et al. , 2017 ; Bahdanau et al. , 2019 ; Hill et al. , 2021 ) . Deep reinforcement learning ( DRL ) holds promise in autonomous agents that tackle complex scenarios ( Silver et al. , 2017 ; Samvelyan et al. , 2019 ) , which motivates ongoing research with DRL algorithms following human instructions expressed in natural language ( Yu et al. , 2018 ; Mao et al. , 2019 ) . Unfortunately , generalization in DRL is linked to training autonomous agents with large numbers of instructions requiring to build manually those natural language expressions and their corresponding reward functions , which prevents such methods from scaling efficiently ( Lake , 2019 ; Vaezipoor et al. , 2021 ) . These considerations inspired research on agents learning from formally specified instructions ( Wen & Topcu , 2016 ; Alshiekh et al. , 2018 ; Simão et al. , 2021 ) as a substitute for natural language . Formal languages ( Huth & Ryan , 2004 ) offer desirable properties such as unambiguous semantics and compositional syntax , allowing to automatically generate large amounts of training instructions and their corresponding reward functions . Earlier contributions in this area rely on the compositional nature of formal languages , often employing multiple policy networks to execute temporal logic ( TL ) instructions ( Andreas et al. , 2017 ; Icarte et al. , 2018 ; Kuo et al. , 2020 ) . However , these approaches do not scale well with the number of instructions since policy networks are a computationally costly resource and , consequently , these earlier studies are restricted to relatively small state-spaces environments that require less computation , e.g. , non-visual settings . More recent contributions ( León et al. , 2020 ; Vaezipoor et al. , 2021 ) have presented DRL frameworks that are capable of generalizing to large numbers of out-of-distribution ( OOD , i.e. , never seen during training ) instructions while relying on a single policy network . Those latter studies evidence that deep learning architectures within DRL agents are key towards the ability of agents to generalize formal instructions . However , network architectures in previous literature have mostly followed a standard configuration , where all the network ’ s layers except for those encoding the input ( e.g. , convolutional layers for images , recurrent layers for text ) have equal access to both human instructions and environment ’ s observation . We propose a novel configuration to help agents generalize better by having a task-agnostic representation of the current state concatenated to a latent goal that is form by processing both observation of the agent and human instruction . As a motivation example , let us consider two scenarios : 1 ) a robot that is at the center of an empty room with a red square at the bottom right corner , 2 ) a robot at the same position in a room that is identical to the one in ( 1 ) except that the red square is now green . Intuitively , we can say that , if we give the instruction “ go to the red square ” in ( 1 ) , the goal of the robot is the same as if we say “ go to the green square ” in ( 2 ) , because the two tasks can be abstracted as “ turn to face the bottom right of the room , then move straight ” . In a nutshell , computing the human instruction together with the current state of the environment – being at the center of the room , with the object asked by the human in the bottom right corner – allows to deduce that the optimal policy is the same in both scenarios . Our contributions are listed as follows : • We propose a new deep learning configuration ( the latent-goal architecture ) that helps agents to generalize better when solving multi-task instructions in OOD scenarios . • We are first to evaluate the performance of multiple state-of-the-art ( SOTA ) neural networks targeting generalization when following temporal logic instructions . • Through ablation studies , we find that networks generating independent pieces of information within their output are specially benefited from being used within latent-goal architectures . The remaining of the paper is structured as follows : Section 2 briefly introduces the key concepts needed to follow this work . Section 3 presents the formal language used to generate instructions and the neuro-symbolic framework that agents use in our experiments . Then , Section 4 details the proposed network configuration . Section 5 includes the experimental settings , empirical results and ablation studies . Last , Sections 6 and 7 discuss related works and conclusions , respectively . 2 BACKGROUND . We develop agents aimed to execute OOD instructions expressed in TL while navigating in partially observable ( p.o . ) environments . Specifically , agents operate with a fixed perspective and a limited visual range . Below we introduce the basic concepts used in the rest of the paper . Reinforcement learning . Our p.o . environment is modelled as a p.o . Markov decision process ( POMDP ) . A POMDP is a tupleM = 〈S , A , P , R , Z , O , γ〉 where ( i ) S is the set of states s , s′ , . . . ; ( ii ) A is the set of actions a , a′ , . . . ; ( iii ) P : S × A × S → [ 0 , 1 ] is the ( probabilistic ) transition function ; ( iv ) R : S ×A× S → R is the reward function ; ( v ) Z is the set of observations z , z′ , . . .. ( vi ) O : S × A × S → Z is the observation function . ( vii ) γ ∈ [ 0 , 1 ) is the discount factor . At each time step t , the agent chooses an action at ∈ A triggering an update in the current state from st to st+1 ∈ S according to P . Then , Rt = R ( st , a , st+1 ) provides the reward associated with the transition , and O ( st , at , st+1 ) generates a new observation ot+1 for the agent . Intuitively , the goal of the learning agent is to choose the policy π that maximizes the expected sum of discounted rewards : V π ( x ) def = Eπ [ ∑ t≥0 γ trt ] , where γ ∈ [ 0 , 1 ) is the discount factor ( see Sutton & Barto ( 2018 ) ) . Relational networks . Relational networks ( RelNets ) are a particular kind of neural network whose structure is explicitly designed for reasoning about relations ( Kemp & Tenenbaum , 2008 ) . Previous contributions on solving formal instructions with DRL have been mainly focused on multi-layer perceptrons ( MLPs ) and recurrent networks ( Goodfellow et al. , 2016 ) , yet RelNets are of particular interest in our context since they hold promise to improve generalization in DRL ( Santoro et al. , 2018 ) . Their central principle is to constrain the functional form of the neural network in the relational module so that it captures the core common properties needed to reason about the relations between entities ( e.g. , objects ) and their properties ( e.g . color ) , see Santoro et al . ( 2017 ) . Recently , relational networks have been enhanced with the inclusion of the widely-known key-value attention mechanism ( Bahdanau et al. , 2015 ) . This method relies on the computation of attention scores that are used to decide in which portions of the input data the layer using this mechanism should focus on . 3 LEARNING TO SOLVE SATTL INSTRUCTIONS . In this section we detail the shared features of our agents . Concretely , Sec . 3.1 introduces the formal language we use to procedurally generate instructions , while Sec . 3.2 details the neuro-symbolic framework that we use while testing the different neural network configurations . 3.1 SAFETY-AWARE TASK TEMPORAL LOGIC . We investigate agents learning compositionally instructions in temporal logic . Below , we formally define the language from which we generate instructions to be executed by our agents . Specifically , we extend task temporal logic ( TTL ) , defined in León et al . ( 2020 ) to study the ability of neural networks to learn systematically from instructions about reachability goals such as `` eventually reach a sword '' . In this work , we evaluate agents that handle safety constrains as well , e.g . `` walk on soil or stone until you reached a sword '' . Thus , we extend TTL to safety-aware task temporal logic ( SATTL ) . Definition 1 ( SATTL ) . Let AP be a set of propositional atoms . The sets of literals l , atomic tasks α , and temporal formulas T in SATTL are inductively defined as follows : l : := +p | −p | l ∨ l α : := lUl T : := α | T ; T | T ∪ T. Literals l are positive ( +p ) or negative ( −p ) propositional atoms , or disjunctions thereof . Atomic tasks α are obtained by applying the temporal operator until ( U ) to pairs of literals . An atom α = lUl′ is read as it is the case that l until l′ holds . Temporal formulas T are built from atomic tasks by using sequential composition ( ; ) and non-deterministic choice ( ∪ ) . Note that U and ∪ are different operators . We use an explicit positive operator ( + ) so that both positive and negative tasks have the same length . This is beneficial for learning negative literals ( −p ) when instructions are given visually , as highlighted in ( León et al. , 2020 ) . The temporal operators eventually and always 2 can be respectively defined as l ≡ trueUl and 2l ≡ lUend , where end is a particular atom true only at the end of the episode . As TTL , SATTL is interpreted over finite traces λ , which in this context refers to finite sequences of states and actions . We denote time steps , i.e. , instants , on the trace as λ [ j ] , for 0 ≤ j < |λ| , where |λ| is the length of the trace . While , λ [ i , j ] is the ( sub ) trace between instants i and j . A model is a tuple N = 〈M , L〉 , whereM is a POMDP , and L : S → 2AP is a labelling of states in S with atoms in AP . Definition 2 ( Satisfaction ) . Let N be a model and λ a finite path . We define the satisfaction relation |= for literals l , atomic tasks α , and temporal formulas T on path λ as follows : ( N , λ ) |= +p iff p ∈ L ( λ [ 0 ] ) ( N , λ ) |= −p iff p /∈ L ( λ [ 0 ] ) ( N , λ ) |= l ∨ l′ iff ( N , λ ) |= l or ( N , λ ) |= l. ( N , λ ) |= lUl′ iff for some 0 ≤ j < |λ| , ( N , λ [ j , |λ| ] ) |= l′ , and for every t ∈ [ 0 , j ) , ( N , λ [ t , j − 1 ] ) |= l ( N , λ ) |= T ; T ′ iff for some 0 ≤ j < |λ| , ( N , λ [ 0 , j ] ) |= T and ( N , λ [ j + 1 , |λ| ] ) |= T ′ ( N , λ ) |= T ∪ T ′ iff ( N , λ ) |= T or ( N , λ ) |= T ′ Intuitively , by Def . 2 an atomic task α = cαUgα is satisfied if the “ safety ” condition cα remains true until goal gα is fulfilled . In the context of this work we are not interested in strict safety warranties but in agents trying to reach a goal while aiming to minimize the violation of additional conditions . Thus , we may say our agent has satisfied α even though it has not fulfilled cα at every time step before gα . Formally , in those cases we consider traces that are not starting at the beginning of the episode , but from the state after the last violation . The agent is penalised for this behaviour through the reward function . Examples of tasks we use are α1 = −grassU ( +axe ∨ +sword ) “ avoid grass until you reach an axe or a sword ” and α2 = ( +soil ∨+mud ) Uaxe “ move through soil or mud until reaching an axe ” . It is not difficult to prove that SATTL is a fragment of the well-known Linear-time Temporal Logic over finite traces ( LTLf ) ( De Giacomo & Vardi , 2013 ) . We provide a translation of SATTL into LTLf and the corresponding proof of truth preservation in Appendix F . | This paper introduces an neural architecture for a DRL agent tasked with learning to solve temporal logic specifications. Results show the proposed architecture outperforms existing ones when it comes to performance on instruction following in unseen environments.The proposed architecture takes in an observation and a task description, which appears to be transformed into a reward function that is then optimised. The key contribution appears to be around the inclusion of some latent state information about the environment in the reward specification phase, with the motivation that this makes it easier to interpret a human temporal logic specification of a task. Results appear to be strong, and do show that this results in substantial performance increases in unseen tasks. Unfortunately though, I found this paper a difficult read and in need of substantial work before it is ready for publication, primarily around the problem framing, method description, discussion and motivation. At present, it lacks the clarity required to best showcase the results, and I cannot confidently say I understand this paper, because it is not explained or presented clearly enough. | SP:93fe1c6c7cc77d015383ec418ca0069e1f336daf |
In a Nutshell, the Human Asked for This: Latent Goals for Following Temporal Specifications | 1 INTRODUCTION . Building agents that generalize their learning to satisfy new specifications is a crucial goal of artificial intelligence ( Oh et al. , 2017 ; Bahdanau et al. , 2019 ; Hill et al. , 2021 ) . Deep reinforcement learning ( DRL ) holds promise in autonomous agents that tackle complex scenarios ( Silver et al. , 2017 ; Samvelyan et al. , 2019 ) , which motivates ongoing research with DRL algorithms following human instructions expressed in natural language ( Yu et al. , 2018 ; Mao et al. , 2019 ) . Unfortunately , generalization in DRL is linked to training autonomous agents with large numbers of instructions requiring to build manually those natural language expressions and their corresponding reward functions , which prevents such methods from scaling efficiently ( Lake , 2019 ; Vaezipoor et al. , 2021 ) . These considerations inspired research on agents learning from formally specified instructions ( Wen & Topcu , 2016 ; Alshiekh et al. , 2018 ; Simão et al. , 2021 ) as a substitute for natural language . Formal languages ( Huth & Ryan , 2004 ) offer desirable properties such as unambiguous semantics and compositional syntax , allowing to automatically generate large amounts of training instructions and their corresponding reward functions . Earlier contributions in this area rely on the compositional nature of formal languages , often employing multiple policy networks to execute temporal logic ( TL ) instructions ( Andreas et al. , 2017 ; Icarte et al. , 2018 ; Kuo et al. , 2020 ) . However , these approaches do not scale well with the number of instructions since policy networks are a computationally costly resource and , consequently , these earlier studies are restricted to relatively small state-spaces environments that require less computation , e.g. , non-visual settings . More recent contributions ( León et al. , 2020 ; Vaezipoor et al. , 2021 ) have presented DRL frameworks that are capable of generalizing to large numbers of out-of-distribution ( OOD , i.e. , never seen during training ) instructions while relying on a single policy network . Those latter studies evidence that deep learning architectures within DRL agents are key towards the ability of agents to generalize formal instructions . However , network architectures in previous literature have mostly followed a standard configuration , where all the network ’ s layers except for those encoding the input ( e.g. , convolutional layers for images , recurrent layers for text ) have equal access to both human instructions and environment ’ s observation . We propose a novel configuration to help agents generalize better by having a task-agnostic representation of the current state concatenated to a latent goal that is form by processing both observation of the agent and human instruction . As a motivation example , let us consider two scenarios : 1 ) a robot that is at the center of an empty room with a red square at the bottom right corner , 2 ) a robot at the same position in a room that is identical to the one in ( 1 ) except that the red square is now green . Intuitively , we can say that , if we give the instruction “ go to the red square ” in ( 1 ) , the goal of the robot is the same as if we say “ go to the green square ” in ( 2 ) , because the two tasks can be abstracted as “ turn to face the bottom right of the room , then move straight ” . In a nutshell , computing the human instruction together with the current state of the environment – being at the center of the room , with the object asked by the human in the bottom right corner – allows to deduce that the optimal policy is the same in both scenarios . Our contributions are listed as follows : • We propose a new deep learning configuration ( the latent-goal architecture ) that helps agents to generalize better when solving multi-task instructions in OOD scenarios . • We are first to evaluate the performance of multiple state-of-the-art ( SOTA ) neural networks targeting generalization when following temporal logic instructions . • Through ablation studies , we find that networks generating independent pieces of information within their output are specially benefited from being used within latent-goal architectures . The remaining of the paper is structured as follows : Section 2 briefly introduces the key concepts needed to follow this work . Section 3 presents the formal language used to generate instructions and the neuro-symbolic framework that agents use in our experiments . Then , Section 4 details the proposed network configuration . Section 5 includes the experimental settings , empirical results and ablation studies . Last , Sections 6 and 7 discuss related works and conclusions , respectively . 2 BACKGROUND . We develop agents aimed to execute OOD instructions expressed in TL while navigating in partially observable ( p.o . ) environments . Specifically , agents operate with a fixed perspective and a limited visual range . Below we introduce the basic concepts used in the rest of the paper . Reinforcement learning . Our p.o . environment is modelled as a p.o . Markov decision process ( POMDP ) . A POMDP is a tupleM = 〈S , A , P , R , Z , O , γ〉 where ( i ) S is the set of states s , s′ , . . . ; ( ii ) A is the set of actions a , a′ , . . . ; ( iii ) P : S × A × S → [ 0 , 1 ] is the ( probabilistic ) transition function ; ( iv ) R : S ×A× S → R is the reward function ; ( v ) Z is the set of observations z , z′ , . . .. ( vi ) O : S × A × S → Z is the observation function . ( vii ) γ ∈ [ 0 , 1 ) is the discount factor . At each time step t , the agent chooses an action at ∈ A triggering an update in the current state from st to st+1 ∈ S according to P . Then , Rt = R ( st , a , st+1 ) provides the reward associated with the transition , and O ( st , at , st+1 ) generates a new observation ot+1 for the agent . Intuitively , the goal of the learning agent is to choose the policy π that maximizes the expected sum of discounted rewards : V π ( x ) def = Eπ [ ∑ t≥0 γ trt ] , where γ ∈ [ 0 , 1 ) is the discount factor ( see Sutton & Barto ( 2018 ) ) . Relational networks . Relational networks ( RelNets ) are a particular kind of neural network whose structure is explicitly designed for reasoning about relations ( Kemp & Tenenbaum , 2008 ) . Previous contributions on solving formal instructions with DRL have been mainly focused on multi-layer perceptrons ( MLPs ) and recurrent networks ( Goodfellow et al. , 2016 ) , yet RelNets are of particular interest in our context since they hold promise to improve generalization in DRL ( Santoro et al. , 2018 ) . Their central principle is to constrain the functional form of the neural network in the relational module so that it captures the core common properties needed to reason about the relations between entities ( e.g. , objects ) and their properties ( e.g . color ) , see Santoro et al . ( 2017 ) . Recently , relational networks have been enhanced with the inclusion of the widely-known key-value attention mechanism ( Bahdanau et al. , 2015 ) . This method relies on the computation of attention scores that are used to decide in which portions of the input data the layer using this mechanism should focus on . 3 LEARNING TO SOLVE SATTL INSTRUCTIONS . In this section we detail the shared features of our agents . Concretely , Sec . 3.1 introduces the formal language we use to procedurally generate instructions , while Sec . 3.2 details the neuro-symbolic framework that we use while testing the different neural network configurations . 3.1 SAFETY-AWARE TASK TEMPORAL LOGIC . We investigate agents learning compositionally instructions in temporal logic . Below , we formally define the language from which we generate instructions to be executed by our agents . Specifically , we extend task temporal logic ( TTL ) , defined in León et al . ( 2020 ) to study the ability of neural networks to learn systematically from instructions about reachability goals such as `` eventually reach a sword '' . In this work , we evaluate agents that handle safety constrains as well , e.g . `` walk on soil or stone until you reached a sword '' . Thus , we extend TTL to safety-aware task temporal logic ( SATTL ) . Definition 1 ( SATTL ) . Let AP be a set of propositional atoms . The sets of literals l , atomic tasks α , and temporal formulas T in SATTL are inductively defined as follows : l : := +p | −p | l ∨ l α : := lUl T : := α | T ; T | T ∪ T. Literals l are positive ( +p ) or negative ( −p ) propositional atoms , or disjunctions thereof . Atomic tasks α are obtained by applying the temporal operator until ( U ) to pairs of literals . An atom α = lUl′ is read as it is the case that l until l′ holds . Temporal formulas T are built from atomic tasks by using sequential composition ( ; ) and non-deterministic choice ( ∪ ) . Note that U and ∪ are different operators . We use an explicit positive operator ( + ) so that both positive and negative tasks have the same length . This is beneficial for learning negative literals ( −p ) when instructions are given visually , as highlighted in ( León et al. , 2020 ) . The temporal operators eventually and always 2 can be respectively defined as l ≡ trueUl and 2l ≡ lUend , where end is a particular atom true only at the end of the episode . As TTL , SATTL is interpreted over finite traces λ , which in this context refers to finite sequences of states and actions . We denote time steps , i.e. , instants , on the trace as λ [ j ] , for 0 ≤ j < |λ| , where |λ| is the length of the trace . While , λ [ i , j ] is the ( sub ) trace between instants i and j . A model is a tuple N = 〈M , L〉 , whereM is a POMDP , and L : S → 2AP is a labelling of states in S with atoms in AP . Definition 2 ( Satisfaction ) . Let N be a model and λ a finite path . We define the satisfaction relation |= for literals l , atomic tasks α , and temporal formulas T on path λ as follows : ( N , λ ) |= +p iff p ∈ L ( λ [ 0 ] ) ( N , λ ) |= −p iff p /∈ L ( λ [ 0 ] ) ( N , λ ) |= l ∨ l′ iff ( N , λ ) |= l or ( N , λ ) |= l. ( N , λ ) |= lUl′ iff for some 0 ≤ j < |λ| , ( N , λ [ j , |λ| ] ) |= l′ , and for every t ∈ [ 0 , j ) , ( N , λ [ t , j − 1 ] ) |= l ( N , λ ) |= T ; T ′ iff for some 0 ≤ j < |λ| , ( N , λ [ 0 , j ] ) |= T and ( N , λ [ j + 1 , |λ| ] ) |= T ′ ( N , λ ) |= T ∪ T ′ iff ( N , λ ) |= T or ( N , λ ) |= T ′ Intuitively , by Def . 2 an atomic task α = cαUgα is satisfied if the “ safety ” condition cα remains true until goal gα is fulfilled . In the context of this work we are not interested in strict safety warranties but in agents trying to reach a goal while aiming to minimize the violation of additional conditions . Thus , we may say our agent has satisfied α even though it has not fulfilled cα at every time step before gα . Formally , in those cases we consider traces that are not starting at the beginning of the episode , but from the state after the last violation . The agent is penalised for this behaviour through the reward function . Examples of tasks we use are α1 = −grassU ( +axe ∨ +sword ) “ avoid grass until you reach an axe or a sword ” and α2 = ( +soil ∨+mud ) Uaxe “ move through soil or mud until reaching an axe ” . It is not difficult to prove that SATTL is a fragment of the well-known Linear-time Temporal Logic over finite traces ( LTLf ) ( De Giacomo & Vardi , 2013 ) . We provide a translation of SATTL into LTLf and the corresponding proof of truth preservation in Appendix F . | This paper lies in the space of using non-Markov reward functions to model temporal task, and in addition to that attempts to generalize instruction following beyond single instruction provided in a formal language. The authors propose a dual network solution to embed the environment representation and separately a goal specific reasoner grounded within the environment. For planning with temporal formulas, the authors extend prior work on Task temporal logic. Although the algorithm for this remains largely unchanged from prior work (please clarify if this is wrong). The results demonstrate that the latent goal representation helps in generalizing at both the object level and at the task level. However the presentation of the results can be significantly improved (please refer to the main review). | SP:93fe1c6c7cc77d015383ec418ca0069e1f336daf |
In a Nutshell, the Human Asked for This: Latent Goals for Following Temporal Specifications | 1 INTRODUCTION . Building agents that generalize their learning to satisfy new specifications is a crucial goal of artificial intelligence ( Oh et al. , 2017 ; Bahdanau et al. , 2019 ; Hill et al. , 2021 ) . Deep reinforcement learning ( DRL ) holds promise in autonomous agents that tackle complex scenarios ( Silver et al. , 2017 ; Samvelyan et al. , 2019 ) , which motivates ongoing research with DRL algorithms following human instructions expressed in natural language ( Yu et al. , 2018 ; Mao et al. , 2019 ) . Unfortunately , generalization in DRL is linked to training autonomous agents with large numbers of instructions requiring to build manually those natural language expressions and their corresponding reward functions , which prevents such methods from scaling efficiently ( Lake , 2019 ; Vaezipoor et al. , 2021 ) . These considerations inspired research on agents learning from formally specified instructions ( Wen & Topcu , 2016 ; Alshiekh et al. , 2018 ; Simão et al. , 2021 ) as a substitute for natural language . Formal languages ( Huth & Ryan , 2004 ) offer desirable properties such as unambiguous semantics and compositional syntax , allowing to automatically generate large amounts of training instructions and their corresponding reward functions . Earlier contributions in this area rely on the compositional nature of formal languages , often employing multiple policy networks to execute temporal logic ( TL ) instructions ( Andreas et al. , 2017 ; Icarte et al. , 2018 ; Kuo et al. , 2020 ) . However , these approaches do not scale well with the number of instructions since policy networks are a computationally costly resource and , consequently , these earlier studies are restricted to relatively small state-spaces environments that require less computation , e.g. , non-visual settings . More recent contributions ( León et al. , 2020 ; Vaezipoor et al. , 2021 ) have presented DRL frameworks that are capable of generalizing to large numbers of out-of-distribution ( OOD , i.e. , never seen during training ) instructions while relying on a single policy network . Those latter studies evidence that deep learning architectures within DRL agents are key towards the ability of agents to generalize formal instructions . However , network architectures in previous literature have mostly followed a standard configuration , where all the network ’ s layers except for those encoding the input ( e.g. , convolutional layers for images , recurrent layers for text ) have equal access to both human instructions and environment ’ s observation . We propose a novel configuration to help agents generalize better by having a task-agnostic representation of the current state concatenated to a latent goal that is form by processing both observation of the agent and human instruction . As a motivation example , let us consider two scenarios : 1 ) a robot that is at the center of an empty room with a red square at the bottom right corner , 2 ) a robot at the same position in a room that is identical to the one in ( 1 ) except that the red square is now green . Intuitively , we can say that , if we give the instruction “ go to the red square ” in ( 1 ) , the goal of the robot is the same as if we say “ go to the green square ” in ( 2 ) , because the two tasks can be abstracted as “ turn to face the bottom right of the room , then move straight ” . In a nutshell , computing the human instruction together with the current state of the environment – being at the center of the room , with the object asked by the human in the bottom right corner – allows to deduce that the optimal policy is the same in both scenarios . Our contributions are listed as follows : • We propose a new deep learning configuration ( the latent-goal architecture ) that helps agents to generalize better when solving multi-task instructions in OOD scenarios . • We are first to evaluate the performance of multiple state-of-the-art ( SOTA ) neural networks targeting generalization when following temporal logic instructions . • Through ablation studies , we find that networks generating independent pieces of information within their output are specially benefited from being used within latent-goal architectures . The remaining of the paper is structured as follows : Section 2 briefly introduces the key concepts needed to follow this work . Section 3 presents the formal language used to generate instructions and the neuro-symbolic framework that agents use in our experiments . Then , Section 4 details the proposed network configuration . Section 5 includes the experimental settings , empirical results and ablation studies . Last , Sections 6 and 7 discuss related works and conclusions , respectively . 2 BACKGROUND . We develop agents aimed to execute OOD instructions expressed in TL while navigating in partially observable ( p.o . ) environments . Specifically , agents operate with a fixed perspective and a limited visual range . Below we introduce the basic concepts used in the rest of the paper . Reinforcement learning . Our p.o . environment is modelled as a p.o . Markov decision process ( POMDP ) . A POMDP is a tupleM = 〈S , A , P , R , Z , O , γ〉 where ( i ) S is the set of states s , s′ , . . . ; ( ii ) A is the set of actions a , a′ , . . . ; ( iii ) P : S × A × S → [ 0 , 1 ] is the ( probabilistic ) transition function ; ( iv ) R : S ×A× S → R is the reward function ; ( v ) Z is the set of observations z , z′ , . . .. ( vi ) O : S × A × S → Z is the observation function . ( vii ) γ ∈ [ 0 , 1 ) is the discount factor . At each time step t , the agent chooses an action at ∈ A triggering an update in the current state from st to st+1 ∈ S according to P . Then , Rt = R ( st , a , st+1 ) provides the reward associated with the transition , and O ( st , at , st+1 ) generates a new observation ot+1 for the agent . Intuitively , the goal of the learning agent is to choose the policy π that maximizes the expected sum of discounted rewards : V π ( x ) def = Eπ [ ∑ t≥0 γ trt ] , where γ ∈ [ 0 , 1 ) is the discount factor ( see Sutton & Barto ( 2018 ) ) . Relational networks . Relational networks ( RelNets ) are a particular kind of neural network whose structure is explicitly designed for reasoning about relations ( Kemp & Tenenbaum , 2008 ) . Previous contributions on solving formal instructions with DRL have been mainly focused on multi-layer perceptrons ( MLPs ) and recurrent networks ( Goodfellow et al. , 2016 ) , yet RelNets are of particular interest in our context since they hold promise to improve generalization in DRL ( Santoro et al. , 2018 ) . Their central principle is to constrain the functional form of the neural network in the relational module so that it captures the core common properties needed to reason about the relations between entities ( e.g. , objects ) and their properties ( e.g . color ) , see Santoro et al . ( 2017 ) . Recently , relational networks have been enhanced with the inclusion of the widely-known key-value attention mechanism ( Bahdanau et al. , 2015 ) . This method relies on the computation of attention scores that are used to decide in which portions of the input data the layer using this mechanism should focus on . 3 LEARNING TO SOLVE SATTL INSTRUCTIONS . In this section we detail the shared features of our agents . Concretely , Sec . 3.1 introduces the formal language we use to procedurally generate instructions , while Sec . 3.2 details the neuro-symbolic framework that we use while testing the different neural network configurations . 3.1 SAFETY-AWARE TASK TEMPORAL LOGIC . We investigate agents learning compositionally instructions in temporal logic . Below , we formally define the language from which we generate instructions to be executed by our agents . Specifically , we extend task temporal logic ( TTL ) , defined in León et al . ( 2020 ) to study the ability of neural networks to learn systematically from instructions about reachability goals such as `` eventually reach a sword '' . In this work , we evaluate agents that handle safety constrains as well , e.g . `` walk on soil or stone until you reached a sword '' . Thus , we extend TTL to safety-aware task temporal logic ( SATTL ) . Definition 1 ( SATTL ) . Let AP be a set of propositional atoms . The sets of literals l , atomic tasks α , and temporal formulas T in SATTL are inductively defined as follows : l : := +p | −p | l ∨ l α : := lUl T : := α | T ; T | T ∪ T. Literals l are positive ( +p ) or negative ( −p ) propositional atoms , or disjunctions thereof . Atomic tasks α are obtained by applying the temporal operator until ( U ) to pairs of literals . An atom α = lUl′ is read as it is the case that l until l′ holds . Temporal formulas T are built from atomic tasks by using sequential composition ( ; ) and non-deterministic choice ( ∪ ) . Note that U and ∪ are different operators . We use an explicit positive operator ( + ) so that both positive and negative tasks have the same length . This is beneficial for learning negative literals ( −p ) when instructions are given visually , as highlighted in ( León et al. , 2020 ) . The temporal operators eventually and always 2 can be respectively defined as l ≡ trueUl and 2l ≡ lUend , where end is a particular atom true only at the end of the episode . As TTL , SATTL is interpreted over finite traces λ , which in this context refers to finite sequences of states and actions . We denote time steps , i.e. , instants , on the trace as λ [ j ] , for 0 ≤ j < |λ| , where |λ| is the length of the trace . While , λ [ i , j ] is the ( sub ) trace between instants i and j . A model is a tuple N = 〈M , L〉 , whereM is a POMDP , and L : S → 2AP is a labelling of states in S with atoms in AP . Definition 2 ( Satisfaction ) . Let N be a model and λ a finite path . We define the satisfaction relation |= for literals l , atomic tasks α , and temporal formulas T on path λ as follows : ( N , λ ) |= +p iff p ∈ L ( λ [ 0 ] ) ( N , λ ) |= −p iff p /∈ L ( λ [ 0 ] ) ( N , λ ) |= l ∨ l′ iff ( N , λ ) |= l or ( N , λ ) |= l. ( N , λ ) |= lUl′ iff for some 0 ≤ j < |λ| , ( N , λ [ j , |λ| ] ) |= l′ , and for every t ∈ [ 0 , j ) , ( N , λ [ t , j − 1 ] ) |= l ( N , λ ) |= T ; T ′ iff for some 0 ≤ j < |λ| , ( N , λ [ 0 , j ] ) |= T and ( N , λ [ j + 1 , |λ| ] ) |= T ′ ( N , λ ) |= T ∪ T ′ iff ( N , λ ) |= T or ( N , λ ) |= T ′ Intuitively , by Def . 2 an atomic task α = cαUgα is satisfied if the “ safety ” condition cα remains true until goal gα is fulfilled . In the context of this work we are not interested in strict safety warranties but in agents trying to reach a goal while aiming to minimize the violation of additional conditions . Thus , we may say our agent has satisfied α even though it has not fulfilled cα at every time step before gα . Formally , in those cases we consider traces that are not starting at the beginning of the episode , but from the state after the last violation . The agent is penalised for this behaviour through the reward function . Examples of tasks we use are α1 = −grassU ( +axe ∨ +sword ) “ avoid grass until you reach an axe or a sword ” and α2 = ( +soil ∨+mud ) Uaxe “ move through soil or mud until reaching an axe ” . It is not difficult to prove that SATTL is a fragment of the well-known Linear-time Temporal Logic over finite traces ( LTLf ) ( De Giacomo & Vardi , 2013 ) . We provide a translation of SATTL into LTLf and the corresponding proof of truth preservation in Appendix F . | This work focuses on training (via deep RL) task conditioned agents for a given class of workspaces. Tasks are formalized as a variant of finite temporal logic (and thus encode a regular language). Tasks are either provided as text or via visual diagrams. A key goal of this work is to perform well on tasks that lie outside of the training distribution. The paper illustrates on two common grid like domains with the results of a number of various architectures and ablations reported. The approach taken is an adaptation of deep reinforcement learning, with the primary contribution being a slight, but seemingly important, modification of an existing architecture to create a separate embedding for (i) a task agnostic state encoding and (ii) create a task specific state encoding. Furthermore, in order to encourage the network to generalize between tasks, an information bottleneck is placed on the task specific encoding. | SP:93fe1c6c7cc77d015383ec418ca0069e1f336daf |
Local Augmentation for Graph Neural Networks | 1 INTRODUCTION . Graph Neural Networks ( GNNs ) and their variants ( Abu-El-Haija et al. , 2019 ; Kipf & Welling , 2017 ; Veličković et al. , 2018 ) have achieved state-of-the-art performance for many tasks on graphs such as recommendation system ( Ying et al. , 2018 ) and traffic prediction ( Guo et al. , 2019 ) . However , most of the GNN models , such as GCN ( Kipf & Welling , 2017 ) and GAT ( Veličković et al. , 2018 ) , learn the node representations by aggregating information over only the 2-hop neighborhood . Such shallow architectures limit their ability to extract information from higher-layer neighborhoods ( Wang & Derr , 2021 ) . But deep GNNs are prone to over-smoothing ( Li et al. , 2018 ) , which suggests the node representations tend to converge to a certain vector and thus become indistinguishable . One solution to address this problem is to preserve the locality of node representations when increasing the number of layers . For example , JKNet ( Xu et al. , 2018 ) densely connects ( Huang et al. , 2017 ) each hidden layer to the final layer . GCNII ( Chen et al. , 2020 ) employs an initial residual to construct a skip connection from the input layer . Besides , Zeng et al . ( 2021 ) pointed out that the key for GNN is to smooth the local neighborhood into informative representation , no matter how deep it is . And they decouple the depth and scope of GNNs to help capture local graph structure . Prior works have emphasized the importance of local information , but one property of the graph is that the number of nodes in the local neighborhood is far fewer than higher-order neighbors . And this property limits the expressive power of GNNs due to the limited neighbors in the local structure . A very intuitive idea is to use data augmentation to increase the number of nodes in the local substructure . However , existing graph data augmentation methods ignore the importance of local information and only perturb at the topology-level and feature-level from a global perspective , which can be divided into two categories : topology-level augmentation ( Rong et al. , 2020 ; Wang et al. , 2020b ; Zhao et al. , 2021 ) and feature-level augmentation ( Deng et al. , 2019 ; Feng et al. , 2019 ; Kong et al. , 2020 ) . Topology-level augmentation perturbs the adjacency matrix , yielding different graph structures . On the other hand , existing feature-level augmentation mainly exploits perturbation of node attributes guided by adversarial training ( Deng et al. , 2019 ; Feng et al. , 2019 ; Kong et al. , 2020 ) . These augmentation techniques have two drawbacks . 1 ) Some of they employ full-batch training for augmentation , which is computationally expensive , and introduce some additional side effects such as over-smoothing . 2 ) The type of feature-level augmentation is coarse-grained , which focuses on global augmentation and overlooks the local information of the neighborhood . Moreover , to our best knowledge , none of the existing approaches combines both the feature representations and the graph topology , especially the local subgraph structures , for graph-level data augmentation . In this work , we propose a framework : Local Augmentation for Graph Neural Networks ( LA-GNNs ) , to further enhance the locality of node representations based on both the topology-level and featurelevel information in the substructure . The term `` local augmentation '' refers to the generation of neighborhood features via a generative model conditioned on local structures and node features . Specifically , our proposed framework learns the conditional distribution of the connected neighbors ’ representations given the representation of the central node , bearing some similarities with the Skipgram ( Mikolov et al. , 2013 ) and Deepwalk Perozzi et al . ( 2014 ) , with the difference that our method does not base on word or graph embedding . The motivation behind this work concludes three-fold . 1 ) Existing feature-level augmentation works primarily pay attention to global augmentation without considering the informative neighborhood . 2 ) The distributions of the representations of the neighbors are closely connected to the central node , making ample room for feature augmentation . 3 ) Preserving the locality of node representations is key to avoiding over-smoothing ( Xu et al. , 2018 ; Klicpera et al. , 2019 ; Chen et al. , 2020 ) . And there are several benefits in applying local augmentation for the GNN training . First , local augmentation is essentially a data augmentation technique that can improve the generalization of the GNN models and prevent over-fitting . Second , we can recover some missing contextual information of the local neighborhood in an attributed graph via the generative model ( Jia & Benson , 2020 ) . Third , our proposed framework is flexible and can be applied to various popular backbone networks such as GCN ( Kipf & Welling , 2017 ) , GAT ( Veličković et al. , 2018 ) , GCNII ( Chen et al. , 2020 ) , and GRAND ( Feng et al. , 2020 ) to enhance their performance . Extensive experimental results demonstrate that our proposed framework could improve the performance of GNN variants on 7 benchmark datasets . 2 BACKGROUND . Notations . Let G = ( V , E ) represent the graph , where V is the set of vertices { v1 , · · · , vN } with |V | = N and E is the set of edges . The adjacency matrix is defined as A ∈ { 0 , 1 } N×N , and Aij = 1 if and only if ( vi , vj ) ∈ E. Let Ni = { vj |Aij = 1 } denotes the neighborhood of node vi and D denote the diagonal degree matrix , where Dii = ∑n j=1 Aij . The feature matrix is denoted as X ∈ RN×F where each node v is associated with a F -dimensional feature vector Xv . Y ∈ { 0 , 1 } N×C denote the one-hot label matrix , where Yi ∈ { 0 , 1 } C is a one-hot vector and∑C j=1 Yij = 1 for any vi ∈ V . GNN . Graph Neural Network ( GNN ) is a type of neural network that directly operates on the graph structure , such as GCN and GAT ( Kipf & Welling , 2017 ; Veličković et al. , 2018 ) , that capture the dependence of graphs via message passing between the nodes of a graph as H ( ` ) = f ( A , H ( ` −1 ) ) , ( 1 ) where f denotes the specific GNN layer for different models , H ( ` ) are the hidden vectors of the ` -th layer and H ( 0 ) = X . For example , f ( A , H ) = σ ( ÂHW ) for GCN , where  = D̃− 1 2 ÃD̃− 1 2 , D̃ is the degree matrix of à , i.e. , D̃ii = ∑ j Ãij , and à = A+ I. Topology-level Augmentation . Topology-level augmentation usually perturbs A to generate different graph structures , which can be formulated as A′ = F ( A , X ) , where F ( · ) is a structure perturbation function . For example , DropEdge ( Rong et al. , 2020 ) considers F ( A , X ) = A−As which is independent of X , where As is a sparse matrix consists of a subset of the original edges E. GAUG-O ( Zhao et al. , 2021 ) leverages their proposed neural edge predictors to produce a different structure A′ where A′ij = ⌊ 1 1+e− ( log Pij+G ) /τ + 12 ⌋ , Pij = αMij + ( 1 − α ) Aij , M = σ ( ZZT ) , Z = f ( A , f ( A , X ) ) , τ is the temperature of Gumbel-Softmax distribution , G ∼ Gumbel ( 0 , 1 ) is a Gumbel random variate , and α is a hyperparameter mediating the influence of edge predictor on the original graph . Feature-level Augmentation . Besides , feature-level augmentation function can be defines as X′ = H ( A , X ) , where H ( · ) is a feature perturbation function . FLAG ( Kong et al. , 2020 ) defines the perturbation function as H ( A , X ) = X + δ where perturbation δ is updated iteratively during the adversarial training phase . G-GCN ( plain ) ( Zhu et al. , 2020 ) obtains the global attribute feature matrix X ( a ) ∈ RN×da through minimizing the objective ∏ v∈V ∏ a∈CA ( v ) exp ( X ( a ) v ·Va ) ∑ k∈U exp ( X ( a ) v ·Vk ) where U is the set of all attributes , CA ( v ) is the sampled context attributes of v , and V ∈ Rda×F denotes the parameters . Obviously , the perturbation function of G-GCN has no close-form solution . In this work , we propose a novel feature-level augmentation method , named local augmentation . And the comparison of the details of various graph data augmentation techniques can be found in Table 1 . 3 LOCAL AUGMENTATION . In this section , we describe details of the proposed method . The local augmentation framework consists of three modules : learning the conditional distribution via a generative model , the active learning trick , and the downstream GNN models , as illustrated in Figure 1 . Note that the proposed algorithm enhances the locality of node representations through augmenting 1-hop neighbors in a generative way . Specifically , we exploit a generative model to learn the conditional distribution of the connected neighbors ’ representations given the representation of a node . We describe the details of learning the conditional distribution and the motivation for why local augmentation is able to improve the performance in a probabilistic view in Sec . 3.1 , detail the architecture of downstream GNN models in Sec . 3.2 . We finally elaborate the training procedure of both the generative model and the downstream GNN models with the active learning trick in Sec . 3.3 . 3.1 LEARNING THE CONDITIONAL DISTRIBUTION . We start by reviewing the semi-supervised learning of GNNs in a probabilistic view . Most existing GNN models ( Kipf & Welling , 2017 ; Veličković et al. , 2018 ) are viewed as a classification function to predict the class labels of the graph nodes . In this work , we use a GNN classification estimator Pθ ( Y|A , X ) ( θ is the parameter ) to model the conditional distribution of label Y with respect to the graph structure A and feature matrix X . Given training samples { A , X , Y } , the parameter θ can be estimated using Maximum Likelihood Estimation ( MLE ) , by optimizing the following likelihood function : max ∏ k∈K Pθ ( Yk|A , X ) , ( 2 ) where K is the set of node indices of the training dataset whose labels are visible during the semi-supervised training . To further boost the performance of GNN , we introduce a new model Pθ ( Y , X|A , X ) , where X is generated features by feature-level augmentation . For this model , the MLE method needs to optimize a marginalized probability Pθ over the generated feature matrix X : max ∏ k∈K ∫ X Pθ ( Yk , X|A , X ) . ( 3 ) For Bayesian tractability , we decompose Pθ in Eq . ( 3 ) as a product of two posterior probabilities : Pθ , φ ( Yk , X|A , X ) : = Pθ ( Yk|A , X , X ) Qφ ( X|A , X ) , ( 4 ) where Pθ ( Yk|A , X , X ) and Qφ ( X|A , X ) denote the probabilistic distributions approximated by the downstream GNN and the ( feature-level augmentation ) generator respectively , parameterized by θ and φ . There are two benefits in the decomposition above . First , it allows us to decouple the training of the downstream predictor Pθ and the generator Qφ , enabling the generator to easily generalize to other downstream tasks . Moreover , inspired by the successes of data augmentation via deep-learning-based generative modeling ( Antoniou et al. , 2017 ) , the representation power of Eq . ( 4 ) is superior than that of a single predictor Pθ ( Yk|A , X ) without data augmentation . Consequently , once a generator Qφ is trained very well , our training procedure can optimize Pθ ( Yk|A , X , X ) with samples X drawn from the fixed conditional distribution Qφ . Now , we show how to train the generator as follows . Generator To learn a feature augmentation generator , a naive solution is to learn one single distribution for all the neighbors using the MLE method , i.e. , solving the following optimization problem max ψ ∑ j∈Ni log pψ ( Xj |Xi ) = max ψ log ∏ j∈Ni pψ ( Xj |Xi ) , ( 5 ) where { Xj|j∈Ni , Xi } . Then pψ can be used to augment features for all the neighbors . However , this method ignores the differences between all the neighbors , which may induce severe noise . To overcome the limitation , we assume that each neighbor satisfies a different conditional distribution . Specifically , there exists a conditional distribution p ( ·|Xi , zj ) with latent random variable zj , such that we have Xj ∼ p ( X|Xi , zj ) for Xj|j∈Ni . Once we obtain p ( ·|Xi , zj ) in some way , we can generate augmented features X , and then we can train Pθ ( Yk|A , X , X ) instead of Pθ ( Yk|A , X ) to improve the final performance of Pθ . Below , we will present how to find p ( ·|Xi , zj ) , which will produce the generator Qφ . To achieve our purpose , a suitable method is the conditional variational auto-encoder ( CVAE ) ( Kingma & Welling , 2013 ; Sohn et al. , 2015 ) , which can help learn the distribution of the latent variable zj , and the conditional distribution p ( ·|Xi , zj ) . So , a CVAE model Qφ ( X|A , X ) is adopted as our generator , where φ = { ϕ , ψ } , ϕ denotes the variational parameters and ψ represents the generative parameters . To derive the optimization problem for CVAE , log pψ ( Xj |Xi ) can be written with latent variables z as follows , following previous work ( Pandey & Dukkipati , 2017 ; Sohn et al. , 2015 ) : log pψ ( Xj |Xi ) = ∫ qϕ ( z|Xj , Xi ) log pψ ( Xj , z|Xi ) qϕ ( z|Xj , Xi ) dz+KL ( qϕ ( z|Xj , Xi ) ‖pψ ( z|Xj , Xi ) ) ≥ ∫ qϕ ( z|Xj , Xi ) log pψ ( Xj , z|Xi ) qϕ ( z|Xj , Xi ) dz , and the evidence lower bound ( ELBO ) can be written as : L ( Xj , Xi ; ψ , ϕ ) = −KL ( qϕ ( z|Xj , Xi ) ‖pψ ( z|Xi ) ) + ∫ qϕ ( z|Xj , Xi ) log pψ ( Xj |Xi , z ) dz , ( 6 ) where the encoder qϕ ( z|Xj , Xi ) = N ( f ( Xj , Xi ) , g ( Xj , Xi ) ) and decoder pψ ( Xj |Xi , z ) = N ( h ( Xi , z ) , cI ) . The encoder is a two-layer MLP . f and g share the first layer , and their second layers employ different parameters . The decoder h is two-layer MLP . For simplicity and tractability , the implemented generator Q ( X|A , X ) uses the same parameters across all nodes vi ∈ V . Optimization of the MLE Now , we present how to optimize the MLE Eq . ( 4 ) using the feature matrix produced from the generator . Once the augmented feature matrix can be sampled from the generator , we can optimize the parameters of Eq . ( 4 ) in the following way . Firstly , the parameter φ = { ψ , ϕ } can be optimized by maximizing the ELBO of the generator ( 6 ) , i.e. , we train the generator . Secondly , the parameter θ is optimized by maximizing the MLE Eq . ( 4 ) with φ fixed , which is the conditional distribution of Yk given A , X , and X , i.e. , we train the downstream GNN model . In this paper , the MLE is formulated by a downstream GNN model as follows : Pθ ( Yk | A , X , X ) ∝ −L ( θ|A , X , X , φ ) , ( 7 ) where L ( θ|A , X , X , φ ) = − ∑ k∈T ∑C f=1 Ykf ln ( softmax ( GNN ( A , X , X ) ) kf ) . | This paper presents a data augmentation methods for training graph neural networks in general. They firstly fit a generative model that learns the conditional probability of input node features. The training data are then augmented using the generative model using the proposed importance sampling method and used for training GNNs. The proposed methods were evaluated on 7 public graph benchmark datasets. Authors attempted to show that the proposed augmentation methods could improve the benchmark classification accuracy over the baseline methods. | SP:1900953ddd9c790b2f383390036a160e0144c992 |
Local Augmentation for Graph Neural Networks | 1 INTRODUCTION . Graph Neural Networks ( GNNs ) and their variants ( Abu-El-Haija et al. , 2019 ; Kipf & Welling , 2017 ; Veličković et al. , 2018 ) have achieved state-of-the-art performance for many tasks on graphs such as recommendation system ( Ying et al. , 2018 ) and traffic prediction ( Guo et al. , 2019 ) . However , most of the GNN models , such as GCN ( Kipf & Welling , 2017 ) and GAT ( Veličković et al. , 2018 ) , learn the node representations by aggregating information over only the 2-hop neighborhood . Such shallow architectures limit their ability to extract information from higher-layer neighborhoods ( Wang & Derr , 2021 ) . But deep GNNs are prone to over-smoothing ( Li et al. , 2018 ) , which suggests the node representations tend to converge to a certain vector and thus become indistinguishable . One solution to address this problem is to preserve the locality of node representations when increasing the number of layers . For example , JKNet ( Xu et al. , 2018 ) densely connects ( Huang et al. , 2017 ) each hidden layer to the final layer . GCNII ( Chen et al. , 2020 ) employs an initial residual to construct a skip connection from the input layer . Besides , Zeng et al . ( 2021 ) pointed out that the key for GNN is to smooth the local neighborhood into informative representation , no matter how deep it is . And they decouple the depth and scope of GNNs to help capture local graph structure . Prior works have emphasized the importance of local information , but one property of the graph is that the number of nodes in the local neighborhood is far fewer than higher-order neighbors . And this property limits the expressive power of GNNs due to the limited neighbors in the local structure . A very intuitive idea is to use data augmentation to increase the number of nodes in the local substructure . However , existing graph data augmentation methods ignore the importance of local information and only perturb at the topology-level and feature-level from a global perspective , which can be divided into two categories : topology-level augmentation ( Rong et al. , 2020 ; Wang et al. , 2020b ; Zhao et al. , 2021 ) and feature-level augmentation ( Deng et al. , 2019 ; Feng et al. , 2019 ; Kong et al. , 2020 ) . Topology-level augmentation perturbs the adjacency matrix , yielding different graph structures . On the other hand , existing feature-level augmentation mainly exploits perturbation of node attributes guided by adversarial training ( Deng et al. , 2019 ; Feng et al. , 2019 ; Kong et al. , 2020 ) . These augmentation techniques have two drawbacks . 1 ) Some of they employ full-batch training for augmentation , which is computationally expensive , and introduce some additional side effects such as over-smoothing . 2 ) The type of feature-level augmentation is coarse-grained , which focuses on global augmentation and overlooks the local information of the neighborhood . Moreover , to our best knowledge , none of the existing approaches combines both the feature representations and the graph topology , especially the local subgraph structures , for graph-level data augmentation . In this work , we propose a framework : Local Augmentation for Graph Neural Networks ( LA-GNNs ) , to further enhance the locality of node representations based on both the topology-level and featurelevel information in the substructure . The term `` local augmentation '' refers to the generation of neighborhood features via a generative model conditioned on local structures and node features . Specifically , our proposed framework learns the conditional distribution of the connected neighbors ’ representations given the representation of the central node , bearing some similarities with the Skipgram ( Mikolov et al. , 2013 ) and Deepwalk Perozzi et al . ( 2014 ) , with the difference that our method does not base on word or graph embedding . The motivation behind this work concludes three-fold . 1 ) Existing feature-level augmentation works primarily pay attention to global augmentation without considering the informative neighborhood . 2 ) The distributions of the representations of the neighbors are closely connected to the central node , making ample room for feature augmentation . 3 ) Preserving the locality of node representations is key to avoiding over-smoothing ( Xu et al. , 2018 ; Klicpera et al. , 2019 ; Chen et al. , 2020 ) . And there are several benefits in applying local augmentation for the GNN training . First , local augmentation is essentially a data augmentation technique that can improve the generalization of the GNN models and prevent over-fitting . Second , we can recover some missing contextual information of the local neighborhood in an attributed graph via the generative model ( Jia & Benson , 2020 ) . Third , our proposed framework is flexible and can be applied to various popular backbone networks such as GCN ( Kipf & Welling , 2017 ) , GAT ( Veličković et al. , 2018 ) , GCNII ( Chen et al. , 2020 ) , and GRAND ( Feng et al. , 2020 ) to enhance their performance . Extensive experimental results demonstrate that our proposed framework could improve the performance of GNN variants on 7 benchmark datasets . 2 BACKGROUND . Notations . Let G = ( V , E ) represent the graph , where V is the set of vertices { v1 , · · · , vN } with |V | = N and E is the set of edges . The adjacency matrix is defined as A ∈ { 0 , 1 } N×N , and Aij = 1 if and only if ( vi , vj ) ∈ E. Let Ni = { vj |Aij = 1 } denotes the neighborhood of node vi and D denote the diagonal degree matrix , where Dii = ∑n j=1 Aij . The feature matrix is denoted as X ∈ RN×F where each node v is associated with a F -dimensional feature vector Xv . Y ∈ { 0 , 1 } N×C denote the one-hot label matrix , where Yi ∈ { 0 , 1 } C is a one-hot vector and∑C j=1 Yij = 1 for any vi ∈ V . GNN . Graph Neural Network ( GNN ) is a type of neural network that directly operates on the graph structure , such as GCN and GAT ( Kipf & Welling , 2017 ; Veličković et al. , 2018 ) , that capture the dependence of graphs via message passing between the nodes of a graph as H ( ` ) = f ( A , H ( ` −1 ) ) , ( 1 ) where f denotes the specific GNN layer for different models , H ( ` ) are the hidden vectors of the ` -th layer and H ( 0 ) = X . For example , f ( A , H ) = σ ( ÂHW ) for GCN , where  = D̃− 1 2 ÃD̃− 1 2 , D̃ is the degree matrix of à , i.e. , D̃ii = ∑ j Ãij , and à = A+ I. Topology-level Augmentation . Topology-level augmentation usually perturbs A to generate different graph structures , which can be formulated as A′ = F ( A , X ) , where F ( · ) is a structure perturbation function . For example , DropEdge ( Rong et al. , 2020 ) considers F ( A , X ) = A−As which is independent of X , where As is a sparse matrix consists of a subset of the original edges E. GAUG-O ( Zhao et al. , 2021 ) leverages their proposed neural edge predictors to produce a different structure A′ where A′ij = ⌊ 1 1+e− ( log Pij+G ) /τ + 12 ⌋ , Pij = αMij + ( 1 − α ) Aij , M = σ ( ZZT ) , Z = f ( A , f ( A , X ) ) , τ is the temperature of Gumbel-Softmax distribution , G ∼ Gumbel ( 0 , 1 ) is a Gumbel random variate , and α is a hyperparameter mediating the influence of edge predictor on the original graph . Feature-level Augmentation . Besides , feature-level augmentation function can be defines as X′ = H ( A , X ) , where H ( · ) is a feature perturbation function . FLAG ( Kong et al. , 2020 ) defines the perturbation function as H ( A , X ) = X + δ where perturbation δ is updated iteratively during the adversarial training phase . G-GCN ( plain ) ( Zhu et al. , 2020 ) obtains the global attribute feature matrix X ( a ) ∈ RN×da through minimizing the objective ∏ v∈V ∏ a∈CA ( v ) exp ( X ( a ) v ·Va ) ∑ k∈U exp ( X ( a ) v ·Vk ) where U is the set of all attributes , CA ( v ) is the sampled context attributes of v , and V ∈ Rda×F denotes the parameters . Obviously , the perturbation function of G-GCN has no close-form solution . In this work , we propose a novel feature-level augmentation method , named local augmentation . And the comparison of the details of various graph data augmentation techniques can be found in Table 1 . 3 LOCAL AUGMENTATION . In this section , we describe details of the proposed method . The local augmentation framework consists of three modules : learning the conditional distribution via a generative model , the active learning trick , and the downstream GNN models , as illustrated in Figure 1 . Note that the proposed algorithm enhances the locality of node representations through augmenting 1-hop neighbors in a generative way . Specifically , we exploit a generative model to learn the conditional distribution of the connected neighbors ’ representations given the representation of a node . We describe the details of learning the conditional distribution and the motivation for why local augmentation is able to improve the performance in a probabilistic view in Sec . 3.1 , detail the architecture of downstream GNN models in Sec . 3.2 . We finally elaborate the training procedure of both the generative model and the downstream GNN models with the active learning trick in Sec . 3.3 . 3.1 LEARNING THE CONDITIONAL DISTRIBUTION . We start by reviewing the semi-supervised learning of GNNs in a probabilistic view . Most existing GNN models ( Kipf & Welling , 2017 ; Veličković et al. , 2018 ) are viewed as a classification function to predict the class labels of the graph nodes . In this work , we use a GNN classification estimator Pθ ( Y|A , X ) ( θ is the parameter ) to model the conditional distribution of label Y with respect to the graph structure A and feature matrix X . Given training samples { A , X , Y } , the parameter θ can be estimated using Maximum Likelihood Estimation ( MLE ) , by optimizing the following likelihood function : max ∏ k∈K Pθ ( Yk|A , X ) , ( 2 ) where K is the set of node indices of the training dataset whose labels are visible during the semi-supervised training . To further boost the performance of GNN , we introduce a new model Pθ ( Y , X|A , X ) , where X is generated features by feature-level augmentation . For this model , the MLE method needs to optimize a marginalized probability Pθ over the generated feature matrix X : max ∏ k∈K ∫ X Pθ ( Yk , X|A , X ) . ( 3 ) For Bayesian tractability , we decompose Pθ in Eq . ( 3 ) as a product of two posterior probabilities : Pθ , φ ( Yk , X|A , X ) : = Pθ ( Yk|A , X , X ) Qφ ( X|A , X ) , ( 4 ) where Pθ ( Yk|A , X , X ) and Qφ ( X|A , X ) denote the probabilistic distributions approximated by the downstream GNN and the ( feature-level augmentation ) generator respectively , parameterized by θ and φ . There are two benefits in the decomposition above . First , it allows us to decouple the training of the downstream predictor Pθ and the generator Qφ , enabling the generator to easily generalize to other downstream tasks . Moreover , inspired by the successes of data augmentation via deep-learning-based generative modeling ( Antoniou et al. , 2017 ) , the representation power of Eq . ( 4 ) is superior than that of a single predictor Pθ ( Yk|A , X ) without data augmentation . Consequently , once a generator Qφ is trained very well , our training procedure can optimize Pθ ( Yk|A , X , X ) with samples X drawn from the fixed conditional distribution Qφ . Now , we show how to train the generator as follows . Generator To learn a feature augmentation generator , a naive solution is to learn one single distribution for all the neighbors using the MLE method , i.e. , solving the following optimization problem max ψ ∑ j∈Ni log pψ ( Xj |Xi ) = max ψ log ∏ j∈Ni pψ ( Xj |Xi ) , ( 5 ) where { Xj|j∈Ni , Xi } . Then pψ can be used to augment features for all the neighbors . However , this method ignores the differences between all the neighbors , which may induce severe noise . To overcome the limitation , we assume that each neighbor satisfies a different conditional distribution . Specifically , there exists a conditional distribution p ( ·|Xi , zj ) with latent random variable zj , such that we have Xj ∼ p ( X|Xi , zj ) for Xj|j∈Ni . Once we obtain p ( ·|Xi , zj ) in some way , we can generate augmented features X , and then we can train Pθ ( Yk|A , X , X ) instead of Pθ ( Yk|A , X ) to improve the final performance of Pθ . Below , we will present how to find p ( ·|Xi , zj ) , which will produce the generator Qφ . To achieve our purpose , a suitable method is the conditional variational auto-encoder ( CVAE ) ( Kingma & Welling , 2013 ; Sohn et al. , 2015 ) , which can help learn the distribution of the latent variable zj , and the conditional distribution p ( ·|Xi , zj ) . So , a CVAE model Qφ ( X|A , X ) is adopted as our generator , where φ = { ϕ , ψ } , ϕ denotes the variational parameters and ψ represents the generative parameters . To derive the optimization problem for CVAE , log pψ ( Xj |Xi ) can be written with latent variables z as follows , following previous work ( Pandey & Dukkipati , 2017 ; Sohn et al. , 2015 ) : log pψ ( Xj |Xi ) = ∫ qϕ ( z|Xj , Xi ) log pψ ( Xj , z|Xi ) qϕ ( z|Xj , Xi ) dz+KL ( qϕ ( z|Xj , Xi ) ‖pψ ( z|Xj , Xi ) ) ≥ ∫ qϕ ( z|Xj , Xi ) log pψ ( Xj , z|Xi ) qϕ ( z|Xj , Xi ) dz , and the evidence lower bound ( ELBO ) can be written as : L ( Xj , Xi ; ψ , ϕ ) = −KL ( qϕ ( z|Xj , Xi ) ‖pψ ( z|Xi ) ) + ∫ qϕ ( z|Xj , Xi ) log pψ ( Xj |Xi , z ) dz , ( 6 ) where the encoder qϕ ( z|Xj , Xi ) = N ( f ( Xj , Xi ) , g ( Xj , Xi ) ) and decoder pψ ( Xj |Xi , z ) = N ( h ( Xi , z ) , cI ) . The encoder is a two-layer MLP . f and g share the first layer , and their second layers employ different parameters . The decoder h is two-layer MLP . For simplicity and tractability , the implemented generator Q ( X|A , X ) uses the same parameters across all nodes vi ∈ V . Optimization of the MLE Now , we present how to optimize the MLE Eq . ( 4 ) using the feature matrix produced from the generator . Once the augmented feature matrix can be sampled from the generator , we can optimize the parameters of Eq . ( 4 ) in the following way . Firstly , the parameter φ = { ψ , ϕ } can be optimized by maximizing the ELBO of the generator ( 6 ) , i.e. , we train the generator . Secondly , the parameter θ is optimized by maximizing the MLE Eq . ( 4 ) with φ fixed , which is the conditional distribution of Yk given A , X , and X , i.e. , we train the downstream GNN model . In this paper , the MLE is formulated by a downstream GNN model as follows : Pθ ( Yk | A , X , X ) ∝ −L ( θ|A , X , X , φ ) , ( 7 ) where L ( θ|A , X , X , φ ) = − ∑ k∈T ∑C f=1 Ykf ln ( softmax ( GNN ( A , X , X ) ) kf ) . | This paper studies the problem of feature augmentation for training the graph neural networks. Specifically, given the central nodes features and local structure, the proposed approach estimates the distribution of the node features of neighbors. Experimental results show that the proposed approach can further improve the baseline backbones. | SP:1900953ddd9c790b2f383390036a160e0144c992 |
Local Augmentation for Graph Neural Networks | 1 INTRODUCTION . Graph Neural Networks ( GNNs ) and their variants ( Abu-El-Haija et al. , 2019 ; Kipf & Welling , 2017 ; Veličković et al. , 2018 ) have achieved state-of-the-art performance for many tasks on graphs such as recommendation system ( Ying et al. , 2018 ) and traffic prediction ( Guo et al. , 2019 ) . However , most of the GNN models , such as GCN ( Kipf & Welling , 2017 ) and GAT ( Veličković et al. , 2018 ) , learn the node representations by aggregating information over only the 2-hop neighborhood . Such shallow architectures limit their ability to extract information from higher-layer neighborhoods ( Wang & Derr , 2021 ) . But deep GNNs are prone to over-smoothing ( Li et al. , 2018 ) , which suggests the node representations tend to converge to a certain vector and thus become indistinguishable . One solution to address this problem is to preserve the locality of node representations when increasing the number of layers . For example , JKNet ( Xu et al. , 2018 ) densely connects ( Huang et al. , 2017 ) each hidden layer to the final layer . GCNII ( Chen et al. , 2020 ) employs an initial residual to construct a skip connection from the input layer . Besides , Zeng et al . ( 2021 ) pointed out that the key for GNN is to smooth the local neighborhood into informative representation , no matter how deep it is . And they decouple the depth and scope of GNNs to help capture local graph structure . Prior works have emphasized the importance of local information , but one property of the graph is that the number of nodes in the local neighborhood is far fewer than higher-order neighbors . And this property limits the expressive power of GNNs due to the limited neighbors in the local structure . A very intuitive idea is to use data augmentation to increase the number of nodes in the local substructure . However , existing graph data augmentation methods ignore the importance of local information and only perturb at the topology-level and feature-level from a global perspective , which can be divided into two categories : topology-level augmentation ( Rong et al. , 2020 ; Wang et al. , 2020b ; Zhao et al. , 2021 ) and feature-level augmentation ( Deng et al. , 2019 ; Feng et al. , 2019 ; Kong et al. , 2020 ) . Topology-level augmentation perturbs the adjacency matrix , yielding different graph structures . On the other hand , existing feature-level augmentation mainly exploits perturbation of node attributes guided by adversarial training ( Deng et al. , 2019 ; Feng et al. , 2019 ; Kong et al. , 2020 ) . These augmentation techniques have two drawbacks . 1 ) Some of they employ full-batch training for augmentation , which is computationally expensive , and introduce some additional side effects such as over-smoothing . 2 ) The type of feature-level augmentation is coarse-grained , which focuses on global augmentation and overlooks the local information of the neighborhood . Moreover , to our best knowledge , none of the existing approaches combines both the feature representations and the graph topology , especially the local subgraph structures , for graph-level data augmentation . In this work , we propose a framework : Local Augmentation for Graph Neural Networks ( LA-GNNs ) , to further enhance the locality of node representations based on both the topology-level and featurelevel information in the substructure . The term `` local augmentation '' refers to the generation of neighborhood features via a generative model conditioned on local structures and node features . Specifically , our proposed framework learns the conditional distribution of the connected neighbors ’ representations given the representation of the central node , bearing some similarities with the Skipgram ( Mikolov et al. , 2013 ) and Deepwalk Perozzi et al . ( 2014 ) , with the difference that our method does not base on word or graph embedding . The motivation behind this work concludes three-fold . 1 ) Existing feature-level augmentation works primarily pay attention to global augmentation without considering the informative neighborhood . 2 ) The distributions of the representations of the neighbors are closely connected to the central node , making ample room for feature augmentation . 3 ) Preserving the locality of node representations is key to avoiding over-smoothing ( Xu et al. , 2018 ; Klicpera et al. , 2019 ; Chen et al. , 2020 ) . And there are several benefits in applying local augmentation for the GNN training . First , local augmentation is essentially a data augmentation technique that can improve the generalization of the GNN models and prevent over-fitting . Second , we can recover some missing contextual information of the local neighborhood in an attributed graph via the generative model ( Jia & Benson , 2020 ) . Third , our proposed framework is flexible and can be applied to various popular backbone networks such as GCN ( Kipf & Welling , 2017 ) , GAT ( Veličković et al. , 2018 ) , GCNII ( Chen et al. , 2020 ) , and GRAND ( Feng et al. , 2020 ) to enhance their performance . Extensive experimental results demonstrate that our proposed framework could improve the performance of GNN variants on 7 benchmark datasets . 2 BACKGROUND . Notations . Let G = ( V , E ) represent the graph , where V is the set of vertices { v1 , · · · , vN } with |V | = N and E is the set of edges . The adjacency matrix is defined as A ∈ { 0 , 1 } N×N , and Aij = 1 if and only if ( vi , vj ) ∈ E. Let Ni = { vj |Aij = 1 } denotes the neighborhood of node vi and D denote the diagonal degree matrix , where Dii = ∑n j=1 Aij . The feature matrix is denoted as X ∈ RN×F where each node v is associated with a F -dimensional feature vector Xv . Y ∈ { 0 , 1 } N×C denote the one-hot label matrix , where Yi ∈ { 0 , 1 } C is a one-hot vector and∑C j=1 Yij = 1 for any vi ∈ V . GNN . Graph Neural Network ( GNN ) is a type of neural network that directly operates on the graph structure , such as GCN and GAT ( Kipf & Welling , 2017 ; Veličković et al. , 2018 ) , that capture the dependence of graphs via message passing between the nodes of a graph as H ( ` ) = f ( A , H ( ` −1 ) ) , ( 1 ) where f denotes the specific GNN layer for different models , H ( ` ) are the hidden vectors of the ` -th layer and H ( 0 ) = X . For example , f ( A , H ) = σ ( ÂHW ) for GCN , where  = D̃− 1 2 ÃD̃− 1 2 , D̃ is the degree matrix of à , i.e. , D̃ii = ∑ j Ãij , and à = A+ I. Topology-level Augmentation . Topology-level augmentation usually perturbs A to generate different graph structures , which can be formulated as A′ = F ( A , X ) , where F ( · ) is a structure perturbation function . For example , DropEdge ( Rong et al. , 2020 ) considers F ( A , X ) = A−As which is independent of X , where As is a sparse matrix consists of a subset of the original edges E. GAUG-O ( Zhao et al. , 2021 ) leverages their proposed neural edge predictors to produce a different structure A′ where A′ij = ⌊ 1 1+e− ( log Pij+G ) /τ + 12 ⌋ , Pij = αMij + ( 1 − α ) Aij , M = σ ( ZZT ) , Z = f ( A , f ( A , X ) ) , τ is the temperature of Gumbel-Softmax distribution , G ∼ Gumbel ( 0 , 1 ) is a Gumbel random variate , and α is a hyperparameter mediating the influence of edge predictor on the original graph . Feature-level Augmentation . Besides , feature-level augmentation function can be defines as X′ = H ( A , X ) , where H ( · ) is a feature perturbation function . FLAG ( Kong et al. , 2020 ) defines the perturbation function as H ( A , X ) = X + δ where perturbation δ is updated iteratively during the adversarial training phase . G-GCN ( plain ) ( Zhu et al. , 2020 ) obtains the global attribute feature matrix X ( a ) ∈ RN×da through minimizing the objective ∏ v∈V ∏ a∈CA ( v ) exp ( X ( a ) v ·Va ) ∑ k∈U exp ( X ( a ) v ·Vk ) where U is the set of all attributes , CA ( v ) is the sampled context attributes of v , and V ∈ Rda×F denotes the parameters . Obviously , the perturbation function of G-GCN has no close-form solution . In this work , we propose a novel feature-level augmentation method , named local augmentation . And the comparison of the details of various graph data augmentation techniques can be found in Table 1 . 3 LOCAL AUGMENTATION . In this section , we describe details of the proposed method . The local augmentation framework consists of three modules : learning the conditional distribution via a generative model , the active learning trick , and the downstream GNN models , as illustrated in Figure 1 . Note that the proposed algorithm enhances the locality of node representations through augmenting 1-hop neighbors in a generative way . Specifically , we exploit a generative model to learn the conditional distribution of the connected neighbors ’ representations given the representation of a node . We describe the details of learning the conditional distribution and the motivation for why local augmentation is able to improve the performance in a probabilistic view in Sec . 3.1 , detail the architecture of downstream GNN models in Sec . 3.2 . We finally elaborate the training procedure of both the generative model and the downstream GNN models with the active learning trick in Sec . 3.3 . 3.1 LEARNING THE CONDITIONAL DISTRIBUTION . We start by reviewing the semi-supervised learning of GNNs in a probabilistic view . Most existing GNN models ( Kipf & Welling , 2017 ; Veličković et al. , 2018 ) are viewed as a classification function to predict the class labels of the graph nodes . In this work , we use a GNN classification estimator Pθ ( Y|A , X ) ( θ is the parameter ) to model the conditional distribution of label Y with respect to the graph structure A and feature matrix X . Given training samples { A , X , Y } , the parameter θ can be estimated using Maximum Likelihood Estimation ( MLE ) , by optimizing the following likelihood function : max ∏ k∈K Pθ ( Yk|A , X ) , ( 2 ) where K is the set of node indices of the training dataset whose labels are visible during the semi-supervised training . To further boost the performance of GNN , we introduce a new model Pθ ( Y , X|A , X ) , where X is generated features by feature-level augmentation . For this model , the MLE method needs to optimize a marginalized probability Pθ over the generated feature matrix X : max ∏ k∈K ∫ X Pθ ( Yk , X|A , X ) . ( 3 ) For Bayesian tractability , we decompose Pθ in Eq . ( 3 ) as a product of two posterior probabilities : Pθ , φ ( Yk , X|A , X ) : = Pθ ( Yk|A , X , X ) Qφ ( X|A , X ) , ( 4 ) where Pθ ( Yk|A , X , X ) and Qφ ( X|A , X ) denote the probabilistic distributions approximated by the downstream GNN and the ( feature-level augmentation ) generator respectively , parameterized by θ and φ . There are two benefits in the decomposition above . First , it allows us to decouple the training of the downstream predictor Pθ and the generator Qφ , enabling the generator to easily generalize to other downstream tasks . Moreover , inspired by the successes of data augmentation via deep-learning-based generative modeling ( Antoniou et al. , 2017 ) , the representation power of Eq . ( 4 ) is superior than that of a single predictor Pθ ( Yk|A , X ) without data augmentation . Consequently , once a generator Qφ is trained very well , our training procedure can optimize Pθ ( Yk|A , X , X ) with samples X drawn from the fixed conditional distribution Qφ . Now , we show how to train the generator as follows . Generator To learn a feature augmentation generator , a naive solution is to learn one single distribution for all the neighbors using the MLE method , i.e. , solving the following optimization problem max ψ ∑ j∈Ni log pψ ( Xj |Xi ) = max ψ log ∏ j∈Ni pψ ( Xj |Xi ) , ( 5 ) where { Xj|j∈Ni , Xi } . Then pψ can be used to augment features for all the neighbors . However , this method ignores the differences between all the neighbors , which may induce severe noise . To overcome the limitation , we assume that each neighbor satisfies a different conditional distribution . Specifically , there exists a conditional distribution p ( ·|Xi , zj ) with latent random variable zj , such that we have Xj ∼ p ( X|Xi , zj ) for Xj|j∈Ni . Once we obtain p ( ·|Xi , zj ) in some way , we can generate augmented features X , and then we can train Pθ ( Yk|A , X , X ) instead of Pθ ( Yk|A , X ) to improve the final performance of Pθ . Below , we will present how to find p ( ·|Xi , zj ) , which will produce the generator Qφ . To achieve our purpose , a suitable method is the conditional variational auto-encoder ( CVAE ) ( Kingma & Welling , 2013 ; Sohn et al. , 2015 ) , which can help learn the distribution of the latent variable zj , and the conditional distribution p ( ·|Xi , zj ) . So , a CVAE model Qφ ( X|A , X ) is adopted as our generator , where φ = { ϕ , ψ } , ϕ denotes the variational parameters and ψ represents the generative parameters . To derive the optimization problem for CVAE , log pψ ( Xj |Xi ) can be written with latent variables z as follows , following previous work ( Pandey & Dukkipati , 2017 ; Sohn et al. , 2015 ) : log pψ ( Xj |Xi ) = ∫ qϕ ( z|Xj , Xi ) log pψ ( Xj , z|Xi ) qϕ ( z|Xj , Xi ) dz+KL ( qϕ ( z|Xj , Xi ) ‖pψ ( z|Xj , Xi ) ) ≥ ∫ qϕ ( z|Xj , Xi ) log pψ ( Xj , z|Xi ) qϕ ( z|Xj , Xi ) dz , and the evidence lower bound ( ELBO ) can be written as : L ( Xj , Xi ; ψ , ϕ ) = −KL ( qϕ ( z|Xj , Xi ) ‖pψ ( z|Xi ) ) + ∫ qϕ ( z|Xj , Xi ) log pψ ( Xj |Xi , z ) dz , ( 6 ) where the encoder qϕ ( z|Xj , Xi ) = N ( f ( Xj , Xi ) , g ( Xj , Xi ) ) and decoder pψ ( Xj |Xi , z ) = N ( h ( Xi , z ) , cI ) . The encoder is a two-layer MLP . f and g share the first layer , and their second layers employ different parameters . The decoder h is two-layer MLP . For simplicity and tractability , the implemented generator Q ( X|A , X ) uses the same parameters across all nodes vi ∈ V . Optimization of the MLE Now , we present how to optimize the MLE Eq . ( 4 ) using the feature matrix produced from the generator . Once the augmented feature matrix can be sampled from the generator , we can optimize the parameters of Eq . ( 4 ) in the following way . Firstly , the parameter φ = { ψ , ϕ } can be optimized by maximizing the ELBO of the generator ( 6 ) , i.e. , we train the generator . Secondly , the parameter θ is optimized by maximizing the MLE Eq . ( 4 ) with φ fixed , which is the conditional distribution of Yk given A , X , and X , i.e. , we train the downstream GNN model . In this paper , the MLE is formulated by a downstream GNN model as follows : Pθ ( Yk | A , X , X ) ∝ −L ( θ|A , X , X , φ ) , ( 7 ) where L ( θ|A , X , X , φ ) = − ∑ k∈T ∑C f=1 Ykf ln ( softmax ( GNN ( A , X , X ) ) kf ) . | Data augmentation remains under-explored on graph-structured data. In this work, the authors introduce local augmentation that enhances the feature of each node by its local subgraph structure. Specifically, they model the data augmentation as a feature generation process: given a node’s feature, they learn the conditional distribution of its neighbors’ features to make a generative augmentation model. Experiments show that the proposed local augmentation makes performance improvement on real-world data. | SP:1900953ddd9c790b2f383390036a160e0144c992 |
GARNET: A Spectral Approach to Robust and Scalable Graph Neural Networks | Graph neural networks ( GNNs ) have been increasingly deployed in various applications that involve learning on non-Euclidean data . However , recent studies show that GNNs are vulnerable to graph adversarial attacks . Although there are several defense methods to improve GNN adversarial robustness , they fail to perform well on low homophily graphs . In addition , few of those defense models can scale to large graphs due to their high computational complexity and memory usage . In this paper , we propose GARNET , a scalable spectral method to boost the adversarial robustness of GNN models for both homophilic and heterophilic graphs . GARNET first computes a reduced-rank yet sparse approximation of the adversarial graph by exploiting an efficient spectral graph embedding and sparsification scheme . Next , GARNET trains an adaptive graph filter on the reduced-rank graph for node representation refinement , which is subsequently leveraged to guide label propagation for further enhancing the quality of node embeddings . GARNET has been evaluated on both homophilic and heterophilic datasets , including a large graph with millions of nodes . Our extensive experiment results show that GARNET increases adversarial accuracy over state-of-the-art GNN ( defense ) models by up to 9.96 % and 18.06 % on homophilic and heterophilic graphs , respectively . 1 INTRODUCTION . Recent years have witnessed a surge of interest in graph neural networks ( GNNs ) , which incorporate both graph structure and node/edge attributes to produce low-dimensional embedding vectors that maximally preserve graph structural information ( Hamilton , 2020 ) . GNNs have achieved promising results in various real-world applications , such as recommendation systems ( Ying et al. , 2018 ) , self-driving car ( Casas et al. , 2020 ) , protein structure predictions ( Senior et al. , 2020 ) , and chip placements ( Mirhoseini et al. , 2021 ) . However , recent studies have shown that adversarial attacks on graph structure accomplished by inserting , deleting , or rewiring edges in an unnoticeable way , can easily fool GNN models and drastically degrade their accuracy in downstream tasks ( e.g. , node classification ) ( Zügner et al. , 2018 ; Zügner & Günnemann , 2019 ) . In literature , there are several attempts to defend GNNs against graph adversarial attacks . Entezari et al . ( 2020 ) first observed that graph adversarial attacks mainly affect high-rank properties of the graph ; consequently , a low-rank graph should be first constructed by performing truncated singular value decomposition ( SVD ) on the graph adjacency matrix , which can then be exploited for training a robust GNN model . Later , Jin et al . ( 2020 ) proposed Pro-GNN to jointly learn a new graph and its robust GNN model with the low-rank constraints imposed by the graph structure . However , such low-rank approximation methods involve dense adjacency matrices during the GNN training stage , which will lead to quadratic time and space complexity , prohibiting their applications in large-scale graph learning tasks . Another line of research aims at enhancing GNN robustness based on the graph homophily assumption , i.e. , adjacent nodes in a natural graph tend to have similar attributes , while the graph attacks essentially insert adversarial edges by connecting nodes with dissimilar attributes . As a result , researchers proposed to compute attribute similarity scores between adjacent nodes as edge weights , and drop edges with small weights to increase graph homophily ( Wu et al. , 2019 ; Zhang & Zitnik , 2020 ) . Although such approaches can successfully improve GNN robustness on high-homophily graphs , they may fail on low-homophily ( i.e. , heterophily ) graphs ( Zhu et al. , 2020 ) . In this paper , we propose GARNET , a spectral method for constructing GNN models that are robust to graph adversarial attacks for both homophilic and heterophilic graphs . In addition , GARNET scales comfortably to large graphs due to its nearly-linear algorithm complexity . More concretely , GARNET consists of three major kernels : ( 1 ) reduced-rank approximation , ( 2 ) adaptive filter learning , and ( 3 ) adaptive label propagation . The reduced-rank approximation kernel first performs truncated SVD on graph adjacency matrix to obtain a few dominant singular values and their corresponding singular vectors that are further leveraged to construct a sparse yet reduced-rank graph adjacency matrix ; the reduced-rank adjacency matrix can effectively mitigate the effects of adversarial attacks via connecting ( disconnecting ) nodes that are spectrally similar ( dissimilar ) . The adaptive filter learning kernel aims to learn a polynomial graph filter whose coefficients are trainable ; the learned graph filter can adapt to the homophilic/heterophilic properties of the underlying graph and thus will work effectively for both homophilic and heterophilic graphs . The adaptive label propagation stage will leverage the learned adaptive graph filter to guide the label propagation phase , which can further improve the adversarial accuracy by enhancing the quality of node representations . We evaluate the proposed GARNET model on three high-homophily datasets : Cora , Citeseer , and Pubmed as well as two low-homophily datasets : Chameleon and Squirrel , under strong graph adversarial attacks such as Nettack ( Zügner et al. , 2018 ) and Metattack ( Zügner & Günnemann , 2019 ) with various perturbation settings . Moreover , we further show the nearly-linear scalability of our approach on the ogbn-products dataset that consists of millions of nodes ( Hu et al. , 2020 ) . Our experimental results indicate that GARNET largely improves adversarial accuracy over baselines in most cases . The major advantages of GARNET are summarized as follows : • GARNET is robust to graph adversarial attacks . Exploiting the proposed reduced-rank approximation scheme allows GARNET to effectively filter out the noises potentially caused by adversarial attacks in the spectral domain . This immediately leads to substantial improvement ( up to 18.06 % ) of adversarial accuracy when comparing with the state-of-the-art baselines under the strong graph attacks on various datasets . • GARNET is agnostic to graph homophily . Unlike most existing defense models that do not work well on low-homophily adversarial graphs , GARNET leverages a trainable graph filter that can adapt to adversarial graphs with diverse levels of homophily . In addition , we theoretically demonstrate that the performance of the adaptive graph filter applied to an adversarial graph will be similar to the performance achieved on a clean graph . • GARNET is scalable to large graphs . GARNET has a nearly-linear runtime/space complexity and thus can scale comfortably to very large graph data sets with millions of nodes . We have conducted experiments on the ogbn-products dataset that contains 2 million nodes and 60 million edges , which is over 100× larger than the largest adversarial graph ever considered in the prior arts . 2 RELATED WORK . GNNs have received an increasing amount of attention in recent years due to its ability of learning on non-Euclidean ( graph ) data . In contrast to developing powerful GNN models on natural graph data , there is an active body of research focusing on adversarial attacks as well as defenses for GNNs . We summarize some of the recent efforts for graph adversarial attacks and defenses as follows . Graph adversarial attacks aim at degrading the accuracy of GNN models by perturbing the graph structure in an unnoticeable way . For instance , most existing graph adversarial attacks insert/delete edges while maintaining node degree distribution ( Sun et al. , 2018 ) . The most popular graph adversarial attacks fall into the following two categories : ( 1 ) targeted attack , ( 2 ) untargeted attack . The targeted attacks attempt to mislead a GNN model to produce a wrong prediction on a target sample ( e.g. , node ) , while the untargeted attacks strive to degrade the overall accuracy of a GNN model for the whole graph data set . Dai et al . ( 2018 ) first formulate the targeted attack as a combinatorial optimization problem and leverages reinforcement learning to insert/delete edges such that the target node is misclassified . Zügner et al . ( 2018 ) propose another targeted attack called Nettack , which produces an adversarial graph by maximizing the training loss of GNNs . Zügner & Günnemann ( 2019 ) further introduce Metattack , an untargeted attack that treats the graph as a hyperparameter and uses meta-gradients to perturb the graph structure . It is worth noting that graph adversarial attacks have two different settings : poison ( perturb a graph prior to GNN training ) and evasion ( perturb a graph after GNN training ) . As shown by Zhu et al . ( 2021 ) , the poison setting is typically more challenging to defend , as it changes graph structure that fools GNN training . Thus , in this work , we evaluate our model against both targeted and untargeted attacks under the poison setting . Graph adversarial defenses attempt to enhance GNN performance on the perturbed graphs generated by adversarial attacks . Entezari et al . ( 2020 ) first observe that Nettack , a strong targeted attack , only changes the high-rank information of the adjacency matrix after graph perturbation . Thus , they propose to construct a low-rank graph by performing truncated SVD to undermine the effects of adversarial attacks . Jin et al . ( 2020 ) propose Pro-GNN that adopts a similar idea yet jointly learns the low-rank graph and GNN model . However , such low-rank approximation based methods produce dense adjacency matrices that correspond to complete graphs , which would limit their applications for large graphs . Another line of research strives to purify the adversarial graph by assigning edge weights . Specifically , Wu et al . ( 2019 ) propose to modify the edge weights by computing the Jaccard similarity score per edge based on node attributes , which is followed by Zhang & Zitnik ( 2020 ) that propose GNNGuard to learn node attribute similarity score per edge through a trainable linear layer . Nonetheless , such approaches assume that nearby nodes should have similar attributes ( i.e. , graph homophily assumption ) , which is not valid for heterophilic graphs that have adjacent nodes with dissimilar attributes ( Zhu et al. , 2020 ) . In contrast to the prior arts , GARNET achieves highly robust yet scalable performance on both homophilic and heterophilic graphs under adversarial attacks by leveraging novel reduced-rank approximation and adaptive graph filtering schemes . 3 OUR APPROACH . Figure 1 gives an overview of our proposed approach , GARNET , which consists of three major phases . The first phase ( reduced-rank approximation ) constructs a reduced-rank yet sparse graph model by exploiting scalable truncated SVD and nearest-neighbor graph algorithms ( Baglama & Reichel , 2005 ; Malkov & Yashunin , 2018 ) . The second phase ( adaptive filter learning ) is the only phase that involves training , which outputs a learned graph filter that can adapt to the homophilic/heterophilic properties of the underlying graph . The last phase ( adaptive label propagation ) leverages the learned adaptive graph filter to guide the subsequent label propagation process . In the rest of this section , we will describe each of these three phases in more detail . 0 3.1 REDUCED-RANK APPROXIMATION ( PHASE 1 ) . The adjacency matrices of many real-world graphs ( e.g. , social network and biological network ) are naturally low rank and sparse , as the nodes typically tend to form communities and have a small number of neighbors ( Zhou et al. , 2013 ) . As a result , graph adversarial attacks can be viewed as compromising these properties by inserting edges that connect nodes from different communities ( Zügner et al. , 2018 ; Zügner & Günnemann , 2019 ) . Recently , Entezari et al . ( 2020 ) and Jin et al . ( 2020 ) have shown that the well-known graph adversarial attacks ( e.g. , Nettack and Metattack ) are essentially high-rank attacks , which mainly change the high-rank spectrum of the graph when perturbing the graph structure , while the low-rank spectrum remains almost the same . We empirically confirm that the graph rank indeed increases under adversarial attacks in Appendix A.7 . Consequently , a natural way for improving GNN robustness is to purify an adversarial graph by eliminating the high-rank components of its spectrum . To enhance GNN robustness , Entezari et al . ( 2020 ) and Jin et al . ( 2020 ) reconstruct a graph that only preserves the low-rank components of its spectrum to mitigate the effects of adversarial attacks , via performing truncated SVD on the adjacency matrix . Specifically , given a graph adjacency matrix A ∈ Rn×n , the rank-r approximated adjacency matrix can be obtained via truncated SVD :  = UΣV T , where Σ ∈ Rr×r is a diagonal matrix consisting of r largest singular values of A. U ∈ Rn×r and V ∈ Rn×r contain the corresponding left and right singular vectors , respectively . However , the reconstructed low-rank adjacency matrix  has two key issues : ( 1 )  is typically a dense matrix with O ( n2 ) nonzero elements , which may result in prohibitively expensive storage as well as GNN training , where n represents number of nodes ( Entezari et al. , 2020 ; Jin et al. , 2020 ) . Thus , existing low-rank approximation methods are not scalable to large graphs ; ( 2 ) Due to the high computational cost of SVD ,  is typically obtained by only leveraging top r singular values and singular vectors , where r is a relatively small number ( e.g. , r = 50 ) . Consequently , the rank of  is only r = 50 , which loses too much important spectrum information and thus limits the performance of GNN training . Reduced-rank approximation via sparsification . To avoid the quadratic space complexity for obtaining  , one simple solution is to sparsify  on the fly . More concretely , instead of directly computing  = UΣV T , we can compute  row by row : Âi , : = Ui , :ΣV T . Once we obtain Âi , : , we can sparsify it by setting Ãi , j = 0 if Âi , j < δ and Ãi , j = Âi , j otherwise , where δ is a hyperparameter to control the sparsity . In this way , we only need to store a dense vector Âi , : at a time and the final adjacency matrix à is sparse . Although the space complexity is reduced to O ( m ) , where m denotes the number of non-zero elements in à , this sparsification method still has quadratic time complexity for computing à . To tackle this issue , in this work a nearly-linear complexity algorithm for constructing a reduced-rank yet sparse matrix à is proposed by exploiting the following connection between matrix sparsification and spectral graph embedding . Definition 1 . Given the top r smallest eigenvalues λ1 , λ2 , ... , λr and their corresponding eigenvectors v1 , v2 , ... , vr of normalized graph Laplacian matrix Lnorm = I −D− 1 2AD− 1 2 , where I and A are the identity matrix and graph adjacency matrix , respectively , and D is a diagonal matrix of node degrees , the weighted spectral embedding matrix is defined as : V def = [ √ |1− λ1|v1 , ... , √ |1− λr|vr ] , ( 1 ) whose i-th row Vi , : is the weighted spectral embedding of the corresponding i-th node in the graph . Theorem 1 . Given a normalized graph adjacency matrix Anorm = D− 1 2AD− 1 2 of an undirected graph , let  be the rank-r approximation of Anorm via truncated SVD . If the top r dominant eigenvalues of Anorm are non-negative , then Âi , j corresponds to the dot product score between the weighted spectral embeddings of node i and j. Theorem 1 indicates that the reduced-rank approximation of the normalized adjacency matrix via truncated SVD captures the spectral similarity between nodes , which motivates us to leverage weighted spectral embeddings to capture graph spectral ( low-rank ) information , thereby identifying edges to be pruned ( sparsified ) from the graph . Unlike traditional spectral graph embedding methods that utilize the first r Laplacian eigenpairs to construct spectral embedding matrix , we exploit the top r largest singular values and their singular vectors of Anorm that may include both the smallest and largest Laplacian eigenpairs for capturing global and local structural information , respectively ( Shuman et al. , 2013 ) . More specifically , given a graph G = ( V , E ) and its normalized adjacency matrix Anorm , our approach first computes the r largest singular values ( e.g. , r = 50 ) and the corresponding singular vectors of Anorm leveraging efficient eigensolvers in O ( r|E| ) time to construct the weighted spectral embeddings ( Baglama & Reichel , 2005 ) ; next , the embedding results are then used to construct a nearest neighbor ( NN ) graph , where each node will be connected to its k most spectrally similar nodes . Afterwards , we compute the dot product similarity scores between adjacent nodes in the NN graph . If the similarity score is less than a threshold δ , we prune the corresponding edge from the NN graph to further sparsify the graph . In this work , we exploit an approximate k-nearest neighbor algorithm for constructing the NN graph , which has O ( |V| log |V| ) complexity and thus can scale to very large graphs ( Malkov & Yashunin , 2018 ) . We say a graph is a reduced-rank graph if its adjacency matrix is obtained via the proposed reduced-rank approximation method . As a result , we can obtain a reduced-rank and sparse graph in O ( r|E|+ |V| log |V| ) time . Apart from the advantage of scalability , our kNN-based reduced-rank graph also preserves much more important spectrum information than the truncated SVD-based low-rank graph . As shown by Entezari et al . ( 2020 ) , adversarial attacks only perturb the top few highest singular components in the graph spectrum , while the rest of spectral information corresponds to the clean graph structure in the spatial domain . Nonetheless , Figure 5 in Appendix A.8 shows the truncated SVD-based method aggressively reduces graph rank to 50 , which is two orders of magnitude smaller than the rank of input graph . In contrast , our reduced-rank method only removes the highest singular components , while retaining most of important spectral information . As a result , our reduced-rank approximation kernel leads to a significant accuracy improvement over the SVD-based low-rank approximation . More details are available in Appendices A.11 . | This paper proposes GARNET, a spectral approach to depend adversarial attacks on graph structure. GARNET consists of three steps, low rank approximation of adjacency matrix, adaptive filtering on node signals and label propagation. All the 3 steps of GARNET achieve low computation complexity and thus can be applied to large graphs. Extensive experiments on both homophily and heterophily graphs show that GARNET achieve significant accuracy improvements compared with baselines, when the structural perturbation on graphs are stronger. | SP:0e327a42dd51e05e6a90128209aa5367937b512d |
GARNET: A Spectral Approach to Robust and Scalable Graph Neural Networks | Graph neural networks ( GNNs ) have been increasingly deployed in various applications that involve learning on non-Euclidean data . However , recent studies show that GNNs are vulnerable to graph adversarial attacks . Although there are several defense methods to improve GNN adversarial robustness , they fail to perform well on low homophily graphs . In addition , few of those defense models can scale to large graphs due to their high computational complexity and memory usage . In this paper , we propose GARNET , a scalable spectral method to boost the adversarial robustness of GNN models for both homophilic and heterophilic graphs . GARNET first computes a reduced-rank yet sparse approximation of the adversarial graph by exploiting an efficient spectral graph embedding and sparsification scheme . Next , GARNET trains an adaptive graph filter on the reduced-rank graph for node representation refinement , which is subsequently leveraged to guide label propagation for further enhancing the quality of node embeddings . GARNET has been evaluated on both homophilic and heterophilic datasets , including a large graph with millions of nodes . Our extensive experiment results show that GARNET increases adversarial accuracy over state-of-the-art GNN ( defense ) models by up to 9.96 % and 18.06 % on homophilic and heterophilic graphs , respectively . 1 INTRODUCTION . Recent years have witnessed a surge of interest in graph neural networks ( GNNs ) , which incorporate both graph structure and node/edge attributes to produce low-dimensional embedding vectors that maximally preserve graph structural information ( Hamilton , 2020 ) . GNNs have achieved promising results in various real-world applications , such as recommendation systems ( Ying et al. , 2018 ) , self-driving car ( Casas et al. , 2020 ) , protein structure predictions ( Senior et al. , 2020 ) , and chip placements ( Mirhoseini et al. , 2021 ) . However , recent studies have shown that adversarial attacks on graph structure accomplished by inserting , deleting , or rewiring edges in an unnoticeable way , can easily fool GNN models and drastically degrade their accuracy in downstream tasks ( e.g. , node classification ) ( Zügner et al. , 2018 ; Zügner & Günnemann , 2019 ) . In literature , there are several attempts to defend GNNs against graph adversarial attacks . Entezari et al . ( 2020 ) first observed that graph adversarial attacks mainly affect high-rank properties of the graph ; consequently , a low-rank graph should be first constructed by performing truncated singular value decomposition ( SVD ) on the graph adjacency matrix , which can then be exploited for training a robust GNN model . Later , Jin et al . ( 2020 ) proposed Pro-GNN to jointly learn a new graph and its robust GNN model with the low-rank constraints imposed by the graph structure . However , such low-rank approximation methods involve dense adjacency matrices during the GNN training stage , which will lead to quadratic time and space complexity , prohibiting their applications in large-scale graph learning tasks . Another line of research aims at enhancing GNN robustness based on the graph homophily assumption , i.e. , adjacent nodes in a natural graph tend to have similar attributes , while the graph attacks essentially insert adversarial edges by connecting nodes with dissimilar attributes . As a result , researchers proposed to compute attribute similarity scores between adjacent nodes as edge weights , and drop edges with small weights to increase graph homophily ( Wu et al. , 2019 ; Zhang & Zitnik , 2020 ) . Although such approaches can successfully improve GNN robustness on high-homophily graphs , they may fail on low-homophily ( i.e. , heterophily ) graphs ( Zhu et al. , 2020 ) . In this paper , we propose GARNET , a spectral method for constructing GNN models that are robust to graph adversarial attacks for both homophilic and heterophilic graphs . In addition , GARNET scales comfortably to large graphs due to its nearly-linear algorithm complexity . More concretely , GARNET consists of three major kernels : ( 1 ) reduced-rank approximation , ( 2 ) adaptive filter learning , and ( 3 ) adaptive label propagation . The reduced-rank approximation kernel first performs truncated SVD on graph adjacency matrix to obtain a few dominant singular values and their corresponding singular vectors that are further leveraged to construct a sparse yet reduced-rank graph adjacency matrix ; the reduced-rank adjacency matrix can effectively mitigate the effects of adversarial attacks via connecting ( disconnecting ) nodes that are spectrally similar ( dissimilar ) . The adaptive filter learning kernel aims to learn a polynomial graph filter whose coefficients are trainable ; the learned graph filter can adapt to the homophilic/heterophilic properties of the underlying graph and thus will work effectively for both homophilic and heterophilic graphs . The adaptive label propagation stage will leverage the learned adaptive graph filter to guide the label propagation phase , which can further improve the adversarial accuracy by enhancing the quality of node representations . We evaluate the proposed GARNET model on three high-homophily datasets : Cora , Citeseer , and Pubmed as well as two low-homophily datasets : Chameleon and Squirrel , under strong graph adversarial attacks such as Nettack ( Zügner et al. , 2018 ) and Metattack ( Zügner & Günnemann , 2019 ) with various perturbation settings . Moreover , we further show the nearly-linear scalability of our approach on the ogbn-products dataset that consists of millions of nodes ( Hu et al. , 2020 ) . Our experimental results indicate that GARNET largely improves adversarial accuracy over baselines in most cases . The major advantages of GARNET are summarized as follows : • GARNET is robust to graph adversarial attacks . Exploiting the proposed reduced-rank approximation scheme allows GARNET to effectively filter out the noises potentially caused by adversarial attacks in the spectral domain . This immediately leads to substantial improvement ( up to 18.06 % ) of adversarial accuracy when comparing with the state-of-the-art baselines under the strong graph attacks on various datasets . • GARNET is agnostic to graph homophily . Unlike most existing defense models that do not work well on low-homophily adversarial graphs , GARNET leverages a trainable graph filter that can adapt to adversarial graphs with diverse levels of homophily . In addition , we theoretically demonstrate that the performance of the adaptive graph filter applied to an adversarial graph will be similar to the performance achieved on a clean graph . • GARNET is scalable to large graphs . GARNET has a nearly-linear runtime/space complexity and thus can scale comfortably to very large graph data sets with millions of nodes . We have conducted experiments on the ogbn-products dataset that contains 2 million nodes and 60 million edges , which is over 100× larger than the largest adversarial graph ever considered in the prior arts . 2 RELATED WORK . GNNs have received an increasing amount of attention in recent years due to its ability of learning on non-Euclidean ( graph ) data . In contrast to developing powerful GNN models on natural graph data , there is an active body of research focusing on adversarial attacks as well as defenses for GNNs . We summarize some of the recent efforts for graph adversarial attacks and defenses as follows . Graph adversarial attacks aim at degrading the accuracy of GNN models by perturbing the graph structure in an unnoticeable way . For instance , most existing graph adversarial attacks insert/delete edges while maintaining node degree distribution ( Sun et al. , 2018 ) . The most popular graph adversarial attacks fall into the following two categories : ( 1 ) targeted attack , ( 2 ) untargeted attack . The targeted attacks attempt to mislead a GNN model to produce a wrong prediction on a target sample ( e.g. , node ) , while the untargeted attacks strive to degrade the overall accuracy of a GNN model for the whole graph data set . Dai et al . ( 2018 ) first formulate the targeted attack as a combinatorial optimization problem and leverages reinforcement learning to insert/delete edges such that the target node is misclassified . Zügner et al . ( 2018 ) propose another targeted attack called Nettack , which produces an adversarial graph by maximizing the training loss of GNNs . Zügner & Günnemann ( 2019 ) further introduce Metattack , an untargeted attack that treats the graph as a hyperparameter and uses meta-gradients to perturb the graph structure . It is worth noting that graph adversarial attacks have two different settings : poison ( perturb a graph prior to GNN training ) and evasion ( perturb a graph after GNN training ) . As shown by Zhu et al . ( 2021 ) , the poison setting is typically more challenging to defend , as it changes graph structure that fools GNN training . Thus , in this work , we evaluate our model against both targeted and untargeted attacks under the poison setting . Graph adversarial defenses attempt to enhance GNN performance on the perturbed graphs generated by adversarial attacks . Entezari et al . ( 2020 ) first observe that Nettack , a strong targeted attack , only changes the high-rank information of the adjacency matrix after graph perturbation . Thus , they propose to construct a low-rank graph by performing truncated SVD to undermine the effects of adversarial attacks . Jin et al . ( 2020 ) propose Pro-GNN that adopts a similar idea yet jointly learns the low-rank graph and GNN model . However , such low-rank approximation based methods produce dense adjacency matrices that correspond to complete graphs , which would limit their applications for large graphs . Another line of research strives to purify the adversarial graph by assigning edge weights . Specifically , Wu et al . ( 2019 ) propose to modify the edge weights by computing the Jaccard similarity score per edge based on node attributes , which is followed by Zhang & Zitnik ( 2020 ) that propose GNNGuard to learn node attribute similarity score per edge through a trainable linear layer . Nonetheless , such approaches assume that nearby nodes should have similar attributes ( i.e. , graph homophily assumption ) , which is not valid for heterophilic graphs that have adjacent nodes with dissimilar attributes ( Zhu et al. , 2020 ) . In contrast to the prior arts , GARNET achieves highly robust yet scalable performance on both homophilic and heterophilic graphs under adversarial attacks by leveraging novel reduced-rank approximation and adaptive graph filtering schemes . 3 OUR APPROACH . Figure 1 gives an overview of our proposed approach , GARNET , which consists of three major phases . The first phase ( reduced-rank approximation ) constructs a reduced-rank yet sparse graph model by exploiting scalable truncated SVD and nearest-neighbor graph algorithms ( Baglama & Reichel , 2005 ; Malkov & Yashunin , 2018 ) . The second phase ( adaptive filter learning ) is the only phase that involves training , which outputs a learned graph filter that can adapt to the homophilic/heterophilic properties of the underlying graph . The last phase ( adaptive label propagation ) leverages the learned adaptive graph filter to guide the subsequent label propagation process . In the rest of this section , we will describe each of these three phases in more detail . 0 3.1 REDUCED-RANK APPROXIMATION ( PHASE 1 ) . The adjacency matrices of many real-world graphs ( e.g. , social network and biological network ) are naturally low rank and sparse , as the nodes typically tend to form communities and have a small number of neighbors ( Zhou et al. , 2013 ) . As a result , graph adversarial attacks can be viewed as compromising these properties by inserting edges that connect nodes from different communities ( Zügner et al. , 2018 ; Zügner & Günnemann , 2019 ) . Recently , Entezari et al . ( 2020 ) and Jin et al . ( 2020 ) have shown that the well-known graph adversarial attacks ( e.g. , Nettack and Metattack ) are essentially high-rank attacks , which mainly change the high-rank spectrum of the graph when perturbing the graph structure , while the low-rank spectrum remains almost the same . We empirically confirm that the graph rank indeed increases under adversarial attacks in Appendix A.7 . Consequently , a natural way for improving GNN robustness is to purify an adversarial graph by eliminating the high-rank components of its spectrum . To enhance GNN robustness , Entezari et al . ( 2020 ) and Jin et al . ( 2020 ) reconstruct a graph that only preserves the low-rank components of its spectrum to mitigate the effects of adversarial attacks , via performing truncated SVD on the adjacency matrix . Specifically , given a graph adjacency matrix A ∈ Rn×n , the rank-r approximated adjacency matrix can be obtained via truncated SVD :  = UΣV T , where Σ ∈ Rr×r is a diagonal matrix consisting of r largest singular values of A. U ∈ Rn×r and V ∈ Rn×r contain the corresponding left and right singular vectors , respectively . However , the reconstructed low-rank adjacency matrix  has two key issues : ( 1 )  is typically a dense matrix with O ( n2 ) nonzero elements , which may result in prohibitively expensive storage as well as GNN training , where n represents number of nodes ( Entezari et al. , 2020 ; Jin et al. , 2020 ) . Thus , existing low-rank approximation methods are not scalable to large graphs ; ( 2 ) Due to the high computational cost of SVD ,  is typically obtained by only leveraging top r singular values and singular vectors , where r is a relatively small number ( e.g. , r = 50 ) . Consequently , the rank of  is only r = 50 , which loses too much important spectrum information and thus limits the performance of GNN training . Reduced-rank approximation via sparsification . To avoid the quadratic space complexity for obtaining  , one simple solution is to sparsify  on the fly . More concretely , instead of directly computing  = UΣV T , we can compute  row by row : Âi , : = Ui , :ΣV T . Once we obtain Âi , : , we can sparsify it by setting Ãi , j = 0 if Âi , j < δ and Ãi , j = Âi , j otherwise , where δ is a hyperparameter to control the sparsity . In this way , we only need to store a dense vector Âi , : at a time and the final adjacency matrix à is sparse . Although the space complexity is reduced to O ( m ) , where m denotes the number of non-zero elements in à , this sparsification method still has quadratic time complexity for computing à . To tackle this issue , in this work a nearly-linear complexity algorithm for constructing a reduced-rank yet sparse matrix à is proposed by exploiting the following connection between matrix sparsification and spectral graph embedding . Definition 1 . Given the top r smallest eigenvalues λ1 , λ2 , ... , λr and their corresponding eigenvectors v1 , v2 , ... , vr of normalized graph Laplacian matrix Lnorm = I −D− 1 2AD− 1 2 , where I and A are the identity matrix and graph adjacency matrix , respectively , and D is a diagonal matrix of node degrees , the weighted spectral embedding matrix is defined as : V def = [ √ |1− λ1|v1 , ... , √ |1− λr|vr ] , ( 1 ) whose i-th row Vi , : is the weighted spectral embedding of the corresponding i-th node in the graph . Theorem 1 . Given a normalized graph adjacency matrix Anorm = D− 1 2AD− 1 2 of an undirected graph , let  be the rank-r approximation of Anorm via truncated SVD . If the top r dominant eigenvalues of Anorm are non-negative , then Âi , j corresponds to the dot product score between the weighted spectral embeddings of node i and j. Theorem 1 indicates that the reduced-rank approximation of the normalized adjacency matrix via truncated SVD captures the spectral similarity between nodes , which motivates us to leverage weighted spectral embeddings to capture graph spectral ( low-rank ) information , thereby identifying edges to be pruned ( sparsified ) from the graph . Unlike traditional spectral graph embedding methods that utilize the first r Laplacian eigenpairs to construct spectral embedding matrix , we exploit the top r largest singular values and their singular vectors of Anorm that may include both the smallest and largest Laplacian eigenpairs for capturing global and local structural information , respectively ( Shuman et al. , 2013 ) . More specifically , given a graph G = ( V , E ) and its normalized adjacency matrix Anorm , our approach first computes the r largest singular values ( e.g. , r = 50 ) and the corresponding singular vectors of Anorm leveraging efficient eigensolvers in O ( r|E| ) time to construct the weighted spectral embeddings ( Baglama & Reichel , 2005 ) ; next , the embedding results are then used to construct a nearest neighbor ( NN ) graph , where each node will be connected to its k most spectrally similar nodes . Afterwards , we compute the dot product similarity scores between adjacent nodes in the NN graph . If the similarity score is less than a threshold δ , we prune the corresponding edge from the NN graph to further sparsify the graph . In this work , we exploit an approximate k-nearest neighbor algorithm for constructing the NN graph , which has O ( |V| log |V| ) complexity and thus can scale to very large graphs ( Malkov & Yashunin , 2018 ) . We say a graph is a reduced-rank graph if its adjacency matrix is obtained via the proposed reduced-rank approximation method . As a result , we can obtain a reduced-rank and sparse graph in O ( r|E|+ |V| log |V| ) time . Apart from the advantage of scalability , our kNN-based reduced-rank graph also preserves much more important spectrum information than the truncated SVD-based low-rank graph . As shown by Entezari et al . ( 2020 ) , adversarial attacks only perturb the top few highest singular components in the graph spectrum , while the rest of spectral information corresponds to the clean graph structure in the spatial domain . Nonetheless , Figure 5 in Appendix A.8 shows the truncated SVD-based method aggressively reduces graph rank to 50 , which is two orders of magnitude smaller than the rank of input graph . In contrast , our reduced-rank method only removes the highest singular components , while retaining most of important spectral information . As a result , our reduced-rank approximation kernel leads to a significant accuracy improvement over the SVD-based low-rank approximation . More details are available in Appendices A.11 . | The paper proposes a reduced-rank and sparse approximation method to purify the graph structure for better robustness against adversarial graph attacks. The approximation is accelerated through spectral embedding and sparsification. Moreover, adaptive graph filter and label propagation are considered for further improvement on low homophily graphs. | SP:0e327a42dd51e05e6a90128209aa5367937b512d |
GARNET: A Spectral Approach to Robust and Scalable Graph Neural Networks | Graph neural networks ( GNNs ) have been increasingly deployed in various applications that involve learning on non-Euclidean data . However , recent studies show that GNNs are vulnerable to graph adversarial attacks . Although there are several defense methods to improve GNN adversarial robustness , they fail to perform well on low homophily graphs . In addition , few of those defense models can scale to large graphs due to their high computational complexity and memory usage . In this paper , we propose GARNET , a scalable spectral method to boost the adversarial robustness of GNN models for both homophilic and heterophilic graphs . GARNET first computes a reduced-rank yet sparse approximation of the adversarial graph by exploiting an efficient spectral graph embedding and sparsification scheme . Next , GARNET trains an adaptive graph filter on the reduced-rank graph for node representation refinement , which is subsequently leveraged to guide label propagation for further enhancing the quality of node embeddings . GARNET has been evaluated on both homophilic and heterophilic datasets , including a large graph with millions of nodes . Our extensive experiment results show that GARNET increases adversarial accuracy over state-of-the-art GNN ( defense ) models by up to 9.96 % and 18.06 % on homophilic and heterophilic graphs , respectively . 1 INTRODUCTION . Recent years have witnessed a surge of interest in graph neural networks ( GNNs ) , which incorporate both graph structure and node/edge attributes to produce low-dimensional embedding vectors that maximally preserve graph structural information ( Hamilton , 2020 ) . GNNs have achieved promising results in various real-world applications , such as recommendation systems ( Ying et al. , 2018 ) , self-driving car ( Casas et al. , 2020 ) , protein structure predictions ( Senior et al. , 2020 ) , and chip placements ( Mirhoseini et al. , 2021 ) . However , recent studies have shown that adversarial attacks on graph structure accomplished by inserting , deleting , or rewiring edges in an unnoticeable way , can easily fool GNN models and drastically degrade their accuracy in downstream tasks ( e.g. , node classification ) ( Zügner et al. , 2018 ; Zügner & Günnemann , 2019 ) . In literature , there are several attempts to defend GNNs against graph adversarial attacks . Entezari et al . ( 2020 ) first observed that graph adversarial attacks mainly affect high-rank properties of the graph ; consequently , a low-rank graph should be first constructed by performing truncated singular value decomposition ( SVD ) on the graph adjacency matrix , which can then be exploited for training a robust GNN model . Later , Jin et al . ( 2020 ) proposed Pro-GNN to jointly learn a new graph and its robust GNN model with the low-rank constraints imposed by the graph structure . However , such low-rank approximation methods involve dense adjacency matrices during the GNN training stage , which will lead to quadratic time and space complexity , prohibiting their applications in large-scale graph learning tasks . Another line of research aims at enhancing GNN robustness based on the graph homophily assumption , i.e. , adjacent nodes in a natural graph tend to have similar attributes , while the graph attacks essentially insert adversarial edges by connecting nodes with dissimilar attributes . As a result , researchers proposed to compute attribute similarity scores between adjacent nodes as edge weights , and drop edges with small weights to increase graph homophily ( Wu et al. , 2019 ; Zhang & Zitnik , 2020 ) . Although such approaches can successfully improve GNN robustness on high-homophily graphs , they may fail on low-homophily ( i.e. , heterophily ) graphs ( Zhu et al. , 2020 ) . In this paper , we propose GARNET , a spectral method for constructing GNN models that are robust to graph adversarial attacks for both homophilic and heterophilic graphs . In addition , GARNET scales comfortably to large graphs due to its nearly-linear algorithm complexity . More concretely , GARNET consists of three major kernels : ( 1 ) reduced-rank approximation , ( 2 ) adaptive filter learning , and ( 3 ) adaptive label propagation . The reduced-rank approximation kernel first performs truncated SVD on graph adjacency matrix to obtain a few dominant singular values and their corresponding singular vectors that are further leveraged to construct a sparse yet reduced-rank graph adjacency matrix ; the reduced-rank adjacency matrix can effectively mitigate the effects of adversarial attacks via connecting ( disconnecting ) nodes that are spectrally similar ( dissimilar ) . The adaptive filter learning kernel aims to learn a polynomial graph filter whose coefficients are trainable ; the learned graph filter can adapt to the homophilic/heterophilic properties of the underlying graph and thus will work effectively for both homophilic and heterophilic graphs . The adaptive label propagation stage will leverage the learned adaptive graph filter to guide the label propagation phase , which can further improve the adversarial accuracy by enhancing the quality of node representations . We evaluate the proposed GARNET model on three high-homophily datasets : Cora , Citeseer , and Pubmed as well as two low-homophily datasets : Chameleon and Squirrel , under strong graph adversarial attacks such as Nettack ( Zügner et al. , 2018 ) and Metattack ( Zügner & Günnemann , 2019 ) with various perturbation settings . Moreover , we further show the nearly-linear scalability of our approach on the ogbn-products dataset that consists of millions of nodes ( Hu et al. , 2020 ) . Our experimental results indicate that GARNET largely improves adversarial accuracy over baselines in most cases . The major advantages of GARNET are summarized as follows : • GARNET is robust to graph adversarial attacks . Exploiting the proposed reduced-rank approximation scheme allows GARNET to effectively filter out the noises potentially caused by adversarial attacks in the spectral domain . This immediately leads to substantial improvement ( up to 18.06 % ) of adversarial accuracy when comparing with the state-of-the-art baselines under the strong graph attacks on various datasets . • GARNET is agnostic to graph homophily . Unlike most existing defense models that do not work well on low-homophily adversarial graphs , GARNET leverages a trainable graph filter that can adapt to adversarial graphs with diverse levels of homophily . In addition , we theoretically demonstrate that the performance of the adaptive graph filter applied to an adversarial graph will be similar to the performance achieved on a clean graph . • GARNET is scalable to large graphs . GARNET has a nearly-linear runtime/space complexity and thus can scale comfortably to very large graph data sets with millions of nodes . We have conducted experiments on the ogbn-products dataset that contains 2 million nodes and 60 million edges , which is over 100× larger than the largest adversarial graph ever considered in the prior arts . 2 RELATED WORK . GNNs have received an increasing amount of attention in recent years due to its ability of learning on non-Euclidean ( graph ) data . In contrast to developing powerful GNN models on natural graph data , there is an active body of research focusing on adversarial attacks as well as defenses for GNNs . We summarize some of the recent efforts for graph adversarial attacks and defenses as follows . Graph adversarial attacks aim at degrading the accuracy of GNN models by perturbing the graph structure in an unnoticeable way . For instance , most existing graph adversarial attacks insert/delete edges while maintaining node degree distribution ( Sun et al. , 2018 ) . The most popular graph adversarial attacks fall into the following two categories : ( 1 ) targeted attack , ( 2 ) untargeted attack . The targeted attacks attempt to mislead a GNN model to produce a wrong prediction on a target sample ( e.g. , node ) , while the untargeted attacks strive to degrade the overall accuracy of a GNN model for the whole graph data set . Dai et al . ( 2018 ) first formulate the targeted attack as a combinatorial optimization problem and leverages reinforcement learning to insert/delete edges such that the target node is misclassified . Zügner et al . ( 2018 ) propose another targeted attack called Nettack , which produces an adversarial graph by maximizing the training loss of GNNs . Zügner & Günnemann ( 2019 ) further introduce Metattack , an untargeted attack that treats the graph as a hyperparameter and uses meta-gradients to perturb the graph structure . It is worth noting that graph adversarial attacks have two different settings : poison ( perturb a graph prior to GNN training ) and evasion ( perturb a graph after GNN training ) . As shown by Zhu et al . ( 2021 ) , the poison setting is typically more challenging to defend , as it changes graph structure that fools GNN training . Thus , in this work , we evaluate our model against both targeted and untargeted attacks under the poison setting . Graph adversarial defenses attempt to enhance GNN performance on the perturbed graphs generated by adversarial attacks . Entezari et al . ( 2020 ) first observe that Nettack , a strong targeted attack , only changes the high-rank information of the adjacency matrix after graph perturbation . Thus , they propose to construct a low-rank graph by performing truncated SVD to undermine the effects of adversarial attacks . Jin et al . ( 2020 ) propose Pro-GNN that adopts a similar idea yet jointly learns the low-rank graph and GNN model . However , such low-rank approximation based methods produce dense adjacency matrices that correspond to complete graphs , which would limit their applications for large graphs . Another line of research strives to purify the adversarial graph by assigning edge weights . Specifically , Wu et al . ( 2019 ) propose to modify the edge weights by computing the Jaccard similarity score per edge based on node attributes , which is followed by Zhang & Zitnik ( 2020 ) that propose GNNGuard to learn node attribute similarity score per edge through a trainable linear layer . Nonetheless , such approaches assume that nearby nodes should have similar attributes ( i.e. , graph homophily assumption ) , which is not valid for heterophilic graphs that have adjacent nodes with dissimilar attributes ( Zhu et al. , 2020 ) . In contrast to the prior arts , GARNET achieves highly robust yet scalable performance on both homophilic and heterophilic graphs under adversarial attacks by leveraging novel reduced-rank approximation and adaptive graph filtering schemes . 3 OUR APPROACH . Figure 1 gives an overview of our proposed approach , GARNET , which consists of three major phases . The first phase ( reduced-rank approximation ) constructs a reduced-rank yet sparse graph model by exploiting scalable truncated SVD and nearest-neighbor graph algorithms ( Baglama & Reichel , 2005 ; Malkov & Yashunin , 2018 ) . The second phase ( adaptive filter learning ) is the only phase that involves training , which outputs a learned graph filter that can adapt to the homophilic/heterophilic properties of the underlying graph . The last phase ( adaptive label propagation ) leverages the learned adaptive graph filter to guide the subsequent label propagation process . In the rest of this section , we will describe each of these three phases in more detail . 0 3.1 REDUCED-RANK APPROXIMATION ( PHASE 1 ) . The adjacency matrices of many real-world graphs ( e.g. , social network and biological network ) are naturally low rank and sparse , as the nodes typically tend to form communities and have a small number of neighbors ( Zhou et al. , 2013 ) . As a result , graph adversarial attacks can be viewed as compromising these properties by inserting edges that connect nodes from different communities ( Zügner et al. , 2018 ; Zügner & Günnemann , 2019 ) . Recently , Entezari et al . ( 2020 ) and Jin et al . ( 2020 ) have shown that the well-known graph adversarial attacks ( e.g. , Nettack and Metattack ) are essentially high-rank attacks , which mainly change the high-rank spectrum of the graph when perturbing the graph structure , while the low-rank spectrum remains almost the same . We empirically confirm that the graph rank indeed increases under adversarial attacks in Appendix A.7 . Consequently , a natural way for improving GNN robustness is to purify an adversarial graph by eliminating the high-rank components of its spectrum . To enhance GNN robustness , Entezari et al . ( 2020 ) and Jin et al . ( 2020 ) reconstruct a graph that only preserves the low-rank components of its spectrum to mitigate the effects of adversarial attacks , via performing truncated SVD on the adjacency matrix . Specifically , given a graph adjacency matrix A ∈ Rn×n , the rank-r approximated adjacency matrix can be obtained via truncated SVD :  = UΣV T , where Σ ∈ Rr×r is a diagonal matrix consisting of r largest singular values of A. U ∈ Rn×r and V ∈ Rn×r contain the corresponding left and right singular vectors , respectively . However , the reconstructed low-rank adjacency matrix  has two key issues : ( 1 )  is typically a dense matrix with O ( n2 ) nonzero elements , which may result in prohibitively expensive storage as well as GNN training , where n represents number of nodes ( Entezari et al. , 2020 ; Jin et al. , 2020 ) . Thus , existing low-rank approximation methods are not scalable to large graphs ; ( 2 ) Due to the high computational cost of SVD ,  is typically obtained by only leveraging top r singular values and singular vectors , where r is a relatively small number ( e.g. , r = 50 ) . Consequently , the rank of  is only r = 50 , which loses too much important spectrum information and thus limits the performance of GNN training . Reduced-rank approximation via sparsification . To avoid the quadratic space complexity for obtaining  , one simple solution is to sparsify  on the fly . More concretely , instead of directly computing  = UΣV T , we can compute  row by row : Âi , : = Ui , :ΣV T . Once we obtain Âi , : , we can sparsify it by setting Ãi , j = 0 if Âi , j < δ and Ãi , j = Âi , j otherwise , where δ is a hyperparameter to control the sparsity . In this way , we only need to store a dense vector Âi , : at a time and the final adjacency matrix à is sparse . Although the space complexity is reduced to O ( m ) , where m denotes the number of non-zero elements in à , this sparsification method still has quadratic time complexity for computing à . To tackle this issue , in this work a nearly-linear complexity algorithm for constructing a reduced-rank yet sparse matrix à is proposed by exploiting the following connection between matrix sparsification and spectral graph embedding . Definition 1 . Given the top r smallest eigenvalues λ1 , λ2 , ... , λr and their corresponding eigenvectors v1 , v2 , ... , vr of normalized graph Laplacian matrix Lnorm = I −D− 1 2AD− 1 2 , where I and A are the identity matrix and graph adjacency matrix , respectively , and D is a diagonal matrix of node degrees , the weighted spectral embedding matrix is defined as : V def = [ √ |1− λ1|v1 , ... , √ |1− λr|vr ] , ( 1 ) whose i-th row Vi , : is the weighted spectral embedding of the corresponding i-th node in the graph . Theorem 1 . Given a normalized graph adjacency matrix Anorm = D− 1 2AD− 1 2 of an undirected graph , let  be the rank-r approximation of Anorm via truncated SVD . If the top r dominant eigenvalues of Anorm are non-negative , then Âi , j corresponds to the dot product score between the weighted spectral embeddings of node i and j. Theorem 1 indicates that the reduced-rank approximation of the normalized adjacency matrix via truncated SVD captures the spectral similarity between nodes , which motivates us to leverage weighted spectral embeddings to capture graph spectral ( low-rank ) information , thereby identifying edges to be pruned ( sparsified ) from the graph . Unlike traditional spectral graph embedding methods that utilize the first r Laplacian eigenpairs to construct spectral embedding matrix , we exploit the top r largest singular values and their singular vectors of Anorm that may include both the smallest and largest Laplacian eigenpairs for capturing global and local structural information , respectively ( Shuman et al. , 2013 ) . More specifically , given a graph G = ( V , E ) and its normalized adjacency matrix Anorm , our approach first computes the r largest singular values ( e.g. , r = 50 ) and the corresponding singular vectors of Anorm leveraging efficient eigensolvers in O ( r|E| ) time to construct the weighted spectral embeddings ( Baglama & Reichel , 2005 ) ; next , the embedding results are then used to construct a nearest neighbor ( NN ) graph , where each node will be connected to its k most spectrally similar nodes . Afterwards , we compute the dot product similarity scores between adjacent nodes in the NN graph . If the similarity score is less than a threshold δ , we prune the corresponding edge from the NN graph to further sparsify the graph . In this work , we exploit an approximate k-nearest neighbor algorithm for constructing the NN graph , which has O ( |V| log |V| ) complexity and thus can scale to very large graphs ( Malkov & Yashunin , 2018 ) . We say a graph is a reduced-rank graph if its adjacency matrix is obtained via the proposed reduced-rank approximation method . As a result , we can obtain a reduced-rank and sparse graph in O ( r|E|+ |V| log |V| ) time . Apart from the advantage of scalability , our kNN-based reduced-rank graph also preserves much more important spectrum information than the truncated SVD-based low-rank graph . As shown by Entezari et al . ( 2020 ) , adversarial attacks only perturb the top few highest singular components in the graph spectrum , while the rest of spectral information corresponds to the clean graph structure in the spatial domain . Nonetheless , Figure 5 in Appendix A.8 shows the truncated SVD-based method aggressively reduces graph rank to 50 , which is two orders of magnitude smaller than the rank of input graph . In contrast , our reduced-rank method only removes the highest singular components , while retaining most of important spectral information . As a result , our reduced-rank approximation kernel leads to a significant accuracy improvement over the SVD-based low-rank approximation . More details are available in Appendices A.11 . | This paper proposes a spectral approach towards robust and scalable graph learning, namely GARNET. There are three main components inspired by handling low-homophily graphs in GARNET: low rank and sparse approximation of the adversarial graph, a variant of spectral GNN with an adaptive filter, and label propagation with special interest to the learned filter. GARNET is claimed to be nearly-linear so that it can be scaled to very huge graphs. Experiments against both targeted and untargeted attacks under the poison setting over a collection of graph benchmark datasets demonstrate that GARNET could increase the adversarial accuracy more than state-of-the-art defending methods. | SP:0e327a42dd51e05e6a90128209aa5367937b512d |
EinSteinVI: General and Integrated Stein Variational Inference | 1 INTRODUCTION . Interest in Bayesian deep learning has surged due to the need for quantifying the uncertainty of predictions obtained from machine learning algorithms ( Wilson & Izmailov , 2020 ; Wilson , 2020 ) . The idea behind Bayesian inference is to describe observed data x using a model with latent variables z . The goal is to infer a posterior distribution p ( z|x ) over the latent variables given a model describing the joint distribution p ( z , x ) = p ( x|z ) p ( z ) . We obtain the posterior by following the rules of Bayesian inference : p ( z|x ) = Z−1p ( x|z ) p ( z ) where Z = ∫ z p ( x|z ) p ( z ) dz is the normalization constant . For most practical models , the normalization constant lacks an analytic solution or requires an infeasible number of computations , complicating the Bayesian inference problem . Variational Inference ( VI ) techniques ( Blei et al. , 2017 ; Hoffman et al. , 2013 ; Ranganath et al. , 2014 ) aim to approximate the posterior distribution . VI poses a family of distributions over the latent variables q ( z ) ∈ Q and finds arg min q∈Q D ( q ( z ) |p ( z|x ) ) , where D is a divergence1 between the variational distribution q , also called the guide , and the true posterior distribution p ( z|x ) . The Kullback-Leibler divergence is a typical choice . VI often provides good approximations that capture uncertainty and scales to millions of data points by a suitable choice of Q and inference method . Stein VI is a family of VI techniques for approximate Bayesian inference based on Stein ’ s method ( see Anastasiou et al . ( 2021 ) for an overview ) that is gaining popularity since it combines the scalability of traditional VI with the flexibility of non-parametric particle-based methods . Stein variational gradient descent ( SVGD ) ( Liu & Wang , 2016 ) is a recent Stein VI technique which uses a set of particles { zi } Ni=1 as the approximating distribution q ( z ) . As a particle-based method , SVGD is well suited for capturing correlations between latent variables . The technique preserves the scalability of traditional 1An asymmetric distance that might satisfy the triangle inequality . VI approaches while offering the flexibility and modeling scope of techniques such as Markov chain Monte Carlo ( MCMC ) . SVGD is good at capturing multi-modality ( Liu & Wang , 2016 ; Wang & Liu , 2019a ) , and has useful theoretical interpretations such as a set of particles following a gradient flow ( Liu , 2017 ) or in terms of the properties of kernels ( Liu & Wang , 2018 ) . Many advanced inference methods based on SVGD have been recently developed ; these include nonlinear Stein ( Wang & Liu , 2019a ) , factorized graphical models ( Zhuo et al. , 2018 ; Wang et al. , 2018a ) , matrix-valued kernels ( Wang et al. , 2019a ) and support for higher-order gradient-based optimization ( Detommaso et al. , 2018 ) . These techniques have extended the scope of SVGD , allowing more flexible and accurate approximations of the posterior distribution . While algorithmic power is growing , a distinct lack of integration with a general probabilistic programming language ( PPL ) framework remains . Such integration would solve one of the most prominent limitations of PPLs with traditional VI : their lack of flexibility in capturing rich correlations in the approximated posterior . The main problem with SVGD is that it suffers from the curse of dimensionality : the number of particles required to adequately represent a posterior distribution is exponential in its dimensionality . Nalisnick & Smyth ( 2017 ) suggest resolving this by using Stein mixtures and propose an inference algorithm that uses differentiable non-centered parameterization ( DNCP ) ( Kingma & Welling , 2014 ) and importance weighted Monte Carlo gradients ( Burda et al. , 2015 ) . In this article we propose a novel algorithm for inference of Stein mixtures called ELBO-within-Stein . Unlike prior work on Stein mixtures ( Nalisnick & Smyth , 2017 ) , ELBO-within-Stein i ) is simple to implement , ii ) only has the learning rate as a tuneable hyper-parameters , iii ) requires only one gradient evaluation of the ELBO for each particle ( 10 is typical for Stein mixtures ) and iv ) supports the use of a tailored guide . We validate our algorithm experimentally , showing significant improvements in accuracy . ELBO-within-Stein is the core algorithm of our Stein VI library called EinSteinVI library . Our library further includes SVGD as a special case of ELBO-within-Stein and all the advanced methods mentioned above . The only other PPL with Stein VI methods is PyMC3 ( Salvatier et al. , 2016 ) . However , PyMC3 does not include any of the advanced Stein VI methods mentioned above or Stein mixture methods . The EinSteinVI library extends the NumPyro PPL ( Bingham et al. , 2019 ; Phan et al. , 2019 ) . NumPyro is a universal probabilistic programming language ( van de Meent et al. , 2018 ) for Python , which allows arbitrary code to be executed in both its model and guide . The computational backend of NumPyro is Jax ( Frostig et al. , 2018 ) , which gives access to the powerful program optimization and parallelizability provided by the Jax compiler . As EinSteinVI works with arbitrary guides , NumPyro is a well suited language for embedding EinSteinVI . This is because NumPyro i ) is embedded in Python , the de facto programming language for data science , ii ) includes the necessary data-structures for tracking random variables in both model and guide , iii ) features SVI with an API that is highly suitable for EinSteinVI , and iv ) benefits computationally from Jax . Our extensions include SVGD , Stein-mixtures formulated as ELBO-within-Stein , and the advanced methods mentioned above . Concretely , our contributions are : • ELBO-within-Stein ( EinSteinVI ) . A novel algorithm for Stein mixtures that only requires a single gradient evaluation of the ELBO per particle . • A general library extension to NumPyro , called EinSteinVI . EinSteinVI allows SVGD to work with custom guide programs based on ELBO-within-Stein optimization . The library is compositional with NumPyro features , including support for deep learning , loss functions ( ELBO , Rényi ELBO ( Li & Turner , 2016 ) , custom losses ) , and optimization methods , thus making it possible for EinSteinVI to grow organically with NumPyro development . • Integration of recent developments in Stein variational inference which includes : nonlinear optimization ( Wang & Liu , 2019a ) , a wealth of kernels ( Liu & Wang , 2016 ; 2018 ; Gorham & Mackey , 2017 ) , matrix-valued kernels ( Wang et al. , 2019a ) supporting higherorder optimization , an ( experimental ) update based on Stein point MCMC ( Chen et al. , 2019a ) , and factorization based on conditional independence between elements in the model ( graphical kernels ) ( Wang et al. , 2018b ) . • A series of examples that demonstrate EinSteinVI and the synergy between different Stein VI techniques . The examples include a novel Stein-mixture version of the deep Markov model ( SM-DMM ) , Bayesian neural networks for regression . An examples that explore kernels and higher-order optimization is available in the appendix . The paper proceeds as follows . We first present the background of SVGD in the context of our integrated implementation in Section 2 . In Section 3 we introduce Stein mixtures and our algorithm ELBO-within-Stein . We discuss the general details of the implementation of EinSteinVI in Section 4 . Next , we discuss related work in Section 5 . In Section 6 we present various examples using EinSteinVI , and finally , we summarize our results and discuss future work in Section 7 . 2 STEIN VARIATIONAL GRADIENT DESCENT . The core idea of SVGD is to perform inference by approximating the target posterior distribution p ( z|x ) by an empirical distribution qZ ( z ) = N−1 ∑ i δzi ( z ) based on a set of particles Z = { zi } Ni=1 . Here , δx ( y ) represents the Dirac delta measure , which is equal to 1 if x = y and 0 otherwise . One could thus see the approximating distribution qZ ( z ) as a mixture of point estimates , each represented by a particle zi ∈ Z . The idea is to minimize the Kullback-Leibler divergence DKL ( qZ ( z ) ‖ p ( z|x ) ) between the approximation and the true posterior by iteratively updating the particles using the Stein forces : zi ← zi + SZ ( zi ) where is the learning rate and SZ denotes the Stein forces . The Two Forces of SVGD Stein VI consists of two forces which work additively under the form SZ = S + Z + S − Z , where the attractive force is given by S+Z ( zi ) = Ezj∼qZ ( z ) [ k ( zi , zj ) ∇zj log p ( zj |x ) ] and the repulsive force by S−Z ( zi ) = Ezj∼qZ ( z ) [ ∇zjk ( zi , zj ) ] . Here k : Rd × Rd → R is a kernel . The attractive force can be seen as pushing the particles towards the modes of the true posterior distribution , smoothed by some kernel . For an example of a kernel , consider the radial basis function ( RBF ) kernel k ( zi , zj ) = exp ( − 1h ‖ zi − zj ‖ 2 2 ) with bandwidth parameter h , chosen as 1lognmed ( z ) . The repulsive force moves particles away from each other , ensuring that they do not collapse to the same mode . For example , with the RBF kernel , the repulsive force becomes Ezj∼qZ ( z ) [ − exp ( − 1h ‖ zi − zj ‖ 2 2 ) 2 h ∑ ` ( zi ` − zj ` ) ] , which has high kernel values for particles that are close , causing them to repel . SVGD works with unnormalized distributions p as the normalization constant becomes additive in the log-posterior log p ( zi|x ) = − logZ + log p ( x|z ) + log p ( z ) and is thus not required for the calculation of the gradient . This property is desirable as normalizing p is often computationally expensive . Non-linear Stein In non-linear Stein ( Wang & Liu , 2019a ) , the repulsive force can be scaled by a factor λ , resulting in SZ = S+Z + λS − Z . This approach is useful when dealing with multimodal distributions . It is also useful in cases where the repulsive force vanishes compared to the likelihood , which happens for large datasets ( X ) . Scaling the repulsive force by a constant λ = c ( |X | ) proportional ( e.g . c = 0.1 or c = 0.01 ) to the size of the dataset |X | addresses this issue and can be chosen by cross-validation on a subset of the data . Matrix-valued kernels The choice of kernels can be extended to matrix-valued ones ( Wang et al. , 2019a ) , K : Rd × Rd → Rd×d , in which case the Stein forces become S+Z ( zi ) = Ezj∼qZ ( z ) [ K ( zi , zj ) ∇zj log p ( zj |x ) ] and S−Z ( zi ) = Ezj∼qZ ( z ) [ K ( zi , zj ) ∇zj ] where the standalone del ∇zj in the repulsive force represents the vector ( ∂ ∂zj,1 , . . . , ∂∂zj , d ) . This results in ( K ( zi , zj ) ∇zj ) ` = ∑ k ∇kK ` , k ( zi , zj ) . The advantage of matrix-valued kernels is that they allow preconditioning2 using the Hessian or Fisher Information matrix , which can capture local curvature and thus achieve better optima and convergence rate than standard SVGD . Furthermore , it is easy to represent graphical kernels ( Wang et al. , 2018a ) using matrix kernels , e.g . K = diag ( { K ( ` ) } ` ) where the set of variables are partitioned with each their own local kernel K ( ` ) . | The aim of this work is to integrate the Stein variational inference methods in the existing probabilistic programming language NumPyro. The implemented methods include variants of Stein variational gradient descent algorithms with a range of kernel functions, non-linear scaling of update terms, and matrix-valued kernels. Empirical results with existing baselines for real-world problems are provided. | SP:3694901f3283a2b65d0d60e1460b61de038bf958 |
EinSteinVI: General and Integrated Stein Variational Inference | 1 INTRODUCTION . Interest in Bayesian deep learning has surged due to the need for quantifying the uncertainty of predictions obtained from machine learning algorithms ( Wilson & Izmailov , 2020 ; Wilson , 2020 ) . The idea behind Bayesian inference is to describe observed data x using a model with latent variables z . The goal is to infer a posterior distribution p ( z|x ) over the latent variables given a model describing the joint distribution p ( z , x ) = p ( x|z ) p ( z ) . We obtain the posterior by following the rules of Bayesian inference : p ( z|x ) = Z−1p ( x|z ) p ( z ) where Z = ∫ z p ( x|z ) p ( z ) dz is the normalization constant . For most practical models , the normalization constant lacks an analytic solution or requires an infeasible number of computations , complicating the Bayesian inference problem . Variational Inference ( VI ) techniques ( Blei et al. , 2017 ; Hoffman et al. , 2013 ; Ranganath et al. , 2014 ) aim to approximate the posterior distribution . VI poses a family of distributions over the latent variables q ( z ) ∈ Q and finds arg min q∈Q D ( q ( z ) |p ( z|x ) ) , where D is a divergence1 between the variational distribution q , also called the guide , and the true posterior distribution p ( z|x ) . The Kullback-Leibler divergence is a typical choice . VI often provides good approximations that capture uncertainty and scales to millions of data points by a suitable choice of Q and inference method . Stein VI is a family of VI techniques for approximate Bayesian inference based on Stein ’ s method ( see Anastasiou et al . ( 2021 ) for an overview ) that is gaining popularity since it combines the scalability of traditional VI with the flexibility of non-parametric particle-based methods . Stein variational gradient descent ( SVGD ) ( Liu & Wang , 2016 ) is a recent Stein VI technique which uses a set of particles { zi } Ni=1 as the approximating distribution q ( z ) . As a particle-based method , SVGD is well suited for capturing correlations between latent variables . The technique preserves the scalability of traditional 1An asymmetric distance that might satisfy the triangle inequality . VI approaches while offering the flexibility and modeling scope of techniques such as Markov chain Monte Carlo ( MCMC ) . SVGD is good at capturing multi-modality ( Liu & Wang , 2016 ; Wang & Liu , 2019a ) , and has useful theoretical interpretations such as a set of particles following a gradient flow ( Liu , 2017 ) or in terms of the properties of kernels ( Liu & Wang , 2018 ) . Many advanced inference methods based on SVGD have been recently developed ; these include nonlinear Stein ( Wang & Liu , 2019a ) , factorized graphical models ( Zhuo et al. , 2018 ; Wang et al. , 2018a ) , matrix-valued kernels ( Wang et al. , 2019a ) and support for higher-order gradient-based optimization ( Detommaso et al. , 2018 ) . These techniques have extended the scope of SVGD , allowing more flexible and accurate approximations of the posterior distribution . While algorithmic power is growing , a distinct lack of integration with a general probabilistic programming language ( PPL ) framework remains . Such integration would solve one of the most prominent limitations of PPLs with traditional VI : their lack of flexibility in capturing rich correlations in the approximated posterior . The main problem with SVGD is that it suffers from the curse of dimensionality : the number of particles required to adequately represent a posterior distribution is exponential in its dimensionality . Nalisnick & Smyth ( 2017 ) suggest resolving this by using Stein mixtures and propose an inference algorithm that uses differentiable non-centered parameterization ( DNCP ) ( Kingma & Welling , 2014 ) and importance weighted Monte Carlo gradients ( Burda et al. , 2015 ) . In this article we propose a novel algorithm for inference of Stein mixtures called ELBO-within-Stein . Unlike prior work on Stein mixtures ( Nalisnick & Smyth , 2017 ) , ELBO-within-Stein i ) is simple to implement , ii ) only has the learning rate as a tuneable hyper-parameters , iii ) requires only one gradient evaluation of the ELBO for each particle ( 10 is typical for Stein mixtures ) and iv ) supports the use of a tailored guide . We validate our algorithm experimentally , showing significant improvements in accuracy . ELBO-within-Stein is the core algorithm of our Stein VI library called EinSteinVI library . Our library further includes SVGD as a special case of ELBO-within-Stein and all the advanced methods mentioned above . The only other PPL with Stein VI methods is PyMC3 ( Salvatier et al. , 2016 ) . However , PyMC3 does not include any of the advanced Stein VI methods mentioned above or Stein mixture methods . The EinSteinVI library extends the NumPyro PPL ( Bingham et al. , 2019 ; Phan et al. , 2019 ) . NumPyro is a universal probabilistic programming language ( van de Meent et al. , 2018 ) for Python , which allows arbitrary code to be executed in both its model and guide . The computational backend of NumPyro is Jax ( Frostig et al. , 2018 ) , which gives access to the powerful program optimization and parallelizability provided by the Jax compiler . As EinSteinVI works with arbitrary guides , NumPyro is a well suited language for embedding EinSteinVI . This is because NumPyro i ) is embedded in Python , the de facto programming language for data science , ii ) includes the necessary data-structures for tracking random variables in both model and guide , iii ) features SVI with an API that is highly suitable for EinSteinVI , and iv ) benefits computationally from Jax . Our extensions include SVGD , Stein-mixtures formulated as ELBO-within-Stein , and the advanced methods mentioned above . Concretely , our contributions are : • ELBO-within-Stein ( EinSteinVI ) . A novel algorithm for Stein mixtures that only requires a single gradient evaluation of the ELBO per particle . • A general library extension to NumPyro , called EinSteinVI . EinSteinVI allows SVGD to work with custom guide programs based on ELBO-within-Stein optimization . The library is compositional with NumPyro features , including support for deep learning , loss functions ( ELBO , Rényi ELBO ( Li & Turner , 2016 ) , custom losses ) , and optimization methods , thus making it possible for EinSteinVI to grow organically with NumPyro development . • Integration of recent developments in Stein variational inference which includes : nonlinear optimization ( Wang & Liu , 2019a ) , a wealth of kernels ( Liu & Wang , 2016 ; 2018 ; Gorham & Mackey , 2017 ) , matrix-valued kernels ( Wang et al. , 2019a ) supporting higherorder optimization , an ( experimental ) update based on Stein point MCMC ( Chen et al. , 2019a ) , and factorization based on conditional independence between elements in the model ( graphical kernels ) ( Wang et al. , 2018b ) . • A series of examples that demonstrate EinSteinVI and the synergy between different Stein VI techniques . The examples include a novel Stein-mixture version of the deep Markov model ( SM-DMM ) , Bayesian neural networks for regression . An examples that explore kernels and higher-order optimization is available in the appendix . The paper proceeds as follows . We first present the background of SVGD in the context of our integrated implementation in Section 2 . In Section 3 we introduce Stein mixtures and our algorithm ELBO-within-Stein . We discuss the general details of the implementation of EinSteinVI in Section 4 . Next , we discuss related work in Section 5 . In Section 6 we present various examples using EinSteinVI , and finally , we summarize our results and discuss future work in Section 7 . 2 STEIN VARIATIONAL GRADIENT DESCENT . The core idea of SVGD is to perform inference by approximating the target posterior distribution p ( z|x ) by an empirical distribution qZ ( z ) = N−1 ∑ i δzi ( z ) based on a set of particles Z = { zi } Ni=1 . Here , δx ( y ) represents the Dirac delta measure , which is equal to 1 if x = y and 0 otherwise . One could thus see the approximating distribution qZ ( z ) as a mixture of point estimates , each represented by a particle zi ∈ Z . The idea is to minimize the Kullback-Leibler divergence DKL ( qZ ( z ) ‖ p ( z|x ) ) between the approximation and the true posterior by iteratively updating the particles using the Stein forces : zi ← zi + SZ ( zi ) where is the learning rate and SZ denotes the Stein forces . The Two Forces of SVGD Stein VI consists of two forces which work additively under the form SZ = S + Z + S − Z , where the attractive force is given by S+Z ( zi ) = Ezj∼qZ ( z ) [ k ( zi , zj ) ∇zj log p ( zj |x ) ] and the repulsive force by S−Z ( zi ) = Ezj∼qZ ( z ) [ ∇zjk ( zi , zj ) ] . Here k : Rd × Rd → R is a kernel . The attractive force can be seen as pushing the particles towards the modes of the true posterior distribution , smoothed by some kernel . For an example of a kernel , consider the radial basis function ( RBF ) kernel k ( zi , zj ) = exp ( − 1h ‖ zi − zj ‖ 2 2 ) with bandwidth parameter h , chosen as 1lognmed ( z ) . The repulsive force moves particles away from each other , ensuring that they do not collapse to the same mode . For example , with the RBF kernel , the repulsive force becomes Ezj∼qZ ( z ) [ − exp ( − 1h ‖ zi − zj ‖ 2 2 ) 2 h ∑ ` ( zi ` − zj ` ) ] , which has high kernel values for particles that are close , causing them to repel . SVGD works with unnormalized distributions p as the normalization constant becomes additive in the log-posterior log p ( zi|x ) = − logZ + log p ( x|z ) + log p ( z ) and is thus not required for the calculation of the gradient . This property is desirable as normalizing p is often computationally expensive . Non-linear Stein In non-linear Stein ( Wang & Liu , 2019a ) , the repulsive force can be scaled by a factor λ , resulting in SZ = S+Z + λS − Z . This approach is useful when dealing with multimodal distributions . It is also useful in cases where the repulsive force vanishes compared to the likelihood , which happens for large datasets ( X ) . Scaling the repulsive force by a constant λ = c ( |X | ) proportional ( e.g . c = 0.1 or c = 0.01 ) to the size of the dataset |X | addresses this issue and can be chosen by cross-validation on a subset of the data . Matrix-valued kernels The choice of kernels can be extended to matrix-valued ones ( Wang et al. , 2019a ) , K : Rd × Rd → Rd×d , in which case the Stein forces become S+Z ( zi ) = Ezj∼qZ ( z ) [ K ( zi , zj ) ∇zj log p ( zj |x ) ] and S−Z ( zi ) = Ezj∼qZ ( z ) [ K ( zi , zj ) ∇zj ] where the standalone del ∇zj in the repulsive force represents the vector ( ∂ ∂zj,1 , . . . , ∂∂zj , d ) . This results in ( K ( zi , zj ) ∇zj ) ` = ∑ k ∇kK ` , k ( zi , zj ) . The advantage of matrix-valued kernels is that they allow preconditioning2 using the Hessian or Fisher Information matrix , which can capture local curvature and thus achieve better optima and convergence rate than standard SVGD . Furthermore , it is easy to represent graphical kernels ( Wang et al. , 2018a ) using matrix kernels , e.g . K = diag ( { K ( ` ) } ` ) where the set of variables are partitioned with each their own local kernel K ( ` ) . | This paper proposed a new probabilistic programming framework for stein variational gradient descent and its variants. The framework put its basis on Numpyro. Experimental results show that this framework shows faster computation for inference in wall clock time. Moreover, using this framework, the authors developed a new Stein mixture algorithm for deep Markov models, which shows better performance than existing methods. | SP:3694901f3283a2b65d0d60e1460b61de038bf958 |
EinSteinVI: General and Integrated Stein Variational Inference | 1 INTRODUCTION . Interest in Bayesian deep learning has surged due to the need for quantifying the uncertainty of predictions obtained from machine learning algorithms ( Wilson & Izmailov , 2020 ; Wilson , 2020 ) . The idea behind Bayesian inference is to describe observed data x using a model with latent variables z . The goal is to infer a posterior distribution p ( z|x ) over the latent variables given a model describing the joint distribution p ( z , x ) = p ( x|z ) p ( z ) . We obtain the posterior by following the rules of Bayesian inference : p ( z|x ) = Z−1p ( x|z ) p ( z ) where Z = ∫ z p ( x|z ) p ( z ) dz is the normalization constant . For most practical models , the normalization constant lacks an analytic solution or requires an infeasible number of computations , complicating the Bayesian inference problem . Variational Inference ( VI ) techniques ( Blei et al. , 2017 ; Hoffman et al. , 2013 ; Ranganath et al. , 2014 ) aim to approximate the posterior distribution . VI poses a family of distributions over the latent variables q ( z ) ∈ Q and finds arg min q∈Q D ( q ( z ) |p ( z|x ) ) , where D is a divergence1 between the variational distribution q , also called the guide , and the true posterior distribution p ( z|x ) . The Kullback-Leibler divergence is a typical choice . VI often provides good approximations that capture uncertainty and scales to millions of data points by a suitable choice of Q and inference method . Stein VI is a family of VI techniques for approximate Bayesian inference based on Stein ’ s method ( see Anastasiou et al . ( 2021 ) for an overview ) that is gaining popularity since it combines the scalability of traditional VI with the flexibility of non-parametric particle-based methods . Stein variational gradient descent ( SVGD ) ( Liu & Wang , 2016 ) is a recent Stein VI technique which uses a set of particles { zi } Ni=1 as the approximating distribution q ( z ) . As a particle-based method , SVGD is well suited for capturing correlations between latent variables . The technique preserves the scalability of traditional 1An asymmetric distance that might satisfy the triangle inequality . VI approaches while offering the flexibility and modeling scope of techniques such as Markov chain Monte Carlo ( MCMC ) . SVGD is good at capturing multi-modality ( Liu & Wang , 2016 ; Wang & Liu , 2019a ) , and has useful theoretical interpretations such as a set of particles following a gradient flow ( Liu , 2017 ) or in terms of the properties of kernels ( Liu & Wang , 2018 ) . Many advanced inference methods based on SVGD have been recently developed ; these include nonlinear Stein ( Wang & Liu , 2019a ) , factorized graphical models ( Zhuo et al. , 2018 ; Wang et al. , 2018a ) , matrix-valued kernels ( Wang et al. , 2019a ) and support for higher-order gradient-based optimization ( Detommaso et al. , 2018 ) . These techniques have extended the scope of SVGD , allowing more flexible and accurate approximations of the posterior distribution . While algorithmic power is growing , a distinct lack of integration with a general probabilistic programming language ( PPL ) framework remains . Such integration would solve one of the most prominent limitations of PPLs with traditional VI : their lack of flexibility in capturing rich correlations in the approximated posterior . The main problem with SVGD is that it suffers from the curse of dimensionality : the number of particles required to adequately represent a posterior distribution is exponential in its dimensionality . Nalisnick & Smyth ( 2017 ) suggest resolving this by using Stein mixtures and propose an inference algorithm that uses differentiable non-centered parameterization ( DNCP ) ( Kingma & Welling , 2014 ) and importance weighted Monte Carlo gradients ( Burda et al. , 2015 ) . In this article we propose a novel algorithm for inference of Stein mixtures called ELBO-within-Stein . Unlike prior work on Stein mixtures ( Nalisnick & Smyth , 2017 ) , ELBO-within-Stein i ) is simple to implement , ii ) only has the learning rate as a tuneable hyper-parameters , iii ) requires only one gradient evaluation of the ELBO for each particle ( 10 is typical for Stein mixtures ) and iv ) supports the use of a tailored guide . We validate our algorithm experimentally , showing significant improvements in accuracy . ELBO-within-Stein is the core algorithm of our Stein VI library called EinSteinVI library . Our library further includes SVGD as a special case of ELBO-within-Stein and all the advanced methods mentioned above . The only other PPL with Stein VI methods is PyMC3 ( Salvatier et al. , 2016 ) . However , PyMC3 does not include any of the advanced Stein VI methods mentioned above or Stein mixture methods . The EinSteinVI library extends the NumPyro PPL ( Bingham et al. , 2019 ; Phan et al. , 2019 ) . NumPyro is a universal probabilistic programming language ( van de Meent et al. , 2018 ) for Python , which allows arbitrary code to be executed in both its model and guide . The computational backend of NumPyro is Jax ( Frostig et al. , 2018 ) , which gives access to the powerful program optimization and parallelizability provided by the Jax compiler . As EinSteinVI works with arbitrary guides , NumPyro is a well suited language for embedding EinSteinVI . This is because NumPyro i ) is embedded in Python , the de facto programming language for data science , ii ) includes the necessary data-structures for tracking random variables in both model and guide , iii ) features SVI with an API that is highly suitable for EinSteinVI , and iv ) benefits computationally from Jax . Our extensions include SVGD , Stein-mixtures formulated as ELBO-within-Stein , and the advanced methods mentioned above . Concretely , our contributions are : • ELBO-within-Stein ( EinSteinVI ) . A novel algorithm for Stein mixtures that only requires a single gradient evaluation of the ELBO per particle . • A general library extension to NumPyro , called EinSteinVI . EinSteinVI allows SVGD to work with custom guide programs based on ELBO-within-Stein optimization . The library is compositional with NumPyro features , including support for deep learning , loss functions ( ELBO , Rényi ELBO ( Li & Turner , 2016 ) , custom losses ) , and optimization methods , thus making it possible for EinSteinVI to grow organically with NumPyro development . • Integration of recent developments in Stein variational inference which includes : nonlinear optimization ( Wang & Liu , 2019a ) , a wealth of kernels ( Liu & Wang , 2016 ; 2018 ; Gorham & Mackey , 2017 ) , matrix-valued kernels ( Wang et al. , 2019a ) supporting higherorder optimization , an ( experimental ) update based on Stein point MCMC ( Chen et al. , 2019a ) , and factorization based on conditional independence between elements in the model ( graphical kernels ) ( Wang et al. , 2018b ) . • A series of examples that demonstrate EinSteinVI and the synergy between different Stein VI techniques . The examples include a novel Stein-mixture version of the deep Markov model ( SM-DMM ) , Bayesian neural networks for regression . An examples that explore kernels and higher-order optimization is available in the appendix . The paper proceeds as follows . We first present the background of SVGD in the context of our integrated implementation in Section 2 . In Section 3 we introduce Stein mixtures and our algorithm ELBO-within-Stein . We discuss the general details of the implementation of EinSteinVI in Section 4 . Next , we discuss related work in Section 5 . In Section 6 we present various examples using EinSteinVI , and finally , we summarize our results and discuss future work in Section 7 . 2 STEIN VARIATIONAL GRADIENT DESCENT . The core idea of SVGD is to perform inference by approximating the target posterior distribution p ( z|x ) by an empirical distribution qZ ( z ) = N−1 ∑ i δzi ( z ) based on a set of particles Z = { zi } Ni=1 . Here , δx ( y ) represents the Dirac delta measure , which is equal to 1 if x = y and 0 otherwise . One could thus see the approximating distribution qZ ( z ) as a mixture of point estimates , each represented by a particle zi ∈ Z . The idea is to minimize the Kullback-Leibler divergence DKL ( qZ ( z ) ‖ p ( z|x ) ) between the approximation and the true posterior by iteratively updating the particles using the Stein forces : zi ← zi + SZ ( zi ) where is the learning rate and SZ denotes the Stein forces . The Two Forces of SVGD Stein VI consists of two forces which work additively under the form SZ = S + Z + S − Z , where the attractive force is given by S+Z ( zi ) = Ezj∼qZ ( z ) [ k ( zi , zj ) ∇zj log p ( zj |x ) ] and the repulsive force by S−Z ( zi ) = Ezj∼qZ ( z ) [ ∇zjk ( zi , zj ) ] . Here k : Rd × Rd → R is a kernel . The attractive force can be seen as pushing the particles towards the modes of the true posterior distribution , smoothed by some kernel . For an example of a kernel , consider the radial basis function ( RBF ) kernel k ( zi , zj ) = exp ( − 1h ‖ zi − zj ‖ 2 2 ) with bandwidth parameter h , chosen as 1lognmed ( z ) . The repulsive force moves particles away from each other , ensuring that they do not collapse to the same mode . For example , with the RBF kernel , the repulsive force becomes Ezj∼qZ ( z ) [ − exp ( − 1h ‖ zi − zj ‖ 2 2 ) 2 h ∑ ` ( zi ` − zj ` ) ] , which has high kernel values for particles that are close , causing them to repel . SVGD works with unnormalized distributions p as the normalization constant becomes additive in the log-posterior log p ( zi|x ) = − logZ + log p ( x|z ) + log p ( z ) and is thus not required for the calculation of the gradient . This property is desirable as normalizing p is often computationally expensive . Non-linear Stein In non-linear Stein ( Wang & Liu , 2019a ) , the repulsive force can be scaled by a factor λ , resulting in SZ = S+Z + λS − Z . This approach is useful when dealing with multimodal distributions . It is also useful in cases where the repulsive force vanishes compared to the likelihood , which happens for large datasets ( X ) . Scaling the repulsive force by a constant λ = c ( |X | ) proportional ( e.g . c = 0.1 or c = 0.01 ) to the size of the dataset |X | addresses this issue and can be chosen by cross-validation on a subset of the data . Matrix-valued kernels The choice of kernels can be extended to matrix-valued ones ( Wang et al. , 2019a ) , K : Rd × Rd → Rd×d , in which case the Stein forces become S+Z ( zi ) = Ezj∼qZ ( z ) [ K ( zi , zj ) ∇zj log p ( zj |x ) ] and S−Z ( zi ) = Ezj∼qZ ( z ) [ K ( zi , zj ) ∇zj ] where the standalone del ∇zj in the repulsive force represents the vector ( ∂ ∂zj,1 , . . . , ∂∂zj , d ) . This results in ( K ( zi , zj ) ∇zj ) ` = ∑ k ∇kK ` , k ( zi , zj ) . The advantage of matrix-valued kernels is that they allow preconditioning2 using the Hessian or Fisher Information matrix , which can capture local curvature and thus achieve better optima and convergence rate than standard SVGD . Furthermore , it is easy to represent graphical kernels ( Wang et al. , 2018a ) using matrix kernels , e.g . K = diag ( { K ( ` ) } ` ) where the set of variables are partitioned with each their own local kernel K ( ` ) . | This paper describes an implementation of EinsteinVI, an improvement over Stein VI, a method that can be used to apply VI in prob. models assuming a flexible distribution represented in terms of particles. The paper describes how this method has been implemented in NumPyro, a software for prob. programming. The method is evaluated and compare to other alternative prob. languages such as PyMC3 that uses also methods based on Stein VI. | SP:3694901f3283a2b65d0d60e1460b61de038bf958 |
Axiomatic Explanations for Visual Search, Retrieval, and Similarity Learning | 1 INTRODUCTION . Search , recommendation , retrieval , and contrastive similarity learning powers many of today ’ s machine learning systems . These systems help us organize information at scales that no human could match . The recent surge in million and billion parameter contrastive learning architectures for vision and language underscore the growing need to understand these classes of systems ( Nayak , 2019 ; Chen et al. , 2020b ; a ; Radford et al. , 2021 ; Caron et al. , 2020 ) . At its core , these systems face the same challenges that classifiers and regressors face : richer models can often improve performance but hinder interpretability . For high-risk domains like medicine , incorrect search results can have serious consequences . In other domains , search engine bias can disproportionately hide certain voices and have systemic impact ( Mowshowitz & Kawaguchi , 2002 ; Diaz , 2008 ; Goldman , 2005 ) . Currently , there are several competing techniques practitioners can use to understand similarity model predictions ( Zhu et al. , 2019 ; Zheng et al. , 2020 ; Dong et al . ; Selvaraju et al. , 2017 ; Vaswani et al. , 2017 ) . However , it is often unclear when one approach should be chosen over another and there is not a formal theory describing an optimal search explanation method . To help solve this challenge we show that the theory of fair credit assignment provides a uniquely determined and axiomatic approach for “ explaining ” why a trained model judges two objects as similar . In many cases , existing approaches are special cases of this formalism . This allows us to design variants of these methods that better satisfy the axioms of fair credit assignment and can handle counterfactual or relative explanations . Though we explore this topic through the lens of visual search , we note that these techniques could also apply to text , tabular , or audio search systems . This work identifies two distinct classes of search engine explainability methods . “ First order ” approaches highlight the most important pixels that contribute to the similarity of objects and “ Second order ” explanations provide a full correspondence between the parts of query and retrieved image . We relate first order interpretations to existing theory on classifier explainability through a generic function transformation , as shown in the third column of Figure 1 . We find that second order explanations correspond to a uniquely specified generalization of the Shapley values ( Sundararajan et al. , 2020 ) and is equivalent to projecting Harsanyi Dividends onto low-order subsets ( Harsanyi , 1963 ) . Using this formalism , we present new second-order generalizations of Class Activation Maps ( Zhou et al. , 2016 ) , GradCAM ( Selvaraju et al. , 2017 ) , LIME ( Ribeiro et al. , 2016 ) , and SHAP ( Lundberg & Lee , 2017 ) . These contributions generalize several existing methods , illustrate a rich mathematical structure connecting model explainability and cooperative game theory , and allow practitioners to understand search engines with greater nuance and detail . We include a short video detailing the work at https : //tinyurl.com/2j3y2ffn . In summary we : • Present the first uniquely specified axiomatic framework for model-agnostic search , retrieval , and metric learning interpretability using the theory of Harsanyi dividends . • Show that our framework generalizes several existing model explanation methods ( Zhou et al. , 2016 ; Selvaraju et al. , 2017 ; Zhu et al. , 2019 ; Ribeiro et al. , 2016 ) and allows us to extend these methods to handle counterfactual explanations and extract dense pairwise correspondences between query and retrieved images . • Introduce a new kernel-based approximator for Shapley-Taylor indices that requires about 10× fewer function evaluations . • Show that our axiomatic approaches provide more faithful explanations of image similarity on the PascalVOC and MSCoCo datasets . 2 BACKGROUND . This work focuses on search , retrieval , metric learning , and recommendation architectures . Often , these systems use similarity between objects or learned features ( Bengio et al. , 2013 ) to rank , retrieve , or suggest content ( Bing , 2017 ; Su & Khoshgoftaar , 2009 ; Chopra et al. , 2005 ; Radford et al. , 2021 ) . More formally , we refer to systems that use a distance , relevance , or similarity function of the form : d : X × Y → R to quantify the relationship between items from sets X and Y . In search and retrieval , X represents the space of search queries and Y represents the space of results , the function d assigns a relevance to each query result pair . Without loss of generality , we consider d as a “ distance-like ” function where smaller values indicate more relevance . The expression arg miny∈Y d ( x , y ) yields the most relevant result for a query x ∈ X . Specializing this notion yields a variety of different kinds of ML systems . IfX = Y = Range ( N ( · ) ) whereN is an image featurization network such as ResNet50 ( He et al. , 2016 ) , the formalism yields a visual search engine or “ reverse image search ” . Though this work focuses on visual search , we note that ifX is the space of character sequences and Y is the space of webpages , this represents web search . If X are users and Y are the space of items , such as songs or news articles , the formalism represents a recommendation problem . In this work we aim to extract meaningful “ interpretations ” or “ explanations ” of the function d . 2.1 MODEL INTERPRETABILITY . The Bias-Variance trade-off ( Kohavi et al. , 1996 ) affects all machine learning systems and governs the relationship between a model ’ s expressiveness and generalization ability . In data-rich scenarios , a model ’ s bias dominates generalization error and increasing the size of the model class can improve performance . However , increasing model complexity can severely degrade its interpretability because added parameters can lose their connection to physically meaningful quantities . This is a challenge not just for classification and regression systems , but for search and recommendation architectures as well . For example , the best performing competitors on the Netflix prize dataset ( Bennett et al. , 2007 ) involve significantly more complex models than earlier baselines ( Rendle et al. , 2019 ) . Famously , the Netflix grand prize winner , the “ BellKor ” algorithm ( Koren , 2009 ) , boosts and ensembles several different underling methods making it difficult to interpret the model by inspecting its parameters . To tackle these challenges , some works introduce model classes that are naturally interpretable ( Nori et al. , 2019 ; Hastie & Tibshirani , 1990 ) . Alternatively , other works propose model-agnostic methods to explain the predictions of classifiers and regressors . Many of these approaches explain the local structure around a specific prediction . Lundberg & Lee ( 2017 ) show that the Shapley value ( Shapley , 1951 ) , a measure of fair credit assignment , provides a unique and axiomatically characterized solution to classifier interpretability ( SHAP ) . Furthermore , the authors show that Shapley values generalize LIME , DeepLIFT ( Shrikumar et al. , 2017 ) , Layer-Wise Relevance Propagation ( Bach et al. , 2015 ) , and several other methods ( Štrumbelj & Kononenko , 2014 ; Datta et al. , 2016 ; Lipovetsky & Conklin , 2001 ; Saabas , 2014 ) . Many works in computer vision use an alternative approach called Class Activation Maps ( CAMs ) . CAM projects the predicted class of a deep global average pooled ( GAP ) convolutional network onto the feature space to create a low resolution heatmap of class-specific network attention . GradCAM ( Selvaraju et al. , 2017 ) generalizes CAM to architectures other than GAP and yields robust interpretations with only a single network evaluation . In Section 4 we show that CAM , GradCAM , and their analogue for search engine interpretability , Zhu et al . ( 2019 ) , are also unified by the Shapley value and its second order generalization , the ShapleyTaylor index . 2.2 FAIR CREDIT ASSIGNMENT AND THE SHAPLEY VALUE . Shapley values provide a principled and axiomatic framework for classifier interpretation . We provide a brief overview of Shapley values but point readers to Molnar ( 2020 ) for more details . Shapley values originally arose in cooperative game theory as the only fair way to allocate the profit of a company to its employees based on their contributions . They have since become a standard method for explaining predictions of machine learning models . In particular , Shapley values measure of how much “ credit ” a model ’ s features receive for the prediction under a fair credit assignment . More formally , a “ coalition game ” is a set N of |N | players and a “ value ” function v : 2N → R. In cooperative game theory , this function v represents the expected payoff for a given cooperating coalition of players . Shapley ( 1951 ) show that the unique , fair credit assignment to each player , φv ( i ∈ N ) , can be calculated as : φv ( i ) : = ∑ S⊆N\ { i } |S| ! ( |N | − |S| − 1 ) ! |N | ! ( v ( S ∪ { i } ) − v ( S ) ) ( 1 ) Informally , this equation measures the average increase in value that a player i brings to a coalition S by weighting each increase , v ( S ∪ { i } ) − v ( S ) , by the number of ways this event could have happened during the formation of the “ grand coalition ” N . We note that this assignment , φv , is the unique assignment that satisfies four reasonable properties : symmetry under player re-labeling , no credit assignment to dummy players , linearity ( or it ’ s alternative monotonicity ) , and efficiency which states that Shapley values should sum to v ( N ) − v ( ∅ ) ( Young , 1985 ) . Intuitively , these axioms require that a fair explanation should treat every feature equally ( Symmetry ) , should not assign importance to features that are not used ( Dummy ) , should behave linearly when the value function is transformed ( Linear ) , and should sum to the function ’ s value ( Efficiency ) . To connect this work to model interpretability , we can identify the “ features ” used in a model as the “ players ” and interpret the value function , v ( S ) , as the expected prediction of the model when featuresN \S are replaced by values from a “ background ” distribution . This background distribution allows for “ counterfactual ” or relative explanations ( Goyal et al. , 2019 ) . 3 RELATED WORK . The field of model interpretability has a considerable body of literature , and we mention just a handful of the works that are particularly related . One of our baseline methods , Dong et al. , was one of the first to present a generic visual search engine explanation reminiscent of a Parzen-Window based estimator . Fong & Vedaldi ( 2017 ) introduce a method for explaining classifiers based on meaningful pertubation and Chefer et al . ( 2021 ) introduce a method for improving interpretation for transformer-based classifiers . Zhu et al . ( 2019 ) lifted CAM to search engines and we find that our Shapley-Taylor based method aligns with their approach for GAP architectures . Singh & Anand ( 2019 ) and Fernando et al . ( 2019 ) use LIME and DeepSHAP to provide first-order interpretations of text but do not apply their methods to images . Ancona et al . ( 2019 ) introduce a distribution propagation approach for improving the estimation of Shapley Values for deep models and can be combined with our approach . Many works implicitly use components that align with ShapleyTaylor indices for particular functions . Works such as Fischer et al . ( 2015a ) ; Sun et al . ( 2020 ) ; Wang et al . ( 2020a ) ; Chen et al . ( 2020c ) ; Hou et al . ( 2019 ) use feature correlation layers to estimate and utilize correspondences between images . We show these layers are equivalent to Shapley-Taylor indices on the GAP architecture , and this allows create a correlation layer that handles counterfactual backgrounds . Other recent works have used learned co-attention within transformer architectures to help pool and share information across multiple domain types ( Wei et al. , 2020 ) . Fu et al . ( 2020 ) attempt to learn a variant of GradCAM that better aligns with axioms similar to Shapley Values by adding efficiency regularizers . The method is not guaranteed to satisfy the axioms but is more “ efficient ” . We rely on several works to extend Shapley values to more complex interactions . Harsanyi ( 1963 ) generalized the Shapely value by introducing a “ dividend ” that , when split and distributed among players , yields the Shapley values . Owen ( 1972 ) introduces an equivalent way to extend Shapley values using a multi-linear extension of the game ’ s characteristic function . Sundararajan et al . ( 2020 ) introduce the Shapley-Taylor index and show is equivalent to the Lagrangian remainder of Owen ’ s multi-linear extension . Integrated Hessians ( Janizek et al. , 2020 ) enable estimation of a secondorder variant of the Aumann-Shapley values and we use this approach to create a more principled second-order interpretation method for differentiable search engines . | This paper proposes an approach for explaining visual similarity models. They provide a general framework that enables them to adapt existing explanation methods to the similarity learning task, and then discuss how they apply their framework to generalize multiple methods. The authors evaluate their work on PASVAL VOC and COCO, where they use automatic metrics to argue that their approach accurately captures model performance. | SP:fcd3d81a3040deaee7abce5e9e4d0abeb380ac54 |
Axiomatic Explanations for Visual Search, Retrieval, and Similarity Learning | 1 INTRODUCTION . Search , recommendation , retrieval , and contrastive similarity learning powers many of today ’ s machine learning systems . These systems help us organize information at scales that no human could match . The recent surge in million and billion parameter contrastive learning architectures for vision and language underscore the growing need to understand these classes of systems ( Nayak , 2019 ; Chen et al. , 2020b ; a ; Radford et al. , 2021 ; Caron et al. , 2020 ) . At its core , these systems face the same challenges that classifiers and regressors face : richer models can often improve performance but hinder interpretability . For high-risk domains like medicine , incorrect search results can have serious consequences . In other domains , search engine bias can disproportionately hide certain voices and have systemic impact ( Mowshowitz & Kawaguchi , 2002 ; Diaz , 2008 ; Goldman , 2005 ) . Currently , there are several competing techniques practitioners can use to understand similarity model predictions ( Zhu et al. , 2019 ; Zheng et al. , 2020 ; Dong et al . ; Selvaraju et al. , 2017 ; Vaswani et al. , 2017 ) . However , it is often unclear when one approach should be chosen over another and there is not a formal theory describing an optimal search explanation method . To help solve this challenge we show that the theory of fair credit assignment provides a uniquely determined and axiomatic approach for “ explaining ” why a trained model judges two objects as similar . In many cases , existing approaches are special cases of this formalism . This allows us to design variants of these methods that better satisfy the axioms of fair credit assignment and can handle counterfactual or relative explanations . Though we explore this topic through the lens of visual search , we note that these techniques could also apply to text , tabular , or audio search systems . This work identifies two distinct classes of search engine explainability methods . “ First order ” approaches highlight the most important pixels that contribute to the similarity of objects and “ Second order ” explanations provide a full correspondence between the parts of query and retrieved image . We relate first order interpretations to existing theory on classifier explainability through a generic function transformation , as shown in the third column of Figure 1 . We find that second order explanations correspond to a uniquely specified generalization of the Shapley values ( Sundararajan et al. , 2020 ) and is equivalent to projecting Harsanyi Dividends onto low-order subsets ( Harsanyi , 1963 ) . Using this formalism , we present new second-order generalizations of Class Activation Maps ( Zhou et al. , 2016 ) , GradCAM ( Selvaraju et al. , 2017 ) , LIME ( Ribeiro et al. , 2016 ) , and SHAP ( Lundberg & Lee , 2017 ) . These contributions generalize several existing methods , illustrate a rich mathematical structure connecting model explainability and cooperative game theory , and allow practitioners to understand search engines with greater nuance and detail . We include a short video detailing the work at https : //tinyurl.com/2j3y2ffn . In summary we : • Present the first uniquely specified axiomatic framework for model-agnostic search , retrieval , and metric learning interpretability using the theory of Harsanyi dividends . • Show that our framework generalizes several existing model explanation methods ( Zhou et al. , 2016 ; Selvaraju et al. , 2017 ; Zhu et al. , 2019 ; Ribeiro et al. , 2016 ) and allows us to extend these methods to handle counterfactual explanations and extract dense pairwise correspondences between query and retrieved images . • Introduce a new kernel-based approximator for Shapley-Taylor indices that requires about 10× fewer function evaluations . • Show that our axiomatic approaches provide more faithful explanations of image similarity on the PascalVOC and MSCoCo datasets . 2 BACKGROUND . This work focuses on search , retrieval , metric learning , and recommendation architectures . Often , these systems use similarity between objects or learned features ( Bengio et al. , 2013 ) to rank , retrieve , or suggest content ( Bing , 2017 ; Su & Khoshgoftaar , 2009 ; Chopra et al. , 2005 ; Radford et al. , 2021 ) . More formally , we refer to systems that use a distance , relevance , or similarity function of the form : d : X × Y → R to quantify the relationship between items from sets X and Y . In search and retrieval , X represents the space of search queries and Y represents the space of results , the function d assigns a relevance to each query result pair . Without loss of generality , we consider d as a “ distance-like ” function where smaller values indicate more relevance . The expression arg miny∈Y d ( x , y ) yields the most relevant result for a query x ∈ X . Specializing this notion yields a variety of different kinds of ML systems . IfX = Y = Range ( N ( · ) ) whereN is an image featurization network such as ResNet50 ( He et al. , 2016 ) , the formalism yields a visual search engine or “ reverse image search ” . Though this work focuses on visual search , we note that ifX is the space of character sequences and Y is the space of webpages , this represents web search . If X are users and Y are the space of items , such as songs or news articles , the formalism represents a recommendation problem . In this work we aim to extract meaningful “ interpretations ” or “ explanations ” of the function d . 2.1 MODEL INTERPRETABILITY . The Bias-Variance trade-off ( Kohavi et al. , 1996 ) affects all machine learning systems and governs the relationship between a model ’ s expressiveness and generalization ability . In data-rich scenarios , a model ’ s bias dominates generalization error and increasing the size of the model class can improve performance . However , increasing model complexity can severely degrade its interpretability because added parameters can lose their connection to physically meaningful quantities . This is a challenge not just for classification and regression systems , but for search and recommendation architectures as well . For example , the best performing competitors on the Netflix prize dataset ( Bennett et al. , 2007 ) involve significantly more complex models than earlier baselines ( Rendle et al. , 2019 ) . Famously , the Netflix grand prize winner , the “ BellKor ” algorithm ( Koren , 2009 ) , boosts and ensembles several different underling methods making it difficult to interpret the model by inspecting its parameters . To tackle these challenges , some works introduce model classes that are naturally interpretable ( Nori et al. , 2019 ; Hastie & Tibshirani , 1990 ) . Alternatively , other works propose model-agnostic methods to explain the predictions of classifiers and regressors . Many of these approaches explain the local structure around a specific prediction . Lundberg & Lee ( 2017 ) show that the Shapley value ( Shapley , 1951 ) , a measure of fair credit assignment , provides a unique and axiomatically characterized solution to classifier interpretability ( SHAP ) . Furthermore , the authors show that Shapley values generalize LIME , DeepLIFT ( Shrikumar et al. , 2017 ) , Layer-Wise Relevance Propagation ( Bach et al. , 2015 ) , and several other methods ( Štrumbelj & Kononenko , 2014 ; Datta et al. , 2016 ; Lipovetsky & Conklin , 2001 ; Saabas , 2014 ) . Many works in computer vision use an alternative approach called Class Activation Maps ( CAMs ) . CAM projects the predicted class of a deep global average pooled ( GAP ) convolutional network onto the feature space to create a low resolution heatmap of class-specific network attention . GradCAM ( Selvaraju et al. , 2017 ) generalizes CAM to architectures other than GAP and yields robust interpretations with only a single network evaluation . In Section 4 we show that CAM , GradCAM , and their analogue for search engine interpretability , Zhu et al . ( 2019 ) , are also unified by the Shapley value and its second order generalization , the ShapleyTaylor index . 2.2 FAIR CREDIT ASSIGNMENT AND THE SHAPLEY VALUE . Shapley values provide a principled and axiomatic framework for classifier interpretation . We provide a brief overview of Shapley values but point readers to Molnar ( 2020 ) for more details . Shapley values originally arose in cooperative game theory as the only fair way to allocate the profit of a company to its employees based on their contributions . They have since become a standard method for explaining predictions of machine learning models . In particular , Shapley values measure of how much “ credit ” a model ’ s features receive for the prediction under a fair credit assignment . More formally , a “ coalition game ” is a set N of |N | players and a “ value ” function v : 2N → R. In cooperative game theory , this function v represents the expected payoff for a given cooperating coalition of players . Shapley ( 1951 ) show that the unique , fair credit assignment to each player , φv ( i ∈ N ) , can be calculated as : φv ( i ) : = ∑ S⊆N\ { i } |S| ! ( |N | − |S| − 1 ) ! |N | ! ( v ( S ∪ { i } ) − v ( S ) ) ( 1 ) Informally , this equation measures the average increase in value that a player i brings to a coalition S by weighting each increase , v ( S ∪ { i } ) − v ( S ) , by the number of ways this event could have happened during the formation of the “ grand coalition ” N . We note that this assignment , φv , is the unique assignment that satisfies four reasonable properties : symmetry under player re-labeling , no credit assignment to dummy players , linearity ( or it ’ s alternative monotonicity ) , and efficiency which states that Shapley values should sum to v ( N ) − v ( ∅ ) ( Young , 1985 ) . Intuitively , these axioms require that a fair explanation should treat every feature equally ( Symmetry ) , should not assign importance to features that are not used ( Dummy ) , should behave linearly when the value function is transformed ( Linear ) , and should sum to the function ’ s value ( Efficiency ) . To connect this work to model interpretability , we can identify the “ features ” used in a model as the “ players ” and interpret the value function , v ( S ) , as the expected prediction of the model when featuresN \S are replaced by values from a “ background ” distribution . This background distribution allows for “ counterfactual ” or relative explanations ( Goyal et al. , 2019 ) . 3 RELATED WORK . The field of model interpretability has a considerable body of literature , and we mention just a handful of the works that are particularly related . One of our baseline methods , Dong et al. , was one of the first to present a generic visual search engine explanation reminiscent of a Parzen-Window based estimator . Fong & Vedaldi ( 2017 ) introduce a method for explaining classifiers based on meaningful pertubation and Chefer et al . ( 2021 ) introduce a method for improving interpretation for transformer-based classifiers . Zhu et al . ( 2019 ) lifted CAM to search engines and we find that our Shapley-Taylor based method aligns with their approach for GAP architectures . Singh & Anand ( 2019 ) and Fernando et al . ( 2019 ) use LIME and DeepSHAP to provide first-order interpretations of text but do not apply their methods to images . Ancona et al . ( 2019 ) introduce a distribution propagation approach for improving the estimation of Shapley Values for deep models and can be combined with our approach . Many works implicitly use components that align with ShapleyTaylor indices for particular functions . Works such as Fischer et al . ( 2015a ) ; Sun et al . ( 2020 ) ; Wang et al . ( 2020a ) ; Chen et al . ( 2020c ) ; Hou et al . ( 2019 ) use feature correlation layers to estimate and utilize correspondences between images . We show these layers are equivalent to Shapley-Taylor indices on the GAP architecture , and this allows create a correlation layer that handles counterfactual backgrounds . Other recent works have used learned co-attention within transformer architectures to help pool and share information across multiple domain types ( Wei et al. , 2020 ) . Fu et al . ( 2020 ) attempt to learn a variant of GradCAM that better aligns with axioms similar to Shapley Values by adding efficiency regularizers . The method is not guaranteed to satisfy the axioms but is more “ efficient ” . We rely on several works to extend Shapley values to more complex interactions . Harsanyi ( 1963 ) generalized the Shapely value by introducing a “ dividend ” that , when split and distributed among players , yields the Shapley values . Owen ( 1972 ) introduces an equivalent way to extend Shapley values using a multi-linear extension of the game ’ s characteristic function . Sundararajan et al . ( 2020 ) introduce the Shapley-Taylor index and show is equivalent to the Lagrangian remainder of Owen ’ s multi-linear extension . Integrated Hessians ( Janizek et al. , 2020 ) enable estimation of a secondorder variant of the Aumann-Shapley values and we use this approach to create a more principled second-order interpretation method for differentiable search engines . | This paper proposes a unified framework to explain the current model explaining algorithms. Under this framework, the authors discovered the current algorithms are approximating second-order Shapley-Taylor indices, where they also proposed a fast-kernel-based estimation method. Empirically, the authors benchmarked different algorithms in two large segmentation datasets. They showed the proposed algorithms achieved better faithfulness and inefficiency. | SP:fcd3d81a3040deaee7abce5e9e4d0abeb380ac54 |
Axiomatic Explanations for Visual Search, Retrieval, and Similarity Learning | 1 INTRODUCTION . Search , recommendation , retrieval , and contrastive similarity learning powers many of today ’ s machine learning systems . These systems help us organize information at scales that no human could match . The recent surge in million and billion parameter contrastive learning architectures for vision and language underscore the growing need to understand these classes of systems ( Nayak , 2019 ; Chen et al. , 2020b ; a ; Radford et al. , 2021 ; Caron et al. , 2020 ) . At its core , these systems face the same challenges that classifiers and regressors face : richer models can often improve performance but hinder interpretability . For high-risk domains like medicine , incorrect search results can have serious consequences . In other domains , search engine bias can disproportionately hide certain voices and have systemic impact ( Mowshowitz & Kawaguchi , 2002 ; Diaz , 2008 ; Goldman , 2005 ) . Currently , there are several competing techniques practitioners can use to understand similarity model predictions ( Zhu et al. , 2019 ; Zheng et al. , 2020 ; Dong et al . ; Selvaraju et al. , 2017 ; Vaswani et al. , 2017 ) . However , it is often unclear when one approach should be chosen over another and there is not a formal theory describing an optimal search explanation method . To help solve this challenge we show that the theory of fair credit assignment provides a uniquely determined and axiomatic approach for “ explaining ” why a trained model judges two objects as similar . In many cases , existing approaches are special cases of this formalism . This allows us to design variants of these methods that better satisfy the axioms of fair credit assignment and can handle counterfactual or relative explanations . Though we explore this topic through the lens of visual search , we note that these techniques could also apply to text , tabular , or audio search systems . This work identifies two distinct classes of search engine explainability methods . “ First order ” approaches highlight the most important pixels that contribute to the similarity of objects and “ Second order ” explanations provide a full correspondence between the parts of query and retrieved image . We relate first order interpretations to existing theory on classifier explainability through a generic function transformation , as shown in the third column of Figure 1 . We find that second order explanations correspond to a uniquely specified generalization of the Shapley values ( Sundararajan et al. , 2020 ) and is equivalent to projecting Harsanyi Dividends onto low-order subsets ( Harsanyi , 1963 ) . Using this formalism , we present new second-order generalizations of Class Activation Maps ( Zhou et al. , 2016 ) , GradCAM ( Selvaraju et al. , 2017 ) , LIME ( Ribeiro et al. , 2016 ) , and SHAP ( Lundberg & Lee , 2017 ) . These contributions generalize several existing methods , illustrate a rich mathematical structure connecting model explainability and cooperative game theory , and allow practitioners to understand search engines with greater nuance and detail . We include a short video detailing the work at https : //tinyurl.com/2j3y2ffn . In summary we : • Present the first uniquely specified axiomatic framework for model-agnostic search , retrieval , and metric learning interpretability using the theory of Harsanyi dividends . • Show that our framework generalizes several existing model explanation methods ( Zhou et al. , 2016 ; Selvaraju et al. , 2017 ; Zhu et al. , 2019 ; Ribeiro et al. , 2016 ) and allows us to extend these methods to handle counterfactual explanations and extract dense pairwise correspondences between query and retrieved images . • Introduce a new kernel-based approximator for Shapley-Taylor indices that requires about 10× fewer function evaluations . • Show that our axiomatic approaches provide more faithful explanations of image similarity on the PascalVOC and MSCoCo datasets . 2 BACKGROUND . This work focuses on search , retrieval , metric learning , and recommendation architectures . Often , these systems use similarity between objects or learned features ( Bengio et al. , 2013 ) to rank , retrieve , or suggest content ( Bing , 2017 ; Su & Khoshgoftaar , 2009 ; Chopra et al. , 2005 ; Radford et al. , 2021 ) . More formally , we refer to systems that use a distance , relevance , or similarity function of the form : d : X × Y → R to quantify the relationship between items from sets X and Y . In search and retrieval , X represents the space of search queries and Y represents the space of results , the function d assigns a relevance to each query result pair . Without loss of generality , we consider d as a “ distance-like ” function where smaller values indicate more relevance . The expression arg miny∈Y d ( x , y ) yields the most relevant result for a query x ∈ X . Specializing this notion yields a variety of different kinds of ML systems . IfX = Y = Range ( N ( · ) ) whereN is an image featurization network such as ResNet50 ( He et al. , 2016 ) , the formalism yields a visual search engine or “ reverse image search ” . Though this work focuses on visual search , we note that ifX is the space of character sequences and Y is the space of webpages , this represents web search . If X are users and Y are the space of items , such as songs or news articles , the formalism represents a recommendation problem . In this work we aim to extract meaningful “ interpretations ” or “ explanations ” of the function d . 2.1 MODEL INTERPRETABILITY . The Bias-Variance trade-off ( Kohavi et al. , 1996 ) affects all machine learning systems and governs the relationship between a model ’ s expressiveness and generalization ability . In data-rich scenarios , a model ’ s bias dominates generalization error and increasing the size of the model class can improve performance . However , increasing model complexity can severely degrade its interpretability because added parameters can lose their connection to physically meaningful quantities . This is a challenge not just for classification and regression systems , but for search and recommendation architectures as well . For example , the best performing competitors on the Netflix prize dataset ( Bennett et al. , 2007 ) involve significantly more complex models than earlier baselines ( Rendle et al. , 2019 ) . Famously , the Netflix grand prize winner , the “ BellKor ” algorithm ( Koren , 2009 ) , boosts and ensembles several different underling methods making it difficult to interpret the model by inspecting its parameters . To tackle these challenges , some works introduce model classes that are naturally interpretable ( Nori et al. , 2019 ; Hastie & Tibshirani , 1990 ) . Alternatively , other works propose model-agnostic methods to explain the predictions of classifiers and regressors . Many of these approaches explain the local structure around a specific prediction . Lundberg & Lee ( 2017 ) show that the Shapley value ( Shapley , 1951 ) , a measure of fair credit assignment , provides a unique and axiomatically characterized solution to classifier interpretability ( SHAP ) . Furthermore , the authors show that Shapley values generalize LIME , DeepLIFT ( Shrikumar et al. , 2017 ) , Layer-Wise Relevance Propagation ( Bach et al. , 2015 ) , and several other methods ( Štrumbelj & Kononenko , 2014 ; Datta et al. , 2016 ; Lipovetsky & Conklin , 2001 ; Saabas , 2014 ) . Many works in computer vision use an alternative approach called Class Activation Maps ( CAMs ) . CAM projects the predicted class of a deep global average pooled ( GAP ) convolutional network onto the feature space to create a low resolution heatmap of class-specific network attention . GradCAM ( Selvaraju et al. , 2017 ) generalizes CAM to architectures other than GAP and yields robust interpretations with only a single network evaluation . In Section 4 we show that CAM , GradCAM , and their analogue for search engine interpretability , Zhu et al . ( 2019 ) , are also unified by the Shapley value and its second order generalization , the ShapleyTaylor index . 2.2 FAIR CREDIT ASSIGNMENT AND THE SHAPLEY VALUE . Shapley values provide a principled and axiomatic framework for classifier interpretation . We provide a brief overview of Shapley values but point readers to Molnar ( 2020 ) for more details . Shapley values originally arose in cooperative game theory as the only fair way to allocate the profit of a company to its employees based on their contributions . They have since become a standard method for explaining predictions of machine learning models . In particular , Shapley values measure of how much “ credit ” a model ’ s features receive for the prediction under a fair credit assignment . More formally , a “ coalition game ” is a set N of |N | players and a “ value ” function v : 2N → R. In cooperative game theory , this function v represents the expected payoff for a given cooperating coalition of players . Shapley ( 1951 ) show that the unique , fair credit assignment to each player , φv ( i ∈ N ) , can be calculated as : φv ( i ) : = ∑ S⊆N\ { i } |S| ! ( |N | − |S| − 1 ) ! |N | ! ( v ( S ∪ { i } ) − v ( S ) ) ( 1 ) Informally , this equation measures the average increase in value that a player i brings to a coalition S by weighting each increase , v ( S ∪ { i } ) − v ( S ) , by the number of ways this event could have happened during the formation of the “ grand coalition ” N . We note that this assignment , φv , is the unique assignment that satisfies four reasonable properties : symmetry under player re-labeling , no credit assignment to dummy players , linearity ( or it ’ s alternative monotonicity ) , and efficiency which states that Shapley values should sum to v ( N ) − v ( ∅ ) ( Young , 1985 ) . Intuitively , these axioms require that a fair explanation should treat every feature equally ( Symmetry ) , should not assign importance to features that are not used ( Dummy ) , should behave linearly when the value function is transformed ( Linear ) , and should sum to the function ’ s value ( Efficiency ) . To connect this work to model interpretability , we can identify the “ features ” used in a model as the “ players ” and interpret the value function , v ( S ) , as the expected prediction of the model when featuresN \S are replaced by values from a “ background ” distribution . This background distribution allows for “ counterfactual ” or relative explanations ( Goyal et al. , 2019 ) . 3 RELATED WORK . The field of model interpretability has a considerable body of literature , and we mention just a handful of the works that are particularly related . One of our baseline methods , Dong et al. , was one of the first to present a generic visual search engine explanation reminiscent of a Parzen-Window based estimator . Fong & Vedaldi ( 2017 ) introduce a method for explaining classifiers based on meaningful pertubation and Chefer et al . ( 2021 ) introduce a method for improving interpretation for transformer-based classifiers . Zhu et al . ( 2019 ) lifted CAM to search engines and we find that our Shapley-Taylor based method aligns with their approach for GAP architectures . Singh & Anand ( 2019 ) and Fernando et al . ( 2019 ) use LIME and DeepSHAP to provide first-order interpretations of text but do not apply their methods to images . Ancona et al . ( 2019 ) introduce a distribution propagation approach for improving the estimation of Shapley Values for deep models and can be combined with our approach . Many works implicitly use components that align with ShapleyTaylor indices for particular functions . Works such as Fischer et al . ( 2015a ) ; Sun et al . ( 2020 ) ; Wang et al . ( 2020a ) ; Chen et al . ( 2020c ) ; Hou et al . ( 2019 ) use feature correlation layers to estimate and utilize correspondences between images . We show these layers are equivalent to Shapley-Taylor indices on the GAP architecture , and this allows create a correlation layer that handles counterfactual backgrounds . Other recent works have used learned co-attention within transformer architectures to help pool and share information across multiple domain types ( Wei et al. , 2020 ) . Fu et al . ( 2020 ) attempt to learn a variant of GradCAM that better aligns with axioms similar to Shapley Values by adding efficiency regularizers . The method is not guaranteed to satisfy the axioms but is more “ efficient ” . We rely on several works to extend Shapley values to more complex interactions . Harsanyi ( 1963 ) generalized the Shapely value by introducing a “ dividend ” that , when split and distributed among players , yields the Shapley values . Owen ( 1972 ) introduces an equivalent way to extend Shapley values using a multi-linear extension of the game ’ s characteristic function . Sundararajan et al . ( 2020 ) introduce the Shapley-Taylor index and show is equivalent to the Lagrangian remainder of Owen ’ s multi-linear extension . Integrated Hessians ( Janizek et al. , 2020 ) enable estimation of a secondorder variant of the Aumann-Shapley values and we use this approach to create a more principled second-order interpretation method for differentiable search engines . | This paper proposes a explanation framework for retrieval/similarity/metric learning models. It generalizes the form of a couple of previous works, e.g. Zhou et al., 2016; Selvaraju et al., 2017; Zhu et al., 2019; Ribeiro et al., 2016. The proposed method relies on estimation of Shapley value, the authors then propose a kernel-based approximator to make it more computationally efficient. Experiments are conducted on PascalVOC and MSCoCo dataset to show the faithfulness and quality of explanations. | SP:fcd3d81a3040deaee7abce5e9e4d0abeb380ac54 |
Learning to Collaborate | 1 INTRODUCTION . Effective learning of machine learning models over a collaborative network of data clients has drawn considerable interest in recent years . Frequently , due to privacy concerns , we can not simultaneously access the raw data residing on different clients . Therefore , distributed ( Li et al. , 2014 ) or federated learning ( McMahan et al. , 2017 ) strategies have been proposed , where typically model parameters are updated locally at each client with its own data and the parameter updates , such as gradients , are transmitted out and communicate with other clients . During this process , it is usually assumed that the participation in the network comes at no cost , i.e. , every client is willing to participate in the collaboration . However , this is not always true in reality . One example is the clinical research network ( CRN ) involving multiple hospitals ( Fleurence et al. , 2014 ) . Each hospital has its own patient population . The patient data are sensitive and can not be shared with other hospitals . If we want to build a risk prediction model with the patient data within this network in a privacy-preserving way , the expectation from each hospital is that a better model can be obtained through participating in the CRN compared to the one built from its own data collected from various clinical practice with big efforts . In this scenario , there has been a prior study showing that the model performance can decrease when collaborating with hospitals with very distinct patient populations due to negative transfer induced by sample distribution discrepancies ( Wang et al. , 2019 ; Pan & Yang , 2009 ) . With these considerations , in this paper , we propose a novel learning to collaborate framework . We allow the participating clients in a large collaborative network to form non-overlapping collaboration coalitions . Each coalition includes a subset of clients such that the collaboration among them can benefit their respective model performance . We aim at identifying the collaboration coalitions that can lead to a collaboration equilibrium , i.e. , there are no other coalition settings that any of the individual clients can benefit more ( i.e. , achieve better model performance ) . To obtain the coalitions that can lead to a collaboration equilibrium , we propose a Pareto optimization framework to identify the necessary collaborators for each client in the network to achieve its maximum utility . In particular , we optimize a local model associated with a specific client on the Under review as a conference paper at ICLR 2022 < latexit sha1_base64= '' ZroCL0JJbplYYxKF0TuIbB7Z7xk= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF5OJUko3/oBb/TLxD/QvvDNGUIvohCRnzr3nzNx7vSTgqbSsl4IxMzs3v1BcLC0tr6yuldc3mmmcCZ85fhzEou25KQt4xBzJZcDaiWBu6AWs5Q2PVbx1y0TK4+hCjhLWDd1BxPvcdyVRzunV2J5clytW1dLLnAZ2DirIVyMuP+MSPcTwkSEEQwRJOICLlJ4ObFhIiOtiTJwgxHWcYYISaTPKYpThEjuk74B2nZyNaK88U6326ZSAXkFKEzukiSlPEFanmTqeaWfF/uY91p7qbiP6e7lXSKzEDbF/6T4z/6tTtUj0cahr4FRTohlVnZ+7ZLor6ubml6okOSTEKdyjuCDsa+Vnn02tSXXtqreujr/qTMWqvZ/nZnhTt6QB2z/HOQ2ae1W7Vt0/r1XqR/moi9jCNnZpngeo4wQNOOTN8YBHPBlnRmLcGaOPVKOQazbxbRn37zlhkQU= < /latexit > < latexit sha1_base64= '' 2++cL5TEXumvU+oahUsTVndZR8E= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Ii3B6JLoRl1hYoEE0bTDgBNK27RTDSFs/AG3+mXGP9C/8M5YEpUYnabtmXPvOTP3Xi/yRSIt6zVnzM0vLC7llwsrq2vrG8XNrUYSpjHjDgv9MG55bsJ9EXBHCunzVhRzd+j5vOkNTlS8ecfjRITBpRxFvDN0+4HoCeZKopyz63FlclMsWWVLL3MW2BkoIVv1sPiCK3QRgiHFEBwBJGEfLhJ62rBhISKugzFxMSGh4xwTFEibUhanDJfYAX37tGtnbEB75ZloNaNTfHpjUprYI01IeTFhdZqp46l2Vuxv3mPtqe42or+XeQ2Jlbgl9i/dNPO/OlWLRA9HugZBNUWaUdWxzCXVXVE3N79UJckhIk7hLsVjwkwrp302tSbRtaveujr+pjMVq/Ysy03xrm5JA7Z/jnMWNCplu1o+uKiWasfZqPPYwS72aZ6HqOEUdTjkLfCIJzwb50Zk3Bujz1Qjl2m28W0ZDx87wpEG < /latexit > < latexit sha1_base64= '' G06mXSCW+K11xSPKJ+cv3bGQhME= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IkUxuiS6UVeYWCBBNO0w4IS+0k41hLDxB9zqlxn/QP/CO2NJVGJ0mrZnzr3nzNx73cgTibSs15wxMzs3v5BfLCwtr6yuFdc3GkmYxozbLPTCuOU6CfdEwG0ppMdbUcwd3/V40x2cqHjzjseJCINLOYx4x3f6gegJ5kii7LPr0f74pliyypZe5jSoZKCEbNXD4guu0EUIhhQ+OAJIwh4cJPS0UYGFiLgORsTFhISOc4xRIG1KWZwyHGIH9O3Trp2xAe2VZ6LVjE7x6I1JaWKHNCHlxYTVaaaOp9pZsb95j7SnutuQ/m7m5RMrcUvsX7pJ5n91qhaJHo50DYJqijSjqmOZS6q7om5ufqlKkkNEnMJdiseEmVZO+mxqTaJrV711dPxNZypW7VmWm+Jd3ZIGXPk5zmnQ2CtXquWDi2qpdpyNOo8tbGOX5nmIGk5Rh03eAo94wrNxbkTGvTH8TDVymWYT35bx8AE+I5EH < /latexit > < latexit sha1_base64= '' 078TlPinZnbp3G8YDOaCG04E8G4= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF8lEKaUbf8Ctfpn4B/oX3hlHUIvohCRnzr3nzNx7vSTgmbCsl4IxMzs3v1BcLC0tr6yuldc3mlmcpz5z/DiI07bnZizgEXMEFwFrJylzQy9gLW94LOOtW5ZmPI4uxChh3dAdRLzPfVcQ5ZxejWuT63LFqlpqmdPA1qACvRpx+RmX6CGGjxwhGCIIwgFcZPR0YMNCQlwXY+JSQlzFGSYokTanLEYZLrFD+g5o19FsRHvpmSm1T6cE9KakNLFDmpjyUsLyNFPFc+Us2d+8x8pT3m1Ef097hcQK3BD7l+4z8786WYtAH4eqBk41JYqR1fnaJVddkTc3v1QlyCEhTuIexVPCvlJ+9tlUmkzVLnvrqvirypSs3Ps6N8ebvCUN2P45zmnQ3Kvater+ea1SP9KjLmIL29ileR6gjhM04JA3xwMe8WScGYlxZ4w+Uo2C1mzi2zLu3wFAhJEI < /latexit > < latexit sha1_base64= '' rxH3eGL3jlLzhYJGRaokrVTVvjc= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsVAdEl0o64wsUCCaNoy4IS+Mp1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3urHPE2lZrzljbn5hcSm/XFhZXVvfKG5uNZMoFR6zvciPRNt1EubzkNmSS5+1Y8GcwPVZyx2eqHjrjomER+GlHMWsGziDkPe550ii7LPrcW1yUyxZZUsvcxZUMlBCthpR8QVX6CGChxQBGEJIwj4cJPR0UIGFmLguxsQJQlzHGSYokDalLEYZDrFD+g5o18nYkPbKM9Fqj07x6RWkNLFHmojyBGF1mqnjqXZW7G/eY+2p7jaiv5t5BcRK3BL7l26a+V+dqkWijyNdA6eaYs2o6rzMJdVdUTc3v1QlySEmTuEexQVhTyunfTa1JtG1q946Ov6mMxWr9l6Wm+Jd3ZIGXPk5zlnQPChXquXaRbVUP85GnccOdrFP8zxEHadowCZvjkc84dk4N2Lj3hh9phq5TLONb8t4+ABC5ZEJ < /latexit > < latexit sha1_base64= '' rX31m9pL4TDFitzg9FObuhvEhn0= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsXgY0l0o64wsUCCaNphwAl9pZ1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3upEnEmlZrzljZnZufiG/WFhaXlldK65vNJIwjRm3WeiFcct1Eu6JgNtSSI+3opg7vuvxpjs4UfHmHY8TEQaXchjxju/0A9ETzJFE2WfXo4PxTbFklS29zGlQyUAJ2aqHxRdcoYsQDCl8cASQhD04SOhpowILEXEdjIiLCQkd5xijQNqUsjhlOMQO6NunXTtjA9orz0SrGZ3i0RuT0sQOaULKiwmr00wdT7WzYn/zHmlPdbch/d3MyydW4pbYv3STzP/qVC0SPRzpGgTVFGlGVccyl1R3Rd3c/FKVJIeIOIW7FI8JM62c9NnUmkTXrnrr6PibzlSs2rMsN8W7uiUNuPJznNOgsVeuVMv7F9VS7TgbdR5b2MYuzfMQNZyiDpu8BR7xhGfj3IiMe2P4mWrkMs0mvi3j4QNFRpEK < /latexit > < latexit sha1_base64= '' 078TlPinZnbp3G8YDOaCG04E8G4= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF8lEKaUbf8Ctfpn4B/oX3hlHUIvohCRnzr3nzNx7vSTgmbCsl4IxMzs3v1BcLC0tr6yuldc3mlmcpz5z/DiI07bnZizgEXMEFwFrJylzQy9gLW94LOOtW5ZmPI4uxChh3dAdRLzPfVcQ5ZxejWuT63LFqlpqmdPA1qACvRpx+RmX6CGGjxwhGCIIwgFcZPR0YMNCQlwXY+JSQlzFGSYokTanLEYZLrFD+g5o19FsRHvpmSm1T6cE9KakNLFDmpjyUsLyNFPFc+Us2d+8x8pT3m1Ef097hcQK3BD7l+4z8786WYtAH4eqBk41JYqR1fnaJVddkTc3v1QlyCEhTuIexVPCvlJ+9tlUmkzVLnvrqvirypSs3Ps6N8ebvCUN2P45zmnQ3Kvater+ea1SP9KjLmIL29ileR6gjhM04JA3xwMe8WScGYlxZ4w+Uo2C1mzi2zLu3wFAhJEI < /latexit > < latexit sha1_base64= '' rxH3eGL3jlLzhYJGRaokrVTVvjc= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsVAdEl0o64wsUCCaNoy4IS+Mp1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3urHPE2lZrzljbn5hcSm/XFhZXVvfKG5uNZMoFR6zvciPRNt1EubzkNmSS5+1Y8GcwPVZyx2eqHjrjomER+GlHMWsGziDkPe550ii7LPrcW1yUyxZZUsvcxZUMlBCthpR8QVX6CGChxQBGEJIwj4cJPR0UIGFmLguxsQJQlzHGSYokDalLEYZDrFD+g5o18nYkPbKM9Fqj07x6RWkNLFHmojyBGF1mqnjqXZW7G/eY+2p7jaiv5t5BcRK3BL7l26a+V+dqkWijyNdA6eaYs2o6rzMJdVdUTc3v1QlySEmTuEexQVhTyunfTa1JtG1q946Ov6mMxWr9l6Wm+Jd3ZIGXPk5zlnQPChXquXaRbVUP85GnccOdrFP8zxEHadowCZvjkc84dk4N2Lj3hh9phq5TLONb8t4+ABC5ZEJ < /latexit > < latexit sha1_base64= '' rX31m9pL4TDFitzg9FObuhvEhn0= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsXgY0l0o64wsUCCaNphwAl9pZ1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3upEnEmlZrzljZnZufiG/WFhaXlldK65vNJIwjRm3WeiFcct1Eu6JgNtSSI+3opg7vuvxpjs4UfHmHY8TEQaXchjxju/0A9ETzJFE2WfXo4PxTbFklS29zGlQyUAJ2aqHxRdcoYsQDCl8cASQhD04SOhpowILEXEdjIiLCQkd5xijQNqUsjhlOMQO6NunXTtjA9orz0SrGZ3i0RuT0sQOaULKiwmr00wdT7WzYn/zHmlPdbch/d3MyydW4pbYv3STzP/qVC0SPRzpGgTVFGlGVccyl1R3Rd3c/FKVJIeIOIW7FI8JM62c9NnUmkTXrnrr6PibzlSs2rMsN8W7uiUNuPJznNOgsVeuVMv7F9VS7TgbdR5b2MYuzfMQNZyiDpu8BR7xhGfj3IiMe2P4mWrkMs0mvi3j4QNFRpEK < /latexit > < latexit sha1_base64= '' ZroCL0JJbplYYxKF0TuIbB7Z7xk= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF5OJUko3/oBb/TLxD/QvvDNGUIvohCRnzr3nzNx7vSTgqbSsl4IxMzs3v1BcLC0tr6yuldc3mmmcCZ85fhzEou25KQt4xBzJZcDaiWBu6AWs5Q2PVbx1y0TK4+hCjhLWDd1BxPvcdyVRzunV2J5clytW1dLLnAZ2DirIVyMuP+MSPcTwkSEEQwRJOICLlJ4ObFhIiOtiTJwgxHWcYYISaTPKYpThEjuk74B2nZyNaK88U6326ZSAXkFKEzukiSlPEFanmTqeaWfF/uY91p7qbiP6e7lXSKzEDbF/6T4z/6tTtUj0cahr4FRTohlVnZ+7ZLor6ubml6okOSTEKdyjuCDsa+Vnn02tSXXtqreujr/qTMWqvZ/nZnhTt6QB2z/HOQ2ae1W7Vt0/r1XqR/moi9jCNnZpngeo4wQNOOTN8YBHPBlnRmLcGaOPVKOQazbxbRn37zlhkQU= < /latexit > < latexit sha1_base64= '' 2++cL5TEXumvU+oahUsTVndZR8E= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Ii3B6JLoRl1hYoEE0bTDgBNK27RTDSFs/AG3+mXGP9C/8M5YEpUYnabtmXPvOTP3Xi/yRSIt6zVnzM0vLC7llwsrq2vrG8XNrUYSpjHjDgv9MG55bsJ9EXBHCunzVhRzd+j5vOkNTlS8ecfjRITBpRxFvDN0+4HoCeZKopyz63FlclMsWWVLL3MW2BkoIVv1sPiCK3QRgiHFEBwBJGEfLhJ62rBhISKugzFxMSGh4xwTFEibUhanDJfYAX37tGtnbEB75ZloNaNTfHpjUprYI01IeTFhdZqp46l2Vuxv3mPtqe42or+XeQ2Jlbgl9i/dNPO/OlWLRA9HugZBNUWaUdWxzCXVXVE3N79UJckhIk7hLsVjwkwrp302tSbRtaveujr+pjMVq/Ysy03xrm5JA7Z/jnMWNCplu1o+uKiWasfZqPPYwS72aZ6HqOEUdTjkLfCIJzwb50Zk3Bujz1Qjl2m28W0ZDx87wpEG < /latexit > < latexit sha1_base64= '' G06mXSCW+K11xSPKJ+cv3bGQhME= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IkUxuiS6UVeYWCBBNO0w4IS+0k41hLDxB9zqlxn/QP/CO2NJVGJ0mrZnzr3nzNx73cgTibSs15wxMzs3v5BfLCwtr6yuFdc3GkmYxozbLPTCuOU6CfdEwG0ppMdbUcwd3/V40x2cqHjzjseJCINLOYx4x3f6gegJ5kii7LPr0f74pliyypZe5jSoZKCEbNXD4guu0EUIhhQ+OAJIwh4cJPS0UYGFiLgORsTFhISOc4xRIG1KWZwyHGIH9O3Trp2xAe2VZ6LVjE7x6I1JaWKHNCHlxYTVaaaOp9pZsb95j7SnutuQ/m7m5RMrcUvsX7pJ5n91qhaJHo50DYJqijSjqmOZS6q7om5ufqlKkkNEnMJdiseEmVZO+mxqTaJrV711dPxNZypW7VmWm+Jd3ZIGXPk5zmnQ2CtXquWDi2qpdpyNOo8tbGOX5nmIGk5Rh03eAo94wrNxbkTGvTH8TDVymWYT35bx8AE+I5EH < /latexit > < latexit sha1_base64= '' ZroCL0JJbplYYxKF0TuIbB7Z7xk= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF5OJUko3/oBb/TLxD/QvvDNGUIvohCRnzr3nzNx7vSTgqbSsl4IxMzs3v1BcLC0tr6yuldc3mmmcCZ85fhzEou25KQt4xBzJZcDaiWBu6AWs5Q2PVbx1y0TK4+hCjhLWDd1BxPvcdyVRzunV2J5clytW1dLLnAZ2DirIVyMuP+MSPcTwkSEEQwRJOICLlJ4ObFhIiOtiTJwgxHWcYYISaTPKYpThEjuk74B2nZyNaK88U6326ZSAXkFKEzukiSlPEFanmTqeaWfF/uY91p7qbiP6e7lXSKzEDbF/6T4z/6tTtUj0cahr4FRTohlVnZ+7ZLor6ubml6okOSTEKdyjuCDsa+Vnn02tSXXtqreujr/qTMWqvZ/nZnhTt6QB2z/HOQ2ae1W7Vt0/r1XqR/moi9jCNnZpngeo4wQNOOTN8YBHPBlnRmLcGaOPVKOQazbxbRn37zlhkQU= < /latexit > < latexit sha1_base64= '' 2++cL5TEXumvU+oahUsTVndZR8E= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Ii3B6JLoRl1hYoEE0bTDgBNK27RTDSFs/AG3+mXGP9C/8M5YEpUYnabtmXPvOTP3Xi/yRSIt6zVnzM0vLC7llwsrq2vrG8XNrUYSpjHjDgv9MG55bsJ9EXBHCunzVhRzd+j5vOkNTlS8ecfjRITBpRxFvDN0+4HoCeZKopyz63FlclMsWWVLL3MW2BkoIVv1sPiCK3QRgiHFEBwBJGEfLhJ62rBhISKugzFxMSGh4xwTFEibUhanDJfYAX37tGtnbEB75ZloNaNTfHpjUprYI01IeTFhdZqp46l2Vuxv3mPtqe42or+XeQ2Jlbgl9i/dNPO/OlWLRA9HugZBNUWaUdWxzCXVXVE3N79UJckhIk7hLsVjwkwrp302tSbRtaveujr+pjMVq/Ysy03xrm5JA7Z/jnMWNCplu1o+uKiWasfZqPPYwS72aZ6HqOEUdTjkLfCIJzwb50Zk3Bujz1Qjl2m28W0ZDx87wpEG < /latexit > < latexit sha1_base64= '' G06mXSCW+K11xSPKJ+cv3bGQhME= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IkUxuiS6UVeYWCBBNO0w4IS+0k41hLDxB9zqlxn/QP/CO2NJVGJ0mrZnzr3nzNx73cgTibSs15wxMzs3v5BfLCwtr6yuFdc3GkmYxozbLPTCuOU6CfdEwG0ppMdbUcwd3/V40x2cqHjzjseJCINLOYx4x3f6gegJ5kii7LPr0f74pliyypZe5jSoZKCEbNXD4guu0EUIhhQ+OAJIwh4cJPS0UYGFiLgORsTFhISOc4xRIG1KWZwyHGIH9O3Trp2xAe2VZ6LVjE7x6I1JaWKHNCHlxYTVaaaOp9pZsb95j7SnutuQ/m7m5RMrcUvsX7pJ5n91qhaJHo50DYJqijSjqmOZS6q7om5ufqlKkkNEnMJdiseEmVZO+mxqTaJrV711dPxNZypW7VmWm+Jd3ZIGXPk5zmnQ2CtXquWDi2qpdpyNOo8tbGOX5nmIGk5Rh03eAo94wrNxbkTGvTH8TDVymWYT35bx8AE+I5EH < /latexit > < latexit sha1_base64= '' 078TlPinZnbp3G8YDOaCG04E8G4= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF8lEKaUbf8Ctfpn4B/oX3hlHUIvohCRnzr3nzNx7vSTgmbCsl4IxMzs3v1BcLC0tr6yuldc3mlmcpz5z/DiI07bnZizgEXMEFwFrJylzQy9gLW94LOOtW5ZmPI4uxChh3dAdRLzPfVcQ5ZxejWuT63LFqlpqmdPA1qACvRpx+RmX6CGGjxwhGCIIwgFcZPR0YMNCQlwXY+JSQlzFGSYokTanLEYZLrFD+g5o19FsRHvpmSm1T6cE9KakNLFDmpjyUsLyNFPFc+Us2d+8x8pT3m1Ef097hcQK3BD7l+4z8786WYtAH4eqBk41JYqR1fnaJVddkTc3v1QlyCEhTuIexVPCvlJ+9tlUmkzVLnvrqvirypSs3Ps6N8ebvCUN2P45zmnQ3Kvater+ea1SP9KjLmIL29ileR6gjhM04JA3xwMe8WScGYlxZ4w+Uo2C1mzi2zLu3wFAhJEI < /latexit > < latexit sha1_base64= '' rxH3eGL3jlLzhYJGRaokrVTVvjc= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsVAdEl0o64wsUCCaNoy4IS+Mp1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3urHPE2lZrzljbn5hcSm/XFhZXVvfKG5uNZMoFR6zvciPRNt1EubzkNmSS5+1Y8GcwPVZyx2eqHjrjomER+GlHMWsGziDkPe550ii7LPrcW1yUyxZZUsvcxZUMlBCthpR8QVX6CGChxQBGEJIwj4cJPR0UIGFmLguxsQJQlzHGSYokDalLEYZDrFD+g5o18nYkPbKM9Fqj07x6RWkNLFHmojyBGF1mqnjqXZW7G/eY+2p7jaiv5t5BcRK3BL7l26a+V+dqkWijyNdA6eaYs2o6rzMJdVdUTc3v1QlySEmTuEexQVhTyunfTa1JtG1q946Ov6mMxWr9l6Wm+Jd3ZIGXPk5zlnQPChXquXaRbVUP85GnccOdrFP8zxEHadowCZvjkc84dk4N2Lj3hh9phq5TLONb8t4+ABC5ZEJ < /latexit > < latexit sha1_base64= '' rX31m9pL4TDFitzg9FObuhvEhn0= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsXgY0l0o64wsUCCaNphwAl9pZ1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3upEnEmlZrzljZnZufiG/WFhaXlldK65vNJIwjRm3WeiFcct1Eu6JgNtSSI+3opg7vuvxpjs4UfHmHY8TEQaXchjxju/0A9ETzJFE2WfXo4PxTbFklS29zGlQyUAJ2aqHxRdcoYsQDCl8cASQhD04SOhpowILEXEdjIiLCQkd5xijQNqUsjhlOMQO6NunXTtjA9orz0SrGZ3i0RuT0sQOaULKiwmr00wdT7WzYn/zHmlPdbch/d3MyydW4pbYv3STzP/qVC0SPRzpGgTVFGlGVccyl1R3Rd3c/FKVJIeIOIW7FI8JM62c9NnUmkTXrnrr6PibzlSs2rMsN8W7uiUNuPJznNOgsVeuVMv7F9VS7TgbdR5b2MYuzfMQNZyiDpu8BR7xhGfj3IiMe2P4mWrkMs0mvi3j4QNFRpEK < /latexit > < latexit sha1_base64= '' 078TlPinZnbp3G8YDOaCG04E8G4= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF8lEKaUbf8Ctfpn4B/oX3hlHUIvohCRnzr3nzNx7vSTgmbCsl4IxMzs3v1BcLC0tr6yuldc3mlmcpz5z/DiI07bnZizgEXMEFwFrJylzQy9gLW94LOOtW5ZmPI4uxChh3dAdRLzPfVcQ5ZxejWuT63LFqlpqmdPA1qACvRpx+RmX6CGGjxwhGCIIwgFcZPR0YMNCQlwXY+JSQlzFGSYokTanLEYZLrFD+g5o19FsRHvpmSm1T6cE9KakNLFDmpjyUsLyNFPFc+Us2d+8x8pT3m1Ef097hcQK3BD7l+4z8786WYtAH4eqBk41JYqR1fnaJVddkTc3v1QlyCEhTuIexVPCvlJ+9tlUmkzVLnvrqvirypSs3Ps6N8ebvCUN2P45zmnQ3Kvater+ea1SP9KjLmIL29ileR6gjhM04JA3xwMe8WScGYlxZ4w+Uo2C1mzi2zLu3wFAhJEI < /latexit > < latexit sha1_base64= '' rxH3eGL3jlLzhYJGRaokrVTVvjc= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsVAdEl0o64wsUCCaNoy4IS+Mp1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3urHPE2lZrzljbn5hcSm/XFhZXVvfKG5uNZMoFR6zvciPRNt1EubzkNmSS5+1Y8GcwPVZyx2eqHjrjomER+GlHMWsGziDkPe550ii7LPrcW1yUyxZZUsvcxZUMlBCthpR8QVX6CGChxQBGEJIwj4cJPR0UIGFmLguxsQJQlzHGSYokDalLEYZDrFD+g5o18nYkPbKM9Fqj07x6RWkNLFHmojyBGF1mqnjqXZW7G/eY+2p7jaiv5t5BcRK3BL7l26a+V+dqkWijyNdA6eaYs2o6rzMJdVdUTc3v1QlySEmTuEexQVhTyunfTa1JtG1q946Ov6mMxWr9l6Wm+Jd3ZIGXPk5zlnQPChXquXaRbVUP85GnccOdrFP8zxEHadowCZvjkc84dk4N2Lj3hh9phq5TLONb8t4+ABC5ZEJ < /latexit > < latexit sha1_base64= '' rX31m9pL4TDFitzg9FObuhvEhn0= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsXgY0l0o64wsUCCaNphwAl9pZ1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3upEnEmlZrzljZnZufiG/WFhaXlldK65vNJIwjRm3WeiFcct1Eu6JgNtSSI+3opg7vuvxpjs4UfHmHY8TEQaXchjxju/0A9ETzJFE2WfXo4PxTbFklS29zGlQyUAJ2aqHxRdcoYsQDCl8cASQhD04SOhpowILEXEdjIiLCQkd5xijQNqUsjhlOMQO6NunXTtjA9orz0SrGZ3i0RuT0sQOaULKiwmr00wdT7WzYn/zHmlPdbch/d3MyydW4pbYv3STzP/qVC0SPRzpGgTVFGlGVccyl1R3Rd3c/FKVJIeIOIW7FI8JM62c9NnUmkTXrnrr6PibzlSs2rMsN8W7uiUNuPJznNOgsVeuVMv7F9VS7TgbdR5b2MYuzfMQNZyiDpu8BR7xhGfj3IiMe2P4mWrkMs0mvi3j4QNFRpEK < /latexit > < latexit sha1_base64= '' ZroCL0JJbplYYxKF0TuIbB7Z7xk= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF5OJUko3/oBb/TLxD/QvvDNGUIvohCRnzr3nzNx7vSTgqbSsl4IxMzs3v1BcLC0tr6yuldc3mmmcCZ85fhzEou25KQt4xBzJZcDaiWBu6AWs5Q2PVbx1y0TK4+hCjhLWDd1BxPvcdyVRzunV2J5clytW1dLLnAZ2DirIVyMuP+MSPcTwkSEEQwRJOICLlJ4ObFhIiOtiTJwgxHWcYYISaTPKYpThEjuk74B2nZyNaK88U6326ZSAXkFKEzukiSlPEFanmTqeaWfF/uY91p7qbiP6e7lXSKzEDbF/6T4z/6tTtUj0cahr4FRTohlVnZ+7ZLor6ubml6okOSTEKdyjuCDsa+Vnn02tSXXtqreujr/qTMWqvZ/nZnhTt6QB2z/HOQ2ae1W7Vt0/r1XqR/moi9jCNnZpngeo4wQNOOTN8YBHPBlnRmLcGaOPVKOQazbxbRn37zlhkQU= < /latexit > < latexit sha1_base64= '' 2++cL5TEXumvU+oahUsTVndZR8E= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Ii3B6JLoRl1hYoEE0bTDgBNK27RTDSFs/AG3+mXGP9C/8M5YEpUYnabtmXPvOTP3Xi/yRSIt6zVnzM0vLC7llwsrq2vrG8XNrUYSpjHjDgv9MG55bsJ9EXBHCunzVhRzd+j5vOkNTlS8ecfjRITBpRxFvDN0+4HoCeZKopyz63FlclMsWWVLL3MW2BkoIVv1sPiCK3QRgiHFEBwBJGEfLhJ62rBhISKugzFxMSGh4xwTFEibUhanDJfYAX37tGtnbEB75ZloNaNTfHpjUprYI01IeTFhdZqp46l2Vuxv3mPtqe42or+XeQ2Jlbgl9i/dNPO/OlWLRA9HugZBNUWaUdWxzCXVXVE3N79UJckhIk7hLsVjwkwrp302tSbRtaveujr+pjMVq/Ysy03xrm5JA7Z/jnMWNCplu1o+uKiWasfZqPPYwS72aZ6HqOEUdTjkLfCIJzwb50Zk3Bujz1Qjl2m28W0ZDx87wpEG < /latexit > < latexit sha1_base64= '' G06mXSCW+K11xSPKJ+cv3bGQhME= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IkUxuiS6UVeYWCBBNO0w4IS+0k41hLDxB9zqlxn/QP/CO2NJVGJ0mrZnzr3nzNx73cgTibSs15wxMzs3v5BfLCwtr6yuFdc3GkmYxozbLPTCuOU6CfdEwG0ppMdbUcwd3/V40x2cqHjzjseJCINLOYx4x3f6gegJ5kii7LPr0f74pliyypZe5jSoZKCEbNXD4guu0EUIhhQ+OAJIwh4cJPS0UYGFiLgORsTFhISOc4xRIG1KWZwyHGIH9O3Trp2xAe2VZ6LVjE7x6I1JaWKHNCHlxYTVaaaOp9pZsb95j7SnutuQ/m7m5RMrcUvsX7pJ5n91qhaJHo50DYJqijSjqmOZS6q7om5ufqlKkkNEnMJdiseEmVZO+mxqTaJrV711dPxNZypW7VmWm+Jd3ZIGXPk5zmnQ2CtXquWDi2qpdpyNOo8tbGOX5nmIGk5Rh03eAo94wrNxbkTGvTH8TDVymWYT35bx8AE+I5EH < /latexit > Pareto front of the learning objectives of all clients . Through the analysis of the geometric location of such an optimal model on the Pareto front , we can identify the necessary collaborators of each client . The relationships between each client and its necessary collaborators can be encoded in a benefit graph , in which each node denotes a client and the edge from Ij to Ii represents Ij is one of the necessary collaborators for Ii , as exemplified in Figure 1 ( a ) . Then we can derive the coalitions corresponding to the collaboration equilibrium through an iterative process introduced as follows . Specifically , we define a stable coalition as the minimum set such that its all involved clients can achieve its maximal utility . From the perspective of graph theory , these stable coalitions are actually the strongly connected components of the benefit graph . For example , C = { I1 , I2 , I3 } in Figure 1 ( b ) is a stable coalition as all clients can achieve their best performance by collaborating with the clients in C ( compared with collaborating with other clients in the network ) . By removing the stable coalitions and re-building the benefit graph of the remaining client iteratively as shown in Figure 1 ( b ) and ( c ) , we can identify all coalitions as in Figure 1 ( d ) and prove that the obtained coalitions can lead to a collaboration equilibrium . We empirically evaluate our method on synthetic data , UCI adult ( Kohavi , 1996 ) , a classical FL benchmark data set CIFAR10 ( Krizhevsky et al. , 2009 ) , and a real-world electronic health record ( EHR ) data repository eICU ( Pollard et al. , 2018 ) , which includes patient EHR data in ICU from multiple hospitals . The results show our method significantly outperforms existing relevant methods . The experiments on eICU data demonstrate that our algorithm is able to derive a good collaboration strategy for the hospitals to collaborate . 2 RELATED WORK . 2.1 FEDERATED LEARNING . Federated learning ( FL ) ( McMahan et al. , 2017 ) refers to the paradigm of learning from fragmented data without sacrificing privacy . In a typical FL setting , a global model is learned from the data residing in multiple distinct local clients . However , a single global model may lead to performance degradation on certain clients due to data heterogeneity . Personalized federated learning ( PFL ) ( Kulkarni et al. , 2020 ) , which aims at learning a customized model for each client in the federation , has been proposed to tackle this challenge . For example , Zhang et al . ( 2020 ) proposes to adjust the weight of the objectives corresponding to all clients dynamically ; Fallah et al . ( 2020 ) proposes a meta-learning based method for achieving an effectively shared initialization of all local models followed by a fine-tuning procedure ; Shamsian et al . ( 2021 ) proposes to learn a central hypernetwork which can generate a set of customized models for each client . FL assumes all clients are willing to participate in the collaboration and existing methods have not considered whether the collaboration can really benefit each client or not . Without benefit , a local client could be reluctant to participate in the collaboration , which is a realistic scenario we investigate in this paper . One specific FL setup that is relevant to our work is clustered federated learning ( Sattler et al. , 2020 ; Mansour et al. , 2020 ) , which groups the clients with similar data distributions and trains a model for each client group . The scenario we are considering in this paper is to form collaboration coalitions based on the performance gain each client can get for its corresponding model , rather than sample distribution similarities . 2.2 MULTI-TASK LEARNING AND NEGATIVE TRANSFER . Multi-task learning ( Caruana , 1997 ) ( MTL ) aims at learning shared knowledge across multiple interrelated tasks for mutual benefits . Typical examples include hard model parameter sharing ( Kokkinos , 2017 ) , soft parameter sharing ( Lu et al. , 2017 ) , and neural architecture search ( NAS ) for a shared Under review as a conference paper at ICLR 2022 model architecture ( Real et al. , 2019 ) . However , sharing representations of model structures can not guarantee model performance gain due to the existence of negative transfer , while we directly consider forming collaboration coalitions according to individual model performance benefits . In addition , MTL usually assumes the data from all tasks are accessible , while our goal is to learn a personalized model for each client through collaborating with other clients without directly accessing their raw data . It is worth mentioning that there are also clustered MTL approaches ( Standley et al. , 2020 ; Zamir et al. , 2018 ) which assume the models for the tasks within the same group are similar to each other , while we want the clients within each coalition can benefit each other through collaboration when learning their respective models . Some works extend MTL to a multi-source domain adaptation ( Wen et al. , 2020 ; Duan et al. , 2009 ) setting in which unlabeled data exist in some tasks . See detailed discussions in Appendix . 3 COLLABORATION LEARNING PROBLEM . We first introduce the necessary notations and definitions in Section 3.1 , and then define the collaboration equilibrium we aim to achieve in Section 3.2 . 3.1 DEFINITIONS AND NOTATIONS . Suppose there are N clients I = { Ii } N i=1 in a collaborative network and each client is associated with a specific learning task T i based on its own data Di = { Xi , Y i } , i ∈ { 1 , 2 , ... , N } , where the input space Xi and the output space Y i may or may not share across all N clients . Each client pursues collaboration with others to learn a personalized model M i by maximizing its utility ( i.e. , model performance ) without sacrificing data privacy . There is no guarantee that one client can always benefit from the collaboration with others , and the client would be reluctant to participate in the collaboration if there is no benefit . In the following , we describe this through a concrete example . No benefit , no collaboration . Suppose the local data { Di } , i ∈ { 1 , 2 , ... , N } owned by different clients satisfy the following conditions : 1 ) all local data are from the same distribution Di ∼ P ; 2 ) D1 ⊂ D2 ⊂ D3 , ... , ⊂ DN . Since DN contains more data than other clients , IN can not benefit from collaboration with any other clients , so IN will learn a local model using its own data . Once IN refuses to collaboration , IN−1 will also work on its own as IN−1 can only improve its utility by collaborating with IN . IN−2 will learn individually out of the same concerns . Finally , there is no collaboration among any clients . Due to the discrepancies of the sample distributions across different clients , the best local model for a specific client is very likely to come from collaborating with a subset of clients rather than all of them . Suppose U ( Ii , C ) denotes the model utility of client Ii when collaborating with the clients in client set C. In the following , we define Umax ( Ii , C ) as the maximum model utility that Ii can achieve when collaborating with different subsets of C. Definition 1 ( Maximum Achievable Utility ( MAU ) ) . This is the maximum model utility for a specific client Ii to collaborate with different subsets of client set C : Umax ( Ii , C ) = maxC′⊂C U ( Ii , C ′ ) . From Definition 1 , MAU satisfies Umax ( Ii , C ′ ) ≤ Umax ( Ii , C ) if C ′ is a subset of C. Each client Ii ∈ I aims to identify its “ optimal set '' of collaborators from I to maximize its local utility , which is defined as follows . Definition 2 ( Optimal Collaborator Set ( OCS ) ) . A client set CoptI ( I i ) ⊂ I is an optimal collaborator set for Ii if and only if CoptI ( I i ) satisfies ∀C ⊂ I , U ( Ii , CoptI ( Ii ) ) ≥ U ( Ii , C ) ; ( 1a ) ∀C ′ & CoptI ( Ii ) , U ( Ii , C opt I ( I i ) ) > U ( Ii , C ′ ) . ( 1b ) Eq . ( 1a ) means that Ii can achieve its maximal utility when collaborating with CoptI ( I i ) and Eq . ( 1b ) means that all clients in CoptI ( I i ) are necessary . In this way , the relationships between any client Ii ∈ I and its optimal collaborator set CoptI ( Ii ) can be represented by a graph which is called the benefit graph ( BG ) . Specifically , for a given client set C ⊂ I , we use BG ( C ) to denote its corresponding BG . For the example in Figure 1 ( a ) , an arrow from Ij to Ii means Ij ∈ CoptI ( Ii ) , e.g. , I1 → I3 means I1 ∈ CoptI ( I3 ) . For a client set C , if every member can achieve its maximum Under review as a conference paper at ICLR 2022 model utility through the collaboration with other members within C ( without collaboration with other members outside C ) , then we call C a coalition . I4 < latexit sha1_base64= '' Xwl+BCUvBvIgMA7IdpW3uxrkcDU= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hlpKk0zqYF5OJUko3/oBb/TLxD/QvvDOmoBbRCUnOnHvPmbn3eknAU2lZrwVjbn5hcam4XFpZXVvfKG9uNdM4Ez5z/DiIRdtzUxbwiDmSy4C1E8Hc0AtYy7s9VfHWHRMpj6MrOUpYN3SHER9w35VEOee9cW3SK1esqqWXOQvsHFSQr0ZcfsE1+ojhI0MIhgiScAAXKT0d2LCQENfFmDhBiOs4wwQl0maUxSjDJfaWvkPadXI2or3yTLXap1MCegUpTeyRJqY8QVidZup4pp0V+5v3WHuqu43o7+VeIbESN8T+pZtm/lenapEY4FjXwKmmRDOqOj93yXRX1M3NL1VJckiIU7hPcUHY18ppn02tSXXtqreujr/pTMWqvZ/nZnhXt6QB2z/HOQuaB1W7Vj28rFXqJ/moi9jBLvZpnkeo4wwNOOTN8YgnPBsXRmLcG6PPVKOQa7bxbRkPH0LnkQk= < /latexit > I5 < latexit sha1_base64= '' KKOEGmeLJ8PCjcxMDMM1BdYiV28= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Iq2B6JLoRl1hYoEECWmHASeUtmmnGkLY+ANu9cuMf6B/4Z2xJCoxOk3bM+fec2buvV7ki0Ra1mvOWFhcWl7JrxbW1jc2t4rbO40kTGPGHRb6Ydzy3IT7IuCOFNLnrSjm7sjzedMbnql4847HiQiDazmOeGfkDgLRF8yVRDkX3Ul12i2WrLKllzkP7AyUkK16WHzBDXoIwZBiBI4AkrAPFwk9bdiwEBHXwYS4mJDQcY4pCqRNKYtThkvskL4D2rUzNqC98ky0mtEpPr0xKU0ckCakvJiwOs3U8VQ7K/Y374n2VHcb09/LvEbEStwS+5dulvlfnapFoo8TXYOgmiLNqOpY5pLqrqibm1+qkuQQEadwj+IxYaaVsz6bWpPo2lVvXR1/05mKVXuW5aZ4V7ekAds/xzkPGkdlu1KuXlVKtdNs1HnsYR+HNM9j1HCOOhzyFnjEE56NSyMy7o3xZ6qRyzS7+LaMhw9FSJEK < /latexit > I6 < latexit sha1_base64= '' dLuWEcCiJIy7Wrla2OQjmor1BOM= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Iq3Bx5LoRl1hYoEECWnLgBNK27RTDSFs/AG3+mXGP9C/8M44JCoxOk3bM+fec2buvV4c8FRY1mvOmJtfWFzKLxdWVtfWN4qbW/U0yhKfOX4UREnTc1MW8JA5gouANeOEuUMvYA1vcCbjjTuWpDwKr8UoZu2h2w95j/uuIMq56IyPJp1iySpbapmzwNagBL1qUfEFN+gigo8MQzCEEIQDuEjpacGGhZi4NsbEJYS4ijNMUCBtRlmMMlxiB/Tt066l2ZD20jNVap9OCehNSGlijzQR5SWE5WmmimfKWbK/eY+Vp7zbiP6e9hoSK3BL7F+6aeZ/dbIWgR5OVA2caooVI6vztUumuiJvbn6pSpBDTJzEXYonhH2lnPbZVJpU1S5766r4m8qUrNz7OjfDu7wlDdj+Oc5ZUD8o25Xy4VWlVD3Vo85jB7vYp3keo4pz1OCQN8cjnvBsXBqxcW+MPlONnNZs49syHj4AR6mRCw== < /latexit > I1 < latexit sha1_base64= '' ZroCL0JJbplYYxKF0TuIbB7Z7xk= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF5OJUko3/oBb/TLxD/QvvDNGUIvohCRnzr3nzNx7vSTgqbSsl4IxMzs3v1BcLC0tr6yuldc3mmmcCZ85fhzEou25KQt4xBzJZcDaiWBu6AWs5Q2PVbx1y0TK4+hCjhLWDd1BxPvcdyVRzunV2J5clytW1dLLnAZ2DirIVyMuP+MSPcTwkSEEQwRJOICLlJ4ObFhIiOtiTJwgxHWcYYISaTPKYpThEjuk74B2nZyNaK88U6326ZSAXkFKEzukiSlPEFanmTqeaWfF/uY91p7qbiP6e7lXSKzEDbF/6T4z/6tTtUj0cahr4FRTohlVnZ+7ZLor6ubml6okOSTEKdyjuCDsa+Vnn02tSXXtqreujr/qTMWqvZ/nZnhTt6QB2z/HOQ2ae1W7Vt0/r1XqR/moi9jCNnZpngeo4wQNOOTN8YBHPBlnRmLcGaOPVKOQazbxbRn37zlhkQU= < /latexit > I2 < latexit sha1_base64= '' 2++cL5TEXumvU+oahUsTVndZR8E= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Ii3B6JLoRl1hYoEE0bTDgBNK27RTDSFs/AG3+mXGP9C/8M5YEpUYnabtmXPvOTP3Xi/yRSIt6zVnzM0vLC7llwsrq2vrG8XNrUYSpjHjDgv9MG55bsJ9EXBHCunzVhRzd+j5vOkNTlS8ecfjRITBpRxFvDN0+4HoCeZKopyz63FlclMsWWVLL3MW2BkoIVv1sPiCK3QRgiHFEBwBJGEfLhJ62rBhISKugzFxMSGh4xwTFEibUhanDJfYAX37tGtnbEB75ZloNaNTfHpjUprYI01IeTFhdZqp46l2Vuxv3mPtqe42or+XeQ2Jlbgl9i/dNPO/OlWLRA9HugZBNUWaUdWxzCXVXVE3N79UJckhIk7hLsVjwkwrp302tSbRtaveujr+pjMVq/Ysy03xrm5JA7Z/jnMWNCplu1o+uKiWasfZqPPYwS72aZ6HqOEUdTjkLfCIJzwb50Zk3Bujz1Qjl2m28W0ZDx87wpEG < /latexit > I3 < latexit sha1_base64= '' G06mXSCW+K11xSPKJ+cv3bGQhME= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IkUxuiS6UVeYWCBBNO0w4IS+0k41hLDxB9zqlxn/QP/CO2NJVGJ0mrZnzr3nzNx73cgTibSs15wxMzs3v5BfLCwtr6yuFdc3GkmYxozbLPTCuOU6CfdEwG0ppMdbUcwd3/V40x2cqHjzjseJCINLOYx4x3f6gegJ5kii7LPr0f74pliyypZe5jSoZKCEbNXD4guu0EUIhhQ+OAJIwh4cJPS0UYGFiLgORsTFhISOc4xRIG1KWZwyHGIH9O3Trp2xAe2VZ6LVjE7x6I1JaWKHNCHlxYTVaaaOp9pZsb95j7SnutuQ/m7m5RMrcUvsX7pJ5n91qhaJHo50DYJqijSjqmOZS6q7om5ufqlKkkNEnMJdiseEmVZO+mxqTaJrV711dPxNZypW7VmWm+Jd3ZIGXPk5zmnQ2CtXquWDi2qpdpyNOo8tbGOX5nmIGk5Rh03eAo94wrNxbkTGvTH8TDVymWYT35bx8AE+I5EH < /latexit > achieve its best performance without collaborating with the clients in C . | This paper considers the problem of federated learning where different clients/entities share their datasets with other clients in order to obtain a model that performs best for the local loss functions. Standard federated learning setting usually share all datasets together to obtain a central model and might not be the best choice for each client separately. The authors propose a notion of collaboration equilibrium where each client shares data with a subset of all the available clients. In particular, a coalition of agents belong to a collaboration equilibrium if each agent gets maximum benefit by collaborating with all the agents in the subset, and the subset is maximal. In order to obtain such a collaboration equilibrium the authors propose an iterative algorithm which under certain assumptions, is equivalent to finding strongly connected components in the graph. Finding the collaboration equilibrium requires identifying the benefit graph among the client. Under a very specific model of agents' utility functions, a pareto optimization based algorithm is proposed to find the graph. Finally, though experiments, the authors show that finding collaboration equilibrium does provide improvement compared to standard federated learning based methods. | SP:335056ba170ddfee03904d618a9136e9aae1dcae |
Learning to Collaborate | 1 INTRODUCTION . Effective learning of machine learning models over a collaborative network of data clients has drawn considerable interest in recent years . Frequently , due to privacy concerns , we can not simultaneously access the raw data residing on different clients . Therefore , distributed ( Li et al. , 2014 ) or federated learning ( McMahan et al. , 2017 ) strategies have been proposed , where typically model parameters are updated locally at each client with its own data and the parameter updates , such as gradients , are transmitted out and communicate with other clients . During this process , it is usually assumed that the participation in the network comes at no cost , i.e. , every client is willing to participate in the collaboration . However , this is not always true in reality . One example is the clinical research network ( CRN ) involving multiple hospitals ( Fleurence et al. , 2014 ) . Each hospital has its own patient population . The patient data are sensitive and can not be shared with other hospitals . If we want to build a risk prediction model with the patient data within this network in a privacy-preserving way , the expectation from each hospital is that a better model can be obtained through participating in the CRN compared to the one built from its own data collected from various clinical practice with big efforts . In this scenario , there has been a prior study showing that the model performance can decrease when collaborating with hospitals with very distinct patient populations due to negative transfer induced by sample distribution discrepancies ( Wang et al. , 2019 ; Pan & Yang , 2009 ) . With these considerations , in this paper , we propose a novel learning to collaborate framework . We allow the participating clients in a large collaborative network to form non-overlapping collaboration coalitions . Each coalition includes a subset of clients such that the collaboration among them can benefit their respective model performance . We aim at identifying the collaboration coalitions that can lead to a collaboration equilibrium , i.e. , there are no other coalition settings that any of the individual clients can benefit more ( i.e. , achieve better model performance ) . To obtain the coalitions that can lead to a collaboration equilibrium , we propose a Pareto optimization framework to identify the necessary collaborators for each client in the network to achieve its maximum utility . In particular , we optimize a local model associated with a specific client on the Under review as a conference paper at ICLR 2022 < latexit sha1_base64= '' ZroCL0JJbplYYxKF0TuIbB7Z7xk= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF5OJUko3/oBb/TLxD/QvvDNGUIvohCRnzr3nzNx7vSTgqbSsl4IxMzs3v1BcLC0tr6yuldc3mmmcCZ85fhzEou25KQt4xBzJZcDaiWBu6AWs5Q2PVbx1y0TK4+hCjhLWDd1BxPvcdyVRzunV2J5clytW1dLLnAZ2DirIVyMuP+MSPcTwkSEEQwRJOICLlJ4ObFhIiOtiTJwgxHWcYYISaTPKYpThEjuk74B2nZyNaK88U6326ZSAXkFKEzukiSlPEFanmTqeaWfF/uY91p7qbiP6e7lXSKzEDbF/6T4z/6tTtUj0cahr4FRTohlVnZ+7ZLor6ubml6okOSTEKdyjuCDsa+Vnn02tSXXtqreujr/qTMWqvZ/nZnhTt6QB2z/HOQ2ae1W7Vt0/r1XqR/moi9jCNnZpngeo4wQNOOTN8YBHPBlnRmLcGaOPVKOQazbxbRn37zlhkQU= < /latexit > < latexit sha1_base64= '' 2++cL5TEXumvU+oahUsTVndZR8E= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Ii3B6JLoRl1hYoEE0bTDgBNK27RTDSFs/AG3+mXGP9C/8M5YEpUYnabtmXPvOTP3Xi/yRSIt6zVnzM0vLC7llwsrq2vrG8XNrUYSpjHjDgv9MG55bsJ9EXBHCunzVhRzd+j5vOkNTlS8ecfjRITBpRxFvDN0+4HoCeZKopyz63FlclMsWWVLL3MW2BkoIVv1sPiCK3QRgiHFEBwBJGEfLhJ62rBhISKugzFxMSGh4xwTFEibUhanDJfYAX37tGtnbEB75ZloNaNTfHpjUprYI01IeTFhdZqp46l2Vuxv3mPtqe42or+XeQ2Jlbgl9i/dNPO/OlWLRA9HugZBNUWaUdWxzCXVXVE3N79UJckhIk7hLsVjwkwrp302tSbRtaveujr+pjMVq/Ysy03xrm5JA7Z/jnMWNCplu1o+uKiWasfZqPPYwS72aZ6HqOEUdTjkLfCIJzwb50Zk3Bujz1Qjl2m28W0ZDx87wpEG < /latexit > < latexit sha1_base64= '' G06mXSCW+K11xSPKJ+cv3bGQhME= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IkUxuiS6UVeYWCBBNO0w4IS+0k41hLDxB9zqlxn/QP/CO2NJVGJ0mrZnzr3nzNx73cgTibSs15wxMzs3v5BfLCwtr6yuFdc3GkmYxozbLPTCuOU6CfdEwG0ppMdbUcwd3/V40x2cqHjzjseJCINLOYx4x3f6gegJ5kii7LPr0f74pliyypZe5jSoZKCEbNXD4guu0EUIhhQ+OAJIwh4cJPS0UYGFiLgORsTFhISOc4xRIG1KWZwyHGIH9O3Trp2xAe2VZ6LVjE7x6I1JaWKHNCHlxYTVaaaOp9pZsb95j7SnutuQ/m7m5RMrcUvsX7pJ5n91qhaJHo50DYJqijSjqmOZS6q7om5ufqlKkkNEnMJdiseEmVZO+mxqTaJrV711dPxNZypW7VmWm+Jd3ZIGXPk5zmnQ2CtXquWDi2qpdpyNOo8tbGOX5nmIGk5Rh03eAo94wrNxbkTGvTH8TDVymWYT35bx8AE+I5EH < /latexit > < latexit sha1_base64= '' 078TlPinZnbp3G8YDOaCG04E8G4= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF8lEKaUbf8Ctfpn4B/oX3hlHUIvohCRnzr3nzNx7vSTgmbCsl4IxMzs3v1BcLC0tr6yuldc3mlmcpz5z/DiI07bnZizgEXMEFwFrJylzQy9gLW94LOOtW5ZmPI4uxChh3dAdRLzPfVcQ5ZxejWuT63LFqlpqmdPA1qACvRpx+RmX6CGGjxwhGCIIwgFcZPR0YMNCQlwXY+JSQlzFGSYokTanLEYZLrFD+g5o19FsRHvpmSm1T6cE9KakNLFDmpjyUsLyNFPFc+Us2d+8x8pT3m1Ef097hcQK3BD7l+4z8786WYtAH4eqBk41JYqR1fnaJVddkTc3v1QlyCEhTuIexVPCvlJ+9tlUmkzVLnvrqvirypSs3Ps6N8ebvCUN2P45zmnQ3Kvater+ea1SP9KjLmIL29ileR6gjhM04JA3xwMe8WScGYlxZ4w+Uo2C1mzi2zLu3wFAhJEI < /latexit > < latexit sha1_base64= '' rxH3eGL3jlLzhYJGRaokrVTVvjc= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsVAdEl0o64wsUCCaNoy4IS+Mp1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3urHPE2lZrzljbn5hcSm/XFhZXVvfKG5uNZMoFR6zvciPRNt1EubzkNmSS5+1Y8GcwPVZyx2eqHjrjomER+GlHMWsGziDkPe550ii7LPrcW1yUyxZZUsvcxZUMlBCthpR8QVX6CGChxQBGEJIwj4cJPR0UIGFmLguxsQJQlzHGSYokDalLEYZDrFD+g5o18nYkPbKM9Fqj07x6RWkNLFHmojyBGF1mqnjqXZW7G/eY+2p7jaiv5t5BcRK3BL7l26a+V+dqkWijyNdA6eaYs2o6rzMJdVdUTc3v1QlySEmTuEexQVhTyunfTa1JtG1q946Ov6mMxWr9l6Wm+Jd3ZIGXPk5zlnQPChXquXaRbVUP85GnccOdrFP8zxEHadowCZvjkc84dk4N2Lj3hh9phq5TLONb8t4+ABC5ZEJ < /latexit > < latexit sha1_base64= '' rX31m9pL4TDFitzg9FObuhvEhn0= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsXgY0l0o64wsUCCaNphwAl9pZ1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3upEnEmlZrzljZnZufiG/WFhaXlldK65vNJIwjRm3WeiFcct1Eu6JgNtSSI+3opg7vuvxpjs4UfHmHY8TEQaXchjxju/0A9ETzJFE2WfXo4PxTbFklS29zGlQyUAJ2aqHxRdcoYsQDCl8cASQhD04SOhpowILEXEdjIiLCQkd5xijQNqUsjhlOMQO6NunXTtjA9orz0SrGZ3i0RuT0sQOaULKiwmr00wdT7WzYn/zHmlPdbch/d3MyydW4pbYv3STzP/qVC0SPRzpGgTVFGlGVccyl1R3Rd3c/FKVJIeIOIW7FI8JM62c9NnUmkTXrnrr6PibzlSs2rMsN8W7uiUNuPJznNOgsVeuVMv7F9VS7TgbdR5b2MYuzfMQNZyiDpu8BR7xhGfj3IiMe2P4mWrkMs0mvi3j4QNFRpEK < /latexit > < latexit sha1_base64= '' 078TlPinZnbp3G8YDOaCG04E8G4= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF8lEKaUbf8Ctfpn4B/oX3hlHUIvohCRnzr3nzNx7vSTgmbCsl4IxMzs3v1BcLC0tr6yuldc3mlmcpz5z/DiI07bnZizgEXMEFwFrJylzQy9gLW94LOOtW5ZmPI4uxChh3dAdRLzPfVcQ5ZxejWuT63LFqlpqmdPA1qACvRpx+RmX6CGGjxwhGCIIwgFcZPR0YMNCQlwXY+JSQlzFGSYokTanLEYZLrFD+g5o19FsRHvpmSm1T6cE9KakNLFDmpjyUsLyNFPFc+Us2d+8x8pT3m1Ef097hcQK3BD7l+4z8786WYtAH4eqBk41JYqR1fnaJVddkTc3v1QlyCEhTuIexVPCvlJ+9tlUmkzVLnvrqvirypSs3Ps6N8ebvCUN2P45zmnQ3Kvater+ea1SP9KjLmIL29ileR6gjhM04JA3xwMe8WScGYlxZ4w+Uo2C1mzi2zLu3wFAhJEI < /latexit > < latexit sha1_base64= '' rxH3eGL3jlLzhYJGRaokrVTVvjc= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsVAdEl0o64wsUCCaNoy4IS+Mp1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3urHPE2lZrzljbn5hcSm/XFhZXVvfKG5uNZMoFR6zvciPRNt1EubzkNmSS5+1Y8GcwPVZyx2eqHjrjomER+GlHMWsGziDkPe550ii7LPrcW1yUyxZZUsvcxZUMlBCthpR8QVX6CGChxQBGEJIwj4cJPR0UIGFmLguxsQJQlzHGSYokDalLEYZDrFD+g5o18nYkPbKM9Fqj07x6RWkNLFHmojyBGF1mqnjqXZW7G/eY+2p7jaiv5t5BcRK3BL7l26a+V+dqkWijyNdA6eaYs2o6rzMJdVdUTc3v1QlySEmTuEexQVhTyunfTa1JtG1q946Ov6mMxWr9l6Wm+Jd3ZIGXPk5zlnQPChXquXaRbVUP85GnccOdrFP8zxEHadowCZvjkc84dk4N2Lj3hh9phq5TLONb8t4+ABC5ZEJ < /latexit > < latexit sha1_base64= '' rX31m9pL4TDFitzg9FObuhvEhn0= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsXgY0l0o64wsUCCaNphwAl9pZ1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3upEnEmlZrzljZnZufiG/WFhaXlldK65vNJIwjRm3WeiFcct1Eu6JgNtSSI+3opg7vuvxpjs4UfHmHY8TEQaXchjxju/0A9ETzJFE2WfXo4PxTbFklS29zGlQyUAJ2aqHxRdcoYsQDCl8cASQhD04SOhpowILEXEdjIiLCQkd5xijQNqUsjhlOMQO6NunXTtjA9orz0SrGZ3i0RuT0sQOaULKiwmr00wdT7WzYn/zHmlPdbch/d3MyydW4pbYv3STzP/qVC0SPRzpGgTVFGlGVccyl1R3Rd3c/FKVJIeIOIW7FI8JM62c9NnUmkTXrnrr6PibzlSs2rMsN8W7uiUNuPJznNOgsVeuVMv7F9VS7TgbdR5b2MYuzfMQNZyiDpu8BR7xhGfj3IiMe2P4mWrkMs0mvi3j4QNFRpEK < /latexit > < latexit sha1_base64= '' ZroCL0JJbplYYxKF0TuIbB7Z7xk= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF5OJUko3/oBb/TLxD/QvvDNGUIvohCRnzr3nzNx7vSTgqbSsl4IxMzs3v1BcLC0tr6yuldc3mmmcCZ85fhzEou25KQt4xBzJZcDaiWBu6AWs5Q2PVbx1y0TK4+hCjhLWDd1BxPvcdyVRzunV2J5clytW1dLLnAZ2DirIVyMuP+MSPcTwkSEEQwRJOICLlJ4ObFhIiOtiTJwgxHWcYYISaTPKYpThEjuk74B2nZyNaK88U6326ZSAXkFKEzukiSlPEFanmTqeaWfF/uY91p7qbiP6e7lXSKzEDbF/6T4z/6tTtUj0cahr4FRTohlVnZ+7ZLor6ubml6okOSTEKdyjuCDsa+Vnn02tSXXtqreujr/qTMWqvZ/nZnhTt6QB2z/HOQ2ae1W7Vt0/r1XqR/moi9jCNnZpngeo4wQNOOTN8YBHPBlnRmLcGaOPVKOQazbxbRn37zlhkQU= < /latexit > < latexit sha1_base64= '' 2++cL5TEXumvU+oahUsTVndZR8E= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Ii3B6JLoRl1hYoEE0bTDgBNK27RTDSFs/AG3+mXGP9C/8M5YEpUYnabtmXPvOTP3Xi/yRSIt6zVnzM0vLC7llwsrq2vrG8XNrUYSpjHjDgv9MG55bsJ9EXBHCunzVhRzd+j5vOkNTlS8ecfjRITBpRxFvDN0+4HoCeZKopyz63FlclMsWWVLL3MW2BkoIVv1sPiCK3QRgiHFEBwBJGEfLhJ62rBhISKugzFxMSGh4xwTFEibUhanDJfYAX37tGtnbEB75ZloNaNTfHpjUprYI01IeTFhdZqp46l2Vuxv3mPtqe42or+XeQ2Jlbgl9i/dNPO/OlWLRA9HugZBNUWaUdWxzCXVXVE3N79UJckhIk7hLsVjwkwrp302tSbRtaveujr+pjMVq/Ysy03xrm5JA7Z/jnMWNCplu1o+uKiWasfZqPPYwS72aZ6HqOEUdTjkLfCIJzwb50Zk3Bujz1Qjl2m28W0ZDx87wpEG < /latexit > < latexit sha1_base64= '' G06mXSCW+K11xSPKJ+cv3bGQhME= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IkUxuiS6UVeYWCBBNO0w4IS+0k41hLDxB9zqlxn/QP/CO2NJVGJ0mrZnzr3nzNx73cgTibSs15wxMzs3v5BfLCwtr6yuFdc3GkmYxozbLPTCuOU6CfdEwG0ppMdbUcwd3/V40x2cqHjzjseJCINLOYx4x3f6gegJ5kii7LPr0f74pliyypZe5jSoZKCEbNXD4guu0EUIhhQ+OAJIwh4cJPS0UYGFiLgORsTFhISOc4xRIG1KWZwyHGIH9O3Trp2xAe2VZ6LVjE7x6I1JaWKHNCHlxYTVaaaOp9pZsb95j7SnutuQ/m7m5RMrcUvsX7pJ5n91qhaJHo50DYJqijSjqmOZS6q7om5ufqlKkkNEnMJdiseEmVZO+mxqTaJrV711dPxNZypW7VmWm+Jd3ZIGXPk5zmnQ2CtXquWDi2qpdpyNOo8tbGOX5nmIGk5Rh03eAo94wrNxbkTGvTH8TDVymWYT35bx8AE+I5EH < /latexit > < latexit sha1_base64= '' ZroCL0JJbplYYxKF0TuIbB7Z7xk= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF5OJUko3/oBb/TLxD/QvvDNGUIvohCRnzr3nzNx7vSTgqbSsl4IxMzs3v1BcLC0tr6yuldc3mmmcCZ85fhzEou25KQt4xBzJZcDaiWBu6AWs5Q2PVbx1y0TK4+hCjhLWDd1BxPvcdyVRzunV2J5clytW1dLLnAZ2DirIVyMuP+MSPcTwkSEEQwRJOICLlJ4ObFhIiOtiTJwgxHWcYYISaTPKYpThEjuk74B2nZyNaK88U6326ZSAXkFKEzukiSlPEFanmTqeaWfF/uY91p7qbiP6e7lXSKzEDbF/6T4z/6tTtUj0cahr4FRTohlVnZ+7ZLor6ubml6okOSTEKdyjuCDsa+Vnn02tSXXtqreujr/qTMWqvZ/nZnhTt6QB2z/HOQ2ae1W7Vt0/r1XqR/moi9jCNnZpngeo4wQNOOTN8YBHPBlnRmLcGaOPVKOQazbxbRn37zlhkQU= < /latexit > < latexit sha1_base64= '' 2++cL5TEXumvU+oahUsTVndZR8E= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Ii3B6JLoRl1hYoEE0bTDgBNK27RTDSFs/AG3+mXGP9C/8M5YEpUYnabtmXPvOTP3Xi/yRSIt6zVnzM0vLC7llwsrq2vrG8XNrUYSpjHjDgv9MG55bsJ9EXBHCunzVhRzd+j5vOkNTlS8ecfjRITBpRxFvDN0+4HoCeZKopyz63FlclMsWWVLL3MW2BkoIVv1sPiCK3QRgiHFEBwBJGEfLhJ62rBhISKugzFxMSGh4xwTFEibUhanDJfYAX37tGtnbEB75ZloNaNTfHpjUprYI01IeTFhdZqp46l2Vuxv3mPtqe42or+XeQ2Jlbgl9i/dNPO/OlWLRA9HugZBNUWaUdWxzCXVXVE3N79UJckhIk7hLsVjwkwrp302tSbRtaveujr+pjMVq/Ysy03xrm5JA7Z/jnMWNCplu1o+uKiWasfZqPPYwS72aZ6HqOEUdTjkLfCIJzwb50Zk3Bujz1Qjl2m28W0ZDx87wpEG < /latexit > < latexit sha1_base64= '' G06mXSCW+K11xSPKJ+cv3bGQhME= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IkUxuiS6UVeYWCBBNO0w4IS+0k41hLDxB9zqlxn/QP/CO2NJVGJ0mrZnzr3nzNx73cgTibSs15wxMzs3v5BfLCwtr6yuFdc3GkmYxozbLPTCuOU6CfdEwG0ppMdbUcwd3/V40x2cqHjzjseJCINLOYx4x3f6gegJ5kii7LPr0f74pliyypZe5jSoZKCEbNXD4guu0EUIhhQ+OAJIwh4cJPS0UYGFiLgORsTFhISOc4xRIG1KWZwyHGIH9O3Trp2xAe2VZ6LVjE7x6I1JaWKHNCHlxYTVaaaOp9pZsb95j7SnutuQ/m7m5RMrcUvsX7pJ5n91qhaJHo50DYJqijSjqmOZS6q7om5ufqlKkkNEnMJdiseEmVZO+mxqTaJrV711dPxNZypW7VmWm+Jd3ZIGXPk5zmnQ2CtXquWDi2qpdpyNOo8tbGOX5nmIGk5Rh03eAo94wrNxbkTGvTH8TDVymWYT35bx8AE+I5EH < /latexit > < latexit sha1_base64= '' 078TlPinZnbp3G8YDOaCG04E8G4= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF8lEKaUbf8Ctfpn4B/oX3hlHUIvohCRnzr3nzNx7vSTgmbCsl4IxMzs3v1BcLC0tr6yuldc3mlmcpz5z/DiI07bnZizgEXMEFwFrJylzQy9gLW94LOOtW5ZmPI4uxChh3dAdRLzPfVcQ5ZxejWuT63LFqlpqmdPA1qACvRpx+RmX6CGGjxwhGCIIwgFcZPR0YMNCQlwXY+JSQlzFGSYokTanLEYZLrFD+g5o19FsRHvpmSm1T6cE9KakNLFDmpjyUsLyNFPFc+Us2d+8x8pT3m1Ef097hcQK3BD7l+4z8786WYtAH4eqBk41JYqR1fnaJVddkTc3v1QlyCEhTuIexVPCvlJ+9tlUmkzVLnvrqvirypSs3Ps6N8ebvCUN2P45zmnQ3Kvater+ea1SP9KjLmIL29ileR6gjhM04JA3xwMe8WScGYlxZ4w+Uo2C1mzi2zLu3wFAhJEI < /latexit > < latexit sha1_base64= '' rxH3eGL3jlLzhYJGRaokrVTVvjc= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsVAdEl0o64wsUCCaNoy4IS+Mp1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3urHPE2lZrzljbn5hcSm/XFhZXVvfKG5uNZMoFR6zvciPRNt1EubzkNmSS5+1Y8GcwPVZyx2eqHjrjomER+GlHMWsGziDkPe550ii7LPrcW1yUyxZZUsvcxZUMlBCthpR8QVX6CGChxQBGEJIwj4cJPR0UIGFmLguxsQJQlzHGSYokDalLEYZDrFD+g5o18nYkPbKM9Fqj07x6RWkNLFHmojyBGF1mqnjqXZW7G/eY+2p7jaiv5t5BcRK3BL7l26a+V+dqkWijyNdA6eaYs2o6rzMJdVdUTc3v1QlySEmTuEexQVhTyunfTa1JtG1q946Ov6mMxWr9l6Wm+Jd3ZIGXPk5zlnQPChXquXaRbVUP85GnccOdrFP8zxEHadowCZvjkc84dk4N2Lj3hh9phq5TLONb8t4+ABC5ZEJ < /latexit > < latexit sha1_base64= '' rX31m9pL4TDFitzg9FObuhvEhn0= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsXgY0l0o64wsUCCaNphwAl9pZ1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3upEnEmlZrzljZnZufiG/WFhaXlldK65vNJIwjRm3WeiFcct1Eu6JgNtSSI+3opg7vuvxpjs4UfHmHY8TEQaXchjxju/0A9ETzJFE2WfXo4PxTbFklS29zGlQyUAJ2aqHxRdcoYsQDCl8cASQhD04SOhpowILEXEdjIiLCQkd5xijQNqUsjhlOMQO6NunXTtjA9orz0SrGZ3i0RuT0sQOaULKiwmr00wdT7WzYn/zHmlPdbch/d3MyydW4pbYv3STzP/qVC0SPRzpGgTVFGlGVccyl1R3Rd3c/FKVJIeIOIW7FI8JM62c9NnUmkTXrnrr6PibzlSs2rMsN8W7uiUNuPJznNOgsVeuVMv7F9VS7TgbdR5b2MYuzfMQNZyiDpu8BR7xhGfj3IiMe2P4mWrkMs0mvi3j4QNFRpEK < /latexit > < latexit sha1_base64= '' 078TlPinZnbp3G8YDOaCG04E8G4= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF8lEKaUbf8Ctfpn4B/oX3hlHUIvohCRnzr3nzNx7vSTgmbCsl4IxMzs3v1BcLC0tr6yuldc3mlmcpz5z/DiI07bnZizgEXMEFwFrJylzQy9gLW94LOOtW5ZmPI4uxChh3dAdRLzPfVcQ5ZxejWuT63LFqlpqmdPA1qACvRpx+RmX6CGGjxwhGCIIwgFcZPR0YMNCQlwXY+JSQlzFGSYokTanLEYZLrFD+g5o19FsRHvpmSm1T6cE9KakNLFDmpjyUsLyNFPFc+Us2d+8x8pT3m1Ef097hcQK3BD7l+4z8786WYtAH4eqBk41JYqR1fnaJVddkTc3v1QlyCEhTuIexVPCvlJ+9tlUmkzVLnvrqvirypSs3Ps6N8ebvCUN2P45zmnQ3Kvater+ea1SP9KjLmIL29ileR6gjhM04JA3xwMe8WScGYlxZ4w+Uo2C1mzi2zLu3wFAhJEI < /latexit > < latexit sha1_base64= '' rxH3eGL3jlLzhYJGRaokrVTVvjc= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsVAdEl0o64wsUCCaNoy4IS+Mp1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3urHPE2lZrzljbn5hcSm/XFhZXVvfKG5uNZMoFR6zvciPRNt1EubzkNmSS5+1Y8GcwPVZyx2eqHjrjomER+GlHMWsGziDkPe550ii7LPrcW1yUyxZZUsvcxZUMlBCthpR8QVX6CGChxQBGEJIwj4cJPR0UIGFmLguxsQJQlzHGSYokDalLEYZDrFD+g5o18nYkPbKM9Fqj07x6RWkNLFHmojyBGF1mqnjqXZW7G/eY+2p7jaiv5t5BcRK3BL7l26a+V+dqkWijyNdA6eaYs2o6rzMJdVdUTc3v1QlySEmTuEexQVhTyunfTa1JtG1q946Ov6mMxWr9l6Wm+Jd3ZIGXPk5zlnQPChXquXaRbVUP85GnccOdrFP8zxEHadowCZvjkc84dk4N2Lj3hh9phq5TLONb8t4+ABC5ZEJ < /latexit > < latexit sha1_base64= '' rX31m9pL4TDFitzg9FObuhvEhn0= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsXgY0l0o64wsUCCaNphwAl9pZ1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3upEnEmlZrzljZnZufiG/WFhaXlldK65vNJIwjRm3WeiFcct1Eu6JgNtSSI+3opg7vuvxpjs4UfHmHY8TEQaXchjxju/0A9ETzJFE2WfXo4PxTbFklS29zGlQyUAJ2aqHxRdcoYsQDCl8cASQhD04SOhpowILEXEdjIiLCQkd5xijQNqUsjhlOMQO6NunXTtjA9orz0SrGZ3i0RuT0sQOaULKiwmr00wdT7WzYn/zHmlPdbch/d3MyydW4pbYv3STzP/qVC0SPRzpGgTVFGlGVccyl1R3Rd3c/FKVJIeIOIW7FI8JM62c9NnUmkTXrnrr6PibzlSs2rMsN8W7uiUNuPJznNOgsVeuVMv7F9VS7TgbdR5b2MYuzfMQNZyiDpu8BR7xhGfj3IiMe2P4mWrkMs0mvi3j4QNFRpEK < /latexit > < latexit sha1_base64= '' ZroCL0JJbplYYxKF0TuIbB7Z7xk= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF5OJUko3/oBb/TLxD/QvvDNGUIvohCRnzr3nzNx7vSTgqbSsl4IxMzs3v1BcLC0tr6yuldc3mmmcCZ85fhzEou25KQt4xBzJZcDaiWBu6AWs5Q2PVbx1y0TK4+hCjhLWDd1BxPvcdyVRzunV2J5clytW1dLLnAZ2DirIVyMuP+MSPcTwkSEEQwRJOICLlJ4ObFhIiOtiTJwgxHWcYYISaTPKYpThEjuk74B2nZyNaK88U6326ZSAXkFKEzukiSlPEFanmTqeaWfF/uY91p7qbiP6e7lXSKzEDbF/6T4z/6tTtUj0cahr4FRTohlVnZ+7ZLor6ubml6okOSTEKdyjuCDsa+Vnn02tSXXtqreujr/qTMWqvZ/nZnhTt6QB2z/HOQ2ae1W7Vt0/r1XqR/moi9jCNnZpngeo4wQNOOTN8YBHPBlnRmLcGaOPVKOQazbxbRn37zlhkQU= < /latexit > < latexit sha1_base64= '' 2++cL5TEXumvU+oahUsTVndZR8E= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Ii3B6JLoRl1hYoEE0bTDgBNK27RTDSFs/AG3+mXGP9C/8M5YEpUYnabtmXPvOTP3Xi/yRSIt6zVnzM0vLC7llwsrq2vrG8XNrUYSpjHjDgv9MG55bsJ9EXBHCunzVhRzd+j5vOkNTlS8ecfjRITBpRxFvDN0+4HoCeZKopyz63FlclMsWWVLL3MW2BkoIVv1sPiCK3QRgiHFEBwBJGEfLhJ62rBhISKugzFxMSGh4xwTFEibUhanDJfYAX37tGtnbEB75ZloNaNTfHpjUprYI01IeTFhdZqp46l2Vuxv3mPtqe42or+XeQ2Jlbgl9i/dNPO/OlWLRA9HugZBNUWaUdWxzCXVXVE3N79UJckhIk7hLsVjwkwrp302tSbRtaveujr+pjMVq/Ysy03xrm5JA7Z/jnMWNCplu1o+uKiWasfZqPPYwS72aZ6HqOEUdTjkLfCIJzwb50Zk3Bujz1Qjl2m28W0ZDx87wpEG < /latexit > < latexit sha1_base64= '' G06mXSCW+K11xSPKJ+cv3bGQhME= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IkUxuiS6UVeYWCBBNO0w4IS+0k41hLDxB9zqlxn/QP/CO2NJVGJ0mrZnzr3nzNx73cgTibSs15wxMzs3v5BfLCwtr6yuFdc3GkmYxozbLPTCuOU6CfdEwG0ppMdbUcwd3/V40x2cqHjzjseJCINLOYx4x3f6gegJ5kii7LPr0f74pliyypZe5jSoZKCEbNXD4guu0EUIhhQ+OAJIwh4cJPS0UYGFiLgORsTFhISOc4xRIG1KWZwyHGIH9O3Trp2xAe2VZ6LVjE7x6I1JaWKHNCHlxYTVaaaOp9pZsb95j7SnutuQ/m7m5RMrcUvsX7pJ5n91qhaJHo50DYJqijSjqmOZS6q7om5ufqlKkkNEnMJdiseEmVZO+mxqTaJrV711dPxNZypW7VmWm+Jd3ZIGXPk5zmnQ2CtXquWDi2qpdpyNOo8tbGOX5nmIGk5Rh03eAo94wrNxbkTGvTH8TDVymWYT35bx8AE+I5EH < /latexit > Pareto front of the learning objectives of all clients . Through the analysis of the geometric location of such an optimal model on the Pareto front , we can identify the necessary collaborators of each client . The relationships between each client and its necessary collaborators can be encoded in a benefit graph , in which each node denotes a client and the edge from Ij to Ii represents Ij is one of the necessary collaborators for Ii , as exemplified in Figure 1 ( a ) . Then we can derive the coalitions corresponding to the collaboration equilibrium through an iterative process introduced as follows . Specifically , we define a stable coalition as the minimum set such that its all involved clients can achieve its maximal utility . From the perspective of graph theory , these stable coalitions are actually the strongly connected components of the benefit graph . For example , C = { I1 , I2 , I3 } in Figure 1 ( b ) is a stable coalition as all clients can achieve their best performance by collaborating with the clients in C ( compared with collaborating with other clients in the network ) . By removing the stable coalitions and re-building the benefit graph of the remaining client iteratively as shown in Figure 1 ( b ) and ( c ) , we can identify all coalitions as in Figure 1 ( d ) and prove that the obtained coalitions can lead to a collaboration equilibrium . We empirically evaluate our method on synthetic data , UCI adult ( Kohavi , 1996 ) , a classical FL benchmark data set CIFAR10 ( Krizhevsky et al. , 2009 ) , and a real-world electronic health record ( EHR ) data repository eICU ( Pollard et al. , 2018 ) , which includes patient EHR data in ICU from multiple hospitals . The results show our method significantly outperforms existing relevant methods . The experiments on eICU data demonstrate that our algorithm is able to derive a good collaboration strategy for the hospitals to collaborate . 2 RELATED WORK . 2.1 FEDERATED LEARNING . Federated learning ( FL ) ( McMahan et al. , 2017 ) refers to the paradigm of learning from fragmented data without sacrificing privacy . In a typical FL setting , a global model is learned from the data residing in multiple distinct local clients . However , a single global model may lead to performance degradation on certain clients due to data heterogeneity . Personalized federated learning ( PFL ) ( Kulkarni et al. , 2020 ) , which aims at learning a customized model for each client in the federation , has been proposed to tackle this challenge . For example , Zhang et al . ( 2020 ) proposes to adjust the weight of the objectives corresponding to all clients dynamically ; Fallah et al . ( 2020 ) proposes a meta-learning based method for achieving an effectively shared initialization of all local models followed by a fine-tuning procedure ; Shamsian et al . ( 2021 ) proposes to learn a central hypernetwork which can generate a set of customized models for each client . FL assumes all clients are willing to participate in the collaboration and existing methods have not considered whether the collaboration can really benefit each client or not . Without benefit , a local client could be reluctant to participate in the collaboration , which is a realistic scenario we investigate in this paper . One specific FL setup that is relevant to our work is clustered federated learning ( Sattler et al. , 2020 ; Mansour et al. , 2020 ) , which groups the clients with similar data distributions and trains a model for each client group . The scenario we are considering in this paper is to form collaboration coalitions based on the performance gain each client can get for its corresponding model , rather than sample distribution similarities . 2.2 MULTI-TASK LEARNING AND NEGATIVE TRANSFER . Multi-task learning ( Caruana , 1997 ) ( MTL ) aims at learning shared knowledge across multiple interrelated tasks for mutual benefits . Typical examples include hard model parameter sharing ( Kokkinos , 2017 ) , soft parameter sharing ( Lu et al. , 2017 ) , and neural architecture search ( NAS ) for a shared Under review as a conference paper at ICLR 2022 model architecture ( Real et al. , 2019 ) . However , sharing representations of model structures can not guarantee model performance gain due to the existence of negative transfer , while we directly consider forming collaboration coalitions according to individual model performance benefits . In addition , MTL usually assumes the data from all tasks are accessible , while our goal is to learn a personalized model for each client through collaborating with other clients without directly accessing their raw data . It is worth mentioning that there are also clustered MTL approaches ( Standley et al. , 2020 ; Zamir et al. , 2018 ) which assume the models for the tasks within the same group are similar to each other , while we want the clients within each coalition can benefit each other through collaboration when learning their respective models . Some works extend MTL to a multi-source domain adaptation ( Wen et al. , 2020 ; Duan et al. , 2009 ) setting in which unlabeled data exist in some tasks . See detailed discussions in Appendix . 3 COLLABORATION LEARNING PROBLEM . We first introduce the necessary notations and definitions in Section 3.1 , and then define the collaboration equilibrium we aim to achieve in Section 3.2 . 3.1 DEFINITIONS AND NOTATIONS . Suppose there are N clients I = { Ii } N i=1 in a collaborative network and each client is associated with a specific learning task T i based on its own data Di = { Xi , Y i } , i ∈ { 1 , 2 , ... , N } , where the input space Xi and the output space Y i may or may not share across all N clients . Each client pursues collaboration with others to learn a personalized model M i by maximizing its utility ( i.e. , model performance ) without sacrificing data privacy . There is no guarantee that one client can always benefit from the collaboration with others , and the client would be reluctant to participate in the collaboration if there is no benefit . In the following , we describe this through a concrete example . No benefit , no collaboration . Suppose the local data { Di } , i ∈ { 1 , 2 , ... , N } owned by different clients satisfy the following conditions : 1 ) all local data are from the same distribution Di ∼ P ; 2 ) D1 ⊂ D2 ⊂ D3 , ... , ⊂ DN . Since DN contains more data than other clients , IN can not benefit from collaboration with any other clients , so IN will learn a local model using its own data . Once IN refuses to collaboration , IN−1 will also work on its own as IN−1 can only improve its utility by collaborating with IN . IN−2 will learn individually out of the same concerns . Finally , there is no collaboration among any clients . Due to the discrepancies of the sample distributions across different clients , the best local model for a specific client is very likely to come from collaborating with a subset of clients rather than all of them . Suppose U ( Ii , C ) denotes the model utility of client Ii when collaborating with the clients in client set C. In the following , we define Umax ( Ii , C ) as the maximum model utility that Ii can achieve when collaborating with different subsets of C. Definition 1 ( Maximum Achievable Utility ( MAU ) ) . This is the maximum model utility for a specific client Ii to collaborate with different subsets of client set C : Umax ( Ii , C ) = maxC′⊂C U ( Ii , C ′ ) . From Definition 1 , MAU satisfies Umax ( Ii , C ′ ) ≤ Umax ( Ii , C ) if C ′ is a subset of C. Each client Ii ∈ I aims to identify its “ optimal set '' of collaborators from I to maximize its local utility , which is defined as follows . Definition 2 ( Optimal Collaborator Set ( OCS ) ) . A client set CoptI ( I i ) ⊂ I is an optimal collaborator set for Ii if and only if CoptI ( I i ) satisfies ∀C ⊂ I , U ( Ii , CoptI ( Ii ) ) ≥ U ( Ii , C ) ; ( 1a ) ∀C ′ & CoptI ( Ii ) , U ( Ii , C opt I ( I i ) ) > U ( Ii , C ′ ) . ( 1b ) Eq . ( 1a ) means that Ii can achieve its maximal utility when collaborating with CoptI ( I i ) and Eq . ( 1b ) means that all clients in CoptI ( I i ) are necessary . In this way , the relationships between any client Ii ∈ I and its optimal collaborator set CoptI ( Ii ) can be represented by a graph which is called the benefit graph ( BG ) . Specifically , for a given client set C ⊂ I , we use BG ( C ) to denote its corresponding BG . For the example in Figure 1 ( a ) , an arrow from Ij to Ii means Ij ∈ CoptI ( Ii ) , e.g. , I1 → I3 means I1 ∈ CoptI ( I3 ) . For a client set C , if every member can achieve its maximum Under review as a conference paper at ICLR 2022 model utility through the collaboration with other members within C ( without collaboration with other members outside C ) , then we call C a coalition . I4 < latexit sha1_base64= '' Xwl+BCUvBvIgMA7IdpW3uxrkcDU= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hlpKk0zqYF5OJUko3/oBb/TLxD/QvvDOmoBbRCUnOnHvPmbn3eknAU2lZrwVjbn5hcam4XFpZXVvfKG9uNdM4Ez5z/DiIRdtzUxbwiDmSy4C1E8Hc0AtYy7s9VfHWHRMpj6MrOUpYN3SHER9w35VEOee9cW3SK1esqqWXOQvsHFSQr0ZcfsE1+ojhI0MIhgiScAAXKT0d2LCQENfFmDhBiOs4wwQl0maUxSjDJfaWvkPadXI2or3yTLXap1MCegUpTeyRJqY8QVidZup4pp0V+5v3WHuqu43o7+VeIbESN8T+pZtm/lenapEY4FjXwKmmRDOqOj93yXRX1M3NL1VJckiIU7hPcUHY18ppn02tSXXtqreujr/pTMWqvZ/nZnhXt6QB2z/HOQuaB1W7Vj28rFXqJ/moi9jBLvZpnkeo4wwNOOTN8YgnPBsXRmLcG6PPVKOQa7bxbRkPH0LnkQk= < /latexit > I5 < latexit sha1_base64= '' KKOEGmeLJ8PCjcxMDMM1BdYiV28= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Iq2B6JLoRl1hYoEECWmHASeUtmmnGkLY+ANu9cuMf6B/4Z2xJCoxOk3bM+fec2buvV7ki0Ra1mvOWFhcWl7JrxbW1jc2t4rbO40kTGPGHRb6Ydzy3IT7IuCOFNLnrSjm7sjzedMbnql4847HiQiDazmOeGfkDgLRF8yVRDkX3Ul12i2WrLKllzkP7AyUkK16WHzBDXoIwZBiBI4AkrAPFwk9bdiwEBHXwYS4mJDQcY4pCqRNKYtThkvskL4D2rUzNqC98ky0mtEpPr0xKU0ckCakvJiwOs3U8VQ7K/Y374n2VHcb09/LvEbEStwS+5dulvlfnapFoo8TXYOgmiLNqOpY5pLqrqibm1+qkuQQEadwj+IxYaaVsz6bWpPo2lVvXR1/05mKVXuW5aZ4V7ekAds/xzkPGkdlu1KuXlVKtdNs1HnsYR+HNM9j1HCOOhzyFnjEE56NSyMy7o3xZ6qRyzS7+LaMhw9FSJEK < /latexit > I6 < latexit sha1_base64= '' dLuWEcCiJIy7Wrla2OQjmor1BOM= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Iq3Bx5LoRl1hYoEECWnLgBNK27RTDSFs/AG3+mXGP9C/8M44JCoxOk3bM+fec2buvV4c8FRY1mvOmJtfWFzKLxdWVtfWN4qbW/U0yhKfOX4UREnTc1MW8JA5gouANeOEuUMvYA1vcCbjjTuWpDwKr8UoZu2h2w95j/uuIMq56IyPJp1iySpbapmzwNagBL1qUfEFN+gigo8MQzCEEIQDuEjpacGGhZi4NsbEJYS4ijNMUCBtRlmMMlxiB/Tt066l2ZD20jNVap9OCehNSGlijzQR5SWE5WmmimfKWbK/eY+Vp7zbiP6e9hoSK3BL7F+6aeZ/dbIWgR5OVA2caooVI6vztUumuiJvbn6pSpBDTJzEXYonhH2lnPbZVJpU1S5766r4m8qUrNz7OjfDu7wlDdj+Oc5ZUD8o25Xy4VWlVD3Vo85jB7vYp3keo4pz1OCQN8cjnvBsXBqxcW+MPlONnNZs49syHj4AR6mRCw== < /latexit > I1 < latexit sha1_base64= '' ZroCL0JJbplYYxKF0TuIbB7Z7xk= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF5OJUko3/oBb/TLxD/QvvDNGUIvohCRnzr3nzNx7vSTgqbSsl4IxMzs3v1BcLC0tr6yuldc3mmmcCZ85fhzEou25KQt4xBzJZcDaiWBu6AWs5Q2PVbx1y0TK4+hCjhLWDd1BxPvcdyVRzunV2J5clytW1dLLnAZ2DirIVyMuP+MSPcTwkSEEQwRJOICLlJ4ObFhIiOtiTJwgxHWcYYISaTPKYpThEjuk74B2nZyNaK88U6326ZSAXkFKEzukiSlPEFanmTqeaWfF/uY91p7qbiP6e7lXSKzEDbF/6T4z/6tTtUj0cahr4FRTohlVnZ+7ZLor6ubml6okOSTEKdyjuCDsa+Vnn02tSXXtqreujr/qTMWqvZ/nZnhTt6QB2z/HOQ2ae1W7Vt0/r1XqR/moi9jCNnZpngeo4wQNOOTN8YBHPBlnRmLcGaOPVKOQazbxbRn37zlhkQU= < /latexit > I2 < latexit sha1_base64= '' 2++cL5TEXumvU+oahUsTVndZR8E= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Ii3B6JLoRl1hYoEE0bTDgBNK27RTDSFs/AG3+mXGP9C/8M5YEpUYnabtmXPvOTP3Xi/yRSIt6zVnzM0vLC7llwsrq2vrG8XNrUYSpjHjDgv9MG55bsJ9EXBHCunzVhRzd+j5vOkNTlS8ecfjRITBpRxFvDN0+4HoCeZKopyz63FlclMsWWVLL3MW2BkoIVv1sPiCK3QRgiHFEBwBJGEfLhJ62rBhISKugzFxMSGh4xwTFEibUhanDJfYAX37tGtnbEB75ZloNaNTfHpjUprYI01IeTFhdZqp46l2Vuxv3mPtqe42or+XeQ2Jlbgl9i/dNPO/OlWLRA9HugZBNUWaUdWxzCXVXVE3N79UJckhIk7hLsVjwkwrp302tSbRtaveujr+pjMVq/Ysy03xrm5JA7Z/jnMWNCplu1o+uKiWasfZqPPYwS72aZ6HqOEUdTjkLfCIJzwb50Zk3Bujz1Qjl2m28W0ZDx87wpEG < /latexit > I3 < latexit sha1_base64= '' G06mXSCW+K11xSPKJ+cv3bGQhME= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IkUxuiS6UVeYWCBBNO0w4IS+0k41hLDxB9zqlxn/QP/CO2NJVGJ0mrZnzr3nzNx73cgTibSs15wxMzs3v5BfLCwtr6yuFdc3GkmYxozbLPTCuOU6CfdEwG0ppMdbUcwd3/V40x2cqHjzjseJCINLOYx4x3f6gegJ5kii7LPr0f74pliyypZe5jSoZKCEbNXD4guu0EUIhhQ+OAJIwh4cJPS0UYGFiLgORsTFhISOc4xRIG1KWZwyHGIH9O3Trp2xAe2VZ6LVjE7x6I1JaWKHNCHlxYTVaaaOp9pZsb95j7SnutuQ/m7m5RMrcUvsX7pJ5n91qhaJHo50DYJqijSjqmOZS6q7om5ufqlKkkNEnMJdiseEmVZO+mxqTaJrV711dPxNZypW7VmWm+Jd3ZIGXPk5zmnQ2CtXquWDi2qpdpyNOo8tbGOX5nmIGk5Rh03eAo94wrNxbkTGvTH8TDVymWYT35bx8AE+I5EH < /latexit > achieve its best performance without collaborating with the clients in C . | Given a network of clients each with his own private dataset, the locally learned model can be improved by obtaining data from other clients (assuming no domain mismatch). The paper models this problem by introducing the benefit graph which models how each client may benefit another. The concept of collaboration equilibrium is introduced and optimization algorithms to solve it are given. Some theoretical guarantees are shown along with experimental results. | SP:335056ba170ddfee03904d618a9136e9aae1dcae |
Learning to Collaborate | 1 INTRODUCTION . Effective learning of machine learning models over a collaborative network of data clients has drawn considerable interest in recent years . Frequently , due to privacy concerns , we can not simultaneously access the raw data residing on different clients . Therefore , distributed ( Li et al. , 2014 ) or federated learning ( McMahan et al. , 2017 ) strategies have been proposed , where typically model parameters are updated locally at each client with its own data and the parameter updates , such as gradients , are transmitted out and communicate with other clients . During this process , it is usually assumed that the participation in the network comes at no cost , i.e. , every client is willing to participate in the collaboration . However , this is not always true in reality . One example is the clinical research network ( CRN ) involving multiple hospitals ( Fleurence et al. , 2014 ) . Each hospital has its own patient population . The patient data are sensitive and can not be shared with other hospitals . If we want to build a risk prediction model with the patient data within this network in a privacy-preserving way , the expectation from each hospital is that a better model can be obtained through participating in the CRN compared to the one built from its own data collected from various clinical practice with big efforts . In this scenario , there has been a prior study showing that the model performance can decrease when collaborating with hospitals with very distinct patient populations due to negative transfer induced by sample distribution discrepancies ( Wang et al. , 2019 ; Pan & Yang , 2009 ) . With these considerations , in this paper , we propose a novel learning to collaborate framework . We allow the participating clients in a large collaborative network to form non-overlapping collaboration coalitions . Each coalition includes a subset of clients such that the collaboration among them can benefit their respective model performance . We aim at identifying the collaboration coalitions that can lead to a collaboration equilibrium , i.e. , there are no other coalition settings that any of the individual clients can benefit more ( i.e. , achieve better model performance ) . To obtain the coalitions that can lead to a collaboration equilibrium , we propose a Pareto optimization framework to identify the necessary collaborators for each client in the network to achieve its maximum utility . In particular , we optimize a local model associated with a specific client on the Under review as a conference paper at ICLR 2022 < latexit sha1_base64= '' ZroCL0JJbplYYxKF0TuIbB7Z7xk= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF5OJUko3/oBb/TLxD/QvvDNGUIvohCRnzr3nzNx7vSTgqbSsl4IxMzs3v1BcLC0tr6yuldc3mmmcCZ85fhzEou25KQt4xBzJZcDaiWBu6AWs5Q2PVbx1y0TK4+hCjhLWDd1BxPvcdyVRzunV2J5clytW1dLLnAZ2DirIVyMuP+MSPcTwkSEEQwRJOICLlJ4ObFhIiOtiTJwgxHWcYYISaTPKYpThEjuk74B2nZyNaK88U6326ZSAXkFKEzukiSlPEFanmTqeaWfF/uY91p7qbiP6e7lXSKzEDbF/6T4z/6tTtUj0cahr4FRTohlVnZ+7ZLor6ubml6okOSTEKdyjuCDsa+Vnn02tSXXtqreujr/qTMWqvZ/nZnhTt6QB2z/HOQ2ae1W7Vt0/r1XqR/moi9jCNnZpngeo4wQNOOTN8YBHPBlnRmLcGaOPVKOQazbxbRn37zlhkQU= < /latexit > < latexit sha1_base64= '' 2++cL5TEXumvU+oahUsTVndZR8E= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Ii3B6JLoRl1hYoEE0bTDgBNK27RTDSFs/AG3+mXGP9C/8M5YEpUYnabtmXPvOTP3Xi/yRSIt6zVnzM0vLC7llwsrq2vrG8XNrUYSpjHjDgv9MG55bsJ9EXBHCunzVhRzd+j5vOkNTlS8ecfjRITBpRxFvDN0+4HoCeZKopyz63FlclMsWWVLL3MW2BkoIVv1sPiCK3QRgiHFEBwBJGEfLhJ62rBhISKugzFxMSGh4xwTFEibUhanDJfYAX37tGtnbEB75ZloNaNTfHpjUprYI01IeTFhdZqp46l2Vuxv3mPtqe42or+XeQ2Jlbgl9i/dNPO/OlWLRA9HugZBNUWaUdWxzCXVXVE3N79UJckhIk7hLsVjwkwrp302tSbRtaveujr+pjMVq/Ysy03xrm5JA7Z/jnMWNCplu1o+uKiWasfZqPPYwS72aZ6HqOEUdTjkLfCIJzwb50Zk3Bujz1Qjl2m28W0ZDx87wpEG < /latexit > < latexit sha1_base64= '' G06mXSCW+K11xSPKJ+cv3bGQhME= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IkUxuiS6UVeYWCBBNO0w4IS+0k41hLDxB9zqlxn/QP/CO2NJVGJ0mrZnzr3nzNx73cgTibSs15wxMzs3v5BfLCwtr6yuFdc3GkmYxozbLPTCuOU6CfdEwG0ppMdbUcwd3/V40x2cqHjzjseJCINLOYx4x3f6gegJ5kii7LPr0f74pliyypZe5jSoZKCEbNXD4guu0EUIhhQ+OAJIwh4cJPS0UYGFiLgORsTFhISOc4xRIG1KWZwyHGIH9O3Trp2xAe2VZ6LVjE7x6I1JaWKHNCHlxYTVaaaOp9pZsb95j7SnutuQ/m7m5RMrcUvsX7pJ5n91qhaJHo50DYJqijSjqmOZS6q7om5ufqlKkkNEnMJdiseEmVZO+mxqTaJrV711dPxNZypW7VmWm+Jd3ZIGXPk5zmnQ2CtXquWDi2qpdpyNOo8tbGOX5nmIGk5Rh03eAo94wrNxbkTGvTH8TDVymWYT35bx8AE+I5EH < /latexit > < latexit sha1_base64= '' 078TlPinZnbp3G8YDOaCG04E8G4= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF8lEKaUbf8Ctfpn4B/oX3hlHUIvohCRnzr3nzNx7vSTgmbCsl4IxMzs3v1BcLC0tr6yuldc3mlmcpz5z/DiI07bnZizgEXMEFwFrJylzQy9gLW94LOOtW5ZmPI4uxChh3dAdRLzPfVcQ5ZxejWuT63LFqlpqmdPA1qACvRpx+RmX6CGGjxwhGCIIwgFcZPR0YMNCQlwXY+JSQlzFGSYokTanLEYZLrFD+g5o19FsRHvpmSm1T6cE9KakNLFDmpjyUsLyNFPFc+Us2d+8x8pT3m1Ef097hcQK3BD7l+4z8786WYtAH4eqBk41JYqR1fnaJVddkTc3v1QlyCEhTuIexVPCvlJ+9tlUmkzVLnvrqvirypSs3Ps6N8ebvCUN2P45zmnQ3Kvater+ea1SP9KjLmIL29ileR6gjhM04JA3xwMe8WScGYlxZ4w+Uo2C1mzi2zLu3wFAhJEI < /latexit > < latexit sha1_base64= '' rxH3eGL3jlLzhYJGRaokrVTVvjc= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsVAdEl0o64wsUCCaNoy4IS+Mp1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3urHPE2lZrzljbn5hcSm/XFhZXVvfKG5uNZMoFR6zvciPRNt1EubzkNmSS5+1Y8GcwPVZyx2eqHjrjomER+GlHMWsGziDkPe550ii7LPrcW1yUyxZZUsvcxZUMlBCthpR8QVX6CGChxQBGEJIwj4cJPR0UIGFmLguxsQJQlzHGSYokDalLEYZDrFD+g5o18nYkPbKM9Fqj07x6RWkNLFHmojyBGF1mqnjqXZW7G/eY+2p7jaiv5t5BcRK3BL7l26a+V+dqkWijyNdA6eaYs2o6rzMJdVdUTc3v1QlySEmTuEexQVhTyunfTa1JtG1q946Ov6mMxWr9l6Wm+Jd3ZIGXPk5zlnQPChXquXaRbVUP85GnccOdrFP8zxEHadowCZvjkc84dk4N2Lj3hh9phq5TLONb8t4+ABC5ZEJ < /latexit > < latexit sha1_base64= '' rX31m9pL4TDFitzg9FObuhvEhn0= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsXgY0l0o64wsUCCaNphwAl9pZ1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3upEnEmlZrzljZnZufiG/WFhaXlldK65vNJIwjRm3WeiFcct1Eu6JgNtSSI+3opg7vuvxpjs4UfHmHY8TEQaXchjxju/0A9ETzJFE2WfXo4PxTbFklS29zGlQyUAJ2aqHxRdcoYsQDCl8cASQhD04SOhpowILEXEdjIiLCQkd5xijQNqUsjhlOMQO6NunXTtjA9orz0SrGZ3i0RuT0sQOaULKiwmr00wdT7WzYn/zHmlPdbch/d3MyydW4pbYv3STzP/qVC0SPRzpGgTVFGlGVccyl1R3Rd3c/FKVJIeIOIW7FI8JM62c9NnUmkTXrnrr6PibzlSs2rMsN8W7uiUNuPJznNOgsVeuVMv7F9VS7TgbdR5b2MYuzfMQNZyiDpu8BR7xhGfj3IiMe2P4mWrkMs0mvi3j4QNFRpEK < /latexit > < latexit sha1_base64= '' 078TlPinZnbp3G8YDOaCG04E8G4= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF8lEKaUbf8Ctfpn4B/oX3hlHUIvohCRnzr3nzNx7vSTgmbCsl4IxMzs3v1BcLC0tr6yuldc3mlmcpz5z/DiI07bnZizgEXMEFwFrJylzQy9gLW94LOOtW5ZmPI4uxChh3dAdRLzPfVcQ5ZxejWuT63LFqlpqmdPA1qACvRpx+RmX6CGGjxwhGCIIwgFcZPR0YMNCQlwXY+JSQlzFGSYokTanLEYZLrFD+g5o19FsRHvpmSm1T6cE9KakNLFDmpjyUsLyNFPFc+Us2d+8x8pT3m1Ef097hcQK3BD7l+4z8786WYtAH4eqBk41JYqR1fnaJVddkTc3v1QlyCEhTuIexVPCvlJ+9tlUmkzVLnvrqvirypSs3Ps6N8ebvCUN2P45zmnQ3Kvater+ea1SP9KjLmIL29ileR6gjhM04JA3xwMe8WScGYlxZ4w+Uo2C1mzi2zLu3wFAhJEI < /latexit > < latexit sha1_base64= '' rxH3eGL3jlLzhYJGRaokrVTVvjc= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsVAdEl0o64wsUCCaNoy4IS+Mp1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3urHPE2lZrzljbn5hcSm/XFhZXVvfKG5uNZMoFR6zvciPRNt1EubzkNmSS5+1Y8GcwPVZyx2eqHjrjomER+GlHMWsGziDkPe550ii7LPrcW1yUyxZZUsvcxZUMlBCthpR8QVX6CGChxQBGEJIwj4cJPR0UIGFmLguxsQJQlzHGSYokDalLEYZDrFD+g5o18nYkPbKM9Fqj07x6RWkNLFHmojyBGF1mqnjqXZW7G/eY+2p7jaiv5t5BcRK3BL7l26a+V+dqkWijyNdA6eaYs2o6rzMJdVdUTc3v1QlySEmTuEexQVhTyunfTa1JtG1q946Ov6mMxWr9l6Wm+Jd3ZIGXPk5zlnQPChXquXaRbVUP85GnccOdrFP8zxEHadowCZvjkc84dk4N2Lj3hh9phq5TLONb8t4+ABC5ZEJ < /latexit > < latexit sha1_base64= '' rX31m9pL4TDFitzg9FObuhvEhn0= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsXgY0l0o64wsUCCaNphwAl9pZ1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3upEnEmlZrzljZnZufiG/WFhaXlldK65vNJIwjRm3WeiFcct1Eu6JgNtSSI+3opg7vuvxpjs4UfHmHY8TEQaXchjxju/0A9ETzJFE2WfXo4PxTbFklS29zGlQyUAJ2aqHxRdcoYsQDCl8cASQhD04SOhpowILEXEdjIiLCQkd5xijQNqUsjhlOMQO6NunXTtjA9orz0SrGZ3i0RuT0sQOaULKiwmr00wdT7WzYn/zHmlPdbch/d3MyydW4pbYv3STzP/qVC0SPRzpGgTVFGlGVccyl1R3Rd3c/FKVJIeIOIW7FI8JM62c9NnUmkTXrnrr6PibzlSs2rMsN8W7uiUNuPJznNOgsVeuVMv7F9VS7TgbdR5b2MYuzfMQNZyiDpu8BR7xhGfj3IiMe2P4mWrkMs0mvi3j4QNFRpEK < /latexit > < latexit sha1_base64= '' ZroCL0JJbplYYxKF0TuIbB7Z7xk= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF5OJUko3/oBb/TLxD/QvvDNGUIvohCRnzr3nzNx7vSTgqbSsl4IxMzs3v1BcLC0tr6yuldc3mmmcCZ85fhzEou25KQt4xBzJZcDaiWBu6AWs5Q2PVbx1y0TK4+hCjhLWDd1BxPvcdyVRzunV2J5clytW1dLLnAZ2DirIVyMuP+MSPcTwkSEEQwRJOICLlJ4ObFhIiOtiTJwgxHWcYYISaTPKYpThEjuk74B2nZyNaK88U6326ZSAXkFKEzukiSlPEFanmTqeaWfF/uY91p7qbiP6e7lXSKzEDbF/6T4z/6tTtUj0cahr4FRTohlVnZ+7ZLor6ubml6okOSTEKdyjuCDsa+Vnn02tSXXtqreujr/qTMWqvZ/nZnhTt6QB2z/HOQ2ae1W7Vt0/r1XqR/moi9jCNnZpngeo4wQNOOTN8YBHPBlnRmLcGaOPVKOQazbxbRn37zlhkQU= < /latexit > < latexit sha1_base64= '' 2++cL5TEXumvU+oahUsTVndZR8E= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Ii3B6JLoRl1hYoEE0bTDgBNK27RTDSFs/AG3+mXGP9C/8M5YEpUYnabtmXPvOTP3Xi/yRSIt6zVnzM0vLC7llwsrq2vrG8XNrUYSpjHjDgv9MG55bsJ9EXBHCunzVhRzd+j5vOkNTlS8ecfjRITBpRxFvDN0+4HoCeZKopyz63FlclMsWWVLL3MW2BkoIVv1sPiCK3QRgiHFEBwBJGEfLhJ62rBhISKugzFxMSGh4xwTFEibUhanDJfYAX37tGtnbEB75ZloNaNTfHpjUprYI01IeTFhdZqp46l2Vuxv3mPtqe42or+XeQ2Jlbgl9i/dNPO/OlWLRA9HugZBNUWaUdWxzCXVXVE3N79UJckhIk7hLsVjwkwrp302tSbRtaveujr+pjMVq/Ysy03xrm5JA7Z/jnMWNCplu1o+uKiWasfZqPPYwS72aZ6HqOEUdTjkLfCIJzwb50Zk3Bujz1Qjl2m28W0ZDx87wpEG < /latexit > < latexit sha1_base64= '' G06mXSCW+K11xSPKJ+cv3bGQhME= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IkUxuiS6UVeYWCBBNO0w4IS+0k41hLDxB9zqlxn/QP/CO2NJVGJ0mrZnzr3nzNx73cgTibSs15wxMzs3v5BfLCwtr6yuFdc3GkmYxozbLPTCuOU6CfdEwG0ppMdbUcwd3/V40x2cqHjzjseJCINLOYx4x3f6gegJ5kii7LPr0f74pliyypZe5jSoZKCEbNXD4guu0EUIhhQ+OAJIwh4cJPS0UYGFiLgORsTFhISOc4xRIG1KWZwyHGIH9O3Trp2xAe2VZ6LVjE7x6I1JaWKHNCHlxYTVaaaOp9pZsb95j7SnutuQ/m7m5RMrcUvsX7pJ5n91qhaJHo50DYJqijSjqmOZS6q7om5ufqlKkkNEnMJdiseEmVZO+mxqTaJrV711dPxNZypW7VmWm+Jd3ZIGXPk5zmnQ2CtXquWDi2qpdpyNOo8tbGOX5nmIGk5Rh03eAo94wrNxbkTGvTH8TDVymWYT35bx8AE+I5EH < /latexit > < latexit sha1_base64= '' ZroCL0JJbplYYxKF0TuIbB7Z7xk= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF5OJUko3/oBb/TLxD/QvvDNGUIvohCRnzr3nzNx7vSTgqbSsl4IxMzs3v1BcLC0tr6yuldc3mmmcCZ85fhzEou25KQt4xBzJZcDaiWBu6AWs5Q2PVbx1y0TK4+hCjhLWDd1BxPvcdyVRzunV2J5clytW1dLLnAZ2DirIVyMuP+MSPcTwkSEEQwRJOICLlJ4ObFhIiOtiTJwgxHWcYYISaTPKYpThEjuk74B2nZyNaK88U6326ZSAXkFKEzukiSlPEFanmTqeaWfF/uY91p7qbiP6e7lXSKzEDbF/6T4z/6tTtUj0cahr4FRTohlVnZ+7ZLor6ubml6okOSTEKdyjuCDsa+Vnn02tSXXtqreujr/qTMWqvZ/nZnhTt6QB2z/HOQ2ae1W7Vt0/r1XqR/moi9jCNnZpngeo4wQNOOTN8YBHPBlnRmLcGaOPVKOQazbxbRn37zlhkQU= < /latexit > < latexit sha1_base64= '' 2++cL5TEXumvU+oahUsTVndZR8E= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Ii3B6JLoRl1hYoEE0bTDgBNK27RTDSFs/AG3+mXGP9C/8M5YEpUYnabtmXPvOTP3Xi/yRSIt6zVnzM0vLC7llwsrq2vrG8XNrUYSpjHjDgv9MG55bsJ9EXBHCunzVhRzd+j5vOkNTlS8ecfjRITBpRxFvDN0+4HoCeZKopyz63FlclMsWWVLL3MW2BkoIVv1sPiCK3QRgiHFEBwBJGEfLhJ62rBhISKugzFxMSGh4xwTFEibUhanDJfYAX37tGtnbEB75ZloNaNTfHpjUprYI01IeTFhdZqp46l2Vuxv3mPtqe42or+XeQ2Jlbgl9i/dNPO/OlWLRA9HugZBNUWaUdWxzCXVXVE3N79UJckhIk7hLsVjwkwrp302tSbRtaveujr+pjMVq/Ysy03xrm5JA7Z/jnMWNCplu1o+uKiWasfZqPPYwS72aZ6HqOEUdTjkLfCIJzwb50Zk3Bujz1Qjl2m28W0ZDx87wpEG < /latexit > < latexit sha1_base64= '' G06mXSCW+K11xSPKJ+cv3bGQhME= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IkUxuiS6UVeYWCBBNO0w4IS+0k41hLDxB9zqlxn/QP/CO2NJVGJ0mrZnzr3nzNx73cgTibSs15wxMzs3v5BfLCwtr6yuFdc3GkmYxozbLPTCuOU6CfdEwG0ppMdbUcwd3/V40x2cqHjzjseJCINLOYx4x3f6gegJ5kii7LPr0f74pliyypZe5jSoZKCEbNXD4guu0EUIhhQ+OAJIwh4cJPS0UYGFiLgORsTFhISOc4xRIG1KWZwyHGIH9O3Trp2xAe2VZ6LVjE7x6I1JaWKHNCHlxYTVaaaOp9pZsb95j7SnutuQ/m7m5RMrcUvsX7pJ5n91qhaJHo50DYJqijSjqmOZS6q7om5ufqlKkkNEnMJdiseEmVZO+mxqTaJrV711dPxNZypW7VmWm+Jd3ZIGXPk5zmnQ2CtXquWDi2qpdpyNOo8tbGOX5nmIGk5Rh03eAo94wrNxbkTGvTH8TDVymWYT35bx8AE+I5EH < /latexit > < latexit sha1_base64= '' 078TlPinZnbp3G8YDOaCG04E8G4= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF8lEKaUbf8Ctfpn4B/oX3hlHUIvohCRnzr3nzNx7vSTgmbCsl4IxMzs3v1BcLC0tr6yuldc3mlmcpz5z/DiI07bnZizgEXMEFwFrJylzQy9gLW94LOOtW5ZmPI4uxChh3dAdRLzPfVcQ5ZxejWuT63LFqlpqmdPA1qACvRpx+RmX6CGGjxwhGCIIwgFcZPR0YMNCQlwXY+JSQlzFGSYokTanLEYZLrFD+g5o19FsRHvpmSm1T6cE9KakNLFDmpjyUsLyNFPFc+Us2d+8x8pT3m1Ef097hcQK3BD7l+4z8786WYtAH4eqBk41JYqR1fnaJVddkTc3v1QlyCEhTuIexVPCvlJ+9tlUmkzVLnvrqvirypSs3Ps6N8ebvCUN2P45zmnQ3Kvater+ea1SP9KjLmIL29ileR6gjhM04JA3xwMe8WScGYlxZ4w+Uo2C1mzi2zLu3wFAhJEI < /latexit > < latexit sha1_base64= '' rxH3eGL3jlLzhYJGRaokrVTVvjc= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsVAdEl0o64wsUCCaNoy4IS+Mp1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3urHPE2lZrzljbn5hcSm/XFhZXVvfKG5uNZMoFR6zvciPRNt1EubzkNmSS5+1Y8GcwPVZyx2eqHjrjomER+GlHMWsGziDkPe550ii7LPrcW1yUyxZZUsvcxZUMlBCthpR8QVX6CGChxQBGEJIwj4cJPR0UIGFmLguxsQJQlzHGSYokDalLEYZDrFD+g5o18nYkPbKM9Fqj07x6RWkNLFHmojyBGF1mqnjqXZW7G/eY+2p7jaiv5t5BcRK3BL7l26a+V+dqkWijyNdA6eaYs2o6rzMJdVdUTc3v1QlySEmTuEexQVhTyunfTa1JtG1q946Ov6mMxWr9l6Wm+Jd3ZIGXPk5zlnQPChXquXaRbVUP85GnccOdrFP8zxEHadowCZvjkc84dk4N2Lj3hh9phq5TLONb8t4+ABC5ZEJ < /latexit > < latexit sha1_base64= '' rX31m9pL4TDFitzg9FObuhvEhn0= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsXgY0l0o64wsUCCaNphwAl9pZ1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3upEnEmlZrzljZnZufiG/WFhaXlldK65vNJIwjRm3WeiFcct1Eu6JgNtSSI+3opg7vuvxpjs4UfHmHY8TEQaXchjxju/0A9ETzJFE2WfXo4PxTbFklS29zGlQyUAJ2aqHxRdcoYsQDCl8cASQhD04SOhpowILEXEdjIiLCQkd5xijQNqUsjhlOMQO6NunXTtjA9orz0SrGZ3i0RuT0sQOaULKiwmr00wdT7WzYn/zHmlPdbch/d3MyydW4pbYv3STzP/qVC0SPRzpGgTVFGlGVccyl1R3Rd3c/FKVJIeIOIW7FI8JM62c9NnUmkTXrnrr6PibzlSs2rMsN8W7uiUNuPJznNOgsVeuVMv7F9VS7TgbdR5b2MYuzfMQNZyiDpu8BR7xhGfj3IiMe2P4mWrkMs0mvi3j4QNFRpEK < /latexit > < latexit sha1_base64= '' 078TlPinZnbp3G8YDOaCG04E8G4= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF8lEKaUbf8Ctfpn4B/oX3hlHUIvohCRnzr3nzNx7vSTgmbCsl4IxMzs3v1BcLC0tr6yuldc3mlmcpz5z/DiI07bnZizgEXMEFwFrJylzQy9gLW94LOOtW5ZmPI4uxChh3dAdRLzPfVcQ5ZxejWuT63LFqlpqmdPA1qACvRpx+RmX6CGGjxwhGCIIwgFcZPR0YMNCQlwXY+JSQlzFGSYokTanLEYZLrFD+g5o19FsRHvpmSm1T6cE9KakNLFDmpjyUsLyNFPFc+Us2d+8x8pT3m1Ef097hcQK3BD7l+4z8786WYtAH4eqBk41JYqR1fnaJVddkTc3v1QlyCEhTuIexVPCvlJ+9tlUmkzVLnvrqvirypSs3Ps6N8ebvCUN2P45zmnQ3Kvater+ea1SP9KjLmIL29ileR6gjhM04JA3xwMe8WScGYlxZ4w+Uo2C1mzi2zLu3wFAhJEI < /latexit > < latexit sha1_base64= '' rxH3eGL3jlLzhYJGRaokrVTVvjc= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsVAdEl0o64wsUCCaNoy4IS+Mp1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3urHPE2lZrzljbn5hcSm/XFhZXVvfKG5uNZMoFR6zvciPRNt1EubzkNmSS5+1Y8GcwPVZyx2eqHjrjomER+GlHMWsGziDkPe550ii7LPrcW1yUyxZZUsvcxZUMlBCthpR8QVX6CGChxQBGEJIwj4cJPR0UIGFmLguxsQJQlzHGSYokDalLEYZDrFD+g5o18nYkPbKM9Fqj07x6RWkNLFHmojyBGF1mqnjqXZW7G/eY+2p7jaiv5t5BcRK3BL7l26a+V+dqkWijyNdA6eaYs2o6rzMJdVdUTc3v1QlySEmTuEexQVhTyunfTa1JtG1q946Ov6mMxWr9l6Wm+Jd3ZIGXPk5zlnQPChXquXaRbVUP85GnccOdrFP8zxEHadowCZvjkc84dk4N2Lj3hh9phq5TLONb8t4+ABC5ZEJ < /latexit > < latexit sha1_base64= '' rX31m9pL4TDFitzg9FObuhvEhn0= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IsXgY0l0o64wsUCCaNphwAl9pZ1qCGHjD7jVLzP+gf6Fd8aSqMToNG3PnHvPmbn3upEnEmlZrzljZnZufiG/WFhaXlldK65vNJIwjRm3WeiFcct1Eu6JgNtSSI+3opg7vuvxpjs4UfHmHY8TEQaXchjxju/0A9ETzJFE2WfXo4PxTbFklS29zGlQyUAJ2aqHxRdcoYsQDCl8cASQhD04SOhpowILEXEdjIiLCQkd5xijQNqUsjhlOMQO6NunXTtjA9orz0SrGZ3i0RuT0sQOaULKiwmr00wdT7WzYn/zHmlPdbch/d3MyydW4pbYv3STzP/qVC0SPRzpGgTVFGlGVccyl1R3Rd3c/FKVJIeIOIW7FI8JM62c9NnUmkTXrnrr6PibzlSs2rMsN8W7uiUNuPJznNOgsVeuVMv7F9VS7TgbdR5b2MYuzfMQNZyiDpu8BR7xhGfj3IiMe2P4mWrkMs0mvi3j4QNFRpEK < /latexit > < latexit sha1_base64= '' ZroCL0JJbplYYxKF0TuIbB7Z7xk= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF5OJUko3/oBb/TLxD/QvvDNGUIvohCRnzr3nzNx7vSTgqbSsl4IxMzs3v1BcLC0tr6yuldc3mmmcCZ85fhzEou25KQt4xBzJZcDaiWBu6AWs5Q2PVbx1y0TK4+hCjhLWDd1BxPvcdyVRzunV2J5clytW1dLLnAZ2DirIVyMuP+MSPcTwkSEEQwRJOICLlJ4ObFhIiOtiTJwgxHWcYYISaTPKYpThEjuk74B2nZyNaK88U6326ZSAXkFKEzukiSlPEFanmTqeaWfF/uY91p7qbiP6e7lXSKzEDbF/6T4z/6tTtUj0cahr4FRTohlVnZ+7ZLor6ubml6okOSTEKdyjuCDsa+Vnn02tSXXtqreujr/qTMWqvZ/nZnhTt6QB2z/HOQ2ae1W7Vt0/r1XqR/moi9jCNnZpngeo4wQNOOTN8YBHPBlnRmLcGaOPVKOQazbxbRn37zlhkQU= < /latexit > < latexit sha1_base64= '' 2++cL5TEXumvU+oahUsTVndZR8E= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Ii3B6JLoRl1hYoEE0bTDgBNK27RTDSFs/AG3+mXGP9C/8M5YEpUYnabtmXPvOTP3Xi/yRSIt6zVnzM0vLC7llwsrq2vrG8XNrUYSpjHjDgv9MG55bsJ9EXBHCunzVhRzd+j5vOkNTlS8ecfjRITBpRxFvDN0+4HoCeZKopyz63FlclMsWWVLL3MW2BkoIVv1sPiCK3QRgiHFEBwBJGEfLhJ62rBhISKugzFxMSGh4xwTFEibUhanDJfYAX37tGtnbEB75ZloNaNTfHpjUprYI01IeTFhdZqp46l2Vuxv3mPtqe42or+XeQ2Jlbgl9i/dNPO/OlWLRA9HugZBNUWaUdWxzCXVXVE3N79UJckhIk7hLsVjwkwrp302tSbRtaveujr+pjMVq/Ysy03xrm5JA7Z/jnMWNCplu1o+uKiWasfZqPPYwS72aZ6HqOEUdTjkLfCIJzwb50Zk3Bujz1Qjl2m28W0ZDx87wpEG < /latexit > < latexit sha1_base64= '' G06mXSCW+K11xSPKJ+cv3bGQhME= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IkUxuiS6UVeYWCBBNO0w4IS+0k41hLDxB9zqlxn/QP/CO2NJVGJ0mrZnzr3nzNx73cgTibSs15wxMzs3v5BfLCwtr6yuFdc3GkmYxozbLPTCuOU6CfdEwG0ppMdbUcwd3/V40x2cqHjzjseJCINLOYx4x3f6gegJ5kii7LPr0f74pliyypZe5jSoZKCEbNXD4guu0EUIhhQ+OAJIwh4cJPS0UYGFiLgORsTFhISOc4xRIG1KWZwyHGIH9O3Trp2xAe2VZ6LVjE7x6I1JaWKHNCHlxYTVaaaOp9pZsb95j7SnutuQ/m7m5RMrcUvsX7pJ5n91qhaJHo50DYJqijSjqmOZS6q7om5ufqlKkkNEnMJdiseEmVZO+mxqTaJrV711dPxNZypW7VmWm+Jd3ZIGXPk5zmnQ2CtXquWDi2qpdpyNOo8tbGOX5nmIGk5Rh03eAo94wrNxbkTGvTH8TDVymWYT35bx8AE+I5EH < /latexit > Pareto front of the learning objectives of all clients . Through the analysis of the geometric location of such an optimal model on the Pareto front , we can identify the necessary collaborators of each client . The relationships between each client and its necessary collaborators can be encoded in a benefit graph , in which each node denotes a client and the edge from Ij to Ii represents Ij is one of the necessary collaborators for Ii , as exemplified in Figure 1 ( a ) . Then we can derive the coalitions corresponding to the collaboration equilibrium through an iterative process introduced as follows . Specifically , we define a stable coalition as the minimum set such that its all involved clients can achieve its maximal utility . From the perspective of graph theory , these stable coalitions are actually the strongly connected components of the benefit graph . For example , C = { I1 , I2 , I3 } in Figure 1 ( b ) is a stable coalition as all clients can achieve their best performance by collaborating with the clients in C ( compared with collaborating with other clients in the network ) . By removing the stable coalitions and re-building the benefit graph of the remaining client iteratively as shown in Figure 1 ( b ) and ( c ) , we can identify all coalitions as in Figure 1 ( d ) and prove that the obtained coalitions can lead to a collaboration equilibrium . We empirically evaluate our method on synthetic data , UCI adult ( Kohavi , 1996 ) , a classical FL benchmark data set CIFAR10 ( Krizhevsky et al. , 2009 ) , and a real-world electronic health record ( EHR ) data repository eICU ( Pollard et al. , 2018 ) , which includes patient EHR data in ICU from multiple hospitals . The results show our method significantly outperforms existing relevant methods . The experiments on eICU data demonstrate that our algorithm is able to derive a good collaboration strategy for the hospitals to collaborate . 2 RELATED WORK . 2.1 FEDERATED LEARNING . Federated learning ( FL ) ( McMahan et al. , 2017 ) refers to the paradigm of learning from fragmented data without sacrificing privacy . In a typical FL setting , a global model is learned from the data residing in multiple distinct local clients . However , a single global model may lead to performance degradation on certain clients due to data heterogeneity . Personalized federated learning ( PFL ) ( Kulkarni et al. , 2020 ) , which aims at learning a customized model for each client in the federation , has been proposed to tackle this challenge . For example , Zhang et al . ( 2020 ) proposes to adjust the weight of the objectives corresponding to all clients dynamically ; Fallah et al . ( 2020 ) proposes a meta-learning based method for achieving an effectively shared initialization of all local models followed by a fine-tuning procedure ; Shamsian et al . ( 2021 ) proposes to learn a central hypernetwork which can generate a set of customized models for each client . FL assumes all clients are willing to participate in the collaboration and existing methods have not considered whether the collaboration can really benefit each client or not . Without benefit , a local client could be reluctant to participate in the collaboration , which is a realistic scenario we investigate in this paper . One specific FL setup that is relevant to our work is clustered federated learning ( Sattler et al. , 2020 ; Mansour et al. , 2020 ) , which groups the clients with similar data distributions and trains a model for each client group . The scenario we are considering in this paper is to form collaboration coalitions based on the performance gain each client can get for its corresponding model , rather than sample distribution similarities . 2.2 MULTI-TASK LEARNING AND NEGATIVE TRANSFER . Multi-task learning ( Caruana , 1997 ) ( MTL ) aims at learning shared knowledge across multiple interrelated tasks for mutual benefits . Typical examples include hard model parameter sharing ( Kokkinos , 2017 ) , soft parameter sharing ( Lu et al. , 2017 ) , and neural architecture search ( NAS ) for a shared Under review as a conference paper at ICLR 2022 model architecture ( Real et al. , 2019 ) . However , sharing representations of model structures can not guarantee model performance gain due to the existence of negative transfer , while we directly consider forming collaboration coalitions according to individual model performance benefits . In addition , MTL usually assumes the data from all tasks are accessible , while our goal is to learn a personalized model for each client through collaborating with other clients without directly accessing their raw data . It is worth mentioning that there are also clustered MTL approaches ( Standley et al. , 2020 ; Zamir et al. , 2018 ) which assume the models for the tasks within the same group are similar to each other , while we want the clients within each coalition can benefit each other through collaboration when learning their respective models . Some works extend MTL to a multi-source domain adaptation ( Wen et al. , 2020 ; Duan et al. , 2009 ) setting in which unlabeled data exist in some tasks . See detailed discussions in Appendix . 3 COLLABORATION LEARNING PROBLEM . We first introduce the necessary notations and definitions in Section 3.1 , and then define the collaboration equilibrium we aim to achieve in Section 3.2 . 3.1 DEFINITIONS AND NOTATIONS . Suppose there are N clients I = { Ii } N i=1 in a collaborative network and each client is associated with a specific learning task T i based on its own data Di = { Xi , Y i } , i ∈ { 1 , 2 , ... , N } , where the input space Xi and the output space Y i may or may not share across all N clients . Each client pursues collaboration with others to learn a personalized model M i by maximizing its utility ( i.e. , model performance ) without sacrificing data privacy . There is no guarantee that one client can always benefit from the collaboration with others , and the client would be reluctant to participate in the collaboration if there is no benefit . In the following , we describe this through a concrete example . No benefit , no collaboration . Suppose the local data { Di } , i ∈ { 1 , 2 , ... , N } owned by different clients satisfy the following conditions : 1 ) all local data are from the same distribution Di ∼ P ; 2 ) D1 ⊂ D2 ⊂ D3 , ... , ⊂ DN . Since DN contains more data than other clients , IN can not benefit from collaboration with any other clients , so IN will learn a local model using its own data . Once IN refuses to collaboration , IN−1 will also work on its own as IN−1 can only improve its utility by collaborating with IN . IN−2 will learn individually out of the same concerns . Finally , there is no collaboration among any clients . Due to the discrepancies of the sample distributions across different clients , the best local model for a specific client is very likely to come from collaborating with a subset of clients rather than all of them . Suppose U ( Ii , C ) denotes the model utility of client Ii when collaborating with the clients in client set C. In the following , we define Umax ( Ii , C ) as the maximum model utility that Ii can achieve when collaborating with different subsets of C. Definition 1 ( Maximum Achievable Utility ( MAU ) ) . This is the maximum model utility for a specific client Ii to collaborate with different subsets of client set C : Umax ( Ii , C ) = maxC′⊂C U ( Ii , C ′ ) . From Definition 1 , MAU satisfies Umax ( Ii , C ′ ) ≤ Umax ( Ii , C ) if C ′ is a subset of C. Each client Ii ∈ I aims to identify its “ optimal set '' of collaborators from I to maximize its local utility , which is defined as follows . Definition 2 ( Optimal Collaborator Set ( OCS ) ) . A client set CoptI ( I i ) ⊂ I is an optimal collaborator set for Ii if and only if CoptI ( I i ) satisfies ∀C ⊂ I , U ( Ii , CoptI ( Ii ) ) ≥ U ( Ii , C ) ; ( 1a ) ∀C ′ & CoptI ( Ii ) , U ( Ii , C opt I ( I i ) ) > U ( Ii , C ′ ) . ( 1b ) Eq . ( 1a ) means that Ii can achieve its maximal utility when collaborating with CoptI ( I i ) and Eq . ( 1b ) means that all clients in CoptI ( I i ) are necessary . In this way , the relationships between any client Ii ∈ I and its optimal collaborator set CoptI ( Ii ) can be represented by a graph which is called the benefit graph ( BG ) . Specifically , for a given client set C ⊂ I , we use BG ( C ) to denote its corresponding BG . For the example in Figure 1 ( a ) , an arrow from Ij to Ii means Ij ∈ CoptI ( Ii ) , e.g. , I1 → I3 means I1 ∈ CoptI ( I3 ) . For a client set C , if every member can achieve its maximum Under review as a conference paper at ICLR 2022 model utility through the collaboration with other members within C ( without collaboration with other members outside C ) , then we call C a coalition . I4 < latexit sha1_base64= '' Xwl+BCUvBvIgMA7IdpW3uxrkcDU= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hlpKk0zqYF5OJUko3/oBb/TLxD/QvvDOmoBbRCUnOnHvPmbn3eknAU2lZrwVjbn5hcam4XFpZXVvfKG9uNdM4Ez5z/DiIRdtzUxbwiDmSy4C1E8Hc0AtYy7s9VfHWHRMpj6MrOUpYN3SHER9w35VEOee9cW3SK1esqqWXOQvsHFSQr0ZcfsE1+ojhI0MIhgiScAAXKT0d2LCQENfFmDhBiOs4wwQl0maUxSjDJfaWvkPadXI2or3yTLXap1MCegUpTeyRJqY8QVidZup4pp0V+5v3WHuqu43o7+VeIbESN8T+pZtm/lenapEY4FjXwKmmRDOqOj93yXRX1M3NL1VJckiIU7hPcUHY18ppn02tSXXtqreujr/pTMWqvZ/nZnhXt6QB2z/HOQuaB1W7Vj28rFXqJ/moi9jBLvZpnkeo4wwNOOTN8YgnPBsXRmLcG6PPVKOQa7bxbRkPH0LnkQk= < /latexit > I5 < latexit sha1_base64= '' KKOEGmeLJ8PCjcxMDMM1BdYiV28= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Iq2B6JLoRl1hYoEECWmHASeUtmmnGkLY+ANu9cuMf6B/4Z2xJCoxOk3bM+fec2buvV7ki0Ra1mvOWFhcWl7JrxbW1jc2t4rbO40kTGPGHRb6Ydzy3IT7IuCOFNLnrSjm7sjzedMbnql4847HiQiDazmOeGfkDgLRF8yVRDkX3Ul12i2WrLKllzkP7AyUkK16WHzBDXoIwZBiBI4AkrAPFwk9bdiwEBHXwYS4mJDQcY4pCqRNKYtThkvskL4D2rUzNqC98ky0mtEpPr0xKU0ckCakvJiwOs3U8VQ7K/Y374n2VHcb09/LvEbEStwS+5dulvlfnapFoo8TXYOgmiLNqOpY5pLqrqibm1+qkuQQEadwj+IxYaaVsz6bWpPo2lVvXR1/05mKVXuW5aZ4V7ekAds/xzkPGkdlu1KuXlVKtdNs1HnsYR+HNM9j1HCOOhzyFnjEE56NSyMy7o3xZ6qRyzS7+LaMhw9FSJEK < /latexit > I6 < latexit sha1_base64= '' dLuWEcCiJIy7Wrla2OQjmor1BOM= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Iq3Bx5LoRl1hYoEECWnLgBNK27RTDSFs/AG3+mXGP9C/8M44JCoxOk3bM+fec2buvV4c8FRY1mvOmJtfWFzKLxdWVtfWN4qbW/U0yhKfOX4UREnTc1MW8JA5gouANeOEuUMvYA1vcCbjjTuWpDwKr8UoZu2h2w95j/uuIMq56IyPJp1iySpbapmzwNagBL1qUfEFN+gigo8MQzCEEIQDuEjpacGGhZi4NsbEJYS4ijNMUCBtRlmMMlxiB/Tt066l2ZD20jNVap9OCehNSGlijzQR5SWE5WmmimfKWbK/eY+Vp7zbiP6e9hoSK3BL7F+6aeZ/dbIWgR5OVA2caooVI6vztUumuiJvbn6pSpBDTJzEXYonhH2lnPbZVJpU1S5766r4m8qUrNz7OjfDu7wlDdj+Oc5ZUD8o25Xy4VWlVD3Vo85jB7vYp3keo4pz1OCQN8cjnvBsXBqxcW+MPlONnNZs49syHj4AR6mRCw== < /latexit > I1 < latexit sha1_base64= '' ZroCL0JJbplYYxKF0TuIbB7Z7xk= '' > AAACyHicjVHLSsNAFD2Nr1pfVZdugkVwVRKp6LLoRl1VMG2hVknSaR2aF5OJUko3/oBb/TLxD/QvvDNGUIvohCRnzr3nzNx7vSTgqbSsl4IxMzs3v1BcLC0tr6yuldc3mmmcCZ85fhzEou25KQt4xBzJZcDaiWBu6AWs5Q2PVbx1y0TK4+hCjhLWDd1BxPvcdyVRzunV2J5clytW1dLLnAZ2DirIVyMuP+MSPcTwkSEEQwRJOICLlJ4ObFhIiOtiTJwgxHWcYYISaTPKYpThEjuk74B2nZyNaK88U6326ZSAXkFKEzukiSlPEFanmTqeaWfF/uY91p7qbiP6e7lXSKzEDbF/6T4z/6tTtUj0cahr4FRTohlVnZ+7ZLor6ubml6okOSTEKdyjuCDsa+Vnn02tSXXtqreujr/qTMWqvZ/nZnhTt6QB2z/HOQ2ae1W7Vt0/r1XqR/moi9jCNnZpngeo4wQNOOTN8YBHPBlnRmLcGaOPVKOQazbxbRn37zlhkQU= < /latexit > I2 < latexit sha1_base64= '' 2++cL5TEXumvU+oahUsTVndZR8E= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4Ii3B6JLoRl1hYoEE0bTDgBNK27RTDSFs/AG3+mXGP9C/8M5YEpUYnabtmXPvOTP3Xi/yRSIt6zVnzM0vLC7llwsrq2vrG8XNrUYSpjHjDgv9MG55bsJ9EXBHCunzVhRzd+j5vOkNTlS8ecfjRITBpRxFvDN0+4HoCeZKopyz63FlclMsWWVLL3MW2BkoIVv1sPiCK3QRgiHFEBwBJGEfLhJ62rBhISKugzFxMSGh4xwTFEibUhanDJfYAX37tGtnbEB75ZloNaNTfHpjUprYI01IeTFhdZqp46l2Vuxv3mPtqe42or+XeQ2Jlbgl9i/dNPO/OlWLRA9HugZBNUWaUdWxzCXVXVE3N79UJckhIk7hLsVjwkwrp302tSbRtaveujr+pjMVq/Ysy03xrm5JA7Z/jnMWNCplu1o+uKiWasfZqPPYwS72aZ6HqOEUdTjkLfCIJzwb50Zk3Bujz1Qjl2m28W0ZDx87wpEG < /latexit > I3 < latexit sha1_base64= '' G06mXSCW+K11xSPKJ+cv3bGQhME= '' > AAACyHicjVHLTsJAFD3UF+ILdemmkZi4IkUxuiS6UVeYWCBBNO0w4IS+0k41hLDxB9zqlxn/QP/CO2NJVGJ0mrZnzr3nzNx73cgTibSs15wxMzs3v5BfLCwtr6yuFdc3GkmYxozbLPTCuOU6CfdEwG0ppMdbUcwd3/V40x2cqHjzjseJCINLOYx4x3f6gegJ5kii7LPr0f74pliyypZe5jSoZKCEbNXD4guu0EUIhhQ+OAJIwh4cJPS0UYGFiLgORsTFhISOc4xRIG1KWZwyHGIH9O3Trp2xAe2VZ6LVjE7x6I1JaWKHNCHlxYTVaaaOp9pZsb95j7SnutuQ/m7m5RMrcUvsX7pJ5n91qhaJHo50DYJqijSjqmOZS6q7om5ufqlKkkNEnMJdiseEmVZO+mxqTaJrV711dPxNZypW7VmWm+Jd3ZIGXPk5zmnQ2CtXquWDi2qpdpyNOo8tbGOX5nmIGk5Rh03eAo94wrNxbkTGvTH8TDVymWYT35bx8AE+I5EH < /latexit > achieve its best performance without collaborating with the clients in C . | The paper considers the problem of agents sharing training data to improve the accuracy of the model obtained on their own population. The high-level goal is to find "stable" collaboration patterns where no agents want to deviate (e.g., stop sharing or form their own groups of sharing). The authors first consider an abstract formulation where each agent has a utility function over all sets of other agents to collaborate with. Assuming that one can find the most beneficial set of collaborators for each agent, the authors present an efficient algorithm to divide agents into groups that form a stable collaboration pattern (aka a collaboration equilibrium). Since the problem of finding this optimal set of collaborators for each agent is nontrivial in general, the authors come back to the setting of sharing training data, where they propose a theoretically principled approach to build the benefit graph (which encodes most beneficial collaborators) by optimizing on the Pareto frontier of hypotheses / models of accuracy of all agents. The authors then evaluate their approach on synthetic and real data, and compare that against several benchmark methods for personalized federated learning. Empirical results suggest that the collaboration equilibrium behaves roughly as one would expect. Also, the model found by optimizing on the Pareto frontier appears to achieve remarkable performance, often comparable to or better than the best benchmark. The accuracy at collaboration equilibria is somewhat worse, which is natural given that there might be a "price of stability". | SP:335056ba170ddfee03904d618a9136e9aae1dcae |
Doubly Adaptive Scaled Algorithm for Machine Learning Using Second-Order Information | 1 INTRODUCTION . This paper presents an algorithm for solving empirical risk minimization problems of the form : minw∈RdF ( w ) : = 1 n ∑n i=1f ( w ; x i , yi ) = 1n ∑n i=1fi ( w ) , ( 1 ) where w is the model parameter/weight vector , { ( xi , yi ) } ni=1 are the training samples , and fi : Rd → R is the loss function . Usually , the number of training samples , n , and dimension , d , are large , and the loss function F is potentially nonconvex , making this minimization problem difficult to solve . In the past decades , significant effort has been devoted to developing optimization algorithms for machine learning . Due to easy implementation and low per-iteration cost , ( stochastic ) first-order methods ( Robbins & Monro , 1951 ; Duchi et al. , 2011 ; Schmidt et al. , 2017 ; Johnson & Zhang , 2013 ; Nguyen et al. , 2017 ; 2019 ; Kingma & Ba , 2014 ; Jahani et al. , 2021a ; Recht et al. , 2011 ) have become prevalent approaches for many machine learning applications . However , these methods have several drawbacks : ( i ) they are highly sensitive to the choices of hyperparameters , especially learning rate ; ( ii ) they suffer from ill-conditioning that often arises in large-scale machine learning ; and ( iii ) they offer limited opportunities in distributed computing environments since these methods usually spend more time on “ communication ” instead of the true “ computation. ” The main reasons for the aforementioned issues come from the fact that first-order methods only use the gradient information for their updates . On the other hand , going beyond first-order methods , Newton-type and quasi-Newton methods ( Nocedal & Wright , 2006 ; Dennis & Moré , 1977 ; Fletcher , 1987 ) are considered to be a strong family of optimizers due to their judicious use of the curvature information in order to scale the gradient . By exploiting the curvature information of the objective function , these methods mitigate many of the issues inherent in first-order methods . In the deterministic regime , it is known that these methods are relatively insensitive to the choices of the hyperparameters , and they handle ill-conditioned problems with a fast convergence rate . Clearly , this does not come for free , and these methods can have memory requirements up to O ( d2 ) with computational complexity up to O ( d3 ) ( e.g. , with a naive use of the Newton method ) . There are , of course , efficient ways to solve the Newton system with significantly lower costs ( e.g. , see Nocedal & Wright ( 2006 ) ) . Moreover , quasi-Newton methods require lower memory and computational complexities than Newton-type methods . Recently , there has been shifted attention towards stochastic second-order ( Roosta-Khorasani & Mahoney , 2018 ; Byrd et al. , 2011 ; Martens , 2010 ; Jahani et al. , 2020a ; Xu et al. , 2017 ; Roosta et al. , 2018 ; Yao et al. , 2018 ) and quasi-Newton methods ( Curtis , 2016 ; Berahas et al. , 2016 ; Mokhtari & Ribeiro , 2015 ; Jahani et al. , 2021b ; Berahas et al. , 2019 ; Jahani et al. , 2020b ) in order to approximately capture the local curvature information . These methods have shown good results for several machine learning tasks ( Xu et al. , 2020 ; Berahas et al. , 2020 ; Yao et al. , 2019 ) . In some cases , however , due to the noise in the Hessian approximation , their performance is still on par with the first-order variants . One avenue for reducing the computational and memory requirements for capturing curvature information is to consider just the diagonal of the Hessian . Since the Hessian diagonal can be represented as a vector , it is affordable to store its moving average , which is useful for reducing the impact of noise in the stochastic regime . To exemplify this , AdaHessian Algorithm ( Yao et al. , 2020 ) uses Hutchinson ’ s method ( Bekas et al. , 2007 ) to approximate the Hessian diagonal , and it uses a second moment of the Hessian diagonal approximation for preconditioning the gradient . AdaHessian achieves impressive results on a wide range of state-of-the-art tasks . However , its preconditioning matrix approximates the Hessian diagonal only very approximately , suggesting that improvements are possible if one can better approximate the Hessian diagonal . 1 0 0 0 0 S a m p le s In this paper , we propose the dOubly Adaptive Scaled algorIthm for machine learning using Second-order information ( OASIS ) . OASIS approximates the Hessian diagonal in an efficient way , providing an estimate whose scale much more closely approximates the scale of the true Hessian diagonal ( see Figure 1 ) . Due to this improved scaling , the search direction in OASIS contains gradient information , in which the components are well-scaled by the novel preconditioning matrix . Therefore , every gradient component in each dimension is adaptively scaled based on the approximated curvature for that dimension . For this reason , there is no need to tune the learning rate , as it would be updated automatically based on a local approximation of the Lipschitz smoothness parameter ( see Figure 2 ) . The well-scaled preconditioning matrix coupled with the adaptive learning rate results in a fully adaptive step for updating the parameters . Here , we provide a brief summary of our main contributions : • Novel Optimization Algorithm . We propose OASIS as a fully adaptive method that preconditions the gradient information by a well-scaled Hessian diagonal approximation . The gradient component in each dimension is adaptively scaled by the corresponding curvature approximation . • Adaptive Learning Rate . Our methodology does not require us to tune the learning rate , as it is updated automatically via an adaptive rule . The rule approximates the Lipschitz smoothness parameter , and it updates the learning rate accordingly . • Comprehensive Theoretical Analysis . We derive convergence guarantees for OASIS with respect to different settings of learning rates , namely the case with adaptive learning rate for convex and strongly convex cases . We also provide the convergence guarantees with respect to fixed learning rate and line search for both strongly convex and nonconvex settings . • Competitive Numerical Results . We investigate the empirical performance of OASIS on a variety of standard machine learning tasks , including logistic regression , nonlinear least squares problems , and image classification . Our proposed method consistently shows competitive or superior performance in comparison to many first- and second-order state-of-the-art methods . Notation . By considering the positive definite matrix D , we define the weighted Euclidean norm of vector x ∈ Rd with ‖x‖2D = xTDx . Its corresponding dual norm is shown as ‖ · ‖∗D . The operator is used as a component-wise product between two vectors . Given a vector v , we represent the corresponding diagonal matrix of v with diag ( v ) . 2 RELATED WORK . In this paper , we analyze algorithms with the generic iterate updates : wk+1 = wk − ηkD̂k−1mk , ( 2 ) where D̂k is the preconditioning matrix , mk is either gk ( the true gradient or the gradient approximation ) or the first moment of the gradient with momentum parameter β1 or the bias corrected first moment of the gradient , and ηk is the learning rate . The simple interpretation is that , in order to update the iterates , the vector mk would be rotated and scaled by the inverse of preconditioning matrix D̂k , and the transformed information would be considered as the search direction . Due to limited space , here we consider only some of the related studies with a diagonal preconditioner . For more general preconditioning , see Nocedal & Wright ( 2006 ) . Clearly , one of the benefits of a well-defined diagonal preconditioner is the easy calculation of its inverse . There are many optimization algorithms that follow the update in ( 2 ) . A well-known method is stochastic gradient descent ( SGD ) .The idea behind SGD is simple yet effective : the preconditioning matrix is set to be D̂k = Id , for all k ≥ 0 . There are variants of SGD with and without momentum . The advantage of using momentum is to smooth the gradient ( approximation ) over the past iterations , and it can be useful in the noisy settings . In order to converge to the stationary point ( s ) , the learning rate in SGD needs to decay . Therefore , there are many important hyperparameters that need to be tuned , e.g. , learning rate , learning-rate decay , batch size , and momentum . Among all of them , tuning the learning rate is particularly important and cumbersome since the learning rate in SGD is considered to be the same for all dimensions . To address this issue , one idea is to use an adaptive diagonal preconditioning matrix , where its elements are based on the local information of the iterates . One of the initial methods with a non-identity preconditioning matrix is Adagrad ( Duchi et al. , 2011 ) . In Adagrad , the momentum parameter is set to be zero ( mk = gk ) , and the preconditioning matrix is defined as : D̂k = diag ( √∑k i=1gk gk ) . ( 3 ) As is clear from the preconditioning matrix D̂k in ( 3 ) , every gradient component is scaled with the accumulated information of all the past squared gradients . It is advantageous in the sense that every component is scaled adaptively . However , a significant drawback of D̂k in ( 3 ) has to do with the progressive increase of its elements , which leads to rapid decrease of the learning rate . To prevent Adagrad ’ s aggressive , monotonically decreasing learning rate , several approaches , including Adadelta ( Zeiler , 2012 ) and RMSProp ( Tieleman & Hinton , 2012 ) , have been developed . Specifically , in RMSProp , the momentum parameter β1 is zero ( or mk = gk ) and the preconditioning matrix is as follows : D̂k = √ β2D̂k−12 + ( 1− β2 ) diag ( gk gk ) , ( 4 ) where β2 is the momentum parameter used in the preconditioning matrix . As we can see from the difference between the preconditioning matrices in ( 3 ) and ( 4 ) , in RMSProp an exponentially decaying average of squared gradients is used , which prevents rapid increase of preconditioning components in ( 3 ) . Another approach for computing the adaptive scaling for each parameter is Adam ( Kingma & Ba , 2014 ) . Besides storing an exponentially decaying average of past squared gradients like Adadelta and RMSprop , Adam also keeps first moment estimate of gradient , similar to SGD with momentum . In Adam , the bias-corrected first and second moment estimates , i.e. , mk and D̂k in ( 2 ) , are as follows : mk = 1−β1 1−βk1 ∑k i=1β k−i 1 gi , D̂k = √ 1−β2 1−βk2 ∑k i=1β k−i 2 diag ( gi gi ) . ( 5 ) There have been many other first-order methods with adaptive scaling ( Loshchilov & Hutter , 2017 ; Chaudhari et al. , 2019 ; Loshchilov & Hutter , 2016 ; Shazeer & Stern , 2018 ) . The methods described so far have only used the information of the gradient for preconditioning mk in ( 2 ) . The main difference of second-order methods is to employ higher order information for scaling and rotating the mk in ( 2 ) . To be precise , besides the gradient information , the ( approximated ) curvature information of the objective function is also used . As a textbook example , in Newton ’ s method D̂k = ∇2F ( wk ) and mk = gk with ηk = 1 . Diagonal Approximation . Recently , using methods from randomized numerical linear algebra , the AdaHessian method was developed ( Yao et al. , 2020 ) . AdaHessian approximates the diagonal of the Hessian , and it uses the second moment of the diagonal Hessian approximation as the preconditioner D̂k in ( 2 ) . In AdaHessian , Hutchinson ’ s method1 is used to approximate the Hessian diagonal as follows : Dk ≈ diag ( E [ zk ∇2F ( wk ) zk ] ) , ( 6 ) where zk is a random vector with Rademacher distribution . Needless to say,2 the oracle ∇2F ( wk ) zk , or Hessian-vector product , can be efficiently calculated ; in particular , for AdaHessian , it is computed with two back-propagation rounds without constructing the Hessian explicitly . In a nutshell , the first momentum for AdaHessian is the same as ( 5 ) , and its second order momentum is : D̂k = √ 1−β2 1−βk2 ∑k i=1β k−i 2 D 2 i . ( 7 ) The intuition behind AdaHessian is to have a larger step size for the dimensions with shallow loss surfaces and smaller step size for the dimensions with sharp loss surfaces . The results provided by AdaHessian show its strength by using curvature information , in comparison to other adaptive first-order methods , for a range of state-of-the-art problems in computer vision , natural language processing , and recommendation systems ( Yao et al. , 2020 ) . However , even for AdaHessian , the preconditioning matrix D̂k in ( 7 ) does not approximate the scale of the actual diagonal of the Hessian particularly well ( see Figure 1 ) . One might hope that a better-scaled preconditioner would enable better use of curvature information . This is one of the main focuses of this study . Adaptive Learning Rate . In all of the methods discussed previously , the learning rate ηk in ( 2 ) is still a hyperparameter which needs to be manually tuned , and it is a critical and sensitive hyperparameter . It is also necessary to tune the learning rate in methods that use approximation of curvature information ( such as quasi-Newton methods like BFGS/LBFGS , and methods using diagonal Hessian approximation like AdaHessian ) . The studies ( Loizou et al. , 2020 ; Vaswani et al. , 2019 ; Chandra et al. , 2019 ; Baydin et al. , 2017 ; Malitsky & Mishchenko , 2020 ) have tackled the issue regarding tuning learning rate , and have developed methodologies with adaptive learning rate , ηk , for first-order methods . Specifically , the work ( Malitsky & Mishchenko , 2020 ) finds the learning rate by approximating the Lipschitz smoothness parameter in an affordable way without adding a tunable hyperparameter which is used for GD-type methods ( with identity norm ) . Extending the latter approach to the weighted-Euclidean norm is not straightforward . In the next section , we describe how we can extend the work ( Malitsky & Mishchenko , 2020 ) for the case with weighted Euclidean norm . This is another main focus of this study . In fact , while we focus on AdaHessian , any method with a positive-definite preconditioning matrix and bounded eigenvalues can benefit from our approach . | The paper designs and analyses an algorithm for minimizing a separable function. It provides deterministic as well as stochastic versions, which either fully compute the gradient or sample it. The algorithm estimates the diagonal elements of the Hessian via Hessian-vector products. The algorithm makes use of this information for finding a better search direction and the step length, eliminating the need for a line search. It provides convergence guarantees and a number of experiments on classical ML problems as well as on deep nets. | SP:562887b7174cc410c76f5e5ec98de3c5c981048b |
Doubly Adaptive Scaled Algorithm for Machine Learning Using Second-Order Information | 1 INTRODUCTION . This paper presents an algorithm for solving empirical risk minimization problems of the form : minw∈RdF ( w ) : = 1 n ∑n i=1f ( w ; x i , yi ) = 1n ∑n i=1fi ( w ) , ( 1 ) where w is the model parameter/weight vector , { ( xi , yi ) } ni=1 are the training samples , and fi : Rd → R is the loss function . Usually , the number of training samples , n , and dimension , d , are large , and the loss function F is potentially nonconvex , making this minimization problem difficult to solve . In the past decades , significant effort has been devoted to developing optimization algorithms for machine learning . Due to easy implementation and low per-iteration cost , ( stochastic ) first-order methods ( Robbins & Monro , 1951 ; Duchi et al. , 2011 ; Schmidt et al. , 2017 ; Johnson & Zhang , 2013 ; Nguyen et al. , 2017 ; 2019 ; Kingma & Ba , 2014 ; Jahani et al. , 2021a ; Recht et al. , 2011 ) have become prevalent approaches for many machine learning applications . However , these methods have several drawbacks : ( i ) they are highly sensitive to the choices of hyperparameters , especially learning rate ; ( ii ) they suffer from ill-conditioning that often arises in large-scale machine learning ; and ( iii ) they offer limited opportunities in distributed computing environments since these methods usually spend more time on “ communication ” instead of the true “ computation. ” The main reasons for the aforementioned issues come from the fact that first-order methods only use the gradient information for their updates . On the other hand , going beyond first-order methods , Newton-type and quasi-Newton methods ( Nocedal & Wright , 2006 ; Dennis & Moré , 1977 ; Fletcher , 1987 ) are considered to be a strong family of optimizers due to their judicious use of the curvature information in order to scale the gradient . By exploiting the curvature information of the objective function , these methods mitigate many of the issues inherent in first-order methods . In the deterministic regime , it is known that these methods are relatively insensitive to the choices of the hyperparameters , and they handle ill-conditioned problems with a fast convergence rate . Clearly , this does not come for free , and these methods can have memory requirements up to O ( d2 ) with computational complexity up to O ( d3 ) ( e.g. , with a naive use of the Newton method ) . There are , of course , efficient ways to solve the Newton system with significantly lower costs ( e.g. , see Nocedal & Wright ( 2006 ) ) . Moreover , quasi-Newton methods require lower memory and computational complexities than Newton-type methods . Recently , there has been shifted attention towards stochastic second-order ( Roosta-Khorasani & Mahoney , 2018 ; Byrd et al. , 2011 ; Martens , 2010 ; Jahani et al. , 2020a ; Xu et al. , 2017 ; Roosta et al. , 2018 ; Yao et al. , 2018 ) and quasi-Newton methods ( Curtis , 2016 ; Berahas et al. , 2016 ; Mokhtari & Ribeiro , 2015 ; Jahani et al. , 2021b ; Berahas et al. , 2019 ; Jahani et al. , 2020b ) in order to approximately capture the local curvature information . These methods have shown good results for several machine learning tasks ( Xu et al. , 2020 ; Berahas et al. , 2020 ; Yao et al. , 2019 ) . In some cases , however , due to the noise in the Hessian approximation , their performance is still on par with the first-order variants . One avenue for reducing the computational and memory requirements for capturing curvature information is to consider just the diagonal of the Hessian . Since the Hessian diagonal can be represented as a vector , it is affordable to store its moving average , which is useful for reducing the impact of noise in the stochastic regime . To exemplify this , AdaHessian Algorithm ( Yao et al. , 2020 ) uses Hutchinson ’ s method ( Bekas et al. , 2007 ) to approximate the Hessian diagonal , and it uses a second moment of the Hessian diagonal approximation for preconditioning the gradient . AdaHessian achieves impressive results on a wide range of state-of-the-art tasks . However , its preconditioning matrix approximates the Hessian diagonal only very approximately , suggesting that improvements are possible if one can better approximate the Hessian diagonal . 1 0 0 0 0 S a m p le s In this paper , we propose the dOubly Adaptive Scaled algorIthm for machine learning using Second-order information ( OASIS ) . OASIS approximates the Hessian diagonal in an efficient way , providing an estimate whose scale much more closely approximates the scale of the true Hessian diagonal ( see Figure 1 ) . Due to this improved scaling , the search direction in OASIS contains gradient information , in which the components are well-scaled by the novel preconditioning matrix . Therefore , every gradient component in each dimension is adaptively scaled based on the approximated curvature for that dimension . For this reason , there is no need to tune the learning rate , as it would be updated automatically based on a local approximation of the Lipschitz smoothness parameter ( see Figure 2 ) . The well-scaled preconditioning matrix coupled with the adaptive learning rate results in a fully adaptive step for updating the parameters . Here , we provide a brief summary of our main contributions : • Novel Optimization Algorithm . We propose OASIS as a fully adaptive method that preconditions the gradient information by a well-scaled Hessian diagonal approximation . The gradient component in each dimension is adaptively scaled by the corresponding curvature approximation . • Adaptive Learning Rate . Our methodology does not require us to tune the learning rate , as it is updated automatically via an adaptive rule . The rule approximates the Lipschitz smoothness parameter , and it updates the learning rate accordingly . • Comprehensive Theoretical Analysis . We derive convergence guarantees for OASIS with respect to different settings of learning rates , namely the case with adaptive learning rate for convex and strongly convex cases . We also provide the convergence guarantees with respect to fixed learning rate and line search for both strongly convex and nonconvex settings . • Competitive Numerical Results . We investigate the empirical performance of OASIS on a variety of standard machine learning tasks , including logistic regression , nonlinear least squares problems , and image classification . Our proposed method consistently shows competitive or superior performance in comparison to many first- and second-order state-of-the-art methods . Notation . By considering the positive definite matrix D , we define the weighted Euclidean norm of vector x ∈ Rd with ‖x‖2D = xTDx . Its corresponding dual norm is shown as ‖ · ‖∗D . The operator is used as a component-wise product between two vectors . Given a vector v , we represent the corresponding diagonal matrix of v with diag ( v ) . 2 RELATED WORK . In this paper , we analyze algorithms with the generic iterate updates : wk+1 = wk − ηkD̂k−1mk , ( 2 ) where D̂k is the preconditioning matrix , mk is either gk ( the true gradient or the gradient approximation ) or the first moment of the gradient with momentum parameter β1 or the bias corrected first moment of the gradient , and ηk is the learning rate . The simple interpretation is that , in order to update the iterates , the vector mk would be rotated and scaled by the inverse of preconditioning matrix D̂k , and the transformed information would be considered as the search direction . Due to limited space , here we consider only some of the related studies with a diagonal preconditioner . For more general preconditioning , see Nocedal & Wright ( 2006 ) . Clearly , one of the benefits of a well-defined diagonal preconditioner is the easy calculation of its inverse . There are many optimization algorithms that follow the update in ( 2 ) . A well-known method is stochastic gradient descent ( SGD ) .The idea behind SGD is simple yet effective : the preconditioning matrix is set to be D̂k = Id , for all k ≥ 0 . There are variants of SGD with and without momentum . The advantage of using momentum is to smooth the gradient ( approximation ) over the past iterations , and it can be useful in the noisy settings . In order to converge to the stationary point ( s ) , the learning rate in SGD needs to decay . Therefore , there are many important hyperparameters that need to be tuned , e.g. , learning rate , learning-rate decay , batch size , and momentum . Among all of them , tuning the learning rate is particularly important and cumbersome since the learning rate in SGD is considered to be the same for all dimensions . To address this issue , one idea is to use an adaptive diagonal preconditioning matrix , where its elements are based on the local information of the iterates . One of the initial methods with a non-identity preconditioning matrix is Adagrad ( Duchi et al. , 2011 ) . In Adagrad , the momentum parameter is set to be zero ( mk = gk ) , and the preconditioning matrix is defined as : D̂k = diag ( √∑k i=1gk gk ) . ( 3 ) As is clear from the preconditioning matrix D̂k in ( 3 ) , every gradient component is scaled with the accumulated information of all the past squared gradients . It is advantageous in the sense that every component is scaled adaptively . However , a significant drawback of D̂k in ( 3 ) has to do with the progressive increase of its elements , which leads to rapid decrease of the learning rate . To prevent Adagrad ’ s aggressive , monotonically decreasing learning rate , several approaches , including Adadelta ( Zeiler , 2012 ) and RMSProp ( Tieleman & Hinton , 2012 ) , have been developed . Specifically , in RMSProp , the momentum parameter β1 is zero ( or mk = gk ) and the preconditioning matrix is as follows : D̂k = √ β2D̂k−12 + ( 1− β2 ) diag ( gk gk ) , ( 4 ) where β2 is the momentum parameter used in the preconditioning matrix . As we can see from the difference between the preconditioning matrices in ( 3 ) and ( 4 ) , in RMSProp an exponentially decaying average of squared gradients is used , which prevents rapid increase of preconditioning components in ( 3 ) . Another approach for computing the adaptive scaling for each parameter is Adam ( Kingma & Ba , 2014 ) . Besides storing an exponentially decaying average of past squared gradients like Adadelta and RMSprop , Adam also keeps first moment estimate of gradient , similar to SGD with momentum . In Adam , the bias-corrected first and second moment estimates , i.e. , mk and D̂k in ( 2 ) , are as follows : mk = 1−β1 1−βk1 ∑k i=1β k−i 1 gi , D̂k = √ 1−β2 1−βk2 ∑k i=1β k−i 2 diag ( gi gi ) . ( 5 ) There have been many other first-order methods with adaptive scaling ( Loshchilov & Hutter , 2017 ; Chaudhari et al. , 2019 ; Loshchilov & Hutter , 2016 ; Shazeer & Stern , 2018 ) . The methods described so far have only used the information of the gradient for preconditioning mk in ( 2 ) . The main difference of second-order methods is to employ higher order information for scaling and rotating the mk in ( 2 ) . To be precise , besides the gradient information , the ( approximated ) curvature information of the objective function is also used . As a textbook example , in Newton ’ s method D̂k = ∇2F ( wk ) and mk = gk with ηk = 1 . Diagonal Approximation . Recently , using methods from randomized numerical linear algebra , the AdaHessian method was developed ( Yao et al. , 2020 ) . AdaHessian approximates the diagonal of the Hessian , and it uses the second moment of the diagonal Hessian approximation as the preconditioner D̂k in ( 2 ) . In AdaHessian , Hutchinson ’ s method1 is used to approximate the Hessian diagonal as follows : Dk ≈ diag ( E [ zk ∇2F ( wk ) zk ] ) , ( 6 ) where zk is a random vector with Rademacher distribution . Needless to say,2 the oracle ∇2F ( wk ) zk , or Hessian-vector product , can be efficiently calculated ; in particular , for AdaHessian , it is computed with two back-propagation rounds without constructing the Hessian explicitly . In a nutshell , the first momentum for AdaHessian is the same as ( 5 ) , and its second order momentum is : D̂k = √ 1−β2 1−βk2 ∑k i=1β k−i 2 D 2 i . ( 7 ) The intuition behind AdaHessian is to have a larger step size for the dimensions with shallow loss surfaces and smaller step size for the dimensions with sharp loss surfaces . The results provided by AdaHessian show its strength by using curvature information , in comparison to other adaptive first-order methods , for a range of state-of-the-art problems in computer vision , natural language processing , and recommendation systems ( Yao et al. , 2020 ) . However , even for AdaHessian , the preconditioning matrix D̂k in ( 7 ) does not approximate the scale of the actual diagonal of the Hessian particularly well ( see Figure 1 ) . One might hope that a better-scaled preconditioner would enable better use of curvature information . This is one of the main focuses of this study . Adaptive Learning Rate . In all of the methods discussed previously , the learning rate ηk in ( 2 ) is still a hyperparameter which needs to be manually tuned , and it is a critical and sensitive hyperparameter . It is also necessary to tune the learning rate in methods that use approximation of curvature information ( such as quasi-Newton methods like BFGS/LBFGS , and methods using diagonal Hessian approximation like AdaHessian ) . The studies ( Loizou et al. , 2020 ; Vaswani et al. , 2019 ; Chandra et al. , 2019 ; Baydin et al. , 2017 ; Malitsky & Mishchenko , 2020 ) have tackled the issue regarding tuning learning rate , and have developed methodologies with adaptive learning rate , ηk , for first-order methods . Specifically , the work ( Malitsky & Mishchenko , 2020 ) finds the learning rate by approximating the Lipschitz smoothness parameter in an affordable way without adding a tunable hyperparameter which is used for GD-type methods ( with identity norm ) . Extending the latter approach to the weighted-Euclidean norm is not straightforward . In the next section , we describe how we can extend the work ( Malitsky & Mishchenko , 2020 ) for the case with weighted Euclidean norm . This is another main focus of this study . In fact , while we focus on AdaHessian , any method with a positive-definite preconditioning matrix and bounded eigenvalues can benefit from our approach . | The paper presents a novel adaptive second order method: ''OASIS'', for large scale optimization problems (convex and nonconvex). The search direction is obtained by preconditioning the gradient information with a matrix obtained by approximating the Hessian diagonal matrix (via Hutchinson's method with a momentum term). The learning rate is updated adaptively by approximating the Lipschitz smoothness parameter. On the theoretical front, convergence analysis is provided for the adaptive learning rate case, for the convex and strongly convex setups. Similar analysis is also provided for the fixed learning rate (LR) case, for the strongly convex and nonconvex settings. Finally, extensive empirical results are provided which show that the proposed method achieves comparable, and sometimes better results than other existing methods. | SP:562887b7174cc410c76f5e5ec98de3c5c981048b |
Doubly Adaptive Scaled Algorithm for Machine Learning Using Second-Order Information | 1 INTRODUCTION . This paper presents an algorithm for solving empirical risk minimization problems of the form : minw∈RdF ( w ) : = 1 n ∑n i=1f ( w ; x i , yi ) = 1n ∑n i=1fi ( w ) , ( 1 ) where w is the model parameter/weight vector , { ( xi , yi ) } ni=1 are the training samples , and fi : Rd → R is the loss function . Usually , the number of training samples , n , and dimension , d , are large , and the loss function F is potentially nonconvex , making this minimization problem difficult to solve . In the past decades , significant effort has been devoted to developing optimization algorithms for machine learning . Due to easy implementation and low per-iteration cost , ( stochastic ) first-order methods ( Robbins & Monro , 1951 ; Duchi et al. , 2011 ; Schmidt et al. , 2017 ; Johnson & Zhang , 2013 ; Nguyen et al. , 2017 ; 2019 ; Kingma & Ba , 2014 ; Jahani et al. , 2021a ; Recht et al. , 2011 ) have become prevalent approaches for many machine learning applications . However , these methods have several drawbacks : ( i ) they are highly sensitive to the choices of hyperparameters , especially learning rate ; ( ii ) they suffer from ill-conditioning that often arises in large-scale machine learning ; and ( iii ) they offer limited opportunities in distributed computing environments since these methods usually spend more time on “ communication ” instead of the true “ computation. ” The main reasons for the aforementioned issues come from the fact that first-order methods only use the gradient information for their updates . On the other hand , going beyond first-order methods , Newton-type and quasi-Newton methods ( Nocedal & Wright , 2006 ; Dennis & Moré , 1977 ; Fletcher , 1987 ) are considered to be a strong family of optimizers due to their judicious use of the curvature information in order to scale the gradient . By exploiting the curvature information of the objective function , these methods mitigate many of the issues inherent in first-order methods . In the deterministic regime , it is known that these methods are relatively insensitive to the choices of the hyperparameters , and they handle ill-conditioned problems with a fast convergence rate . Clearly , this does not come for free , and these methods can have memory requirements up to O ( d2 ) with computational complexity up to O ( d3 ) ( e.g. , with a naive use of the Newton method ) . There are , of course , efficient ways to solve the Newton system with significantly lower costs ( e.g. , see Nocedal & Wright ( 2006 ) ) . Moreover , quasi-Newton methods require lower memory and computational complexities than Newton-type methods . Recently , there has been shifted attention towards stochastic second-order ( Roosta-Khorasani & Mahoney , 2018 ; Byrd et al. , 2011 ; Martens , 2010 ; Jahani et al. , 2020a ; Xu et al. , 2017 ; Roosta et al. , 2018 ; Yao et al. , 2018 ) and quasi-Newton methods ( Curtis , 2016 ; Berahas et al. , 2016 ; Mokhtari & Ribeiro , 2015 ; Jahani et al. , 2021b ; Berahas et al. , 2019 ; Jahani et al. , 2020b ) in order to approximately capture the local curvature information . These methods have shown good results for several machine learning tasks ( Xu et al. , 2020 ; Berahas et al. , 2020 ; Yao et al. , 2019 ) . In some cases , however , due to the noise in the Hessian approximation , their performance is still on par with the first-order variants . One avenue for reducing the computational and memory requirements for capturing curvature information is to consider just the diagonal of the Hessian . Since the Hessian diagonal can be represented as a vector , it is affordable to store its moving average , which is useful for reducing the impact of noise in the stochastic regime . To exemplify this , AdaHessian Algorithm ( Yao et al. , 2020 ) uses Hutchinson ’ s method ( Bekas et al. , 2007 ) to approximate the Hessian diagonal , and it uses a second moment of the Hessian diagonal approximation for preconditioning the gradient . AdaHessian achieves impressive results on a wide range of state-of-the-art tasks . However , its preconditioning matrix approximates the Hessian diagonal only very approximately , suggesting that improvements are possible if one can better approximate the Hessian diagonal . 1 0 0 0 0 S a m p le s In this paper , we propose the dOubly Adaptive Scaled algorIthm for machine learning using Second-order information ( OASIS ) . OASIS approximates the Hessian diagonal in an efficient way , providing an estimate whose scale much more closely approximates the scale of the true Hessian diagonal ( see Figure 1 ) . Due to this improved scaling , the search direction in OASIS contains gradient information , in which the components are well-scaled by the novel preconditioning matrix . Therefore , every gradient component in each dimension is adaptively scaled based on the approximated curvature for that dimension . For this reason , there is no need to tune the learning rate , as it would be updated automatically based on a local approximation of the Lipschitz smoothness parameter ( see Figure 2 ) . The well-scaled preconditioning matrix coupled with the adaptive learning rate results in a fully adaptive step for updating the parameters . Here , we provide a brief summary of our main contributions : • Novel Optimization Algorithm . We propose OASIS as a fully adaptive method that preconditions the gradient information by a well-scaled Hessian diagonal approximation . The gradient component in each dimension is adaptively scaled by the corresponding curvature approximation . • Adaptive Learning Rate . Our methodology does not require us to tune the learning rate , as it is updated automatically via an adaptive rule . The rule approximates the Lipschitz smoothness parameter , and it updates the learning rate accordingly . • Comprehensive Theoretical Analysis . We derive convergence guarantees for OASIS with respect to different settings of learning rates , namely the case with adaptive learning rate for convex and strongly convex cases . We also provide the convergence guarantees with respect to fixed learning rate and line search for both strongly convex and nonconvex settings . • Competitive Numerical Results . We investigate the empirical performance of OASIS on a variety of standard machine learning tasks , including logistic regression , nonlinear least squares problems , and image classification . Our proposed method consistently shows competitive or superior performance in comparison to many first- and second-order state-of-the-art methods . Notation . By considering the positive definite matrix D , we define the weighted Euclidean norm of vector x ∈ Rd with ‖x‖2D = xTDx . Its corresponding dual norm is shown as ‖ · ‖∗D . The operator is used as a component-wise product between two vectors . Given a vector v , we represent the corresponding diagonal matrix of v with diag ( v ) . 2 RELATED WORK . In this paper , we analyze algorithms with the generic iterate updates : wk+1 = wk − ηkD̂k−1mk , ( 2 ) where D̂k is the preconditioning matrix , mk is either gk ( the true gradient or the gradient approximation ) or the first moment of the gradient with momentum parameter β1 or the bias corrected first moment of the gradient , and ηk is the learning rate . The simple interpretation is that , in order to update the iterates , the vector mk would be rotated and scaled by the inverse of preconditioning matrix D̂k , and the transformed information would be considered as the search direction . Due to limited space , here we consider only some of the related studies with a diagonal preconditioner . For more general preconditioning , see Nocedal & Wright ( 2006 ) . Clearly , one of the benefits of a well-defined diagonal preconditioner is the easy calculation of its inverse . There are many optimization algorithms that follow the update in ( 2 ) . A well-known method is stochastic gradient descent ( SGD ) .The idea behind SGD is simple yet effective : the preconditioning matrix is set to be D̂k = Id , for all k ≥ 0 . There are variants of SGD with and without momentum . The advantage of using momentum is to smooth the gradient ( approximation ) over the past iterations , and it can be useful in the noisy settings . In order to converge to the stationary point ( s ) , the learning rate in SGD needs to decay . Therefore , there are many important hyperparameters that need to be tuned , e.g. , learning rate , learning-rate decay , batch size , and momentum . Among all of them , tuning the learning rate is particularly important and cumbersome since the learning rate in SGD is considered to be the same for all dimensions . To address this issue , one idea is to use an adaptive diagonal preconditioning matrix , where its elements are based on the local information of the iterates . One of the initial methods with a non-identity preconditioning matrix is Adagrad ( Duchi et al. , 2011 ) . In Adagrad , the momentum parameter is set to be zero ( mk = gk ) , and the preconditioning matrix is defined as : D̂k = diag ( √∑k i=1gk gk ) . ( 3 ) As is clear from the preconditioning matrix D̂k in ( 3 ) , every gradient component is scaled with the accumulated information of all the past squared gradients . It is advantageous in the sense that every component is scaled adaptively . However , a significant drawback of D̂k in ( 3 ) has to do with the progressive increase of its elements , which leads to rapid decrease of the learning rate . To prevent Adagrad ’ s aggressive , monotonically decreasing learning rate , several approaches , including Adadelta ( Zeiler , 2012 ) and RMSProp ( Tieleman & Hinton , 2012 ) , have been developed . Specifically , in RMSProp , the momentum parameter β1 is zero ( or mk = gk ) and the preconditioning matrix is as follows : D̂k = √ β2D̂k−12 + ( 1− β2 ) diag ( gk gk ) , ( 4 ) where β2 is the momentum parameter used in the preconditioning matrix . As we can see from the difference between the preconditioning matrices in ( 3 ) and ( 4 ) , in RMSProp an exponentially decaying average of squared gradients is used , which prevents rapid increase of preconditioning components in ( 3 ) . Another approach for computing the adaptive scaling for each parameter is Adam ( Kingma & Ba , 2014 ) . Besides storing an exponentially decaying average of past squared gradients like Adadelta and RMSprop , Adam also keeps first moment estimate of gradient , similar to SGD with momentum . In Adam , the bias-corrected first and second moment estimates , i.e. , mk and D̂k in ( 2 ) , are as follows : mk = 1−β1 1−βk1 ∑k i=1β k−i 1 gi , D̂k = √ 1−β2 1−βk2 ∑k i=1β k−i 2 diag ( gi gi ) . ( 5 ) There have been many other first-order methods with adaptive scaling ( Loshchilov & Hutter , 2017 ; Chaudhari et al. , 2019 ; Loshchilov & Hutter , 2016 ; Shazeer & Stern , 2018 ) . The methods described so far have only used the information of the gradient for preconditioning mk in ( 2 ) . The main difference of second-order methods is to employ higher order information for scaling and rotating the mk in ( 2 ) . To be precise , besides the gradient information , the ( approximated ) curvature information of the objective function is also used . As a textbook example , in Newton ’ s method D̂k = ∇2F ( wk ) and mk = gk with ηk = 1 . Diagonal Approximation . Recently , using methods from randomized numerical linear algebra , the AdaHessian method was developed ( Yao et al. , 2020 ) . AdaHessian approximates the diagonal of the Hessian , and it uses the second moment of the diagonal Hessian approximation as the preconditioner D̂k in ( 2 ) . In AdaHessian , Hutchinson ’ s method1 is used to approximate the Hessian diagonal as follows : Dk ≈ diag ( E [ zk ∇2F ( wk ) zk ] ) , ( 6 ) where zk is a random vector with Rademacher distribution . Needless to say,2 the oracle ∇2F ( wk ) zk , or Hessian-vector product , can be efficiently calculated ; in particular , for AdaHessian , it is computed with two back-propagation rounds without constructing the Hessian explicitly . In a nutshell , the first momentum for AdaHessian is the same as ( 5 ) , and its second order momentum is : D̂k = √ 1−β2 1−βk2 ∑k i=1β k−i 2 D 2 i . ( 7 ) The intuition behind AdaHessian is to have a larger step size for the dimensions with shallow loss surfaces and smaller step size for the dimensions with sharp loss surfaces . The results provided by AdaHessian show its strength by using curvature information , in comparison to other adaptive first-order methods , for a range of state-of-the-art problems in computer vision , natural language processing , and recommendation systems ( Yao et al. , 2020 ) . However , even for AdaHessian , the preconditioning matrix D̂k in ( 7 ) does not approximate the scale of the actual diagonal of the Hessian particularly well ( see Figure 1 ) . One might hope that a better-scaled preconditioner would enable better use of curvature information . This is one of the main focuses of this study . Adaptive Learning Rate . In all of the methods discussed previously , the learning rate ηk in ( 2 ) is still a hyperparameter which needs to be manually tuned , and it is a critical and sensitive hyperparameter . It is also necessary to tune the learning rate in methods that use approximation of curvature information ( such as quasi-Newton methods like BFGS/LBFGS , and methods using diagonal Hessian approximation like AdaHessian ) . The studies ( Loizou et al. , 2020 ; Vaswani et al. , 2019 ; Chandra et al. , 2019 ; Baydin et al. , 2017 ; Malitsky & Mishchenko , 2020 ) have tackled the issue regarding tuning learning rate , and have developed methodologies with adaptive learning rate , ηk , for first-order methods . Specifically , the work ( Malitsky & Mishchenko , 2020 ) finds the learning rate by approximating the Lipschitz smoothness parameter in an affordable way without adding a tunable hyperparameter which is used for GD-type methods ( with identity norm ) . Extending the latter approach to the weighted-Euclidean norm is not straightforward . In the next section , we describe how we can extend the work ( Malitsky & Mishchenko , 2020 ) for the case with weighted Euclidean norm . This is another main focus of this study . In fact , while we focus on AdaHessian , any method with a positive-definite preconditioning matrix and bounded eigenvalues can benefit from our approach . | This work proposes OASIS, a second-order method which approximates the diagonal of Hessian matrix and uses the information to rescale the gradient vector. The main difference between OASIS and the existing method AdaHessian (Yao et al., 2020) is on the ways they approximate the diagonal of Hessian, that AdaHessian uses a formula similar to Adam and OASIS uses an exponential average. Moreover, OASIS also incorporates the adaptive stepsize in (Mishchenko & Malitsky, 2020). The authors established the convergence guarantees of OASIS under various settings including convex, strongly convex and nonconvex cases, using various learning rate schedulers such as the adaptive learning rate, fixed learning rate and line search. Empirical results on various machine learning tasks are provided to evaluate OASIS. | SP:562887b7174cc410c76f5e5ec98de3c5c981048b |
Robust and Scalable SDE Learning: A Functional Perspective | Stochastic differential equations provide a rich class of flexible generative models,1 capable of describing a wide range of spatio-temporal processes . A host of re-2 cent work looks to learn data-representing SDEs , using neural networks and other3 flexible function approximators . Despite these advances , learning remains compu-4 tationally expensive due to the sequential nature of SDE integrators . In this work,5 we propose an importance-sampling estimator for probabilities of observations of6 SDEs for the purposes of learning . Crucially , the approach we suggest does not7 rely on such integrators . The proposed method produces lower-variance gradient8 estimates compared to algorithms based on SDE integrators and has the added9 advantage of being embarrassingly parallelizable . This facilitates the effective use10 of large-scale parallel hardware for massive decreases in computation time.11 1 INTRODUCTION12 Stochastic differential equations ( SDEs ) are a natural extension to ordinary differential equations13 which allows modelling of noisy and uncertain driving forces . These models are particularly appealing14 due to their flexibility in expressing highly complex relationships with simple equations , while15 retaining a high degree of interpretability . Much work has been done over the last century focussing16 on understanding and modelling with SDEs , particularly in dynamical systems and quantitative17 finance ( Pavliotis , 2014 ; Malliavin & Thalmaier , 2006 ) . Examples of such work are the Langevin18 model of stochastic dynamics of particles in a fluid , stochastic turbulence ( Kumar et al. , 2020 ) , and19 the Black–Scholes model . More recently , SDE models have gathered interest in machine learning20 and current work focuses on efficient and scalable methods of inferring SDEs from data.21 1.1 THE SDE LEARNING PROBLEM22 Consider an Itô SDE ( Pavliotis , 2014 ) of the following form23 dX = f ( X , t ) dt+ g ( X , t ) dW , ( 1 ) and a set of observations x1 : N = { ( tn , xn ) } N n=1 . In the simplest case , these observations would24 be directly of a realisation of the process at discrete points in time . In many physical applications,25 the observations themselves would have some uncertainty associated with them , described by an26 observation noise model . In more complex models , the SDE would be driving some unobserved27 parameters describing further complex processes ( Li et al. , 2020 ) . For example , discrete events28 may be modeled by an inhomogenious Poisson processes , where the rate parameter is evolving29 stochastically over time . In any case , the generating process can be summarized by the graphical30 model in Figure 1 and the corresponding learning problem can be described as : “ given observations31 x1 : N , infer f and g ” .32 For the most part , the model can be trained using standard techniques , such as variational inference,33 Markov chain Monte Carlo or optimizing an appropriate loss function . Generally , this requires34 estimating an expectation over sample-paths , either to estimate the marginal probability of the obser-35 vations as a function of f and g , or to estimate the mismatch of sample-paths with the observations . To36 estimate these expectations , most current work makes use of integration algorithms . These algorithms37 generate trajectories of X for a given f and g , which can be used to estimate the required expectation.38 f g W X xn N The central idea of this paper is to instead generate trajectories from a distribution much closer to54 the path-space posterior distribution when estimating these expectations . In the simplest case where55 the observations are directly of the process X , this means sampling trajectories which pass directly56 through the observations . Alternatively , one can marginalize out the observation noise distribution —57 or efficiently estimate some expected loss function — by importance sampling58 EX [ p ( x1 : N |X ) ] = Ex̃1 : N∼q [ p ( x1 : N | x̃1 : N ) q ( x̃1 : N ) pX ( x̃1 : N ) ] , ( 4 ) where q is an importance distribution which may depend on the observations themselves . For a large59 class of observation distributions , such as additive Gaussian noise or multinomial observations , a60 natural choice for q would be the corresponding conjugate distribution , in which case the importance61 weight p/q becomes a constant . In complex graphical models , q might be parameterized and62 optimized variationally , or Gibbs sampling may be used with a collection of simpler conditional63 distributions . Taking advantage of this , we shall , without loss of generality , concentrate only on64 estimating the quantity pX ( x1 : N ) = EX [ ∏ n δ ( xn −X ( tn ) ) ] .65 In this work , we introduce a novel algorithm for efficient estimation of probabilities in SDE models66 for the purposes of learning . Our algorithm has a number of favourable charateristics:67 • Our algorithm exhibits lower gradient variance in estimated expectations than algorithms68 based on SDE solvers , since it enforces that sampled trajectories pass through the observed69 data , producing accurate results even in hundreds of dimensions.70 • Since our algorithm does not rely on an SDE solver , it completely removes all sequential71 dependence between sampled points . Our algorithm is therefore trivially parallelizable , and72 can take full advantage of modern parallel hardware such as multi-GPU training.73 • Since our estimator can be calculated in a single forward pass of the function f , proba-74 bilistic approaches such as variational Gaussian processes are viable candidates for the75 representation of f .76 1.2 RELATED WORK77 Li et al . ( 2020 ) propose a method for calculating gradients of functions of the integrated process with78 respect to parameters of f and g via a backwards SDE called the adjoint method . This approach79 requires reconstructing the Wiener process backwards in time when integrating the backward equation80 and the authors propose a memory efficient algorithm to do so . Their approach uses a constant81 amount of memory independent of the number of integration steps similar to the adjoint method for82 NeuralODEs ( Chen et al. , 2018 ) . Tzen & Raginsky ( 2019 ) discuss the computation of gradients by83 simulation of a forward SDE in the derivatives with respect to parameters of the model using the84 chain rule of stochastic calculus . This approach does not require back-propagating through the SDE85 solver . Kidger et al . ( 2021 ) propose a method of learning SDEs by treating the SDE as the generator86 in a generative adversarial network setup , using a second SDE for the discriminator . All of these87 approaches use SDE integration algorithms to estimate path-space expectations.88 Batz et al . ( 2018 ) consider a nonparametric approach to SDE learning , using Gaussian processes89 for the drift and diffusion functions . They initially consider a gradient matching approximation , in90 which the drift Gaussian process may be fit directly by conventional methods , and thereafter use an91 expectation-maximization algorithm , and estimate the transition probability for sparse observations92 using a linear approximation of the process . Yildiz et al . ( 2018 ) propose an alternative approach to93 Gaussian process-based SDE learning using the Euler–Maruyama integrator , approximating f by the94 predictive mean of a Gaussian process conditioned on a MAP estimate for a set of inducing points.95 Unfortunately , this approach completely ignores any uncertainty in the posterior over f .96 It should be noted that each of the above mentioned studies rely on SDE integrators to generate97 trajectories and therefore face the same difficulties associated with them . Furthermore , almost all98 of the experiments therein are on system of dimension between 1 and 3 , with a small number of99 experiments of dimension as high as 6 . We are unaware of any work which trains neural SDEs in100 higher dimensions , and we believe this is a testament to the inherent difficulty of learning SDEs in101 high dimensions.102 Much other work focuses on learning specific classes of SDE or ODE models , such as symplectic or103 Hamiltonian systems ( Zhong et al. , 2020 ; Greydanus et al. , 2019 ) , graph-based models ( Poli et al.,104 2021 ; Sanchez-Gonzalez et al. , 2019 ) , and controlled differential equations ( Morrill et al. , 2021 ) .105 Many of these ideas are independent of the learning algorithm and can potentially make use of our106 algorithm when applied to SDEs.107 2 PATH-SPACE IMPORTANCE SAMPLING108 It is well known that solutions of linear SDEs are Gaussian processes ( see Pavliotis , 2014 , Section 3.7 ) .109 For these processes , the joint probability density over some finite collection of points is available110 in closed form . Furthermore , the posterior distribution of the process conditioned on some set of111 observations can be sampled from exactly . Unfortunately , this is not the case in general for non-linear112 SDEs , and one has to resort to approximation methods in order to calculate probabilities . Most113 commonly , one uses an SDE integrator to estimate expectations ; however , other methods , such as114 Laplace approximations and perturbation theory are sometimes used ( Karimi & McAuley , 2016 ; 115 Dass et al. , 2017 ; Hutzenthaler & Jentzen , 2020 ) .116 Alternatively , if we are able to find a second process which follows a similar SDE to the one of117 interest , it is possible to express expectations and probabilities as importance sampling estimators.118 Linear SDEs are an attractive candidate for this due to their Gaussianity and ease of sampling.119 2.1 STATE-INDEPENDENT DIFFUSION120 For now , consider the simpler scenario in which the diffusion coefficient does not depend on the state121 variable ; i.e . g ( x , t ) = σ ( t ) for some function σ . The process defined by122 dY = σ ( t ) dW , ( 5 ) is Gaussian with mean zero and conditional variance123 EY [ ( Y ( t1 ) − Y ( t0 ) ) 2 ] = ∫ t1 t0 σ ( t ) σT ( t ) dt . ( 6 ) Sample paths of Y can be generated efficiently by simulating Brownian motion . The process Y124 conditioned on a set of observations of the process is a Brownian bridge . If we are able to express125 quantities of interest as expectations under this process instead of our original SDE , then we can126 efficiently estimate such quantities via Monte Carlo sampling . As it turns out , expectations and127 probabilities for an SDE with a general drift term can in fact be expressed as such . This relation is128 given in the following theorem.129 Theorem 1 Let X and Y be the stochastic processes generated by the following SDEs dX = f ( X , t ) dt+ σ ( t ) dW , ( 7 ) dY = σ ( t ) dW . ( 8 ) Further assume that σ ( t ) σT ( t ) is Lebesgue-almost-everywhere invertible and f is sufficiently well-130 behaved such that X ( t ) has a unique probability density for all t.131 The probability density of observations { ( tn , xn ) } N n=1 , under the process X is given by the condi-132 tional expectation133 pX ( x1 : N ) = pY ( x1 : N ) EY [ eS [ Y ] ∣∣∣ { Y ( tn ) = xn } Nn=1 ] , ( 9 ) where134 S [ Y ] = ∫ fT ( Yt , t ) ( σ ( t ) σT ( t ) ) −1 dYt − 1 2 ∫ fT ( Yt , t ) ( σ ( t ) σT ( t ) ) −1 f ( Yt , t ) dt . ( 10 ) This result follows from Girsanov ’ s theorem ( Girsanov , 1960 ; Malliavin & Thalmaier , 2006 , Sec-135 tion 1.5 ) and the definition of conditional expectation . Intuitively speaking , the first term in Equa-136 tion 10 encourages f to line up with typical paths which pass through the observations , while the137 second term regularizes the magnitude of f .138 Theorem 1 allows us to develop an importance sampling algorithm for estimating probabilities under139 the process X by simulating the process Y , where the importance weights are given by ωi = eS [ Y ( i ) ] .140 In this approach , one can generate entire sample paths of Y before calculating f ( Y , t ) , allowing the141 forward pass of f to be performed in parallel . This approach is described in Algorithm 1.142 Algorithm 1 Path Integral Importance Sampling 1 : for i = 1 , . . . , K do 2 : Sample ( Yt ) tNt=t1 , s.t . for each n , Ytn = xn . Y is a Brownian bridge 3 : ft ← f ( Yt , t ) for each t 4 : α← ∑ t f T t σ −2 ( t ) ( Yt+∆t − Yt ) 5 : β ← ∑ t f T t σ −2 ( t ) ft ∆t 6 : Si ← α− 12β 7 : end for 8 : return pY ( x1 : N ) 1K ∑ i exp ( Si ) An important property of this algorithm is that the sampled paths directly pass through observations.143 This means that the probability estimates directly relate the drift function f to plausible trajectories144 instead of allowing the particles to wander around randomly . See Figure 2 for an illustration . In the145 initial stages of training , simply integrating the SDE with drift f will typically not lead to trajectories146 which pass near the data , especially in high dimensions . This can have a significant impact on the147 variance of the gradients and can inhibit the model ’ s ability to learn . Training on paths that pass148 through the data can greatly mitigate this high variance . As with other algorithms that generate SDE149 sample paths , the discretization of the integrals introduces a small bias . However , this bias vanishes150 in the ∆t→ 0 limit.151 2.1.1 A NOTE ON PARALLELIZABILITY152 With the exception of the sampling step in Line 2 of Algorithm 1 , each of the other operations,153 including the sums , can be performed in parallel over feature and batch dimensions , as well as over154 the t and i indices . Sampling a Brownian bridge , or any conditional Gauss–Markov process , can155 be performed by first sampling the unconditional process , and then linearly interpolating with the156 observations . The linear interpolation can be performed independently , and therefore in parallel , over157 the time dimension . The only operation that is not completely parallelizable is the sampling of the158 unconditional base process — in this case standard Brownian motion . Brownian paths can be sampled159 by cumulative summation of independent normal random numbers . However , this cumulative sum is160 extremely fast , and can be performed independently between each consecutive pair of observations.161 In our tests , sampling whole Brownian trajectories was about 5 orders of magnitude faster than the162 forward pass of the neural network f , and so does not create any noticeable performance impact.163 Once the Brownian paths are sampled , the rest of Algorithm 1 may be implemented in parallel164 without difficulty . Contrast this to standard integrator-base methods ; even if the Brownian paths are165 sampled upfront , the integrator must still perform each of the forward passes of f in sequence.166 See Appendix B for more details on sampling Gaussian bridges.167 2.2 STATE-DEPENDENT DIFFUSION168 The assumption that g is independent of the state is not in fact required for the validity of Theorem 1 ; 169 the reason this assumption is required is to ensure that the process Y is Gaussian , so as to enable170 easy conditional sampling and calculation of pY ( x1 : N ) . Unfortunately , one can not simply find an171 analogue of Theorem 1 to calculate expectations of a general process as expectations with respect to172 a constant diffusion process.173 To address the question of state-dependent diffusion , it is enlightening to consider a simple example174 of such a process . Perhaps the most common example is geometric Brownian motion175 dX = µX dt+ σX dW . ( 11 ) The typical way in which one would solve this is to introduce a transformation Z = log ( X ) , and176 apply Itô ’ s lemma ( see Malliavin & Thalmaier , 2006 , Section 1.5 ; Pavliotis , 2014 , Section 3.5 ) to177 obtain the SDE178 dZ = ( µ− 12σ 2 ) dt+ σ dW . ( 12 ) Similarly , one might address a problem of a general state-dependent diffusion coefficient by consider-179 ing a transformation to a space in which the transformed equation has constant diffusion . Let T ( · , t ) 180 be a map which is invertible for all t. That is , there exists a function T−1 such that if y = T ( x , t ) ,181 then x = T−1 ( y , t ) . Transforming a process with constant diffusion σ , by the map T−1 gives a182 process with diffusion coefficient183 gi , j ( x , t ) = ∂T−1i ∂yk σk , j = ( ∂T ( x , t ) ∂x ) −1 i , k σk , j , ( 13 ) where repeated indices imply summation . With such a transformation we can represent any diffusion184 matrix that can be written as a Jacobian . While the restrictions on the diffusion matrix may be seen as185 an inherent limitation of a path-space importance sampling approach , it may be argued that constant186 or simple diffusion functions would cover the majority of cases of interest , and almost all real-world187 problems require some form of data pre-processing and , potentially , link functions.188 This transformation allows us to infer the SDE in a transformed space , with constant diffusion , and,189 if desired , transform the equation back to the original space using Itô ’ s lemma . This approach is190 described in Algorithm 2 , where we have used the symbol f̃ to represent the drift in the transformed191 space as to avoid ambiguity with the drift in the original space . One important point to note is that one192 should be careful to allow gradients to propagate through the sampling step on Line 2 in Algorithm 2,193 so as to allow learning of the function T . Algorithm 2 Transformed-State Path Integral Importance Sampling 1 : for i = 1 , . . . , K do 2 : Sample ( Yt ) tNt=t1 , s.t . for each n , Ytn = T ( xn , tn ) . Y is a Brownian bridge 3 : f̃t ← f̃ ( Yt ) for each t 4 : α← ∑ t f̃ T t σ −2 ( Yt+∆t − Yt ) 5 : β ← ∑ t f̃ T t σ −2f̃t ∆t 6 : Si ← α− 12β 7 : end for 8 : return ∏ n det ( ∂T ( xn , tn ) ∂xn ) pY ( T ( x1 : N , t1 : N ) ) 1 K ∑ i exp ( Si ) 194 One would typically apply this method to infer f̃ rather than the original f for performance reasons,195 and then only reconstruct the SDE in the original space if required.196 2.2.1 RECONSTRUCTION OF THE SDE IN THE UNTRANSFORMED SPACE197 Generation of new sample paths can be performed easily in the transformed space and then simply198 transforming back by applying T−1 . However , sometimes one needs more information for the199 purposes of analysing the learned equation . In this case the SDE can be transformed back using Itô ’ s200 lemma . The drift and diffusion coefficients are201 fi ( x , t ) = ∂T−1i ∂t + ∂T−1i ∂yk f̃k ( y , t ) + 1 2 σj , k ∂2T−1i ∂yj∂yl σl , k , ( 14 ) gi , j ( x , t ) = ∂T−1i ∂yk σk , j . ( 15 ) All expression are evaluated at y = T ( x , t ) . When T is parameterized by a neural network with202 ReLU non-linearities , the second derivative term in Equation ( 14 ) is almost-everywhere zero . The203 remaining terms are Jacobian vector products , and so can be performed efficiently even in high204 dimensions.1205 3 EXPERIMENTS206 In this section , we provide some experiments to illustrate and verify the performance and capabilities207 of our proposed algorithm . Further details on the experiments are given in Appendix C.208 3.1 THE LORENZ SYSTEM209 To compare the effect of our algorithm on learning , we follow Li et al . ( 2020 ) and train a neural210 network based SDE model on the Lorenz system . In this model the drift function is given by a211 1However , this may require forward-mode instead of backward-mode differentiation . multi-layer perceptron , and the diffusion term is a simple scalar . We generated 16 independent212 paths , consisting of 200 observations each , uniformly sampled over a time interval of [ 0 , 10 ] . We213 trained the model on this data by two different methods . In the first method , we minimize the214 mean-squared error , estimated by integrating out the SDE , and calculating gradients using the adjoint215 method ( Li et al. , 2020 ) .2 In the second method , we directly optimize the log-probability calculated216 using Algorithm 1 . In both cases we used precisely the same optimization parameters , the same217 time-step size ∆t , and the same number of sampled trajectories to calculate averages . Both models218 used the same seed for the neural network initialization , and the same number of gradient steps were219 performed in both cases . These models were trained on an Nvidia RTX 3070 , with 8Gb of memory.220 To assess the performance of these approaches , we record two metrics . The first is the mean-square221 difference between the learned drift vector field , and the Lorenz vector field , normalized by the mean-222 square magnitude of the Lorenz vector field , measured at the observations . Written mathematically:223 err = ∑ n ( fθ ( xn ) − fLor ( xn ) ) 2∑ n ( fLor ( xn ) ) 2 ( 16 ) This metric is shown in Figure 3b . The second metric we record is the mean-squared error of sampled224 trajectories compared to the observations ; this is shown in Figure 3a . However , we note that this is225 not a fair performance metric since the adjoint-based method is directly optimizing for it . On the226 x-axis we show the training time in minutes.227 In Figure 3 we have limited the range of the x-axis in order for the lines to be more clearly visible.228 The total training time for the adjoint-based MSE optimization was a factor 52 longer than the time229 taken optimizing the probability estimates . We note that , while our approach was significantly faster,230 it did use approximately four times as much memory as the adjoint-based method.3231 The poor performance of the integrator-based learning algorithm in Figure 3b — despite its low mean-232 squared-error — suggests that directly optimizing for the discrepancy of typical SDE sample-paths233 compared to observations is not a robust approach to SDE learning.234 3.2 GRADIENT VARIANCE235 We applied both our algorithm and an SDE integrator to a neural network-based SDE model on236 a real-world dataset and recorded the gradients , sampled over many independent trajectories . We237 thereafter computed the variance of the gradients individually per parameter , for various time lengths238 between observations . We used a discretization step size of 0.01 . These results are shown in Figure 4.239 2We also attempted training a model without the adjoint method and instead directly backpropagating through the SDE integrator . However , a single forward pass required more memory than available on the GPU . 3The adjoint algorithm was specifically designed to have constant memory complexity in the number of integration steps . Our algorithm does not exhibit this feature . In each case we used the same neural network , initialized with a fixed seed , and the exact same values240 for all parameters . We used the same loss functions as in Section 3.1 . The data set we used was the241 Hungarian chickenpox cases dataset from the UCI machine learning repository ; 4 it has 20 features242 per observation . We scaled the features by their standard deviations before performing the experiment243 to improve numerical stability.244 Our findings are as follows:245 • For very short times , we found that both algorithms produced comparable gradient variances:246 typically less than 10−7.247 • For longer time spans ( 3 orders of magnitude larger than the discretization step size ) , the248 gradient variance of our algorithm increased by a few orders of magnitude ; the maximum249 we observed was on the order of 10−4 . However , the SDE integrator approach resulted in250 huge increases in variances , with some as large as 1018.251 • Between the above two extremes , we found that the gradient variance of our approach did252 increase with the time between observations , but stayed below 10−5 , while the gradient253 variance from the SDE integrator exhibited very poor scaling with variances of up to 108 for254 times between observations of 1.0.255 Considering that both approaches produced comparable variances on very small timescales , we feel256 that this experiment represents a fair comparison.257 3.3 UNCERTAINTY QUANTIFICATION WITH VARIATIONAL GAUSSIAN PROCESSES258 We attempt to test the viability of using our method for an SDE model with a GP prior over the drift259 function and fitting the posterior variationally . To assess this , we used data trajectories from a van der260 Pol oscillator . For the GP prior , we used a zero mean function and a radial basis function kernel , with261 independent GP priors over each output dimension of the drift vector field . These choices are not262 necessarily optimal ; however , the purpose of this experiment is merely to illustrate the feasibility of263 using variational GP to learn the vector field of an SDE model.264 We used a grid-based inducing point approach and the kernel interpolation method of Wilson & 265 Nickisch ( 2015 ) . The combination of these techniques allows one to take advantage of the Kronecker266 product structure of the covariance matrices and the Toeplitz structure of each factor for accelerated267 sampling . The model was trained variationally , sampling the variational posterior jointly along entire268 trajectories.269 4This dataset can be found at https : //archive.ics.uci.edu/ml/datasets/Hungarian+ Chickenpox+Cases The approximate GP posterior is shown in Figure 5a compared to the ground truth vector field of the270 van der Pol oscillator in Figure 5b . Comparing the GP to the van der Pol vector field , we found that271 the GP model was fairly accurate in areas with many data points , while reverting to the prior far away272 from observations . To assess the quality of the uncertainty quantification , we further calculated the273 discrepancy between the variational posterior and the ground truth vector field . Over a dense grid,274 covering an enlarged area around the observations , we calculated the discrepancy as275 δ = fvdp ( x ) − µ ( x ) σ ( x ) . ( 17 ) A histogram is shown in Figure 5c.276 Under Gaussianity assumptions , one expects to see the quantiles line up well with some associated277 number of standard deviations . However , this will only be the case near to the observations . In278 regions where the GP reverts to the prior , which has a stationary kernel , the mismatch between the279 GP and the polynomial growth of the van der Pol oscillator results in heavy tails . We expect that a280 better choice of kernel , which accounts for this polynomial behaviour , to show residuals with lighter281 tails . We found that the distribution of these δs was fatter-tailed than a Gaussian distribution ; the282 middle 50 % ( 25 % - 75 % quantiles ) slightly passed one standard deviation on either side , as opposed283 to the 68 % of a standard Gaussian distribution . The middle 80 % ( 10 % - 90 % quantiles ) were within284 3 standard deviations . While the posterior uncertainty was somewhat overconfident , it was not wholly285 unreasonable.286 We further note that , while the complexities involved in variational GP fitting can result in longer287 training times , we still found that our method applied to a GP was significantly faster than using an288 SDE integrator with a neural network.289 4 DISCUSSION290 In this work we introduced an algorithm to efficiently estimate probabilities of observations under291 the assumption of an SDE model for the purposes of learning . The proposed approach produces292 estimates which are accurate , even in high dimensions , and can fully utilize parallel hardware for293 significant speedups.294 The proposed algorithm is capable of providing robust probability estimates which can be used in295 models both with or without an explicit observation noise component . This is in contrast to SDE296 integrator-based learning approaches , which must incorporate and estimate an explicit error term due297 to their inability to generate paths which are guaranteed to pass through the observations.298 Our algorithm produces more stable estimates than alternative integrator-based approaches , particu-299 larly when the observations are sparsely distributed over long time intervals and in high dimensions.300 This in turn results in more stable and robust learning . With the rise in applicability of large-scale301 ( neural network ) SDE modeling in science , simulation , and domains such as finance , we see our302 approach as an important contribution to reliable scaling of these methods.303 REPRODUCIBILITY304 Efforts have been made to describe all parameters and details of the algorithms used in this paper,305 either in the content or in the appendix . The code included in the supplementary material includes306 a Dockerfile and instructions for running some of the experiments . Where relevant , fixed seeds for307 random number generators can be found in the code during initialization.308 REFERENCES309 Philipp Batz , Andreas Ruttor , and Manfred Opper . Approximate Bayes learning of stochastic310 differential equations . Phys . Rev . E , 98:022109 , Aug 2018. doi : 10.1103/PhysRevE.98.022109.311 URL https : //link.aps.org/doi/10.1103/PhysRevE.98.022109.312 Ricky T. Q. Chen , Yulia Rubanova , Jesse Bettencourt , and David K Duvenaud . Neural ordinary313 differential equations . 31 , 2018 . URL https : //proceedings.neurips.cc/paper/314 2018/file/69386f6bb1dfed68692a24c8686939b9-Paper.pdf.315 Sarat C. Dass , Jaeyong Lee , Kyoungjae Lee , and Jonghun Park . Laplace based approximate posterior316 inference for differential equation models , differential equations . Statistics and Computing , 27:317 679–698 , 2017. doi : 10.1007/s11222-016-9647-0.318 I. V. Girsanov . On transforming a certain class of stochastic processes by absolutely continuous319 substitution of measures . Theory of Probability & Its Applications , 5 ( 3 ) :285–301 , 1960. doi:320 10.1137/1105027 . URL https : //doi.org/10.1137/1105027.321 Samuel Greydanus , Misko Dzamba , and Jason Yosinski . Hamiltonian Neural Networks.322 In H. Wallach , H. Larochelle , A. Beygelzimer , F. d'Alché-Buc , E. Fox , and R. Gar-323 nett ( eds . ) , Advances in Neural Information Processing Systems , volume 32 . Curran Asso-324 ciates , Inc. , 2019 . URL https : //proceedings.neurips.cc/paper/2019/file/325 26cd8ecadce0d4efd6cc8a8725cbd1f8-Paper.pdf.326 Martin Hutzenthaler and Arnulf Jentzen . On a perturbation theory and on strong convergence rates327 for stochastic ordinary and partial differential equations with nonglobally monotone coefficients.328 The Annals of Probability , 48 ( 1 ) , Jan 2020 . ISSN 0091-1798. doi : 10.1214/19-aop1345 . URL329 http : //dx.doi.org/10.1214/19-AOP1345.330 Junteng Jia and Austin R Benson . Neural jump stochastic differential equations . In331 H. Wallach , H. Larochelle , A. Beygelzimer , F. d'Alché-Buc , E. Fox , and R. Garnett332 ( eds . ) , Advances in Neural Information Processing Systems , volume 32 . Curran Asso-333 ciates , Inc. , 2019 . URL https : //proceedings.neurips.cc/paper/2019/file/334 59b1deff341edb0b76ace57820cef237-Paper.pdf.335 Hadiseh Karimi and Kimberley B. McAuley . Bayesian Estimation in Stochastic Differential336 Equation Models via Laplace Approximation . IFAC-PapersOnLine , 49 ( 7 ) :1109–1114 , 2016.337 ISSN 2405-8963. doi : https : //doi.org/10.1016/j.ifacol.2016.07.351 . URL https : //www.338 sciencedirect.com/science/article/pii/S2405896316305584 . 11th IFAC339 Symposium on Dynamics and Control of Process SystemsIncluding Biosystems DYCOPS-CAB340 2016.341 Patrick Kidger , James Foster , Xuechen Li , and Terry J Lyons . Neural SDEs as Infinite-Dimensional342 GANs . In Marina Meila and Tong Zhang ( eds . ) , Proceedings of the 38th International Conference343 on Machine Learning , volume 139 of Proceedings of Machine Learning Research , pp . 5453–5463.344 PMLR , 18–24 Jul 2021 . URL https : //proceedings.mlr.press/v139/kidger21b.345 html.346 Prashant Kumar , Martin Schmelzer , and Richard P. Dwight . Stochastic turbulence modeling in RANS347 simulations via multilevel Monte Carlo . Computers & Fluids , 201:104420 , 2020 . ISSN 0045-7930.348 doi : https : //doi.org/10.1016/j.compfluid.2019.104420 . URL https : //www.sciencedirect.349 com/science/article/pii/S0045793019303780.350 Xuechen Li , Ting-Kam Leonard Wong , Ricky T. Q. Chen , and David Duvenaud . Scalable gradients351 for stochastic differential equations . International Conference on Artificial Intelligence and352 Statistics , 2020.353 Xuanqing Liu , Tesi Xiao , Si Si , Qin Cao , S. Kumar , and Cho-Jui Hsieh . Neural SDE : Stabilizing354 Neural ODE Networks with Stochastic Noise . ArXiv , abs/1906.02355 , 2019.355 Paul Malliavin and Anton Thalmaier . Stochastic Calculus of Variations in Mathematical Finance.356 Springer , 01 2006 . ISBN 3-540-43431-3. doi : 10.1007/3-540-30799-0.357 James Morrill , Cristopher Salvi , Patrick Kidger , and James Foster . Neural rough differential equations358 for long time series . In Marina Meila and Tong Zhang ( eds . ) , Proceedings of the 38th International359 Conference on Machine Learning , volume 139 of Proceedings of Machine Learning Research , pp.360 7829–7838 . PMLR , 18–24 Jul 2021 . URL https : //proceedings.mlr.press/v139/361 morrill21b.html.362 GA Pavliotis . Stochastic Processes and Applications : Diffusion Processes , the Fokker–Planck and363 Langevin Equations . Springer , 2014.364 Michael Poli , Stefano Massaroli , Junyoung Park , Atsushi Yamashita , Hajime Asama , and Jinkyoo365 Park . Graph neural ordinary differential equations . 2021.366 Alvaro Sanchez-Gonzalez , Victor Bapst , Kyle Cranmer , and Peter Battaglia . Hamiltonian Graph367 Networks with ODE Integrators , 2019.368 Belinda Tzen and M. Raginsky . Neural stochastic differential equations : Deep latent Gaussian models369 in the diffusion limit . ArXiv , abs/1905.09883 , 2019.370 Andrew Wilson and Hannes Nickisch . Kernel Interpolation for Scalable Structured Gaussian Pro-371 cesses ( KISS-GP ) . In Francis Bach and David Blei ( eds . ) , Proceedings of the 32nd International372 Conference on Machine Learning , volume 37 of Proceedings of Machine Learning Research,373 pp . 1775–1784 , Lille , France , 07–09 Jul 2015 . PMLR . URL http : //proceedings.mlr.374 press/v37/wilson15.html.375 C. Yildiz , M. Heinonen , J. Intosalmi , H. Mannerstrom , and H. Lahdesmaki . Learning stochastic376 differential equations with gaussian processes without gradient matching . In IEEE International377 Workshop on Machine Learning for Signal Processing . MLSP , 2018.378 Yaofeng Desmond Zhong , Biswadip Dey , and Amit Chakraborty . Symplectic ode-net : Learning379 hamiltonian dynamics with control . In International Conference on Learning Representations,380 2020 . URL https : //openreview.net/forum ? id=ryxmb1rKDS.381 A THEOREM 1382 We have that X and Y are processes obeying the SDEs dX = f ( X ) dt+ g ( X ) dW , ( 18 ) dY = g ( Y ) dW , ( 19 ) dropping the time argument for notational simplicity . Expectations with respect to SDEs can be expressed as path integrals . In the Itô convention , the path integral representation of an SDE has the following form EX [ F [ X ] ] = lim N→∞ ∫ F [ x ] N∏ n=1 dxn√ 2π∆tng ( xn−1 ) exp { −1 2 N∑ n=1 ( ∆xn − f ( xn−1 ) ∆tn g ( xn−1 ) √ ∆tn ) 2 } ( 20 ) = : ∫ DxF [ x ] J exp { −1 2 ∫ L ( x ( t ) , ẋ ( t ) ) dt } , ( 21 ) where J is a Jacobian factor which depends on g but not f and the Lagrangian is given by383 L ( x , ẋ ) = ( ẋ− f ( x ) g ( x ) ) 2 . ( 22 ) The derivative of x here may be thought of distributionally ; however , the expression for the measure384 Dx exp { − 12 ∫ L } need only be defined on the Cameron–Martin subspace5 ; guaranteeing its unique385 extension to the whole Wiener space . In contrast to this , the expression inside the expectation386 F [ x ] should be defined almost-everywhere , and hence care should be taken when ẋ appears in an387 expectation.388 We may expand the quadratic to separate the Lagrangian into a drift-free term plus terms dependent on the drift L = ( ẋ g ( x ) ) 2 ( 23 ) − 2fT ( x ) g−2 ( x ) ẋ ( 24 ) + fT ( x ) g−2 ( x ) f ( x ) . ( 25 ) The first term , on line 23 , is the Lagrangian for the process Y , which has no drift term . Shuffling the389 rest of the terms out of the measure and into the expectation , we have390 EX [ F [ X ] ] = ∫ DxF [ x ] eS [ x ] exp { −1 2 ∫ ( ẋ g ( x ) ) 2 dt } , ( 26 ) where S [ X ] = ∫ fT ( Xt ) g −2 ( Xt ) Ẋt dt ( 27 ) − 1 2 ∫ fT ( Xt ) g −2 ( Xt ) f ( Xt ) dt ( 28 ) = ∫ fT ( Xt ) g −2 ( Xt ) dXt ( 29 ) − 1 2 ∫ fT ( Xt ) g −2 ( Xt ) f ( Xt ) dt . ( 30 ) Note that on the third line we have used the distributional definition of Ẋ ; i.e . Ẋt dt = dXt.391 Lastly , using the definition of conditional expectation , we have that392 EA [ F [ A ] p ( B = b|A ) ] = EA [ p ( B = b|A ) ] EA [ F [ A ] ∣∣∣B = b ] . ( 31 ) By trivial substitution , we have393 pX ( x1 : N ) = pY ( x1 : N ) EY [ eS [ Y ] ∣∣∣ { Y ( tn ) = xn } Nn=1 ] . ( 32 ) B SAMPLING BRIDGES394 Let Y be a Gauss–Markov process with kernel k. Since the process is Markov , we need only sample395 the process conditioned on two end-points . Let y = ( y0 , yT ) be the known values of the process at396 times τ = ( t0 , T ) . Let Ỹ be the process defined by397 Ỹt : = Yt +K ( t , τ ) K ( τ , τ ) −1 ( y − Yτ ) , for t0 ≤ t ≤ T , ( 33 ) whereK is the matrix whose entries are k ( ti , tj ) . This distribution of Ỹ is the same as the distribution398 of Y conditioned on the values y at times τ . Note that once Yt has been sampled — which may399 require a cumulative sum — this transformation can be performed independently , and hence in400 parallel , for each t. For each consecutive pair of observations , the bridge process can be sampled401 independently.402 5The Hilbert space of functions whose derivatives are square integrable . The Wiener space is the space of continuous functions . This is not a Hilbert space , instead it is a Banach space with the supremum norm . The measure of the Cameron–Martin space is in fact zero ; the sample paths of the SDE are almost-surely nowhere differentiable . In the simplest case , where Y is a Brownian motion starting from y0 at time t0 = 0 , this reduces to Ỹt = Yt + k ( t , T ) k ( T , T ) ( yT − YT ) ( 34 ) = Yt + t T ( yT − YT ) . ( 35 ) And similarly for any other processes which can be sampled with a fixed starting point.403 In the more general case we can invert the two by two matrix to get an explicit formula for Ỹt Ỹt = Yt + k ( t , t0 ) k ( T , T ) − k ( t , T ) k ( t0 , T ) k ( t0 , t0 ) k ( T , T ) − k ( t0 , T ) 2 ( y0 − Y0 ) ( 36 ) + k ( t , T ) k ( t0 , t0 ) − k ( t , t0 ) k ( t0 , T ) k ( t0 , t0 ) k ( T , T ) − k ( t0 , T ) 2 ( yT − YT ) . ( 37 ) This may be extended straightforwardly to other cases , such as conditioning on the values of the404 integral , or derivative of the process etc.405 C EXPERIMENTS406 C.1 PROBABILITY ESTIMATES407 As a sanity check , we compare the log-probability estimates of our algorithm to the actual log-408 probabilities of an Ornstein–Uhlenbeck process . The probability density for this process is available409 in closed form for any number of observations . We estimate the probability of a set of data points410 evenly spaced over a time interval of [ 0 , 10 ] , taken from a sine function xn = sin ( π/10× tn ) . For411 these estimates we used 1000 time steps to estimate the integral S , and averaged over 100 trajectories,412 independently sampled from a Brownian bridge passing through the observations . We repeated this413 process 1000 times and report the mean and standard deviation of these estimates . Figure 6 shows414 these estimates compared to the analytic probability given by the Ornstein–Uhlenbeck process for415 various numbers of observations as a function of the dimension of the problem.416 An interesting observation is that the variance of the estimator seems to decrease with the number417 of data points . This is atypical of probability estimators , since the magnitude of the log-probability418 increases linearly with the number of observations ( not to be confused with the number of samples419 used to estimate the log-probability ) . In almost all cases , with the exception of 4 observations in420 more than 40 dimensions , our algorithm gives accurate log-probability estimates with small standard421 deviations . The error of this exception is approximately 30 % , but is significantly reduced by adding422 more observations , or using more samples . We believe this error is acceptable considering the small423 number of observations and the large scale . For 10 observations in 100 dimensions the standard424 deviation of our estimator is only 0.4 % of the magnitude of the log-probability and the error of the425 mean estimate is 2 % of the analytic log-probability . This small bias can be further reduced by using426 more samples or a smaller ∆t . A single estimate in the 100 dimensional case took less than half a427 second to compute on a laptop CPU , and is therefore feasible to use in the inner loop of a learning428 algorithm.429 C.2 LORENZ430 C.2.1 DATA SET431 We generated data by simulating a Lorenz system with the exact same parameters as Li et al.432 ( 2020 ) . We generated 16 independent trajectories , with initial values sampled from a standard normal433 distribution , and discretely sampled the values of the process over 200 equally spaced time points434 ranging from 0 to 10 . Unlike Li et al . ( 2020 ) , we did not add any observation noise to the data.435 We deliberately used a sparser data set than Li et al . ( 2020 ) , due to personal experience of the difficulty436 of fitting SDE models on sparse observations.437 C.2.2 MODEL438 The model we used to fit to the observations was439 dXt = fθ ( Xt ) dt+ σ dW , ( 38 ) where σ is a scalar and fθ is a fully-connected neural network with ReLU nonlinearities and parame-440 ters θ . We used layer sizes of 3→ 32→ 256→ 32→ 3.441 C.2.3 TRAINING PARAMETERS442 We used precisely the same parameters for each model , the only difference in the training procedures443 being the loss functions used . In the first case , the loss function per trajectory was444 Lmse ( θ ; x1 : N ) = 1 KN ∑ k , n ( X ( k ) tn − xn ) 2 , ( 39 ) where N = 200 is the number of observations per trajectory , and K is the number of sampled paths445 used to estimate the MSE , and X ( k ) is sampled using an SDE integrator starting at X ( k ) t1 = x1 . We446 then averaged this loss function over the 16 independent observed trajectories.447 In the second case , the loss function per trajectory was448 LPI ( θ ; x1 : N ) = − 1 N log p̂X ( x1 : N | θ ) , ( 40 ) where p̂X ( x1 : N | θ ) is calculated using Algorithm 1 with K trajectory samples . Again this loss was449 averaged over the 16 independent observed trajectories . In both cases we used K = 64 and a time450 step size of ∆t = 10−2.451 For each model we used the Adam optimizer with a learning rate of 10−3 and ran the optimization452 algorithm for 104 iterations . The model using our importance sampling approach completed the full453 number of iterations in 34 minutes , while the integrator-based approach took 29 hours and 46 minutes454 to complete the same number of iterations.455 Our approach consistently maintained 100 % GPU utilization , except during MSE evaluation which456 used an integrator , while the integrator based approach was unable to surpass 25 % GPU utilization in457 this experiment.458 C.3 VARIATIONAL GAUSSIAN PROCESSES459 Our approach allows more straightforward implementation of SDE models using a Gaussian process460 prior for the drift function . Some previous approaches often resort to approximations such as461 using only the predictive mean or MAP estimates ( Yildiz et al. , 2018 ) . For dense observations,462 directly discretizing the SDE and fitting the GP to the observation deltas may be viable . For sparse463 observations this is much more difficult . Our proposed method makes variational GP methods slightly464 simpler , since the values of f ( Yt ) can be sampled jointly along the path . However , it is important to465 note that various complexities still arise such as the difficulty of efficiently sampling high-dimensional466 Gaussian distributions.467 We used the kernel interpolation method of Wilson & Nickisch ( 2015 ) which stores a grid of468 inducing locations per dimension . Storing inducing locations per dimension for a Kronecker product469 kernel effectively gives a variational distribution over md inducing points with only d×m memory470 requirements , where m is the number of inducing points per dimension and d is the dimension . When471 these inducing locations are evenly spaces , the covariance factors have a Toeplitz structure which472 allows sampling in linearithmic time complexity.473 To fit the model we used gradient ascent on the ELBO which is calculated as follows:474 ELBO = Ef∼q [ log p ( x|f ) ] −KL [ q ( f ) |p ( f ) ] . ( 41 ) The KL divergence is between two Gaussian distributions calculated at the inducing locations in475 the usual way . For the likelihood term , we generated trajectories ( as in Algorithm 1 ) , followed by476 jointly sampling the variational GP posterior along these trajectories and proceed with the rest of the477 computation in Algorithm 1 using these samples . Our optimization objective is calculated478 L = − 1 K ∑ K log p̂ ( x1 : N | f ( k ) ) + KL [ q ( f ) |p ( f ) ] , ( 42 ) where each f ( k ) is an independent sample over the whole path of Y . In other words , f ( k ) ( Yt1 ) and479 f ( k ) ( Yt2 ) are correlated , but f ( k ) ( Yt1 ) and f ( j ) ( Yt2 ) are not when k 6= j.480 In our experiment we used 32 evenly spaced inducing points per dimension , and jointly sampled the481 variational posterior over 64 trajectories of 1024 time steps . The model was trained with the Adam482 optimizer with an initial learning rate of 0.1 , and an exponential decay with factor 0.999 for 105483 training steps . However , the square deviation of the predictive mean from the ground truth converged484 well before 104 iterations . Training for 104 iterations took 34 minutes , 105 iterations took about 5485 and a half hours.486 | The paper proposes an importance sampling method for the estimation of probabilities in SDE models, applicable to SDEs with state-independent (or transformable to state-independent) diffusion. By taking the advantage of Girsanov's theorem, the probability density of the observations is rewritten as a weighted probability with respect to a base Brownian motion process. Sampling results are presented qualitatively and compared to integration based sampling. Results also suggest that the proposed method is faster than integration based methods and the gradients have lower variances. In addition, a variational GP examples is demonstrated showing that the method can provide reasonable uncertainty estimation. | SP:eea7e96cea9dddb19afeb4b9b33ba9de850cef0f |
Robust and Scalable SDE Learning: A Functional Perspective | Stochastic differential equations provide a rich class of flexible generative models,1 capable of describing a wide range of spatio-temporal processes . A host of re-2 cent work looks to learn data-representing SDEs , using neural networks and other3 flexible function approximators . Despite these advances , learning remains compu-4 tationally expensive due to the sequential nature of SDE integrators . In this work,5 we propose an importance-sampling estimator for probabilities of observations of6 SDEs for the purposes of learning . Crucially , the approach we suggest does not7 rely on such integrators . The proposed method produces lower-variance gradient8 estimates compared to algorithms based on SDE integrators and has the added9 advantage of being embarrassingly parallelizable . This facilitates the effective use10 of large-scale parallel hardware for massive decreases in computation time.11 1 INTRODUCTION12 Stochastic differential equations ( SDEs ) are a natural extension to ordinary differential equations13 which allows modelling of noisy and uncertain driving forces . These models are particularly appealing14 due to their flexibility in expressing highly complex relationships with simple equations , while15 retaining a high degree of interpretability . Much work has been done over the last century focussing16 on understanding and modelling with SDEs , particularly in dynamical systems and quantitative17 finance ( Pavliotis , 2014 ; Malliavin & Thalmaier , 2006 ) . Examples of such work are the Langevin18 model of stochastic dynamics of particles in a fluid , stochastic turbulence ( Kumar et al. , 2020 ) , and19 the Black–Scholes model . More recently , SDE models have gathered interest in machine learning20 and current work focuses on efficient and scalable methods of inferring SDEs from data.21 1.1 THE SDE LEARNING PROBLEM22 Consider an Itô SDE ( Pavliotis , 2014 ) of the following form23 dX = f ( X , t ) dt+ g ( X , t ) dW , ( 1 ) and a set of observations x1 : N = { ( tn , xn ) } N n=1 . In the simplest case , these observations would24 be directly of a realisation of the process at discrete points in time . In many physical applications,25 the observations themselves would have some uncertainty associated with them , described by an26 observation noise model . In more complex models , the SDE would be driving some unobserved27 parameters describing further complex processes ( Li et al. , 2020 ) . For example , discrete events28 may be modeled by an inhomogenious Poisson processes , where the rate parameter is evolving29 stochastically over time . In any case , the generating process can be summarized by the graphical30 model in Figure 1 and the corresponding learning problem can be described as : “ given observations31 x1 : N , infer f and g ” .32 For the most part , the model can be trained using standard techniques , such as variational inference,33 Markov chain Monte Carlo or optimizing an appropriate loss function . Generally , this requires34 estimating an expectation over sample-paths , either to estimate the marginal probability of the obser-35 vations as a function of f and g , or to estimate the mismatch of sample-paths with the observations . To36 estimate these expectations , most current work makes use of integration algorithms . These algorithms37 generate trajectories of X for a given f and g , which can be used to estimate the required expectation.38 f g W X xn N The central idea of this paper is to instead generate trajectories from a distribution much closer to54 the path-space posterior distribution when estimating these expectations . In the simplest case where55 the observations are directly of the process X , this means sampling trajectories which pass directly56 through the observations . Alternatively , one can marginalize out the observation noise distribution —57 or efficiently estimate some expected loss function — by importance sampling58 EX [ p ( x1 : N |X ) ] = Ex̃1 : N∼q [ p ( x1 : N | x̃1 : N ) q ( x̃1 : N ) pX ( x̃1 : N ) ] , ( 4 ) where q is an importance distribution which may depend on the observations themselves . For a large59 class of observation distributions , such as additive Gaussian noise or multinomial observations , a60 natural choice for q would be the corresponding conjugate distribution , in which case the importance61 weight p/q becomes a constant . In complex graphical models , q might be parameterized and62 optimized variationally , or Gibbs sampling may be used with a collection of simpler conditional63 distributions . Taking advantage of this , we shall , without loss of generality , concentrate only on64 estimating the quantity pX ( x1 : N ) = EX [ ∏ n δ ( xn −X ( tn ) ) ] .65 In this work , we introduce a novel algorithm for efficient estimation of probabilities in SDE models66 for the purposes of learning . Our algorithm has a number of favourable charateristics:67 • Our algorithm exhibits lower gradient variance in estimated expectations than algorithms68 based on SDE solvers , since it enforces that sampled trajectories pass through the observed69 data , producing accurate results even in hundreds of dimensions.70 • Since our algorithm does not rely on an SDE solver , it completely removes all sequential71 dependence between sampled points . Our algorithm is therefore trivially parallelizable , and72 can take full advantage of modern parallel hardware such as multi-GPU training.73 • Since our estimator can be calculated in a single forward pass of the function f , proba-74 bilistic approaches such as variational Gaussian processes are viable candidates for the75 representation of f .76 1.2 RELATED WORK77 Li et al . ( 2020 ) propose a method for calculating gradients of functions of the integrated process with78 respect to parameters of f and g via a backwards SDE called the adjoint method . This approach79 requires reconstructing the Wiener process backwards in time when integrating the backward equation80 and the authors propose a memory efficient algorithm to do so . Their approach uses a constant81 amount of memory independent of the number of integration steps similar to the adjoint method for82 NeuralODEs ( Chen et al. , 2018 ) . Tzen & Raginsky ( 2019 ) discuss the computation of gradients by83 simulation of a forward SDE in the derivatives with respect to parameters of the model using the84 chain rule of stochastic calculus . This approach does not require back-propagating through the SDE85 solver . Kidger et al . ( 2021 ) propose a method of learning SDEs by treating the SDE as the generator86 in a generative adversarial network setup , using a second SDE for the discriminator . All of these87 approaches use SDE integration algorithms to estimate path-space expectations.88 Batz et al . ( 2018 ) consider a nonparametric approach to SDE learning , using Gaussian processes89 for the drift and diffusion functions . They initially consider a gradient matching approximation , in90 which the drift Gaussian process may be fit directly by conventional methods , and thereafter use an91 expectation-maximization algorithm , and estimate the transition probability for sparse observations92 using a linear approximation of the process . Yildiz et al . ( 2018 ) propose an alternative approach to93 Gaussian process-based SDE learning using the Euler–Maruyama integrator , approximating f by the94 predictive mean of a Gaussian process conditioned on a MAP estimate for a set of inducing points.95 Unfortunately , this approach completely ignores any uncertainty in the posterior over f .96 It should be noted that each of the above mentioned studies rely on SDE integrators to generate97 trajectories and therefore face the same difficulties associated with them . Furthermore , almost all98 of the experiments therein are on system of dimension between 1 and 3 , with a small number of99 experiments of dimension as high as 6 . We are unaware of any work which trains neural SDEs in100 higher dimensions , and we believe this is a testament to the inherent difficulty of learning SDEs in101 high dimensions.102 Much other work focuses on learning specific classes of SDE or ODE models , such as symplectic or103 Hamiltonian systems ( Zhong et al. , 2020 ; Greydanus et al. , 2019 ) , graph-based models ( Poli et al.,104 2021 ; Sanchez-Gonzalez et al. , 2019 ) , and controlled differential equations ( Morrill et al. , 2021 ) .105 Many of these ideas are independent of the learning algorithm and can potentially make use of our106 algorithm when applied to SDEs.107 2 PATH-SPACE IMPORTANCE SAMPLING108 It is well known that solutions of linear SDEs are Gaussian processes ( see Pavliotis , 2014 , Section 3.7 ) .109 For these processes , the joint probability density over some finite collection of points is available110 in closed form . Furthermore , the posterior distribution of the process conditioned on some set of111 observations can be sampled from exactly . Unfortunately , this is not the case in general for non-linear112 SDEs , and one has to resort to approximation methods in order to calculate probabilities . Most113 commonly , one uses an SDE integrator to estimate expectations ; however , other methods , such as114 Laplace approximations and perturbation theory are sometimes used ( Karimi & McAuley , 2016 ; 115 Dass et al. , 2017 ; Hutzenthaler & Jentzen , 2020 ) .116 Alternatively , if we are able to find a second process which follows a similar SDE to the one of117 interest , it is possible to express expectations and probabilities as importance sampling estimators.118 Linear SDEs are an attractive candidate for this due to their Gaussianity and ease of sampling.119 2.1 STATE-INDEPENDENT DIFFUSION120 For now , consider the simpler scenario in which the diffusion coefficient does not depend on the state121 variable ; i.e . g ( x , t ) = σ ( t ) for some function σ . The process defined by122 dY = σ ( t ) dW , ( 5 ) is Gaussian with mean zero and conditional variance123 EY [ ( Y ( t1 ) − Y ( t0 ) ) 2 ] = ∫ t1 t0 σ ( t ) σT ( t ) dt . ( 6 ) Sample paths of Y can be generated efficiently by simulating Brownian motion . The process Y124 conditioned on a set of observations of the process is a Brownian bridge . If we are able to express125 quantities of interest as expectations under this process instead of our original SDE , then we can126 efficiently estimate such quantities via Monte Carlo sampling . As it turns out , expectations and127 probabilities for an SDE with a general drift term can in fact be expressed as such . This relation is128 given in the following theorem.129 Theorem 1 Let X and Y be the stochastic processes generated by the following SDEs dX = f ( X , t ) dt+ σ ( t ) dW , ( 7 ) dY = σ ( t ) dW . ( 8 ) Further assume that σ ( t ) σT ( t ) is Lebesgue-almost-everywhere invertible and f is sufficiently well-130 behaved such that X ( t ) has a unique probability density for all t.131 The probability density of observations { ( tn , xn ) } N n=1 , under the process X is given by the condi-132 tional expectation133 pX ( x1 : N ) = pY ( x1 : N ) EY [ eS [ Y ] ∣∣∣ { Y ( tn ) = xn } Nn=1 ] , ( 9 ) where134 S [ Y ] = ∫ fT ( Yt , t ) ( σ ( t ) σT ( t ) ) −1 dYt − 1 2 ∫ fT ( Yt , t ) ( σ ( t ) σT ( t ) ) −1 f ( Yt , t ) dt . ( 10 ) This result follows from Girsanov ’ s theorem ( Girsanov , 1960 ; Malliavin & Thalmaier , 2006 , Sec-135 tion 1.5 ) and the definition of conditional expectation . Intuitively speaking , the first term in Equa-136 tion 10 encourages f to line up with typical paths which pass through the observations , while the137 second term regularizes the magnitude of f .138 Theorem 1 allows us to develop an importance sampling algorithm for estimating probabilities under139 the process X by simulating the process Y , where the importance weights are given by ωi = eS [ Y ( i ) ] .140 In this approach , one can generate entire sample paths of Y before calculating f ( Y , t ) , allowing the141 forward pass of f to be performed in parallel . This approach is described in Algorithm 1.142 Algorithm 1 Path Integral Importance Sampling 1 : for i = 1 , . . . , K do 2 : Sample ( Yt ) tNt=t1 , s.t . for each n , Ytn = xn . Y is a Brownian bridge 3 : ft ← f ( Yt , t ) for each t 4 : α← ∑ t f T t σ −2 ( t ) ( Yt+∆t − Yt ) 5 : β ← ∑ t f T t σ −2 ( t ) ft ∆t 6 : Si ← α− 12β 7 : end for 8 : return pY ( x1 : N ) 1K ∑ i exp ( Si ) An important property of this algorithm is that the sampled paths directly pass through observations.143 This means that the probability estimates directly relate the drift function f to plausible trajectories144 instead of allowing the particles to wander around randomly . See Figure 2 for an illustration . In the145 initial stages of training , simply integrating the SDE with drift f will typically not lead to trajectories146 which pass near the data , especially in high dimensions . This can have a significant impact on the147 variance of the gradients and can inhibit the model ’ s ability to learn . Training on paths that pass148 through the data can greatly mitigate this high variance . As with other algorithms that generate SDE149 sample paths , the discretization of the integrals introduces a small bias . However , this bias vanishes150 in the ∆t→ 0 limit.151 2.1.1 A NOTE ON PARALLELIZABILITY152 With the exception of the sampling step in Line 2 of Algorithm 1 , each of the other operations,153 including the sums , can be performed in parallel over feature and batch dimensions , as well as over154 the t and i indices . Sampling a Brownian bridge , or any conditional Gauss–Markov process , can155 be performed by first sampling the unconditional process , and then linearly interpolating with the156 observations . The linear interpolation can be performed independently , and therefore in parallel , over157 the time dimension . The only operation that is not completely parallelizable is the sampling of the158 unconditional base process — in this case standard Brownian motion . Brownian paths can be sampled159 by cumulative summation of independent normal random numbers . However , this cumulative sum is160 extremely fast , and can be performed independently between each consecutive pair of observations.161 In our tests , sampling whole Brownian trajectories was about 5 orders of magnitude faster than the162 forward pass of the neural network f , and so does not create any noticeable performance impact.163 Once the Brownian paths are sampled , the rest of Algorithm 1 may be implemented in parallel164 without difficulty . Contrast this to standard integrator-base methods ; even if the Brownian paths are165 sampled upfront , the integrator must still perform each of the forward passes of f in sequence.166 See Appendix B for more details on sampling Gaussian bridges.167 2.2 STATE-DEPENDENT DIFFUSION168 The assumption that g is independent of the state is not in fact required for the validity of Theorem 1 ; 169 the reason this assumption is required is to ensure that the process Y is Gaussian , so as to enable170 easy conditional sampling and calculation of pY ( x1 : N ) . Unfortunately , one can not simply find an171 analogue of Theorem 1 to calculate expectations of a general process as expectations with respect to172 a constant diffusion process.173 To address the question of state-dependent diffusion , it is enlightening to consider a simple example174 of such a process . Perhaps the most common example is geometric Brownian motion175 dX = µX dt+ σX dW . ( 11 ) The typical way in which one would solve this is to introduce a transformation Z = log ( X ) , and176 apply Itô ’ s lemma ( see Malliavin & Thalmaier , 2006 , Section 1.5 ; Pavliotis , 2014 , Section 3.5 ) to177 obtain the SDE178 dZ = ( µ− 12σ 2 ) dt+ σ dW . ( 12 ) Similarly , one might address a problem of a general state-dependent diffusion coefficient by consider-179 ing a transformation to a space in which the transformed equation has constant diffusion . Let T ( · , t ) 180 be a map which is invertible for all t. That is , there exists a function T−1 such that if y = T ( x , t ) ,181 then x = T−1 ( y , t ) . Transforming a process with constant diffusion σ , by the map T−1 gives a182 process with diffusion coefficient183 gi , j ( x , t ) = ∂T−1i ∂yk σk , j = ( ∂T ( x , t ) ∂x ) −1 i , k σk , j , ( 13 ) where repeated indices imply summation . With such a transformation we can represent any diffusion184 matrix that can be written as a Jacobian . While the restrictions on the diffusion matrix may be seen as185 an inherent limitation of a path-space importance sampling approach , it may be argued that constant186 or simple diffusion functions would cover the majority of cases of interest , and almost all real-world187 problems require some form of data pre-processing and , potentially , link functions.188 This transformation allows us to infer the SDE in a transformed space , with constant diffusion , and,189 if desired , transform the equation back to the original space using Itô ’ s lemma . This approach is190 described in Algorithm 2 , where we have used the symbol f̃ to represent the drift in the transformed191 space as to avoid ambiguity with the drift in the original space . One important point to note is that one192 should be careful to allow gradients to propagate through the sampling step on Line 2 in Algorithm 2,193 so as to allow learning of the function T . Algorithm 2 Transformed-State Path Integral Importance Sampling 1 : for i = 1 , . . . , K do 2 : Sample ( Yt ) tNt=t1 , s.t . for each n , Ytn = T ( xn , tn ) . Y is a Brownian bridge 3 : f̃t ← f̃ ( Yt ) for each t 4 : α← ∑ t f̃ T t σ −2 ( Yt+∆t − Yt ) 5 : β ← ∑ t f̃ T t σ −2f̃t ∆t 6 : Si ← α− 12β 7 : end for 8 : return ∏ n det ( ∂T ( xn , tn ) ∂xn ) pY ( T ( x1 : N , t1 : N ) ) 1 K ∑ i exp ( Si ) 194 One would typically apply this method to infer f̃ rather than the original f for performance reasons,195 and then only reconstruct the SDE in the original space if required.196 2.2.1 RECONSTRUCTION OF THE SDE IN THE UNTRANSFORMED SPACE197 Generation of new sample paths can be performed easily in the transformed space and then simply198 transforming back by applying T−1 . However , sometimes one needs more information for the199 purposes of analysing the learned equation . In this case the SDE can be transformed back using Itô ’ s200 lemma . The drift and diffusion coefficients are201 fi ( x , t ) = ∂T−1i ∂t + ∂T−1i ∂yk f̃k ( y , t ) + 1 2 σj , k ∂2T−1i ∂yj∂yl σl , k , ( 14 ) gi , j ( x , t ) = ∂T−1i ∂yk σk , j . ( 15 ) All expression are evaluated at y = T ( x , t ) . When T is parameterized by a neural network with202 ReLU non-linearities , the second derivative term in Equation ( 14 ) is almost-everywhere zero . The203 remaining terms are Jacobian vector products , and so can be performed efficiently even in high204 dimensions.1205 3 EXPERIMENTS206 In this section , we provide some experiments to illustrate and verify the performance and capabilities207 of our proposed algorithm . Further details on the experiments are given in Appendix C.208 3.1 THE LORENZ SYSTEM209 To compare the effect of our algorithm on learning , we follow Li et al . ( 2020 ) and train a neural210 network based SDE model on the Lorenz system . In this model the drift function is given by a211 1However , this may require forward-mode instead of backward-mode differentiation . multi-layer perceptron , and the diffusion term is a simple scalar . We generated 16 independent212 paths , consisting of 200 observations each , uniformly sampled over a time interval of [ 0 , 10 ] . We213 trained the model on this data by two different methods . In the first method , we minimize the214 mean-squared error , estimated by integrating out the SDE , and calculating gradients using the adjoint215 method ( Li et al. , 2020 ) .2 In the second method , we directly optimize the log-probability calculated216 using Algorithm 1 . In both cases we used precisely the same optimization parameters , the same217 time-step size ∆t , and the same number of sampled trajectories to calculate averages . Both models218 used the same seed for the neural network initialization , and the same number of gradient steps were219 performed in both cases . These models were trained on an Nvidia RTX 3070 , with 8Gb of memory.220 To assess the performance of these approaches , we record two metrics . The first is the mean-square221 difference between the learned drift vector field , and the Lorenz vector field , normalized by the mean-222 square magnitude of the Lorenz vector field , measured at the observations . Written mathematically:223 err = ∑ n ( fθ ( xn ) − fLor ( xn ) ) 2∑ n ( fLor ( xn ) ) 2 ( 16 ) This metric is shown in Figure 3b . The second metric we record is the mean-squared error of sampled224 trajectories compared to the observations ; this is shown in Figure 3a . However , we note that this is225 not a fair performance metric since the adjoint-based method is directly optimizing for it . On the226 x-axis we show the training time in minutes.227 In Figure 3 we have limited the range of the x-axis in order for the lines to be more clearly visible.228 The total training time for the adjoint-based MSE optimization was a factor 52 longer than the time229 taken optimizing the probability estimates . We note that , while our approach was significantly faster,230 it did use approximately four times as much memory as the adjoint-based method.3231 The poor performance of the integrator-based learning algorithm in Figure 3b — despite its low mean-232 squared-error — suggests that directly optimizing for the discrepancy of typical SDE sample-paths233 compared to observations is not a robust approach to SDE learning.234 3.2 GRADIENT VARIANCE235 We applied both our algorithm and an SDE integrator to a neural network-based SDE model on236 a real-world dataset and recorded the gradients , sampled over many independent trajectories . We237 thereafter computed the variance of the gradients individually per parameter , for various time lengths238 between observations . We used a discretization step size of 0.01 . These results are shown in Figure 4.239 2We also attempted training a model without the adjoint method and instead directly backpropagating through the SDE integrator . However , a single forward pass required more memory than available on the GPU . 3The adjoint algorithm was specifically designed to have constant memory complexity in the number of integration steps . Our algorithm does not exhibit this feature . In each case we used the same neural network , initialized with a fixed seed , and the exact same values240 for all parameters . We used the same loss functions as in Section 3.1 . The data set we used was the241 Hungarian chickenpox cases dataset from the UCI machine learning repository ; 4 it has 20 features242 per observation . We scaled the features by their standard deviations before performing the experiment243 to improve numerical stability.244 Our findings are as follows:245 • For very short times , we found that both algorithms produced comparable gradient variances:246 typically less than 10−7.247 • For longer time spans ( 3 orders of magnitude larger than the discretization step size ) , the248 gradient variance of our algorithm increased by a few orders of magnitude ; the maximum249 we observed was on the order of 10−4 . However , the SDE integrator approach resulted in250 huge increases in variances , with some as large as 1018.251 • Between the above two extremes , we found that the gradient variance of our approach did252 increase with the time between observations , but stayed below 10−5 , while the gradient253 variance from the SDE integrator exhibited very poor scaling with variances of up to 108 for254 times between observations of 1.0.255 Considering that both approaches produced comparable variances on very small timescales , we feel256 that this experiment represents a fair comparison.257 3.3 UNCERTAINTY QUANTIFICATION WITH VARIATIONAL GAUSSIAN PROCESSES258 We attempt to test the viability of using our method for an SDE model with a GP prior over the drift259 function and fitting the posterior variationally . To assess this , we used data trajectories from a van der260 Pol oscillator . For the GP prior , we used a zero mean function and a radial basis function kernel , with261 independent GP priors over each output dimension of the drift vector field . These choices are not262 necessarily optimal ; however , the purpose of this experiment is merely to illustrate the feasibility of263 using variational GP to learn the vector field of an SDE model.264 We used a grid-based inducing point approach and the kernel interpolation method of Wilson & 265 Nickisch ( 2015 ) . The combination of these techniques allows one to take advantage of the Kronecker266 product structure of the covariance matrices and the Toeplitz structure of each factor for accelerated267 sampling . The model was trained variationally , sampling the variational posterior jointly along entire268 trajectories.269 4This dataset can be found at https : //archive.ics.uci.edu/ml/datasets/Hungarian+ Chickenpox+Cases The approximate GP posterior is shown in Figure 5a compared to the ground truth vector field of the270 van der Pol oscillator in Figure 5b . Comparing the GP to the van der Pol vector field , we found that271 the GP model was fairly accurate in areas with many data points , while reverting to the prior far away272 from observations . To assess the quality of the uncertainty quantification , we further calculated the273 discrepancy between the variational posterior and the ground truth vector field . Over a dense grid,274 covering an enlarged area around the observations , we calculated the discrepancy as275 δ = fvdp ( x ) − µ ( x ) σ ( x ) . ( 17 ) A histogram is shown in Figure 5c.276 Under Gaussianity assumptions , one expects to see the quantiles line up well with some associated277 number of standard deviations . However , this will only be the case near to the observations . In278 regions where the GP reverts to the prior , which has a stationary kernel , the mismatch between the279 GP and the polynomial growth of the van der Pol oscillator results in heavy tails . We expect that a280 better choice of kernel , which accounts for this polynomial behaviour , to show residuals with lighter281 tails . We found that the distribution of these δs was fatter-tailed than a Gaussian distribution ; the282 middle 50 % ( 25 % - 75 % quantiles ) slightly passed one standard deviation on either side , as opposed283 to the 68 % of a standard Gaussian distribution . The middle 80 % ( 10 % - 90 % quantiles ) were within284 3 standard deviations . While the posterior uncertainty was somewhat overconfident , it was not wholly285 unreasonable.286 We further note that , while the complexities involved in variational GP fitting can result in longer287 training times , we still found that our method applied to a GP was significantly faster than using an288 SDE integrator with a neural network.289 4 DISCUSSION290 In this work we introduced an algorithm to efficiently estimate probabilities of observations under291 the assumption of an SDE model for the purposes of learning . The proposed approach produces292 estimates which are accurate , even in high dimensions , and can fully utilize parallel hardware for293 significant speedups.294 The proposed algorithm is capable of providing robust probability estimates which can be used in295 models both with or without an explicit observation noise component . This is in contrast to SDE296 integrator-based learning approaches , which must incorporate and estimate an explicit error term due297 to their inability to generate paths which are guaranteed to pass through the observations.298 Our algorithm produces more stable estimates than alternative integrator-based approaches , particu-299 larly when the observations are sparsely distributed over long time intervals and in high dimensions.300 This in turn results in more stable and robust learning . With the rise in applicability of large-scale301 ( neural network ) SDE modeling in science , simulation , and domains such as finance , we see our302 approach as an important contribution to reliable scaling of these methods.303 REPRODUCIBILITY304 Efforts have been made to describe all parameters and details of the algorithms used in this paper,305 either in the content or in the appendix . The code included in the supplementary material includes306 a Dockerfile and instructions for running some of the experiments . Where relevant , fixed seeds for307 random number generators can be found in the code during initialization.308 REFERENCES309 Philipp Batz , Andreas Ruttor , and Manfred Opper . Approximate Bayes learning of stochastic310 differential equations . Phys . Rev . E , 98:022109 , Aug 2018. doi : 10.1103/PhysRevE.98.022109.311 URL https : //link.aps.org/doi/10.1103/PhysRevE.98.022109.312 Ricky T. Q. Chen , Yulia Rubanova , Jesse Bettencourt , and David K Duvenaud . Neural ordinary313 differential equations . 31 , 2018 . URL https : //proceedings.neurips.cc/paper/314 2018/file/69386f6bb1dfed68692a24c8686939b9-Paper.pdf.315 Sarat C. Dass , Jaeyong Lee , Kyoungjae Lee , and Jonghun Park . Laplace based approximate posterior316 inference for differential equation models , differential equations . Statistics and Computing , 27:317 679–698 , 2017. doi : 10.1007/s11222-016-9647-0.318 I. V. Girsanov . On transforming a certain class of stochastic processes by absolutely continuous319 substitution of measures . Theory of Probability & Its Applications , 5 ( 3 ) :285–301 , 1960. doi:320 10.1137/1105027 . URL https : //doi.org/10.1137/1105027.321 Samuel Greydanus , Misko Dzamba , and Jason Yosinski . Hamiltonian Neural Networks.322 In H. Wallach , H. Larochelle , A. Beygelzimer , F. d'Alché-Buc , E. Fox , and R. Gar-323 nett ( eds . ) , Advances in Neural Information Processing Systems , volume 32 . Curran Asso-324 ciates , Inc. , 2019 . URL https : //proceedings.neurips.cc/paper/2019/file/325 26cd8ecadce0d4efd6cc8a8725cbd1f8-Paper.pdf.326 Martin Hutzenthaler and Arnulf Jentzen . On a perturbation theory and on strong convergence rates327 for stochastic ordinary and partial differential equations with nonglobally monotone coefficients.328 The Annals of Probability , 48 ( 1 ) , Jan 2020 . ISSN 0091-1798. doi : 10.1214/19-aop1345 . URL329 http : //dx.doi.org/10.1214/19-AOP1345.330 Junteng Jia and Austin R Benson . Neural jump stochastic differential equations . In331 H. Wallach , H. Larochelle , A. Beygelzimer , F. d'Alché-Buc , E. Fox , and R. Garnett332 ( eds . ) , Advances in Neural Information Processing Systems , volume 32 . Curran Asso-333 ciates , Inc. , 2019 . URL https : //proceedings.neurips.cc/paper/2019/file/334 59b1deff341edb0b76ace57820cef237-Paper.pdf.335 Hadiseh Karimi and Kimberley B. McAuley . Bayesian Estimation in Stochastic Differential336 Equation Models via Laplace Approximation . IFAC-PapersOnLine , 49 ( 7 ) :1109–1114 , 2016.337 ISSN 2405-8963. doi : https : //doi.org/10.1016/j.ifacol.2016.07.351 . URL https : //www.338 sciencedirect.com/science/article/pii/S2405896316305584 . 11th IFAC339 Symposium on Dynamics and Control of Process SystemsIncluding Biosystems DYCOPS-CAB340 2016.341 Patrick Kidger , James Foster , Xuechen Li , and Terry J Lyons . Neural SDEs as Infinite-Dimensional342 GANs . In Marina Meila and Tong Zhang ( eds . ) , Proceedings of the 38th International Conference343 on Machine Learning , volume 139 of Proceedings of Machine Learning Research , pp . 5453–5463.344 PMLR , 18–24 Jul 2021 . URL https : //proceedings.mlr.press/v139/kidger21b.345 html.346 Prashant Kumar , Martin Schmelzer , and Richard P. Dwight . Stochastic turbulence modeling in RANS347 simulations via multilevel Monte Carlo . Computers & Fluids , 201:104420 , 2020 . ISSN 0045-7930.348 doi : https : //doi.org/10.1016/j.compfluid.2019.104420 . URL https : //www.sciencedirect.349 com/science/article/pii/S0045793019303780.350 Xuechen Li , Ting-Kam Leonard Wong , Ricky T. Q. Chen , and David Duvenaud . Scalable gradients351 for stochastic differential equations . International Conference on Artificial Intelligence and352 Statistics , 2020.353 Xuanqing Liu , Tesi Xiao , Si Si , Qin Cao , S. Kumar , and Cho-Jui Hsieh . Neural SDE : Stabilizing354 Neural ODE Networks with Stochastic Noise . ArXiv , abs/1906.02355 , 2019.355 Paul Malliavin and Anton Thalmaier . Stochastic Calculus of Variations in Mathematical Finance.356 Springer , 01 2006 . ISBN 3-540-43431-3. doi : 10.1007/3-540-30799-0.357 James Morrill , Cristopher Salvi , Patrick Kidger , and James Foster . Neural rough differential equations358 for long time series . In Marina Meila and Tong Zhang ( eds . ) , Proceedings of the 38th International359 Conference on Machine Learning , volume 139 of Proceedings of Machine Learning Research , pp.360 7829–7838 . PMLR , 18–24 Jul 2021 . URL https : //proceedings.mlr.press/v139/361 morrill21b.html.362 GA Pavliotis . Stochastic Processes and Applications : Diffusion Processes , the Fokker–Planck and363 Langevin Equations . Springer , 2014.364 Michael Poli , Stefano Massaroli , Junyoung Park , Atsushi Yamashita , Hajime Asama , and Jinkyoo365 Park . Graph neural ordinary differential equations . 2021.366 Alvaro Sanchez-Gonzalez , Victor Bapst , Kyle Cranmer , and Peter Battaglia . Hamiltonian Graph367 Networks with ODE Integrators , 2019.368 Belinda Tzen and M. Raginsky . Neural stochastic differential equations : Deep latent Gaussian models369 in the diffusion limit . ArXiv , abs/1905.09883 , 2019.370 Andrew Wilson and Hannes Nickisch . Kernel Interpolation for Scalable Structured Gaussian Pro-371 cesses ( KISS-GP ) . In Francis Bach and David Blei ( eds . ) , Proceedings of the 32nd International372 Conference on Machine Learning , volume 37 of Proceedings of Machine Learning Research,373 pp . 1775–1784 , Lille , France , 07–09 Jul 2015 . PMLR . URL http : //proceedings.mlr.374 press/v37/wilson15.html.375 C. Yildiz , M. Heinonen , J. Intosalmi , H. Mannerstrom , and H. Lahdesmaki . Learning stochastic376 differential equations with gaussian processes without gradient matching . In IEEE International377 Workshop on Machine Learning for Signal Processing . MLSP , 2018.378 Yaofeng Desmond Zhong , Biswadip Dey , and Amit Chakraborty . Symplectic ode-net : Learning379 hamiltonian dynamics with control . In International Conference on Learning Representations,380 2020 . URL https : //openreview.net/forum ? id=ryxmb1rKDS.381 A THEOREM 1382 We have that X and Y are processes obeying the SDEs dX = f ( X ) dt+ g ( X ) dW , ( 18 ) dY = g ( Y ) dW , ( 19 ) dropping the time argument for notational simplicity . Expectations with respect to SDEs can be expressed as path integrals . In the Itô convention , the path integral representation of an SDE has the following form EX [ F [ X ] ] = lim N→∞ ∫ F [ x ] N∏ n=1 dxn√ 2π∆tng ( xn−1 ) exp { −1 2 N∑ n=1 ( ∆xn − f ( xn−1 ) ∆tn g ( xn−1 ) √ ∆tn ) 2 } ( 20 ) = : ∫ DxF [ x ] J exp { −1 2 ∫ L ( x ( t ) , ẋ ( t ) ) dt } , ( 21 ) where J is a Jacobian factor which depends on g but not f and the Lagrangian is given by383 L ( x , ẋ ) = ( ẋ− f ( x ) g ( x ) ) 2 . ( 22 ) The derivative of x here may be thought of distributionally ; however , the expression for the measure384 Dx exp { − 12 ∫ L } need only be defined on the Cameron–Martin subspace5 ; guaranteeing its unique385 extension to the whole Wiener space . In contrast to this , the expression inside the expectation386 F [ x ] should be defined almost-everywhere , and hence care should be taken when ẋ appears in an387 expectation.388 We may expand the quadratic to separate the Lagrangian into a drift-free term plus terms dependent on the drift L = ( ẋ g ( x ) ) 2 ( 23 ) − 2fT ( x ) g−2 ( x ) ẋ ( 24 ) + fT ( x ) g−2 ( x ) f ( x ) . ( 25 ) The first term , on line 23 , is the Lagrangian for the process Y , which has no drift term . Shuffling the389 rest of the terms out of the measure and into the expectation , we have390 EX [ F [ X ] ] = ∫ DxF [ x ] eS [ x ] exp { −1 2 ∫ ( ẋ g ( x ) ) 2 dt } , ( 26 ) where S [ X ] = ∫ fT ( Xt ) g −2 ( Xt ) Ẋt dt ( 27 ) − 1 2 ∫ fT ( Xt ) g −2 ( Xt ) f ( Xt ) dt ( 28 ) = ∫ fT ( Xt ) g −2 ( Xt ) dXt ( 29 ) − 1 2 ∫ fT ( Xt ) g −2 ( Xt ) f ( Xt ) dt . ( 30 ) Note that on the third line we have used the distributional definition of Ẋ ; i.e . Ẋt dt = dXt.391 Lastly , using the definition of conditional expectation , we have that392 EA [ F [ A ] p ( B = b|A ) ] = EA [ p ( B = b|A ) ] EA [ F [ A ] ∣∣∣B = b ] . ( 31 ) By trivial substitution , we have393 pX ( x1 : N ) = pY ( x1 : N ) EY [ eS [ Y ] ∣∣∣ { Y ( tn ) = xn } Nn=1 ] . ( 32 ) B SAMPLING BRIDGES394 Let Y be a Gauss–Markov process with kernel k. Since the process is Markov , we need only sample395 the process conditioned on two end-points . Let y = ( y0 , yT ) be the known values of the process at396 times τ = ( t0 , T ) . Let Ỹ be the process defined by397 Ỹt : = Yt +K ( t , τ ) K ( τ , τ ) −1 ( y − Yτ ) , for t0 ≤ t ≤ T , ( 33 ) whereK is the matrix whose entries are k ( ti , tj ) . This distribution of Ỹ is the same as the distribution398 of Y conditioned on the values y at times τ . Note that once Yt has been sampled — which may399 require a cumulative sum — this transformation can be performed independently , and hence in400 parallel , for each t. For each consecutive pair of observations , the bridge process can be sampled401 independently.402 5The Hilbert space of functions whose derivatives are square integrable . The Wiener space is the space of continuous functions . This is not a Hilbert space , instead it is a Banach space with the supremum norm . The measure of the Cameron–Martin space is in fact zero ; the sample paths of the SDE are almost-surely nowhere differentiable . In the simplest case , where Y is a Brownian motion starting from y0 at time t0 = 0 , this reduces to Ỹt = Yt + k ( t , T ) k ( T , T ) ( yT − YT ) ( 34 ) = Yt + t T ( yT − YT ) . ( 35 ) And similarly for any other processes which can be sampled with a fixed starting point.403 In the more general case we can invert the two by two matrix to get an explicit formula for Ỹt Ỹt = Yt + k ( t , t0 ) k ( T , T ) − k ( t , T ) k ( t0 , T ) k ( t0 , t0 ) k ( T , T ) − k ( t0 , T ) 2 ( y0 − Y0 ) ( 36 ) + k ( t , T ) k ( t0 , t0 ) − k ( t , t0 ) k ( t0 , T ) k ( t0 , t0 ) k ( T , T ) − k ( t0 , T ) 2 ( yT − YT ) . ( 37 ) This may be extended straightforwardly to other cases , such as conditioning on the values of the404 integral , or derivative of the process etc.405 C EXPERIMENTS406 C.1 PROBABILITY ESTIMATES407 As a sanity check , we compare the log-probability estimates of our algorithm to the actual log-408 probabilities of an Ornstein–Uhlenbeck process . The probability density for this process is available409 in closed form for any number of observations . We estimate the probability of a set of data points410 evenly spaced over a time interval of [ 0 , 10 ] , taken from a sine function xn = sin ( π/10× tn ) . For411 these estimates we used 1000 time steps to estimate the integral S , and averaged over 100 trajectories,412 independently sampled from a Brownian bridge passing through the observations . We repeated this413 process 1000 times and report the mean and standard deviation of these estimates . Figure 6 shows414 these estimates compared to the analytic probability given by the Ornstein–Uhlenbeck process for415 various numbers of observations as a function of the dimension of the problem.416 An interesting observation is that the variance of the estimator seems to decrease with the number417 of data points . This is atypical of probability estimators , since the magnitude of the log-probability418 increases linearly with the number of observations ( not to be confused with the number of samples419 used to estimate the log-probability ) . In almost all cases , with the exception of 4 observations in420 more than 40 dimensions , our algorithm gives accurate log-probability estimates with small standard421 deviations . The error of this exception is approximately 30 % , but is significantly reduced by adding422 more observations , or using more samples . We believe this error is acceptable considering the small423 number of observations and the large scale . For 10 observations in 100 dimensions the standard424 deviation of our estimator is only 0.4 % of the magnitude of the log-probability and the error of the425 mean estimate is 2 % of the analytic log-probability . This small bias can be further reduced by using426 more samples or a smaller ∆t . A single estimate in the 100 dimensional case took less than half a427 second to compute on a laptop CPU , and is therefore feasible to use in the inner loop of a learning428 algorithm.429 C.2 LORENZ430 C.2.1 DATA SET431 We generated data by simulating a Lorenz system with the exact same parameters as Li et al.432 ( 2020 ) . We generated 16 independent trajectories , with initial values sampled from a standard normal433 distribution , and discretely sampled the values of the process over 200 equally spaced time points434 ranging from 0 to 10 . Unlike Li et al . ( 2020 ) , we did not add any observation noise to the data.435 We deliberately used a sparser data set than Li et al . ( 2020 ) , due to personal experience of the difficulty436 of fitting SDE models on sparse observations.437 C.2.2 MODEL438 The model we used to fit to the observations was439 dXt = fθ ( Xt ) dt+ σ dW , ( 38 ) where σ is a scalar and fθ is a fully-connected neural network with ReLU nonlinearities and parame-440 ters θ . We used layer sizes of 3→ 32→ 256→ 32→ 3.441 C.2.3 TRAINING PARAMETERS442 We used precisely the same parameters for each model , the only difference in the training procedures443 being the loss functions used . In the first case , the loss function per trajectory was444 Lmse ( θ ; x1 : N ) = 1 KN ∑ k , n ( X ( k ) tn − xn ) 2 , ( 39 ) where N = 200 is the number of observations per trajectory , and K is the number of sampled paths445 used to estimate the MSE , and X ( k ) is sampled using an SDE integrator starting at X ( k ) t1 = x1 . We446 then averaged this loss function over the 16 independent observed trajectories.447 In the second case , the loss function per trajectory was448 LPI ( θ ; x1 : N ) = − 1 N log p̂X ( x1 : N | θ ) , ( 40 ) where p̂X ( x1 : N | θ ) is calculated using Algorithm 1 with K trajectory samples . Again this loss was449 averaged over the 16 independent observed trajectories . In both cases we used K = 64 and a time450 step size of ∆t = 10−2.451 For each model we used the Adam optimizer with a learning rate of 10−3 and ran the optimization452 algorithm for 104 iterations . The model using our importance sampling approach completed the full453 number of iterations in 34 minutes , while the integrator-based approach took 29 hours and 46 minutes454 to complete the same number of iterations.455 Our approach consistently maintained 100 % GPU utilization , except during MSE evaluation which456 used an integrator , while the integrator based approach was unable to surpass 25 % GPU utilization in457 this experiment.458 C.3 VARIATIONAL GAUSSIAN PROCESSES459 Our approach allows more straightforward implementation of SDE models using a Gaussian process460 prior for the drift function . Some previous approaches often resort to approximations such as461 using only the predictive mean or MAP estimates ( Yildiz et al. , 2018 ) . For dense observations,462 directly discretizing the SDE and fitting the GP to the observation deltas may be viable . For sparse463 observations this is much more difficult . Our proposed method makes variational GP methods slightly464 simpler , since the values of f ( Yt ) can be sampled jointly along the path . However , it is important to465 note that various complexities still arise such as the difficulty of efficiently sampling high-dimensional466 Gaussian distributions.467 We used the kernel interpolation method of Wilson & Nickisch ( 2015 ) which stores a grid of468 inducing locations per dimension . Storing inducing locations per dimension for a Kronecker product469 kernel effectively gives a variational distribution over md inducing points with only d×m memory470 requirements , where m is the number of inducing points per dimension and d is the dimension . When471 these inducing locations are evenly spaces , the covariance factors have a Toeplitz structure which472 allows sampling in linearithmic time complexity.473 To fit the model we used gradient ascent on the ELBO which is calculated as follows:474 ELBO = Ef∼q [ log p ( x|f ) ] −KL [ q ( f ) |p ( f ) ] . ( 41 ) The KL divergence is between two Gaussian distributions calculated at the inducing locations in475 the usual way . For the likelihood term , we generated trajectories ( as in Algorithm 1 ) , followed by476 jointly sampling the variational GP posterior along these trajectories and proceed with the rest of the477 computation in Algorithm 1 using these samples . Our optimization objective is calculated478 L = − 1 K ∑ K log p̂ ( x1 : N | f ( k ) ) + KL [ q ( f ) |p ( f ) ] , ( 42 ) where each f ( k ) is an independent sample over the whole path of Y . In other words , f ( k ) ( Yt1 ) and479 f ( k ) ( Yt2 ) are correlated , but f ( k ) ( Yt1 ) and f ( j ) ( Yt2 ) are not when k 6= j.480 In our experiment we used 32 evenly spaced inducing points per dimension , and jointly sampled the481 variational posterior over 64 trajectories of 1024 time steps . The model was trained with the Adam482 optimizer with an initial learning rate of 0.1 , and an exponential decay with factor 0.999 for 105483 training steps . However , the square deviation of the predictive mean from the ground truth converged484 well before 104 iterations . Training for 104 iterations took 34 minutes , 105 iterations took about 5485 and a half hours.486 | This paper proposes an importance-sampling method for estimating the likelihood of observations in stochastic differential equation (SDE) models. Unlike classical integrator-based methods, the proposed approach imposes a structure that forces sampled trajectories to pass through observations thereby improving accuracy, especially in high dimensions. Furthermore, it removes sequential dependencies between sampled points thus allowing for speed-ups through parallelism. | SP:eea7e96cea9dddb19afeb4b9b33ba9de850cef0f |
Robust and Scalable SDE Learning: A Functional Perspective | Stochastic differential equations provide a rich class of flexible generative models,1 capable of describing a wide range of spatio-temporal processes . A host of re-2 cent work looks to learn data-representing SDEs , using neural networks and other3 flexible function approximators . Despite these advances , learning remains compu-4 tationally expensive due to the sequential nature of SDE integrators . In this work,5 we propose an importance-sampling estimator for probabilities of observations of6 SDEs for the purposes of learning . Crucially , the approach we suggest does not7 rely on such integrators . The proposed method produces lower-variance gradient8 estimates compared to algorithms based on SDE integrators and has the added9 advantage of being embarrassingly parallelizable . This facilitates the effective use10 of large-scale parallel hardware for massive decreases in computation time.11 1 INTRODUCTION12 Stochastic differential equations ( SDEs ) are a natural extension to ordinary differential equations13 which allows modelling of noisy and uncertain driving forces . These models are particularly appealing14 due to their flexibility in expressing highly complex relationships with simple equations , while15 retaining a high degree of interpretability . Much work has been done over the last century focussing16 on understanding and modelling with SDEs , particularly in dynamical systems and quantitative17 finance ( Pavliotis , 2014 ; Malliavin & Thalmaier , 2006 ) . Examples of such work are the Langevin18 model of stochastic dynamics of particles in a fluid , stochastic turbulence ( Kumar et al. , 2020 ) , and19 the Black–Scholes model . More recently , SDE models have gathered interest in machine learning20 and current work focuses on efficient and scalable methods of inferring SDEs from data.21 1.1 THE SDE LEARNING PROBLEM22 Consider an Itô SDE ( Pavliotis , 2014 ) of the following form23 dX = f ( X , t ) dt+ g ( X , t ) dW , ( 1 ) and a set of observations x1 : N = { ( tn , xn ) } N n=1 . In the simplest case , these observations would24 be directly of a realisation of the process at discrete points in time . In many physical applications,25 the observations themselves would have some uncertainty associated with them , described by an26 observation noise model . In more complex models , the SDE would be driving some unobserved27 parameters describing further complex processes ( Li et al. , 2020 ) . For example , discrete events28 may be modeled by an inhomogenious Poisson processes , where the rate parameter is evolving29 stochastically over time . In any case , the generating process can be summarized by the graphical30 model in Figure 1 and the corresponding learning problem can be described as : “ given observations31 x1 : N , infer f and g ” .32 For the most part , the model can be trained using standard techniques , such as variational inference,33 Markov chain Monte Carlo or optimizing an appropriate loss function . Generally , this requires34 estimating an expectation over sample-paths , either to estimate the marginal probability of the obser-35 vations as a function of f and g , or to estimate the mismatch of sample-paths with the observations . To36 estimate these expectations , most current work makes use of integration algorithms . These algorithms37 generate trajectories of X for a given f and g , which can be used to estimate the required expectation.38 f g W X xn N The central idea of this paper is to instead generate trajectories from a distribution much closer to54 the path-space posterior distribution when estimating these expectations . In the simplest case where55 the observations are directly of the process X , this means sampling trajectories which pass directly56 through the observations . Alternatively , one can marginalize out the observation noise distribution —57 or efficiently estimate some expected loss function — by importance sampling58 EX [ p ( x1 : N |X ) ] = Ex̃1 : N∼q [ p ( x1 : N | x̃1 : N ) q ( x̃1 : N ) pX ( x̃1 : N ) ] , ( 4 ) where q is an importance distribution which may depend on the observations themselves . For a large59 class of observation distributions , such as additive Gaussian noise or multinomial observations , a60 natural choice for q would be the corresponding conjugate distribution , in which case the importance61 weight p/q becomes a constant . In complex graphical models , q might be parameterized and62 optimized variationally , or Gibbs sampling may be used with a collection of simpler conditional63 distributions . Taking advantage of this , we shall , without loss of generality , concentrate only on64 estimating the quantity pX ( x1 : N ) = EX [ ∏ n δ ( xn −X ( tn ) ) ] .65 In this work , we introduce a novel algorithm for efficient estimation of probabilities in SDE models66 for the purposes of learning . Our algorithm has a number of favourable charateristics:67 • Our algorithm exhibits lower gradient variance in estimated expectations than algorithms68 based on SDE solvers , since it enforces that sampled trajectories pass through the observed69 data , producing accurate results even in hundreds of dimensions.70 • Since our algorithm does not rely on an SDE solver , it completely removes all sequential71 dependence between sampled points . Our algorithm is therefore trivially parallelizable , and72 can take full advantage of modern parallel hardware such as multi-GPU training.73 • Since our estimator can be calculated in a single forward pass of the function f , proba-74 bilistic approaches such as variational Gaussian processes are viable candidates for the75 representation of f .76 1.2 RELATED WORK77 Li et al . ( 2020 ) propose a method for calculating gradients of functions of the integrated process with78 respect to parameters of f and g via a backwards SDE called the adjoint method . This approach79 requires reconstructing the Wiener process backwards in time when integrating the backward equation80 and the authors propose a memory efficient algorithm to do so . Their approach uses a constant81 amount of memory independent of the number of integration steps similar to the adjoint method for82 NeuralODEs ( Chen et al. , 2018 ) . Tzen & Raginsky ( 2019 ) discuss the computation of gradients by83 simulation of a forward SDE in the derivatives with respect to parameters of the model using the84 chain rule of stochastic calculus . This approach does not require back-propagating through the SDE85 solver . Kidger et al . ( 2021 ) propose a method of learning SDEs by treating the SDE as the generator86 in a generative adversarial network setup , using a second SDE for the discriminator . All of these87 approaches use SDE integration algorithms to estimate path-space expectations.88 Batz et al . ( 2018 ) consider a nonparametric approach to SDE learning , using Gaussian processes89 for the drift and diffusion functions . They initially consider a gradient matching approximation , in90 which the drift Gaussian process may be fit directly by conventional methods , and thereafter use an91 expectation-maximization algorithm , and estimate the transition probability for sparse observations92 using a linear approximation of the process . Yildiz et al . ( 2018 ) propose an alternative approach to93 Gaussian process-based SDE learning using the Euler–Maruyama integrator , approximating f by the94 predictive mean of a Gaussian process conditioned on a MAP estimate for a set of inducing points.95 Unfortunately , this approach completely ignores any uncertainty in the posterior over f .96 It should be noted that each of the above mentioned studies rely on SDE integrators to generate97 trajectories and therefore face the same difficulties associated with them . Furthermore , almost all98 of the experiments therein are on system of dimension between 1 and 3 , with a small number of99 experiments of dimension as high as 6 . We are unaware of any work which trains neural SDEs in100 higher dimensions , and we believe this is a testament to the inherent difficulty of learning SDEs in101 high dimensions.102 Much other work focuses on learning specific classes of SDE or ODE models , such as symplectic or103 Hamiltonian systems ( Zhong et al. , 2020 ; Greydanus et al. , 2019 ) , graph-based models ( Poli et al.,104 2021 ; Sanchez-Gonzalez et al. , 2019 ) , and controlled differential equations ( Morrill et al. , 2021 ) .105 Many of these ideas are independent of the learning algorithm and can potentially make use of our106 algorithm when applied to SDEs.107 2 PATH-SPACE IMPORTANCE SAMPLING108 It is well known that solutions of linear SDEs are Gaussian processes ( see Pavliotis , 2014 , Section 3.7 ) .109 For these processes , the joint probability density over some finite collection of points is available110 in closed form . Furthermore , the posterior distribution of the process conditioned on some set of111 observations can be sampled from exactly . Unfortunately , this is not the case in general for non-linear112 SDEs , and one has to resort to approximation methods in order to calculate probabilities . Most113 commonly , one uses an SDE integrator to estimate expectations ; however , other methods , such as114 Laplace approximations and perturbation theory are sometimes used ( Karimi & McAuley , 2016 ; 115 Dass et al. , 2017 ; Hutzenthaler & Jentzen , 2020 ) .116 Alternatively , if we are able to find a second process which follows a similar SDE to the one of117 interest , it is possible to express expectations and probabilities as importance sampling estimators.118 Linear SDEs are an attractive candidate for this due to their Gaussianity and ease of sampling.119 2.1 STATE-INDEPENDENT DIFFUSION120 For now , consider the simpler scenario in which the diffusion coefficient does not depend on the state121 variable ; i.e . g ( x , t ) = σ ( t ) for some function σ . The process defined by122 dY = σ ( t ) dW , ( 5 ) is Gaussian with mean zero and conditional variance123 EY [ ( Y ( t1 ) − Y ( t0 ) ) 2 ] = ∫ t1 t0 σ ( t ) σT ( t ) dt . ( 6 ) Sample paths of Y can be generated efficiently by simulating Brownian motion . The process Y124 conditioned on a set of observations of the process is a Brownian bridge . If we are able to express125 quantities of interest as expectations under this process instead of our original SDE , then we can126 efficiently estimate such quantities via Monte Carlo sampling . As it turns out , expectations and127 probabilities for an SDE with a general drift term can in fact be expressed as such . This relation is128 given in the following theorem.129 Theorem 1 Let X and Y be the stochastic processes generated by the following SDEs dX = f ( X , t ) dt+ σ ( t ) dW , ( 7 ) dY = σ ( t ) dW . ( 8 ) Further assume that σ ( t ) σT ( t ) is Lebesgue-almost-everywhere invertible and f is sufficiently well-130 behaved such that X ( t ) has a unique probability density for all t.131 The probability density of observations { ( tn , xn ) } N n=1 , under the process X is given by the condi-132 tional expectation133 pX ( x1 : N ) = pY ( x1 : N ) EY [ eS [ Y ] ∣∣∣ { Y ( tn ) = xn } Nn=1 ] , ( 9 ) where134 S [ Y ] = ∫ fT ( Yt , t ) ( σ ( t ) σT ( t ) ) −1 dYt − 1 2 ∫ fT ( Yt , t ) ( σ ( t ) σT ( t ) ) −1 f ( Yt , t ) dt . ( 10 ) This result follows from Girsanov ’ s theorem ( Girsanov , 1960 ; Malliavin & Thalmaier , 2006 , Sec-135 tion 1.5 ) and the definition of conditional expectation . Intuitively speaking , the first term in Equa-136 tion 10 encourages f to line up with typical paths which pass through the observations , while the137 second term regularizes the magnitude of f .138 Theorem 1 allows us to develop an importance sampling algorithm for estimating probabilities under139 the process X by simulating the process Y , where the importance weights are given by ωi = eS [ Y ( i ) ] .140 In this approach , one can generate entire sample paths of Y before calculating f ( Y , t ) , allowing the141 forward pass of f to be performed in parallel . This approach is described in Algorithm 1.142 Algorithm 1 Path Integral Importance Sampling 1 : for i = 1 , . . . , K do 2 : Sample ( Yt ) tNt=t1 , s.t . for each n , Ytn = xn . Y is a Brownian bridge 3 : ft ← f ( Yt , t ) for each t 4 : α← ∑ t f T t σ −2 ( t ) ( Yt+∆t − Yt ) 5 : β ← ∑ t f T t σ −2 ( t ) ft ∆t 6 : Si ← α− 12β 7 : end for 8 : return pY ( x1 : N ) 1K ∑ i exp ( Si ) An important property of this algorithm is that the sampled paths directly pass through observations.143 This means that the probability estimates directly relate the drift function f to plausible trajectories144 instead of allowing the particles to wander around randomly . See Figure 2 for an illustration . In the145 initial stages of training , simply integrating the SDE with drift f will typically not lead to trajectories146 which pass near the data , especially in high dimensions . This can have a significant impact on the147 variance of the gradients and can inhibit the model ’ s ability to learn . Training on paths that pass148 through the data can greatly mitigate this high variance . As with other algorithms that generate SDE149 sample paths , the discretization of the integrals introduces a small bias . However , this bias vanishes150 in the ∆t→ 0 limit.151 2.1.1 A NOTE ON PARALLELIZABILITY152 With the exception of the sampling step in Line 2 of Algorithm 1 , each of the other operations,153 including the sums , can be performed in parallel over feature and batch dimensions , as well as over154 the t and i indices . Sampling a Brownian bridge , or any conditional Gauss–Markov process , can155 be performed by first sampling the unconditional process , and then linearly interpolating with the156 observations . The linear interpolation can be performed independently , and therefore in parallel , over157 the time dimension . The only operation that is not completely parallelizable is the sampling of the158 unconditional base process — in this case standard Brownian motion . Brownian paths can be sampled159 by cumulative summation of independent normal random numbers . However , this cumulative sum is160 extremely fast , and can be performed independently between each consecutive pair of observations.161 In our tests , sampling whole Brownian trajectories was about 5 orders of magnitude faster than the162 forward pass of the neural network f , and so does not create any noticeable performance impact.163 Once the Brownian paths are sampled , the rest of Algorithm 1 may be implemented in parallel164 without difficulty . Contrast this to standard integrator-base methods ; even if the Brownian paths are165 sampled upfront , the integrator must still perform each of the forward passes of f in sequence.166 See Appendix B for more details on sampling Gaussian bridges.167 2.2 STATE-DEPENDENT DIFFUSION168 The assumption that g is independent of the state is not in fact required for the validity of Theorem 1 ; 169 the reason this assumption is required is to ensure that the process Y is Gaussian , so as to enable170 easy conditional sampling and calculation of pY ( x1 : N ) . Unfortunately , one can not simply find an171 analogue of Theorem 1 to calculate expectations of a general process as expectations with respect to172 a constant diffusion process.173 To address the question of state-dependent diffusion , it is enlightening to consider a simple example174 of such a process . Perhaps the most common example is geometric Brownian motion175 dX = µX dt+ σX dW . ( 11 ) The typical way in which one would solve this is to introduce a transformation Z = log ( X ) , and176 apply Itô ’ s lemma ( see Malliavin & Thalmaier , 2006 , Section 1.5 ; Pavliotis , 2014 , Section 3.5 ) to177 obtain the SDE178 dZ = ( µ− 12σ 2 ) dt+ σ dW . ( 12 ) Similarly , one might address a problem of a general state-dependent diffusion coefficient by consider-179 ing a transformation to a space in which the transformed equation has constant diffusion . Let T ( · , t ) 180 be a map which is invertible for all t. That is , there exists a function T−1 such that if y = T ( x , t ) ,181 then x = T−1 ( y , t ) . Transforming a process with constant diffusion σ , by the map T−1 gives a182 process with diffusion coefficient183 gi , j ( x , t ) = ∂T−1i ∂yk σk , j = ( ∂T ( x , t ) ∂x ) −1 i , k σk , j , ( 13 ) where repeated indices imply summation . With such a transformation we can represent any diffusion184 matrix that can be written as a Jacobian . While the restrictions on the diffusion matrix may be seen as185 an inherent limitation of a path-space importance sampling approach , it may be argued that constant186 or simple diffusion functions would cover the majority of cases of interest , and almost all real-world187 problems require some form of data pre-processing and , potentially , link functions.188 This transformation allows us to infer the SDE in a transformed space , with constant diffusion , and,189 if desired , transform the equation back to the original space using Itô ’ s lemma . This approach is190 described in Algorithm 2 , where we have used the symbol f̃ to represent the drift in the transformed191 space as to avoid ambiguity with the drift in the original space . One important point to note is that one192 should be careful to allow gradients to propagate through the sampling step on Line 2 in Algorithm 2,193 so as to allow learning of the function T . Algorithm 2 Transformed-State Path Integral Importance Sampling 1 : for i = 1 , . . . , K do 2 : Sample ( Yt ) tNt=t1 , s.t . for each n , Ytn = T ( xn , tn ) . Y is a Brownian bridge 3 : f̃t ← f̃ ( Yt ) for each t 4 : α← ∑ t f̃ T t σ −2 ( Yt+∆t − Yt ) 5 : β ← ∑ t f̃ T t σ −2f̃t ∆t 6 : Si ← α− 12β 7 : end for 8 : return ∏ n det ( ∂T ( xn , tn ) ∂xn ) pY ( T ( x1 : N , t1 : N ) ) 1 K ∑ i exp ( Si ) 194 One would typically apply this method to infer f̃ rather than the original f for performance reasons,195 and then only reconstruct the SDE in the original space if required.196 2.2.1 RECONSTRUCTION OF THE SDE IN THE UNTRANSFORMED SPACE197 Generation of new sample paths can be performed easily in the transformed space and then simply198 transforming back by applying T−1 . However , sometimes one needs more information for the199 purposes of analysing the learned equation . In this case the SDE can be transformed back using Itô ’ s200 lemma . The drift and diffusion coefficients are201 fi ( x , t ) = ∂T−1i ∂t + ∂T−1i ∂yk f̃k ( y , t ) + 1 2 σj , k ∂2T−1i ∂yj∂yl σl , k , ( 14 ) gi , j ( x , t ) = ∂T−1i ∂yk σk , j . ( 15 ) All expression are evaluated at y = T ( x , t ) . When T is parameterized by a neural network with202 ReLU non-linearities , the second derivative term in Equation ( 14 ) is almost-everywhere zero . The203 remaining terms are Jacobian vector products , and so can be performed efficiently even in high204 dimensions.1205 3 EXPERIMENTS206 In this section , we provide some experiments to illustrate and verify the performance and capabilities207 of our proposed algorithm . Further details on the experiments are given in Appendix C.208 3.1 THE LORENZ SYSTEM209 To compare the effect of our algorithm on learning , we follow Li et al . ( 2020 ) and train a neural210 network based SDE model on the Lorenz system . In this model the drift function is given by a211 1However , this may require forward-mode instead of backward-mode differentiation . multi-layer perceptron , and the diffusion term is a simple scalar . We generated 16 independent212 paths , consisting of 200 observations each , uniformly sampled over a time interval of [ 0 , 10 ] . We213 trained the model on this data by two different methods . In the first method , we minimize the214 mean-squared error , estimated by integrating out the SDE , and calculating gradients using the adjoint215 method ( Li et al. , 2020 ) .2 In the second method , we directly optimize the log-probability calculated216 using Algorithm 1 . In both cases we used precisely the same optimization parameters , the same217 time-step size ∆t , and the same number of sampled trajectories to calculate averages . Both models218 used the same seed for the neural network initialization , and the same number of gradient steps were219 performed in both cases . These models were trained on an Nvidia RTX 3070 , with 8Gb of memory.220 To assess the performance of these approaches , we record two metrics . The first is the mean-square221 difference between the learned drift vector field , and the Lorenz vector field , normalized by the mean-222 square magnitude of the Lorenz vector field , measured at the observations . Written mathematically:223 err = ∑ n ( fθ ( xn ) − fLor ( xn ) ) 2∑ n ( fLor ( xn ) ) 2 ( 16 ) This metric is shown in Figure 3b . The second metric we record is the mean-squared error of sampled224 trajectories compared to the observations ; this is shown in Figure 3a . However , we note that this is225 not a fair performance metric since the adjoint-based method is directly optimizing for it . On the226 x-axis we show the training time in minutes.227 In Figure 3 we have limited the range of the x-axis in order for the lines to be more clearly visible.228 The total training time for the adjoint-based MSE optimization was a factor 52 longer than the time229 taken optimizing the probability estimates . We note that , while our approach was significantly faster,230 it did use approximately four times as much memory as the adjoint-based method.3231 The poor performance of the integrator-based learning algorithm in Figure 3b — despite its low mean-232 squared-error — suggests that directly optimizing for the discrepancy of typical SDE sample-paths233 compared to observations is not a robust approach to SDE learning.234 3.2 GRADIENT VARIANCE235 We applied both our algorithm and an SDE integrator to a neural network-based SDE model on236 a real-world dataset and recorded the gradients , sampled over many independent trajectories . We237 thereafter computed the variance of the gradients individually per parameter , for various time lengths238 between observations . We used a discretization step size of 0.01 . These results are shown in Figure 4.239 2We also attempted training a model without the adjoint method and instead directly backpropagating through the SDE integrator . However , a single forward pass required more memory than available on the GPU . 3The adjoint algorithm was specifically designed to have constant memory complexity in the number of integration steps . Our algorithm does not exhibit this feature . In each case we used the same neural network , initialized with a fixed seed , and the exact same values240 for all parameters . We used the same loss functions as in Section 3.1 . The data set we used was the241 Hungarian chickenpox cases dataset from the UCI machine learning repository ; 4 it has 20 features242 per observation . We scaled the features by their standard deviations before performing the experiment243 to improve numerical stability.244 Our findings are as follows:245 • For very short times , we found that both algorithms produced comparable gradient variances:246 typically less than 10−7.247 • For longer time spans ( 3 orders of magnitude larger than the discretization step size ) , the248 gradient variance of our algorithm increased by a few orders of magnitude ; the maximum249 we observed was on the order of 10−4 . However , the SDE integrator approach resulted in250 huge increases in variances , with some as large as 1018.251 • Between the above two extremes , we found that the gradient variance of our approach did252 increase with the time between observations , but stayed below 10−5 , while the gradient253 variance from the SDE integrator exhibited very poor scaling with variances of up to 108 for254 times between observations of 1.0.255 Considering that both approaches produced comparable variances on very small timescales , we feel256 that this experiment represents a fair comparison.257 3.3 UNCERTAINTY QUANTIFICATION WITH VARIATIONAL GAUSSIAN PROCESSES258 We attempt to test the viability of using our method for an SDE model with a GP prior over the drift259 function and fitting the posterior variationally . To assess this , we used data trajectories from a van der260 Pol oscillator . For the GP prior , we used a zero mean function and a radial basis function kernel , with261 independent GP priors over each output dimension of the drift vector field . These choices are not262 necessarily optimal ; however , the purpose of this experiment is merely to illustrate the feasibility of263 using variational GP to learn the vector field of an SDE model.264 We used a grid-based inducing point approach and the kernel interpolation method of Wilson & 265 Nickisch ( 2015 ) . The combination of these techniques allows one to take advantage of the Kronecker266 product structure of the covariance matrices and the Toeplitz structure of each factor for accelerated267 sampling . The model was trained variationally , sampling the variational posterior jointly along entire268 trajectories.269 4This dataset can be found at https : //archive.ics.uci.edu/ml/datasets/Hungarian+ Chickenpox+Cases The approximate GP posterior is shown in Figure 5a compared to the ground truth vector field of the270 van der Pol oscillator in Figure 5b . Comparing the GP to the van der Pol vector field , we found that271 the GP model was fairly accurate in areas with many data points , while reverting to the prior far away272 from observations . To assess the quality of the uncertainty quantification , we further calculated the273 discrepancy between the variational posterior and the ground truth vector field . Over a dense grid,274 covering an enlarged area around the observations , we calculated the discrepancy as275 δ = fvdp ( x ) − µ ( x ) σ ( x ) . ( 17 ) A histogram is shown in Figure 5c.276 Under Gaussianity assumptions , one expects to see the quantiles line up well with some associated277 number of standard deviations . However , this will only be the case near to the observations . In278 regions where the GP reverts to the prior , which has a stationary kernel , the mismatch between the279 GP and the polynomial growth of the van der Pol oscillator results in heavy tails . We expect that a280 better choice of kernel , which accounts for this polynomial behaviour , to show residuals with lighter281 tails . We found that the distribution of these δs was fatter-tailed than a Gaussian distribution ; the282 middle 50 % ( 25 % - 75 % quantiles ) slightly passed one standard deviation on either side , as opposed283 to the 68 % of a standard Gaussian distribution . The middle 80 % ( 10 % - 90 % quantiles ) were within284 3 standard deviations . While the posterior uncertainty was somewhat overconfident , it was not wholly285 unreasonable.286 We further note that , while the complexities involved in variational GP fitting can result in longer287 training times , we still found that our method applied to a GP was significantly faster than using an288 SDE integrator with a neural network.289 4 DISCUSSION290 In this work we introduced an algorithm to efficiently estimate probabilities of observations under291 the assumption of an SDE model for the purposes of learning . The proposed approach produces292 estimates which are accurate , even in high dimensions , and can fully utilize parallel hardware for293 significant speedups.294 The proposed algorithm is capable of providing robust probability estimates which can be used in295 models both with or without an explicit observation noise component . This is in contrast to SDE296 integrator-based learning approaches , which must incorporate and estimate an explicit error term due297 to their inability to generate paths which are guaranteed to pass through the observations.298 Our algorithm produces more stable estimates than alternative integrator-based approaches , particu-299 larly when the observations are sparsely distributed over long time intervals and in high dimensions.300 This in turn results in more stable and robust learning . With the rise in applicability of large-scale301 ( neural network ) SDE modeling in science , simulation , and domains such as finance , we see our302 approach as an important contribution to reliable scaling of these methods.303 REPRODUCIBILITY304 Efforts have been made to describe all parameters and details of the algorithms used in this paper,305 either in the content or in the appendix . The code included in the supplementary material includes306 a Dockerfile and instructions for running some of the experiments . Where relevant , fixed seeds for307 random number generators can be found in the code during initialization.308 REFERENCES309 Philipp Batz , Andreas Ruttor , and Manfred Opper . Approximate Bayes learning of stochastic310 differential equations . Phys . Rev . E , 98:022109 , Aug 2018. doi : 10.1103/PhysRevE.98.022109.311 URL https : //link.aps.org/doi/10.1103/PhysRevE.98.022109.312 Ricky T. Q. Chen , Yulia Rubanova , Jesse Bettencourt , and David K Duvenaud . Neural ordinary313 differential equations . 31 , 2018 . URL https : //proceedings.neurips.cc/paper/314 2018/file/69386f6bb1dfed68692a24c8686939b9-Paper.pdf.315 Sarat C. Dass , Jaeyong Lee , Kyoungjae Lee , and Jonghun Park . Laplace based approximate posterior316 inference for differential equation models , differential equations . Statistics and Computing , 27:317 679–698 , 2017. doi : 10.1007/s11222-016-9647-0.318 I. V. Girsanov . On transforming a certain class of stochastic processes by absolutely continuous319 substitution of measures . Theory of Probability & Its Applications , 5 ( 3 ) :285–301 , 1960. doi:320 10.1137/1105027 . URL https : //doi.org/10.1137/1105027.321 Samuel Greydanus , Misko Dzamba , and Jason Yosinski . Hamiltonian Neural Networks.322 In H. Wallach , H. Larochelle , A. Beygelzimer , F. d'Alché-Buc , E. Fox , and R. Gar-323 nett ( eds . ) , Advances in Neural Information Processing Systems , volume 32 . Curran Asso-324 ciates , Inc. , 2019 . URL https : //proceedings.neurips.cc/paper/2019/file/325 26cd8ecadce0d4efd6cc8a8725cbd1f8-Paper.pdf.326 Martin Hutzenthaler and Arnulf Jentzen . On a perturbation theory and on strong convergence rates327 for stochastic ordinary and partial differential equations with nonglobally monotone coefficients.328 The Annals of Probability , 48 ( 1 ) , Jan 2020 . ISSN 0091-1798. doi : 10.1214/19-aop1345 . URL329 http : //dx.doi.org/10.1214/19-AOP1345.330 Junteng Jia and Austin R Benson . Neural jump stochastic differential equations . In331 H. Wallach , H. Larochelle , A. Beygelzimer , F. d'Alché-Buc , E. Fox , and R. Garnett332 ( eds . ) , Advances in Neural Information Processing Systems , volume 32 . Curran Asso-333 ciates , Inc. , 2019 . URL https : //proceedings.neurips.cc/paper/2019/file/334 59b1deff341edb0b76ace57820cef237-Paper.pdf.335 Hadiseh Karimi and Kimberley B. McAuley . Bayesian Estimation in Stochastic Differential336 Equation Models via Laplace Approximation . IFAC-PapersOnLine , 49 ( 7 ) :1109–1114 , 2016.337 ISSN 2405-8963. doi : https : //doi.org/10.1016/j.ifacol.2016.07.351 . URL https : //www.338 sciencedirect.com/science/article/pii/S2405896316305584 . 11th IFAC339 Symposium on Dynamics and Control of Process SystemsIncluding Biosystems DYCOPS-CAB340 2016.341 Patrick Kidger , James Foster , Xuechen Li , and Terry J Lyons . Neural SDEs as Infinite-Dimensional342 GANs . In Marina Meila and Tong Zhang ( eds . ) , Proceedings of the 38th International Conference343 on Machine Learning , volume 139 of Proceedings of Machine Learning Research , pp . 5453–5463.344 PMLR , 18–24 Jul 2021 . URL https : //proceedings.mlr.press/v139/kidger21b.345 html.346 Prashant Kumar , Martin Schmelzer , and Richard P. Dwight . Stochastic turbulence modeling in RANS347 simulations via multilevel Monte Carlo . Computers & Fluids , 201:104420 , 2020 . ISSN 0045-7930.348 doi : https : //doi.org/10.1016/j.compfluid.2019.104420 . URL https : //www.sciencedirect.349 com/science/article/pii/S0045793019303780.350 Xuechen Li , Ting-Kam Leonard Wong , Ricky T. Q. Chen , and David Duvenaud . Scalable gradients351 for stochastic differential equations . International Conference on Artificial Intelligence and352 Statistics , 2020.353 Xuanqing Liu , Tesi Xiao , Si Si , Qin Cao , S. Kumar , and Cho-Jui Hsieh . Neural SDE : Stabilizing354 Neural ODE Networks with Stochastic Noise . ArXiv , abs/1906.02355 , 2019.355 Paul Malliavin and Anton Thalmaier . Stochastic Calculus of Variations in Mathematical Finance.356 Springer , 01 2006 . ISBN 3-540-43431-3. doi : 10.1007/3-540-30799-0.357 James Morrill , Cristopher Salvi , Patrick Kidger , and James Foster . Neural rough differential equations358 for long time series . In Marina Meila and Tong Zhang ( eds . ) , Proceedings of the 38th International359 Conference on Machine Learning , volume 139 of Proceedings of Machine Learning Research , pp.360 7829–7838 . PMLR , 18–24 Jul 2021 . URL https : //proceedings.mlr.press/v139/361 morrill21b.html.362 GA Pavliotis . Stochastic Processes and Applications : Diffusion Processes , the Fokker–Planck and363 Langevin Equations . Springer , 2014.364 Michael Poli , Stefano Massaroli , Junyoung Park , Atsushi Yamashita , Hajime Asama , and Jinkyoo365 Park . Graph neural ordinary differential equations . 2021.366 Alvaro Sanchez-Gonzalez , Victor Bapst , Kyle Cranmer , and Peter Battaglia . Hamiltonian Graph367 Networks with ODE Integrators , 2019.368 Belinda Tzen and M. Raginsky . Neural stochastic differential equations : Deep latent Gaussian models369 in the diffusion limit . ArXiv , abs/1905.09883 , 2019.370 Andrew Wilson and Hannes Nickisch . Kernel Interpolation for Scalable Structured Gaussian Pro-371 cesses ( KISS-GP ) . In Francis Bach and David Blei ( eds . ) , Proceedings of the 32nd International372 Conference on Machine Learning , volume 37 of Proceedings of Machine Learning Research,373 pp . 1775–1784 , Lille , France , 07–09 Jul 2015 . PMLR . URL http : //proceedings.mlr.374 press/v37/wilson15.html.375 C. Yildiz , M. Heinonen , J. Intosalmi , H. Mannerstrom , and H. Lahdesmaki . Learning stochastic376 differential equations with gaussian processes without gradient matching . In IEEE International377 Workshop on Machine Learning for Signal Processing . MLSP , 2018.378 Yaofeng Desmond Zhong , Biswadip Dey , and Amit Chakraborty . Symplectic ode-net : Learning379 hamiltonian dynamics with control . In International Conference on Learning Representations,380 2020 . URL https : //openreview.net/forum ? id=ryxmb1rKDS.381 A THEOREM 1382 We have that X and Y are processes obeying the SDEs dX = f ( X ) dt+ g ( X ) dW , ( 18 ) dY = g ( Y ) dW , ( 19 ) dropping the time argument for notational simplicity . Expectations with respect to SDEs can be expressed as path integrals . In the Itô convention , the path integral representation of an SDE has the following form EX [ F [ X ] ] = lim N→∞ ∫ F [ x ] N∏ n=1 dxn√ 2π∆tng ( xn−1 ) exp { −1 2 N∑ n=1 ( ∆xn − f ( xn−1 ) ∆tn g ( xn−1 ) √ ∆tn ) 2 } ( 20 ) = : ∫ DxF [ x ] J exp { −1 2 ∫ L ( x ( t ) , ẋ ( t ) ) dt } , ( 21 ) where J is a Jacobian factor which depends on g but not f and the Lagrangian is given by383 L ( x , ẋ ) = ( ẋ− f ( x ) g ( x ) ) 2 . ( 22 ) The derivative of x here may be thought of distributionally ; however , the expression for the measure384 Dx exp { − 12 ∫ L } need only be defined on the Cameron–Martin subspace5 ; guaranteeing its unique385 extension to the whole Wiener space . In contrast to this , the expression inside the expectation386 F [ x ] should be defined almost-everywhere , and hence care should be taken when ẋ appears in an387 expectation.388 We may expand the quadratic to separate the Lagrangian into a drift-free term plus terms dependent on the drift L = ( ẋ g ( x ) ) 2 ( 23 ) − 2fT ( x ) g−2 ( x ) ẋ ( 24 ) + fT ( x ) g−2 ( x ) f ( x ) . ( 25 ) The first term , on line 23 , is the Lagrangian for the process Y , which has no drift term . Shuffling the389 rest of the terms out of the measure and into the expectation , we have390 EX [ F [ X ] ] = ∫ DxF [ x ] eS [ x ] exp { −1 2 ∫ ( ẋ g ( x ) ) 2 dt } , ( 26 ) where S [ X ] = ∫ fT ( Xt ) g −2 ( Xt ) Ẋt dt ( 27 ) − 1 2 ∫ fT ( Xt ) g −2 ( Xt ) f ( Xt ) dt ( 28 ) = ∫ fT ( Xt ) g −2 ( Xt ) dXt ( 29 ) − 1 2 ∫ fT ( Xt ) g −2 ( Xt ) f ( Xt ) dt . ( 30 ) Note that on the third line we have used the distributional definition of Ẋ ; i.e . Ẋt dt = dXt.391 Lastly , using the definition of conditional expectation , we have that392 EA [ F [ A ] p ( B = b|A ) ] = EA [ p ( B = b|A ) ] EA [ F [ A ] ∣∣∣B = b ] . ( 31 ) By trivial substitution , we have393 pX ( x1 : N ) = pY ( x1 : N ) EY [ eS [ Y ] ∣∣∣ { Y ( tn ) = xn } Nn=1 ] . ( 32 ) B SAMPLING BRIDGES394 Let Y be a Gauss–Markov process with kernel k. Since the process is Markov , we need only sample395 the process conditioned on two end-points . Let y = ( y0 , yT ) be the known values of the process at396 times τ = ( t0 , T ) . Let Ỹ be the process defined by397 Ỹt : = Yt +K ( t , τ ) K ( τ , τ ) −1 ( y − Yτ ) , for t0 ≤ t ≤ T , ( 33 ) whereK is the matrix whose entries are k ( ti , tj ) . This distribution of Ỹ is the same as the distribution398 of Y conditioned on the values y at times τ . Note that once Yt has been sampled — which may399 require a cumulative sum — this transformation can be performed independently , and hence in400 parallel , for each t. For each consecutive pair of observations , the bridge process can be sampled401 independently.402 5The Hilbert space of functions whose derivatives are square integrable . The Wiener space is the space of continuous functions . This is not a Hilbert space , instead it is a Banach space with the supremum norm . The measure of the Cameron–Martin space is in fact zero ; the sample paths of the SDE are almost-surely nowhere differentiable . In the simplest case , where Y is a Brownian motion starting from y0 at time t0 = 0 , this reduces to Ỹt = Yt + k ( t , T ) k ( T , T ) ( yT − YT ) ( 34 ) = Yt + t T ( yT − YT ) . ( 35 ) And similarly for any other processes which can be sampled with a fixed starting point.403 In the more general case we can invert the two by two matrix to get an explicit formula for Ỹt Ỹt = Yt + k ( t , t0 ) k ( T , T ) − k ( t , T ) k ( t0 , T ) k ( t0 , t0 ) k ( T , T ) − k ( t0 , T ) 2 ( y0 − Y0 ) ( 36 ) + k ( t , T ) k ( t0 , t0 ) − k ( t , t0 ) k ( t0 , T ) k ( t0 , t0 ) k ( T , T ) − k ( t0 , T ) 2 ( yT − YT ) . ( 37 ) This may be extended straightforwardly to other cases , such as conditioning on the values of the404 integral , or derivative of the process etc.405 C EXPERIMENTS406 C.1 PROBABILITY ESTIMATES407 As a sanity check , we compare the log-probability estimates of our algorithm to the actual log-408 probabilities of an Ornstein–Uhlenbeck process . The probability density for this process is available409 in closed form for any number of observations . We estimate the probability of a set of data points410 evenly spaced over a time interval of [ 0 , 10 ] , taken from a sine function xn = sin ( π/10× tn ) . For411 these estimates we used 1000 time steps to estimate the integral S , and averaged over 100 trajectories,412 independently sampled from a Brownian bridge passing through the observations . We repeated this413 process 1000 times and report the mean and standard deviation of these estimates . Figure 6 shows414 these estimates compared to the analytic probability given by the Ornstein–Uhlenbeck process for415 various numbers of observations as a function of the dimension of the problem.416 An interesting observation is that the variance of the estimator seems to decrease with the number417 of data points . This is atypical of probability estimators , since the magnitude of the log-probability418 increases linearly with the number of observations ( not to be confused with the number of samples419 used to estimate the log-probability ) . In almost all cases , with the exception of 4 observations in420 more than 40 dimensions , our algorithm gives accurate log-probability estimates with small standard421 deviations . The error of this exception is approximately 30 % , but is significantly reduced by adding422 more observations , or using more samples . We believe this error is acceptable considering the small423 number of observations and the large scale . For 10 observations in 100 dimensions the standard424 deviation of our estimator is only 0.4 % of the magnitude of the log-probability and the error of the425 mean estimate is 2 % of the analytic log-probability . This small bias can be further reduced by using426 more samples or a smaller ∆t . A single estimate in the 100 dimensional case took less than half a427 second to compute on a laptop CPU , and is therefore feasible to use in the inner loop of a learning428 algorithm.429 C.2 LORENZ430 C.2.1 DATA SET431 We generated data by simulating a Lorenz system with the exact same parameters as Li et al.432 ( 2020 ) . We generated 16 independent trajectories , with initial values sampled from a standard normal433 distribution , and discretely sampled the values of the process over 200 equally spaced time points434 ranging from 0 to 10 . Unlike Li et al . ( 2020 ) , we did not add any observation noise to the data.435 We deliberately used a sparser data set than Li et al . ( 2020 ) , due to personal experience of the difficulty436 of fitting SDE models on sparse observations.437 C.2.2 MODEL438 The model we used to fit to the observations was439 dXt = fθ ( Xt ) dt+ σ dW , ( 38 ) where σ is a scalar and fθ is a fully-connected neural network with ReLU nonlinearities and parame-440 ters θ . We used layer sizes of 3→ 32→ 256→ 32→ 3.441 C.2.3 TRAINING PARAMETERS442 We used precisely the same parameters for each model , the only difference in the training procedures443 being the loss functions used . In the first case , the loss function per trajectory was444 Lmse ( θ ; x1 : N ) = 1 KN ∑ k , n ( X ( k ) tn − xn ) 2 , ( 39 ) where N = 200 is the number of observations per trajectory , and K is the number of sampled paths445 used to estimate the MSE , and X ( k ) is sampled using an SDE integrator starting at X ( k ) t1 = x1 . We446 then averaged this loss function over the 16 independent observed trajectories.447 In the second case , the loss function per trajectory was448 LPI ( θ ; x1 : N ) = − 1 N log p̂X ( x1 : N | θ ) , ( 40 ) where p̂X ( x1 : N | θ ) is calculated using Algorithm 1 with K trajectory samples . Again this loss was449 averaged over the 16 independent observed trajectories . In both cases we used K = 64 and a time450 step size of ∆t = 10−2.451 For each model we used the Adam optimizer with a learning rate of 10−3 and ran the optimization452 algorithm for 104 iterations . The model using our importance sampling approach completed the full453 number of iterations in 34 minutes , while the integrator-based approach took 29 hours and 46 minutes454 to complete the same number of iterations.455 Our approach consistently maintained 100 % GPU utilization , except during MSE evaluation which456 used an integrator , while the integrator based approach was unable to surpass 25 % GPU utilization in457 this experiment.458 C.3 VARIATIONAL GAUSSIAN PROCESSES459 Our approach allows more straightforward implementation of SDE models using a Gaussian process460 prior for the drift function . Some previous approaches often resort to approximations such as461 using only the predictive mean or MAP estimates ( Yildiz et al. , 2018 ) . For dense observations,462 directly discretizing the SDE and fitting the GP to the observation deltas may be viable . For sparse463 observations this is much more difficult . Our proposed method makes variational GP methods slightly464 simpler , since the values of f ( Yt ) can be sampled jointly along the path . However , it is important to465 note that various complexities still arise such as the difficulty of efficiently sampling high-dimensional466 Gaussian distributions.467 We used the kernel interpolation method of Wilson & Nickisch ( 2015 ) which stores a grid of468 inducing locations per dimension . Storing inducing locations per dimension for a Kronecker product469 kernel effectively gives a variational distribution over md inducing points with only d×m memory470 requirements , where m is the number of inducing points per dimension and d is the dimension . When471 these inducing locations are evenly spaces , the covariance factors have a Toeplitz structure which472 allows sampling in linearithmic time complexity.473 To fit the model we used gradient ascent on the ELBO which is calculated as follows:474 ELBO = Ef∼q [ log p ( x|f ) ] −KL [ q ( f ) |p ( f ) ] . ( 41 ) The KL divergence is between two Gaussian distributions calculated at the inducing locations in475 the usual way . For the likelihood term , we generated trajectories ( as in Algorithm 1 ) , followed by476 jointly sampling the variational GP posterior along these trajectories and proceed with the rest of the477 computation in Algorithm 1 using these samples . Our optimization objective is calculated478 L = − 1 K ∑ K log p̂ ( x1 : N | f ( k ) ) + KL [ q ( f ) |p ( f ) ] , ( 42 ) where each f ( k ) is an independent sample over the whole path of Y . In other words , f ( k ) ( Yt1 ) and479 f ( k ) ( Yt2 ) are correlated , but f ( k ) ( Yt1 ) and f ( j ) ( Yt2 ) are not when k 6= j.480 In our experiment we used 32 evenly spaced inducing points per dimension , and jointly sampled the481 variational posterior over 64 trajectories of 1024 time steps . The model was trained with the Adam482 optimizer with an initial learning rate of 0.1 , and an exponential decay with factor 0.999 for 105483 training steps . However , the square deviation of the predictive mean from the ground truth converged484 well before 104 iterations . Training for 104 iterations took 34 minutes , 105 iterations took about 5485 and a half hours.486 | The paper presents a new approach to compute the density of a given observation sequence under arbitrary drift and diffusion functions. The method relies on Girsanov's theorem, which requires evaluating the density of the observations under Wiener process. The authors further propose an inversion trick to handle state dependent diffusion functions. The experiments show that the method indeed learns accurate drift and diffusion functions much faster than standard integration-based approaches and has much smaller gradient variance | SP:eea7e96cea9dddb19afeb4b9b33ba9de850cef0f |
Multi-Agent Reinforcement Learning with Shared Resource in Inventory Management | 1 INTRODUCTION . Inventory management ( IM ) problem has long been one of the most important applications in the supply-chain industry ( Nahmias & Smith , 1993 ) . Its main purpose is to maintain a balance between the supply and demand of stock keeping units ( SKUs ) in a supply chain by optimizing replenishment decisions of each SKU . Besides leading to profit increment and operational cost reduction , efficient IM can even give rise to better services to customers . However , it is quite a challenging task in practice , especially when there are lots of SKUs involved in the supply-chain . Particularly , while all SKUs should cooperate with each other to achieve high profits , they also need to compete for shared resources e.g. , warehouse spaces , budget etc . Such co-existence of cooperation and competition renders IM a complicated game that is hard to address . Traditional methods usually reduce IM problems to solving dynamic programming problems . However , these approaches often rely on some unrealistic assumptions such as i.i.d . demand , deterministic leading time , etc . Moreover , as the state space grows exponentially along with some key factors like leading time and number of SKUs ( Gijsbrechts et al. , 2019 ) , the corresponding dynamic programming problems become intractable due to the curse of dimensionality . Because of these limitations , many approaches based on approximate dynamic programming are proposed to solve IM problems in different settings ( Halman et al. , 2009 ; Fang et al. , 2013 ; Chen & Yang , 2019 ) . While these approaches perform well in certain scenarios , they heavily rely on problem-specific expertise or assumptions e.g. , the zero or one period leading time assumption in ( Halman et al. , 2009 ) , hence can hardly generalize to other settings . In contrast , reinforcement learning ( RL ) based methods , with fast inference speed , can generalize to various scenarios in a data-driven manner . However , it is usually too costly to train a global policy that can make decisions for all SKUs , since the training efficiency can be notably curtailed because of the large global state and action space ( Jiang & Agarwal , 2018 ) ) . To further address the training efficiency issue , it is natural to adopt the multi-agent reinforcement learning ( MARL ) paradigm , where each SKU is regarded as an agent whose state and action spaces are localized and only contain information relevant to itself . There are currently two popular paradigms to train MARL in the literature : independent learning ( Tan , 1993 ) and joint action learning ( Lowe et al. , 2017 ) . Despite of their success in many scenarios , these two MARL paradigms also exhibit certain weaknesses that restrain their effectiveness in solving IM problems . On one hand , if applying independent learning , policy training of one agent simply treats all other agents as parts of the stochastic environment , hence is hard to converge due to non-stationary of the environment . On the other hand , joint action learning usually learns a centralized critic conditioned on the joint action and state spaces of all agents , which can easily become intractable with increasing number of SKUs . Furthermore , it could be quite time-consuming to sample data from joint simulator for a great number of SKUs , since it usually involves much computation on many internal variables caused by complex agent interactions . To address these challenges , we took a closer look at the IM problem and find that there exists a special structure that can be leveraged to design more effective MARL paradigm . Particularly , each agent in IM only interacts with others through the shared resource , e.g. , warehouse spaces . We introduce an auxiliary variable to represent the whole inventory level , implying the available shared resource , for all SKUs , and refer to this variable as context . From the MARL perspective , one agent can be influenced by other agents only through such context . The context dynamics actually reflect the collective behaviors of all agents . And , conditioned on context dynamics , one agent ’ s state transition and reward function are independent of other agents . In this way , leveraging context as an additional input for each agent ’ s policy/value functions enables us to both avoid the non-stationary problem caused by independent learning and mitigate the intractable centralized critics learning caused by exploding state and action spaces . Moreover , introducing context dynamics inspires us to build a local simulator for each agent in order to facilitate more efficient policy learning for each agent . Based on this structure with context dynamics , we propose a shared-resource stochastic game to model the IM problem . Specifically , we introduce a surrogate objective function to optimize the return of agent i conditioned on all other agents , denoted by −i . Here , we make two approximations to get the surrogate objective function : 1 ) rearranging the sampling process by first sampling context dynamics then sampling local state/action/reward for each agent i ; 2 ) using context dynamics sampled by previous policies . Based on above surrogate objective , our algorithm consists of two iterative learning procedures : 1 ) obtaining context dynamics from joint simulator , 2 ) updating policy for each agent by data sampled from its respective local simulator conditioned on collective context dynamics . By decoupling each agent from all others with a separate training procedure , our method can greatly reduce model complexity and accelerate learning procedure , as shown by extensive experiments . It is worthwhile to mention that our method is not limited to IM , but can also be applied to many other applications with shared-resource structure , e.g. , portfolio management ( Ye et al. , 2020 ) , smart grid scheduling ( Remani et al. , 2019 ) , etc . Our contributions are summarized as follows : • We propose shared-resource stochastic game to capture the problem structure in IM , that agents only interact with each other through shared resource . • We propose a novel algorithm that leverages the shared-resource structure to solve IM problem efficiently . • Extensive experiments demonstrate that our method outperforms existing MARL algorithms on both profits and computing efficiency . 2 BACKGROUND . 2.1 STOCHASTIC GAMES . We build our work on stochastic games ( SGs ) ( Shapley , 1953 ) , since each SKU in IM problem has its own profit ( reward ) to optimize . A Stochastic Game is defined by a tuple ( N , S , { Ai } i∈N , T , { Ri } i∈N , γ ) , where N = { 1 , · · · , n } denotes the set of n > 1 agents , S denotes the state space observed by all agents , Ai denotes the action space of agent i . Let A : = A1 × · · · × An , then T : S × A → ∆ ( S ) denotes the transition probability from any state s ∈ S to any state s′ ∈ S after taking a joint action a ∈ A ; Ri : S × A × S → R is the reward function that determines the immediate reward received by agent i for a transition from ( s , a ) to s′ ; γ ∈ [ 0 , 1 ) is the discount factor . We can formulate the joint policy of other agents ’ as π−i = ∏ j∈−i π j . Each agent i optimizes its policy πi : S → ∆ ( Ai ) to maximize its own long-term reward , which is conditioned on other agents ’ behavior , defined as maxπiη i ( πi , π−i ) = E ( st , ait , a−it ) ∼T , πi , π−i [ ∞∑ t=0 γtrit ] . ( 1 ) We will illustrate the shared resource structure of IM problem in Section 2.2 , which motivates us to propose shared-resource stochastic game as a special case of stochastic game to capture such structure in Section 3.1 . 2.2 INVENTORY MANAGEMENT WITH SHARED RESOURCE . While a typical setting for IM shall involve a supply network of multi-echelon including stores , warehouses and factories , we simplify the setting to ease our presentation . In the following , we shall focus on scenarios with one store and multiple SKUs . We further assume that there is an upstream warehouse that can fulfill requirements from the store perfectly . Our objective is to learn high-quality replenishing policies for each SKU in the store , particularly when there are a large number of SKUs . As replenishing decisions for SKUs in stores should directly consider consumption behaviors of customers and competitions from other SKUs due to limited resources like spaces , budget etc. , they are more challenging to optimize comparing to SKUs in warehouses . It is worthwhile to mention that , due to the flexibility of RL algorithms , our method can also be applied to more complex settings with multi-echelon , fluctuate supply , non-deterministic leading time etc . Similar to previous work , we follow the multi-agent RL ( MARL ) framework with decentralized agents , each of which manages inventory of one SKU in the store . We assume that the store has n SKUs in sell , all of which share a common space that can store up to Imax units at the same time . Replenishing decisions of each SKU are made on discretized time steps , which are days in our paper . For each time step t and SKU i , let İit ∈ Z denote units of i that are in stock . Hence , the following constraint shall hold for all time steps : ∀t ≥ 0. n∑ i=1 İit ≤ Imax ( 2 ) At any time step t , the agent corresponding to SKU i may place a replenishment order to request Oit ∈ Z units of products from its upstream warehouse . These replenishment orders can not be fulfillment instantly , but will take several time steps , referred as leading time , before these products are delivered to the store . Let Li denote the leading time of SKU i and T it ∈ Z its total units in transit at the time step t. Meanwhile , demands from customers Dit may consume inventory of SKU i and cause an actual sale of units Sit ∈ Z . Due to the possibility of out-of-stock , Sit may be less than Dit . Formally , dynamics of these variables can be described as follows : Sit = min ( Dit , İ i t ) ( 3 ) T it+1 = T i t −Oit−Li+1 +O i t+1 ( 4 ) Îit = İ i t − Sit +Oit−Li+1 ( 5 ) ρ = { 0 if ∑n i=1 Î i t ≤ Imax∑n i=1 Î i t−Imax∑n i=1 O i t−Li+1 otherwise ( 6 ) İit+1 = İ i t − Sit + ⌊ ( 1− ρ ) Oit−Li+1⌋ ( 7 ) As we mentioned before , due to all SKUs share a common space , it may happen that the storage overflows when ordered products arrive . In this paper , we assume that the excess SKUs will be discarded proportionally according to ρ defined in Eq . 6 , which corresponds to the overflowing ratio if we accept all coming SKUs without considering the space constraint . To calculate ρ , we also introduce an extra variable Îit , which we call afterstate of İ i t . Intuitively , it denotes units of SKU i in stock at the end of the t-th time step if we omit the capacity constraint . We shall note that other manners e.g. , prioritizing all SKUs , to resolve space overflows are possible . The algorithm that we will introduce in the following section will also apply to these settings . Undoubtedly , such behaviors will cause extra operational cost which should be avoided as much as possible in our replenishing decisions . The intermediate profit Pt it of the i-th SKU is calculated according to the following equation : Pt it = piS i t − qiOit − oI [ Oit > 0 ] − hİit ( 8 ) where pi and qi are the unit sale price , unit procurement price for the i-th SKU , respectively , and o and h are the order cost and unit holding cost , respectively . I [ · ] is an indicator function which equals to one when the condition is true and zero otherwise . The order cost reflects the fixed transportation cost or the order processing cost , and yields whenever the order quantity is non-zero . For convenience , we summarize all notations in Table 2 in Appendix B , where we also give an example with 2 SKUs in Fig . 4 to further illustrate the whole procedure . | The authors formulate an inventory optimisation problem as a stochastic game, where each SKU is a player. In order to reduce computational complexity, the game is formulated such that the only interactions among players are through the available storage space they have to share. The paper also proposes an algorithm that relies on local simulators (as opposed to joint simulation) and surrogate losses to improve efficiency. Simulations show that the proposed algorithm is able to outperform other MARL baselines for up to 50 SKUs. | SP:95b782cd35e6929cbfaca5f47ce447b4e1a17ea3 |
Multi-Agent Reinforcement Learning with Shared Resource in Inventory Management | 1 INTRODUCTION . Inventory management ( IM ) problem has long been one of the most important applications in the supply-chain industry ( Nahmias & Smith , 1993 ) . Its main purpose is to maintain a balance between the supply and demand of stock keeping units ( SKUs ) in a supply chain by optimizing replenishment decisions of each SKU . Besides leading to profit increment and operational cost reduction , efficient IM can even give rise to better services to customers . However , it is quite a challenging task in practice , especially when there are lots of SKUs involved in the supply-chain . Particularly , while all SKUs should cooperate with each other to achieve high profits , they also need to compete for shared resources e.g. , warehouse spaces , budget etc . Such co-existence of cooperation and competition renders IM a complicated game that is hard to address . Traditional methods usually reduce IM problems to solving dynamic programming problems . However , these approaches often rely on some unrealistic assumptions such as i.i.d . demand , deterministic leading time , etc . Moreover , as the state space grows exponentially along with some key factors like leading time and number of SKUs ( Gijsbrechts et al. , 2019 ) , the corresponding dynamic programming problems become intractable due to the curse of dimensionality . Because of these limitations , many approaches based on approximate dynamic programming are proposed to solve IM problems in different settings ( Halman et al. , 2009 ; Fang et al. , 2013 ; Chen & Yang , 2019 ) . While these approaches perform well in certain scenarios , they heavily rely on problem-specific expertise or assumptions e.g. , the zero or one period leading time assumption in ( Halman et al. , 2009 ) , hence can hardly generalize to other settings . In contrast , reinforcement learning ( RL ) based methods , with fast inference speed , can generalize to various scenarios in a data-driven manner . However , it is usually too costly to train a global policy that can make decisions for all SKUs , since the training efficiency can be notably curtailed because of the large global state and action space ( Jiang & Agarwal , 2018 ) ) . To further address the training efficiency issue , it is natural to adopt the multi-agent reinforcement learning ( MARL ) paradigm , where each SKU is regarded as an agent whose state and action spaces are localized and only contain information relevant to itself . There are currently two popular paradigms to train MARL in the literature : independent learning ( Tan , 1993 ) and joint action learning ( Lowe et al. , 2017 ) . Despite of their success in many scenarios , these two MARL paradigms also exhibit certain weaknesses that restrain their effectiveness in solving IM problems . On one hand , if applying independent learning , policy training of one agent simply treats all other agents as parts of the stochastic environment , hence is hard to converge due to non-stationary of the environment . On the other hand , joint action learning usually learns a centralized critic conditioned on the joint action and state spaces of all agents , which can easily become intractable with increasing number of SKUs . Furthermore , it could be quite time-consuming to sample data from joint simulator for a great number of SKUs , since it usually involves much computation on many internal variables caused by complex agent interactions . To address these challenges , we took a closer look at the IM problem and find that there exists a special structure that can be leveraged to design more effective MARL paradigm . Particularly , each agent in IM only interacts with others through the shared resource , e.g. , warehouse spaces . We introduce an auxiliary variable to represent the whole inventory level , implying the available shared resource , for all SKUs , and refer to this variable as context . From the MARL perspective , one agent can be influenced by other agents only through such context . The context dynamics actually reflect the collective behaviors of all agents . And , conditioned on context dynamics , one agent ’ s state transition and reward function are independent of other agents . In this way , leveraging context as an additional input for each agent ’ s policy/value functions enables us to both avoid the non-stationary problem caused by independent learning and mitigate the intractable centralized critics learning caused by exploding state and action spaces . Moreover , introducing context dynamics inspires us to build a local simulator for each agent in order to facilitate more efficient policy learning for each agent . Based on this structure with context dynamics , we propose a shared-resource stochastic game to model the IM problem . Specifically , we introduce a surrogate objective function to optimize the return of agent i conditioned on all other agents , denoted by −i . Here , we make two approximations to get the surrogate objective function : 1 ) rearranging the sampling process by first sampling context dynamics then sampling local state/action/reward for each agent i ; 2 ) using context dynamics sampled by previous policies . Based on above surrogate objective , our algorithm consists of two iterative learning procedures : 1 ) obtaining context dynamics from joint simulator , 2 ) updating policy for each agent by data sampled from its respective local simulator conditioned on collective context dynamics . By decoupling each agent from all others with a separate training procedure , our method can greatly reduce model complexity and accelerate learning procedure , as shown by extensive experiments . It is worthwhile to mention that our method is not limited to IM , but can also be applied to many other applications with shared-resource structure , e.g. , portfolio management ( Ye et al. , 2020 ) , smart grid scheduling ( Remani et al. , 2019 ) , etc . Our contributions are summarized as follows : • We propose shared-resource stochastic game to capture the problem structure in IM , that agents only interact with each other through shared resource . • We propose a novel algorithm that leverages the shared-resource structure to solve IM problem efficiently . • Extensive experiments demonstrate that our method outperforms existing MARL algorithms on both profits and computing efficiency . 2 BACKGROUND . 2.1 STOCHASTIC GAMES . We build our work on stochastic games ( SGs ) ( Shapley , 1953 ) , since each SKU in IM problem has its own profit ( reward ) to optimize . A Stochastic Game is defined by a tuple ( N , S , { Ai } i∈N , T , { Ri } i∈N , γ ) , where N = { 1 , · · · , n } denotes the set of n > 1 agents , S denotes the state space observed by all agents , Ai denotes the action space of agent i . Let A : = A1 × · · · × An , then T : S × A → ∆ ( S ) denotes the transition probability from any state s ∈ S to any state s′ ∈ S after taking a joint action a ∈ A ; Ri : S × A × S → R is the reward function that determines the immediate reward received by agent i for a transition from ( s , a ) to s′ ; γ ∈ [ 0 , 1 ) is the discount factor . We can formulate the joint policy of other agents ’ as π−i = ∏ j∈−i π j . Each agent i optimizes its policy πi : S → ∆ ( Ai ) to maximize its own long-term reward , which is conditioned on other agents ’ behavior , defined as maxπiη i ( πi , π−i ) = E ( st , ait , a−it ) ∼T , πi , π−i [ ∞∑ t=0 γtrit ] . ( 1 ) We will illustrate the shared resource structure of IM problem in Section 2.2 , which motivates us to propose shared-resource stochastic game as a special case of stochastic game to capture such structure in Section 3.1 . 2.2 INVENTORY MANAGEMENT WITH SHARED RESOURCE . While a typical setting for IM shall involve a supply network of multi-echelon including stores , warehouses and factories , we simplify the setting to ease our presentation . In the following , we shall focus on scenarios with one store and multiple SKUs . We further assume that there is an upstream warehouse that can fulfill requirements from the store perfectly . Our objective is to learn high-quality replenishing policies for each SKU in the store , particularly when there are a large number of SKUs . As replenishing decisions for SKUs in stores should directly consider consumption behaviors of customers and competitions from other SKUs due to limited resources like spaces , budget etc. , they are more challenging to optimize comparing to SKUs in warehouses . It is worthwhile to mention that , due to the flexibility of RL algorithms , our method can also be applied to more complex settings with multi-echelon , fluctuate supply , non-deterministic leading time etc . Similar to previous work , we follow the multi-agent RL ( MARL ) framework with decentralized agents , each of which manages inventory of one SKU in the store . We assume that the store has n SKUs in sell , all of which share a common space that can store up to Imax units at the same time . Replenishing decisions of each SKU are made on discretized time steps , which are days in our paper . For each time step t and SKU i , let İit ∈ Z denote units of i that are in stock . Hence , the following constraint shall hold for all time steps : ∀t ≥ 0. n∑ i=1 İit ≤ Imax ( 2 ) At any time step t , the agent corresponding to SKU i may place a replenishment order to request Oit ∈ Z units of products from its upstream warehouse . These replenishment orders can not be fulfillment instantly , but will take several time steps , referred as leading time , before these products are delivered to the store . Let Li denote the leading time of SKU i and T it ∈ Z its total units in transit at the time step t. Meanwhile , demands from customers Dit may consume inventory of SKU i and cause an actual sale of units Sit ∈ Z . Due to the possibility of out-of-stock , Sit may be less than Dit . Formally , dynamics of these variables can be described as follows : Sit = min ( Dit , İ i t ) ( 3 ) T it+1 = T i t −Oit−Li+1 +O i t+1 ( 4 ) Îit = İ i t − Sit +Oit−Li+1 ( 5 ) ρ = { 0 if ∑n i=1 Î i t ≤ Imax∑n i=1 Î i t−Imax∑n i=1 O i t−Li+1 otherwise ( 6 ) İit+1 = İ i t − Sit + ⌊ ( 1− ρ ) Oit−Li+1⌋ ( 7 ) As we mentioned before , due to all SKUs share a common space , it may happen that the storage overflows when ordered products arrive . In this paper , we assume that the excess SKUs will be discarded proportionally according to ρ defined in Eq . 6 , which corresponds to the overflowing ratio if we accept all coming SKUs without considering the space constraint . To calculate ρ , we also introduce an extra variable Îit , which we call afterstate of İ i t . Intuitively , it denotes units of SKU i in stock at the end of the t-th time step if we omit the capacity constraint . We shall note that other manners e.g. , prioritizing all SKUs , to resolve space overflows are possible . The algorithm that we will introduce in the following section will also apply to these settings . Undoubtedly , such behaviors will cause extra operational cost which should be avoided as much as possible in our replenishing decisions . The intermediate profit Pt it of the i-th SKU is calculated according to the following equation : Pt it = piS i t − qiOit − oI [ Oit > 0 ] − hİit ( 8 ) where pi and qi are the unit sale price , unit procurement price for the i-th SKU , respectively , and o and h are the order cost and unit holding cost , respectively . I [ · ] is an indicator function which equals to one when the condition is true and zero otherwise . The order cost reflects the fixed transportation cost or the order processing cost , and yields whenever the order quantity is non-zero . For convenience , we summarize all notations in Table 2 in Appendix B , where we also give an example with 2 SKUs in Fig . 4 to further illustrate the whole procedure . | A multi-agent RL algorithm is proposed to deal with the inventory management problem where there are several SKUs. Since items should compete for a limited budget and warehouse space, the replenishment problem is modeled as a multi-agent game and a multi-agent reinforcement learning algorithm is proposed to solve that. The agents use a shared piece of information which is the utilized warehouse space and other shared resources (if any) and rather than that there is no other shared information among them. So, each agent uses that shared information along with its local observation, and local reward and train decentralized agents in an independent learner scheme. The PPO algorithm is used to train the independent policies. The agents share the parameters of the actor and critic to mitigate the computation time and power. The action is selecting one of 15 possible values to multiply to the sum of sales over the last two weeks. The algorithm is evaluated on instances with 5 and 50 SKUs and compared with some benchmarks. | SP:95b782cd35e6929cbfaca5f47ce447b4e1a17ea3 |
Multi-Agent Reinforcement Learning with Shared Resource in Inventory Management | 1 INTRODUCTION . Inventory management ( IM ) problem has long been one of the most important applications in the supply-chain industry ( Nahmias & Smith , 1993 ) . Its main purpose is to maintain a balance between the supply and demand of stock keeping units ( SKUs ) in a supply chain by optimizing replenishment decisions of each SKU . Besides leading to profit increment and operational cost reduction , efficient IM can even give rise to better services to customers . However , it is quite a challenging task in practice , especially when there are lots of SKUs involved in the supply-chain . Particularly , while all SKUs should cooperate with each other to achieve high profits , they also need to compete for shared resources e.g. , warehouse spaces , budget etc . Such co-existence of cooperation and competition renders IM a complicated game that is hard to address . Traditional methods usually reduce IM problems to solving dynamic programming problems . However , these approaches often rely on some unrealistic assumptions such as i.i.d . demand , deterministic leading time , etc . Moreover , as the state space grows exponentially along with some key factors like leading time and number of SKUs ( Gijsbrechts et al. , 2019 ) , the corresponding dynamic programming problems become intractable due to the curse of dimensionality . Because of these limitations , many approaches based on approximate dynamic programming are proposed to solve IM problems in different settings ( Halman et al. , 2009 ; Fang et al. , 2013 ; Chen & Yang , 2019 ) . While these approaches perform well in certain scenarios , they heavily rely on problem-specific expertise or assumptions e.g. , the zero or one period leading time assumption in ( Halman et al. , 2009 ) , hence can hardly generalize to other settings . In contrast , reinforcement learning ( RL ) based methods , with fast inference speed , can generalize to various scenarios in a data-driven manner . However , it is usually too costly to train a global policy that can make decisions for all SKUs , since the training efficiency can be notably curtailed because of the large global state and action space ( Jiang & Agarwal , 2018 ) ) . To further address the training efficiency issue , it is natural to adopt the multi-agent reinforcement learning ( MARL ) paradigm , where each SKU is regarded as an agent whose state and action spaces are localized and only contain information relevant to itself . There are currently two popular paradigms to train MARL in the literature : independent learning ( Tan , 1993 ) and joint action learning ( Lowe et al. , 2017 ) . Despite of their success in many scenarios , these two MARL paradigms also exhibit certain weaknesses that restrain their effectiveness in solving IM problems . On one hand , if applying independent learning , policy training of one agent simply treats all other agents as parts of the stochastic environment , hence is hard to converge due to non-stationary of the environment . On the other hand , joint action learning usually learns a centralized critic conditioned on the joint action and state spaces of all agents , which can easily become intractable with increasing number of SKUs . Furthermore , it could be quite time-consuming to sample data from joint simulator for a great number of SKUs , since it usually involves much computation on many internal variables caused by complex agent interactions . To address these challenges , we took a closer look at the IM problem and find that there exists a special structure that can be leveraged to design more effective MARL paradigm . Particularly , each agent in IM only interacts with others through the shared resource , e.g. , warehouse spaces . We introduce an auxiliary variable to represent the whole inventory level , implying the available shared resource , for all SKUs , and refer to this variable as context . From the MARL perspective , one agent can be influenced by other agents only through such context . The context dynamics actually reflect the collective behaviors of all agents . And , conditioned on context dynamics , one agent ’ s state transition and reward function are independent of other agents . In this way , leveraging context as an additional input for each agent ’ s policy/value functions enables us to both avoid the non-stationary problem caused by independent learning and mitigate the intractable centralized critics learning caused by exploding state and action spaces . Moreover , introducing context dynamics inspires us to build a local simulator for each agent in order to facilitate more efficient policy learning for each agent . Based on this structure with context dynamics , we propose a shared-resource stochastic game to model the IM problem . Specifically , we introduce a surrogate objective function to optimize the return of agent i conditioned on all other agents , denoted by −i . Here , we make two approximations to get the surrogate objective function : 1 ) rearranging the sampling process by first sampling context dynamics then sampling local state/action/reward for each agent i ; 2 ) using context dynamics sampled by previous policies . Based on above surrogate objective , our algorithm consists of two iterative learning procedures : 1 ) obtaining context dynamics from joint simulator , 2 ) updating policy for each agent by data sampled from its respective local simulator conditioned on collective context dynamics . By decoupling each agent from all others with a separate training procedure , our method can greatly reduce model complexity and accelerate learning procedure , as shown by extensive experiments . It is worthwhile to mention that our method is not limited to IM , but can also be applied to many other applications with shared-resource structure , e.g. , portfolio management ( Ye et al. , 2020 ) , smart grid scheduling ( Remani et al. , 2019 ) , etc . Our contributions are summarized as follows : • We propose shared-resource stochastic game to capture the problem structure in IM , that agents only interact with each other through shared resource . • We propose a novel algorithm that leverages the shared-resource structure to solve IM problem efficiently . • Extensive experiments demonstrate that our method outperforms existing MARL algorithms on both profits and computing efficiency . 2 BACKGROUND . 2.1 STOCHASTIC GAMES . We build our work on stochastic games ( SGs ) ( Shapley , 1953 ) , since each SKU in IM problem has its own profit ( reward ) to optimize . A Stochastic Game is defined by a tuple ( N , S , { Ai } i∈N , T , { Ri } i∈N , γ ) , where N = { 1 , · · · , n } denotes the set of n > 1 agents , S denotes the state space observed by all agents , Ai denotes the action space of agent i . Let A : = A1 × · · · × An , then T : S × A → ∆ ( S ) denotes the transition probability from any state s ∈ S to any state s′ ∈ S after taking a joint action a ∈ A ; Ri : S × A × S → R is the reward function that determines the immediate reward received by agent i for a transition from ( s , a ) to s′ ; γ ∈ [ 0 , 1 ) is the discount factor . We can formulate the joint policy of other agents ’ as π−i = ∏ j∈−i π j . Each agent i optimizes its policy πi : S → ∆ ( Ai ) to maximize its own long-term reward , which is conditioned on other agents ’ behavior , defined as maxπiη i ( πi , π−i ) = E ( st , ait , a−it ) ∼T , πi , π−i [ ∞∑ t=0 γtrit ] . ( 1 ) We will illustrate the shared resource structure of IM problem in Section 2.2 , which motivates us to propose shared-resource stochastic game as a special case of stochastic game to capture such structure in Section 3.1 . 2.2 INVENTORY MANAGEMENT WITH SHARED RESOURCE . While a typical setting for IM shall involve a supply network of multi-echelon including stores , warehouses and factories , we simplify the setting to ease our presentation . In the following , we shall focus on scenarios with one store and multiple SKUs . We further assume that there is an upstream warehouse that can fulfill requirements from the store perfectly . Our objective is to learn high-quality replenishing policies for each SKU in the store , particularly when there are a large number of SKUs . As replenishing decisions for SKUs in stores should directly consider consumption behaviors of customers and competitions from other SKUs due to limited resources like spaces , budget etc. , they are more challenging to optimize comparing to SKUs in warehouses . It is worthwhile to mention that , due to the flexibility of RL algorithms , our method can also be applied to more complex settings with multi-echelon , fluctuate supply , non-deterministic leading time etc . Similar to previous work , we follow the multi-agent RL ( MARL ) framework with decentralized agents , each of which manages inventory of one SKU in the store . We assume that the store has n SKUs in sell , all of which share a common space that can store up to Imax units at the same time . Replenishing decisions of each SKU are made on discretized time steps , which are days in our paper . For each time step t and SKU i , let İit ∈ Z denote units of i that are in stock . Hence , the following constraint shall hold for all time steps : ∀t ≥ 0. n∑ i=1 İit ≤ Imax ( 2 ) At any time step t , the agent corresponding to SKU i may place a replenishment order to request Oit ∈ Z units of products from its upstream warehouse . These replenishment orders can not be fulfillment instantly , but will take several time steps , referred as leading time , before these products are delivered to the store . Let Li denote the leading time of SKU i and T it ∈ Z its total units in transit at the time step t. Meanwhile , demands from customers Dit may consume inventory of SKU i and cause an actual sale of units Sit ∈ Z . Due to the possibility of out-of-stock , Sit may be less than Dit . Formally , dynamics of these variables can be described as follows : Sit = min ( Dit , İ i t ) ( 3 ) T it+1 = T i t −Oit−Li+1 +O i t+1 ( 4 ) Îit = İ i t − Sit +Oit−Li+1 ( 5 ) ρ = { 0 if ∑n i=1 Î i t ≤ Imax∑n i=1 Î i t−Imax∑n i=1 O i t−Li+1 otherwise ( 6 ) İit+1 = İ i t − Sit + ⌊ ( 1− ρ ) Oit−Li+1⌋ ( 7 ) As we mentioned before , due to all SKUs share a common space , it may happen that the storage overflows when ordered products arrive . In this paper , we assume that the excess SKUs will be discarded proportionally according to ρ defined in Eq . 6 , which corresponds to the overflowing ratio if we accept all coming SKUs without considering the space constraint . To calculate ρ , we also introduce an extra variable Îit , which we call afterstate of İ i t . Intuitively , it denotes units of SKU i in stock at the end of the t-th time step if we omit the capacity constraint . We shall note that other manners e.g. , prioritizing all SKUs , to resolve space overflows are possible . The algorithm that we will introduce in the following section will also apply to these settings . Undoubtedly , such behaviors will cause extra operational cost which should be avoided as much as possible in our replenishing decisions . The intermediate profit Pt it of the i-th SKU is calculated according to the following equation : Pt it = piS i t − qiOit − oI [ Oit > 0 ] − hİit ( 8 ) where pi and qi are the unit sale price , unit procurement price for the i-th SKU , respectively , and o and h are the order cost and unit holding cost , respectively . I [ · ] is an indicator function which equals to one when the condition is true and zero otherwise . The order cost reflects the fixed transportation cost or the order processing cost , and yields whenever the order quantity is non-zero . For convenience , we summarize all notations in Table 2 in Appendix B , where we also give an example with 2 SKUs in Fig . 4 to further illustrate the whole procedure . | This paper considers the multi-period inventory replenishment problem for a single store with multiple SKUs. The problem is formulated as a resource constrained stochastic game, where the store capacity is the resource constraint shared by all SKUs. The paper takes a multi-agent RL approach to solve this problem, with each SKU being modeled as an agent and having its own replenishment policy. To tackle the challenge presented by the potentially large number of SKUs (agents), a context-aware decentralized PPO method is proposed, where each agent is trained independently in its local simulator given a sample path of the shared resource state (context). Benchmarking were performed on two domains with 5 SKUs and 50 SKUs each against several model-free MARL baselines. Results show that the proposed method can achieve comparable results but with much higher sample efficiency. | SP:95b782cd35e6929cbfaca5f47ce447b4e1a17ea3 |
G-Mixup: Graph Augmentation for Graph Classification | 1 INTRODUCTION . Recently deep learning has been widely adopted to graph analysis . Graph Neural Networks ( GNNs ) ( Wu et al. , 2020 ; Zhou et al. , 2020b ; Zhang et al. , 2020 ; Xu et al. , 2018 ) have made many significant breakthroughs on graph classification . Meanwhile , data augmentation ( e.g. , DropEdge ( Rong et al. , 2020 ) , Subgraph ( You et al. , 2020 ) ) has also been adopted to graph analysis by generating synthetic graphs to create more training data for improving the generalization of graph classification models . However , existing graph data augmentation strategies typically aim to augment graphs at a within-graph level by either modifying edges or nodes in individual graph , which limits them to only generating new graphs based on one individual graph . The between-graph augmentation methods ( i.e. , augmenting graphs between graphs ) are still under-explored . In parallel with the development of graph neural networks , Mixup ( Zhang et al. , 2017 ) and its variants ( e.g. , Manifold Mixup ( Verma et al. , 2019 ) ) , as data augmentation methods , have been theoretically and empirically shown to improve the generalization and robustness of deep neural networks in image recognition ( Zhang et al. , 2017 ; Verma et al. , 2019 ; Zhang et al. , 2021 ) and natural language processing ( Guo et al. , 2019 ; Guo , 2020 ) . The basic idea of Mixup is to linearly interpolate continuous values of random sample pairs to generate more synthetic training data . The formal mathematical expression of Mixup is xnew = λxi + ( 1 − λ ) xj , ynew = λyi + ( 1 − λ ) yj , where ( xi , yi ) and ( xj , yj ) are two samples drawn at random from training data and the target y are onehot labels . With graph neural network and mixup in mind , the following question naturally arises , Can we mix up graph data to improve the generalization and robustness of GNNs ? It remains an open and challenging problem to mix up the graph data due to the characteristics of graphs and the requirements of applying Mixup . Typically , Mixup requires that original data instances are regular and well-aligned in Euclidean space , such as image data and table data . However , graph data is distinctly different from image data due to the following characteristics : ( i ) graph data is irregular . The number of nodes in different graphs are typically different to others ; ( ii ) graph data is not well-aligned . The nodes in different graphs can not be aligned well directly ; ( iii ) graph topology between classes are divergent . The topologies of a pair of graphs from different classes are usually different while the topologies of those from the same class are usually similar . thus make it challenging to directly adopt the Mixup strategy to graph data . WI WH WG I = { I1 , I2 , · · · , Ik } with label ( 0.5 , 0.5 ) H = { H1 , H2 , · · · , Hk } with label ( 0 , 1 ) G = { G1 , G2 , · · · , Gk } with label ( 1 , 0 ) … … … 1 ) graphon estimation 3 ) graph sampling WI = 0.5 ⇤ WG + 0.5 ⇤ WH 1 ) graphon estimation 2 ) graphon mixup Figure 1 : An overview of G-Mixup . The task is binary graph classification . We have two classes of graphs G andH with different topologies ( G has two communities whileH has eight communities ) . G and H have different graphons . We mix up the graphons WG and WH to obtain a mixed graphon WI , and then sample new graphs from the mixed graphon . Intuitively , the synthetic graphs have two major communities and each of which has four sub-communities , demonstrating that the generated graphs preserve the structure of original graphs from both classes . To tackle the aforementioned problems , we propose G-Mixup , a class-level graph data augmentation method , to mix up graph data based on graphons . The graphs within one class have the same generator ( i.e. , graphon ) . We mix up the graphons of different classes and then generate synthetic graphs . Informally , a graphon can be thought of as a probability matrix ( e.g. , the matrix WG and WH in Figure 1 ) , where W ( i , j ) represents the probability of edge between node i and j . The realworld graphs can be regraded as generated from graphons . In this way , we can mix two classes of graphs by mixing their generators . Since the graphons of different graphs is regular , well-aligned , and is defined in Euclidean space , it is easy and natural to mix up the graphons and then generate the synthetic graphs therefrom . We also provide theoretical analysis of graphons mixup , which guarantees that the generated graphs will preserve the key characteristics of both original classes . Our proposed method is illustrated in Figure 1 with an example . Given two graph training sets G = { G1 , G2 , · · · , Gk } and H = { H1 , H2 , · · · , Hk } with different labels and distinct topologies ( i.e. , G has two communities while H has eight communities ) , we estimate graphons WG and WH respectively from G and H. We then mix up the two graphons and obtain a mixed graphon WI . After that , we sample synthetic graphs from WI as additional training graphs . The generated synthetic graphs have two major communities and each of them have four sub-communities , which is a mixture of the two graph sets . It thus shows that G-Mixup is capable of mixing up graphs . In summary , our main contributions are three-fold . Firstly , we propose G-Mixup to augment the training graphs for graph classification . Since directly mixing up graphs is intractable , G-Mixup mixes the graphons of different classes of graphs to generate synthetic graphs . Secondly , we theoretically prove that the synthetic graph will be the mixture of the original graphs , where the key topology ( i.e. , discriminative motif ) of source graphs will be preserved . Thirdly , we demonstrate the efficacy of the proposed G-Mixup on various graph neural network backbones and datasets . Extensive experimental results show the proposed G-Mixup substantially improves the performance of graph neural networks in terms of enhancing their generalization and robustness . 2 PRELIMINARIES . In this section , we first go over the notations used in this paper , and then introduce graph related concepts including graph homomorphism and graphons , which will be used for theoretical analysis in this work . Finally , we briefly review the graph neural networks for graph classification . 2.1 NOTATIONS . Given a graph G , we use V ( G ) and E ( G ) to denote its nodes and edges , respectively . The number of nodes is v ( G ) = |V ( G ) | , and the number of edges is e ( G ) = |E ( G ) | . We use G , H , I to denote graphs and G , H , I to denote graph set . yG ∈ RC denotes the label of graph set G , where C is number of classes of graphs . A graph could contain some interesting and frequent patterns and subgraphs which are called motifs . The motifs in graph G is denoted as FG . The set of motifs in graph set G is denoted as FG . WG denotes the graphon of graph set G. W denotes the step function . Unif [ 0,1 ] denotes the uniform distribution between 0 and 1 . Bern ( · ) denotes the Bernoulli distribution . G ( n , W ) denotes the random graph with n nodes based on graphon W . 2.2 GRAPH HOMOMORPHISM AND GRAPHONS . Graph Homomorphism . A graph homomorphism is an adjacency-preserving mapping between two graphs , i.e. , mapping adjacent vertices in one graph to adjacent vertices in the other . Formally , a graph homomorphism φ : F → G is a map from V ( F ) to V ( G ) , where if { u , v } ∈ E ( F ) , then { φ ( u ) , φ ( v ) } ∈ E ( G ) . For two graphs H and G , there could be multiple graph homomorphisms between them . Let hom ( H , G ) denotes the total number of graph homomorphisms from graph H to graph G. For example , hom ( , G ) = |V ( G ) | if graph H is , hom ( , G ) = 2|E ( G ) | if graph H is , and hom ( , G ) is six times the number of triangles in G. There are in total |V ( G ) ||V ( H ) | mappings from H to G , but only some of them are homomorphisms . Thus , we define homomorphism density to measure the relative frequency that the graph H appears in graph G : t ( H , G ) = hom ( H , G ) |V ( G ) ||V ( H ) | . For example , t ( , G ) = |V ( G ) |/n1 = 1 , t ( , G ) = 2|E ( G ) |/n2 . Graphon . A graphon ( Airoldi et al. , 2013 ) is a continuous , bounded and symmetric function W : [ 0 , 1 ] 2 → [ 0 , 1 ] which may be thought of as the weight matrix of a graph with infinite number of nodes . Then , given two points ui , uj ∈ [ 0 , 1 ] , W ( i , j ) represents the probability that nodes i and j be related with an edge . Various quantities of a graph can be calculated as a function of the graphon . For example , the degree of nodes in graphs can be easily extended to a degree distribution function in graphons , which is characterized by its graphon marginal dW ( x ) = ∫ 1 0 W ( x , y ) dy . Similarly , the concept of homomorphism density can be naturally extended from graphs to graphons . Given an arbitrary graph motif F , its homomorphism density with respect to graphon W is defined by t ( F , W ) = ∫ [ 0,1 ] V ( F ) ∏ i , j∈E ( F ) W ( xi , xj ) ∏ i∈V ( F ) dxi . For example , the edge density of graphon W is t ( , W ) = ∫ [ 0,1 ] 2 W ( x , y ) dxdy , and the triangle density of graphon W is t ( , W ) = ∫ [ 0,1 ] 3 W ( x , y ) W ( x , z ) W ( y , z ) dxdydz . 2.3 GRAPH CLASSIFICATION WITH GRAPH NEURAL NETWORKS . Given a set of graphs , graph classification aims to assign a class label for each graph G. Recently , graph neural networks have become the state-of-the-art approach for graph classification . Without loss of generalization , we present the formal expression of a graph convolution network ( GCN ) ( Kipf & Welling , 2016 ) . The forward propagation at k-th layer is described as the following : a ( k ) i = AGG ( k ) ( { h ( k−1 ) j : j ∈ N ( i ) } ) , h ( k ) i = COMBINE ( k ) ( h ( k−1 ) i , a ( k ) i ) , ( 1 ) where h ( k ) i ∈ Rn×dk is the intermediate representation of node i at the k-th layer , N ( i ) denotes the neighbors of node i. AGG ( · ) is an aggregation function to collect embedding representations from neighbors , and COMBINE ( · ) combines neighbor representation and its representation at ( k−1 ) -th layer followed by nonlinear transformation . For graph classification , a graph-level representation is obtained by summarizing all node-level representations in the graph by a readout function : hG = READOUT ( { h ( k ) i : i ∈ E ( G ) } ) , ŷ = softmax ( hG ) , ( 2 ) where READOUT ( · ) is the readout function , which can be a simple function such as average or sophisticated pooling function ( Gao & Ji , 2019 ; Ying et al. , 2018 ) , hG is the representation of graph G , and ŷ ∈ RC is the output estimating the probability that G belongs to each of the C classes . | This work studied the research problem of graph data augmentation for supervised graph classification. The authors proposed G-mixup that performs mixup on graph data via graphon generators. Due to the irregular characteristics of graphs, instead of directly mixing up the data objects, G-mixup mix up the graph generators. | SP:2ee651181aaf7e551a6c7e93ce1c08789100f4e1 |
G-Mixup: Graph Augmentation for Graph Classification | 1 INTRODUCTION . Recently deep learning has been widely adopted to graph analysis . Graph Neural Networks ( GNNs ) ( Wu et al. , 2020 ; Zhou et al. , 2020b ; Zhang et al. , 2020 ; Xu et al. , 2018 ) have made many significant breakthroughs on graph classification . Meanwhile , data augmentation ( e.g. , DropEdge ( Rong et al. , 2020 ) , Subgraph ( You et al. , 2020 ) ) has also been adopted to graph analysis by generating synthetic graphs to create more training data for improving the generalization of graph classification models . However , existing graph data augmentation strategies typically aim to augment graphs at a within-graph level by either modifying edges or nodes in individual graph , which limits them to only generating new graphs based on one individual graph . The between-graph augmentation methods ( i.e. , augmenting graphs between graphs ) are still under-explored . In parallel with the development of graph neural networks , Mixup ( Zhang et al. , 2017 ) and its variants ( e.g. , Manifold Mixup ( Verma et al. , 2019 ) ) , as data augmentation methods , have been theoretically and empirically shown to improve the generalization and robustness of deep neural networks in image recognition ( Zhang et al. , 2017 ; Verma et al. , 2019 ; Zhang et al. , 2021 ) and natural language processing ( Guo et al. , 2019 ; Guo , 2020 ) . The basic idea of Mixup is to linearly interpolate continuous values of random sample pairs to generate more synthetic training data . The formal mathematical expression of Mixup is xnew = λxi + ( 1 − λ ) xj , ynew = λyi + ( 1 − λ ) yj , where ( xi , yi ) and ( xj , yj ) are two samples drawn at random from training data and the target y are onehot labels . With graph neural network and mixup in mind , the following question naturally arises , Can we mix up graph data to improve the generalization and robustness of GNNs ? It remains an open and challenging problem to mix up the graph data due to the characteristics of graphs and the requirements of applying Mixup . Typically , Mixup requires that original data instances are regular and well-aligned in Euclidean space , such as image data and table data . However , graph data is distinctly different from image data due to the following characteristics : ( i ) graph data is irregular . The number of nodes in different graphs are typically different to others ; ( ii ) graph data is not well-aligned . The nodes in different graphs can not be aligned well directly ; ( iii ) graph topology between classes are divergent . The topologies of a pair of graphs from different classes are usually different while the topologies of those from the same class are usually similar . thus make it challenging to directly adopt the Mixup strategy to graph data . WI WH WG I = { I1 , I2 , · · · , Ik } with label ( 0.5 , 0.5 ) H = { H1 , H2 , · · · , Hk } with label ( 0 , 1 ) G = { G1 , G2 , · · · , Gk } with label ( 1 , 0 ) … … … 1 ) graphon estimation 3 ) graph sampling WI = 0.5 ⇤ WG + 0.5 ⇤ WH 1 ) graphon estimation 2 ) graphon mixup Figure 1 : An overview of G-Mixup . The task is binary graph classification . We have two classes of graphs G andH with different topologies ( G has two communities whileH has eight communities ) . G and H have different graphons . We mix up the graphons WG and WH to obtain a mixed graphon WI , and then sample new graphs from the mixed graphon . Intuitively , the synthetic graphs have two major communities and each of which has four sub-communities , demonstrating that the generated graphs preserve the structure of original graphs from both classes . To tackle the aforementioned problems , we propose G-Mixup , a class-level graph data augmentation method , to mix up graph data based on graphons . The graphs within one class have the same generator ( i.e. , graphon ) . We mix up the graphons of different classes and then generate synthetic graphs . Informally , a graphon can be thought of as a probability matrix ( e.g. , the matrix WG and WH in Figure 1 ) , where W ( i , j ) represents the probability of edge between node i and j . The realworld graphs can be regraded as generated from graphons . In this way , we can mix two classes of graphs by mixing their generators . Since the graphons of different graphs is regular , well-aligned , and is defined in Euclidean space , it is easy and natural to mix up the graphons and then generate the synthetic graphs therefrom . We also provide theoretical analysis of graphons mixup , which guarantees that the generated graphs will preserve the key characteristics of both original classes . Our proposed method is illustrated in Figure 1 with an example . Given two graph training sets G = { G1 , G2 , · · · , Gk } and H = { H1 , H2 , · · · , Hk } with different labels and distinct topologies ( i.e. , G has two communities while H has eight communities ) , we estimate graphons WG and WH respectively from G and H. We then mix up the two graphons and obtain a mixed graphon WI . After that , we sample synthetic graphs from WI as additional training graphs . The generated synthetic graphs have two major communities and each of them have four sub-communities , which is a mixture of the two graph sets . It thus shows that G-Mixup is capable of mixing up graphs . In summary , our main contributions are three-fold . Firstly , we propose G-Mixup to augment the training graphs for graph classification . Since directly mixing up graphs is intractable , G-Mixup mixes the graphons of different classes of graphs to generate synthetic graphs . Secondly , we theoretically prove that the synthetic graph will be the mixture of the original graphs , where the key topology ( i.e. , discriminative motif ) of source graphs will be preserved . Thirdly , we demonstrate the efficacy of the proposed G-Mixup on various graph neural network backbones and datasets . Extensive experimental results show the proposed G-Mixup substantially improves the performance of graph neural networks in terms of enhancing their generalization and robustness . 2 PRELIMINARIES . In this section , we first go over the notations used in this paper , and then introduce graph related concepts including graph homomorphism and graphons , which will be used for theoretical analysis in this work . Finally , we briefly review the graph neural networks for graph classification . 2.1 NOTATIONS . Given a graph G , we use V ( G ) and E ( G ) to denote its nodes and edges , respectively . The number of nodes is v ( G ) = |V ( G ) | , and the number of edges is e ( G ) = |E ( G ) | . We use G , H , I to denote graphs and G , H , I to denote graph set . yG ∈ RC denotes the label of graph set G , where C is number of classes of graphs . A graph could contain some interesting and frequent patterns and subgraphs which are called motifs . The motifs in graph G is denoted as FG . The set of motifs in graph set G is denoted as FG . WG denotes the graphon of graph set G. W denotes the step function . Unif [ 0,1 ] denotes the uniform distribution between 0 and 1 . Bern ( · ) denotes the Bernoulli distribution . G ( n , W ) denotes the random graph with n nodes based on graphon W . 2.2 GRAPH HOMOMORPHISM AND GRAPHONS . Graph Homomorphism . A graph homomorphism is an adjacency-preserving mapping between two graphs , i.e. , mapping adjacent vertices in one graph to adjacent vertices in the other . Formally , a graph homomorphism φ : F → G is a map from V ( F ) to V ( G ) , where if { u , v } ∈ E ( F ) , then { φ ( u ) , φ ( v ) } ∈ E ( G ) . For two graphs H and G , there could be multiple graph homomorphisms between them . Let hom ( H , G ) denotes the total number of graph homomorphisms from graph H to graph G. For example , hom ( , G ) = |V ( G ) | if graph H is , hom ( , G ) = 2|E ( G ) | if graph H is , and hom ( , G ) is six times the number of triangles in G. There are in total |V ( G ) ||V ( H ) | mappings from H to G , but only some of them are homomorphisms . Thus , we define homomorphism density to measure the relative frequency that the graph H appears in graph G : t ( H , G ) = hom ( H , G ) |V ( G ) ||V ( H ) | . For example , t ( , G ) = |V ( G ) |/n1 = 1 , t ( , G ) = 2|E ( G ) |/n2 . Graphon . A graphon ( Airoldi et al. , 2013 ) is a continuous , bounded and symmetric function W : [ 0 , 1 ] 2 → [ 0 , 1 ] which may be thought of as the weight matrix of a graph with infinite number of nodes . Then , given two points ui , uj ∈ [ 0 , 1 ] , W ( i , j ) represents the probability that nodes i and j be related with an edge . Various quantities of a graph can be calculated as a function of the graphon . For example , the degree of nodes in graphs can be easily extended to a degree distribution function in graphons , which is characterized by its graphon marginal dW ( x ) = ∫ 1 0 W ( x , y ) dy . Similarly , the concept of homomorphism density can be naturally extended from graphs to graphons . Given an arbitrary graph motif F , its homomorphism density with respect to graphon W is defined by t ( F , W ) = ∫ [ 0,1 ] V ( F ) ∏ i , j∈E ( F ) W ( xi , xj ) ∏ i∈V ( F ) dxi . For example , the edge density of graphon W is t ( , W ) = ∫ [ 0,1 ] 2 W ( x , y ) dxdy , and the triangle density of graphon W is t ( , W ) = ∫ [ 0,1 ] 3 W ( x , y ) W ( x , z ) W ( y , z ) dxdydz . 2.3 GRAPH CLASSIFICATION WITH GRAPH NEURAL NETWORKS . Given a set of graphs , graph classification aims to assign a class label for each graph G. Recently , graph neural networks have become the state-of-the-art approach for graph classification . Without loss of generalization , we present the formal expression of a graph convolution network ( GCN ) ( Kipf & Welling , 2016 ) . The forward propagation at k-th layer is described as the following : a ( k ) i = AGG ( k ) ( { h ( k−1 ) j : j ∈ N ( i ) } ) , h ( k ) i = COMBINE ( k ) ( h ( k−1 ) i , a ( k ) i ) , ( 1 ) where h ( k ) i ∈ Rn×dk is the intermediate representation of node i at the k-th layer , N ( i ) denotes the neighbors of node i. AGG ( · ) is an aggregation function to collect embedding representations from neighbors , and COMBINE ( · ) combines neighbor representation and its representation at ( k−1 ) -th layer followed by nonlinear transformation . For graph classification , a graph-level representation is obtained by summarizing all node-level representations in the graph by a readout function : hG = READOUT ( { h ( k ) i : i ∈ E ( G ) } ) , ŷ = softmax ( hG ) , ( 2 ) where READOUT ( · ) is the readout function , which can be a simple function such as average or sophisticated pooling function ( Gao & Ji , 2019 ; Ying et al. , 2018 ) , hG is the representation of graph G , and ŷ ∈ RC is the output estimating the probability that G belongs to each of the C classes . | This paper proposes the mixup method for graphs which is based on the concept of the graphon. Specifically, G-mixup first estimates the graphon for each class of graphs with the same label then interpolates the graphons of different classes of graphs. Finally, they generate the new graphs from the interpolated graphons to produce the mixed graph with a mixed label. The authors theoretically show that G-mixup can preserve the different motifs of the two different graphs into one mixed graphon. In experiments, they empirically show that the G-mixup improve the generalization and the performance of existing GNNs on several graph classification task. | SP:2ee651181aaf7e551a6c7e93ce1c08789100f4e1 |
G-Mixup: Graph Augmentation for Graph Classification | 1 INTRODUCTION . Recently deep learning has been widely adopted to graph analysis . Graph Neural Networks ( GNNs ) ( Wu et al. , 2020 ; Zhou et al. , 2020b ; Zhang et al. , 2020 ; Xu et al. , 2018 ) have made many significant breakthroughs on graph classification . Meanwhile , data augmentation ( e.g. , DropEdge ( Rong et al. , 2020 ) , Subgraph ( You et al. , 2020 ) ) has also been adopted to graph analysis by generating synthetic graphs to create more training data for improving the generalization of graph classification models . However , existing graph data augmentation strategies typically aim to augment graphs at a within-graph level by either modifying edges or nodes in individual graph , which limits them to only generating new graphs based on one individual graph . The between-graph augmentation methods ( i.e. , augmenting graphs between graphs ) are still under-explored . In parallel with the development of graph neural networks , Mixup ( Zhang et al. , 2017 ) and its variants ( e.g. , Manifold Mixup ( Verma et al. , 2019 ) ) , as data augmentation methods , have been theoretically and empirically shown to improve the generalization and robustness of deep neural networks in image recognition ( Zhang et al. , 2017 ; Verma et al. , 2019 ; Zhang et al. , 2021 ) and natural language processing ( Guo et al. , 2019 ; Guo , 2020 ) . The basic idea of Mixup is to linearly interpolate continuous values of random sample pairs to generate more synthetic training data . The formal mathematical expression of Mixup is xnew = λxi + ( 1 − λ ) xj , ynew = λyi + ( 1 − λ ) yj , where ( xi , yi ) and ( xj , yj ) are two samples drawn at random from training data and the target y are onehot labels . With graph neural network and mixup in mind , the following question naturally arises , Can we mix up graph data to improve the generalization and robustness of GNNs ? It remains an open and challenging problem to mix up the graph data due to the characteristics of graphs and the requirements of applying Mixup . Typically , Mixup requires that original data instances are regular and well-aligned in Euclidean space , such as image data and table data . However , graph data is distinctly different from image data due to the following characteristics : ( i ) graph data is irregular . The number of nodes in different graphs are typically different to others ; ( ii ) graph data is not well-aligned . The nodes in different graphs can not be aligned well directly ; ( iii ) graph topology between classes are divergent . The topologies of a pair of graphs from different classes are usually different while the topologies of those from the same class are usually similar . thus make it challenging to directly adopt the Mixup strategy to graph data . WI WH WG I = { I1 , I2 , · · · , Ik } with label ( 0.5 , 0.5 ) H = { H1 , H2 , · · · , Hk } with label ( 0 , 1 ) G = { G1 , G2 , · · · , Gk } with label ( 1 , 0 ) … … … 1 ) graphon estimation 3 ) graph sampling WI = 0.5 ⇤ WG + 0.5 ⇤ WH 1 ) graphon estimation 2 ) graphon mixup Figure 1 : An overview of G-Mixup . The task is binary graph classification . We have two classes of graphs G andH with different topologies ( G has two communities whileH has eight communities ) . G and H have different graphons . We mix up the graphons WG and WH to obtain a mixed graphon WI , and then sample new graphs from the mixed graphon . Intuitively , the synthetic graphs have two major communities and each of which has four sub-communities , demonstrating that the generated graphs preserve the structure of original graphs from both classes . To tackle the aforementioned problems , we propose G-Mixup , a class-level graph data augmentation method , to mix up graph data based on graphons . The graphs within one class have the same generator ( i.e. , graphon ) . We mix up the graphons of different classes and then generate synthetic graphs . Informally , a graphon can be thought of as a probability matrix ( e.g. , the matrix WG and WH in Figure 1 ) , where W ( i , j ) represents the probability of edge between node i and j . The realworld graphs can be regraded as generated from graphons . In this way , we can mix two classes of graphs by mixing their generators . Since the graphons of different graphs is regular , well-aligned , and is defined in Euclidean space , it is easy and natural to mix up the graphons and then generate the synthetic graphs therefrom . We also provide theoretical analysis of graphons mixup , which guarantees that the generated graphs will preserve the key characteristics of both original classes . Our proposed method is illustrated in Figure 1 with an example . Given two graph training sets G = { G1 , G2 , · · · , Gk } and H = { H1 , H2 , · · · , Hk } with different labels and distinct topologies ( i.e. , G has two communities while H has eight communities ) , we estimate graphons WG and WH respectively from G and H. We then mix up the two graphons and obtain a mixed graphon WI . After that , we sample synthetic graphs from WI as additional training graphs . The generated synthetic graphs have two major communities and each of them have four sub-communities , which is a mixture of the two graph sets . It thus shows that G-Mixup is capable of mixing up graphs . In summary , our main contributions are three-fold . Firstly , we propose G-Mixup to augment the training graphs for graph classification . Since directly mixing up graphs is intractable , G-Mixup mixes the graphons of different classes of graphs to generate synthetic graphs . Secondly , we theoretically prove that the synthetic graph will be the mixture of the original graphs , where the key topology ( i.e. , discriminative motif ) of source graphs will be preserved . Thirdly , we demonstrate the efficacy of the proposed G-Mixup on various graph neural network backbones and datasets . Extensive experimental results show the proposed G-Mixup substantially improves the performance of graph neural networks in terms of enhancing their generalization and robustness . 2 PRELIMINARIES . In this section , we first go over the notations used in this paper , and then introduce graph related concepts including graph homomorphism and graphons , which will be used for theoretical analysis in this work . Finally , we briefly review the graph neural networks for graph classification . 2.1 NOTATIONS . Given a graph G , we use V ( G ) and E ( G ) to denote its nodes and edges , respectively . The number of nodes is v ( G ) = |V ( G ) | , and the number of edges is e ( G ) = |E ( G ) | . We use G , H , I to denote graphs and G , H , I to denote graph set . yG ∈ RC denotes the label of graph set G , where C is number of classes of graphs . A graph could contain some interesting and frequent patterns and subgraphs which are called motifs . The motifs in graph G is denoted as FG . The set of motifs in graph set G is denoted as FG . WG denotes the graphon of graph set G. W denotes the step function . Unif [ 0,1 ] denotes the uniform distribution between 0 and 1 . Bern ( · ) denotes the Bernoulli distribution . G ( n , W ) denotes the random graph with n nodes based on graphon W . 2.2 GRAPH HOMOMORPHISM AND GRAPHONS . Graph Homomorphism . A graph homomorphism is an adjacency-preserving mapping between two graphs , i.e. , mapping adjacent vertices in one graph to adjacent vertices in the other . Formally , a graph homomorphism φ : F → G is a map from V ( F ) to V ( G ) , where if { u , v } ∈ E ( F ) , then { φ ( u ) , φ ( v ) } ∈ E ( G ) . For two graphs H and G , there could be multiple graph homomorphisms between them . Let hom ( H , G ) denotes the total number of graph homomorphisms from graph H to graph G. For example , hom ( , G ) = |V ( G ) | if graph H is , hom ( , G ) = 2|E ( G ) | if graph H is , and hom ( , G ) is six times the number of triangles in G. There are in total |V ( G ) ||V ( H ) | mappings from H to G , but only some of them are homomorphisms . Thus , we define homomorphism density to measure the relative frequency that the graph H appears in graph G : t ( H , G ) = hom ( H , G ) |V ( G ) ||V ( H ) | . For example , t ( , G ) = |V ( G ) |/n1 = 1 , t ( , G ) = 2|E ( G ) |/n2 . Graphon . A graphon ( Airoldi et al. , 2013 ) is a continuous , bounded and symmetric function W : [ 0 , 1 ] 2 → [ 0 , 1 ] which may be thought of as the weight matrix of a graph with infinite number of nodes . Then , given two points ui , uj ∈ [ 0 , 1 ] , W ( i , j ) represents the probability that nodes i and j be related with an edge . Various quantities of a graph can be calculated as a function of the graphon . For example , the degree of nodes in graphs can be easily extended to a degree distribution function in graphons , which is characterized by its graphon marginal dW ( x ) = ∫ 1 0 W ( x , y ) dy . Similarly , the concept of homomorphism density can be naturally extended from graphs to graphons . Given an arbitrary graph motif F , its homomorphism density with respect to graphon W is defined by t ( F , W ) = ∫ [ 0,1 ] V ( F ) ∏ i , j∈E ( F ) W ( xi , xj ) ∏ i∈V ( F ) dxi . For example , the edge density of graphon W is t ( , W ) = ∫ [ 0,1 ] 2 W ( x , y ) dxdy , and the triangle density of graphon W is t ( , W ) = ∫ [ 0,1 ] 3 W ( x , y ) W ( x , z ) W ( y , z ) dxdydz . 2.3 GRAPH CLASSIFICATION WITH GRAPH NEURAL NETWORKS . Given a set of graphs , graph classification aims to assign a class label for each graph G. Recently , graph neural networks have become the state-of-the-art approach for graph classification . Without loss of generalization , we present the formal expression of a graph convolution network ( GCN ) ( Kipf & Welling , 2016 ) . The forward propagation at k-th layer is described as the following : a ( k ) i = AGG ( k ) ( { h ( k−1 ) j : j ∈ N ( i ) } ) , h ( k ) i = COMBINE ( k ) ( h ( k−1 ) i , a ( k ) i ) , ( 1 ) where h ( k ) i ∈ Rn×dk is the intermediate representation of node i at the k-th layer , N ( i ) denotes the neighbors of node i. AGG ( · ) is an aggregation function to collect embedding representations from neighbors , and COMBINE ( · ) combines neighbor representation and its representation at ( k−1 ) -th layer followed by nonlinear transformation . For graph classification , a graph-level representation is obtained by summarizing all node-level representations in the graph by a readout function : hG = READOUT ( { h ( k ) i : i ∈ E ( G ) } ) , ŷ = softmax ( hG ) , ( 2 ) where READOUT ( · ) is the readout function , which can be a simple function such as average or sophisticated pooling function ( Gao & Ji , 2019 ; Ying et al. , 2018 ) , hG is the representation of graph G , and ŷ ∈ RC is the output estimating the probability that G belongs to each of the C classes . | The paper proposes to leverage graphon as a graph generator to adapt Mixup from vision and text to graph classification. It works as follows. A graphon, which aims to capture the existence probability of an edge between any two nodes in a graph, is first estimated for each class of the training graphs. Next, two random graphons are mixed with mixing ratio \lambda, forming a mixed graphon. Finally, graphs are sampled from the mixed graphon as synthetic graphs for training. The proposed method is evaluated using graph classification accuracy and robustness to graph corruption, showing improvement over baseline models. Applying Mixup to graph samples is an interesting and important research topic, but I think the paper in its current form is a bit immature. | SP:2ee651181aaf7e551a6c7e93ce1c08789100f4e1 |
DAB-DETR: Dynamic Anchor Boxes are Better Queries for DETR | 1 INTRODUCTION . Object detection is a fundamental task in computer vision of wide applications . Most classical detectors are based on convolutional architectures which have made remarkable progress in the last decade ( Ren et al. , 2017 ; Girshick , 2015 ; Redmon et al. , 2016 ; Bochkovskiy et al. , 2020 ; Ge et al. , 2021 ) . Recently , Carion et al . ( 2020 ) proposed a Transformer-based end-to-end detector named DETR ( DEtection TRansformer ) , which eliminates the need for hand-designed components , e.g. , anchors , and shows promising performance compared with modern anchor-based detectors such as Faster RCNN ( Ren et al. , 2017 ) . In contrast to anchor-based detectors , DETR models object detection as a set prediction problem and uses 100 learnable queries to probe and pool features from images , which makes predictions without the need of using non-maximum suppression . However , due to its ineffective design and use of queries , DETR suffers from significantly slow training convergence , usually requiring 500 epochs to achieve a good performance . To address this issue , many follow-up works attempted to improve the design of DETR queries for both faster training convergence and better performance ( Zhu et al. , 2021 ; Gao et al. , 2021 ; Meng et al. , 2021 ; Wang et al. , 2021 ) . Despite all the progress , the role of the learned queries in DETR is still not fully understood or utilized . While most previous attempts make each query in DETR more explicitly associated with one specific spatial position rather than multiple positions , the technical solutions are largely different . For example , Conditional DETR learns a conditional spatial query by adapting a query based on its content feature for better matching with image features ( Meng et al. , 2021 ) . Efficient DETR introduces a dense prediction module to select top-K object queries ( Yao et al. , 2021 ) and Anchor DETR formulates queries as 2D anchor points ( Wang et al. , 2021 ) , both associating each query with a specific spatial position . Similarly , Deformable DETR directly treats 2D reference points as queries and performs deformable cross-attention operation at each reference points ( Zhu et al. , 2021 ) . But all the above works only leverage 2D positions as anchor points without considering of the object scales . Motivated by these studies , we take a closer look at the cross-attention module in Transformer decoder and propose to use anchor boxes , i.e . 4D box coordinates ( x , y , w , h ) , as queries in DETR and update them layer-by-layer . This new query formulation introduce better spatial priors for the cross-attention module by considering both the position and size of each anchor box , which also leads to a much simpler implementation and a deeper understanding of the role of queries in DETR . The key insight behind this formulation is that each query in DETR is formed by two parts : a content part ( decoder self-attention output ) and a positional part ( e.g . learnable queries in DETR ) 1 . The cross-attention weights are computed by comparing a query with a set of keys which consists of two parts as a content part ( encoded image feature ) and a positional part ( positional embedding ) . Thus , queries in Transformer decoder can be interpreted as pooling features from a feature map based on the query-to-feature similarity measure , which considers both the content and positional information . While the content similarity is for pooling semantically related features , the positional similarity is to provide a positional constraint for pooling features around the query position . This attention computing mechanism motivates us to formulate queries as anchor boxes as illustrated in Fig . 1 ( c ) , allowing us to use the center position ( x , y ) of an anchor box to pool features around the center and use the anchor box size ( w , h ) to modulate the cross-attention map , adapting it to anchor box size . In addition , because of the use of coordinates as queries , anchor boxes can be updated dynamically layer-by-layer . In this way , queries in DETR can be implemented as performing soft ROI pooling layer-by-layer in a cascade way . We provide a better positional prior for pooling features by using anchor box size to modulate the cross-attention . Because the cross-attention can pool features from the whole feature map , it is crucial to provide a proper positional prior for each query to let the cross-attention module focus on a local region corresponding to a target object . It can also facilitate to speed up the training convergence of DETR . Most prior works improve DETR by associating each query with a specific location , but they assume an isotropic Gaussian positional prior of a fixed size , which is inappropriate for objects of different scales . With the size information ( w , h ) available in each query anchor box , we can modulate the Gaussian positional prior as an oval shape . More specifically , we divide the width and height from the cross-attention weight ( before softmax ) for its x part and y part separately , which helps the Gaussian prior to better match with objects of different scales . To further improve the positional prior , we also introduce a temperature parameter to tune the flatness of positional attention , which has been overlooked in all prior works . 1See the DETR implementation at https : //github.com/facebookresearch/detr . The components of queries and keys are also shown in each subplot of Fig . 1 . Note that the learnable queries in DETR are only for the positional part . Related discussion can also be found in Conditional DETR ( Meng et al. , 2021 ) . In summary , our proposed DAB-DETR ( Dynamic Anchor Box DETR ) presents a novel query formulation by directly learning anchors as queries . This formulation offers a deeper understanding of the role of queries , allowing us to use anchor size to modulate the positional cross-attention map in Transformer decoders and perform dynamic anchor update layer-by-layer . Our results demonstrate that DAB-DETR attains the best performance among DETR-like architectures under the same setting on the COCO object detection benchmark . The proposed method can achieve 45.7 % AP when using a single ResNet-50 ( He et al. , 2016 ) model as backbone for training 50 epochs . We also conducted extensive experiments to confirm our analysis and verify the effectiveness of our methods . 2 RELATED WORK . Most classical detectors are anchor-based , using either anchor boxes ( Ren et al. , 2017 ; Girshick , 2015 ; Sun et al. , 2021 ) or anchor points ( Tian et al. , 2019 ; Zhou et al. , 2019 ) . In contrast , DETR ( Carion et al. , 2020 ) is a fully anchor-free detector using a set of learnable vectors as queries . Many follow-up works attempted to solve the slow convergence of DETR from different perspectives . Sun et al . ( 2020 ) pointed out that the cause of slow training of DETR is due to the crossattention in decoders and hence proposed an encoder-only model . Gao et al . ( 2021 ) instead introduced a Gaussian prior to regulate the cross-attention . Despite their improved performance , they did not give a proper explanation of the slow training and the roles of queries in DETR . Another direction to improve DETR , which is more relevant to our work , is towards a deeper understanding of the role of queries in DETR . As the learnable queries in DETR are used to provide positional constrains for feature pooling , most related works attempted to make each query in DETR more explicitly related to a specific spatial position rather than multiple position modes in the vanilla DETR . For example , Deformable DETR ( Zhu et al. , 2021 ) directly treats 2D reference points as queries and predicts deformable sampling points for each reference point to perform deformable cross-attention operation . Conditional DETR ( Meng et al. , 2021 ) decouples the attention formulation and generates positional queries based on reference coordinates . Efficient DETR ( Yao et al. , 2021 ) introduces a dense prediction module to select top-K positions as object queries . Although these works connect queries with positional information , they do not have an explicit formulation to use anchors . Different from the hypothesis in prior works that the learnable query vectors contain box coordinate information , our approach is based on a new perspective that all information contained in queries are box coordinates . That is , anchor boxes are better queries for DETR . A concurrent work Anchor DETR ( Wang et al. , 2021 ) also suggests learning anchor points directly , while it ignores the anchor width and height information as in other prior works . Besides DETR , Sun et al . ( 2021 ) proposed a sparse detector by learning boxes directly , which shares a similar anchor formulation with us , but it discards the Transformer structure and leverages hard ROI align for feature extraction . Table 1 summarizes the key differences between related works and our proposed DAB-DETR . We compare our model with related works on five dimensions : if the model directly learns anchors , if the model predicts reference coordinates ( in its intermediate stage ) , if the model updates the reference anchors layer-by-layer , if the model uses the standard dense cross-attention , if the attention is modulated to better match with objects of different scales . and if the model updates the learned queries layer-bylayer . A more detailed comparison of DETR-like models is available in Sec . B of Appendix . We recommend this section for readers who have confusions about the table . 3 WHY A POSITIONAL PRIOR COULD SPEEDUP TRAINING ? . Much work has been done to accelerate the training convergence speed of DETR , while lacking a unified understanding of why their methods work . Sun et al . ( 2020 ) showed that the cross-attention module is mainly responsible for the slow convergence , but they simply removed the decoders for faster training . We follow their analysis to find which sub-module in the cross-attention affects the performance . Comparing the self-attention module in encoders with the cross-attention module in decoders , we find the key difference between their inputs comes from the queries , as shown in Fig . 2 . As the decoder embeddings are updated by linearly combining the image features , they are in the same space as the image features . Hence the root cause is likely due to the learnable queries . Two possible reasons in cross-attention account for the model ’ s slow training convergence : 1 ) it is hard to learn the queries due to the optimization challenge , and 2 ) the positional information in the learned queries is not encoded in the same way as the sinusoidal positional encoding used for image features . To see if it is the first reason , we reuse the well-learned queries from DETR ( keep them fixed ) and only train the other modules . The training curves in Fig . 3 ( a ) show that the fixed queries only slightly improve the convergence in very early epochs , e.g . the first 25 epochs . Hence the query learning ( or optimization ) is likely not the key concern . Then we turn to the second possibility and try to find out if the learned queries have some undesirable properties . As the learned queries are used to filter objects in certain regions , we visualize a few positional attention maps between the learned queries and the positional embeddings of image features in Fig . 4 ( a ) . Each query can be regarded as a positional prior to let decoders focus on a region of interest . Although they serve as a positional constraint , they also carry undesirable properties : multiple modes and nearly uniform attention weights . For example , the two attention maps at the top of Fig . 4 ( a ) have two or more concentration centers , making it hard to locate objects when multiple objects exist in an image . The bottom maps of Fig . 4 ( a ) focus on areas that are either too large or too small , and hence can not inject useful positional information into the procedure of feature extraction . We conjecture that the multiple mode property of queries in DETR is likely the root cause for its slow training and we believe introducing explicit positional priors to constrain queries on a local region is desirable for training . To verify this assumption , we replace the query formulation in DETR with dynamic anchor boxes , which can enforce each query to focus on a specific area , and name this model DETR+DAB . The training curves in Fig . 3 ( b ) show that DETR+DAB leads to a much better performance compared with DETR , in terms of both detection AP and training/testing loss . Note that the only difference between DETR and DETR+DAB is the formulation of queries and no other techniques like 300 queries or focal loss are introduced . It shows that after addressing the multi-mode issue of DETR queries , we can achieve both a faster training convergence and a higher detection accuracy . Some previous work also has similar analysis and confirmed this . For example , SMCA ( Gao et al. , 2021 ) speeds up the training by applying pre-defined Gaussian maps around reference points . Conditional DETR ( Meng et al. , 2021 ) uses explicit positional embedding as positional queries for training , yielding attention maps similar to Gaussian kernels as shown in Fig . 4 ( b ) . Although explicit positional priors lead to good performance in training , they ignore the scale information of an object . In contrast , our proposed DAB-DETR explicitly takes into account the object scale information to adaptively adjust attention weights , as shown in Fig . 4 ( c ) . | This paper proposes DAB-DETR, a DETR variant that incorporates dynamic anchor boxes for object queries. Based on the analysis of the learned queries in DETR, the authors conclude the slow convergence of DETR is likely caused by the multiple mode property of the queries. To solve the problem, explicit positional priors (box coordinates) are used to improve query-to-feature similarity and accelerate model convergence. Experiments and analysis show that DAB-DETR achieves promising results on the object detection task. | SP:b9596ee932d0dff5e59c5013555c3cfff7b0b722 |
DAB-DETR: Dynamic Anchor Boxes are Better Queries for DETR | 1 INTRODUCTION . Object detection is a fundamental task in computer vision of wide applications . Most classical detectors are based on convolutional architectures which have made remarkable progress in the last decade ( Ren et al. , 2017 ; Girshick , 2015 ; Redmon et al. , 2016 ; Bochkovskiy et al. , 2020 ; Ge et al. , 2021 ) . Recently , Carion et al . ( 2020 ) proposed a Transformer-based end-to-end detector named DETR ( DEtection TRansformer ) , which eliminates the need for hand-designed components , e.g. , anchors , and shows promising performance compared with modern anchor-based detectors such as Faster RCNN ( Ren et al. , 2017 ) . In contrast to anchor-based detectors , DETR models object detection as a set prediction problem and uses 100 learnable queries to probe and pool features from images , which makes predictions without the need of using non-maximum suppression . However , due to its ineffective design and use of queries , DETR suffers from significantly slow training convergence , usually requiring 500 epochs to achieve a good performance . To address this issue , many follow-up works attempted to improve the design of DETR queries for both faster training convergence and better performance ( Zhu et al. , 2021 ; Gao et al. , 2021 ; Meng et al. , 2021 ; Wang et al. , 2021 ) . Despite all the progress , the role of the learned queries in DETR is still not fully understood or utilized . While most previous attempts make each query in DETR more explicitly associated with one specific spatial position rather than multiple positions , the technical solutions are largely different . For example , Conditional DETR learns a conditional spatial query by adapting a query based on its content feature for better matching with image features ( Meng et al. , 2021 ) . Efficient DETR introduces a dense prediction module to select top-K object queries ( Yao et al. , 2021 ) and Anchor DETR formulates queries as 2D anchor points ( Wang et al. , 2021 ) , both associating each query with a specific spatial position . Similarly , Deformable DETR directly treats 2D reference points as queries and performs deformable cross-attention operation at each reference points ( Zhu et al. , 2021 ) . But all the above works only leverage 2D positions as anchor points without considering of the object scales . Motivated by these studies , we take a closer look at the cross-attention module in Transformer decoder and propose to use anchor boxes , i.e . 4D box coordinates ( x , y , w , h ) , as queries in DETR and update them layer-by-layer . This new query formulation introduce better spatial priors for the cross-attention module by considering both the position and size of each anchor box , which also leads to a much simpler implementation and a deeper understanding of the role of queries in DETR . The key insight behind this formulation is that each query in DETR is formed by two parts : a content part ( decoder self-attention output ) and a positional part ( e.g . learnable queries in DETR ) 1 . The cross-attention weights are computed by comparing a query with a set of keys which consists of two parts as a content part ( encoded image feature ) and a positional part ( positional embedding ) . Thus , queries in Transformer decoder can be interpreted as pooling features from a feature map based on the query-to-feature similarity measure , which considers both the content and positional information . While the content similarity is for pooling semantically related features , the positional similarity is to provide a positional constraint for pooling features around the query position . This attention computing mechanism motivates us to formulate queries as anchor boxes as illustrated in Fig . 1 ( c ) , allowing us to use the center position ( x , y ) of an anchor box to pool features around the center and use the anchor box size ( w , h ) to modulate the cross-attention map , adapting it to anchor box size . In addition , because of the use of coordinates as queries , anchor boxes can be updated dynamically layer-by-layer . In this way , queries in DETR can be implemented as performing soft ROI pooling layer-by-layer in a cascade way . We provide a better positional prior for pooling features by using anchor box size to modulate the cross-attention . Because the cross-attention can pool features from the whole feature map , it is crucial to provide a proper positional prior for each query to let the cross-attention module focus on a local region corresponding to a target object . It can also facilitate to speed up the training convergence of DETR . Most prior works improve DETR by associating each query with a specific location , but they assume an isotropic Gaussian positional prior of a fixed size , which is inappropriate for objects of different scales . With the size information ( w , h ) available in each query anchor box , we can modulate the Gaussian positional prior as an oval shape . More specifically , we divide the width and height from the cross-attention weight ( before softmax ) for its x part and y part separately , which helps the Gaussian prior to better match with objects of different scales . To further improve the positional prior , we also introduce a temperature parameter to tune the flatness of positional attention , which has been overlooked in all prior works . 1See the DETR implementation at https : //github.com/facebookresearch/detr . The components of queries and keys are also shown in each subplot of Fig . 1 . Note that the learnable queries in DETR are only for the positional part . Related discussion can also be found in Conditional DETR ( Meng et al. , 2021 ) . In summary , our proposed DAB-DETR ( Dynamic Anchor Box DETR ) presents a novel query formulation by directly learning anchors as queries . This formulation offers a deeper understanding of the role of queries , allowing us to use anchor size to modulate the positional cross-attention map in Transformer decoders and perform dynamic anchor update layer-by-layer . Our results demonstrate that DAB-DETR attains the best performance among DETR-like architectures under the same setting on the COCO object detection benchmark . The proposed method can achieve 45.7 % AP when using a single ResNet-50 ( He et al. , 2016 ) model as backbone for training 50 epochs . We also conducted extensive experiments to confirm our analysis and verify the effectiveness of our methods . 2 RELATED WORK . Most classical detectors are anchor-based , using either anchor boxes ( Ren et al. , 2017 ; Girshick , 2015 ; Sun et al. , 2021 ) or anchor points ( Tian et al. , 2019 ; Zhou et al. , 2019 ) . In contrast , DETR ( Carion et al. , 2020 ) is a fully anchor-free detector using a set of learnable vectors as queries . Many follow-up works attempted to solve the slow convergence of DETR from different perspectives . Sun et al . ( 2020 ) pointed out that the cause of slow training of DETR is due to the crossattention in decoders and hence proposed an encoder-only model . Gao et al . ( 2021 ) instead introduced a Gaussian prior to regulate the cross-attention . Despite their improved performance , they did not give a proper explanation of the slow training and the roles of queries in DETR . Another direction to improve DETR , which is more relevant to our work , is towards a deeper understanding of the role of queries in DETR . As the learnable queries in DETR are used to provide positional constrains for feature pooling , most related works attempted to make each query in DETR more explicitly related to a specific spatial position rather than multiple position modes in the vanilla DETR . For example , Deformable DETR ( Zhu et al. , 2021 ) directly treats 2D reference points as queries and predicts deformable sampling points for each reference point to perform deformable cross-attention operation . Conditional DETR ( Meng et al. , 2021 ) decouples the attention formulation and generates positional queries based on reference coordinates . Efficient DETR ( Yao et al. , 2021 ) introduces a dense prediction module to select top-K positions as object queries . Although these works connect queries with positional information , they do not have an explicit formulation to use anchors . Different from the hypothesis in prior works that the learnable query vectors contain box coordinate information , our approach is based on a new perspective that all information contained in queries are box coordinates . That is , anchor boxes are better queries for DETR . A concurrent work Anchor DETR ( Wang et al. , 2021 ) also suggests learning anchor points directly , while it ignores the anchor width and height information as in other prior works . Besides DETR , Sun et al . ( 2021 ) proposed a sparse detector by learning boxes directly , which shares a similar anchor formulation with us , but it discards the Transformer structure and leverages hard ROI align for feature extraction . Table 1 summarizes the key differences between related works and our proposed DAB-DETR . We compare our model with related works on five dimensions : if the model directly learns anchors , if the model predicts reference coordinates ( in its intermediate stage ) , if the model updates the reference anchors layer-by-layer , if the model uses the standard dense cross-attention , if the attention is modulated to better match with objects of different scales . and if the model updates the learned queries layer-bylayer . A more detailed comparison of DETR-like models is available in Sec . B of Appendix . We recommend this section for readers who have confusions about the table . 3 WHY A POSITIONAL PRIOR COULD SPEEDUP TRAINING ? . Much work has been done to accelerate the training convergence speed of DETR , while lacking a unified understanding of why their methods work . Sun et al . ( 2020 ) showed that the cross-attention module is mainly responsible for the slow convergence , but they simply removed the decoders for faster training . We follow their analysis to find which sub-module in the cross-attention affects the performance . Comparing the self-attention module in encoders with the cross-attention module in decoders , we find the key difference between their inputs comes from the queries , as shown in Fig . 2 . As the decoder embeddings are updated by linearly combining the image features , they are in the same space as the image features . Hence the root cause is likely due to the learnable queries . Two possible reasons in cross-attention account for the model ’ s slow training convergence : 1 ) it is hard to learn the queries due to the optimization challenge , and 2 ) the positional information in the learned queries is not encoded in the same way as the sinusoidal positional encoding used for image features . To see if it is the first reason , we reuse the well-learned queries from DETR ( keep them fixed ) and only train the other modules . The training curves in Fig . 3 ( a ) show that the fixed queries only slightly improve the convergence in very early epochs , e.g . the first 25 epochs . Hence the query learning ( or optimization ) is likely not the key concern . Then we turn to the second possibility and try to find out if the learned queries have some undesirable properties . As the learned queries are used to filter objects in certain regions , we visualize a few positional attention maps between the learned queries and the positional embeddings of image features in Fig . 4 ( a ) . Each query can be regarded as a positional prior to let decoders focus on a region of interest . Although they serve as a positional constraint , they also carry undesirable properties : multiple modes and nearly uniform attention weights . For example , the two attention maps at the top of Fig . 4 ( a ) have two or more concentration centers , making it hard to locate objects when multiple objects exist in an image . The bottom maps of Fig . 4 ( a ) focus on areas that are either too large or too small , and hence can not inject useful positional information into the procedure of feature extraction . We conjecture that the multiple mode property of queries in DETR is likely the root cause for its slow training and we believe introducing explicit positional priors to constrain queries on a local region is desirable for training . To verify this assumption , we replace the query formulation in DETR with dynamic anchor boxes , which can enforce each query to focus on a specific area , and name this model DETR+DAB . The training curves in Fig . 3 ( b ) show that DETR+DAB leads to a much better performance compared with DETR , in terms of both detection AP and training/testing loss . Note that the only difference between DETR and DETR+DAB is the formulation of queries and no other techniques like 300 queries or focal loss are introduced . It shows that after addressing the multi-mode issue of DETR queries , we can achieve both a faster training convergence and a higher detection accuracy . Some previous work also has similar analysis and confirmed this . For example , SMCA ( Gao et al. , 2021 ) speeds up the training by applying pre-defined Gaussian maps around reference points . Conditional DETR ( Meng et al. , 2021 ) uses explicit positional embedding as positional queries for training , yielding attention maps similar to Gaussian kernels as shown in Fig . 4 ( b ) . Although explicit positional priors lead to good performance in training , they ignore the scale information of an object . In contrast , our proposed DAB-DETR explicitly takes into account the object scale information to adaptively adjust attention weights , as shown in Fig . 4 ( c ) . | The paper addresses the problem of slow convergence in training of object detection transformer. The main contribution is to use trainable anchor boxes (4D) in a layer-by-layer manner. They also motivate their contribution by visualizing positional attentions and explaining the advantage of their proposed method in adapting to scale ratio of objects. They further propose to change the size of the positional attention by an additional temperature parameter, which they choose empirically for the dataset. They perform experiments to justify aspects of their claims, and provide ablations to prove their results being improved over the SOTA on the COCO '17 validation set. | SP:b9596ee932d0dff5e59c5013555c3cfff7b0b722 |
DAB-DETR: Dynamic Anchor Boxes are Better Queries for DETR | 1 INTRODUCTION . Object detection is a fundamental task in computer vision of wide applications . Most classical detectors are based on convolutional architectures which have made remarkable progress in the last decade ( Ren et al. , 2017 ; Girshick , 2015 ; Redmon et al. , 2016 ; Bochkovskiy et al. , 2020 ; Ge et al. , 2021 ) . Recently , Carion et al . ( 2020 ) proposed a Transformer-based end-to-end detector named DETR ( DEtection TRansformer ) , which eliminates the need for hand-designed components , e.g. , anchors , and shows promising performance compared with modern anchor-based detectors such as Faster RCNN ( Ren et al. , 2017 ) . In contrast to anchor-based detectors , DETR models object detection as a set prediction problem and uses 100 learnable queries to probe and pool features from images , which makes predictions without the need of using non-maximum suppression . However , due to its ineffective design and use of queries , DETR suffers from significantly slow training convergence , usually requiring 500 epochs to achieve a good performance . To address this issue , many follow-up works attempted to improve the design of DETR queries for both faster training convergence and better performance ( Zhu et al. , 2021 ; Gao et al. , 2021 ; Meng et al. , 2021 ; Wang et al. , 2021 ) . Despite all the progress , the role of the learned queries in DETR is still not fully understood or utilized . While most previous attempts make each query in DETR more explicitly associated with one specific spatial position rather than multiple positions , the technical solutions are largely different . For example , Conditional DETR learns a conditional spatial query by adapting a query based on its content feature for better matching with image features ( Meng et al. , 2021 ) . Efficient DETR introduces a dense prediction module to select top-K object queries ( Yao et al. , 2021 ) and Anchor DETR formulates queries as 2D anchor points ( Wang et al. , 2021 ) , both associating each query with a specific spatial position . Similarly , Deformable DETR directly treats 2D reference points as queries and performs deformable cross-attention operation at each reference points ( Zhu et al. , 2021 ) . But all the above works only leverage 2D positions as anchor points without considering of the object scales . Motivated by these studies , we take a closer look at the cross-attention module in Transformer decoder and propose to use anchor boxes , i.e . 4D box coordinates ( x , y , w , h ) , as queries in DETR and update them layer-by-layer . This new query formulation introduce better spatial priors for the cross-attention module by considering both the position and size of each anchor box , which also leads to a much simpler implementation and a deeper understanding of the role of queries in DETR . The key insight behind this formulation is that each query in DETR is formed by two parts : a content part ( decoder self-attention output ) and a positional part ( e.g . learnable queries in DETR ) 1 . The cross-attention weights are computed by comparing a query with a set of keys which consists of two parts as a content part ( encoded image feature ) and a positional part ( positional embedding ) . Thus , queries in Transformer decoder can be interpreted as pooling features from a feature map based on the query-to-feature similarity measure , which considers both the content and positional information . While the content similarity is for pooling semantically related features , the positional similarity is to provide a positional constraint for pooling features around the query position . This attention computing mechanism motivates us to formulate queries as anchor boxes as illustrated in Fig . 1 ( c ) , allowing us to use the center position ( x , y ) of an anchor box to pool features around the center and use the anchor box size ( w , h ) to modulate the cross-attention map , adapting it to anchor box size . In addition , because of the use of coordinates as queries , anchor boxes can be updated dynamically layer-by-layer . In this way , queries in DETR can be implemented as performing soft ROI pooling layer-by-layer in a cascade way . We provide a better positional prior for pooling features by using anchor box size to modulate the cross-attention . Because the cross-attention can pool features from the whole feature map , it is crucial to provide a proper positional prior for each query to let the cross-attention module focus on a local region corresponding to a target object . It can also facilitate to speed up the training convergence of DETR . Most prior works improve DETR by associating each query with a specific location , but they assume an isotropic Gaussian positional prior of a fixed size , which is inappropriate for objects of different scales . With the size information ( w , h ) available in each query anchor box , we can modulate the Gaussian positional prior as an oval shape . More specifically , we divide the width and height from the cross-attention weight ( before softmax ) for its x part and y part separately , which helps the Gaussian prior to better match with objects of different scales . To further improve the positional prior , we also introduce a temperature parameter to tune the flatness of positional attention , which has been overlooked in all prior works . 1See the DETR implementation at https : //github.com/facebookresearch/detr . The components of queries and keys are also shown in each subplot of Fig . 1 . Note that the learnable queries in DETR are only for the positional part . Related discussion can also be found in Conditional DETR ( Meng et al. , 2021 ) . In summary , our proposed DAB-DETR ( Dynamic Anchor Box DETR ) presents a novel query formulation by directly learning anchors as queries . This formulation offers a deeper understanding of the role of queries , allowing us to use anchor size to modulate the positional cross-attention map in Transformer decoders and perform dynamic anchor update layer-by-layer . Our results demonstrate that DAB-DETR attains the best performance among DETR-like architectures under the same setting on the COCO object detection benchmark . The proposed method can achieve 45.7 % AP when using a single ResNet-50 ( He et al. , 2016 ) model as backbone for training 50 epochs . We also conducted extensive experiments to confirm our analysis and verify the effectiveness of our methods . 2 RELATED WORK . Most classical detectors are anchor-based , using either anchor boxes ( Ren et al. , 2017 ; Girshick , 2015 ; Sun et al. , 2021 ) or anchor points ( Tian et al. , 2019 ; Zhou et al. , 2019 ) . In contrast , DETR ( Carion et al. , 2020 ) is a fully anchor-free detector using a set of learnable vectors as queries . Many follow-up works attempted to solve the slow convergence of DETR from different perspectives . Sun et al . ( 2020 ) pointed out that the cause of slow training of DETR is due to the crossattention in decoders and hence proposed an encoder-only model . Gao et al . ( 2021 ) instead introduced a Gaussian prior to regulate the cross-attention . Despite their improved performance , they did not give a proper explanation of the slow training and the roles of queries in DETR . Another direction to improve DETR , which is more relevant to our work , is towards a deeper understanding of the role of queries in DETR . As the learnable queries in DETR are used to provide positional constrains for feature pooling , most related works attempted to make each query in DETR more explicitly related to a specific spatial position rather than multiple position modes in the vanilla DETR . For example , Deformable DETR ( Zhu et al. , 2021 ) directly treats 2D reference points as queries and predicts deformable sampling points for each reference point to perform deformable cross-attention operation . Conditional DETR ( Meng et al. , 2021 ) decouples the attention formulation and generates positional queries based on reference coordinates . Efficient DETR ( Yao et al. , 2021 ) introduces a dense prediction module to select top-K positions as object queries . Although these works connect queries with positional information , they do not have an explicit formulation to use anchors . Different from the hypothesis in prior works that the learnable query vectors contain box coordinate information , our approach is based on a new perspective that all information contained in queries are box coordinates . That is , anchor boxes are better queries for DETR . A concurrent work Anchor DETR ( Wang et al. , 2021 ) also suggests learning anchor points directly , while it ignores the anchor width and height information as in other prior works . Besides DETR , Sun et al . ( 2021 ) proposed a sparse detector by learning boxes directly , which shares a similar anchor formulation with us , but it discards the Transformer structure and leverages hard ROI align for feature extraction . Table 1 summarizes the key differences between related works and our proposed DAB-DETR . We compare our model with related works on five dimensions : if the model directly learns anchors , if the model predicts reference coordinates ( in its intermediate stage ) , if the model updates the reference anchors layer-by-layer , if the model uses the standard dense cross-attention , if the attention is modulated to better match with objects of different scales . and if the model updates the learned queries layer-bylayer . A more detailed comparison of DETR-like models is available in Sec . B of Appendix . We recommend this section for readers who have confusions about the table . 3 WHY A POSITIONAL PRIOR COULD SPEEDUP TRAINING ? . Much work has been done to accelerate the training convergence speed of DETR , while lacking a unified understanding of why their methods work . Sun et al . ( 2020 ) showed that the cross-attention module is mainly responsible for the slow convergence , but they simply removed the decoders for faster training . We follow their analysis to find which sub-module in the cross-attention affects the performance . Comparing the self-attention module in encoders with the cross-attention module in decoders , we find the key difference between their inputs comes from the queries , as shown in Fig . 2 . As the decoder embeddings are updated by linearly combining the image features , they are in the same space as the image features . Hence the root cause is likely due to the learnable queries . Two possible reasons in cross-attention account for the model ’ s slow training convergence : 1 ) it is hard to learn the queries due to the optimization challenge , and 2 ) the positional information in the learned queries is not encoded in the same way as the sinusoidal positional encoding used for image features . To see if it is the first reason , we reuse the well-learned queries from DETR ( keep them fixed ) and only train the other modules . The training curves in Fig . 3 ( a ) show that the fixed queries only slightly improve the convergence in very early epochs , e.g . the first 25 epochs . Hence the query learning ( or optimization ) is likely not the key concern . Then we turn to the second possibility and try to find out if the learned queries have some undesirable properties . As the learned queries are used to filter objects in certain regions , we visualize a few positional attention maps between the learned queries and the positional embeddings of image features in Fig . 4 ( a ) . Each query can be regarded as a positional prior to let decoders focus on a region of interest . Although they serve as a positional constraint , they also carry undesirable properties : multiple modes and nearly uniform attention weights . For example , the two attention maps at the top of Fig . 4 ( a ) have two or more concentration centers , making it hard to locate objects when multiple objects exist in an image . The bottom maps of Fig . 4 ( a ) focus on areas that are either too large or too small , and hence can not inject useful positional information into the procedure of feature extraction . We conjecture that the multiple mode property of queries in DETR is likely the root cause for its slow training and we believe introducing explicit positional priors to constrain queries on a local region is desirable for training . To verify this assumption , we replace the query formulation in DETR with dynamic anchor boxes , which can enforce each query to focus on a specific area , and name this model DETR+DAB . The training curves in Fig . 3 ( b ) show that DETR+DAB leads to a much better performance compared with DETR , in terms of both detection AP and training/testing loss . Note that the only difference between DETR and DETR+DAB is the formulation of queries and no other techniques like 300 queries or focal loss are introduced . It shows that after addressing the multi-mode issue of DETR queries , we can achieve both a faster training convergence and a higher detection accuracy . Some previous work also has similar analysis and confirmed this . For example , SMCA ( Gao et al. , 2021 ) speeds up the training by applying pre-defined Gaussian maps around reference points . Conditional DETR ( Meng et al. , 2021 ) uses explicit positional embedding as positional queries for training , yielding attention maps similar to Gaussian kernels as shown in Fig . 4 ( b ) . Although explicit positional priors lead to good performance in training , they ignore the scale information of an object . In contrast , our proposed DAB-DETR explicitly takes into account the object scale information to adaptively adjust attention weights , as shown in Fig . 4 ( c ) . | This paper introduces dynamic anchor boxes as a query formulation for detection transformer (DETR). The basic idea is to use explicit positional priors and scale priors from anchor boxes as the queries for training the decoder of DETR. Anchor boxes are also adjusted layer-by-layer to learn the optimal anchor setting. The proposed query formulation provides a better understanding of the query for vision transformer and is proven to outperform previous implicit and explicit query formulations. | SP:b9596ee932d0dff5e59c5013555c3cfff7b0b722 |
Consistent Counterfactuals for Deep Models | 1 INTRODUCTION . Deep Networks are increasingly being integrated into decision-making processes which require explanations during model deployment , from medical diagnosis to credit risk analysis ( Bakator & Radosav , 2018 ; et . al , 2017 ; Liu et al. , 2014 ; Sun et al. , 2016 ; De Fauw et al. , 2018 ; Babaev et al. , 2019 ; Addo et al. , 2018 ; Balasubramanian et al. , 2018 ; Wang & Xu , 2018 ) . Counterfactual examples ( Wachter et al. , 2018 ; Van Looveren & Klaise , 2019 ; Mahajan et al. , 2019 ; Verma et al. , 2020 ; Laugel et al. , 2018 ; Keane & Smyth , 2020 ; Ustun et al. , 2019 ; Sharma et al. , 2019 ; Poyiadzi et al. , 2020 ; Karimi et al. , 2020 ; Pawelczyk et al. , 2020a ) are often put forth as a simple and intuitive method of explaining decisions in such high-stakes contexts ( Mc Grath et al. , 2018 ; Yang et al. , 2020 ) . A counterfactual example for an input x is a related point x′ that produces a desired outcome y′ from a model . Intuitively , these explanations are intended to answer the question , “ Why did point x not receive outcome y′ ? ” either to give instructions for recourse , i.e . how an individual can change their behavior to get a different model outcome , or as a check to ensure a model ’ s decision is well-justified ( Ustun et al. , 2019 ) . Counterfactual examples are particularly popular in legal and business contexts , as they may offer a way to comply with regulations in the United States and Europe requiring explanations on high-stakes decisions ( e.g . Fair Credit Reporting Act ( FCRA ) and General Data Protection Regulation ( GDPR , 2016 ) ) , while revealing little information about the underlying model ( Barocas et al. , 2020 ; Mc Grath et al. , 2018 ) . Counterfactual examples are often viewed under the assumption that the decision system on which they will be used is static : that is , the model that creates the explanation will be the same model to which , e.g . a loan applicant soliciting recourse re-applies ( Barocas et al. , 2020 ) . However , during real model deployments in high-stakes situations , models are not constant through time : there are often retrainings due to small dataset updates , or fine-tunings to ensure consistent good behavior ( Merchant , 2020 ; pwc , 2020 ) . Thus , in order for counterfactuals to be usable in practice , they must return the same desired outcome not only for the model that generates them , but for similar models created during deployment . This paper investigates the consistency of model predictions on counterfactual examples between deep models with seemingly inconsequential differences , i.e . random seed and one-point changes in the training set . We demonstrate that some of the most common methods generating counterfactuals in deep models either are highly inconsistent between models or very costly in terms of distance from the original input . Recent work that has investigated this problem in simpler models ( Pawelczyk et al. , 2020b ) has pointed to increasing counterfactual cost , i.e . the distance between an input point and its counterfactual , as a method of increasing consistency . We show that while higher than minimal cost is necessary to achieve a stable counterfactual , cost alone is not a reliable signal to guide the search for stable counterfactuals in deep models ( Section 3 ) . Instead , we show that a model ’ s Lipschitz continuity and confidence around the counterfactual is a more reliable indicator of the counterfactual ’ s stability . Intuitively , this is due to the fact that these factors bound the extent of a models local decision boundaries will change across fine-tunings , which we prove in Section 4 . Following this result , we introduce Stable Neighbor Search ( SNS ) , which finds counterfactuals by searching for high-confidence points with small Lipschitz constants in the generating model ( Section 4 ) . Finally , we empirically demonstrate that SNS generates consistent counterfactuals while maintaining a low cost relative to other methods over several tabular datasets , e.g . Seizure and German Credit from UCI database ( Dua & Karra Taniskidou , 2017 ) , in Section 5 . In summary , our main contributions are : 1 ) we demonstrate that common counterfactual explanations can have low consistency across nearby deep models , and that cost is an insufficient signal to find consistent counterfactuals ( Theorem . 1 ) ; 2 ) to navigate this cost-consistency tradeoff , we prove that counterfactual examples in a neighborhood where the network has a small local Lipschitz constant are more consistent across changes to the last layer of weights , which suggests that such points are more stable across small changes in the training environment ( Theorem . 2 ) ; 3 ) leveraging this result , we propose SNS as a way to generate consistent counterfactual explanations ( Def . 5 ) ; 4 ) we empirically demonstrate the effectiveness of SNS in generating consistent and low-cost counterfactual explanations ( Table 1 ) . More broadly , this paper further develops a connection between the geometry of deep models and the consistency of counterfactual examples . When considered alongside related findings that focus on attribution methods , our work adds to the perspective that good explanations require good models to begin with ( Croce et al. , 2019 ; Wang et al. , 2020 ; Dombrowski et al. , 2019 ; Simonyan et al. , 2013 ; Sundararajan et al. , 2017 ) . 2 BACKGROUND . Notation . We begin with notation , preliminaries , and definitions . Let F ( x ; θ ) =argmaxifi ( x ; θ ) be a deep network where fi denotes the logit output for the i-th class and θ is the vector of trainable parameters . If F ( x ; θ ) ∈ { 0,1 } , there is only one logit output so we write f . Throughout the paper we assume F is piece-wise linear such that all the activation functions are ReLUs . We use ||x||p to denote the ` p norm of a vector x andBp ( x , ) def = { x′|||x′−x||p≤ , x′∈Rd } to denote a norm-bounded ball around x. Counterfactual Examples . We introduce some general notation to unify the definition of a counterfactual example across various approaches with differing desiderata . In the most general sense , a counterfactual example for an input x is an example xc that receives the different , often targeted , prediction while minimizing a user-defined quantity of interest ( QoI ) ( see Def . 1 ) : for example , a counterfactual explanation for a rejected loan application is a related hypothetical application that was accepted . We refer to the point x requiring a counterfactual example the origin point or input interchangeably . We note that there is a different definition of “ counterfactual ” widely used in the causality literature , where a counterfactual is given by an intervention on a causal model that is assumed to generate data observations ( Pearl , 2009 ) . This is a case of overlapping terminology , and is orthogonal to this work . We do not consider causality in this paper . Definition 1 ( Counterfactual Example ) . Given a model F ( x ) , an input x , a desired outcome class c 6=F ( x ; θ ) , and a user-defined quantity of interest q , a counterfactual example xc for x is defined as xc def = argminF ( x′ ; θ ) =cq ( x ′ , x ) where the cost of xc is defined as ||x−xc||p . The majority of counterfactual generation algorithms minimize of qlow ( x , x′ ) def = ||x−x′||p , potentially along with some constraints , to encourage low-cost counterfactuals ( Wachter et al. , 2018 ) . Some common variations include ensuring that counterfactuals are attainable , i.e . not changing features that can not be changed ( e.g . sex , age ) due to domain constraints ( Ustun et al. , 2019 ; Lash et al. , 2017 ) , ensuring sparsity , so that fewer features are changed ( Dandl et al. , 2020 ; Guidotti et al. , 2018 ) , or incorporating user preferences into what features can be changed ( Mahajan et al. , 2019 ) . Alternatively , a somewhat distinct line of work ( Pawelczyk et al. , 2020a ; Van Looveren & Klaise , 2019 ; Joshi et al. , 2019 ) also adds constraint to ensure that counterfactuals come from the data manifold . Other works still integrate causal validity into counterfactual search ( Karimi et al. , 2020 ) , or generate multiple counterfactuals at once ( Mothilal et al. , 2020 ) . We focus our analysis on the first two approaches , which we denote minimum-cost and data-support counterfactuals . We make this choice as the causal and distributional assumptions used in other counterfactual generation methods referenced are specific to a given application domain , whereas our focus is on the general properties of counterfactuals across domains . Specifically , we evaluate our results on minimum-cost counterfactuals introduced by Wachter et al . ( 2018 ) , and data-support counterfactuals from Pawelczyk et al . ( 2020a ) , and Van Looveren & Klaise ( 2019 ) . We give the full descriptions of these approaches in Sec . 5 . Counterfactual Consistency . Given two models F ( x ; θ1 ) and F ( x ; θ2 ) , a counterfactual example xc for F ( x ; θ1 ) is consistent with respect to F ( x ; θ2 ) means F ( xc ; θ1 ) =F ( xc ; θ2 ) . Following Pawelczyk et al . ( 2020b ) , we define the Invalidation Rate for counterfactuals in Def . 2 . Definition 2 ( Invalidation Rate ) . Suppose xc is a counterfactual example for x found in a model F ( x ; θ ) , we define the invalidation rate IV ( xc , Θ ) of xc with respect to a distribution Θ of trainable parameters as IV ( xc , Θ ) def =Eθ′∼ΘI [ F ( xc ; θ′ ) 6=F ( xc ; θ ) ] . Throughout this paper , we will call the model F ( x ; θ ) that creates the counterfactual the generating or base model . Recent work has investigated the consistency of counterfactual examples across similar linear and random forest models ( Pawelczyk et al. , 2020b ) . We study the invalidation rate with respect to the distribution Θ introduced by arbitrary differences in the training environment , such as random initialization and onepoint difference in the training dataset . We also assume F ( x ; θ′ ) uses the same set of hyper-parameters as chosen forF ( x ; θ ) , e.g . the number of epochs , the optimizer , the learning rate scheduling , loss functions , etc . 3 COUNTERFACTUAL INVALIDATION IN DEEP MODELS . As we demonstrate in more detail in Section 5 , counterfactual invalidation is a problem in deep networks on real data : empirically , we find that counterfactuals produce inconsistent outcomes in duplicitous deep models up to 94 % of the time . Previous work investigating the problem of counterfactual invalidation ( Pawelczyk et al. , 2020b ; Rawal et al. , 2021 ) , has pointed to increasing counterfactual cost as a potential mitigation strategy . In particular , they prove that higher cost counterfactuals will lead to lower invalidation rates in linear models in expectation ( Rawal et al. , 2021 ) , and demonstrate their relationship in a broader class of well-calibrated models ( Pawelczyk et al. , 2020b ) . While this insight provides interesting challenge to the perspective that low cost counterfactuals should be preferred , we show that cost alone is insufficient to determine which counterfactual has a greater chance of being consistent at generation time in deep models . The intuition that a larger distance between input and counterfactual will lead to lower invalidation rests on the assumption that the distance between a point x and a counterfactual xc is indicative of the distance from xc to the decision boundary , with a higher distance making xc ’ s prediction more stable under perturbations to that boundary . This holds well in a linear model , where there is only one boundary ( Rawal et al. , 2021 ) . However , in the complex decision boundaries of deep networks , going farther away from a point across the nearest boundary may lead to being closer to a different boundary . We prove that this holds even for a one-hidden-layer network by Theorem 1 . This observation shows that a counterfactual example that is farther from its origin point may be equally susceptible to invalidation as one closer to it . In fact , we show that the only models where ` p cost is universally a good heuristic for distance from a decision boundary , and therefore by the reasoning above , consistency , are linear models ( Lemma 1 ) . Theorem 1 . Suppose that H1 , H2 are decision boundaries in a piecewise-linear network F ( x ) = sign { w > 1 ReLU ( W0x ) } , and let x be an arbitrary point in its domain . If the projections of x onto the corresponding halfspace constraints ofH1 , H2 are onH1 andH2 , then there exists a point x′ such that : 1 ) d ( x′ , H2 ) =0 2 ) d ( x ′ , H2 ) < d ( x , H2 ) 3 ) d ( x , H1 ) ≤d ( x′ , H1 ) where d ( x , H∗ ) denotes the distance between x and the nearest point on a boundaryH∗ . Lemma 1 . LetH1 , H2 , F and x be defined as in Theorem 1 . If the projections of x onto the corresponding halfspace constraints ofH1 , H2 are onH1 andH2 , but there does not exist a point x′ satisfying ( 2 ) and ( 3 ) from Theorem 1 , thenH1 =H2 . Figure 1 illustrates the geometric intuition behind these results . The shaded regions of 1b correspond to two decision surfaces trained from different random seeds on the data in ( a ) . The lighter gray region denotes where the models disagree , whereas the black and white regions denote agreement . Observe that counterfactuals equally far from a decision boundary may have different invalidation behavior , as demonstrated by the counterfactuals c1 and c2 for the point x2 . Also note that as shown with x1 , being far away from one boundary may lead one to cross another one in deep models . However , for two linear models shown in Fig . 1c , being far away from the boundary is indeed a good indicator or being consistent . The discussion so far has demonstrated that there is not a strong theoretical relationship between cost and invalidation in deep models . In Section 5 , we test this claim on real data , and show that higher-cost counterfactuals can have higher invalidation rates than their lower-cost relatives ( c.f . Table 1 ) . Further , we show that the coefficient of determination ( R2 ) between cost and invalidation rate is very small ( with all but one around 0.05 ) . Thus , while cost and invalidation are certainly related—for example , it may be necessary for a stable counterfactual to be more costly than the minimum point across the boundary—cost alone is not enough to determine which one will be the most consistent in deep models . | The paper focuses on the consistency of counterfactual explanations (i.e., the rate at which counterfactual explanations transfer across different models). The authors show that the consistency of counterfactuals does not necessarily relate to cost (i.e., the distance between input and the counterfactual). They propose an alternative theory: they investigate the relationship between local Lipschitzness and consistent counterfactuals. Based on this idea, they propose a new method (SNS) for generating counterfactual examples. Empirically, they show that SNS creates more consistent counterfactuals than van Looveren et al. and Pawelczyk et al. | SP:9c113237f695ce4cf02a145d1c9aded19386a477 |
Consistent Counterfactuals for Deep Models | 1 INTRODUCTION . Deep Networks are increasingly being integrated into decision-making processes which require explanations during model deployment , from medical diagnosis to credit risk analysis ( Bakator & Radosav , 2018 ; et . al , 2017 ; Liu et al. , 2014 ; Sun et al. , 2016 ; De Fauw et al. , 2018 ; Babaev et al. , 2019 ; Addo et al. , 2018 ; Balasubramanian et al. , 2018 ; Wang & Xu , 2018 ) . Counterfactual examples ( Wachter et al. , 2018 ; Van Looveren & Klaise , 2019 ; Mahajan et al. , 2019 ; Verma et al. , 2020 ; Laugel et al. , 2018 ; Keane & Smyth , 2020 ; Ustun et al. , 2019 ; Sharma et al. , 2019 ; Poyiadzi et al. , 2020 ; Karimi et al. , 2020 ; Pawelczyk et al. , 2020a ) are often put forth as a simple and intuitive method of explaining decisions in such high-stakes contexts ( Mc Grath et al. , 2018 ; Yang et al. , 2020 ) . A counterfactual example for an input x is a related point x′ that produces a desired outcome y′ from a model . Intuitively , these explanations are intended to answer the question , “ Why did point x not receive outcome y′ ? ” either to give instructions for recourse , i.e . how an individual can change their behavior to get a different model outcome , or as a check to ensure a model ’ s decision is well-justified ( Ustun et al. , 2019 ) . Counterfactual examples are particularly popular in legal and business contexts , as they may offer a way to comply with regulations in the United States and Europe requiring explanations on high-stakes decisions ( e.g . Fair Credit Reporting Act ( FCRA ) and General Data Protection Regulation ( GDPR , 2016 ) ) , while revealing little information about the underlying model ( Barocas et al. , 2020 ; Mc Grath et al. , 2018 ) . Counterfactual examples are often viewed under the assumption that the decision system on which they will be used is static : that is , the model that creates the explanation will be the same model to which , e.g . a loan applicant soliciting recourse re-applies ( Barocas et al. , 2020 ) . However , during real model deployments in high-stakes situations , models are not constant through time : there are often retrainings due to small dataset updates , or fine-tunings to ensure consistent good behavior ( Merchant , 2020 ; pwc , 2020 ) . Thus , in order for counterfactuals to be usable in practice , they must return the same desired outcome not only for the model that generates them , but for similar models created during deployment . This paper investigates the consistency of model predictions on counterfactual examples between deep models with seemingly inconsequential differences , i.e . random seed and one-point changes in the training set . We demonstrate that some of the most common methods generating counterfactuals in deep models either are highly inconsistent between models or very costly in terms of distance from the original input . Recent work that has investigated this problem in simpler models ( Pawelczyk et al. , 2020b ) has pointed to increasing counterfactual cost , i.e . the distance between an input point and its counterfactual , as a method of increasing consistency . We show that while higher than minimal cost is necessary to achieve a stable counterfactual , cost alone is not a reliable signal to guide the search for stable counterfactuals in deep models ( Section 3 ) . Instead , we show that a model ’ s Lipschitz continuity and confidence around the counterfactual is a more reliable indicator of the counterfactual ’ s stability . Intuitively , this is due to the fact that these factors bound the extent of a models local decision boundaries will change across fine-tunings , which we prove in Section 4 . Following this result , we introduce Stable Neighbor Search ( SNS ) , which finds counterfactuals by searching for high-confidence points with small Lipschitz constants in the generating model ( Section 4 ) . Finally , we empirically demonstrate that SNS generates consistent counterfactuals while maintaining a low cost relative to other methods over several tabular datasets , e.g . Seizure and German Credit from UCI database ( Dua & Karra Taniskidou , 2017 ) , in Section 5 . In summary , our main contributions are : 1 ) we demonstrate that common counterfactual explanations can have low consistency across nearby deep models , and that cost is an insufficient signal to find consistent counterfactuals ( Theorem . 1 ) ; 2 ) to navigate this cost-consistency tradeoff , we prove that counterfactual examples in a neighborhood where the network has a small local Lipschitz constant are more consistent across changes to the last layer of weights , which suggests that such points are more stable across small changes in the training environment ( Theorem . 2 ) ; 3 ) leveraging this result , we propose SNS as a way to generate consistent counterfactual explanations ( Def . 5 ) ; 4 ) we empirically demonstrate the effectiveness of SNS in generating consistent and low-cost counterfactual explanations ( Table 1 ) . More broadly , this paper further develops a connection between the geometry of deep models and the consistency of counterfactual examples . When considered alongside related findings that focus on attribution methods , our work adds to the perspective that good explanations require good models to begin with ( Croce et al. , 2019 ; Wang et al. , 2020 ; Dombrowski et al. , 2019 ; Simonyan et al. , 2013 ; Sundararajan et al. , 2017 ) . 2 BACKGROUND . Notation . We begin with notation , preliminaries , and definitions . Let F ( x ; θ ) =argmaxifi ( x ; θ ) be a deep network where fi denotes the logit output for the i-th class and θ is the vector of trainable parameters . If F ( x ; θ ) ∈ { 0,1 } , there is only one logit output so we write f . Throughout the paper we assume F is piece-wise linear such that all the activation functions are ReLUs . We use ||x||p to denote the ` p norm of a vector x andBp ( x , ) def = { x′|||x′−x||p≤ , x′∈Rd } to denote a norm-bounded ball around x. Counterfactual Examples . We introduce some general notation to unify the definition of a counterfactual example across various approaches with differing desiderata . In the most general sense , a counterfactual example for an input x is an example xc that receives the different , often targeted , prediction while minimizing a user-defined quantity of interest ( QoI ) ( see Def . 1 ) : for example , a counterfactual explanation for a rejected loan application is a related hypothetical application that was accepted . We refer to the point x requiring a counterfactual example the origin point or input interchangeably . We note that there is a different definition of “ counterfactual ” widely used in the causality literature , where a counterfactual is given by an intervention on a causal model that is assumed to generate data observations ( Pearl , 2009 ) . This is a case of overlapping terminology , and is orthogonal to this work . We do not consider causality in this paper . Definition 1 ( Counterfactual Example ) . Given a model F ( x ) , an input x , a desired outcome class c 6=F ( x ; θ ) , and a user-defined quantity of interest q , a counterfactual example xc for x is defined as xc def = argminF ( x′ ; θ ) =cq ( x ′ , x ) where the cost of xc is defined as ||x−xc||p . The majority of counterfactual generation algorithms minimize of qlow ( x , x′ ) def = ||x−x′||p , potentially along with some constraints , to encourage low-cost counterfactuals ( Wachter et al. , 2018 ) . Some common variations include ensuring that counterfactuals are attainable , i.e . not changing features that can not be changed ( e.g . sex , age ) due to domain constraints ( Ustun et al. , 2019 ; Lash et al. , 2017 ) , ensuring sparsity , so that fewer features are changed ( Dandl et al. , 2020 ; Guidotti et al. , 2018 ) , or incorporating user preferences into what features can be changed ( Mahajan et al. , 2019 ) . Alternatively , a somewhat distinct line of work ( Pawelczyk et al. , 2020a ; Van Looveren & Klaise , 2019 ; Joshi et al. , 2019 ) also adds constraint to ensure that counterfactuals come from the data manifold . Other works still integrate causal validity into counterfactual search ( Karimi et al. , 2020 ) , or generate multiple counterfactuals at once ( Mothilal et al. , 2020 ) . We focus our analysis on the first two approaches , which we denote minimum-cost and data-support counterfactuals . We make this choice as the causal and distributional assumptions used in other counterfactual generation methods referenced are specific to a given application domain , whereas our focus is on the general properties of counterfactuals across domains . Specifically , we evaluate our results on minimum-cost counterfactuals introduced by Wachter et al . ( 2018 ) , and data-support counterfactuals from Pawelczyk et al . ( 2020a ) , and Van Looveren & Klaise ( 2019 ) . We give the full descriptions of these approaches in Sec . 5 . Counterfactual Consistency . Given two models F ( x ; θ1 ) and F ( x ; θ2 ) , a counterfactual example xc for F ( x ; θ1 ) is consistent with respect to F ( x ; θ2 ) means F ( xc ; θ1 ) =F ( xc ; θ2 ) . Following Pawelczyk et al . ( 2020b ) , we define the Invalidation Rate for counterfactuals in Def . 2 . Definition 2 ( Invalidation Rate ) . Suppose xc is a counterfactual example for x found in a model F ( x ; θ ) , we define the invalidation rate IV ( xc , Θ ) of xc with respect to a distribution Θ of trainable parameters as IV ( xc , Θ ) def =Eθ′∼ΘI [ F ( xc ; θ′ ) 6=F ( xc ; θ ) ] . Throughout this paper , we will call the model F ( x ; θ ) that creates the counterfactual the generating or base model . Recent work has investigated the consistency of counterfactual examples across similar linear and random forest models ( Pawelczyk et al. , 2020b ) . We study the invalidation rate with respect to the distribution Θ introduced by arbitrary differences in the training environment , such as random initialization and onepoint difference in the training dataset . We also assume F ( x ; θ′ ) uses the same set of hyper-parameters as chosen forF ( x ; θ ) , e.g . the number of epochs , the optimizer , the learning rate scheduling , loss functions , etc . 3 COUNTERFACTUAL INVALIDATION IN DEEP MODELS . As we demonstrate in more detail in Section 5 , counterfactual invalidation is a problem in deep networks on real data : empirically , we find that counterfactuals produce inconsistent outcomes in duplicitous deep models up to 94 % of the time . Previous work investigating the problem of counterfactual invalidation ( Pawelczyk et al. , 2020b ; Rawal et al. , 2021 ) , has pointed to increasing counterfactual cost as a potential mitigation strategy . In particular , they prove that higher cost counterfactuals will lead to lower invalidation rates in linear models in expectation ( Rawal et al. , 2021 ) , and demonstrate their relationship in a broader class of well-calibrated models ( Pawelczyk et al. , 2020b ) . While this insight provides interesting challenge to the perspective that low cost counterfactuals should be preferred , we show that cost alone is insufficient to determine which counterfactual has a greater chance of being consistent at generation time in deep models . The intuition that a larger distance between input and counterfactual will lead to lower invalidation rests on the assumption that the distance between a point x and a counterfactual xc is indicative of the distance from xc to the decision boundary , with a higher distance making xc ’ s prediction more stable under perturbations to that boundary . This holds well in a linear model , where there is only one boundary ( Rawal et al. , 2021 ) . However , in the complex decision boundaries of deep networks , going farther away from a point across the nearest boundary may lead to being closer to a different boundary . We prove that this holds even for a one-hidden-layer network by Theorem 1 . This observation shows that a counterfactual example that is farther from its origin point may be equally susceptible to invalidation as one closer to it . In fact , we show that the only models where ` p cost is universally a good heuristic for distance from a decision boundary , and therefore by the reasoning above , consistency , are linear models ( Lemma 1 ) . Theorem 1 . Suppose that H1 , H2 are decision boundaries in a piecewise-linear network F ( x ) = sign { w > 1 ReLU ( W0x ) } , and let x be an arbitrary point in its domain . If the projections of x onto the corresponding halfspace constraints ofH1 , H2 are onH1 andH2 , then there exists a point x′ such that : 1 ) d ( x′ , H2 ) =0 2 ) d ( x ′ , H2 ) < d ( x , H2 ) 3 ) d ( x , H1 ) ≤d ( x′ , H1 ) where d ( x , H∗ ) denotes the distance between x and the nearest point on a boundaryH∗ . Lemma 1 . LetH1 , H2 , F and x be defined as in Theorem 1 . If the projections of x onto the corresponding halfspace constraints ofH1 , H2 are onH1 andH2 , but there does not exist a point x′ satisfying ( 2 ) and ( 3 ) from Theorem 1 , thenH1 =H2 . Figure 1 illustrates the geometric intuition behind these results . The shaded regions of 1b correspond to two decision surfaces trained from different random seeds on the data in ( a ) . The lighter gray region denotes where the models disagree , whereas the black and white regions denote agreement . Observe that counterfactuals equally far from a decision boundary may have different invalidation behavior , as demonstrated by the counterfactuals c1 and c2 for the point x2 . Also note that as shown with x1 , being far away from one boundary may lead one to cross another one in deep models . However , for two linear models shown in Fig . 1c , being far away from the boundary is indeed a good indicator or being consistent . The discussion so far has demonstrated that there is not a strong theoretical relationship between cost and invalidation in deep models . In Section 5 , we test this claim on real data , and show that higher-cost counterfactuals can have higher invalidation rates than their lower-cost relatives ( c.f . Table 1 ) . Further , we show that the coefficient of determination ( R2 ) between cost and invalidation rate is very small ( with all but one around 0.05 ) . Thus , while cost and invalidation are certainly related—for example , it may be necessary for a stable counterfactual to be more costly than the minimum point across the boundary—cost alone is not enough to determine which one will be the most consistent in deep models . | This paper aims to generate valid counterfactual examples (CFE) in a dynamic setting where the model can be retrained in the test time. The goal is to minimize the invalidation rate. Different from previous work, they focus on DNNs. Through a series of theoretical analysis, they propose to maximize the confidence and minimize the Lipschitz constant under the constraint that the CFE x' and x share the same predicted label. Experiments on tabular datasets show the proposed method reduces the invalidation rate a lot. | SP:9c113237f695ce4cf02a145d1c9aded19386a477 |
Consistent Counterfactuals for Deep Models | 1 INTRODUCTION . Deep Networks are increasingly being integrated into decision-making processes which require explanations during model deployment , from medical diagnosis to credit risk analysis ( Bakator & Radosav , 2018 ; et . al , 2017 ; Liu et al. , 2014 ; Sun et al. , 2016 ; De Fauw et al. , 2018 ; Babaev et al. , 2019 ; Addo et al. , 2018 ; Balasubramanian et al. , 2018 ; Wang & Xu , 2018 ) . Counterfactual examples ( Wachter et al. , 2018 ; Van Looveren & Klaise , 2019 ; Mahajan et al. , 2019 ; Verma et al. , 2020 ; Laugel et al. , 2018 ; Keane & Smyth , 2020 ; Ustun et al. , 2019 ; Sharma et al. , 2019 ; Poyiadzi et al. , 2020 ; Karimi et al. , 2020 ; Pawelczyk et al. , 2020a ) are often put forth as a simple and intuitive method of explaining decisions in such high-stakes contexts ( Mc Grath et al. , 2018 ; Yang et al. , 2020 ) . A counterfactual example for an input x is a related point x′ that produces a desired outcome y′ from a model . Intuitively , these explanations are intended to answer the question , “ Why did point x not receive outcome y′ ? ” either to give instructions for recourse , i.e . how an individual can change their behavior to get a different model outcome , or as a check to ensure a model ’ s decision is well-justified ( Ustun et al. , 2019 ) . Counterfactual examples are particularly popular in legal and business contexts , as they may offer a way to comply with regulations in the United States and Europe requiring explanations on high-stakes decisions ( e.g . Fair Credit Reporting Act ( FCRA ) and General Data Protection Regulation ( GDPR , 2016 ) ) , while revealing little information about the underlying model ( Barocas et al. , 2020 ; Mc Grath et al. , 2018 ) . Counterfactual examples are often viewed under the assumption that the decision system on which they will be used is static : that is , the model that creates the explanation will be the same model to which , e.g . a loan applicant soliciting recourse re-applies ( Barocas et al. , 2020 ) . However , during real model deployments in high-stakes situations , models are not constant through time : there are often retrainings due to small dataset updates , or fine-tunings to ensure consistent good behavior ( Merchant , 2020 ; pwc , 2020 ) . Thus , in order for counterfactuals to be usable in practice , they must return the same desired outcome not only for the model that generates them , but for similar models created during deployment . This paper investigates the consistency of model predictions on counterfactual examples between deep models with seemingly inconsequential differences , i.e . random seed and one-point changes in the training set . We demonstrate that some of the most common methods generating counterfactuals in deep models either are highly inconsistent between models or very costly in terms of distance from the original input . Recent work that has investigated this problem in simpler models ( Pawelczyk et al. , 2020b ) has pointed to increasing counterfactual cost , i.e . the distance between an input point and its counterfactual , as a method of increasing consistency . We show that while higher than minimal cost is necessary to achieve a stable counterfactual , cost alone is not a reliable signal to guide the search for stable counterfactuals in deep models ( Section 3 ) . Instead , we show that a model ’ s Lipschitz continuity and confidence around the counterfactual is a more reliable indicator of the counterfactual ’ s stability . Intuitively , this is due to the fact that these factors bound the extent of a models local decision boundaries will change across fine-tunings , which we prove in Section 4 . Following this result , we introduce Stable Neighbor Search ( SNS ) , which finds counterfactuals by searching for high-confidence points with small Lipschitz constants in the generating model ( Section 4 ) . Finally , we empirically demonstrate that SNS generates consistent counterfactuals while maintaining a low cost relative to other methods over several tabular datasets , e.g . Seizure and German Credit from UCI database ( Dua & Karra Taniskidou , 2017 ) , in Section 5 . In summary , our main contributions are : 1 ) we demonstrate that common counterfactual explanations can have low consistency across nearby deep models , and that cost is an insufficient signal to find consistent counterfactuals ( Theorem . 1 ) ; 2 ) to navigate this cost-consistency tradeoff , we prove that counterfactual examples in a neighborhood where the network has a small local Lipschitz constant are more consistent across changes to the last layer of weights , which suggests that such points are more stable across small changes in the training environment ( Theorem . 2 ) ; 3 ) leveraging this result , we propose SNS as a way to generate consistent counterfactual explanations ( Def . 5 ) ; 4 ) we empirically demonstrate the effectiveness of SNS in generating consistent and low-cost counterfactual explanations ( Table 1 ) . More broadly , this paper further develops a connection between the geometry of deep models and the consistency of counterfactual examples . When considered alongside related findings that focus on attribution methods , our work adds to the perspective that good explanations require good models to begin with ( Croce et al. , 2019 ; Wang et al. , 2020 ; Dombrowski et al. , 2019 ; Simonyan et al. , 2013 ; Sundararajan et al. , 2017 ) . 2 BACKGROUND . Notation . We begin with notation , preliminaries , and definitions . Let F ( x ; θ ) =argmaxifi ( x ; θ ) be a deep network where fi denotes the logit output for the i-th class and θ is the vector of trainable parameters . If F ( x ; θ ) ∈ { 0,1 } , there is only one logit output so we write f . Throughout the paper we assume F is piece-wise linear such that all the activation functions are ReLUs . We use ||x||p to denote the ` p norm of a vector x andBp ( x , ) def = { x′|||x′−x||p≤ , x′∈Rd } to denote a norm-bounded ball around x. Counterfactual Examples . We introduce some general notation to unify the definition of a counterfactual example across various approaches with differing desiderata . In the most general sense , a counterfactual example for an input x is an example xc that receives the different , often targeted , prediction while minimizing a user-defined quantity of interest ( QoI ) ( see Def . 1 ) : for example , a counterfactual explanation for a rejected loan application is a related hypothetical application that was accepted . We refer to the point x requiring a counterfactual example the origin point or input interchangeably . We note that there is a different definition of “ counterfactual ” widely used in the causality literature , where a counterfactual is given by an intervention on a causal model that is assumed to generate data observations ( Pearl , 2009 ) . This is a case of overlapping terminology , and is orthogonal to this work . We do not consider causality in this paper . Definition 1 ( Counterfactual Example ) . Given a model F ( x ) , an input x , a desired outcome class c 6=F ( x ; θ ) , and a user-defined quantity of interest q , a counterfactual example xc for x is defined as xc def = argminF ( x′ ; θ ) =cq ( x ′ , x ) where the cost of xc is defined as ||x−xc||p . The majority of counterfactual generation algorithms minimize of qlow ( x , x′ ) def = ||x−x′||p , potentially along with some constraints , to encourage low-cost counterfactuals ( Wachter et al. , 2018 ) . Some common variations include ensuring that counterfactuals are attainable , i.e . not changing features that can not be changed ( e.g . sex , age ) due to domain constraints ( Ustun et al. , 2019 ; Lash et al. , 2017 ) , ensuring sparsity , so that fewer features are changed ( Dandl et al. , 2020 ; Guidotti et al. , 2018 ) , or incorporating user preferences into what features can be changed ( Mahajan et al. , 2019 ) . Alternatively , a somewhat distinct line of work ( Pawelczyk et al. , 2020a ; Van Looveren & Klaise , 2019 ; Joshi et al. , 2019 ) also adds constraint to ensure that counterfactuals come from the data manifold . Other works still integrate causal validity into counterfactual search ( Karimi et al. , 2020 ) , or generate multiple counterfactuals at once ( Mothilal et al. , 2020 ) . We focus our analysis on the first two approaches , which we denote minimum-cost and data-support counterfactuals . We make this choice as the causal and distributional assumptions used in other counterfactual generation methods referenced are specific to a given application domain , whereas our focus is on the general properties of counterfactuals across domains . Specifically , we evaluate our results on minimum-cost counterfactuals introduced by Wachter et al . ( 2018 ) , and data-support counterfactuals from Pawelczyk et al . ( 2020a ) , and Van Looveren & Klaise ( 2019 ) . We give the full descriptions of these approaches in Sec . 5 . Counterfactual Consistency . Given two models F ( x ; θ1 ) and F ( x ; θ2 ) , a counterfactual example xc for F ( x ; θ1 ) is consistent with respect to F ( x ; θ2 ) means F ( xc ; θ1 ) =F ( xc ; θ2 ) . Following Pawelczyk et al . ( 2020b ) , we define the Invalidation Rate for counterfactuals in Def . 2 . Definition 2 ( Invalidation Rate ) . Suppose xc is a counterfactual example for x found in a model F ( x ; θ ) , we define the invalidation rate IV ( xc , Θ ) of xc with respect to a distribution Θ of trainable parameters as IV ( xc , Θ ) def =Eθ′∼ΘI [ F ( xc ; θ′ ) 6=F ( xc ; θ ) ] . Throughout this paper , we will call the model F ( x ; θ ) that creates the counterfactual the generating or base model . Recent work has investigated the consistency of counterfactual examples across similar linear and random forest models ( Pawelczyk et al. , 2020b ) . We study the invalidation rate with respect to the distribution Θ introduced by arbitrary differences in the training environment , such as random initialization and onepoint difference in the training dataset . We also assume F ( x ; θ′ ) uses the same set of hyper-parameters as chosen forF ( x ; θ ) , e.g . the number of epochs , the optimizer , the learning rate scheduling , loss functions , etc . 3 COUNTERFACTUAL INVALIDATION IN DEEP MODELS . As we demonstrate in more detail in Section 5 , counterfactual invalidation is a problem in deep networks on real data : empirically , we find that counterfactuals produce inconsistent outcomes in duplicitous deep models up to 94 % of the time . Previous work investigating the problem of counterfactual invalidation ( Pawelczyk et al. , 2020b ; Rawal et al. , 2021 ) , has pointed to increasing counterfactual cost as a potential mitigation strategy . In particular , they prove that higher cost counterfactuals will lead to lower invalidation rates in linear models in expectation ( Rawal et al. , 2021 ) , and demonstrate their relationship in a broader class of well-calibrated models ( Pawelczyk et al. , 2020b ) . While this insight provides interesting challenge to the perspective that low cost counterfactuals should be preferred , we show that cost alone is insufficient to determine which counterfactual has a greater chance of being consistent at generation time in deep models . The intuition that a larger distance between input and counterfactual will lead to lower invalidation rests on the assumption that the distance between a point x and a counterfactual xc is indicative of the distance from xc to the decision boundary , with a higher distance making xc ’ s prediction more stable under perturbations to that boundary . This holds well in a linear model , where there is only one boundary ( Rawal et al. , 2021 ) . However , in the complex decision boundaries of deep networks , going farther away from a point across the nearest boundary may lead to being closer to a different boundary . We prove that this holds even for a one-hidden-layer network by Theorem 1 . This observation shows that a counterfactual example that is farther from its origin point may be equally susceptible to invalidation as one closer to it . In fact , we show that the only models where ` p cost is universally a good heuristic for distance from a decision boundary , and therefore by the reasoning above , consistency , are linear models ( Lemma 1 ) . Theorem 1 . Suppose that H1 , H2 are decision boundaries in a piecewise-linear network F ( x ) = sign { w > 1 ReLU ( W0x ) } , and let x be an arbitrary point in its domain . If the projections of x onto the corresponding halfspace constraints ofH1 , H2 are onH1 andH2 , then there exists a point x′ such that : 1 ) d ( x′ , H2 ) =0 2 ) d ( x ′ , H2 ) < d ( x , H2 ) 3 ) d ( x , H1 ) ≤d ( x′ , H1 ) where d ( x , H∗ ) denotes the distance between x and the nearest point on a boundaryH∗ . Lemma 1 . LetH1 , H2 , F and x be defined as in Theorem 1 . If the projections of x onto the corresponding halfspace constraints ofH1 , H2 are onH1 andH2 , but there does not exist a point x′ satisfying ( 2 ) and ( 3 ) from Theorem 1 , thenH1 =H2 . Figure 1 illustrates the geometric intuition behind these results . The shaded regions of 1b correspond to two decision surfaces trained from different random seeds on the data in ( a ) . The lighter gray region denotes where the models disagree , whereas the black and white regions denote agreement . Observe that counterfactuals equally far from a decision boundary may have different invalidation behavior , as demonstrated by the counterfactuals c1 and c2 for the point x2 . Also note that as shown with x1 , being far away from one boundary may lead one to cross another one in deep models . However , for two linear models shown in Fig . 1c , being far away from the boundary is indeed a good indicator or being consistent . The discussion so far has demonstrated that there is not a strong theoretical relationship between cost and invalidation in deep models . In Section 5 , we test this claim on real data , and show that higher-cost counterfactuals can have higher invalidation rates than their lower-cost relatives ( c.f . Table 1 ) . Further , we show that the coefficient of determination ( R2 ) between cost and invalidation rate is very small ( with all but one around 0.05 ) . Thus , while cost and invalidation are certainly related—for example , it may be necessary for a stable counterfactual to be more costly than the minimum point across the boundary—cost alone is not enough to determine which one will be the most consistent in deep models . | The authors study how counterfactual explanations of a Deep Neural Network change if the initial training settings are slightly changed. They find that even small changes in the initial training settings lead to huge differences in the counterfactual explanations. They propose a method for computing more robust (i.e. consistent) counterfactual explanations. | SP:9c113237f695ce4cf02a145d1c9aded19386a477 |
Adversarial Support Alignment | 1 INTRODUCTION . Learning tasks often involve estimating properties of distributions from samples or aligning such characteristics across domains . We can align full distributions ( adversarial domain alignment ) , certain statistics ( canonical correlation analysis ) , or the support of distributions ( this paper ) . Much of the recent work has focused on full distributional alignment , for good reasons . In domain adaptation , motivated by theoretical results ( Ben-David et al. , 2007 ; 2010 ) , a series of papers ( Ajakan et al. , 2014 ; Ganin & Lempitsky , 2015 ; Ganin et al. , 2016 ; Tzeng et al. , 2017 ; Shen et al. , 2018 ; Pei et al. , 2018 ; Zhao et al. , 2018 ; Li et al. , 2018a ; Wang et al. , 2021 ; Kumar et al. , 2018 ) seek to align distributions of representations between domains , and utilize a shared classifier on the aligned representation space . Alignment in distributions implies alignment in supports . However , when there are additional objectives/constraints to satisfy , the minimizer for a distribution alignment objective does not necessarily minimize a support alignment objective . Example in Figure 1 demonstrates the qualitative distinction between two minimizers when distribution alignment is not achievable . The distribution alignment objective prefers to keep supports unaligned even if support alignment is achievable . Recent works ( Zhao et al. , 2019 ; Li et al. , 2020 ; Tan et al. , 2020 ; Wu et al. , 2019b ; Tachet des Combes et al. , 2020 ) have demonstrated that a shift in label distributions between source and target leads to a characterizable performance drop when the representations are forced into a distribution alignment . The error bound in Johansson et al . ( 2019 ) suggests aligning the supports of representations instead . In this paper , we focus on distribution support as the key characteristic to align . We introduce a support divergence to measure the support mismatch and algorithms to optimize such alignment . We also position our approach in the spectrum of other alignment methods . Our contributions are as follows ( all proofs can be found in Appendix A ) : 1 . In Section 2.1 , we measure the differences between supports of distributions . Building on the Hausdorff distance , we introduce a novel support divergence better suited for optimization , which we refer to as symmetric support difference ( SSD ) divergence . 2 . In Section 2.2 , we identify an important property of the discriminator trained for Jensen–Shannon divergence : support differences in the original space of interest are “ preserved ” as support differences in its one-dimensional output space . 3 . In Section 3 , we present our practical algorithm for support alignment , Adversarial Support Alignment ( ASA ) . Essentially , based on the analysis presented in Section 2.2 , our solution is to align supports in the discriminator 1D space , which is computationally efficient . 4 . In Section 4 , we place different notions of alignment – distribution alignment , relaxed distribution alignment and support alignment – within a coherent spectrum from the point of view of optimal transport , characterizing their relationships , both theoretically in terms of their objectives and practically in terms of their algorithms . 5 . In Section 5 , we demonstrate the theoretical effectiveness of support alignment in practice for domain adaptation setting . Compared to other alignment-based baselines , our proposed method is more robust against shifts in label distributions . 2 SSD DIVERGENCE AND SUPPORT ALIGNMENT . Notation . We consider an Euclidean space X = Rn equipped with Borel sigma algebra B and a metric d : X ×X → R ( e.g . Euclidean distance ) . Let P be the set of probability measures on ( X , B ) . For p ∈ P , the support of p is denoted by supp ( p ) and is defined as the smallest closed set X ⊆ X such that p ( X ) = 1. f♯p denotes the pushforward measure of p induced by a measurable mapping f . The distance between a point x ∈ X and a subset Y ⊆ X is defined as d ( x , Y ) = infy∈Y d ( x , y ) . The symmetric difference of two sets A and B is defined as A△B = ( A \B ) ∪ ( B \A ) . 2.1 DIFFERENCE BETWEEN SUPPORTS . To align the supports of distributions , we first evaluate how different they are . Similar to distribution divergences like Jensen–Shannon divergence and Wasserstein distance , we introduce a notion of support divergence . A support divergence1 between two distributions in P is a function DS ( · , · ) : P × P → R satisfying : 1 ) DS ( p , q ) ≥ 0 for all p , q ∈ P ; 2 ) DS ( p , q ) = 0 iff supp ( p ) = supp ( q ) . While a distribution divergence is sensitive to both density and support differences , a support divergence only needs to detect mismatches in supports , which are subsets of the metric space X . An example of a distance between subsets of a metric space is the Hausdorff distance : dH ( X , Y ) = max { supx∈X d ( x , Y ) , supy∈Y d ( y , X ) } . Since it depends only on the greatest distance between a point and a set , minimizing this objective for alignment only provides signal to a single point . To make the optimization less sparse , we consider all points that violate the support alignment criterion and introduce symmetric support difference ( SSD ) divergence : D△ ( p , q ) = Ep [ d ( x , supp ( q ) ) ] + Eq [ d ( x , supp ( p ) ) ] . ( 1 ) Proposition 2.1 . SSD divergence D△ ( p , q ) is a support divergence . 1It is not technically a divergence on the space of distributions , since DS ( p , q ) = 0 does not imply p = q . 2.2 SUPPORT ALIGNMENT IN ONE-DIMENSIONAL SPACE . Goodfellow et al . ( 2014 ) showed that the log-loss discriminator f : X → [ 0 , 1 ] , trained to distinguish samples from distributions p and q ( supf Ex∼p [ log f ( x ) ] + Ex∼q [ log ( 1− f ( x ) ) ] ) can be used to estimate the Jensen–Shannon divergence between p and q . The closed form maximizer f∗ is f∗ ( x ) = p ( x ) p ( x ) + q ( x ) , ∀x ∈ supp ( p ) ∪ supp ( q ) . ( 2 ) Note that for a point x /∈ supp ( p ) ∪ supp ( q ) the value of f∗ ( x ) can be set to an arbitrary value in [ 0 , 1 ] , since the log-loss does not depend on f ( x ) for such x . Using ( 2 ) , we can establish a connection between the pushforward distributions f∗♯p and f ∗ ♯q . Proposition 2.2 . Let f∗ be the optimal log-loss discriminator ( 2 ) between p and q , and let τp and τq be the probability density functions of the pushforward measures f∗♯p and f ∗ ♯q respectively 2 . Then , τp ( a ) τp ( a ) + τq ( a ) = a , ∀a ∈ supp ( τp ) ∪ supp ( τq ) . ( 3 ) Intuitively this proposition states the following . If the optimal discriminator f∗ maps x ∈ X to a ∈ [ 0 , 1 ] , i.e . f∗ ( x ) = a , a directly corresponds to the ratio of densities in not only the original space a = p ( x ) / ( p ( x ) + q ( x ) ) , but also the 1D discriminator output space a = τp ( a ) / ( τp ( a ) + τq ( a ) ) , which leads to the fact that p ( x ) / ( p ( x ) + q ( x ) ) = f∗ ( x ) = a = τp ( a ) / ( τp ( a ) + τq ( a ) ) . Using Proposition 2.2 , we can prove our main theorem , which characterizes the ability of the log-loss discriminator to identify support misalignment . Theorem 2.1 . Let f∗ be the optimal discriminator ( 2 ) between p and q . Then , D△ ( p , q ) = 0 if and only if D△ ( f∗♯p , f∗♯q ) = 0 . Proof sketch . We observe that for any point x ∈ supp ( p ) \ supp ( q ) we have f∗ ( x ) = 1 and , by Proposition 2.2 , τp ( 1 ) > 0 and τq ( 1 ) = 0 . Repeating the same argument in reverse direction we see that supp ( p ) \ supp ( q ) ̸= ∅ if and only if 1 ∈ supp ( f∗♯p ) \ supp ( f∗♯q ) . Similarly , supp ( q ) \ supp ( p ) ̸= ∅ if and only if 0 ∈ supp ( f∗♯q ) \ supp ( f∗♯p ) . In other words , f∗ outputs the extreme values 1 and 0 if and only if the supports of p and q are misaligned and each of this extreme value belongs to the support of only one of the pushforward distributions supp ( f∗♯p ) or supp ( f ∗ ♯q ) . We conclude this section with two technical remarks on Theorem 2.1 . Remark 2.1.1 . The result of Theorem 2.1 does not necessarily hold for other types of discriminator . For instance , the dual Wasserstein discriminator ( Arjovsky et al. , 2017 ; Gulrajani et al. , 2017 ) does not always highlight the support difference in the original space as a support difference in the discriminator output space . This observation is formaly stated in the following proposition . Proposition 2.3 . Let f⋆W be the optimal solution of supf : Lip ( f ) ≤1 Ex∼p [ f ( x ) ] − Ex∼q [ f ( x ) ] , where Lip ( f ) is the Lipschitz constant of f . There exist distributions p and q such that supp ( p ) ̸= supp ( q ) but supp ( f⋆W ♯p ) = supp ( f ⋆ W ♯q ) . Remark 2.1.2 . We note that in practice the discriminator is typically parameterized as f ( x ) = σ ( g ( x ) ) , where g : X → R is realized by a deep neural network and σ ( x ) = ( 1 + e−x ) −1 is the sigmoid function . The optimization problem for g is inf g Ex∼p [ log ( 1 + e−g ( x ) ) ] + Ex∼q [ log ( 1 + eg ( x ) ) ] , ( 4 ) and the optimal solution is g∗ ( x ) = log p ( x ) − log q ( x ) . Naturally the result of Theorem 2.1 holds for discriminator g∗ , since g∗ ( x ) = σ−1 ( f∗ ( x ) ) and σ is a bijective mapping from ( −∞ , ∞ ) to [ 0 , 1 ] . The main difference of g∗ from f∗ is that in the case of supp ( p ) ̸= supp ( q ) , optimization of the log-loss makes the values g∗ ( x ) infinite ( ±∞ ) for x ∈ supp ( p ) △ supp ( q ) . 2In order to simplify the argument , we assume that all distributions p , q , f∗♯p , f ∗ ♯q have PDFs . | The authors propose a weak alignment of distributions consisting in equalizing their supports. They justify this choice by the recent advancements in Domain Adaptation that show the drawbacks of a strict alignment of marginal distributions. A distance between supports is defined as a modification of the Hausdorff distance between sets. The support divergence is further proven to be a limit case of a previously proposed weak Wasserstein distance requiring only the boundedness of the density ratio, thus defining a continuum of relaxations of divergences. For all of the divergences in this continuum, a theoretical result shows the possibility of reducing the original problem of computing the divergence to unidimensional distributions, obtained via a domain discriminator minimizing a Jensen-Shannon divergence. The theoretical findings are used to propose an algorithm that is tested in the class imbalanced domain adaptation setting, highlighting the interest of the approach. | SP:178a08461d9d2b09b0c845d2a76908eb31d874a3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.