arXiv:2610.23475cs.CVOct 2026

Manuscript Offprint

arXiv:2610.23475

TAN: A Size- and Form-Adaptive Masked-Convolution Encoder for Tissue Graphs

Jan Herschel, Anselm von Gladiss

ABSTRACT

Tissue graphs represent histology images as graphs over tissue-conforming superpixels, which keeps homogeneous tissue regions intact instead of cutting them into rectangular patches. To embed superpixels, current encoders crop them to bounding boxes and then pad, resize, or mask them, so background or fill values can leak into the node features. This matters in practice, and especially in medical imaging, where a prediction should depend on the tissue and not on an arbitrary preprocessing choice: on BACH, changing only the fill of the masked region shifts the accuracy of frozen encoders by up to 6 percentage points, larger than the differences among the four best encoders under mean fill, and the preferred fill differs between datasets, so it cannot be fixed once and for all. We present TAN (Tissue-Aware Network), a compact convolutional encoder (0.41M parameters) that processes each superpixel at its native shape and extent and excludes background from every operation, which makes its embeddings exactly invariant to the fill by construction. Under identical masks and an identical graph classifier, TAN's accuracy on BACH is not significantly different from that of the 303M-parameter foundation model UNI (81.1% vs. 80.7–82.6%, depending on the fill), with ≈740×\approx740\times fewer parameters, ≈1,190×\approx1,190\times fewer FLOPs, and no pretraining. On BRACS, TAN is close to a ResNet18 trained under the same protocol and trails the histopathology foundation models. An ablation with TAN's architecture but standard processing of fill-padded crops shows that masking keeps accuracy similar (nominally higher on BACH, lower on BRACS, within noise) at less than half the FLOPs.

1. INTRODUCTION

Whole Slide Images (WSIs) span gigapixel dimensions and are therefore usually cut into rectangular patches and classified with Multiple Instance Learning (MIL) [1, 2, 3]. MIL treats the patches as independent instances and ignores where they lie, so it cannot represent how tissue regions are arranged and connected [1]. Tissue graphs address this by encoding local microenvironments and global tissue architecture [4]: nodes, commonly superpixels, represent tissue regions, and edges their spatial relationships. This work targets node-feature encoding.

Current formulations struggle with non-rectangular nodes. Node features come from handcrafted color and texture descriptors [5], which lack the expressive capacity of deep representations, or from deep-learning backbones restricted to rectangular grids, e.g., applied to fixed-size patches centered on each region [6]. Forcing an irregular entity into such a grid requires cropping, resizing, padding, or masking a rectangular crop, which can introduce artifacts, distort scale, and mix surrounding content into the node features; for standard convolutions over masked regions filled with substitute values, artifacts are well documented in inpainting [7].

We address this with TAN (Tissue-Aware Network), a compact encoder built on a strict masked-convolution rule that consumes each superpixel at its native shape and extent, with background excluded from every operation. To separate the effect of masked processing from those of architecture and pretraining, we compare it on BACH [8] and BRACS [9] with an unmasked twin of identical architecture, a ResNet18 trained from scratch, and frozen ImageNet, CTransPath and UNI encoders.