A utility function is a mathematical formula that assigns a score to each potential client, quantifying the expected benefit of its participation in a federated learning round. It operationalizes the system's objectives by balancing competing factors like model accuracy, training speed, and fairness. Common inputs include the client's data quality, computational resources, network bandwidth, and historical contribution, which are combined into a single, actionable metric for client selection.
Glossary
Utility Function

What is a Utility Function?
In federated learning, a utility function is the core mathematical rule that quantifies the value of selecting a specific client device for a training round.
The design of this function directly governs the efficiency and outcome of the federated process. A function prioritizing clients with large local datasets may accelerate convergence, while one incorporating fairness-aware selection can mitigate bias. Advanced frameworks like Oort use utility functions to jointly optimize statistical utility and system efficiency, making them a critical lever for system architects and CTOs managing decentralized training.
Core Components of a Utility Function
A utility function in client selection is a mathematical formula that quantifies the expected benefit of selecting a specific client. It is the core decision-making engine that balances competing objectives to optimize the federated learning process.
Objective Function
The objective function is the primary mathematical expression the utility function aims to maximize or minimize. It defines the high-level goal of client selection.
-
Common Objectives:
- Statistical Efficiency: Maximize the contribution to global model accuracy (e.g., minimize loss reduction).
- System Efficiency: Minimize round completion time or energy consumption.
- Fairness: Ensure equitable participation across client groups.
- Privacy: Minimize information leakage from selected updates.
-
Example:
U(client) = α * (Statistical Utility) - β * (Resource Cost)
Client Features & Metrics
These are the measurable attributes of a client that serve as inputs to the utility function. They are the raw signals used to evaluate a client's potential value.
-
Data-Centric Features:
- Local Dataset Size: Number of training samples.
- Data Distribution: Statistical properties (e.g., class balance, feature mean/variance).
- Data Freshness: Age or relevance of the local data.
-
System-Centric Features:
- Compute Capability: CPU/GPU speed, available RAM.
- Network Bandwidth & Latency: Upload/download speeds.
- Battery Level & Power State.
- Historical Reliability: Past completion rate and dropout probability.
Weighting Parameters
Weighting parameters (e.g., α, β, γ) are scalar coefficients that control the relative importance of each term in a multi-objective utility function. They encode the system designer's trade-off preferences.
- Role: They transform a multi-objective optimization problem into a single scalar score.
U = α*A + β*B - γ*C - Tuning: Parameters can be static (set by policy) or dynamically adapted using techniques like multi-armed bandits or reinforcement learning based on observed training progress.
- Impact: A high weight on resource cost (β) will bias selection toward powerful, well-connected devices, while a high weight on statistical utility (α) may select clients with large, diverse datasets regardless of their speed.
Aggregation & Normalization
This component handles the scaling and combination of heterogeneous client features into a comparable, unitless score. Different features (e.g., dataset size in GB vs. latency in ms) must be normalized before they can be weighted and summed.
-
Normalization Techniques:
- Min-Max Scaling:
(value - min) / (max - min)across the client pool. - Z-score Standardization:
(value - mean) / standard deviation. - Log Transformation: For heavily skewed features like dataset size.
- Min-Max Scaling:
-
Aggregation Functions: The method for combining normalized terms. A linear weighted sum is most common, but non-linear functions like product or minimum can enforce different combinatorial logic.
Constraint Functions
Constraint functions are hard or soft rules that define the feasibility of selecting a client, independent of its utility score. They ensure operational and policy requirements are met.
-
Hard Constraints (Eligibility): Boolean conditions that must be true for selection.
Is client online?Is battery > 20%?Has client passed a secure attestation check?
-
Soft Constraints (Penalties): Incorporated into the utility function as penalty terms for undesirable states.
- A penalty term for selecting a client with high data skew.
- A penalty for frequently selecting the same client (to promote fairness).
Selection Policy Interface
The selection policy interface is the mechanism that translates the computed utility scores into an actual set of selected clients. The utility function provides scores; the policy makes the final choice.
- Common Policies:
- Greedy Top-K: Select the
Kclients with the highest utility scores. - Probability Proportional to Size: Select clients with a probability proportional to their utility score.
- Power-of-Choice: Sample a random subset, then choose the highest-utility client from that subset.
- Multi-Armed Bandit: Use scores to balance exploration (trying new clients) and exploitation (using known high-utility clients).
- Greedy Top-K: Select the
This decoupling allows the same utility function to be used with different operational policies.
How a Utility Function Works in Client Selection
In federated learning, a utility function is the core mathematical engine that quantifies the expected value of selecting a specific client, enabling systematic optimization of the training process.
A utility function is a mathematical scoring rule that assigns a numerical value to each potential federated learning client, quantifying its expected contribution to the global training objective. It formalizes the trade-offs between competing goals like model accuracy, training speed, and fairness into a single, optimizable metric. System architects use this score to rank and select the most valuable participants for each training round.
Common inputs to a utility function include the client's local data quality, computation speed, network bandwidth, and the norm of its model update. Frameworks like Oort and FedCS implement utility functions that jointly optimize statistical efficiency and system performance. By maximizing the aggregate utility of selected clients, the server accelerates convergence while managing stragglers and resource heterogeneity across the edge network.
Examples of Utility Functions in Practice
Utility functions in federated learning translate abstract goals into concrete, quantifiable scores for selecting the most beneficial clients. Here are canonical examples used in production systems and research.
Statistical Utility (Loss-Based)
This function prioritizes clients whose local data is most informative for reducing the global model's loss. A common implementation is Oort's utility, which scores a client i as:
U_i = |D_i| * √(loss_i)
- |D_i| is the size of the client's local dataset.
- loss_i is the client's local training loss from the previous round.
- This balances data volume with data 'hardness', favoring clients with large, challenging datasets that drive faster convergence.
System Efficiency (Resource-Aware)
This function selects clients to minimize round completion time and resource waste, crucial for mobile and IoT deployments. It incorporates:
- Expected Training Time: Based on device CPU/GPU capability and current load.
- Expected Communication Time: Based on available network bandwidth and latency.
- Battery Level: To avoid draining critical devices.
Frameworks like FedCS use such a utility to select clients that can complete training within a deadline, effectively mitigating stragglers.
Contribution Valuation (Shapley Value)
Here, utility is defined as a client's marginal contribution to the global model's performance. The Shapley Value from cooperative game theory is computed as:
φ_i(v) = Σ_{S ⊆ N \ {i}} (|S|! (|N| - |S| - 1)! / |N|!) * [v(S ∪ {i}) - v(S)]
- N is the set of all clients.
- S is a subset of clients without
i. - v(S) is the performance (e.g., accuracy) of a model trained on the data from coalition
S.
This provides a theoretically fair valuation for incentive mechanisms, though it is computationally expensive.
Gradient Norm Maximization
This approach selects clients whose local updates (gradients) have the largest magnitude, under the assumption they will induce the most significant change in the global model. The utility is simply the norm of the client's gradient:
U_i = ||∇F_i(w)||
- ∇F_i(w) is the gradient of the loss function on client
i's data at the current global model weightsw. - This is a proxy for the significance of the update. Power-of-choice selection often uses this heuristic by sampling a random pool and picking the client with the largest gradient norm.
Fairness and Diversity
This utility function aims to correct for selection bias and improve model robustness. It scores clients to ensure representation across the population. Methods include:
- Stratified Sampling Utility: Assigns higher utility to clients from underrepresented strata (e.g., a rare device type or geographic region).
- TiFL (Tier-based FL): Groups clients into tiers by performance; utility is adjusted to select proportionally from each tier.
- Counterfactual Utility: Estimates the performance drop if a client group were excluded, promoting groups whose inclusion improves worst-case performance.
Multi-Objective Hybrid Utility
Production systems often combine multiple objectives into a single scalar score. A canonical example is the Oort framework's final utility, which performs a Pareto-optimal trade-off:
U_i = (StatisticalUtility_i)^α * (1 / SystemPenalty_i)^(1-α)
- StatisticalUtility_i: The loss-based score.
- SystemPenalty_i: The estimated time for the client to complete the round.
- α: A tunable hyperparameter (0 ≤ α ≤ 1) that controls the trade-off between model accuracy and training speed.
This allows system architects to dynamically prioritize speed or accuracy based on deployment constraints.
Frequently Asked Questions
A utility function is the core mathematical engine of client selection in federated learning. It quantifies the expected value of selecting a specific device, balancing competing objectives like model accuracy, training speed, and fairness to optimize the overall federated system.
A utility function is a mathematical formula that assigns a numerical score to a potential federated learning client, quantifying the expected benefit of selecting that device for a training round. It translates system objectives—such as faster convergence, higher model accuracy, or fair participation—into a single, comparable metric that drives automated client selection decisions. The function typically incorporates factors like the client's data quality, computational resources, network bandwidth, and historical contribution. By ranking clients based on this calculated utility, the central server can strategically choose participants to maximize the efficiency and effectiveness of the decentralized training process.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
A utility function is a core component of intelligent client selection. These related concepts define the metrics, constraints, and frameworks that shape how utility is calculated and applied in federated systems.
Client Scoring
The process of assigning a numerical value to each potential participant based on a composite utility function. This score typically aggregates multiple factors:
- Data Quality: Freshness, label distribution, or dataset size.
- System Resources: Available compute, memory, battery, and bandwidth.
- Historical Contribution: Past update quality or reliability.
- Statistical Utility: Expected impact on global model convergence. Scores are used to rank clients for priority selection, moving beyond simple random sampling.
Resource-Aware Selection
A selection strategy that prioritizes clients based on their available computational resources and network conditions. The utility function heavily weights:
- Device Capability (CPU/GPU, memory)
- Battery Level (to avoid draining user devices)
- Network Bandwidth & Latency
- Estimated Training Time The goal is to minimize stragglers—slow devices that delay round completion—and improve overall system efficiency. Frameworks like FedCS formalize this by selecting clients that can complete training within a deadline.
Fairness-Aware Selection
An approach that incorporates fairness constraints into the utility function to prevent systematic bias. Objectives include:
- Ensuring devices from specific geographic or demographic groups are not underrepresented.
- Guaranteeing clients with rare data distributions participate sufficiently.
- Enforcing proportional selection based on population strata. Without fairness constraints, utility maximization can lead to selection bias, where the global model overfits to data from a small subset of high-utility (e.g., well-resourced) clients, harming generalization and equity.
Gradient Norm
A common proxy metric used within utility functions to estimate a client's potential contribution. It involves computing the L2-norm (magnitude) of the client's local model update (gradient).
- Rationale: A larger gradient norm may indicate the client's data contains information the global model has not yet learned, making its update more valuable.
- Calculation: Performed on a small proxy dataset or based on the client's previous update.
- Limitation: Can be gamed by malicious clients and may not correlate perfectly with true utility in non-convex settings. Often used in heuristics like power-of-choice.
Multi-Armed Bandit Formulation
A formal online learning framework for client selection where each client is an "arm." The system must balance:
- Exploration: Selecting new or uncertain clients to gather information about their utility.
- Exploitation: Selecting known high-utility clients to maximize immediate reward (e.g., model improvement). Algorithms like Upper Confidence Bound (UCB) or Thompson Sampling are adapted to sequentially choose clients, continuously updating estimates of each client's utility based on observed rewards (e.g., loss reduction). This is essential for environments with dynamic client availability and data drift.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us