  The tumor microenvironment (TME) significantly impacts cancer prognosis due
to its immune composition. While therapies for altering the immune composition,
including immunotherapies, have shown exciting results for treating
hematological cancers, they are less effective for immunologically-cold, solid
tumors. Spatial omics technologies capture the spatial organization of the TME
with unprecedented molecular detail, revealing the relationship between immune
cell localization and molecular signals. Here, we formulate T-cell infiltration
prediction as a self-supervised machine learning problem and develop a
counterfactual optimization strategy that leverages large scale spatial omics
profiles of patient tumors to design tumor perturbations predicted to boost
T-cell infiltration. A convolutional neural network predicts T-cell
distribution based on signaling molecules in the TME provided by imaging mass
cytometry. Gradient-based counterfactual generation, then, computes
perturbations predicted to boost T-cell abundance. We apply our framework to
melanoma, colorectal cancer liver metastases, and breast tumor data,
discovering combinatorial perturbations predicted to support T-cell
infiltration across tens to hundreds of patients. This work presents a paradigm
for counterfactual-based prediction and design of cancer therapeutics using
spatial omics data.
