v0.4.0 - parallel FairSwarmDP + Flower demo
@
This release closes the items deferred from v0.3.0s punch list.
V0.4-A: Parallel particle evaluation for FairSwarmDP (e688b59)
P0-1 in v0.3.0 left FairSwarmDP on the serial path because the DP loop has three pieces of shared mutable state (self.rng, self._n_queries, self.accountant), each of which would race under parallel execution. This release wires FairSwarmDP into the same ParticleExecutor introduced in P0-1, with:
- Per-particle
SeedSequence-derived generators for both PSO randomness and Gaussian noise sampling. - Privacy accounting deferred to the main thread after each parallel batch. RDP composition is associative, so calling
accountant.step()n_particlestimes sequentially after a parallel batch is mathematically equivalent to per-particle accounting in the serial path. Theorem 4s privacy guarantee is preserved exactly.
Tests confirm bit-identical ε spent across serial/threads/processes for the same seed and iteration count.
V0.4-B: End-to-end Flower simulation demo (e1570a9)
make_flower_accuracy_fn now has a runnable demo at experiments/end_to_end_flower.py. A FairSwarm run drives a real Flower NumPyClient training round per fitness evaluation; held-out accuracy from FedAvg-aggregated logistic regression feeds back into AccuracyFairnessFitness. Picks a coalition with 0.96 held-out accuracy and 0.001 demographic divergence on the synthetic problem.
The demo uses a hand-rolled FedAvg loop rather than flwr.simulation.start_simulation so it runs without the optional flwr[simulation] extra (Ray). The integration pattern is identical in either path; users with Ray installed can swap the loop for start_simulation without changing the NumPyClient or accuracy_fn plumbing.
Test suite
706 passing, 1 skipped, zero failures (+13 since v0.3.0: +9 parallel-DP, +4 Flower integration).
Install
pip install fairswarm==0.4.0
pip install fairswarm[flower]==0.4.0 # for the Flower demoReference
T. Norwood, D. Das, P. Chatterjee, E. Bentley, and U. Ghosh, "FairSwarm: Trustworthy Coalition Selection for Fair and Secure Federated Intelligence," IEEE Trans. Consum. Electron., 2026 (Submitted).
@