[Paper Review] Non-Determinism in TensorFlow ResNets
This paper demonstrates that GPU non-determinism is the dominant source of variation in ResNet training on TensorFlow, accounting for 74–87% of test accuracy and loss variance, even when random seeds for weight initialization and data shuffling are fixed. The authors advocate for evaluating deep learning models using full performance distributions rather than single-point accuracy comparisons to ensure robustness and reproducibility.
We show that the stochasticity in training ResNets for image classification on GPUs in TensorFlow is dominated by the non-determinism from GPUs, rather than by the initialisation of the weights and biases of the network or by the sequence of minibatches given. The standard deviation of test set accuracy is 0.02 with fixed seeds, compared to 0.027 with different seeds---nearly 74\% of the standard deviation of a ResNet model is non-deterministic. For test set loss the ratio of standard deviations is more than 80\%. These results call for more robust evaluation strategies of deep learning models, as a significant amount of the variation in results across runs can arise simply from GPU randomness.
Motivation & Objective
- To isolate and quantify the contribution of GPU non-determinism to performance variation in ResNet training on TensorFlow.
- To demonstrate that GPU-induced stochasticity overwhelms other sources of randomness, such as weight initialization and minibatch ordering.
- To challenge the standard practice of single-point model evaluation by advocating for distribution-based assessment of model improvements.
- To promote reproducibility in deep learning research by highlighting the limitations of seed-based reproducibility on GPU platforms.
Proposed method
- Fixed TensorFlow graph-level, operation-level, and NumPy seeds to control for randomness in weight initialization and data shuffling.
- Used GPU reset commands (e.g., `nvidia-smi -rac`) to minimize state-dependent variability across training runs.
- Trained ResNet-50 on CIFAR-10 50 times with identical seeds and 50 times with varying seeds to isolate GPU non-determinism.
- Measured and compared standard deviations of test accuracy and loss across runs with fixed vs. varying seeds to quantify GPU impact.
- Performed equality comparisons of trained model weights and layer parameters to verify reproducibility under fixed seeds.
- Analyzed floating-point arithmetic inconsistencies across GPU architectures and compilers as the root cause of non-determinism.
Experimental results
Research questions
- RQ1To what extent does GPU non-determinism contribute to performance variance in ResNet training on TensorFlow, relative to other sources of randomness?
- RQ2Can fixed random seeds for initialization and data shuffling fully eliminate performance variation in ResNet training on GPUs?
- RQ3What is the quantitative impact of GPU-level floating-point non-determinism on test accuracy and loss standard deviation?
- RQ4How does the observed non-determinism affect the reliability of single-point model evaluation in deep learning research?
Key findings
- With fixed seeds for initialization and minibatch ordering, the standard deviation of test accuracy across 50 runs was 1.995×10⁻², indicating residual variation due to GPU non-determinism.
- When seeds were varied across runs, the standard deviation of test accuracy increased to 2.699×10⁻², showing that GPU non-determinism contributes 73.9% of the total variance.
- For test loss, the ratio of standard deviations between fixed and varying seeds was 0.872, indicating GPU non-determinism accounts for over 80% of the variation.
- Even with identical seeds and reproducible random number generation, GPU runs exhibited varying results due to floating-point arithmetic inconsistencies across hardware and compiler implementations.
- The observed variability stems from non-deterministic register usage and floating-point summation order on GPUs, which differ across systems and runs despite identical inputs.
- The authors conclude that GPU non-determinism is a major obstacle to reproducibility and recommend evaluating models using performance distributions rather than single-point metrics.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.