Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Resilient Forecaster

Defending LSTM Models Against Data Poisoning Attacks


πŸ“Œ Overview

Resilient Forecaster demonstrates how machine learning models can be vulnerable to data poisoning attacks and how defensive mechanisms can restore model performance.

We simulate an attack on an LSTM-based stock price prediction system and measure:

  • πŸ“‰ Performance degradation due to poisoning.
  • πŸ›‘ Recovery after applying statistical defense.

🎯 Problem Statement

Machine learning models rely heavily on clean training data. If an attacker manipulates training labels, the model learns incorrect patterns.

Can we detect and recover from data poisoning using automated defense?


🧠 Project Architecture

The workflow follows a modular pipeline:

  1. Raw Stock Data: Ingested via yFinance.
  2. Preprocessing: Scaling and sequence creation (Time-Series Windows).
  3. Execution: Clean Training β†’ Poisoned Training β†’ Defended Training.
  4. Comparison: Evaluation via Mean Squared Error (MSE).

βš™οΈ Technologies Used

  • Python (Core Language)
  • TensorFlow / Keras (Deep Learning)
  • NumPy & Pandas (Data Manipulation)
  • Scikit-learn (Preprocessing)
  • Matplotlib (Visualization)
  • yFinance (Stock Data)

πŸ—‚ Project Structure

Resilient_Forecaster/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ attacker.py        # Poisoning logic
β”‚   β”œβ”€β”€ defender.py        # Restoration logic
β”‚   β”œβ”€β”€ model_lstm.py      # LSTM architecture
β”‚   └── data_loader.py     # Data fetching
β”œβ”€β”€ main.py                # Main pipeline
└── README.md              # Documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages