Skip to content

Onboarding Humans to work with AI: Algorithms to find regions and describe them in natural language that show how humans should collaborate with AI (NeurIPS23)

Notifications You must be signed in to change notification settings

hechengbo-H/onboarding_human_ai

 
 

Repository files navigation

IntegrAI: Effective Human-AI Teams via Learned Natural Language Rules and Onboarding

Associated code for paper Effective Human-AI Teams via Learned Natural Language Rules and Onboarding published in NeurIPS 2023 (spotlight).

What is it?

People are relying on AI agents to assist them with various tasks. The human must know when to rely on the agent, collaborate with the agent, or ignore its suggestions. Our procedure gives a way to better understand how the human and the AI should collaborate.

The first piece is the human's prior knowldge and trust of the AI, i.e. does the human trust the AI on all the data, never trusts the AI, or trust the AI on only a subset of the data. Given the human's prior, we discover and describe regions of the data space that disprove the human's prior. For example, if the human always trusted the AI, we find a (or many) susbet(s) of the data and describe it in natural languague where the AI has worse performanc than the human (and vice versa).

Concretely, our procedure is composed of two parts:

  • A region disovery algorithm (IntegrAI-discover) that discovers such subsets of the data space as local neighborhoods in a cross modal embedding space.

  • A region description algorithm (IntegrAI-describe) that descibes these subsets in natural language using large language models (LLMs).

Each of these algorithms is implemented in this repo as well as baseline approaches with multiple datasets to test them on.

For a demo, see colab jupyter notebook.

Overview of IntegrAI procedure

Installation

Clone the repo:

git clone https://github.com/clinicalml/onboarding_human_ai.git

cd into the repo and create a new conda environmnt (Python 3.8.13) from our environment.yml file:

conda env create -f environment.yml

Finally activate the environment:

conda activate onboardai

To download pre-processed datasets and user study data, use this google drive link https://drive.google.com/file/d/1Hh4PKR7JbbgLx8_C2IQkphtXK3wixum1/view?usp=sharing

Demo

In colab jupyter notebook we give an end-to-end example where we load a subset of the imagenet dataset, a pre-trained AI model and then discover regions of the model where the model is really good and describe them.

More demos will be included later on.

Organization

This code repository is structured as follows:

  • in src we have the code for the core functionalities of our algorithms organized as follows:

    -src/datasets_hai has files for each dataset used in our method and code to donwload and process the datasets.

    -src/describers has files for each region description method in our paper

    -src/teacher_methods has files for each region discovery method in our paper

    -src/teacher_methods has a notebook to showcase the human-AI card

  • in interface_user_study we have the raw code for the interfaces used in the BDD and MMLU user studes (with Firebase)

  • in experiments we have jupyter notebooks to reproduce the results in Section 6 (method evaluation)

  • in user_study_analysis we have have jupyter notebooks to reproduce the results in Section 7 (user study results)

Paper Reproducibility

To reproduce figures and results from the paper, you can run the following notebooks:

Note: all experiments involve randomness, so results are not deterministic.

Citation

@article{mozannar2023effective,
     title={Effective Human-AI Teams via Learned Natural Language Rules and Onboarding}, 
      author={Hussein Mozannar and Jimin J Lee and Dennis Wei and Prasanna Sattigeri and Subhro Das and David Sontag},
      year={2023},
      journal={Advances in Neural Information Processing Systems}
}

Acknowledgements

This work is partially funded by the MIT-IBM Watson AI Lab.

About

Onboarding Humans to work with AI: Algorithms to find regions and describe them in natural language that show how humans should collaborate with AI (NeurIPS23)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 61.8%
  • JavaScript 15.6%
  • Python 12.2%
  • HTML 9.5%
  • CSS 0.9%