Peephole: Predicting Network Performance Before Training

Boyang Deng, Junjie Yan, Dahua LinarXiv 2017

Abstract

The quest for performant networks has been a significant force that drives the advancements of deep learning in recent years. While rewarding, improving network design has never been an easy journey. The large design space combined with the tremendous cost required for network training poses a major obstacle to this endeavor. In this work, we propose a new approach to this problem, namely, predicting the performance of a network before training, based on its architecture. Specifically, we develop a unified way to encode individual layers into vectors and bring them together to form an integrated description via LSTM. Taking advantage of the recurrent network's strong expressive power, this method can reliably predict the performances of various network architectures. Our empirical studies showed that it not only achieved accurate predictions but also produced consistent rankings across datasets -- a key desideratum in performance prediction.

Introduction

Designing a high-performing neural network is traditionally a "trial-and-error" process. Researchers often have to choose between thousands of combinations of layer types, channel counts, and kernel sizes. To know if a design is good, you usually have to train it, which can take hours or even days on large datasets. While automated Neural Architecture Search (NAS) exists, most early methods relied on reinforcement learning or evolutionary algorithms that still required training hundreds of "candidate" networks to get feedback. This creates a massive bottleneck in the development cycle.

Comparison of traditional training loops versus the Peephole prediction loop, highlighting the reduction from hours to seconds.

Peephole is a performance predictor designed to address this bottleneck. It estimates a neural network's accuracy in less than a second—before the training process begins. By treating a network architecture as a sequence of encoded layers and processing them with a Long Short-Term Memory (LSTM) network, Peephole provides a way to navigate the massive search space of deep learning designs without the crushing computational cost of full training cycles.

Methodology

The Peephole pipeline transforms an abstract network design into a numerical accuracy prediction through three primary stages:

  1. Unified Layer Code (ULC): To make disparate layers (e.g., Convolution, Pooling, ReLU) comparable, each is encoded into a fixed-length vector. This vector captures four key attributes: Type ID, Kernel Width, Kernel Height, and Channel Ratio (the ratio of output to input channels). Utilizing ratios instead of absolute numbers allows the model to generalize across networks of different scales.
  2. LSTM Integration: Recognizing that a standard network is essentially a sequence of layers, the system uses an LSTM to "read" the sequence of layer vectors. The final hidden state of the LSTM serves as a "structural feature" that represents the entire architecture's topology.
  3. Performance Prediction: This structural feature is combined with an Epoch ID—allowing the model to predict accuracy at different stages of training—and fed into a Multi-Layer Perceptron (MLP). The final output is a single scalar representing the predicted accuracy.
The Peephole predictor architecture, showing the flow from block architecture to final predicted accuracy.

To train this predictor, the authors developed a Block-based Generation strategy using a Markov Chain to generate over a thousand diverse network architectures. These were fully trained to provide the ground-truth data necessary for Peephole to learn the relationship between architecture and performance.

Experimental Results

The study validated the predictor using classic benchmarks including CIFAR-10 and MNIST, with transfer experiments conducted on ImageNet.

  • Efficiency: Peephole provides feedback in less than 1 second, a massive improvement over the 1+ hour typically required to train a single candidate on CIFAR-10.
  • Prediction Accuracy: On CIFAR-10, Peephole achieved a Kendall’s Tau of 0.7696, indicating a very high correlation between predicted and actual rankings. This significantly outperformed baseline methods like Bayesian Neural Networks (BNN) and Support Vector Regression ($\nu$-SVR).
  • Real-world Utility: When used to select the best architecture from a random pool and tested on ImageNet, the Peephole-selected model achieved 71.91% Top-1 accuracy. This result slightly outperformed a manually designed VGG-13 while using only 25% of the parameters (35M vs 126M).

Discussion and Limitations

A key insight of this work is treating neural architectures as a language. Just as the meaning of a sentence depends on the order of words, network performance depends on the sequence of layers. Visualization of the LSTM revealed it naturally learned to "detect" specific patterns, such as the "rhythm" of convolution layers, without explicit instruction.

However, some limitations remain. The current model focuses on sequential topologies and does not natively handle complex, non-linear structures like multi-branching paths (Inception) or dense skip-connections (DenseNet). Additionally, while selected architectures transfer well, the predictor itself is currently task-specific and assumes a fixed training recipe (e.g., specific optimizers and learning rates). Future work may involve incorporating training hyperparameters as inputs to the predictor to further generalize its utility.

Summary updated

BibTeX
@misc{deng2017peephole,
  author = {Boyang Deng and Junjie Yan and Dahua Lin},
  title = {{Peephole: Predicting Network Performance Before Training}},
  year = {2017},
  eprint = {1712.03351},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1712.03351},
}
Figure