DETAIL: Task DEmonsTration Attribution for Interpretable In-context Learning

Zijian Zhou, Xiaoqiang Lin, Xinyi Xu, Alok Prakash, Daniela Rus +1 more
5/22/2024
cs.CLcs.AIcs.LG

No official code found. Best implementation: BobbyZhouZijian/detail_release (6 stars, last commit 2025-01-05).

Abstract

In-context learning (ICL) allows transformer-based language models that are pre-trained on general text to quickly learn a specific task with a few "task demonstrations" without updating their parameters, significantly boosting their flexibility and generality. ICL possesses many distinct characteristics from conventional machine learning, thereby requiring new approaches to interpret this learning paradigm. Taking the viewpoint of recent works showing that transformers learn in context by formulating an internal optimizer, we propose an influence function-based attribution technique, DETAIL, that addresses the specific characteristics of ICL. We empirically verify the effectiveness of our approach for demonstration attribution while being computationally efficient. Leveraging the results, we then show how DETAIL can help improve model performance in real-world scenarios through demonstration reordering and curation. Finally, we experimentally prove the wide applicability of DETAIL by showing our attribution scores obtained on white-box models are transferable to black-box models in improving model performance.

View on arXivView PDF

Code Implementations(1)

Official released code for paper title "DETAIL: Task DEmonsTration Attribution for Interpretable In-context Learning"

61Shell, PythonMay 27, 20241 years ago

Similar Papers

Cite this paper

@article{zhou2024detail,
  title  = {DETAIL: Task DEmonsTration Attribution for Interpretable In-context Learning},
  author = {Zijian Zhou and Xiaoqiang Lin and Xinyi Xu and Alok Prakash and Daniela Rus and Bryan Kian Hsiang Low},
  year   = {2024},
  eprint = {2405.14899},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2405.14899},
  url    = {http://arxiv.org/abs/2405.14899v2},
  journal = {NEURIPS 2024 2024}
}

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/2405.14899.svg)](https://codeofpaper.com/paper/2405.14899)

Discussion