Federated Learning for Privacy-Preserving Financial Data Generation with RAG Integration
This project implements a federated learning framework combined with a Retrieval-Augmented Generation (RAG) system to generate privacy-preserving synthetic financial data.
Features
- Federated Learning using TensorFlow Federated
- Privacy-preserving data generation using VAE/GAN
- RAG integration for enhanced data quality
- Secure Multi-Party Computation (SMPC)
- Differential Privacy implementation
- Kubernetes-based deployment
- Comprehensive monitoring and logging
Installation
pip install -r requirements.txt
Usage
Project Structure
License
MIT
Contributing
Federated Credit Scoring Demo (with Web App)
This project includes a demo where multiple banks (clients) collaboratively train a credit scoring model using federated learning. A Streamlit web app allows you to enter customer features and get a credit score prediction from the federated model.
Quick Start
- Install dependencies
pip install -r requirements.txt
- Start the Federated Server
python -m src.main --mode server --config config/server_config.yaml
- Start at least two Clients (in separate terminals)
python -m src.main --mode client --config config/client_config.yaml
- Run the Web App
streamlit run webapp/streamlit_app.py
- Use the Web App
- Enter 32 features (dummy values are fine for demo)
- Click "Predict Credit Score" to get a prediction from the federated model
- View training progress in the app
For best results, keep the server and at least two clients running in parallel.