# Nearest Neighbours Graph Variational AutoEncoder  
[PERSON]  
1 Department of Physics, Sapienza University of Rome, 00185 Rome, Italy12 INFN Section of Rome, 00185 Rome, Italy23 Istituto Superiore di Sanita, 00161 Rome, Italy3  
[PERSON]  
4 Correspondence: [EMAIL_ADDRESS]  
[PERSON]  
2  
[PERSON]  
1 Department of Physics, Sapienza University of Rome, 00185 Rome, Italy2 INFN Section of Rome, 00185 Rome, Italy  
prediction is crucial and requires the ability to process large data efficiently. Secondly, models should be lightweight to enable their use in resource-constrained medical devices and for online training. In the future, real-time imaging may enable real-time treatment planning optimization, making it imperative to use fast Deep Learning models during both training and inference. Deep Learning applications can find a role in specialised hardware for both resource efficient deployment and fast inference tasks. These models are referred to as Lightweight models and they are designed to be small and efficient, making them well-suited for use on resource-constrained devices. Notable applications are embedded software in Internet of Things (IoT) devices [7], wearable medical devices [8], and real-time applications such as online video analysis, e.g., online crowd control [9]. A similar need is also present for models developed for fast inference on accelerated hardware, for which a keypoint example is the trigger analysis in high energy physics experiments [10]. These models are typically smaller and less complex than traditional deep learning models, which allow them to run on devices with limited computational power and memory. Moreover, designing them often involves trade-offs between computational resources and performance. Deep Generative Modeling is commonly based on Convolutional Neural Networks (CNNs) for many applications, as they are one of the most powerful tools for processing grid-like data in Deep Learning frameworks. However, a significant amount of real-world data is better described by more flexible data structures, such as graphs. A graph is defined by a pair \(\mathcal{G}=(V,E)\). \(V=\{v_{i}\}_{i=1}^{N}\) is a set of \(N\) vertices, or nodes, while \(E=\{e_{ij}\}_{i,j=1}^{N}\) is the set of edges, which carry the relational information between nodes. The edge set \(E\) can be organised into the adjacency matrix \(A\), an \(NxN\) binary matrix, whose elements \(A_{ij}\) are equal to 1 if a link between \(i\)-th and \(j\)-th node exists and is equal to 0 otherwise. To address learning tasks on graphs, there has been an increasing interest in Graph Neural Networks (GNNs). These architectures typically use Graph Convolutional layers (GCNs), which allow for the processing of data on graphs, generalizing the concept of convolutions in CNNs. There are currently several types of GCNs available, ranging from the simplest models [11; 12], to those based on graph spectral properties [13], and those that include attention mechanisms [14]. Although it is currently possible to achieve excellent results in solving various problems of classification, regression, or link prediction on graphs, graph generation remains an open challenge [15]. Unlike images, graphs often have complex geometric structures that are difficult to reproduce, particularly in an encoder-decoder framework. Despite various approaches existing, there is currently no standard method for addressing this class of problems. Standard classes of models for graph generation are Graph AutoEncoders (GAEs) and Variational Graph AutoEncoders (VGAEs) [16], which apply the concepts of AutoEncoders and Variational AutoEncoders (VAEs) to graphs. However, these architectures can only reconstruct or generate the adjacency matrix of the graphs, not the features of their nodes. Additionally, while these models can learn meaningful embeddings of node features, the graph structure and number of nodes remain fixed during the encoding process, resulting in no compression of input data through pooling operations and no bottleneck.