FasTrCaps: An Integrated Framework for Fast yet Accurate Training of Capsule Networks

Alberto Marchisio, Beatrice Bussolino, Alessio Colucci, Muhammad Abdullah Hanif, Maurizio Martina +2 more
5/24/2019
cs.LGstat.ML

Official code: Alexei95/FasTrCaps (2 stars, Python, MIT, last commit 2020-06-18).

Abstract

Recently, Capsule Networks (CapsNets) have shown improved performance compared to the traditional Convolutional Neural Networks (CNNs), by encoding and preserving spatial relationships between the detected features in a better way. This is achieved through the so-called Capsules (i.e., groups of neurons) that encode both the instantiation probability and the spatial information.

Show full abstract

However, one of the major hurdles in the wide adoption of CapsNets is their gigantic training time, which is primarily due to the relatively higher complexity of their new constituting elements that are different from CNNs. In this paper, we implement different optimizations in the training loop of the CapsNets, and investigate how these optimizations affect their training speed and the accuracy. Towards this, we propose a novel framework FasTrCaps that integrates multiple lightweight optimizations and a novel learning rate policy called WarmAdaBatch (that jointly performs warm restarts and adaptive batch size), and steers them in an appropriate way to provide high training-loop speedup at minimal accuracy loss. We also propose weight sharing for capsule layers. The goal is to reduce the hardware requirements of CapsNets by removing unused/redundant connections and capsules, while keeping high accuracy through tests of different learning rate policies and batch sizes. We demonstrate that one of the solutions generated by the FasTrCaps framework can achieve 58.6% reduction in the training time, while preserving the accuracy (even 0.12% accuracy improvement for the MNIST dataset), compared to the CapsNet by Google Brain. The Pareto-optimal solutions generated by FasTrCaps can be leveraged to realize trade-offs between training time and achieved accuracy. We have open-sourced our framework on https://github.com/Alexei95/FasTrCaps.

View on arXivView PDF

Code Implementations(1)

Alexei95/FasTrCapsOfficial100%
MIT

Source code for the paper "FasTrCaps: An Integrated Framework for Fast yet Accurate Training of Capsule Networks", to appear at IJCNN2020

20PythonOct 30, 20196 years agoMIT

Similar Papers

Cite this paper

@article{marchisio2019fastrcaps,
  title  = {FasTrCaps: An Integrated Framework for Fast yet Accurate Training of Capsule Networks},
  author = {Alberto Marchisio and Beatrice Bussolino and Alessio Colucci and Muhammad Abdullah Hanif and Maurizio Martina and Guido Masera and Muhammad Shafique},
  year   = {2019},
  eprint = {1905.10142},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1905.10142}
}

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/1905.10142.svg)](https://codeofpaper.com/paper/1905.10142)

Discussion