Skip to main content

Instance noise reduction framework based on Deep Learning gradients agnostic to the network architecture.

Project description

DenoGrad: Deep Gradient Denoising Framework

arXiv Python License

📄 Description

DenoGrad is a novel gradient-based denoising framework designed to enhance the robustness and performance of Artificial Intelligence models, with a specific focus on interpretable (white-box) models.

Unlike conventional techniques that simply remove noisy instances or significantly alter the data distribution, DenoGrad leverages the gradients of a reference Deep Learning (DL) model—trained on the target data—to dynamically detect and correct noisy samples.

🚀 Key Features

  • Gradient-Based Correction: Utilizes gradient information from deep models to guide the noise reduction process effectively.
  • Distribution Preservation: Corrects instances while maintaining the original data distribution, avoiding oversimplification of the problem space.
  • Task Agnostic: Validated effectively on both tabular data and time-series datasets.
  • Interpretable AI Enhancement: Specifically engineered to boost the performance of interpretable models in noisy environments without sacrificing transparency.

🛠️ Installation

pip install denograd

📖 Basic Usage

import torch
import torch.nn as nn
from denograd import DenoGrad

# Initialize the denoiser with your reference model
denoiser = DenoGrad(
    model=my_deep_model, # DL model fitted to noisy data
    criterion=nn.MSELoss(),
)

# 1. Fit the noisy data
# For Tabular Data
denoiser.fit(
    X=x_noisy, 
    y=y_noisy, 
    is_ts=False
)

# For Time Series (requires window_size)
# denoiser.fit(
#    X=x_noisy,
#    y=['y'],
#    is_ts=True,
#    window_size=24,
#    future=1,
#    stride=1
# )

# 2. Denoise the dataset
x_clean, y_clean, x_gradients, y_gradients = denoiser.transform(
    nrr = 0.05, # Noise Reduction Rate. Same functionality as learning rate but for denoising porposes.
    nr_threshold = 0.01, # "Level" of noise allowed.
    max_epochs = 200, # Max number of epochs to perform the denoising process.
    denoise_y = True, # Enable denoising for the target variable (recommended for Tabular).
    batch_size = 1024,
    save_gradients = True # Save all the gradients calculated through the denoising process.
)

📝 Citation

If you use DenoGrad in your research, please cite our paper:

@article{denograd2025, title={DenoGrad: Deep Gradient Denoising Framework for Enhancing the Performance of Interpretable AI Models}, author={Alonso-Ramos, J. Javier and [Other Authors]}, journal={arXiv preprint arXiv:2511.10161}, year={2025} }

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

denograd-1.0.0.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

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

denograd-1.0.0-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file denograd-1.0.0.tar.gz.

File metadata

  • Download URL: denograd-1.0.0.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.5

File hashes

Hashes for denograd-1.0.0.tar.gz
Algorithm Hash digest
SHA256 322f03bd8ba46df73e1a50664749bb306e963b74f46d0daa0a42b9f30a58d50c
MD5 525f56d1da0e64f00f8ca2f82397d6a8
BLAKE2b-256 853d5ac99f2514acda8bcbaf10b7be12ae88ee83fcb7e6b70860ad00143083a6

See more details on using hashes here.

File details

Details for the file denograd-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: denograd-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.5

File hashes

Hashes for denograd-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f1db56ca158fdee4716c8aac856b2fc5bffab56384d880ab72036d700874b814
MD5 9b73637346e0db6818938fb9efdc46b4
BLAKE2b-256 9ed26cce6ab3390b9558d0adc7ced6cbe17ba3c6b547853394af85704db685ca

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