Answers.Body: <p>I think theoretically yes, using a TRNG instead of a pseudo one obviously yields better values in anything that relies on randoms (if speed is not a concern).</p>
  <p>However, I think there's a lot going on when training a NN for this to make a big impact. One aspect to consider is that the range of the initial random weights might be 'smoothed out' with initialization techniques such as Xavier (sigmoid, tahn) and He (ReLU).</p>
  <p>Another important thing to consider is that randomness is not present only in weight initialization (<a href="https://arxiv.org/pdf/2404.03992" rel="nofollow noreferrer">source</a>):</p>
  <p><img src="https://i.sstatic.net/trh9QzNy.png" alt="" /></p>
  <p>Randomness being present throughout the entire training process, and not only on weight initialization, should reduce the concern of not having true random numbers from the get go. Also, while using a hardware-based random number generator seems feasible to initialize weights, I think it would be too much of a costly I/O operation to happen in the middle of training.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-09-17T00:59:02.613Z
Answers.LastActivityDate: 2024-09-17T00:59:02.613Z
Answers.UserDisplayName: talles
Body: <p>This is a topic I have been arguing about for some time now with my colleagues, maybe you could also voice your opinion about it.</p>
  <p>Artificial neural networks use random weight initialization within a certain value range. These random parameters are derived from a pseudorandom number generator (Gaussian etc.) and they have been sufficient so far.</p>
  <p>With a proper sample simple, pseudorandom numbers can be statistically tested that they are in fact not true random numbers. With a huge neural network like GPT-3 with roughly 175 billion trainable parameters, I guess that if you would use the same statistical testing on the initial weights of GPT-3 you would also get a clear result that these parameters are pseudorandom.</p>
  <p>With a model of this size, could <em>in theory at least</em> the repeatable structures of initial weights caused by their pseudorandomness affect the model fitting procedure in a way that the completed model would be affected (generalization or performance-wise)? In other words, could the quality of randomness affect the fitting of huge neural networks?</p>
  
Tags: <neural-networks><weights-initialization><randomness>
Title: Can the quality of randomness in neural network initialization affect model fitting?
UserDisplayName: Aki Koivu
ThreadText: # Can the quality of randomness in neural network initialization affect model fitting?
  
  (Asked by: username_0 on 2021-02-09)
  
  This is a topic I have been arguing about for some time now with my colleagues, maybe you could also voice your opinion about it.
  
  Artificial neural networks use random weight initialization within a certain value range. These random parameters are derived from a pseudorandom number generator (Gaussian etc.) and they have been sufficient so far.
  
  With a proper sample simple, pseudorandom numbers can be statistically tested that they are in fact not true random numbers. With a huge neural network like GPT-3 with roughly 175 billion trainable parameters, I guess that if you would use the same statistical testing on the initial weights of GPT-3 you would also get a clear result that these parameters are pseudorandom.
  
  With a model of this size, could *in theory at least* the repeatable structures of initial weights caused by their pseudorandomness affect the model fitting procedure in a way that the completed model would be affected (generalization or performance-wise)? In other words, could the quality of randomness affect the fitting of huge neural networks?
  
  **Tags:** neural-networks, weights-initialization, randomness
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-09-17. Score: 0
  
  I think theoretically yes, using a TRNG instead of a pseudo one obviously yields better values in anything that relies on randoms (if speed is not a concern).
  
  However, I think there's a lot going on when training a NN for this to make a big impact. One aspect to consider is that the range of the initial random weights might be 'smoothed out' with initialization techniques such as Xavier (sigmoid, tahn) and He (ReLU).
  
  Another important thing to consider is that randomness is not present only in weight initialization ([source](https://arxiv.org/pdf/2404.03992)):
  
  ![](https://i.sstatic.net/trh9QzNy.png)
  
  Randomness being present throughout the entire training process, and not only on weight initialization, should reduce the concern of not having true random numbers from the get go. Also, while using a hardware-based random number generator seems feasible to initialize weights, I think it would be too much of a costly I/O operation to happen in the middle of training.
  
  
  ---
  
  