Package for statistical test for attention in Transformers
Project description
si4attention
This package provides a statistical test for attention in Transformers for images and time series. The tequnical details are described in the paper "Statistical Test for Attention in Transformers for Images and Time Series"
Installation & Requirements
This package has the following dependencies:
- Python (version 3.10 or higher, we use 3.12.5)
- torch (version 2.5.0 or higher, we use 2.5.0)
- sicore (version 2.2.0 or higher, we use 2.2.0)
- tqdm (version 4.66.5 or higher, we use 4.67.1)
To install this package, please run the following commands (dependencies will be installed automatically):
$ pip install si4attention
Usage
This package provides a main function test_attention_map that allows you to conduct a statistical test for attention in Transformers.
For API details and usage examples, please refer to the docstring of the function and the example notebook in the demonstration.ipynb file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file si4attention-1.0.0.tar.gz.
File metadata
- Download URL: si4attention-1.0.0.tar.gz
- Upload date:
- Size: 83.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfd4141103f90fc029c8f78374118c9f0f7d09d0bc83dafc49881c67ca73a161
|
|
| MD5 |
0c65195fcfe773e6a21b27b13f2b38d1
|
|
| BLAKE2b-256 |
0c51d6ec528216419c218821d3f7998ef96145af28a714696e747eaeefca16e4
|
File details
Details for the file si4attention-1.0.0-py3-none-any.whl.
File metadata
- Download URL: si4attention-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
815652c4ecd3a0b7b8e11c19f8bf3a83edb8c792c3e637caf48d05644a4f4cda
|
|
| MD5 |
ec09a68cf8f260c328c4936721c6478f
|
|
| BLAKE2b-256 |
88d1b96dd44bb6e351dc7d5fa26a6d7528cb892362bfdb66c608db6e0da751e6
|