Dougal Maclaurin

about | projects | CV

Derivatives of tanh

Autograd - automatic differentiation for Python

Autograd is a Python library that uses reverse-mode differentiation (a.k.a. backpropagation) to efficiently compute gradients of functions written in plain Python/Numpy. It has become quite popular: we get around 2,000 downloads per month and it has been ported to Lua by Twitter. I started the project after reading the inspirational SICP and I was soon joined by David Duvenaud and later Matt Johnson who deserve much of the credit for extending and maintaining it. Check it out on Github.

Learning rate optimization

Gradient-based hyperparameter optimization and reversible learning

In a 2015 ICML paper, we showed how to take gradients of cross-validation loss with respect to hyperparameters by backpropagating through stochastic gradient descent, recomputing the trajectory in reverse during the backwards pass. With gradients, we can optimize thousands of hyperparameters, such as a per-iteration learning rate or a continuous parameterization of neural network architecture. The reversibility of learning touches on some subtle aspects of information and entropy, which we explore further in another paper which connects early stopping with variational inference. Work with David Duvenaud and Ryan Adams.

Neural fingerprint cartoon

Convolutional neural networks on molecular graphs

In a 2015 NIPS paper we introduce a convolutional neural network architecture for regression on organic molecules, which takes graphs as input. Our architecture generalizes circular fingerprints, the standard cheminformatic feature representation, and allows the feature pipeline to be learned end-to-end. We used these “neural fingerprints” in collaboration with Samsung to discover new materials for organic light-emitting diodes, as reported in our 2016 Nature Materials paper. Work with David Duvenaud, Jorge Aguilera-Iparraguirre, Rafa Gómez-Bombarelli, Timothy Hirzel, Alán Aspuru-Guzik and Ryan Adams.

Firefly Monte Carlo

Firefly Monte Carlo

Markov-chain Monte Carlo (MCMC) is a very versatile tool for Bayesian inference but it doesn’t scale easily to large data sets since evaluating the posterior usually requires querying each data point. In a 2014 UAI paper we show how to use minibatches in MCMC without sacrificing accuracy. The idea is to augment the state space with auxiliary indicator variables which determine which data points are “bright” or “dark” (hence “firefly”) at each iteration. By carefully choosing the conditional distribution of these indicator variables, only “bright” data points contribute to the joint posterior and the rest can be ignored. This work was recognized with the UAI 2014 best paper award. With Ryan Adams.

Arch cuvette

Voltage-sensing fluorescent proteins

The fluorescent voltage sensor Archaerhodopsin-3 (Arch) developed in Adam Cohen’s lab allows optical voltage imaging. In Adam’s lab, early in my PhD, Veena Venkatachalam and I investigated Arch’s curious photophysics. We built an elaborate fluorescence microscope patch-clamp rig to probe the optical and electrical properties of Arch. We found, as we reported in PNAS, that fluorescence arises from a consecutive three photon process and that voltage modulates intermediate photocycle states. I also made modest contributions (developing instruments and algorithms) to work showing that Arch can detect single action potentials, take sample-and-hold voltage measurements and be part of an all-optical electrophysiology system. With Veena Venkatachalam, Hohjai Lee, Joel Krajl, Daniel Hochbaum and Adam Cohen

Geometric phase experiment

Quantum control of the diamond nitrogen-vacancy center

The diamond nitrogen-vacancy (NV) center is a experimentally accessible quantum spin system that has been proposed as a potential qubit for a quantum computer. During my MPhil, I showed that the NV center can also be used to measure geometric phases, including the Aharonov-Casher effect and Berry’s phase and I investigated the effect of rotational Brownian motion on the quantum state of a colloidal nanodiamond. At the beginning of my PhD, with Misha Lukin and Norm Yao, I developed a microwave pulse sequence for measuring an NV center’s zero-field splitting, which could be used to build a solid-state atomic clock. With Andy Martin, Lloyd Hollenberg, Andrew Greentree, Mikhail Lukin and Norman Yao