T-MLA: Targeted Multiscale Log-Exponential Attack for Neural Image Compression
Project description
T-MLA: A Targeted Multiscale Log-Exponential Attack Framework for Neural Image Compression
Wavelet-aware adversarial perturbations. (a) PGD-based attack with small-magnitude noise, visually clean yet disruptive after compression. (b) Proposed wavelet-aware attack is also imperceptible but more stealthy. (c) Wavelet coefficients of (a) reveal widespread noise in flat regions. (d) Coefficients of (b) closely resemble the clean input, indicating reduced detectability.
Official implementation of "T-MLA: A targeted multiscale log–exponential attack framework for neural image compression" (Information Sciences, Q1).
📄 Abstract
Neural image compression (NIC) has become the state-of-the-art for rate-distortion performance, yet its security vulnerabilities remain significantly less understood than those of classifiers. Existing adversarial attacks on NICs are often naive adaptations of pixel-space methods, overlooking the unique, structured nature of the compression pipeline. In this work, we propose a more advanced class of vulnerabilities by introducing T-MLA, the first targeted multiscale log–exponential attack framework. We introduce adversarial perturbations in the wavelet domain that concentrate on less perceptually salient coefficients, improving the stealth of the attack. Extensive evaluation across multiple state-of-the-art NIC architectures on standard image compression benchmarks reveals a large drop in reconstruction quality while the perturbations remain visually imperceptible. On standard NIC benchmarks, T-MLA achieves targeted degradation of reconstruction quality while improving perturbation imperceptibility (higher PSNR/VIF of the perturbed inputs) compared to PGD-style baselines at comparable attack success, as summarized in our main results. Our findings reveal a critical security flaw at the core of generative and content delivery pipelines.
Installation
From PyPI
pip install tmla
To run scripts and the demo, clone the repo and fetch the LIC-TCM model and datasets:
git clone https://github.com/nkalmykovsk/tmla.git
cd tmla
python3 init.py # LIC_TCM + data + weights
From GitHub (development)
pip install git+https://github.com/nkalmykovsk/tmla.git
Then clone the repo and run init.py as above to get scripts/, demo.ipynb, and data.
From source (clone + editable install)
git clone https://github.com/nkalmykovsk/tmla.git
cd tmla
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
pip install -e .
python3 init.py
Docker:
docker build -t tmla-lic-tcm:latest .
docker run -d --gpus all --name tmla-dev -v "$(pwd)":/app -w /app tmla-lic-tcm:latest tail -f /dev/null
# then: docker exec -it tmla-dev python3 init.py
Project structure
tmla/— Python package:config,attacks(multiscale attack, decomposition, reconstruction, metrics),tcm(LIC_TCM loader),utils.scripts/— CLI:run_attack.py,run_batch_parallel.py,compute_entropy.py,collect_metrics.py,build_chart.py.init.py— setup script (clones LIC_TCM, downloads data and weights).LIC_TCM/— created byinit.py; TCM model is loaded from here at runtime.
Usage
Attacks
Single image:
python3 scripts/run_attack.py --image path/to/image.png --model model_name
Batch (dataset × model list):
python3 scripts/run_batch_parallel.py
Image complexity (entropy)
Computes the normalized local Shannon entropy map and global complexity score (as in the paper):
python3 scripts/compute_entropy.py path/to/image.png --save entropy_map.png --show
Releasing a new version
Bump version in pyproject.toml and tmla/__init__.py, then:
python -m build
twine upload dist/*
Citation
If you use this code or the (paper), please cite:
@article{kalmykov2026tmla,
title = {T-MLA: A Targeted Multiscale Log--Exponential Attack Framework for Neural Image Compression},
author = {Kalmykov, N. I. and Dibo, R. and Shen, K. and Zhonghan, X. and Phan, A. H. and Liu, Y. and Oseledets, I.},
journal = {Information Sciences},
volume = {702},
pages = {123143},
year = {2026},
publisher = {Elsevier},
doi = {10.1016/j.ins.2025.123143}
}
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 tmla-0.1.1.tar.gz.
File metadata
- Download URL: tmla-0.1.1.tar.gz
- Upload date:
- Size: 20.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3e36d4a7769be37f7257830b155f4cc6240ebf01cfc4664c56628661d0db418
|
|
| MD5 |
4faaae9da42c16e38d8ff1c09351bd6f
|
|
| BLAKE2b-256 |
c356551f0726a5bff7cdb95b8d945a366ee97bdd6946a6bb7e096a47e70865ef
|
File details
Details for the file tmla-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tmla-0.1.1-py3-none-any.whl
- Upload date:
- Size: 21.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
166e2effc3e109543ec840366a57107acbdc29771adf8e912090fbe4b45a7a7e
|
|
| MD5 |
f92242fb9b4fcf4832a6b23adf0719eb
|
|
| BLAKE2b-256 |
17ca9fc0593ec463fc6260a0590052005993665629de4097808ccb0ddd5eadff
|