Skip to content

tripathimanas1/explainable-nlp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Explainable AI for NLP

This project demonstrates how to create a transformer-based NLP model that combines deep learning with explainable AI techniques for tasks like sentiment analysis and text classification. The model provides both accurate predictions and interpretable explanations using attention visualization and extractive rationale methods, enhancing transparency and human comprehensibility.

Table of Contents

Introduction

In this project, we use a transformer-based model (BERT) to perform sentiment analysis on the IMDb dataset. Additionally, we employ explainable AI techniques such as attention visualization and extractive rationales to make the model's predictions interpretable.

Features

  • Transformer-based NLP model using BERT
  • Sentiment analysis on the IMDb dataset
  • Attention visualization for model interpretation
  • Extractive rationales to highlight important words contributing to the prediction

Dataset

We use the IMDb dataset for training and testing our model. The dataset is available through the Hugging Face datasets library.

Installation

To get started, clone the repository and install the required dependencies:

git clone https://github.com/yourusername/explainable-nlp.git
cd explainable-nlp
pip install -r requirements.txt

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages