Skip to main content

si4attention

PyPI - Version PyPI - Python Version PyPI - License

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.

Metadata

Release files for si4attention 1.0.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 si4attention 1.0.0
File Size Uploaded
si4attention-1.0.0.tar.gz 83.0 kB Details

Built distribution (wheel)

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

Total release size: 98.7 kB

Release files / si4attention-1.0.0.tar.gz

Download URL si4attention-1.0.0.tar.gz
Size 83.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cfd4141103f90fc029c8f78374118c9f0f7d09d0bc83dafc49881c67ca73a161
BLAKE2b-256 checksum
How to use checksums
0c51d6ec528216419c218821d3f7998ef96145af28a714696e747eaeefca16e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.5

Release files / si4attention-1.0.0-py3-none-any.whl

Download URL si4attention-1.0.0-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
815652c4ecd3a0b7b8e11c19f8bf3a83edb8c792c3e637caf48d05644a4f4cda
BLAKE2b-256 checksum
How to use checksums
88d1b96dd44bb6e351dc7d5fa26a6d7528cb892362bfdb66c608db6e0da751e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.5

Release history Release notifications | RSS feed

This release

1.0.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