Qora: Quorum-Oriented Robust Aggregation for Federated Learning
Project description
Qora-FL
Quorum-Oriented Robust Aggregation for Federated Learning
Byzantine-tolerant aggregation for federated learning. Handles up to 30% malicious clients with minimal overhead.
Features
- Trimmed Mean - Coordinate-wise outlier trimming (~30% Byzantine tolerance)
- Median - Coordinate-wise median (~50% Byzantine tolerance)
- Krum - Distance-based selection with fixed-point arithmetic (Blanchard et al., 2017)
- FedAvg - Standard baseline for comparison
- Reputation tracking - Automatically scores clients based on contribution quality
- Deterministic consensus - Optional I16F16 fixed-point math for bit-perfect reproducibility
Quick Start
cargo add qora-fl
use qora_fl::{ByzantineAggregator, AggregationMethod};
use ndarray::array;
let mut agg = ByzantineAggregator::new(AggregationMethod::TrimmedMean, 0.3);
let updates = vec![
array![[1.0, 2.0]], // Honest
array![[1.1, 2.1]], // Honest
array![[0.9, 1.9]], // Honest
array![[100.0, 200.0]], // Byzantine attacker
];
let result = agg.aggregate(&updates, None).unwrap();
// Result is close to [1.0, 2.0], attacker ignored
Aggregation Methods
| Method | Byzantine Tolerance | Use Case |
|---|---|---|
TrimmedMean |
~30% of clients | Default choice for most FL deployments |
Median |
~50% of clients | When stronger robustness is needed |
Krum |
n >= 2f+3 | Fixed-point deterministic consensus |
FedAvg |
None | Baseline comparison only |
Using Individual Functions
use qora_fl::{trimmed_mean, median, fedavg};
use ndarray::array;
let updates = vec![array![[1.0]], array![[2.0]], array![[3.0]]];
let tm = trimmed_mean(&updates, 0.2).unwrap();
let med = median(&updates).unwrap();
let avg = fedavg(&updates, None).unwrap();
Examples
Quickstart
cargo run --example quickstart
Compare Methods
cargo run --example compare_methods
See examples/ for more.
Background
Core algorithms validated in QRES (181-day autonomous IoT deployment with 30% Byzantine tolerance). Qora-FL adapts this proven consensus to standard federated learning workflows.
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.
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 Distributions
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 qora_fl-0.2.0-cp38-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: qora_fl-0.2.0-cp38-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 404.6 kB
- Tags: CPython 3.8+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61353a66dd667d10b7335ba1c16fadd8732403075f9081af84a86b192e665d94
|
|
| MD5 |
81909672f62b0427900d33f52e1fe136
|
|
| BLAKE2b-256 |
a2b76bd628c9df5cb205dd2ce86120f50beeaa6bd848ce243baca170d505f750
|
Provenance
The following attestation bundles were made for qora_fl-0.2.0-cp38-abi3-manylinux_2_34_x86_64.whl:
Publisher:
release.yml on CavinKrenik/qora-fl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qora_fl-0.2.0-cp38-abi3-manylinux_2_34_x86_64.whl -
Subject digest:
61353a66dd667d10b7335ba1c16fadd8732403075f9081af84a86b192e665d94 - Sigstore transparency entry: 925642044
- Sigstore integration time:
-
Permalink:
CavinKrenik/qora-fl@329570bd76d0ae12c39603e3400c0ee9d31ee7ea -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/CavinKrenik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@329570bd76d0ae12c39603e3400c0ee9d31ee7ea -
Trigger Event:
release
-
Statement type: