Enhancing In-Context Learning Performance with just SVD-Based Weight Pruning: A Theoretical Perspective

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Yao, Xinhao, Hu, Xiaolin, Yang, Shenzhi, Liu, Yong
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913543940472832
author Yao, Xinhao
Hu, Xiaolin
Yang, Shenzhi
Liu, Yong
author_facet Yao, Xinhao
Hu, Xiaolin
Yang, Shenzhi
Liu, Yong
contents Pre-trained large language models (LLMs) based on Transformer have demonstrated striking in-context learning (ICL) abilities. With a few demonstration input-label pairs, they can predict the label for an unseen input without any parameter updates. In this paper, we show an exciting phenomenon that SVD-based weight pruning can enhance ICL performance, and more surprising, pruning weights in deep layers often results in more stable performance improvements than in shallow layers. However, the underlying mechanism of those findings still remains an open question. To reveal those findings, we conduct an in-depth theoretical analysis by presenting the implicit gradient descent (GD) trajectories of ICL and giving the mutual information based generalization bounds of ICL via full implicit GD trajectories. This helps us reasonably explain the surprising experimental findings. Besides, based on all our experimental and theoretical insights, we intuitively propose a simple, model-compression and derivative-free algorithm for downstream tasks in enhancing ICL inference. Experiments on benchmark datasets and open source LLMs display the method effectiveness\footnote{The code is available at \url{https://github.com/chen123CtrlS/EnhancingICL_SVDPruning}.}.
format Preprint
id arxiv_https___arxiv_org_abs_2406_03768
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Enhancing In-Context Learning Performance with just SVD-Based Weight Pruning: A Theoretical Perspective
Yao, Xinhao
Hu, Xiaolin
Yang, Shenzhi
Liu, Yong
Machine Learning
Artificial Intelligence
Pre-trained large language models (LLMs) based on Transformer have demonstrated striking in-context learning (ICL) abilities. With a few demonstration input-label pairs, they can predict the label for an unseen input without any parameter updates. In this paper, we show an exciting phenomenon that SVD-based weight pruning can enhance ICL performance, and more surprising, pruning weights in deep layers often results in more stable performance improvements than in shallow layers. However, the underlying mechanism of those findings still remains an open question. To reveal those findings, we conduct an in-depth theoretical analysis by presenting the implicit gradient descent (GD) trajectories of ICL and giving the mutual information based generalization bounds of ICL via full implicit GD trajectories. This helps us reasonably explain the surprising experimental findings. Besides, based on all our experimental and theoretical insights, we intuitively propose a simple, model-compression and derivative-free algorithm for downstream tasks in enhancing ICL inference. Experiments on benchmark datasets and open source LLMs display the method effectiveness\footnote{The code is available at \url{https://github.com/chen123CtrlS/EnhancingICL_SVDPruning}.}.
title Enhancing In-Context Learning Performance with just SVD-Based Weight Pruning: A Theoretical Perspective
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2406.03768