Approximate Nullspace Augmented Finetuning for Robust Vision Transformers

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Liu, Haoyang, Singh, Aditya, Li, Yijiang, Wang, Haohan
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866913762885238784
author Liu, Haoyang
Singh, Aditya
Li, Yijiang
Wang, Haohan
author_facet Liu, Haoyang
Singh, Aditya
Li, Yijiang
Wang, Haohan
contents Enhancing the robustness of deep learning models, particularly in the realm of vision transformers (ViTs), is crucial for their real-world deployment. In this work, we provide a finetuning approach to enhance the robustness of vision transformers inspired by the concept of nullspace from linear algebra. Our investigation centers on whether a vision transformer can exhibit resilience to input variations akin to the nullspace property in linear mappings, which would imply that perturbations sampled from this nullspace do not influence the model's output when added to the input. We start from the observation that many existing ViTs satisfy this property because their patch embedding layer has a non-trivial nullspace. Then, we extend the notion of nullspace to nonlinear settings and demonstrate that it is possible to synthesize approximate nullspace elements for ViT's encoder blocks through optimization. Finally, we propose a finetuning strategy for ViTs wherein we augment the training data with synthesized approximate nullspace noise. We find that our finetuning approach significantly improves the models' robustness to both adversarial and natural image perturbations.\footnote{Code is available at: https://github.com/Liu-Hy/ns-vit.
format Preprint
id arxiv_https___arxiv_org_abs_2403_10476
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Approximate Nullspace Augmented Finetuning for Robust Vision Transformers
Liu, Haoyang
Singh, Aditya
Li, Yijiang
Wang, Haohan
Computer Vision and Pattern Recognition
Machine Learning
Enhancing the robustness of deep learning models, particularly in the realm of vision transformers (ViTs), is crucial for their real-world deployment. In this work, we provide a finetuning approach to enhance the robustness of vision transformers inspired by the concept of nullspace from linear algebra. Our investigation centers on whether a vision transformer can exhibit resilience to input variations akin to the nullspace property in linear mappings, which would imply that perturbations sampled from this nullspace do not influence the model's output when added to the input. We start from the observation that many existing ViTs satisfy this property because their patch embedding layer has a non-trivial nullspace. Then, we extend the notion of nullspace to nonlinear settings and demonstrate that it is possible to synthesize approximate nullspace elements for ViT's encoder blocks through optimization. Finally, we propose a finetuning strategy for ViTs wherein we augment the training data with synthesized approximate nullspace noise. We find that our finetuning approach significantly improves the models' robustness to both adversarial and natural image perturbations.\footnote{Code is available at: https://github.com/Liu-Hy/ns-vit.
title Approximate Nullspace Augmented Finetuning for Robust Vision Transformers
topic Computer Vision and Pattern Recognition
Machine Learning
url https://arxiv.org/abs/2403.10476