Skip to main content
QUICK REVIEW

[Paper Review] We need to talk about random seeds

Steven Bethard|arXiv (Cornell University)|Oct 24, 2022
Machine Learning and Data ClassificationComputer Science5 citations
TL;DR

This opinion paper argues that random seeds in neural networks are often misused in NLP research, particularly in fixed seed usage for 'replicability' and using only random seeds to generate performance distributions. The authors analyze 85 ACL Anthology papers and find over 50% use random seeds in risky ways, urging the community to treat seeds as hyperparameters to be optimized, not fixed arbitrarily.

ABSTRACT

Modern neural network libraries all take as a hyperparameter a random seed, typically used to determine the initial state of the model parameters. This opinion piece argues that there are some safe uses for random seeds: as part of the hyperparameter search to select a good model, creating an ensemble of several models, or measuring the sensitivity of the training algorithm to the random seed hyperparameter. It argues that some uses for random seeds are risky: using a fixed random seed for "replicability" and varying only the random seed to create score distributions for performance comparison. An analysis of 85 recent publications from the ACL Anthology finds that more than 50% contain risky uses of random seeds.

Motivation & Objective

  • To identify and categorize common uses of random seeds in NLP neural network research.
  • To distinguish between safe and risky applications of random seeds in model training and evaluation.
  • To highlight widespread misuse of random seeds in NLP papers, particularly fixed seeds and seed-only performance comparisons.
  • To advocate for better training, review, and author practices to improve reproducibility and model evaluation in NLP.
  • To initiate a broader community discussion on hyperparameter treatment, especially for random seeds.

Proposed method

  • Developed a taxonomy of five common uses of random seeds in NLP: model selection, ensemble creation, sensitivity analysis, fixed seed usage, and performance comparison via seed variation.
  • Conducted a manual review of 85 recent NLP papers from the ACL Anthology to classify their random seed usage into the taxonomy categories.
  • Used a conservative search strategy, requiring explicit mention of both 'neural network' and 'random seed' in the text to identify relevant papers.
  • Assigned each paper to a primary category based on textual evidence, with a spreadsheet of justifications publicly available.
  • Analyzed trends over time (2015–2021) to assess whether risky seed usage is declining or persisting.
  • Used qualitative analysis and citation review to contextualize findings and support recommendations for improved research practices.

Experimental results

Research questions

  • RQ1What are the common ways random seeds are used in modern NLP research?
  • RQ2Which uses of random seeds are considered safe versus risky in the context of model development and evaluation?
  • RQ3How prevalent are risky random seed practices in recent NLP literature?
  • RQ4Has the frequency of risky random seed usage decreased over time in the ACL Anthology?
  • RQ5What institutional and individual responsibilities exist to reduce misuse of random seeds in NLP research?

Key findings

  • More than 50% of the 85 reviewed NLP papers (48 out of 85) used random seeds in risky ways, with 24 using a single fixed seed and 24 using only seed variation for performance comparison.
  • The proportion of risky seed usage has remained stable from 2015 to 2021, indicating no significant decline in misuse over time.
  • Fixed seed usage is often justified as ensuring 'reproducibility,' but this is misleading because hardware and software differences can still break reproducibility even with the same seed.
  • Using a single fixed seed underestimates model performance, as the true capability of a model depends on optimal initialization, which may not be achieved with a single random seed.
  • Treating random seeds as hyperparameters to be optimized—like learning rate or dropout rate—can lead to better model performance, as shown in prior work cited by the authors.
  • The analysis is conservative, as it only includes papers explicitly mentioning 'random seed,' suggesting the true prevalence of risky seed use may be even higher in the broader literature.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.