Code Monkey home page Code Monkey logo

interpreting-context-look-ups's Introduction

Repository for "Interpreting Context Look-ups in Transformers: Investigating Attention-MLP Interactions"

Authors: Clement Neo, Shay B. Cohen, and Fazl Barez

This repository contains the code and data for the paper "Interpreting Context Look-ups in Transformers: Investigating Attention-MLP Interactions". The paper explores the interplay between attention heads and specialized "next-token" neurons in the Multilayer Perceptron (MLP) layer of transformers, focusing on how these components interact to predict specific tokens.

Usage Instructions

  1. Run the notebooks. The main notebooks in notebooks/ are notebooks 1-7, while 8 and 9 are additional experiments (like head ablation and neuron ablation). The main notebooks save data to experiment_data/.

References

To cite this work, please use the following BibTeX entry:

@misc{neo2024interpreting,
  title={Interpreting Context Look-ups in Transformers: Investigating Attention-MLP Interactions}, 
  author={Clement Neo and Shay B. Cohen and Fazl Barez},
  year={2024},
  eprint={2402.15055},
  archivePrefix={arXiv},
  primaryClass={cs.CL}
}

interpreting-context-look-ups's People

Contributors

fbarez avatar clemneo avatar

Stargazers

ben avatar Christos Ziakas avatar Laxman Singh Tomar avatar  avatar fishlegs avatar Kashif Rasul avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.