Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gsarti/lcl23-xnlm-lab
Materials for the Lab "Explaining Neural Language Models from Internal Representations to Model Predictions" at AILC LCL 2023 ๐
https://github.com/gsarti/lcl23-xnlm-lab
ailc diagnostic-classifiers feature-attribution ferret inseq interpretability lab probing-task transformers tutorial xai
Last synced: 13 days ago
JSON representation
Materials for the Lab "Explaining Neural Language Models from Internal Representations to Model Predictions" at AILC LCL 2023 ๐
- Host: GitHub
- URL: https://github.com/gsarti/lcl23-xnlm-lab
- Owner: gsarti
- License: apache-2.0
- Created: 2023-05-16T12:39:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-31T09:46:55.000Z (over 1 year ago)
- Last Synced: 2024-10-24T04:53:21.100Z (2 months ago)
- Topics: ailc, diagnostic-classifiers, feature-attribution, ferret, inseq, interpretability, lab, probing-task, transformers, tutorial, xai
- Language: Jupyter Notebook
- Homepage: https://www.ai-lc.it/en/lectures-2/lectures-2023/
- Size: 4.46 MB
- Stars: 12
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# XNLM Lab @ LCL 2023 ๐
This repository contains materials for the lab *"Explaining Neural Language Models from Internal Representations to Model Predictions"* by [Alessio Miaschi](https://alemiaschi.github.io/) and [Gabriele Sarti](https://gsarti.com/) at the [AILC Lectures on Computational Linguistics 2023](https://www.ai-lc.it/en/lectures-2/lectures-2023/).
## Contents
The lab session is divided in two parts:
- Notebooks [1.1](notebooks/1.1_Transformer_Syntactic_Abilities.ipynb) and [1.2](notebooks/1.2_Probing.ipynb) introduce probing approaches for evaluating the linguistic knowledge of neural language models and shows how diagnostic classifiers can be used to study models' internal representations.
- Notebook [2](notebooks/2_Attribution_Contrastive.ipynb) discusses feature attribution methods and their usage to identify biases and prediction errors in NLMs for classification and generation tasks.
You can find a notebook for each part in the [`notebooks`](notebooks/) folder.
## Tools and Frameworks
The lab sessions make use of the [Jupyter](https://jupyter.org/) environment. You can use the following links to get started:
- [Jupyter Notebook/Lab Installation](https://jupyter.org/install)
- [Jupyter Quickstart](https://docs.jupyter.org/en/latest/running.html)Alternatively, it is possible to use the notebooks via the [Google Colab](https://colab.research.google.com/) web environment simply by clicking on the [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)]() button at the beginning of each notebook. If youโre running on Windows, we recommend following along using a Colab notebook. If youโre using a Linux distribution or macOS, you can use either approach described here. For an intro to the Colab environment, refer to:
- [Colab Quickstart](https://colab.research.google.com/notebooks/intro.ipynb)
The file `requirements.txt` in this repository contains the list of all the packages required to run the lab sessions. You can create a Python virtual environment (Python>=3.8.1) and install them using the following command:
```shell
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```Make sure the virtual environment is activated before running Jupyter. If you are using Colab, simply run the cell at the beginning of each notebook to install the required packages. Refer to [Using a Python Virtual Environment](https://huggingface.co/course/chapter0/1#using-a-python-virtual-environment) for more details on how to create and activate a virtual environment.
## About us
Alessio Miaschi is a Post Doctoral Researcher at the ItaliaNLP Lab from the Institute for Computational Linguistics โA. Zampolliโ (CNR-ILC, Pisa). He received his Ph.D. in Computer Science from the University of Pisa in 2022 with a thesis focused on the definition of techniques for interpreting and understanding the linguistic knowledge implicitly encoded in recent state-of-the-art Neural Language Models. His current research interest mainly focuses on the development and analysis of neural network models for language processing, as well as on the definition of NLP tools for educational applications.
Gabriele Sarti is a PhD student at the Computational Linguistics Group (GroNLP) of the University of Groningen. He is part of the Dutch consortium InDeep, working on interpretability for language generation and neural machine translation. Previously, he worked as a research intern at Amazon Translate NYC, a research scientist at Aindo, and a research assistant at the ItaliaNLP Lab (CNR-ILC, Pisa). His research aims to improve our understanding of generative neural language modelsโ inner workings, with the ultimate goal of enhancing the controllability and robustness of these systems in human-AI interactions.
## Join the Conversation on RiTA ๐ฎ๐น
**[RiTA](https://github.com/RiTA-nlp)** (Risorse per la Lingua Italiana) is a new community aimed at bringing together enthusiasts and professionals of Italian computational linguistics and to create new collaborations for the construction of resources for the Italian language. If you are working on NLP-related topics and want to keep up with latest initiatives
from the Italian research community, you can join the conversation on the [RiTA Discord](https://discord.gg/NHRCVqjaDM) server. See you there! ๐