Skip to main content

Package for statistical test for attention in Transformers

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

si4attention-1.0.0.tar.gz (83.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

si4attention-1.0.0-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

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

Hashes for si4attention-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cfd4141103f90fc029c8f78374118c9f0f7d09d0bc83dafc49881c67ca73a161
MD5 0c65195fcfe773e6a21b27b13f2b38d1
BLAKE2b-256 0c51d6ec528216419c218821d3f7998ef96145af28a714696e747eaeefca16e4

See more details on using hashes here.

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

Hashes for si4attention-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 815652c4ecd3a0b7b8e11c19f8bf3a83edb8c792c3e637caf48d05644a4f4cda
MD5 ec09a68cf8f260c328c4936721c6478f
BLAKE2b-256 88d1b96dd44bb6e351dc7d5fa26a6d7528cb892362bfdb66c608db6e0da751e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page