Master’s Thesis: Knowledge Distillation before Formal Verification of Deep Neural Networks

My thesis for the fulfillment of the Master of Science (MS) Computer Science at the University of Colorado, Boulder. “Knowledge Distillation before Formal Verification of Deep Neural Networks” (Perr-Sauer, 2022). This work was advised by Professor Ashutosh Trivedi and was defended successfully to obtain my masters degree with thesis option.

In this work, we explore a technique called knowledge distillation (Hinton, 2015) to compress a fully connected neural network (also known as a multi-layer perceptron) before verifying safety properties of the compressed network with a formal verification technique called nnenum (Bak, 2021).

Formal verification proceeds by iterating safety regions through the network structure, which scales inefficiently with the number of so-called “split” neurons in the network. This means it is computationally infeasible to use formal verification on large networks. Although much work has been done to speed up verification algorithms, fundamentally they are limited by an exponential time complexity in the size of the target neural network.

Knowledge Distillation is a type of compression algorithm used to generate smaller, so-called “student” networks using a larger “teacher” network to assist in training them. There are theoretical as well as practical reasons why using such a teacher network might be superior to training the smaller student network from scratch.

In my thesis, both knowledge distillation and the nnenum algorithm are defined, and some background is provided. We apply a novel experimental procedure to a reference neural network called Acas-XU (Julian, 2016). Through computational experiments, we find that compressing the network does indeed speed up the formal verification as expected. However, the fidelity of the student network was not high enough to be useful, and not all safety properties required of the Acas-XU network were preserved.

First Flowers in Macro

I purchased a macro tube (~$30) for my trusty Olympus OMD-EM10. Started playing around with the macro effect in the back yard. The macro effect is so strong, and it really has the power to transform a typical backyard into an extraordinary place.

The macro tube worked quite well. The depth of field was vanishingly small and I found it difficult to get enough of the flower in focus. Slight movements of my hand were enough to take the flower out of focus. This was not helped by the fact that auto-focus was not functional.

WindViz – Browser Based Visualizer for NREL Wind Toolkit HSDS API

I created a visualizer for the wind toolkit dataset at the National Renewable Energy Laboratory (NREL) using client side ES6 compiled through Babel and Webpack. NREL supports and maintains a dataset called Wind Toolkit. This is a large dataset which is hosted on NREL’s supercomputer, Peregrine. The public is entitled to free access of this dataset, but its large size presents a practical challenge to people who may want to use it. In order to provide easier access to this dataset, my colleagues at NREL implemented an API on Amazon AWS, developed with the HDF group, which provides fast access to rectangular slices of the data (this work was featured on the AWS Big Data Blog). The motivation behind WindViz was to create a visualizer to demonstrate this API.

WindViz - Wind Toolkit Visualizer Screenshot

Rasterization of the windspeed data (to create the green and blue heat-map) presented a major challenge, since the coordinate system of the Wind Toolkit data is in Lambert Conic instead of Web Mercator. This meant that any rasterization algorithm would have to operate in the Lambert coordinate space before being projected into Web Mercator.

Part of the project specification stated that it must operate as client-side only Javascript. This was the first time I’d played around with “modern” Javascript. After experimenting with React.js and Aurelia, I decided to keep it simple and just a one-page HTML document animated by Javascrit. I design most of this code around the Leaflet.js library.

The code can be viewed through the Github repository. An interactive demo is hosted through Github pages.

Moby Trips

Launched a new app for Moby, Systems inc. called Moby Trips (download from the iTunes Store). This app builds upon Simple Location Sharing by adding features such as waypoints (pins), photos, and recording your path via GPS. The app uses the same, flexible, nodejs backend which powers Simple Location Sharing. I’m continuing to work on this app in my free time, so any feature suggestions are welcome!

Two interesting challenges I ran into were the manor in which iOS’s Asset Library class handles deleted files, and keeping the server and iOS client synchronized throughout areas of patchy cell service. Next time I may try to use Meteor’s Open DDP protocol to overcome this challenge, as REST wrangling became much more trouble than expected.

Future improvements include synchronization of the data across multiple devices, a more comprehensive HTML5 viewer, the ability to enable and disable live streaming, and exporting of your data to various formats such as GPX and Open Street Maps.

Moby Simple Location Sharing

Moby Simple Location Sharing is an app for iOS and Android which helps you share your live location with friends. This project contains several components, including a node.js backend, two apps, and two websites in HTML5 (the viewer app and the homepage). Try it out from Google Play or the iTunes Store!

Screenshot of the Moby Simple Location Sharing iOS app.

Screenshot of the Moby Simple Location Sharing iOS app.