Engineering flexible machine learning systems by traversing functionally-invariant paths

Guruprasad Raghavan, Bahey Tharwat, Surya Narayanan Hari, Dhruvil Satani, Matt Thomson
4/30/2022
cs.LGcs.AImath.DG
transformer-attention

Official code: Guruprasad93/FlexibleMachineLearning (12 stars, Jupyter Notebook, MIT, last commit 2024-09-02).

Abstract

Transformers have emerged as the state of the art neural network architecture for natural language processing and computer vision. In the foundation model paradigm, large transformer models (BERT, GPT3/4, Bloom, ViT) are pre-trained on self-supervised tasks such as word or image masking, and then, adapted through fine-tuning for downstream user applications including instruction following and Question Answering.

Show full abstract

While many approaches have been developed for model fine-tuning including low-rank weight update strategies (eg. LoRA), underlying mathematical principles that enable network adaptation without knowledge loss remain poorly understood. Here, we introduce a differential geometry framework, functionally invariant paths (FIP), that provides flexible and continuous adaptation of neural networks for a range of machine learning goals and network sparsification objectives. We conceptualize the weight space of a neural network as a curved Riemannian manifold equipped with a metric tensor whose spectrum defines low rank subspaces in weight space that accommodate network adaptation without loss of prior knowledge. We formalize adaptation as movement along a geodesic path in weight space while searching for networks that accommodate secondary objectives. With modest computational resources, the FIP algorithm achieves comparable to state of the art performance on continual learning and sparsification tasks for language models (BERT), vision transformers (ViT, DeIT), and the CNNs. Broadly, we conceptualize a neural network as a mathematical object that can be iteratively transformed into distinct configurations by the path-sampling algorithm to define a sub-manifold of weight space that can be harnessed to achieve user goals.

View on arXivView PDF

Code Implementations(1)

MIT

A sample code sample to accompany the paper titled "Engineering flexible machine learning systems by traversing functionally-invariant paths"

125Jupyter Notebook, PythonOct 26, 20222 years agoMIT

Similar Papers

Cite this paper

@article{raghavan2022engineering,
  title  = {Engineering flexible machine learning systems by traversing functionally-invariant paths},
  author = {Guruprasad Raghavan and Bahey Tharwat and Surya Narayanan Hari and Dhruvil Satani and Matt Thomson},
  year   = {2022},
  eprint = {2205.00334},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.00334}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2205.00334.svg)](https://codeofpaper.com/paper/2205.00334)

Discussion