on master help sign in
Add cyperscope-bot proposal
commit8589411f7ff5e748b258193c9fb6d5d77c832e8c authorMike Osborne <mike@urbit.org> dateMon 13 Sep 2021, 15:35 (5 years ago) parenta188a48
1 file changed+88
content/grants/cypherscope-bot.md+88
content/grants/cypherscope-bot.mdnew file+88
@@ -0,0 +1,88 @@
1++++
2+title = "Cypherscope Bot"
3+date = "2021-09-13"
4+[taxonomies]
5+grant_type = ["Proposal"]
6+grant_category = ["App Dev: Other"]
7+[extra]
8+image = ""
9+description = "On-demand financial charts chat bot"
10+reward = 1
11+assignee = "~mitten-dapper, ~ristyc-ridwyx"
12+grant_id = "P0068"
13+completed = false
14+canceled = false
15+link = ""
16++++
17+
18+## Cyperscope Bot - an on-demand financial charts chat bot
19+
20+Urbit chat bot that provides on-demand financial charts based on [this bot](https://www.alphabotsystem.com/guide/charting)
21+
22+We expect to have a Ship or a Moon for our bot that answers incoming commands by replying with a chart image queried from the TradingView API.
23+
24+## User flow
25+
26+- User queries our bot by typing a command into chat like “chart btcusd 1h”.
27+
28+ -- Command parameters include ticker, timeframe (optional), candle type (optional), indicators (optional).
29+ -- We’ll attempt to match AlphaBot’s available parameters (at the bottom of [this page](https://www.alphabotsystem.com/guide/charting).
30+ -- More command parameters will potentially be added based on time constraints and feasibility.
31+
32+- Chatbot framework relays message to our bot (Cypherscope ship).
33+
34+ -- [Chatbot framework](https://github.com/robkorn/urbit-chatbot-framework)
35+
36+ -- Our bot is ideally a chat participant.
37+
38+ -- If our bot does not understand the command, return a helpful error message.
39+
40+- Bot parses the command and queries TradingView API for a chart.
41+
42+- Bot sends a message in chat with the chart image.
43+
44+ -- The images may be hosted on our ship. This part is a little unclear as of now.
45+
46+ -- The chart should have a consistent and unobtrusive size every time. TradingView API might already handle this.
47+
48+ -- Users should be able to delete the chart from the chat to avoid disrupting the flow of conversation.
49+
50+## Risks
51+
52+For transparency we have the following open questions and will dive deeper to resolve them:
53+
54+- Where are images hosted and for what time period?
55+
56+- How should the hardware running the ship be paid for?
57+
58+ -- If this project catches on we could add a paid tier with more features, accepting payment in crypto to our bot’s ship.
59+
60+- How should the TradingView chart API be paid for?
61+
62+### Milestone 1 - Bot designed, tested and deployed
63+
64+Expected completion:
65+
66+Payment: 1 star
67+
68+[Federated Learning](https://ai.googleblog.com/2017/04/federated-learning-collaborative.html) capability for Urbit. Applications of machine learning in social media suffer from the downside that a centralized entity owns your data. Federated Learning allows machine learning models to be trained on each individual's data, while striving to preserve the privacy of their data: an individual trains the model locally and shares the trained model with others in the network, such that their personal data never leaves their own server. Multiple individuals can collaborate to train a model on their own personal datasets, producing a model with better predictive power than if just one individual had trained it. As a machine learning strategy, Federated Learning is already gaining popularity as a way to train machine learning models on medical data, where each individual's personal metadata is PII or protected and cannot be directly shared with a centralized entity. For Urbit, which is attempting to supplant existing centralized and exploitative social media organizations, it is only logical to want a way to do ML that is privacy-preserving while still leveraging the value of many participants' data to attain performance. Thus the goal of this deliverable is to make a first-pass at a way to do Federated Learning by passing a machine learning model between two or more planets, progressively training it at each hop, before returning the trained model to the originator.
69+
70+Because Federated Learning intersects with privacy and security concerns, I feel compelled to go a bit more in-depth on just this particular deliverable: as with anything involving privacy and security, expectation-setting is in order. This Federated Learning capability would be provided as-is, essentially as a "prototype" of how Federated Learning on Urbit _could_ work, making no warrantees of safety, security or reliability for a particular use-case, because I am not in the proper position as a freelance programmer with business insurance and 100% of my time to spend writing software which makes any such guarantees :) For users seriously considering Federated Machine Learning, there are a number of important considerations such as:
71+
72+(1) How do you ensure that individual participants are not tampering with the ML training process locally, i.e. that a training computation was completed honestly?
73+
74+(2) Do you need to encrypt the model in transit as it moves from participant to participant?
75+
76+(3) Does training a model on a dataset leak information about that dataset to the originator of the request?
77+
78+(4) From an IP perspective, are you alright with participants having access to your ML model in a partially-trained state?
79+
80+I will absolutely not address any of the above questions in this work, though I am happy to suggest avenues of inquiry for how one might address them :) But nonetheless, no one in the Urbit community seems to have broached the topic of Federated Learning yet, so I think there is a strong value proposition in having me produce essentially a "prototype" of a Federated Learning capability, which can be extended later to address the above concerns, and which will help to start the conversation about privacy-preserving ML on Urbit.
81+
82+### Milestone 7 - A prototypical example of privacy-preserving ML with Federated Learning on Urbit
83+
84+Expected completion: Feb 2022
85+
86+Payment: 1 star
87+
88+A demonstration blog post showing an example of Federated ML. This serves three purposes: (1) help users to envision the future of Urbit as a privacy-friendly platform, while the tech is still in its infancy, (2) drive users to consume the ML library for their own projects, and (3) drive interest in augmenting or improving the ML library and the Federated ML capability.