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?


2 Answers 2


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.

  • $\begingroup$ 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. $\endgroup$
    – Asvin
    Jul 11, 2023 at 17:16

There's this paper 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, 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.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .