Futurism logo

Blockmeil: a human-centric recomendation system (I)

The 2021 Christmas project. An ensemble of three technologies combined into one single (hypothetical) proposal.

By Josh RamPublished 4 years ago 4 min read
With privacy-preserving classification.

(Originally published in Medium)

In this age of social media where a picture, post or out-of-context message can be used to harm a person's life, there is a need for a more transparent approach which is not only human-centric but can also take on the mass hysteria and online bullying a picture might cause. It has been known for a fact that bullying exists in the four major categories such as via text message, email, phone call or picture/video clip etc. Whenever a person become exposed enough to either of this kind of bullying, their mental health is impacted. The idea of bullying comes from when people tend to make fun of a person due to something which they have seen or found against them and in order to make them feel bad, they use different ways to hurt them most of the time mentally. We all have experienced bullying at different points of our lives, some of us has experienced it in School, some of us may have experienced it online. Changing the medium does not change the fact about what the person who is being bullied feels. As one application: if employers, applicants, and recommenders are in the same system, it should be the right of the applicant to stop (block) a damaging, unjustified "recommendation" opinion from an ill-intentioned (or confused) former employer/person. The Blockchain and Artificial Intelligence technologies allow us to have such system, avoiding all kind of awkward situations where the block is completely justified. Of course we will use in the future ML over encrypted data (privacy-preserving classification).

Ethereum Blockchain network

This draft will be made using the Ethereum network. In essence we will be building a dApp (decentralized application). No central server, public ledger, and cryptography.

Up: Traditional “unfair” system. Bottom: BlockMeil.

Smart contracts:

Smart contracts (SC) allow us to interact with the Blockchain system as an entity with address. Here we will show snapshots and commands using the simulated environment with Ganache. With Ganache, developers can quickly build Blockchain environments for prototyping and testing of their dApp. For the management and connection of the smart contracts with the nets we will use truffle: a suite of tools designed for that purpose. Let’s install it and running the setting up of the structure of our projects.

Now you are set up with a directory structure that should have the following subdirectories: /contracts, /migrations, /build, /test. You also will have a truffle-config.js, configuration file where to locate parameters for the connection, etc. You should put the smart contract in the .contracts subdirectory. Smart contracts have extension *.sol and will be programed in Solidity, a programing language specifically developed for SC.

In the migration directory you should have the deployment method of your contracts. They look something like this:

that will create the structure of your smart contract project. Then you need to compile and deploy (with Ganache connected at 127.0.1.7545):

We also recommend running the testing (truffle test). We followed this guide.

Once your SC is correctly deployed, truffle sees the connection right and the environment is well set up, you should see Ganache running. Now you are good to go:

BlockChain virtual environment for develop dApp.

Flask for front end

We managed to have running and up a system with login/logout (in the near future we plan to use metatask as standard for authentication), our dApp running and serving from the testnet (blockchain in test).

Web3 Screenshot of the message system showing Probabilities of classifications of messages: Positive, Negative or Unknown.

Sentiment Model

We have trained (using the pre-trained gpt2) the sentiment classification (gpt2) model, using the IMDB dataset. The model follows the classical approach of assigning probabilities p(w1,w2,w3,…wm) to a sequence of words, of size m:

The probability of occurrence of the phrase “x”.

And using the Zero-shot learning approach.

For the labels we have followed the instructions given in OpenAI (rightly tokenizating our entry):

Having in the end “Positive”, “Negative”, and the rest of the probability, i.e., 1-Sum(“Positive” + “Negative”), given to an unknown (“unkn”) third label. You need to have credentials to train your own model:

After going into the details of usage and meaning of the parameters we finally serve the NLP model:

We find out a reasonable amount of accuracy:

Source : https://blog.openai.com/better-language-models

So the general flow will be:

Flow of the BlockMeil.

Conclusion

We used Web3+BlockChain+A.I to create a more “Human” recommendation system to promote living out of the shadows of the terror and fear produced by the digital “bullying” and gossip era. There will be pros and cons, which will produce a public debate. The idea behind developing such system is to detect and identify different events which could lead to online bullying and is also a way of helping people who are already been affected by it. Whatever the decision is, the system is opening the windows to a solution to several problems associated to malicious and ill-intentioned competition. Technology might be helpful in solving some of these issues. In part II of this series, we will deploy our dApp to a testnet, taking us closer to the full deployment on a mainnet,

including the Web3 domain blockmeil.nft.

We include a voting system here:

Week 1: (starting 24-JAN-2022) https://www.menti.com/bx6chyw4gy (The voting code 1785 8016 is valid now and expires in 7 days.)

humanity

About the Creator

Reader insights

Be the first to share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

Sign in to comment

    Find us on social media

    Miscellaneous links

    • Explore
    • Contact
    • Privacy Policy
    • Terms of Use
    • Support

    © 2026 Creatd, Inc. All Rights Reserved.