A federated learning (FL) system that is friendly to users with diverse backgrounds, for instance, in healthcare. Starfish enables secure, privacy-preserving collaborative machine learning across multiple sites without centralizing sensitive data.
Starfish is a complete federated learning platform consisting of three main components:
- Controller - Site management and FL task execution
- Router - Central coordination and message routing
- Workbench - Development and testing environment
Sites: Local environments that can act as coordinators or participants in federated learning projects.
Controllers: Installed on each site to manage local training, model aggregation, and provide a web interface for users.
Coordinators: Sites that create and manage FL projects, orchestrate training rounds, and perform model aggregation.
Participants: Sites that join existing projects and contribute their local data to collaborative training.
Router: Central routing server that maintains global state, facilitates communication between sites, and forwards messages between participants and coordinators.
Projects: Define one or multiple FL tasks with specified coordinator and participants.
Tasks: Individual machine learning operations (e.g., LogisticRegression, LinearRegression) within a project.
Runs: Execution instances of a project, allowing repeated training over time.
-
Clone the repository
git clone <repository-url> cd starfish
-
Start all services using Workbench
The workbench provides a complete development environment with all components:
cd workbench make build make up -
Initialize the database (first time only)
./init_db.sh
-
Create superuser for router (first time only)
docker exec -it starfish-router poetry run python3 manage.py migrate docker exec -it starfish-router poetry run python3 manage.py createsuperuser
Make sure the username and password match what's configured in
workbench/config/controller.env. -
Access the applications
- Router API: http://localhost:8000/starfish/api/v1/
- Controller Web Interface: http://localhost:8001/
-
Stop the services
make stop # Stop services make down # Stop and remove containers
The Controller component is installed on each site participating in federated learning.
Key Features:
- Web-based user interface for project management
- Local model training and dataset management
- Support for multiple ML tasks (Logistic Regression, Linear Regression, SVM, ANCOVA)
- Real-time progress monitoring
- Celery-based distributed task processing
Standalone Setup:
See controller/README.md for detailed installation and configuration.
Quick Start:
cd controller
docker-compose up -d
docker exec -it starfish-controller poetry run python3 manage.py migrateAccess at: http://localhost:8001/
The Router (Routing Server) maintains global state and coordinates communication between sites.
Key Features:
- RESTful API for site and project management
- Message forwarding between participants and coordinators
- Persistent storage for administrative data
- Support for end-to-end encryption
- Automated health checks via cron jobs
Standalone Setup:
See router/README.md for detailed installation and configuration.
Quick Start:
cd router
docker-compose up -d
docker exec -it starfish-router poetry run python3 manage.py migrate
docker exec -it starfish-router poetry run python3 manage.py createsuperuserAccess at: http://localhost:8000/starfish/api/v1/
The Workbench provides a unified development and testing environment for the entire Starfish platform.
Key Features:
- Docker Compose orchestration for all components
- Unified configuration management
- Development utilities and scripts
- Makefile-based build system
Documentation:
See workbench/README.md for detailed usage.
Commands:
cd workbench
make build # Build all services
make up # Start all services
make stop # Stop services
make down # Stop and remove containers- Controller User Guide - Comprehensive guide for using the Controller web interface
- Task Configuration Guide - How to configure FL tasks and models
- Backend: Python 3.10.10, Django
- Task Queue: Celery
- Databases: PostgreSQL (Router), SQLite (Controller)
- Cache: Redis
- ML Libraries: scikit-learn, NumPy, Pandas
- Containerization: Docker, Docker Compose
Router Tests:
cd router
docker exec -it starfish-router poetry run python3 manage.py testController Tests:
cd controller
docker exec -it starfish-controller poetry run python3 manage.py testEach component uses environment files for configuration:
- Controller:
controller/.envorworkbench/config/controller.env - Router:
router/.envorworkbench/config/router.env
Key configuration options:
Controller:
SITE_UID: Unique identifier for the siteROUTER_URL: URL of the routing serverROUTER_USERNAME: Authentication credentialsROUTER_PASSWORD: Authentication credentialsCELERY_BROKER_URL: Redis connection for CeleryREDIS_HOST: Redis host for caching
Router:
DATABASE_HOST: PostgreSQL hostPOSTGRES_DB: Database namePOSTGRES_USER: Database usernamePOSTGRES_PASSWORD: Database passwordSECRET_KEY: Django secret key
- Logistic Regression: Binary classification with standard logistic regression
- Statistical Logistic Regression: Binary classification with statistical inference (coefficients, p-values, confidence intervals)
- Linear Regression: Continuous value prediction
- SVM Regression: Support Vector Machine regression
- ANCOVA: Analysis of Covariance for statistical analysis
See TASK_GUIDE.md for configuration details.
- End-to-end encryption support for message payloads
- Secure private key exchange between sites
- Authentication required for router access
- Site-specific UIDs for identification
- No centralized data storage - data remains at local sites
Contributions are welcome! Please ensure:
- Code follows existing style and conventions
- Tests are included for new features
- Documentation is updated as needed
- Docker configurations are tested
See License files in each component directory.
For issues, questions, or contributions:
- Check component-specific README files
- Review user guides and task documentation
- Open an issue in the repository
If you use Starfish in your research, please cite:
@software{starfish,
title = {Starfish: A Federated Learning System},
author = {DENOS Lab},
year = {2026},
url = {https://github.com/denoslab/starfish}
}

