Answers.Body: <h3>If you want determinism make sure you program it in</h3>
  <p>A machine learning model will be deterministic to the same extent as any other computer program.
  It is entirely based the stability of the inputs you put into it.</p>
  <p>If you initialse a network to random weights you have potentially introduced some non-determinism. You can get it back by using a known seed and a known random number generator (library behavior can be system dependendent.</p>
  <p>Likewise if you put the same input data in you should get the same results.</p>
  <p>I suspect this is not the question were asking or the answer you were looking for so...</p>
  <h3>Consider the fitness landscape for the problem</h3>
  <p>A learning system is trying to find a good solution to a problem.
  For example you are trying to minimise the error between the output of your model and actual results.</p>
  <p>The complete space of possible solutions gives you a fitness or energy landscape.
  Your learning is trying to navigate this to find solutions and avoid local minima.</p>
  <p>So if you now add noise to this system. Use a different subset of the possible input data, different initial weights or a different learning algorithm the fitness landscape is still broadly the same so you should get a similar answer.</p>
  <p>If you change things too much of course this is no longer the case.</p>
  <p>Maybe a interesting set of input data adds a new peak or trough to the landscape.</p>
  <p>Maybe a tweak to your learning algorithm enables it to escape a particular kind of local minimum or get trapped in another.</p>
  <p>This is probably more the answer you were looking for.</p>
  <p>It terms of a theorhetical model they probably exist but require a lot of maths and good citations which others may be able to provide.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-11T17:16:25.820Z
Answers.Text: Thanks, the second part is definitely more of what I am looking for. I understand the theoretical justification but I am wondering what experiements have been done along these lines/theory developed based on these experiments.
Answers.UserDisplayName: Asvin
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-11T16:24:01.777Z
Answers.LastActivityDate: 2023-07-11T16:24:01.777Z
Answers.UserDisplayName: Bruce Adams
Answers.Body: <p>There's <a href="https://arxiv.org/pdf/2109.08203.pdf" rel="nofollow noreferrer">this paper</a> on the efficacy of random initialization on model performance:</p>
  <blockquote>
  <p>The conclusions are that even if the variance is not very
  large, it is surprisingly easy to find an outlier that performs much better or much worse than the average.</p>
  </blockquote>
  <p>Part of what you said also reminds me of the <a href="https://arxiv.org/pdf/1803.03635.pdf" rel="nofollow noreferrer">lottery ticket hypothesis</a>, motivated by the idea that you can prune a large portion of a NN's parameters while keeping the same accuracy, but resulting sparse architecture is difficult to train from scratch. The idea is that certain subnetworks in a NN may happen to be initialized s.t. they are particularly effective for some task.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-16T04:54:26.050Z
Answers.LastActivityDate: 2023-07-17T11:12:22.660Z
Answers.LastEditDate: 2023-07-17T11:12:22.660Z
Answers.UserDisplayName: Alexander Wan
Body: <p>Quick question about LLMS (and gradient descent in general): we search the space of neural networks by gradient descending in order to minimize one explicit function but what seems to be happening is that in the course of minimizing this function, the neural network automatically picks up several other skills (like building a world model...?). I imagine there is a lot of randomness in this process so to what extent are the extra skills picked up &quot;fixed&quot;.</p>
  <p>In other words, if I train models multiple times on the same data using the same loss function, to what extent are the resulting neural networks similar in performance (out of the training set, say)? Does the answer to this question matter much on what the loss function is and how much training has taken place?</p>
  <p>Given the proliferation of LLMs with not too dissimilar behaviour, I expect the answer to the above question is positive (maybe in the limit that the training time tends to infinity). But theoretically, this is a little surprising to me that there is an &quot;almost unique&quot; minimizer of the given loss function. Do we have a good theoretical framework for explaining this?</p>
  
Tags: <neural-networks><machine-learning><deep-learning><computational-learning-theory>
Title: To what extent are neural networks stable across multiple training runs?
UserDisplayName: Asvin
ThreadText: # To what extent are neural networks stable across multiple training runs?
  
  (Asked by: username_0 on 2023-07-11)
  
  Quick question about LLMS (and gradient descent in general): we search the space of neural networks by gradient descending in order to minimize one explicit function but what seems to be happening is that in the course of minimizing this function, the neural network automatically picks up several other skills (like building a world model...?). I imagine there is a lot of randomness in this process so to what extent are the extra skills picked up "fixed".
  
  In other words, if I train models multiple times on the same data using the same loss function, to what extent are the resulting neural networks similar in performance (out of the training set, say)? Does the answer to this question matter much on what the loss function is and how much training has taken place?
  
  Given the proliferation of LLMs with not too dissimilar behaviour, I expect the answer to the above question is positive (maybe in the limit that the training time tends to infinity). But theoretically, this is a little surprising to me that there is an "almost unique" minimizer of the given loss function. Do we have a good theoretical framework for explaining this?
  
  **Tags:** neural-networks, machine-learning, deep-learning, computational-learning-theory
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2023-07-11. Score: 3
  
  ### If you want determinism make sure you program it in
  
  A machine learning model will be deterministic to the same extent as any other computer program.
  It is entirely based the stability of the inputs you put into it.
  
  If you initialse a network to random weights you have potentially introduced some non-determinism. You can get it back by using a known seed and a known random number generator (library behavior can be system dependendent.
  
  Likewise if you put the same input data in you should get the same results.
  
  I suspect this is not the question were asking or the answer you were looking for so...
  
  ### Consider the fitness landscape for the problem
  
  A learning system is trying to find a good solution to a problem.
  For example you are trying to minimise the error between the output of your model and actual results.
  
  The complete space of possible solutions gives you a fitness or energy landscape.
  Your learning is trying to navigate this to find solutions and avoid local minima.
  
  So if you now add noise to this system. Use a different subset of the possible input data, different initial weights or a different learning algorithm the fitness landscape is still broadly the same so you should get a similar answer.
  
  If you change things too much of course this is no longer the case.
  
  Maybe a interesting set of input data adds a new peak or trough to the landscape.
  
  Maybe a tweak to your learning algorithm enables it to escape a particular kind of local minimum or get trapped in another.
  
  This is probably more the answer you were looking for.
  
  It terms of a theorhetical model they probably exist but require a lot of maths and good citations which others may be able to provide.
  
  > **Comments:**
  > **username_0**: Thanks, the second part is definitely more of what I am looking for. I understand the theoretical justification but I am wondering what experiements have been done along these lines/theory developed based on these experiments.  
  
  ---
  
  ### Answer by username_2 on 2023-07-16. Score: 1
  
  There's [this paper](https://arxiv.org/pdf/2109.08203.pdf) on the efficacy of random initialization on model performance:
  
  > The conclusions are that even if the variance is not very
  > large, it is surprisingly easy to find an outlier that performs much better or much worse than the average.
  
  Part of what you said also reminds me of the [lottery ticket hypothesis](https://arxiv.org/pdf/1803.03635.pdf), motivated by the idea that you can prune a large portion of a NN's parameters while keeping the same accuracy, but resulting sparse architecture is difficult to train from scratch. The idea is that certain subnetworks in a NN may happen to be initialized s.t. they are particularly effective for some task.
  
  
  ---
  
  