The proposed method operates within the latent space of a pathology detection
convolutional model (PDC). We refer to the core architecture of the PDC as the
and to the module that refines the latent code as the module. Figure admodel
illustrates the model components.

PDCCore: This part of the model entails a convolutional auto-encoder (AE) with
a tunable bottleneck. A backbone is adopted for the encoder function of the AE
and augmented with multi-scale features to enhance the detection of small
lesions. A bottleneck module is appended to further constrain the size of the
latent code.

In contrast, the decoder function is underspecified relative to its partner
encoder by having fewer layers and not incorporating skip connections from all
the layers of the encoder. Specifically, the additional bottleneck component
of the encoder does not have a matching module in the decoder, and instead,
the decoder simply upsamples through bilinear interpolation. In addition, the
decoder contains no skip connections from the early layers of the encoder,
which capture lower-level features.

Consequently, the AE has a powerful encoder for our medical images and the
asymmetry regularizes against learning an identity function. Moreover, for
additional regularization, a denoising layer is introduced just before the
encoder and initially set to a dropout unit for simplicity.

PopuSense: This part of the model employs a graph-theoretic approach to
represent and encode a population-level context for normal samples. Firstly, a
population-level similarity context is modeled using a hypergraph. The
observations in a batch are depicted as nodes while similarity scores between
the latent codes from the correspond to edges. Similarity scores are computed
as the L2 norm between latent codes and edges are only activated for the top k
scores. The result is a binary incidence matrix $H\in{R}^{b\times k}$ and an
associated weight matrix $W=I_{k}$ that is equivalent to the identity matrix
as our hypergraph is unweighted. The dimensions $b$ and $k$ correspond to the
number of observations in a batch and the size of a neighborhood.

Thereafter, we apply a graph convolutional neural network to the latent codes
of the base model, denoted $Z_{cnn}$, and the estimated hypergraph $H$.
Finally, the initial latent codes are augmented with the output of the graph
convolution using a single fully connected layer and projected to a lower
dimension of the same size as the bottleneck of the base model , producing the
enhanced latent code. eq-popusense depicts this process, where the component
$D_{v}^{-\frac{1}{2}}HWD_{e}^{-1}H^{T}D_{v}^{-\frac{1}{2}}$ is derived from
the hypergraph Laplacian
$L=I-D_{v}^{-\frac{1}{2}}HWD_{e}^{-1}H^{T}D_{v}^{-\frac{1}{2}}$ and serves as
a transition matrix for propagating messages during the graph convolution
operation. In addition, $Z_{pop}$ is the embedding of the encoded population-
level context, $HGC$ denotes the hypergraph convolution operation, $P$ is the
projection matrix from layer $l$ to $l+1$, and $\sigma$ and $\sigma_{hgc}$ are
nonlinearity functions.

$\aligned
Z^{l+1}&=MLP\big{(}CONCAT\big{(}Z_{cnn}^{l},Z_{pop}^{l}\big{)}\big{)}\\\
=\sigma\big{(}(Z_{cnn}^{l}||HGC(Z_{cnn}^{l}))P^{l}\big{)}\\\
=\sigma\big{(}\big{(}Z_{cnn}^{l}||\sigma_{hgc}\big{(}Z_{cnn}^{l}\theta_{self}^{l}+D_{v}^{-\frac{1}{2}}HWD_{e}^{-1}H^{T}D_{v}^{-\frac{1}{2}}Z_{cnn}^{l}\theta_{hood}^{l}\big{)}\big{)}P^{l}\big{)}\\\
$ (1)

Loss function: The loss function, as outlined in equation adloss, combines the
mean squared error (MSE) and the structural similarity index metric (SSIM).
The SSIM offers a more comprehensive assessment of image quality since it
considers luminance, contrast and structure. We empirically find that
supplementing it with the MSE loss yields reconstructions with contrast and
luminance that closely resemble the original input. The contribution of the
two metrics can be adjusted using hyperparameters $\lambda_{1}$ and
$\lambda_{2}$. In the equation, $x$ is the original input and $\hat{x}$ is the
reconstructed output. There is no additional regularization for the latent
code as we first explore the capacity of unconfounded.

$L(x,\hat{x})=\lambda_{1}SSIM(x,\hat{x})+\lambda_{2}MSE(x,\hat{x})$ (2)

We primarily implement using PyTorch [paszke2017automatic] and leverage
existing packages for the foundational elements in well-established tasks. The
PyTorch Segmentation Models package [Iakubovskii:2019] provides access to the
backone through its model zoo. To compute SSIM for both grayscale and color
images, we utilize MS-SSIM [mssim.pytorch]. Furthermore, Deep Hypergraphs
(DHG) [gao2022hgnn] serves as a PyTorch-compatible graph learning module that
extends existing graph neural networks to hypergraphs.

[width=0.85]/qq-admodel

Figure : The latent code of a pathology detection autoecoder is augmented with
a population-level context to leverage intricate or hidden associations within
a group of similar observations. PopuSense, the corresponding module, takes as
input the latent code of the autoencoder and estimates a hypergraph to capture
higher-order relationships within a group. Afterward, a hypergraph
convolutional neural network learns the associated embedding, which is then
incorporated into the original latent code via a single fully connected layer.