  Astrophysical transient phenomena are traditionally classified
spectroscopically in a hierarchical taxonomy; however, this graph structure is
currently not utilized in neural net-based photometric classifiers for
time-domain astrophysics. Instead, independent classifiers are trained for
different tiers of classified data, and events are excluded if they fall
outside of these well-defined but flat classification schemes. Here, we
introduce a weighted hierarchical cross-entropy objective function for
classification of astrophysical transients. Our method allows users to directly
build and use physics- or observationally-motivated tree-based taxonomies. Our
weighted hierarchical cross-entropy loss directly uses this graph to accurately
classify all targets into any node of the tree, re-weighting imbalanced
classes. We test our novel loss on a set of variable stars and extragalactic
transients from the Zwicky Transient Facility, showing that we can achieve
similar performance to fine-tuned classifiers with the advantage of notably
more flexibility in downstream classification tasks.
