|
|
# DEMOS dApp
|
|
|
|
|
|
## Main idea
|
|
|
|
|
|
DEMOS is a decentralized application (dApp) which uses a Blockchain Network in order to collect, store and use data to train Supervised Learning Models on NLP (Natural Language Processing). The main idea of this dApp is:
|
|
|
|
|
|
1. A node requests data to train an already pretrained NN model
|
|
|
2. Blockchain network's users submit training data
|
|
|
3. Model is retrained using the new data and then its accuracy is evaluated
|
|
|
|
|
|
There are three types of nodes in the Blockchain network:
|
|
|
|
|
|
- Petitioner-Nodes: These nodes submit a pretrained NN model whose accuracy they want to increase. They also provide a description of the captions that the model uses and a list of labels for them. Furthermore, they submit a deposit which will be shared to nodes who submit and evaluate data for the model
|
|
|
- Provider-Nodes: These nodes submit captions with labels following the description given by Petitioner-Nodes. They also submit a deposit. In case the provided captions are verified as fine, they receive a reward which is greater than the deposit
|
|
|
- Evaluator-Nodes: Captions provided by Provider-Nodes are shown in the dApp but the labels provided remain hidden. Evaluator-Nodes vote which label is more appropriate for the captions. Every vote requires a deposit. When a label for a caption receives a predetermined number of votes, the caption is considered verified. Only the Evaluator-Nodes who voted that label receive a reward (which is greater than the deposit).
|
|
|
|
|
|

|
|
|
|
|
|
## Architecture
|
|
|
|
|
|
DEMOS consists of two independent backends and a frontend. The two backends are responsible for the dApp's functions. The frontend links the backends with each other as well as with the user.
|
|
|
|
|
|
The first backend is a truffle project to support the Blockchain. The second backend is a flask project to support NN model training and evaluation. The frontend is a webpage based on a next.js project. NN models are saved in Google Drive.
|
|
|
|
|
|

|
|
|
|
|
|
## Installation Guide
|
|
|
|
|
|
_Note: This tutorial was created for Windows 10 however the same procedures apply for Linux and MacOS Operating Systems. DEMOS dApp was created using Linux Ubuntu 20.04_
|
|
|
|
|
|
Necessary Software you need to install before starting the tutorial:
|
... | ... | |