DynamicGate MLP Conditional Computation via Learned Structural Dropout and Input Dependent Gating for Functional Plasticity
Organizations: Sorynorydotcom Co., Ltd./AI Open Research Lab
Abstract
Dropout is a representative regularization technique that stochastically deactivates hidden units during training to mitigate overfitting. In contrast, standard inference executes the full network with dense computation, so its goal and mechanism differ from conditional computation, where the executed operations depend on the input. This paper organizes DynamicGate-MLP into a single framework that simultaneously satisfies both the regularization view and the conditional-computation view. Instead of a random mask, the proposed model learns gates that decide whether to use each unit (or block), suppressing unnecessary computation while implementing sample-dependent execution that concentrates computation on the parts needed for each input. To this end, we define continuous gate probabilities and, at inference time, generate a discrete execution mask from them to select an execution path. Training controls the compute budget via a penalty on expected gate usage and uses a Straight-Through Estimator (STE) to optimize the discrete mask. We evaluate DynamicGate-MLP on MNIST, CIFAR-10, Tiny-ImageNet, Speech Commands, and PBMC3k, and compare it with various MLP baselines and MoE-style variants. Compute efficiency is compared under a consistent criterion using gate activation ratios and a layerweighted relative MAC metric, rather than wall-clock latency that depends on hardware and backend kernels.
Figures & tables
| Data Set | Domain | Dimensionality | Training Set | Test Set |
|---|---|---|---|---|
| MNIST | Vision | 28×28 grayscale (784) | 60,000 | 10,000 |
| CIFAR-10 | Vision | 32×32 RGB (3,072) | 50,000 | 10,000 |
| Tiny ImageNet | Vision | 200 classes, 64x64 RGB(12,288) | 100,000 | 10,000 |
| Speech | Speech | 2624 (=64×41) | 86,843 | 11,305 |
| PBMC3k | Genomics | 2000 (HVG) | 100,000 | 10,000 |
| Model | Accuracy(%) | Param Reduction(%) | FLOPs Reduction(%) | Params | FLOPs |
|---|---|---|---|---|---|
| Baseline MLP | 98.07 | 0.0 | 0.000000 | 203,530 | 406,528 |
| Dropout MLP | 98.31 | 0.0 | 0.000000 | 203,530 | 406,528 |
| Pruned MLP | 98.02 | 0.0 | 29.622314 | 203,530 | 286,105 |
| Dynamic MLP | 98.07 | 0.0 | 21.711912 | 204,570 | 318,263 |
| Model | Accuracy (%) | FLOPs(rel) | Notes |
|---|---|---|---|
| Baseline | 43.30 | 1.000 | |
| Dropout | 41.45 | 1.000 | |
| Pruned | 48.90 | 0.941 | |
| Dynamic | 43.29 | 0.843 | OpenRate L1/L2: 0.94/0.29 |
| Model | Accuracy(%) | Param Reduction(%) | FLOPs Reduction(%) | Params | FLOPs |
|---|---|---|---|---|---|
| B aseline MLP | 3.24 | 0.0 | 0.000 | 3,197,384 | 6,393,856 |
| D ropout MLP | 2.51 | 0.0 | 0.000 | 3,197,384 | 6,393,856 |
| P runed MLP | 4.28 | 0.0 | 29.519 | 3,197,384 | 4,506,418 |
| D ynamicMLP | 2.97 | 0.0 | 80.088 | 3,197,640 | 1,273,117 |
| Item | Value |
|---|---|
| Sample rate | 16 kHz |
| Clip length | 1.0 s (fixed length, 16,000 samples) |
| STFT window / hop | 30 ms / 10 ms |
| Mel bins | 40 |
| Feature | log-mel spectrogram (shape: ) |
| Augmentation | time shift (100 ms), additive noise (optional) |
| Model | Val Acc (best) | Test Acc | Gate open | RelMAC | MACs (baseline gated) |
|---|---|---|---|---|---|
| BaselineMLP | 0.8762 | 0.8656 | – | 1.000 | 973,824 973,824 |
| DynamicGateMLP | 0.8739 | 0.8654 | 0.924 / 0.820 | 0.989 | 973,824 963,287 |
| DynamicGateMLP | SwitchMoE_MLP | |||||
|---|---|---|---|---|---|---|
| ep | active_g | corr(h,a) | entropy | cv | MI | cap |
| 21 | 0.377229 | -0.001672 | 2.044537 | 0.266152 | 0.871885 | 63.291139 |
| 22 | 0.367201 | 0.002379 | 2.043974 | 0.265866 | 0.899625 | 63.291139 |
| 23 | 0.359287 | -0.006189 | 2.051539 | 0.229780 | 0.848144 | 63.291139 |
| Model | Acc (%) | Macro-F1 (%) | MACs ( ) | MACs Red. (%) | Time (s) |
|---|---|---|---|---|---|
| Baseline | 91.83 1.49 | 93.29 1.77 | 2.505 0.000 | 0.00 0.00 | 7.20 0.24 |
| Dropout | 92.48 1.07 | 94.22 1.11 | 2.505 0.000 | 0.00 0.00 | 7.75 0.57 |
| Pruned | 92.17 1.46 | 93.95 1.36 | 1.252 0.000 | 50.00 0.00 | 3.31 0.38 |
| DynamicGate | 92.57 0.89 | 94.18 0.78 | 0.988 0.446 | 60.57 17.82 | 8.32 0.26 |
| RigL-only | 93.33 1.04 | 94.18 2.06 | 0.629 0.000 | 74.87 0.00 | 9.61 0.53 |
| DynamicGate+RigL | 92.43 1.34 | 93.43 2.41 | 0.541 0.033 | 78.41 1.33 | 11.24 0.30 |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Colab Source Code (URL) |
|---|---|
| MNIST | https://colab.research.google.com/drive/1PbKL4So4Vqel9VTN-SxFsEcHJGoo7aib?usp=sharing |
| CIFAR-10 | https://colab.research.google.com/drive/1q8aA74ImyfW8QB55RrqImBDSOt2IUtbv?usp=sharing |
| Tiny ImageNet | https://colab.research.google.com/drive/19V6E8EHPjwdW-zgv1jnyxCgPiRT9_F3M?usp=sharing |
| SpeechCommands | https://colab.research.google.com/drive/1TZBecTZQxlEu2ME_q3Ta5mM_jgt-fQTZ?usp=sharing |
| PBMC3k (HVG) | https://colab.research.google.com/drive/1DffTQEO8Ctw0h8UQGL-RajQW6HtBKEjX?usp=sharing |
Dynamic Neural Networks
Dynamic neural networks adapt their computation, capacity, structure, or internal state to changing inputs, tasks, and resource budgets.
See all 83 papers