Evaluating the Feasibility of Sampling-Based Techniques for Training Multilayer Perceptrons

Sana Ebrahimi, R. Advani, Abolfazl Asudeh · DOI

Abstract

The training process of neural networks is known to be time-consuming, and having a deep architecture only aggravates the issue. This process consists mostly of matrix operations, among which matrix multiplication is the bottleneck. Several sampling-based techniques have been proposed for speeding up the training time of deep neural networks by approximating the matrix products. These techniques fall under two categories: (i) sampling a subset of nodes in every hidden layer as active at every iteration and (ii) sampling a subset of nodes from the previous layer to approximate the current layer's activations using the edges from the sampled nodes. In both cases, the matrix products are computed using only the selected samples. In this paper, we evaluate the feasibility of these approaches on CPU machines with limited computational resources. Making a connection between the two research directions as special cases of approximating matrix multiplications in the context of neural networks, we provide a negative theoretical analysis that shows feedforward approximation is an obstacle against scalability. We conduct comprehensive experimental evaluations that demonstrate the most pressing challenges and limitations associated with the studied approaches. We observe that the hashing-based node selection method is not scalable to a large number of layers, confirming our theoretical analysis. Finally, we identify directions for future research.

Introduction

Training Deep Neural Networks (DNNs) is a computationally intensive task, primarily due to the massive matrix-matrix multiplications required at every layer. While high-end GPUs are the standard solution for these workloads, they are often expensive or inaccessible for many researchers and developers. This has spurred interest in "democratizing AI" by optimizing training processes for ubiquitous CPU-only environments.

One promising avenue involves sampling-based techniques designed to skip unnecessary calculations by approximating matrix products. However, the practical scalability of these methods—particularly as network depth increases—remains a critical question. This paper evaluates whether these shortcuts can truly deliver speedups on resource-constrained CPUs without sacrificing model integrity.

Methodology and Taxonomy

To evaluate these approaches systematically, we categorize existing sampling techniques into a unified taxonomy based on how they approximate matrix multiplications.

Classification of sampling-based techniques into current layer (node selection) and previous layer (inner-product estimation) approaches.

As shown in the taxonomy above, the techniques generally fall into two groups:

  1. Sampling from the Current Layer (Node Selection): These methods identify a subset of "active" nodes to update. Examples include standard Dropout and Adaptive-Dropout, as well as ALSH-approx, which utilizes Asymmetric Locality-Sensitive Hashing to find nodes with high activation values without exhaustive computation.
  2. Sampling from the Previous Layer (Inner-product Estimation): Methods like MC-approx use Monte Carlo sampling to estimate the inner product of nodes by sampling a small subset of rows or columns from the weight matrices.

The Challenge of Error Propagation

A core contribution of this work is the theoretical demonstration that feedforward approximation acts as a "leaky bucket." In techniques like ALSH-approx, estimation errors do not merely accumulate linearly; they propagate exponentially with network depth. An error in an early layer serves as noisy input for subsequent layers, which then introduce their own approximation errors. This compounding effect creates a significant barrier to scaling hashing-based methods for deep architectures.

Experimental Results

We evaluated these algorithms across six image classification benchmarks, including MNIST, Fashion-MNIST, and CIFAR-10. Our results highlight a stark contrast between hashing-based methods and Monte Carlo approaches as networks grow deeper.

Confusion matrices showing performance degradation as network depth increases across different sampling methods.

As illustrated in the confusion matrices, ALSH-approx performs reasonably well in shallow networks (up to 3 layers) but suffers a catastrophic "accuracy collapse" beyond that. For instance, on the MNIST dataset, ALSH-approx accuracy plummeted from 70.07% at 5 layers to just 25.14% at 7 layers. In deep networks, the hashing mechanism tends to activate the same small subset of nodes regardless of the input, causing the model to lose its discriminative power.

In contrast, MC-approx proved significantly more stable and scalable. In mini-batch settings (e.g., batch size 20), it maintained high accuracy (over 92%) across various depths and achieved backpropagation speeds up to 2x faster than standard training. Furthermore, MC-approx demonstrated better cache efficiency on CPU architectures, reducing memory latency bottlenecks compared to Dropout methods.

Conclusion and Future Work

Our analysis delivers a sobering "negative result" for hashing-based node selection in deep networks: while efficient in theory, the exponential growth of estimation error makes it unscalable for deep architectures. However, Monte Carlo methods show promise, particularly in mini-batch CPU training.

Future research should focus on:

  • Developing approximation methods that apply primarily to the computationally expensive backpropagation phase while keeping the feedforward pass exact to prevent error propagation.
  • Designing memory-efficient hashing schemes that avoid the "node collapse" observed in deep layers.
  • Investigating the energy efficiency of these techniques to reduce the carbon footprint of AI training on standard hardware.

Summary updated

BibTeX
@misc{ebrahimi2023evaluating,
  author = {Sana Ebrahimi and R. Advani and Abolfazl Asudeh},
  title = {{Evaluating the Feasibility of Sampling-Based Techniques for Training Multilayer Perceptrons}},
  year = {2023},
  eprint = {2306.09293},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.09293},
}
Figure