Applied Sciences (Jan 2021)

Towards Blockchain-Based Federated Machine Learning: Smart Contract for Model Inference

  • Vaidotas Drungilas,
  • Evaldas Vaičiukynas,
  • Mantas Jurgelaitis,
  • Rita Butkienė,
  • Lina Čeponienė

DOI
https://doi.org/10.3390/app11031010
Journal volume & issue
Vol. 11, no. 3
p. 1010

Abstract

Read online

Federated learning is a branch of machine learning where a shared model is created in a decentralized and privacy-preserving fashion, but existing approaches using blockchain are limited by tailored models. We consider the possibility to extend a set of supported models by introducing the oracle service and exploring the usability of blockchain-based architecture. The investigated architecture combines an oracle service with a Hyperledger Fabric chaincode. We compared two logistic regression implementations in Go language—a pure chaincode and an oracle service—at various data (2–32 k instances) and network (3–13 peers) sizes. Experiments were run to assess the performance of blockchain-based model inference using 2D synthetic and EEG eye state datasets for a supervised machine learning detection task. The benchmarking results showed that the impact on performance is acceptable with the median overhead of oracle service reaching 2–4%, depending on the dimensionality of the dataset. The overhead tends to diminish at large dataset sizes with the runtime depending on the network size linearly, where additional peers increased the runtime by 6.3 and 6.6 s for 2D and EEG datasets, respectively. Demonstrated negligible difference between implementations justifies the flexible choice of model in the blockchain-based federated learning and other machine learning applications.

Keywords