Enforcing Predictive Invariance across Structured Biomedical Domains