Binarized Neural Networks
- Neural Networks with binarized weights and activations at runtime.
Group Members
- Arvind Sridhar: asridh13
- Nicholas Masi: nmasi
Introduction
This paper from 2016 introduces the original idea behind BNNs (“neural networks with binary weights and activations at run-time”) to decrease space usage and runtime of models while also increasing the power efficiency. We are re-implementing this paper, applying BNN’s to new datasets, inspired by the assignments from this class, with narrowed goals of improving runtime and memory usage. Our project will tackle a number of different kinds of problems following what we’ve covered in class, with the main goal of improving the runtime and memory usage of models in both training and testing while maintaining relatively high accuracy. We will attempt to use the TensorFlow Profiler to track resource consumption of our models, and use the test() functions we’ve already written to see the accuracy of our models.
Related Work
- This link is a blog post about the paper that helped us conceptualize BNNs and how they could be applicable to the course assignments that we’ve implemented thus far.
Data
- Data will be an image-based dataset that we have yet to choose, similar yet different to one of the datasets that we have explored in class thus far.
Methodology
- Training is the same as it has been, except prior to doing feedforward we constrain all of our values binarily to 1 or -1.
- The hardest part of implementing the binarized model will likely be changing the feed-forward implementation to account for binarized weights values, as opposed to the non-binarized values that we have so far used in our class assignments during feed-forward.
- We are using the TensorFlow library to implement our BNN, whereas the original paper uses Torch7 and Theano.
- Additionally, we will be applying our BNN implementation to a new dataset, while other implementations have only been used on MNIST and CIFAR-10 (of the datasets that are applicable to the assignments of this class).
Metrics
- We plan to track the accuracy, runtime, and memory usage of our three models as we created them for our class assignments. We will then do the same for the binarized versions of our models and compare them.
- Accuracy still applies, as our new BNNs should still be at least almost as accurate on the problem as the original model. Other important metrics, however, are their runtime and memory usage (in both training and testing), which should increase in our BNNs drastically over our original models.
- The authors of the paper were hoping to demonstrate that usage of BNNs drastically reduces memory consumption and leads to a substantial improvement in power efficiency during both training and testing. These goals were numerically metricized by comparing the classification test error rates for binarized models vs. non-binarized models, comparing the energy consumption of typical network calculations vs. the bitwise calculations of BNNs, and comparing GPU execution times of both models.
- We’re not doing something new/non-existent in the DL literature.
- Base goals: creating BNNs that are functional and able to perform the task they’re designed for without significant drop in accuracy.
- Target goals: creating BNNs that perform with only minor drops in accuracy and have demonstrable increases in runtime and memory usage.
- Stretch goals: creating BNNs that perform with only minor drops in accuracy and have significant increases in runtime and memory usage.
Ethics
- Deep Learning models take a lot of resources (time, memory, power) to run. The two requirements of time and memory mean DL can often only take place on very advanced hardware (or at least cannot take place on limited hardware like microcontrollers) and the heavy power requirements mean the energy usage of DL is often detrimental to the environment.
- The major stakeholders are any researcher or user of DL; the success of BNNs (marked by their ability to still achieve high accuracy while drastically improving resource efficiency) has implications on their ability to use DL models faster and in a way that is less harmful to the environment, as well as being able to run models on more limited hardware.
Breakdown of Labor
- Nick: writing the binary activation function, working on Introduction and Results section of the poster, working on Challenges and Reflection sections of final writeup
- Arvind: adding the binarization of the weights during training, Detail experiment methodology and broader extrapolations on poster, preparing and delivering oral presentation
Log in or sign up for Devpost to join the conversation.