Abstract
To bring the full benefits of machine learning to defense modeling and simulation, it is essential to first learn useful representations for sparse graphs consisting of both key entities (vertices) and their relationships (edges). Here, we present a new model, the Joint Sparsity-Biased Variational Graph AutoEncoder (JSBVGAE), capable of learning embedded representations of nodes from which both sparse network topologies and node features can be jointly and accurately reconstructed. We show that our model outperforms the previous state of the art on standard link-prediction and node-classification tasks, and achieves significantly higher whole-network reconstruction accuracy, while reducing the number of trained parameters.
1. Introduction
Conventional defense, in which kinetic effects tend to be localized near forces and capabilities, is three-dimensional. In contrast, all-domain defense is intrinsically high-dimensional in the sense that flipping a bit on one side of the planet can affect mission outcomes on the other, and thus challenging for humans to plan, direct, monitor, and assess. Therefore, optimally effective and efficient defense must leverage modern machine-learning techniques to analyze and reduce high-dimensional spaces to lower-dimensional representations that human commanders, planners, operators, and analysts can rapidly understand and manage. The entities and relations that comprise such high-dimensional spaces, with many features, as well as multi-modal spaces, with multiple types of data, can be represented naturally by graphs of varying density, with nodes representing actors, assets, and targets, and links representing effects and relationships. For example, militarily relevant graphs commonly include social and sensor networks. Graph embedding techniques are often used to make such networks available to downstream machine learning tasks.1,2 Motivated by the insight that such networks are of varying density, 3 here we introduce a new model for learning embedded representations of sparse graph vertices and edges that can enable key entity and relationship information to be learned jointly.
2. Related work
A popular approach for unsupervised learning of graph embeddings is the original variational autoencoder model for graphs proposed by Kipf and Welling. 4 The authors introduced a spectral graph convolution (GC) layer that combined vertex feature information with graph topology. After generating vertex embeddings with stacked GC layers, they reconstructed the graph topology using a unary matrix inner product and passing the result through a sigmoidal activation function. However, as we show in this paper, this decoder model, which was only evaluated on a balanced link-prediction task, does not generalize well to sparse graphs.
Tran introduced LoNGAE,
5
the local neighborhood graph encoder – and
Lerique et al. introduced the Attributed Network to Vector (AN2VEC) model, 7 capable of decoding both node features and network topology from the same embeddings using two decoder heads: a weighted bilinear decoder for topology and a two-layer feed-forward neural network for node features. The topological and node embeddings were allowed to share some parameters and keep some parameters independent in the final embeddings; this ratio was controllable before training. Although our model uses a similar dual-headed decoder, it has two key differences: first, instead of a weighted bilinear adjacency matrix decoder, we use a simpler inner-product decoder with an additive bias term; and second, we do not feature-engineer the allocation of any parameters in the node embeddings to solely represent topology or node features.
Recent work has demonstrated the power of semi-supervised learning,5,6,8 wherein embedded representations are first pre-trained through unsupervised learning tasks such as autoencoding, and then later applied to, or fine-tuned on, narrower tasks (e.g., link prediction or node classification) that may not be known a priori. Motivated by that goal, especially in the context of defense modeling and simulation, where inference may take place at a higher classification than training, we focus here on accurately reconstructing autoencodings as a universal objective.
More broadly, in contrast to these previous studies, we expand our evaluation of graph autoencoder performance beyond the standard link-prediction and node-classification tasks due to their inability to generalize to sparse networks and decode node features. For example, the standard link-prediction task introduced by Kipf and Welling uses an artificially balanced evaluation set consisting of equal numbers of positive and negative edges, 4 which obscures poor performance on sparse graphs. Furthermore, none of the related studies we have mentioned evaluates whole-graph topological errors, motivating us to evaluate reconstruction of every edge, and every node feature vector, in the graph.
3. Model architecture
Our model is derived from the original Variational Graph AutoEncoder (VGAE) introduced by Kipf and Welling, 4 with several key changes. The foremost architectural difference is our model’s second decoder head, which allows reconstruction of the original node features, in addition to the adjacency-matrix-reconstruction head. We also reformulated the adjacency matrix’s inner-product decoder to include a trainable bias term, to improve sparse graph reconstruction performance.
3.1. Encoder
As in the original VGAE paper, our encoder uses a single GC layer to produce a hidden representation, which is then shared by two independent GCs responsible for producing the means and standard deviations for the Gaussian distributions from which the node embeddings are sampled.
We also employ a refinement proposed by Kipf and Welling in a follow-up paper,
8
where the adjacency matrix
3.2. Topology decoder head
As shown in Figure 1, our model encodes an adjacency matrix

The architecture of our auto-encoder. Green blocks represent operations with trained parameters.
Although Kipf and Welling originally defined the adjacency matrix edge probabilities as
3.3. Node feature decoder head
We also augment the original Kipf and Welling model with a second decoder head, trained to reconstruct the original node features
In choosing an architecture for the node feature decoder head, we observed that a simple feed-forward layer with a sigmoid activation is a special case of the symmetrical adjacency matrix graph convolution rule given by Kipf and Welling
8
:
Interpreted this way, our architecture’s two-layer, feed-forward node feature decoder renders the end-to-end feature reconstruction pathway of our model symmetrical: two encoder GC layers convolve the input features with
4. Training
4.1. Objective
As our model is a variational autoencoder, it assumes that the adjacency matrix
We train our model using full-batch gradient descent to maximize the variational lower bound
where
and
The topology reconstruction loss term in Equation 1 is defined as the binary cross-entropy loss between the reconstructed adjacency matrix
4.2. Datasets
To empirically investigate our technique’s suitability to defense, which frequently centers on globally sparse, multi-topic, information-sharing networks 3 , we selected three well-studied citation-network datasets as open-source proxies for analysis.
We performed experiments on our model trained on each of the CORA 9 , Citeseer 10 , and PubMed 11 datasets, where nodes represent papers and links represent citations. CORA and Citeseer nodes have associated feature vectors consisting of binary, multi-hot encodings indicating the presence or absence of vocabulary words in paper titles. The PubMed node feature vectors are term frequency–inverse document frequency (TF/IDF)-weighted word frequencies for the entire document. The CORA dataset contains 2708 nodes with 5429 links, the Citeseer dataset contains 3312 nodes with 4732 links, and the PubMed dataset contains 19,717 nodes with 44,338 links.
The three standard citation networks on which we evaluated our model are representative of a large variety of other militarily relevant attributed graphs, whose node features are also encoded as sparse binary vectors, including user attributes and natural language text in social media networks,12,13 and sensor output data in sensor networks.14,15
We performed link-prediction and node-classification experiments for each dataset, and evaluated reconstruction of the node feature vectors and network topology for the CORA dataset. We also include a discussion of observed useful properties of the learned latent space for the CORA dataset.
4.3. Preprocessing
For training, we used the versions of these datasets provided by the Deep Graph Library (DGL).
16
For numerical stability, before training, we normalize the graph’s node features
4.4. Hyperparameters
We used a hidden dimension of 1024 in our encoder graph convolutions and the two-layer feature decoder head, and an embedding dimension of 512 for
5. Results
5.1. Link prediction
We measured our autoencoder’s performance on a standard link-prediction task with the CORA, Citeseer, and PubMed citation network datasets. Using the same protocol as Kipf and Welling, 4 we trained our model on 85% of the edges, and evaluated link prediction using a validation set of 10% of held-out edges and a test set of the remaining 5%. We report the results in Table 1. Our model outperforms the others we tested on the CORA and Citeseer datasets, and performs competitively on the PubMed dataset. However, we believe that this task is an incomplete measure of graph reconstruction ability, as we discuss in the next section.
Citation dataset link-prediction performance, both area under the receiver operating characteristic (ROC) curve (AUC) and average precision score (AP). The best score of each column is in bold typeface.
5.2. Node classification
To more fully illustrate our model’s applicability to standard downstream tasks, we evaluated the ability of a shallow classifier to classify our model’s node embeddings into labeled document classes, which were not provided during the initial training process. We used a one-versus-rest support vector machine (SVM) classifier architecture, with a radial basis function kernel and a misclassification cost of
The validation accuracy results are reported in Table 2. While our model outperformed all other evaluated models on node classification in all three datasets, this result is perhaps unsurprising given our comparatively high node embedding dimensions of 512 or 1024, which we selected for accurate node feature reconstruction.
Citation dataset node classification accuracy. The best score of each column is bolded.
5.3. Topology reconstruction
As Kipf and Welling describe the link-prediction task now standard in graph autoencoding literature, 4 there are an equal number of positive and negative links evaluated to produce the final score. Given that most graphs have unbalanced adjacency matrices, we believe that a more representative measure of adjacency matrix autoencoding accuracy is the F1 score of the full reconstructed adjacency matrix.
Although the model presented by Kipf and Welling achieved an area under the receiver operating characteristic (ROC) curve (AUC) of 0.914 and an average precision of 0.926 on the CORA dataset, 4 their reconstruction (Figure 2c) had three orders of magnitude more positive edges than the original graph (Figure 2a), and its F1 score on full CORA adjacency matrix reconstruction was only 0.007, while our model achieved an F1 score of 0.851 (Figure 2b).

(a–c) Comparison between original CORA citation network topology (a), our topological reconstruction (b), and the Kipf autoencoder reconstruction (c). 4 All three networks are visualized with the ForceAtlas2 algorithm, 20 with node radius scaled by degree. By visual inspection, our model can reconstruct the sparse citation network, including its high-degree hub nodes, while the Kipf reconstruction is sufficiently dense that the original topology cannot be easily discerned.
5.4. Node feature reconstruction
CORA node features are 1433-dimensional, binary-valued, multi-hot word vectors in which each dimension indicates the presence or absence of the corresponding vocabulary word in the document the node represents. Each feature vector is divided by the sum of its positive dimensions in the original dataset. Due to this, and to our own pre-training node feature normalization, even perfectly reconstructed features are not directly interpretable as a binary vector.
To convert the real-valued output,
Our autoencoder was able to recreate the 1433-dimensional CORA node features with an average F1 score of 0.986 per record, and 0.984 across the concatenated matrix of all records. The latter reconstruction, along with the error matrix, is visualized in Figure 3.

CORA’s feature matrix, our reconstruction, and the error. Each row represents a document as a binary vector indicating the presence of each of 1433 words.
5.5. Latent space properties
Our biased inner-product decoder appears to avert the issue observed by Kipf and Welling, 4 wherein embeddings were pushed away from the origin. As seen in Figure 4, our latent space is clustered loosely by document type, with significant variance in two dimensions owing to the projection from a 512-dimensional space, many of which dimensions are used to encode node features.

A visualization of our encoder’s latent representation of CORA, constructed using the uniform manifold approximation and projection (UMAP) algorithm. 21 Colors indicate canonical document class (not provided during training). Gray lines indicate edges in the graph. The learned latent space has clustered similar document types without knowledge of those labels.
As exemplified in Figure 5, the nearest neighbors of a node in embedding space are trained to be the vertices it is connected to in the input graph, but the next few nearest neighbors tend to be documents that are of the same class, but not directly connected by an edge. This hierarchical property of the distance metric, which captures both topological and feature similarity but weights the former higher, may reflect the known tendency of link data in citation networks to cluster more tightly than text data. 22

Lines showing the five nearest neighbors of an embedded document in the CORA latent space. Red lines indicate that the nearest neighbor is also connected by an edge in the graph. The lowest scores tend to go to topological neighbors, with the remaining nearest neighbors being unconnected documents of the same class.
6. Discussion
Our model, although promising, has a number of limitations that we will now review, together with potential model generalizations that address them. First, due to its scalar bias term, our model’s network topology decoder implicitly favors globally consistent sparsity. By incorporating an additive bias matrix, we could generalize our tunable sparsity to accommodate localized density variations. Second, although our model’s variationality makes it a generative graph model, the naive generative method of sampling and decoding latent variables from unit Gaussians did not perform well for our model. To generalize our model by taking advantage of its theoretical generative capabilities, our model could be trained on more graphs in an inductive setting. Third, our model assumes that pre-trained embeddings of node features are provided as input, rather than raw features. By extending our model to also train node feature encoders, we could apply our model directly to raw node data and learn optimal feature embeddings for reconstruction. Fourth, while our model’s nodes are attributed (i.e., featureful), the links only encode one bit of information. In the future, our model could be generalized to encode and reconstruct arbitrary link features in a similar way. Finally, our model does not yet apply to dynamic graphs that change over time. By performing stochastic gradient descent in an online- or lifelong-learning setting, we could potentially update our model continuously as graph mutations stream in.
More broadly, our results suggest a number of avenues for follow-up work. Because of our learned latent space’s ability to hierarchically encode multiple distinct distance metrics, future work with our model might investigate the reconstruction of heterogeneous graphs with multiple distinct node and link types. Additionally, the performance of our model on other well-studied attributed graphs,23,24 as well as on smaller networks, should be examined. Finally, the potential of our model to extrapolate large, unseen regions of partially observable graphs warrants further study.
7. Conclusion
We have presented a novel graph autoencoder architecture that: (1) can accurately reconstruct the node features and link structures of the entire original networks, including held-out links from partially observed networks; (2) learns hierarchical node embeddings in which directly connected nodes are nearest neighbors, and nodes with similar features are next-nearest neighbors; and (3) achieves state-of-the-art performance on existing benchmarks for standard datasets. In particular, our architecture’s ability to represent both direct network links and node-feature-based similarities in a single vector space enables it to reveal important patterns in high-dimensional spaces. In the context of defense, this ability promises to enable commanders, planners, operators, and analysts to more rapidly classify featureful entities and sparse relationships in tactical, operational, and strategic graphs for unsupervised detection of anomalies and similarities, and semi-supervised estimation of node criticality, accessibility, recuperability, vulnerability, effect, and recognizability. 25
Footnotes
Funding
This research received no specific grant from any funding agency in the public, commercial, or not-for-profit sectors.
