Hamiltonian Deep Neural Networks Guaranteeing Non-vanishing Gradients by Design

Clara Lucía Galimberti, Luca Furieri, Liang Xu, Giancarlo Ferrari-Trecate
5/27/2021
60 citations
cs.LGeess.SY

Official code: DecodEPFL/HamiltonianNet (23 stars, Python, CC-BY-4.0, last commit 2022-01-17).

Abstract

Deep Neural Networks (DNNs) training can be difficult due to vanishing and exploding gradients during weight optimization through backpropagation. To address this problem, we propose a general class of Hamiltonian DNNs (H-DNNs) that stem from the discretization of continuous-time Hamiltonian systems and include several existing DNN architectures based on ordinary differential equations.

Show full abstract

Our main result is that a broad set of H-DNNs ensures non-vanishing gradients by design for an arbitrary network depth. This is obtained by proving that, using a semi-implicit Euler discretization scheme, the backward sensitivity matrices involved in gradient computations are symplectic. We also provide an upper-bound to the magnitude of sensitivity matrices and show that exploding gradients can be controlled through regularization. Finally, we enable distributed implementations of backward and forward propagation algorithms in H-DNNs by characterizing appropriate sparsity constraints on the weight matrices. The good performance of H-DNNs is demonstrated on benchmark classification problems, including image classification with the MNIST dataset.

View on arXivView PDF

Code Implementations(1)

CC-BY-4.0

PyTorch implementation of Hamiltonian deep neural networks.

234PythonMay 27, 20214 years agoCC-BY-4.0

Similar Papers

Cite this paper

@article{galimberti2021hamiltonian,
  title  = {Hamiltonian Deep Neural Networks Guaranteeing Non-vanishing Gradients by Design},
  author = {Clara Lucía Galimberti and Luca Furieri and Liang Xu and Giancarlo Ferrari-Trecate},
  year   = {2021},
  eprint = {2105.13205},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2105.13205}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2105.13205.svg)](https://codeofpaper.com/paper/2105.13205)

Discussion