Source-linked AI summary
Randomness In Neural Network Training: Characterizing The Impact of Tooling
Donglin Zhuang, Xingyao Zhang, Shuaiwen Leon Song, Sara Hooker
TL;DR
The paper asks how tooling choices contribute to randomness in neural-network training, an issue less studied than algorithmic sources of noise. It measures noise and control costs across the technical stack, finding that subgroup performance can be sensitive even when top-line metrics remain similar, while determinism costs vary by hardware and model design.
Problem
The impact of tooling on training noise is less understood than algorithm-design effects, leaving its contribution across machine-learning systems insufficiently characterized.
Source: §1 · p. 1Method
The authors experimentally isolate algorithmic and implementation sources of randomness and evaluate their impact and control costs across the technical stack.
Source: §1 · p. 2Results
Both algorithmic and implementation noise are significant; top-line metrics change little, but subgroup performance can be disproportionately affected, and determinism costs vary by hardware and model design.
Source: §1 · pp. 2–3, §7 · p. 11Takeaways & Limitations
The authors conclude that removing noise from only one part of the technical stack is not a robust way to improve training stability, and that deterministic tooling matters for AI safety.
Source: §1 · p. 2, §7 · p. 11The evaluation focuses on non-distributed training, leaving the impact of distributed training on model stability for future work.
Source: §6 · p. 11
Abstract
from arXiv · showhide
The quest for determinism in machine learning has disproportionately focused on characterizing the impact of noise introduced by algorithmic design choices. In this work, we address a less well understood and studied question: how does our choice of tooling introduce randomness to deep neural network training. We conduct large scale experiments across different types of hardware, accelerators, state of art networks, and open-source datasets, to characterize how tooling choices contribute to the level of non-determinism in a system, the impact of said non-determinism, and the cost of eliminating different sources of noise. Our findings are surprising, and suggest that the impact of non-determinism in nuanced. While top-line metrics such as top-1 accuracy are not noticeably impacted, model performance on certain parts of the data distribution is far more sensitive to the introduction of randomness. Our results suggest that deterministic tooling is critical for AI safety. However, we also find that the cost of ensuring determinism varies dramatically between neural network architectures and hardware types, e.g., with overhead up to $746\%$, $241\%$, and $196\%$ on a spectrum of widely used GPU accelerator architectures, relative to non-deterministic training. The source code used in this paper is available at https://github.com/usyd-fsalab/NeuralNetworkRandomness.
1 Introduction
The paper addresses limited evidence about how tooling contributes to training randomness and the cost of controlling it. Across experiments, it finds that noise can affect subgroup performance despite stable top-line metrics, while determinism has variable training-speed costs.
1 Introduction
- Prior work focused more on algorithm-design noise; tooling effects had been studied less, including software-dependency effects evaluated on a single machine..Source: §1 · p. 1
- The study isolates algorithmic and implementation randomness across hardware, models, and datasets to characterize system noise and the cost of controlling it.Implementation choices combine the hardware and software used for training.Source: §1 · pp. 2–3
- Noise can disproportionately increase variance in underrepresented sensitive subgroups even when top-line metrics change little.The authors report that randomness can amplify model bias through increased variance in subgroup performance.Source: §1 · p. 2
- Deterministic tooling is presented as critical for AI safety in sensitive domains, including credit scoring, healthcare diagnostics, and autonomous driving.Source: §1 · p. 2
- Implementation-noise control incurs non-negligible training-speed overhead, and its cost varies with model design and hardware.The authors recommend weighing that cost against tolerance for uncertainty and task sensitivity.Source: §1 · p. 3
2 Methodology
The methodology separates algorithmic randomness from implementation noise and evaluates how both affect model stability. Experiments compare controlled combinations of these sources across datasets, networks, and hardware.
2 Methodology
- Algorithmic choices introduce stochasticity by design, while software and hardware implementation can add noise through floating-point accumulation and input ordering.The experiments distinguish algorithmic factors (ALGO) from implementation factors (IMPL).Source: §2 · pp. 3–4
2.1 Measures of Model Stability
- Predictive churn measures disagreement between models [Milani Fard et al., 2016], while stability is also assessed with normalized l2 distance and metric standard deviations.Standard deviations cover top-line accuracy and subgroup error rate, FPR, and FNR, typically across 10 independent runs.Source: §2.1 · pp. 4–5
2.2 Experimental Setup
- Experiments cover ImageNet and CelebA, multiple network architectures, and GPU and TPU hardware; average performance is reported over 10 independently trained models except ImageNet, averaged over 5 independent trains.The same hyperparameter choices are preserved across hardware types.Source: §2.2 · pp. 5–6
- Four variants isolate algorithmic and implementation noise: both uncontrolled, only ALGO, only IMPL, or a control with both sources controlled.The ALGO-only variant controls tooling noise; the IMPL-only variant fixes the random seed for algorithmic factors.Source: §2.2 · p. 6
3 Results: Characterizing the Impact of Randomness
Across the experiments, top-line accuracy varies little, but model stability measures and subgroup outcomes reveal substantial sensitivity to randomness. The observed effects also vary with architecture, hardware, and data ordering.
3.2 Impact of Randomness on Sub-Group Performance
- Per-class accuracy standard deviation reaches 4X and 23X the top-1 accuracy standard deviation on CIFAR-10 and CIFAR-100, respectively.Removing only one source of noise does not effectively improve per-class stability.Source: Figure 4 · p. 7, §3.2 · p. 8
3.1 Impact of Randomness on Top-Line Metrics
- Top-1 accuracy standard deviation stays below 1% across ALGO, IMPL, and combined settings, while both noise sources produce substantial instability in churn and l2 measures.The maximum absolute accuracy difference reported is 0.84% for the small CNN on CIFAR-10; combined noise is not necessarily additive.Source: §3.1 · p. 7
- 0.91% versus 0.17% accuracy standard deviation for the small CNN and ResNet-18 on CIFAR-10 illustrates that architecture can matter more than dataset choice.For ResNet-18, the reported standard deviation is 0.17% on CIFAR-10 and 0.25% on CIFAR-100; batch normalization lowers the small CNN’s standard deviation from 0.86% to 0.30%.Source: §3.1 · p. 7
3.2 Impact of Randomness on Sub-Group Performance
- Under ALGO+IMPL noise, CelebA’s Old subgroup has up to 3.3X accuracy standard deviation and its Male subgroup up to 4.6X FNR standard deviation.The paper reports that these subgroups are underrepresented and that noise is associated with higher variance in them.Source: §3.2 · pp. 8–9
3.3 How does noise level vary across hardware types?
- V100 GPUs show larger implementation-noise churn and l2 divergence than P100 and RTX5000, while RTX5000 Tensor Cores remain non-deterministic.TPUs show lower churn and l2 than GPUs under ALGO+IMPL, but no pronounced standard-deviation impact.Source: §3.3 · p. 9
- Even on TPUs, changing input order produces prediction divergence, attributed to different floating-point accumulation orders during gradient accumulation.The experiments observed divergence across the batch sizes tested, including a single full-dataset batch.Source: §3.3 · p. 9
4 Results: The Cost of Ensuring Determinism
Deterministic training carries substantial, variable GPU-time overhead: it depends on architecture, convolution-filter size, and GPU generation. The overhead reflects deterministic execution relying on a narrower set of kernels.
4 Results: The Cost of Ensuring Determinism
- Algorithmic noise can be controlled with a fixed random seed, whereas controlling implementation noise adds overhead because some cuDNN convolution algorithms trade determinism for speed.The paper motivates evaluating deterministic-setting overhead relative to normal training.Source: §4 · p. 10
- The profiling measures GPU time spent on CUDA kernel computation, excluding data-input pipeline latency, across widely used CNNs on ImageNet.The tested networks include MobileNet, EfficientNets, DenseNet, VGG, and ResNet models.Source: §4 · p. 10
- VGG-19 reaches 185% relative GPU time on V100, while MobileNet reaches 101%; architecture also yields broad overhead ranges on P100 and T4.Reported ranges are 101%–211% on P100 and 101%–196% on T4.Source: §4 · p. 10
- 284%–746% on P100, 129%–241% on V100, and 117%–196% on T4: larger convolution kernels consistently bring larger deterministic overhead.The filter-size comparison uses a six-layer medium CNN.Source: §4 · p. 10
- Up to 746% on P100, 241% on V100, and 196% on T4 for a 7×7 kernel; across models, P100 overhead exceeds V100 and T4 overhead.The reported GPU-generation comparison spans a six-layer medium CNN through ResNet50.Source: §4 · p. 10
- Deterministic mode concentrates time in a narrower set of kernels, because it restricts the compiler to a narrower kernel range rather than heuristic tuning.The comparison plots time spent in the top 20 kernels across 100 training steps.Source: §4 · p. 10
5 Related Work
Prior work has studied algorithmic randomness, software dependencies, and determinism tooling, but hardware coverage and the disparate harms of randomness from tooling remain less explored. This paper positions its contribution at those intersections.
5 Related Work
- Reproducibility spans several standards, while this paper uses replicability to mean reproducing exact results under the same experimental framework.The passage distinguishes exact-result replicability from statistically similar values, successful code execution, and preserving relative model rankings.Source: §5 · p. 10
- Determinism tooling includes shareable notebooks, Docker, platforms for sharing code and data, software patches, and proposed deterministic GPU architectures.The cited proposals for deterministic GPU architectures are [Jooybar et al., 2013, Chou et al., 2020].Source: §5 · p. 11
- Prior algorithmic studies examine randomness from seeds, initialization, data shuffling, and augmentation, alongside sensitivities to model choices, hyperparameters, parallelism, and test-set construction.Examples include random initialization in reinforcement learning, explanation variability, and choices of initialization, shuffling, and augmentation.Source: §5 · p. 11
- Prior software-dependency studies evaluate deep-learning libraries on single hardware types; this work varies hardware and measures determinism costs across hardware.The cited library studies include Pytorch, CNTK, Theano, and Tensorflow [Pham et al., 2020, Alahmari et al., 2020].Source: §5 · p. 11
- Models with similar top-line metrics can still perform unacceptably on distribution subsets, while this work evaluates tooling randomness against disparate harm.The cited work on subset performance includes [Hooker, 2021, Yona et al., 2021, D’Amour et al., 2020, Hooker et al., 2019].Source: §5 · p. 11
6 Discussion and Future Work
The discussion asks whether the impact of training noise justifies the cost of controlling it. The study is limited to non-distributed tooling, leaving stability under distributed training as future work.
6 Discussion and Future Work
- The discussion frames an open question: whether noise's impact merits the cost of controlling it.It notes growing urgency to address non-determinism in deep neural network training.Source: §6 · p. 11
- The study evaluates tooling impact in a non-distributed setting, although neural-network training increasingly uses distributed approaches.Examples named include data and model parallelism, optimizer-state partitioning, and asynchronous gradient updates.Source: §6 · p. 11
- Understanding how distributed training affects model stability is identified as an important area for future work.The stated boundary is the paper’s focus on non-distributed tooling.Source: §6 · p. 11
7 Conclusion
The conclusion reports that both algorithmic and implementation noise matter, and that removing noise from only one part of the technical stack is not a robust route to training stability. It also highlights subgroup effects and variable determinism costs.
7 Conclusion
- Both algorithmic and implementation noise are significant, so eliminating noise from only one technical-stack component is not a robust way to improve training stability.The paper characterizes the impact and cost of controlling noise across the technical stack.Source: §7 · p. 11
- Despite minimal changes to top-line metrics, noise disproportionately affects subgroup performance and can create fairness trade-offs when protected attributes are underrepresented.Source: §7 · p. 11
- The cost of ensuring determinism varies substantially with hardware type and model-design choices.Source: §7 · p. 11
A Sources of Randomness During Deep Neural Network Training
Algorithmic factors are stochastic choices embedded in model design and training procedures. They include random initialization, data augmentation, data ordering, and stochastic layers.
- Algorithmic factors are model-design choices that are stochastic by design and are commonly used because stochasticity has been found to improve top-line metrics.Source: A Sources of Randomness During Deep… · p. 17
- Examples include random weight initialization, stochastic input transformations, shuffled mini-batch ordering, and stochastic layers such as dropout.Data transformations include random crops, noise injection, and color distortions.Source: A Sources of Randomness During Deep… · p. 17
- Random ordering can introduce stochasticity even when the entire dataset is processed in one batch, and has been linked to potential security vulnerabilities.Source: A Sources of Randomness During Deep… · p. 17
B Training Methodology
The experiments use image classification and fairness-focused settings with dataset- and architecture-specific training schedules. Random crops and flips are used for augmentation except on CelebA.
- Random crop and flip augment the experiments except those using CelebA.Source: B Training Methodology · p. 17
- CIFAR-10 uses a three-convolution-layer CNN, while CIFAR-10 and CIFAR-100 also use ResNet-18, trained for 200 epochs with batch size 128.The learning rate is 4e-4 and decays tenfold every 50 epochs.Source: B Training Methodology · p. 17
- CelebA experiments train ResNet-18 for 20 epochs and measure subgroup accuracy, FPR, and FNR variability across Male/Female and Young/Old groups.The batch size is 128 and the learning rate is 1e-3, decaying tenfold every five epochs.Source: B Training Methodology · p. 17
- ImageNet experiments train ResNet-50 for 90 epochs with SGD, momentum 0.9, one-epoch warmup, and cosine learning-rate decay.The batch size is 256 and the initial learning rate is 0.1.Source: B Training Methodology · p. 17
C CNN Architecture
The section describes small CNN architectures and introduces an overview table of the dataset benchmarks.
- The architecture description covers three-layer small and six-layer medium CNNs, with pooling for downsampling and stride 1 in all convolutional layers.The six-layer CNN can use kernel sizes 1, 3, 5, or 7.Source: C CNN Architecture · p. 18
- The architecture listing gives input shapes of 32 × 32 × 3 for the three-layer CNN and 224 × 224 × 3 for the six-layer CNN.Source: C CNN Architecture · p. 18
- Table 4 is an overview of the datasets benchmarked.Source: Table 4 · p. 19
D Comparison of Impact of Different Source of Noise
The section presents comparisons of noise-source impact across four tasks on P100 and RTX5000 hardware, alongside a baseline CelebA variability table.
- Figures 9 and 10 compare the impact of different noise sources across four tasks trained on P100 and RTX5000, respectively.Source: Figure 9 · p. 19, Figure 10 · p. 20
- Table 5 reports standard deviations of accuracy, FPR, and FNR across ten baseline-trained CelebA models on V100 CUDA cores, disaggregated by Male/Female and Young/Old.Parenthetical values give each subgroup standard deviation relative to the overall dataset.Source: Table 5 · p. 21