Federated learning is increasingly deployed in settings where the learned model must satisfy functional constraints, such as fairness or safety requirements. Optimizing under these constraints is hard because projecting onto the feasible set is costly, constraint information may be stochastic, and clients participate only partially. The authors propose a federated stochastic switching framework that relies on primal-only updates, removing the need to tune dual variables.

A key theoretical finding is that a direct switching approach retains a nonvanishing constraint-estimation error even when local constraint evaluations are exact. To overcome this, the paper develops variance-reducing constraint estimators that yield vanishing feasibility and stationarity guarantees with fixed per-round client participation and constraint-evaluation batch sizes. The analysis isolates the effects of stochastic gradients, constraint-evaluation noise, and partial participation, and extends to weakly convex objectives via proximal-stationarity guarantees.

The method also supports compression with error feedback for convex objectives, controlling compression-induced bias. Experiments on Neyman-Pearson classification, fairness-constrained learning on the ADULT dataset, and constrained deep reinforcement learning demonstrate the framework's effectiveness across diverse problem types.