Skip to content

Sparsify-then-Classify: Towards Next-Generation Text Classifier Leveraging Internal Neuron Representations from Large Language Models

License

Notifications You must be signed in to change notification settings

difanj0713/SPIN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPIN: Sparsifying and Integrating Internal Neurons in Large Language Models for Text Classification

ACL'24 arXiv Web Demo Python 3.10

Official code repository for our paper SPIN : Sparsifying and Integrating Internal Neurons in Large Language Models for Text Classification by Difan Jiao, Yilun Liu, Zhenwei Tang, Daniel Matter, Jürgen Pfeffer and Ashton Anderson. This repository hosts all experimental infrastructure essential for the paper.

To visually explore how SPIN works, pleaase visit our interactive visualization web demo.

Citation

We would be delighted if our provided resources has been useful in your research or development! 🥰 If so, please consider citing our paper:

@inproceedings{jiao-etal-2024-spin,
    title = "{SPIN}: Sparsifying and Integrating Internal Neurons in Large Language Models for Text Classification",
    author = {Jiao, Difan  and
      Liu, Yilun  and
      Tang, Zhenwei  and
      Matter, Daniel  and
      Pfeffer, J{\"u}rgen  and
      Anderson, Ashton},
    editor = "Ku, Lun-Wei  and
      Martins, Andre  and
      Srikumar, Vivek",
    booktitle = "Findings of the Association for Computational Linguistics ACL 2024",
    month = aug,
    year = "2024",
    address = "Bangkok, Thailand and virtual meeting",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2024.findings-acl.277",
    pages = "4666--4682",
    abstract = "Among the many tasks that Large Language Models (LLMs) have revolutionized is text classification. Current text classification paradigms, however, rely solely on the output of the final layer in the LLM, with the rich information contained in internal neurons largely untapped. In this study, we present SPIN: a model-agnostic framework that sparsifies and integrates internal neurons of intermediate layers of LLMs for text classification. Specifically, SPIN sparsifies internal neurons by linear probing-based salient neuron selection layer by layer, avoiding noise from unrelated neurons and ensuring efficiency. The cross-layer salient neurons are then integrated to serve as multi-layered features for the classification head. Extensive experimental results show our proposed SPIN significantly improves text classification accuracy, efficiency, and interpretability.",
}

About

Sparsify-then-Classify: Towards Next-Generation Text Classifier Leveraging Internal Neuron Representations from Large Language Models

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published