Graph Neural Networks can Recover the Hidden Features Solely from the Graph Structure

Ryoma Sato · DOI

TL;DR

Can a Graph Neural Network (GNN) find meaning in a graph if the nodes have no useful data? This research proves that GNNs can "flip the script": instead of just smoothing existing features, they can reconstruct the hidden, latent features that generated the graph's structure. By using only basic structural cues like node degrees, a GNN can effectively "hallucinate" the underlying geometry of a dataset.

The Challenge: Learning from Structure Alone

The traditional view of GNNs is that they act as sophisticated "smoothing filters." They take informative node features (like the text of a research paper) and mix them with the features of neighbors to create better embeddings. Under this paradigm, if the input features are "garbage," the output is "garbage"—a GNN shouldn't be able to produce a meaningful map of a graph if the nodes are essentially blank.

Illustration of the problem setting: recovering hidden features from an observable graph structure.

However, many real-world graphs are created based on hidden similarities. For example, a social network graph is formed because people with similar interests (hidden features) become friends. The authors tackle a fundamental theoretical question: Can GNNs recover these hidden features solely from the graph structure, without any help from informative node features?

A Constructive Approach to Feature Recovery

The authors provide a constructive proof, designing a GNN architecture that actively performs this recovery. Their approach involves three main stages:

  1. Density Estimation: The GNN simulates random walks to find the "stationary distribution" of the graph. This allows the model to estimate the local density of nodes, which is crucial for understanding the "scale" of the hidden feature space.
  2. Distance Calculation: Using a GNN-based implementation of the Bellman-Ford algorithm, the model calculates the shortest-path distances between nodes. Crucially, it adjusts these distances based on the density found in step one to better approximate the true Euclidean distance in the hidden feature space.
  3. Coordinate Recovery (MDS): The model uses a technique called Multidimensional Scaling (MDS) within the GNN layers to transform these distances into actual coordinates.

To make this work without unique node IDs (which would hinder generalization), they randomly select a small subset of "anchor" nodes to serve as reference points for the rest of the graph.

Beyond Smoothing: GNNs as Generative Engines

Contrary to the belief that GNNs only smooth data, this paper shows they can "imagine" or infer entirely new feature dimensions that weren't in the input. While most GNNs are criticized for "over-smoothing" when they get too deep, this research argues that deep GNNs are necessary to capture the global structure (like stationary distributions) required for feature recovery.

The proposed GNN architecture creates useful node features even when input features contain no information, asymptotically matching true hidden embeddings.

The authors found that standard, popular architectures like GAT (Graph Attention Networks) and GIN (Graph Isomorphism Networks) are actually quite mediocre at this recovery task. They lack the specific inductive bias—the internal "logic"—needed to perform the density and distance calculations required for reconstruction.

Empirical Validation

The researchers evaluated their theory using both synthetic and real-world data:

  • Two-Moon: A classic synthetic manifold dataset where points form two interlocking crescent shapes. A k-nearest neighbor (kNN) graph was built from these points.
  • Adult Dataset: A real-world census dataset. The authors used age and capital gain as hidden features to construct a kNN graph.
  • Downstream Benchmarks: To test if the recovered features are actually useful, they used standard citation and social network datasets: Cora, CiteSeer, PubMed, Coauthor (CS/Physics), and Amazon (Computers/Photo).

Key Results

  • Visual Reconstruction: In the Two-Moon and Adult experiments, the proposed GNN successfully reconstructed the original shapes and patterns from the graph alone.
  • Quantitative Performance: On downstream node classification tasks where all original features were deleted, the "Recovered Features" significantly outperformed the baseline.
  • On Cora, the baseline accuracy was 0.122, while the recovered features achieved 0.671.
  • On Coauthor Physics, the accuracy jumped from 0.307 to 0.745.
  • Inductive Success: The model demonstrated it could learn the recovery process on small graphs and successfully apply it to much larger, unseen graphs (extrapolating from 1,000 nodes to 10,000 nodes).

Limitations and Future Directions

  • High Node Degree: The theoretical proof relies on the graph being relatively dense (high average degree). Applying this to very sparse graphs remains a technical challenge.
  • Rigid Transformations: The GNN can recover the shape of the data, but it cannot know the absolute orientation. For example, it might reconstruct the "Two-Moon" shape upside down or rotated, as the graph structure itself is invariant to these shifts.
  • Dimensionality: The user currently needs to specify the number of hidden dimensions to recover. Future work could involve automatically detecting the optimal dimensionality by measuring reconstruction loss.

Summary updated

BibTeX
@inproceedings{sato2023graph,
  author = {Ryoma Sato},
  title = {{Graph Neural Networks can Recover the Hidden Features Solely from the Graph Structure}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=xQm5d5T30v},
}
Figure