NicheIB: Targeted Spatial Bottlenecks for Predictive Microenvironment Discovery
Abstract
Spatial transcriptomics methods usually partition tissue into domains without reference to a particular biological question. We study a complementary, supervised task: given a target such as a cortical-layer label or a gene-program score, which edges of a spatial neighbor graph are informative for predicting it? NicheIB trains a Targeted Spatial Bottleneck (TSB), a graph attention network whose messages are gated by input-dependent Hard Concrete masks under an augmented-Lagrangian budget constraint. We show that edge maps serve two goals that call for different operating modes. With the budget alone (TSB-dual), well-predicted targets select distinct edges: the maps of two gene programs, both regression targets, correlate at 0.30 against 0.82 under label permutation. These maps concentrate their budget and leave about half of the spots without an edge, so on cortex a fresh graph convolutional network refit on them does no better than on random edges. Adding a node-coverage penalty (TSB-cov) makes the selected edges reusable: at a 20% budget the refit reaches macro F1 0.868 versus 0.833 for random edges across 12 cortical sections from three donors, comparable to GraphMask (0.858), and 0.885 versus 0.786 on a mouse-brain section, at the cost of most of the separation between gene programs. The same evaluation exposes confounds in common checks of edge maps: targets the model cannot predict converge on a default pattern learned from permuted targets while remaining reproducible across seeds, and marker autocorrelation and co-expression on selected edges largely reflect local expression abundance. Pairing TSB with matched-mask refits, permuted-target defaults, and abundance-matched controls gives a diagnostic workflow for generating and filtering spatial hypotheses.