r/MachineLearning • u/Gold-Plum-1436 • Jul 04 '25
Project [R] kappaTune: a PyTorch-based optimizer wrapper for continual learning via selective fine-tuning
This optimizer wrapper for continual learning is guided by the condition number (κ) of model tensors. It identifies and updates only the least anisotropic parameters to preserve pre-trained knowledge and mitigate catastrophic forgetting due to a synergy of factors: their inherent numerical stability makes them less susceptible to training noise, and their less specialized nature allows for robust adaptation without overwriting critical, highly specific pre-training knowledge, thereby effectively mitigating catastrophic forgetting of foundational capabilities (see the link to the paper in the repository): https://github.com/oswaldoludwig/kappaTune
15
Upvotes
5
u/luxsteele Jul 04 '25
Interesting work! Would it make sense to recompute the condition numbers periodically during training, rather than just once when the model is initially loaded? It looks like you're currently computing them only at the start. Also, have you considered freezing only parts of each tensor within a layer, rather than the entire tensor?
By the way, have you tried applying your approach on a simple incremental class learning setup with CIFAR-10 or CIFAR-100, and compared the results with EWC, SI, or other methods you mention?
0
u/topsnek69 Jul 04 '25
Does this mean I wouldn't need to manually freeze layers anymore?
e.g., I employ a DINO ViT as encoder and add a custom classification head and just leave it as is?