Neural Graph Machines: Learning Neural Networks Using Graphs

Thang D. Bui, Sujith Ravi, Vivek RamavajjalaarXiv 2017

Abstract

Neural Graph Machines (NGMs) present a unified framework for semi-supervised learning that integrates graph-based structural information directly into the training of deep neural networks. By augmenting standard supervised loss functions with a graph-regularization term that encourages connected nodes to share similar hidden representations, NGMs enable diverse architectures—including CNNs, LSTMs, and Feed-Forward Networks—to effectively leverage large-scale unlabeled data. Experimental results across social networks, text classification, and sequence modeling demonstrate that NGMs consistently outperform traditional baselines, particularly in low-data regimes, while allowing for significantly smaller and faster models.

Introduction

Deep neural networks have achieved state-of-the-art performance across numerous domains, yet their dependence on vast amounts of labeled data remains a significant bottleneck. In many practical applications, such as medical informatics or specialized social network analysis, labeled examples are scarce and expensive to acquire, whereas unlabeled data is often abundant. Traditional semi-supervised learning (SSL) approaches, such as label propagation on graphs, exploit the "homophily" principle—the idea that connected entities are likely to share similar properties. However, these methods often lack the powerful feature-learning capabilities of deep neural networks.

Neural Graph Machines (NGMs) bridge this gap by providing an end-to-end training framework that combines the representational power of deep learning with the structural benefits of graph-based regularization. This approach allows standard neural architectures to benefit from the rich relational information present in graphs without requiring specialized graph-convolutional layers.

Methodology: The Neural Graph Machine Framework

The core innovation of the NGM is its modified training objective. Rather than relying solely on a supervised loss function (e.g., cross-entropy) that penalizes incorrect label predictions, the NGM introduces a graph-regularization term. This term penalizes the network when it produces significantly different hidden representations for nodes that are connected by an edge in the input graph.

Neural Graph Machine architectures for different input types: (A) Graph input and node features, (B) Feed-Forward Neural Network, (C) Convolutional Neural Network, and (D) Long Short-Term Memory network.

As illustrated in Figure 1, this approach is architecture-agnostic. The regularization can be applied to the final hidden layer of various models:

  • Feed-Forward Neural Networks (FFNNs): Standard for tabular or node-feature data.
  • Convolutional Neural Networks (CNNs): Ideal for grid-like data or text with local dependencies.
  • Long Short-Term Memory (LSTM) networks: Suited for sequential data like natural language.

The NGM objective function is designed for scalability and flexibility. It employs edge-aware weighting, categorizing edges into Labeled-Labeled, Labeled-Unlabeled, and Unlabeled-Unlabeled pairs, allowing researchers to tune the influence of different data relationships. Furthermore, by sampling mini-batches of edges, the training process remains linear with respect to the number of edges, making it suitable for massive, real-world graphs.

Experimental Evaluation

The authors evaluated NGMs across several distinct datasets to test their versatility:

  1. BlogCatalog: A social network where the task is multi-label classification of blogger interests.
  2. AG News: A text classification task where a graph was constructed using cosine similarity of word2vec embeddings.
  3. SmartReply Intent Dataset: A sequence modeling task for mapping email responses to semantic intent clusters.
  4. PubMed: A citation network used to test performance in extremely low-supervision scenarios (e.g., only 20 labels per class).

Key Results and Insights

The experiments yielded several critical insights into the efficacy of NGMs:

  • Superior Performance: On BlogCatalog, the NGM-FFNN achieved a Macro F1 score of 0.262, significantly outperforming the two-stage node2vec + linear classifier baseline (0.177).
  • Efficiency and Model Compression: In text classification (AG News), a "tiny" NGM-CNN outperformed a standard "small" CNN baseline (86.90% vs 84.35% accuracy) despite having half the layers and fewer parameters. This suggests that graph-based structural priors can effectively substitute for model complexity.
  • Robustness in Low-Data Regimes: On the PubMed dataset with restricted labels, the NGM-FFNN reached 75.9% accuracy, surpassing both standard FFNNs (70.9%) and established graph-embedding techniques.
  • End-to-End Advantage: The unified NGM approach consistently beat disjoint pipelines that first learn embeddings and then train classifiers, highlighting the benefit of joint optimization.

Conclusion

Neural Graph Machines offer a powerful, scalable, and flexible solution for semi-supervised learning. By integrating graph structure directly into the neural network's loss function, NGMs allow standard architectures to learn more robust features from unlabeled data. This not only improves accuracy in data-scarce environments but also enables the deployment of smaller, more efficient models. Future research directions include extending the framework to handle multiple heterogeneous graphs and exploring the dynamics of directed influence within the regularization objective.

Summary updated

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
BlogCatalogNGM-FFNNMacro F10.191+0.02 vs baselinesplit: test · train-fraction=20%
Source quote
L160: 20% │ \bf 0.191 │ 0.168
AG NewsOur “tiny” CNN with NGMAccuracy86.90%split: test · model=tiny CNN · epochs=20
Source quote
L200: Our ``tiny'' CNN with NGM │ \bf 86.90
AG NewsOur “tiny” CNNAccuracy85.07%split: test · model=tiny CNN without NGM
Source quote
L199: Our ``tiny'' CNN │ 85.07
PubMedNGM-FFNNAccuracy0.759split: test · alpha=0.2 · seed-nodes=20 · self-training=yes · test-nodes-per-class=1000
Source quote
L259: NGM-FFNN │ 0.759
PubMedFeed-forward NNAccuracy0.709split: test · alpha=0 · seed-nodes=20 · test-nodes-per-class=1000
Source quote
L257: Feed-forward NN │ 0.709
Reported baseline / comparator measurements (1)
BenchmarkMethodMetricScoreProtocol / Evidence
BlogCatalognode2vec embedding with a linear one-vs-rest classifier baselineMacro F10.168split: test · train-fraction=20%
Source quote
L160: 20% │ \bf 0.191 │ 0.168
BibTeX
@misc{bui2017neural,
  author = {Thang D. Bui and Sujith Ravi and Vivek Ramavajjala},
  title = {{Neural Graph Machines: Learning Neural Networks Using Graphs}},
  year = {2017},
  eprint = {1703.04818},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1703.04818},
}
Figure