Automated classification is an increasingly important tool for analyzing the growing volume of astronomical survey data. Machine-learned classification of variable stars has previously treated the many dozens of known classes as strictly distinct, inferring prediction accuracy from a simplistic 0-1 loss. In this traditional formalism, for example, it is considered equally incorrect to classify an RR Lyrae type AB as either a contact eclipsing binary or an RR Lyrae type C. Such an approach fails to exploit the clear physical and phenomenological connections between classes that manifest as a taxonomy. Adapting recent advances in image-based classification, we construct a neural network architecture that uses a taxonomy-aware loss to classify variable stars. We demonstrate improved classification performance (especially for small-sized classes) using a hierarchy-based embedding scheme and a modified cosine loss function that reflects the taxonomic dissimilarity between classes. We generalize beyond the previous embedding literature to account for the presence of parent classes within the labelled training data. We then evaluate the network’s performance on three astronomical datasets: OGLE-III, MACHO and ASAS-SN. Our results show that such hierarchy-based algorithms can particularly improve the classification of minority subclasses.