Skip to main content

A project about Audio models and it's fragility

Project description

Audio XAI Fragility

PyPI version

A project about Audio models and it's fragility

Features

  • TODO

Documentation

Documentation is built with Zensical and deployed to GitHub Pages.

API documentation is auto-generated from docstrings using mkdocstrings.

Docs deploy automatically on push to master via GitHub Actions. To enable this, go to your repo's Settings > Pages and set the source to GitHub Actions.

Development

To set up for local development:

# Clone your fork
git clone git@github.com:your_username/Audio-XAI-Fragility.git
cd Audio-XAI-Fragility

# Install in editable mode with live updates
uv tool install --editable .

This installs the CLI globally but with live updates - any changes you make to the source code are immediately available when you run audio_xai_fragility.

Run tests:

uv run pytest

Run quality checks (format, lint, type check, test):

just qa

Author

Audio XAI Fragility was created in 2026 by Piotr Kitłowski.

Built with Cookiecutter and the audreyfeldroy/cookiecutter-pypackage project template.

1. General Information and Project Objective

The main objective of the project is to investigate the perceptual fragility of explanations (XAI methods) for deep learning models in the audio domain while keeping predictions unchanged.

2. Planned scope of experiments

  • Datasets: Public datasets such as the Speech Commands Dataset (speech) and Sonics (synthetic/real music) will be used. The project will strictly ensure the immutability of the original data.
  • Research models: Utilization and adaptation of audio recognition architectures: Audio Spectrogram Transformer, VGGish, Spectra, and ViT.
  • XAI methods: Investigation of the vulnerability of gradient-based methods such as Grad-CAM and Integrated Gradients.
  • Perceptual constraints: Instead of optimizing attacks against standard metrics, perceptual metrics will be considered (PESQ and STOI for speech, PEAQ for music).
  • Computational resources and training: The project will require hardware acceleration (GPUs with a minimum of 16 GB VRAM). The estimated training and fine-tuning time for the base models is approximately 15 hours, while the main process of optimizing perceptual perturbations (XAI attack) for the entire test set is estimated to take an additional 25–30 hours of computation.

3. Planned Program Features

  • Classification and Attribution Module: Reading models and generating explanation maps for them.
  • Perturbation module: Generating subtle modifications to the audio signal with optimization that preserves high perceptual metrics (e.g., maintaining a PESQ score above 4.0).
  • Deployment and Automation: Scripted building, testing, and deployment of applications using tools such as just and Python scripts built with typer or argparse.
  • Final deliverables: The project will include clear documentation, user instructions, and tests relevant to the project’s scope.

4. Planned Technology Stack

The project will implement a robust base structure, automatically generated by tools such as cookiecutter or copier.

  • Environment management: Use of an isolated virtual environment managed by uv or conda.
  • Code cleanliness: Enforced PEP8-compliant coding style with an increased line length limit. Syntax checking provided by an autoformatter (e.g., black or ruff) and a linter (ruff).
  • Version control: Rigorous use of a code repository with the conventional commits specification implemented.
  • Frameworks and AI: Implementation of learning logic in dedicated frameworks such as PyTorch Lightning in conjunction with Huggingface libraries. Code used for experiments will be continuously exported from Jupyter Lab notebooks into structured library code.
  • Experiments and configuration: Tracking progress, metrics, and logs using the Weights & Biases or Tensorboard platform. The configuration of model parameters and experiments will be completely separated from the execution code.
  • Documentation: Use of mkdocs to fast and simple write documentation

5. Project schedule

Deadline dates Planned scope of work and progress
30.03.2026 - 05.04.2026 Repository configuration (Cookiecutter, Ruff, Uv). Defining the directory structure and ensuring that audio files remain immutable.
06.04.2026 - 12.04.2026 Connecting W&B/TensorBoard. Training base classifiers using the PyTorch Lightning framework. (Estimated resource requirements: 15 hours of GPU computation)
13.04.2026 - 19.04.2026 Implementation of explanation-generating (XAI) modules in clean code, after first exporting experiments from notebooks. Writing the first tests.
20.04.2026 - 26.04.2026 Separating configuration from executable code. Preparing baseline attacks on attribution maps using standard distance metrics.
27.04.2026 - 03.05.2026 Implementation of PESQ/STOI/PEAQ metric approximations directly into the attack optimization loop (generation of perceptual perturbations).
04.05.2026 - 10.05.2026 Launch of the main research experiments on a dedicated cluster. (Estimated resource requirements: 25–30 hours of GPU computing for iterative processes).
11.05.2026 - 17.05.2026 Scripting the execution of the entire experiment using the just tool and CLI libraries (e.g., typer). Aggregating tables containing the results.
18.05.2026 - 24.05.2026 Finalization of the work: creating documentation and clear instructions for using the finished system. Organizing the code in accordance with PEP8. Preparation of the paper(?)

6. Bibliography Review

Paper Notes
Interpretation of neural networks is fragile TODO
Explanations can be manipulated and geometry is to blame TODO
Constructing adversarial examples to investigate the plausibility of explanations in deep audio and image classifiers TODO
Perceptual Coding In Python TODO
TODO TODO

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

audio_xai_fragility-0.0.2.tar.gz (49.9 kB view details)

Uploaded Source

Built Distribution

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

audio_xai_fragility-0.0.2-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file audio_xai_fragility-0.0.2.tar.gz.

File metadata

  • Download URL: audio_xai_fragility-0.0.2.tar.gz
  • Upload date:
  • Size: 49.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for audio_xai_fragility-0.0.2.tar.gz
Algorithm Hash digest
SHA256 9da06a0d0495ec825ec2f2a82f5d1c3feda5c4a2a21c773e4871e585fe7db2e2
MD5 f9bb2c3082a93cf7f8fda69487b317ee
BLAKE2b-256 5e0933eaadd7c3d063eab53d6575ea42861b7e70f71ab935fcab966066052d95

See more details on using hashes here.

Provenance

The following attestation bundles were made for audio_xai_fragility-0.0.2.tar.gz:

Publisher: publish.yml on cncPomper/Audio-XAI-Fragility

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file audio_xai_fragility-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for audio_xai_fragility-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 41187b5fc480502f1c209f04cbccc5aec4fc2897b46cb43bf7ec471f9a8cf875
MD5 a4ba5680d27b9badf875463f663261e0
BLAKE2b-256 3f57606c38d01a1ec543646cbcd27f2396f89bfb3fbeb60d57b70fa1eba4bfec

See more details on using hashes here.

Provenance

The following attestation bundles were made for audio_xai_fragility-0.0.2-py3-none-any.whl:

Publisher: publish.yml on cncPomper/Audio-XAI-Fragility

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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