# Coin.AI: A Proof-of-Useful-Work Scheme for Blockchain-Based Distributed Deep Learning

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Related Work

## 3. Theoretical Background

## 4. Formal Requirements

- The problem must be complex, requiring some computational effort, in order to guarantee that some actual work was performed by miners in order to be able to obtain the reward associated with block mining.
- In order to guarantee the integrity of the blockchain, the hash of the previous block must be introduced as a variable of the problem.
- The mining scheme must have a competitive component, so that it is the first miner to solve the problem (or conversely, the miner who provides the best solution) the one that mines the block and obtains the reward.
- Given a problem solution, it must be easy to verify that the solution is valid and to assess its quality.
- Once a miner has found a block and this has been appended to the blockchain, all other potential blocks being under mining by other miners must be discarded. This guarantees that a miner cannot “save blocks” to be discovered in the future.

## 5. Proof of Useful Work

## 6. Hash-to-Architecture Mapping

`<cnn> ::= <convs><fcs>`

`<convs> ::= <conv> | <conv><convs>`

`<fcs> ::= <fc> | <fc><fcs>`

`<conv> ::= <num_filters><filter_size><act_fn>`

`<fc> ::= <num_units><act_fn>`

`<num_filters> ::= <num>`

`<filt_size> ::= <num>`

`<num_units> ::= <num>`

`<act_fn> ::= <sigmoid> | <tanh> | <relu>`

`<number> ::= <digit> | <digit><number>`

`<digit> ::= 0 | 1 | ... | 9`

`<cnn>`, and starting from it a final valid setup can be generated by choosing rules iteratively until a valid string (i.e., composed only of terminal symbols) is obtained. An example of an architecture obtained using this grammar is shown in the parsing tree in Figure 2, consisting on two convolutional layers and one fully-connected layer. The first convolutional layer would have 32 filters of size 4, and the second would have 128 filters of size 2, both of them with a ReLU activation function. The fully-connected layer would comprise 512 units and an hyperbolic tangent activation function.

## 7. Proof of Storage

- The model is stored directly in the blockchain, along with the block to which it belongs.
- The model is stored in a centralized server (called models store).
- The model is stored in a distributed system.

## 8. Democratizing Artificial Intelligence

## 9. Alternatives

## 10. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Nakamoto, S. Bitcoin: A Peer-to-Peer Electronic Cash System. 2008. Available online: https://bitcoin.org/bitcoin.pdf (accessed on 24 July 2019).
- Mukhopadhyay, U.; Skjellum, A.; Hambolu, O.; Oakley, J.; Yu, L.; Brooks, R. A brief survey of Cryptocurrency systems. In Proceedings of the 2016 14th Annual Conference on Privacy, Security and Trust, Auckland, New Zealand, 12–14 December 2016. [Google Scholar]
- Tschorsch, F.; Scheuermann, B. Bitcoin and Beyond: A Technical Survey on Decentralized Digital Currencies. IEEE Commun. Surv. Tutor.
**2016**, 18, 2084–2123. [Google Scholar] [CrossRef] - Blockchain.info. Bitcoin Charts & Graphs. 2019. Available online: https://www.blockchain.com/en/charts (accessed on 21 July 2019).
- Velde, F.R. Bitcoin: A Primer; Chicago Fed Letter 317; The Federal Reserve Bank of Chicago: Chicago, IL, USA, 2013. [Google Scholar]
- McCallum, B.T. The Bitcoin revolution. Cato J.
**2015**, 35, 347–356. [Google Scholar] - Buterin, V. A Next-Generation Smart Contract and Decentralized Application Platform. 2013. Available online: https://github.com/ethereum/wiki/wiki/White-Paper (accessed on 24 July 2019).
- Iansiti, M.; Lakhani, K.R. The truth about blockchain. Harv. Bus. Rev.
**2017**, 95, 118–127. [Google Scholar] - Garay, J.A.; Kiayias, A.; Panagiotakos, G. Consensus from Signatures of Work. IACR Cryptol. ePrint Arch.
**2017**, 2017, 775. [Google Scholar] - Saia, R.; Carta, S.; Recupero, D.R.; Fenu, G. Internet of entities (IoE): A blockchain-based distributed paradigm for data exchange between wireless-based devices. In Proceedings of the 8th International Conference on Sensor Networks, Prague, Czech Republic, 26–27 February 2019; pp. 77–84. [Google Scholar]
- Bartoletti, M.; Carta, S.; Cimoli, T.; Saia, R. Dissecting Ponzi schemes on Ethereum: identification, analysis, and impact. arXiv
**2017**, arXiv:1703.03779. [Google Scholar] - Kiayias, A.; Koutsoupias, E.; Kyropoulou, M.; Tselekounis, Y. Blockchain Mining Games. In Proceedings of the 2016 ACM Conference on Economics and Computation, Maastricht, The Netherlands, 24–28 July 2016; pp. 365–382. [Google Scholar]
- Vranken, H. Sustainability of bitcoin and blockchains. Curr. Opin. Environ. Sustain.
**2017**, 28, 1–9. [Google Scholar] [CrossRef][Green Version] - Fairley, P. Feeding the blockchain beast. IEEE Spectr.
**2017**, 54, 36–59. [Google Scholar] [CrossRef] - Chow, S.; Peck, M.E. The bitcoin mines of China. IEEE Spectr.
**2017**, 54, 46–53. [Google Scholar] [CrossRef] - Digiconomist. Bitcoin Energy Consumption Index. 2018. Available online: https://digiconomist.net/bitcoin-energy-consumption (accessed on 21 July 2019).
- Li, R.; Song, T.; Mei, B.; Li, H.; Cheng, X.; Sun, L. Blockchain For Large-Scale Internet of Things Data Storage and Protection. IEEE Trans. Serv. Comput.
**2018**. [Google Scholar] [CrossRef] - Zhan, F.; Eyal, I.; Escriva, R.; Juels, A.; van Renesse, R. REM: Resource-Efficient Mining for Blockchains. In Proceedings of the 26th USENIX Security Symposium, Vancouver, BC, Canada, 16–18 August 2017; pp. 1427–1444. [Google Scholar]
- Ball, M.; Rosen, A.; Sabin, M.; Vasudevan, P.N. Proofs of Useful Work. IACR Cryptol. ePrint Arch.
**2017**, 2017, 2013. [Google Scholar] - Ball, M.; Rosen, A.; Sabin, M.; Vasudevan, P.N. Proofs of Work From Worst-Case Assumptions. In Advances in Cryptology—CRYPTO 2018; Lecture Notes in Computer Science; Springer: Santa Clara, CA, USA, 2018; Volume 10991, pp. 789–819. [Google Scholar]
- King, S. Primecoin: Cryptocurrency with Prime Number Proof-of-Work. 2013. Available online: http://primecoin.io/bin/primecoin-paper.pdf (accessed on 24 July 2019).
- Alessandretti, L.; ElBahrawy, A.; Aiello, L.M.; Baronchelli, A. Anticipating Cryptocurrency Prices Using Machine Learning. Complexity
**2018**, 2018, 8983590. [Google Scholar] [CrossRef] - McNally, S.; Roche, J.; Caton, S. Predicting the Price of Bitcoin Using Machine Learning. In Proceedings of the 2018 26th Euromicro International Conference on Parallel, Distributed and Network-Based Processing, Cambridge, UK, 21–23 March 2018. [Google Scholar]
- Dey, S. A Proof of Work: Securing Majority-Attack in Blockchain Using Machine Learning and Algorithmic Game Theory. Int. J. Wirel. Microw. Technol.
**2018**, 8, 1–9. [Google Scholar] [CrossRef] - Swan, M. Blockchain Thinking: The Brain as a Decentralized Autonomous Corporation. IEEE Technol. Soc. Mag.
**2015**, 34, 41–52. [Google Scholar] [CrossRef] - Decentralized Machine Learning: White Paper. 2018. Available online: https://decentralizedml.com/DML_whitepaper_31Dec_17.pdf (accessed on 24 July 2019).
- SingularityNET: A Decentralized, Open Market and Inter-Network for AIs. 2017. Available online: https://public.singularitynet.io/whitepaper.pdf (accessed on 24 July 2019).
- AICoin. 2018. Available online: https://www.aicoin.io (accessed on 20 December 2018).
- Fetch.AI. 2018. Available online: https://fetch.ai (accessed on 20 December 2018).
- Ateniese, G.; Burns, R.; Curtmola, R.; Herring, J.; Kissner, L.; Peterson, Z.; Song, D. Provable data possession at untrusted stores. In Proceedings of the 14th ACM conference on Computer and Communications Security, Alexandria, VA, USA, 14–17 July 2018; pp. 598–609. [Google Scholar]
- Ateniese, G.; Bonacina, I.; Faonio, A.; Galesi, N. Proofs of Space: When Space Is of the Essence. In Security and Cryptography for Networks; Lecture Notes in Computer Science; Springer: Amalfi, Italy, 2014; Volume 8642, pp. 538–557. [Google Scholar]
- Dziembowski, S.; Faust, S.; Kolmogorov, V. Proofs of Spaces. In Advances in Cryptology—CRYPTO 2015; Lecture Notes in Computer Science; Springer: Santa Barbara, CA, USA, 2015; Volume 9216, pp. 585–605. [Google Scholar]
- Kamara, S. Proofs of Storage: Theory, Constructions and Applications. In Algebraic Informatics; Lecture Notes in Computer Science; Springer: Almafi, Italy, 2013; Volume 8080, pp. 7–8. [Google Scholar]
- Miller, A.; Juels, A.; Shi, E.; Parno, B.; Katz, J. Permacoin: Repurposing Bitcoin Work for Data Preservation. In Proceedings of the 2014 IEEE Symposium on Security and Privacy, San Jose, CA, USA, 18–21 May 2014. [Google Scholar]
- Vorick, D.; Champine, L. Sia: Simple Decentralized Storage. 2014. Available online: https://sia.tech/sia.pdf (accessed on 24 July 2019).
- Protocol Labs. Filecoin: A Decentralized Storage Network. 2017. Available online: https://filecoin.io/filecoin.pdf (accessed on 24 July 2019).
- LeCun, Y.; Bottou, L.; Bengio, Y.; Haffner, P. Gradient-based learning applied to document recognition. Proc. IEEE
**1998**, 86, 2278–2324. [Google Scholar] [CrossRef][Green Version] - Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput.
**1997**, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed] - Shelhamer, E.; Long, J.; Darrell, T. Fully Convolutional Networks for Semantic Segmentation. IEEE Trans. Pattern Anal. Mach. Intell.
**2017**, 39, 640–651. [Google Scholar] [CrossRef] [PubMed] - He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016. [Google Scholar]
- Bello, I.; Zoph, B.; Vasudevan, V.; Le, Q.V. Neural Optimizer Search with Reinforcement Learning. In Proceedings of the 34th International Conference on Machine Learning, Sydney, NSW, Australia, 6–11 August 2017; JMLR, Inc.: Sydney, Australia, 2017; Volume 70, pp. 459–468. [Google Scholar]
- Real, E.; Moore, S.; Selle, A.; Saxena, S.; Yutaka Leon Suematsu, J.T.; Le, Q.; Kurakin, A. Large-Scale Evolution of Image Classifiers. In Proceedings of the 34th International Conference on Machine Learning, Sydney, NSW, Australia, 6–11 August 2017; JMLR, Inc.: Sydney, Australia, 2017; Volume 70, pp. 2902–2911. [Google Scholar]
- Baldominos, A.; Saez, Y.; Isasi, P. Evolutionary convolutional neural networks: An application to handwriting recognition. Neurocomputing
**2018**, 283, 38–52. [Google Scholar] [CrossRef] - Baldominos, A.; Saez, Y.; Isasi, P. On the automated, evolutionary design of neural networks: past, present, and future. Neural Comput. Appl.
**2019**, 31, 1–27. [Google Scholar] [CrossRef] - Stanley, K.O.; Clune, J.; Lehman, J.; Miikkulainen, R. Designing neural networks through neuroevolution. Nature Mach. Intell.
**2019**, 1, 24–35. [Google Scholar] [CrossRef] - Easley, D.; O’Hara, M.; Basu, S. From mining to markets: The evolution of bitcoin transaction fees. J. Financ. Econ.
**2019**. [Google Scholar] [CrossRef] - Bitcoin Raises Inequality. 2018. Available online: https://digiconomist.net/bitcoin-raises-inequality (accessed on 3 January 2019).
- Bitcoin Transaction Fees. 2019. Available online: https://bitcoinfees.info (accessed on 22 July 2019).

**Figure 2.**Parsing tree of a CNN architecture using the context-free grammar proposed in the use case.

**Figure 3.**Summary of the process used to obtain a valid deep learning architecture from a blockchain hash by means of a formal context-free grammar.

**Figure 5.**Global overview of the Coin.AI proposal, showing how proof-of-work allows mining a new block and how proof-of-storage is used for storing data and models in a distributed fashion.

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Baldominos, A.; Saez, Y. Coin.AI: A Proof-of-Useful-Work Scheme for Blockchain-Based Distributed Deep Learning. *Entropy* **2019**, *21*, 723.
https://doi.org/10.3390/e21080723

**AMA Style**

Baldominos A, Saez Y. Coin.AI: A Proof-of-Useful-Work Scheme for Blockchain-Based Distributed Deep Learning. *Entropy*. 2019; 21(8):723.
https://doi.org/10.3390/e21080723

**Chicago/Turabian Style**

Baldominos, Alejandro, and Yago Saez. 2019. "Coin.AI: A Proof-of-Useful-Work Scheme for Blockchain-Based Distributed Deep Learning" *Entropy* 21, no. 8: 723.
https://doi.org/10.3390/e21080723