ICML 2025

Learning Latent Graph Structures and their Uncertainty
Alessandro Manenti 1 Daniele Zambon 1 Cesare Alippi 1 2
Abstract
Graph neural networks use relational informa-
tion as an inductive bias to enhance prediction
performance. Not rarely, task-relevant relations
are unknown and graph structure learning ap-
proaches have been proposed to learn them from
data. Given their latent nature, no graph obser-
vations are available to provide a direct training
signal to the learnable relations. Therefore, graph
topologies are typically learned on the prediction
task alongside the other graph neural network pa-
rameters. In this paper, we demonstrate that mini-
mizing point-prediction losses does not guarantee
proper learning of the latent relational informa-
tion and its associated uncertainty. Conversely, we
prove that suitable loss functions on the stochastic
model outputs simultaneously grant solving two
tasks: (i) learning the unknown distribution of
the latent graph and (ii) achieving optimal predic-
tions of the target variable. Finally, we propose
a sampling-based method that solves this joint
learning task 1. Empirical results validate our the-
oretical claims and demonstrate the effectiveness
of the proposed approach.
1. Introduction
Relational information processing has provided break-
throughs in the analysis of rich and complex data coming
from, e.g., social networks, natural language, and biology.
This side information takes various forms, from structuring
the data into clusters to defining causal relations and hier-
archies, and enables machine learning models to condition
their predictions on dependency-related observations. In
this context, predictive models take the form y = fψ(x, A),
where the input-output relation x 7→y – modeled by fψ
1Universit`a della Svizzera italiana, IDSIA, Lugano, Switzer-
land 2Politecnico di Milano, Milan, Italy. Correspondence to:
Alessandro Manenti <alessandro.manenti@usi.ch>.
Proceedings of the 42 nd International Conference on ...