Skip navigation
➡️ Machine Learning from Scratch, part 41: pruning (cutting weights) and the lottery ticket…
0:00 / 1:57

➡️ Machine Learning from Scratch, part 41: pruning (cutting weights) and the lottery ticket…

14,800 views #machinelearning #ai #neuralnetworks

➡️ Machine Learning from Scratch, part 41: pruning (cutting weights) and the lottery ticket hypothesis. Pruning removes the weights with the smallest absolute values from a trained network, often more than 90 % of them without hurting accuracy, yet such a small network is hard to train from scratch. Jonathan Frankle and Michael Carbin (2018, ICLR 2019) explained why: a randomly started network contains winning tickets, subnetworks that learn as well as the full network when they restart from their original starting weights. The recipe: save the starting values, train, cut the smallest weights, reset the rest to the saved values, train again, repeat. On their image tasks (MNIST, CIFAR10) the tickets were often less than 10 to 20 % of the original size, and slightly larger ones learned faster and reached a higher test accuracy. With new random starting values the same small networks did worse. The code (pruning.py, 16 lines of numpy, seed 41) runs a tiny version on two spirals: a network with 1,500 weights, cut to 50, 20 and 10 % in three rounds, back to the same starting weights each time. Honest note: in a network this tiny the 90 % cut cost about 10 points of test accuracy (98.75 % to 88.5 %), while the same 150 weights with a new random start reached only 71.75 %. Honest notes: finding a ticket needs the full training first, often many times, so it saves no training time yet. Later work found that after moderate pruning a new random start can do as well; the starting weights matter most when a lot is cut. The big 3D network and the learning curves in the video are schematic. #machinelearning #ai #neuralnetworks #coding #python

Comments

Comments from the original post on TikTok

No comments yet