  We apply deep recurrent neural networks, which are capable of learning
complex sequential information, to classify supernovae\footnote{Code available
at
\href{https://github.com/adammoss/supernovae}{https://github.com/adammoss/supernovae}}.
The observational time and filter fluxes are used as inputs to the network, but
since the inputs are agnostic additional data such as host galaxy information
can also be included. Using the Supernovae Photometric Classification Challenge
(SPCC) data, we find that deep networks are capable of learning about light
curves, however the performance of the network is highly sensitive to the
amount of training data. For a training size of 50\% of the representational
SPCC dataset (around $10^4$ supernovae) we obtain a type-Ia vs. non-type-Ia
classification accuracy of 94.7\%, an area under the Receiver Operating
Characteristic curve AUC of 0.986 and a SPCC figure-of-merit $F_1=0.64$. When
using only the data for the early-epoch challenge defined by the SPCC we
achieve a classification accuracy of 93.1\%, AUC of 0.977 and $F_1=0.58$,
results almost as good as with the whole light-curve. By employing
bidirectional neural networks we can acquire impressive classification results
between supernovae types -I,~-II and~-III at an accuracy of 90.4\% and AUC of
0.974. We also apply a pre-trained model to obtain classification probabilities
as a function of time, and show it can give early indications of supernovae
type. Our method is competitive with existing algorithms and has applications
for future large-scale photometric surveys.
