TruFLaaS: Trustworthy Federated Learning as a Service

Carlo Mazzocca, Nicolò Romandini, Matteo Mendula, Rebecca Montanari, Paolo BellavistaIEEE Internet of Things Journal 2023 · OpenReview

Abstract

The proliferation of Internet of Things (IoT) and Industrial IoT (IIoT) devices has generated vast amounts of data, driving interest in collaborative machine learning (ML) paradigms like Federated Learning (FL). FL allows participants to train global models without sharing raw on-premises data, addressing privacy and regulatory concerns. However, the technical complexity and cost of FL infrastructure often hinder adoption. Federated Learning as a Service (FLaaS) aims to lower these barriers, but introducing third-party service providers raises significant trust issues among unknown participants. This paper presents TruFLaaS, a blockchain-based architecture designed to provide trustworthy FLaaS. By integrating smart contracts and Decentralized Oracle Networks (DONs), TruFLaaS ensures model integrity through dynamic validation and reputation-based aggregation. Experimental evaluations on IIoT datasets demonstrate that TruFLaaS effectively mitigates poisoning attacks and outperforms existing state-of-the-art solutions.

Introduction

Federated Learning (FL) is a promising solution for collaborative ML, yet its real-world implementation faces two primary challenges: technical complexity and the lack of trust. Setting up FL infrastructure is resource-intensive, leading to the emergence of "as a Service" models. However, in an open FLaaS environment, malicious actors can perform model poisoning or backdoor attacks to degrade the global model's performance. Traditional centralized aggregation methods lack transparency and represent a single point of failure. TruFLaaS addresses these issues by decentralizing the FL lifecycle, providing a transparent and secure environment for collaborative training.

The TruFLaaS Architecture

TruFLaaS leverages a multi-layered architecture to ensure security and scalability across heterogeneous environments.

Overview of the TruFLaaS architecture components, including the Service Provider, Clients, and IoT/IIoT devices.

The architecture consists of three main entities:

  1. Service Provider: Manages the FL task, maintains a validation dataset, and utilizes a Decentralized Oracle Network (DON) to provide fresh validation samples to the blockchain.
  2. Clients: Organizations or entities that perform local training on their private data. Each client maintains a blockchain node and a digital wallet for identity and incentive management.
  3. IoT/IIoT Devices: The source of raw data, which can range from wearable sensors to industrial robotic arms.

Methodology and Workflow

The core innovation of TruFLaaS lies in its use of blockchain and DONs to automate and secure the validation process.

The operational workflow of TruFLaaS, illustrating the interaction between clients, the service provider, and the blockchain.

The workflow follows a structured sequence:

  • Registration and Identity: Clients request participation using Decentralized Identifiers (DID) and receive Verifiable Credentials (VC).
  • Dynamic Validation: To prevent "model forging"—where attackers craft models to pass a specific test—the service provider uses a DON to feed non-overlapping validation samples to the smart contract in each round.
  • Reputation-Based Aggregation: Instead of simple averaging, TruFLaaS employs an Interquartile Range (IQR) method to filter outliers and weights contributions based on a client's historical "Trust Level."
  • Incentives: A token-based system rewards honest contributions and penalizes malicious behavior through deposit slashing.

Experimental Evaluation

The framework was tested against two benchmarks: the NASA Turbofan Jet Engine Dataset (predictive maintenance) and the N-BaIoT Dataset (botnet detection).

Key results include:

  • Attack Resilience: TruFLaaS maintained high accuracy (approx. 80% in botnet detection) even as the number of malicious nodes increased, whereas competing frameworks like TrustFed saw performance collapse.
  • Data Heterogeneity: The system efficiently handled "Non-IID" data (where data distribution varies across clients), reaching target accuracy faster than baseline models.
  • Rare Event Detection: By weighting nodes that possess unique data, the global model remained sensitive to rare but critical events, such as specific engine failure modes.

Conclusion

TruFLaaS demonstrates that blockchain and decentralized oracles can transform Federated Learning into a secure, transparent service. While on-chain validation introduces some computational overhead, the resulting resilience against sophisticated poisoning attacks makes it a viable solution for critical IIoT applications. Future work will focus on optimizing gas costs and exploring more advanced aggregation algorithms to further enhance scalability.

Summary updated

Abstract

The increasing availability of data generated by Internet of Things (IoT) and Industrial IoT (IIoT) devices, as well as privacy and law regulations, have significantly boosted the interest in collaborative machine learning (ML) approaches. In this direction, we claim federated learning (FL) as a promising ML paradigm where participants collaboratively train a global model without outsourcing on-premises data. However, setting up and using FL can be extremely costly and time consuming. To effectively promote the adoption of FL in real-world scenarios, while limiting the overhead and knowledge of the underlying technology, service providers should offer FL as a Service (FLaaS). One of the major concerns while designing an architecture that provides FLaaS is achieving trustworthiness among involved typically unknown participants. This article presents a blockchain-based architecture that achieves trustworthy FLaaS (TruFLaaS). Our solution provides trustworthiness among third-party organizations by leveraging blockchain, smart contracts, and a decentralized oracle network. Specifically, during each FL round, the service provider supplies a sample, without overlapping, of its validation set to validate all partial models submitted by clients. By doing so, poor models, which tend to degrade performance or introduce malicious backdoors, are identified and discarded. Due to the transparency of the blockchain, not changing the validation set would enable participants to forge a malicious partial model that passes the validation phase. We evaluate our approach over two well-known IIoT data sets: the reported experimental results show that TruFLaaS outperforms the state-of-the-art literature solutions in the field.
BibTeX
@article{mazzocca2023truflaas,
  author = {Carlo Mazzocca and Nicolò Romandini and Matteo Mendula and Rebecca Montanari and Paolo Bellavista},
  title = {{TruFLaaS: Trustworthy Federated Learning as a Service}},
  journal = {IEEE Internet of Things Journal},
  year = {2023},
  url = {https://openreview.net/forum?id=vjS3fxUxAn},
}
Figure