chazzmoney t1_iw4edfl wrote
Reply to comment by StevenTM in Scientists Taught an AI to ‘Sleep’ So That It Doesn't Forget What It Learned, Like a Person. Researchers say counting sleep may be the best way for AIs to exhibit life-long learning. by mossadnik
Great question. First, some concepts that the explanation depends on…
A neural network is made up of “weights”. These weights are floating point values which are multiplied by whatever they receive from the prior neuron.
While each neuron separately doesn’t necessarily do something easily understood / clear, each neuron (and weight) is part of an overall algorithm that solves the trained problem.
When you take any network and train it to perform a specific task, the weights of the network are updated towards solving that specific task.
So, with that background, lets go back to your question- why does catastrophic forgetting happen?
If you were to compare the weights from a network trained to detect pizza/hot dog and the weights from a network trained to detect cat/dog: the two networks would have some weights that were similar and some that were different.
This is because some parts of the algorithm to detect food and the algorithm to detect animals are the same, and some parts of the algorithms are different.
Thus, when you start with one network and train for a different task, the “correct” (useful) parts remain and the “incorrect” (not useful) parts are replaced with useful parts. The parts that are not useful, the weights get changed sufficiently to prevent that part of the algorithm from working.
This is why catastrophic forgetting happens.
The cause is basically:
-
Having a network of specific size / bias to be able to successfully train for one task.
-
The algorithm for two different tasks being sufficiently different for some portion of the network.
-
Training on each task separately.
Thus there are some “solutions” which have been and continued to be explored:
-
Having a much larger network, with a bias towards generality rather than specificity.
-
Adding / removing / training specific subsections of the network for each task - and leaving the earlier part as “general”
-
Training for multiple purposes at the same time
StevenTM t1_iw4gxco wrote
Why isn't it possible to just create a copy of the weights for task 1/task 2 at various points, or even continuously?
Storage space is ridiculously cheap, and even high powered debugging traces (like Microsoft's iDNA (TTT Debugging), which basically captures full process dumps in millisecond increments (albeit for a single running process) aren't THAT huge.
Then when you re-run task 1, it just uses the weights from the latest snapshot for task 1. I don't see why it wouldn't or what the benefit of using the (obviously mismatched) weights from task 2 would be (while running task 1).
I mean.. i know it sounds like a stupidly obvious suggestion, and I'm fairly certain it isn't used as a solution, but can't figure out why
chazzmoney t1_iw4l6c8 wrote
If you only need to detect hotdog/pizza and dog/cat, its a fine solution. I was using those as examples, but usually its much more drastic - “transcribe speech to text” and “identify speech from background noise” and “identify speaker”. Or “answer trivia question”, “fill in the blank with the correct choice”, “determine if the text has a positive or negative sentiment”, “determine the main topic of the text”,. Etc…. quite complicated tasks.
Thus, there are a few reason it doesn’t work in practice:
-
Generality
-
Efficiency (hardware memory)
-
Efficiency (training computation)
-
Efficiency (inference latency)
Having a general network is more interesting - a single network that can solve multiple problems is more useful and more applicable to problems that may be similar or you don’t know you have yet. It can also be easier to “fine-tune” an existing network because you don’t have enough data on a given problem to train it from scratch.
Efficiency is (in my opinion), the bigger one:
-
To run a network, the entire network and parameters for it must be stored in memory. These days, they are on the order of gigabytes for “interesting” networks. Putting a multiplier (multiple networks) on this makes scaling quite challenging.
-
Training one general network may be harder, but it is much faster than training a new network from scratch for each problem. If you have thousands of problems, you don’t want to be training thousands of networks.
-
The size of “interesting” models makes inference challenging as well. The bigger (more interesting)the model, the more computation it must perform on each input; some modeling techniques are loops and require thousands of runs for each input. This seems fine at first but if a single inputs takes more than 10ms, a thousand loops will take longer than one second. Usually this means that the most interesting models have to be used on high end cloud equipment, which brings about further scaling challenges.
So your answer isn’t wrong; the practicality of the situation just makes it infeasible when you are working with large models (vision, video, language, etc) - the number of parameters is often in the billions.
StevenTM t1_iw4nmz3 wrote
Thank you for the in-depth answer, it was very interesting!
chazzmoney t1_iw4s9ic wrote
Of course - thanks for the great questions!
Viewing a single comment thread. View all comments