Abstract
Restricted Boltzmann Machines (RBMs) are powerful generative models, yet their dense connectivity often leads to a prohibitive number of trainable parameters and a susceptibility to overfitting. This paper introduces the Structural Restricted Boltzmann Machine (SBM), a model that leverages the inherent spatial structure of image data to constrain connections between hidden and visible units. By limiting hidden units to local neighborhoods, the SBM significantly reduces parameter counts without sacrificing performance. Our experiments across MNIST, FashionMNIST, and MedMNIST datasets demonstrate that SBMs offer faster, more stable training and superior results in both image denoising and classification tasks compared to traditional, fully connected RBMs.
Introduction
Restricted Boltzmann Machines (RBMs) serve as a foundational architecture in generative modeling, designed to learn the underlying probability distribution of a dataset through a bipartite graph of visible and hidden units. However, the standard "vanilla" RBM is characterized by dense connectivity: every hidden unit is connected to every visible unit. For high-resolution image data, this results in a parameter space of $O(n_v \cdot n_h)$, where $n_v$ and $n_h$ represent the number of visible and hidden units, respectively.
This density presents two primary challenges. First, the computational cost of training scales poorly with image size. Second, the high capacity of the model often leads to overfitting, where the RBM memorizes specific noise patterns in the training set rather than learning generalizable features. To address these issues, we propose the Structural Restricted Boltzmann Machine (SBM), which incorporates spatial priors to prune unnecessary connections.
The Structural RBM Architecture
The SBM architecture is predicated on the observation that in image data, pixels are most strongly correlated with their immediate spatial neighbors. Rather than a global weight matrix, the SBM employs a sparse connectivity pattern defined by two key hyperparameters:
- Window Size ($w$): This defines the square neighborhood of pixels (visible units) that a specific hidden unit is permitted to "see."
- Stride ($t$): This determines the spatial displacement between the centers of these neighborhoods, effectively controlling the distribution and density of hidden units across the image plane.
By focusing hidden units on local patches—analogous to the receptive fields in Convolutional Neural Networks (CNNs)—the SBM naturally aligns its architecture with the topology of the data. Furthermore, we explore Stacked SBMs, which combine multiple sets of hidden units with varying window and stride configurations to capture features at multiple scales simultaneously.
Experimental Methodology
To evaluate the efficacy of the SBM, we compared it against "Twin RBMs"—standard RBMs configured with the exact same number of hidden units as their SBM counterparts. This ensures that performance differences are attributable to the connectivity structure rather than raw model capacity.
Our evaluation spanned several diverse image domains:
- Generative Modeling: Tested on MNIST and FashionMNIST.
- Denoising: Evaluated using MNIST-C, which contains eight types of corruption (e.g., shot noise, glass blur).
- Classification: Assessed across MNIST, FashionMNIST, and three MedMNIST datasets (OrganAMNIST, OrganCMNIST, OrganSMNIST) derived from CT scans.
Key Findings
Efficiency and Stability
The SBM achieved a massive reduction in complexity, requiring between 90% and 94% fewer parameters than equivalent vanilla RBMs. This sparsity translated directly into computational efficiency; our optimized gradient computation allowed SBMs to train approximately three times faster than their fully connected counterparts. Moreover, while vanilla RBMs often showed a decline in test log-likelihood as hidden units were added (a sign of overfitting), SBMs remained stable, demonstrating that local connectivity acts as an effective regularizer.
Generative and Denoising Performance
In generative tasks, SBMs consistently achieved higher log-likelihoods on test sets for both MNIST and FashionMNIST once the hidden unit count exceeded 265. In denoising benchmarks, the SBM outperformed the vanilla RBM in nearly every category of corruption, yielding a lower Mean Squared Error (MSE). The model proved particularly robust against localized noise, though it faced challenges with global distortions like motion blur.
Classification Accuracy
Across all five image domains, SBMs outperformed vanilla RBMs in classification Log-loss. This was particularly evident in the MedMNIST datasets, where the structural prior helped the model navigate unbalanced classes more effectively. When subjected to the noisy conditions of MNIST-C, the SBM maintained significantly higher classification stability than the vanilla RBM.
Conclusion and Future Work
The Structural Restricted Boltzmann Machine demonstrates that injecting domain-specific structural knowledge into a generative model can simultaneously improve performance and reduce computational overhead. By pruning the dense connections of the traditional RBM, we achieve a model that is faster to train, more resistant to noise, and better at capturing the essential features of image data.
Future research will focus on automating the selection of window and stride parameters, potentially allowing the model to learn its own optimal neighborhood structures. Additionally, we aim to extend the SBM framework to 3D volumetric data and multi-channel RGB images, further broadening its applicability in complex computer vision tasks.
Summary updated