  Deep learning is a powerful set of techniques for detecting complex patterns
in data. However, when the causal structure of that process is underspecified,
deep learning models can be brittle, lacking robustness to shifts in the
distribution of the data-generating process. In this paper, we turn to loop
polarity analysis as a tool for specifying the causal structure of a
data-generating process, in order to encode a more robust understanding of the
relationship between system structure and system behavior within the deep
learning pipeline. We use simulated epidemic data based on an SIR model to
demonstrate how measuring the polarity of the different feedback loops that
compose a system can lead to more robust inferences on the part of neural
networks, improving the out-of-distribution performance of a deep learning
model and infusing a system-dynamics-inspired approach into the machine
learning development pipeline.
