Skip to main content

Finspector

Finspector is designed to help users explore the fairness and bias of foundation models using interactive visualizations.

Installation

For a development installation (requires Node.js and Yarn version 1):

$ git clone https://github.com/IBM/finspector.git
$ cd finspector
$ pip install -r requirements.txt
$ pip install -e .
$ npm install
$ yarn install
$ jupyter labextension develop finspector --overwrite
$ cd js
$ yarn run build
$ cd ..

Run Jupyter Example

To run the example, you need a dataset stored in finspector/data/xyz.csv]. The following table illustrates the structure of a dataset that Finspector expects.

bias_type sent_index para_index stereo_type more_or_less
sent
bert roberta albert
socioeconomic 485 0 1 sent_more May the Force be with you. -2.5 -1.5 -2.22
socioeconomic 485 1 1 sent_more May the Power be with you. -2.0 -1.4 -2.87
  • bias_type: bias category (e.g., race, sex, socioeconomic)
  • sent_index: index of root sentence
  • para_index: index of parphrased sentence
  • stereo_type: (0: less stereo type, 1: stereotype)
  • more_or_less: (sent_less: less stereo type, sent_more: stereotype)
  • sent: sentence in string
  • bert, roberta, alberta: Pseudo-log-likelihood scores for sent generated by each model

Once your dataset is ready, you can run

$ jupyter lab

Then, click on acl2023demo.ipynb on your Jupyter lab. The repository includes a small dataset data/sample-movie-quotes.csv for demonstration purpose.

Citation

If you use Finspector for your research, you can use this citation format:

@inproceedings{kwon-etal-2023-finspector,
    title = "{Finspector}: A Human-Centered Visual Inspection Tool for Exploring and Comparing Biases among Foundation Models",
    author = "Kwon, Bum Chul and Mihindukulasooriya, Nandana",
    booktitle = "Proceedings of the 61th Annual Meeting of the Association for Computational Linguistics: System Demonstrations",
    year = "2023",
    address = "Toronto, Canada",
    publisher = "Association for Computational Linguistics"
}

Metadata

Release files for finspector 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for finspector 0.1.0
File Size Uploaded
finspector-0.1.0.tar.gz 559.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for finspector 0.1.0
File Interpreter ABI Platform
finspector-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.2 MB

Release files / finspector-0.1.0.tar.gz

Download URL finspector-0.1.0.tar.gz
Size 559.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f2e45b3e4239deac0ff617b15d960ba9c51b235c0351b64ecafe5efb1b8a3039
BLAKE2b-256 checksum
How to use checksums
2086ae993f988c3fe40b78dcb4bf708bc81963f69bda218d8885028d3ba7e549
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.6

Release files / finspector-0.1.0-py3-none-any.whl

Download URL finspector-0.1.0-py3-none-any.whl
Size 650.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
590e3b4f00e1c51942eb10e36a80af5270d61483d5b11425cfe2a6cd4bf884b6
BLAKE2b-256 checksum
How to use checksums
0389710df148c55a38f572e075d7918bcb1438586313543644e1a4115a4afe90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page