This repo contains a confidential machine learning competition demo app. Basically Kaggle, but such that competition creator's private test data is kept hidden from participants, and the participants' models are kept hidden from the competition creator.
This demo was created for presentation at the Ready Layer One blockchain expo.
The Oasis platform, provides confidential smart contracts (i.e. private state). The private state of the Competition service stores the keys to encrypted off-chain test data and submitted, trained models. Additionally, the Competition service allows an attested off-chain enclave to receive the secrets and evaluate the models on the test data. The models and data are decrypted into (encrypted) enclave memory; the evaluation program is sandboxed (though not very completely in this demo) to make it difficult to extract secrets. If everything works properly, nobody except the evaluation program has access to the raw data. The evaluation enclave puts the two in ready-layer-two.
Also, it's generally useful to have user registration so that a person can, y'know, actually be announced as the winner. This functionality is in the UserRegstry service, which amounts to passing around JWTs.
To build the demo, you'll need
Once you have all of the build tools, simply run make
.
You should see the following output:
✔️ Create UserRegistry
✔️ Register participants
✔️ Upload data
✔️ Create Competition
✔️ Make submissions
✔️ Start evaluation program "enclave"
✔️ 🔒 Fetch data encryption keys
✔️ 🔒 Evaluate models on test data
✔️ 🔒 Announce winner
🎉 PEGASOS has won the competition! 🎉