Sie sind auf Seite 1von 28

Smart Contracts that Learn

Mike Slinn
March 24, 2018
Blockchain: the New Infrastructure of AI
About Mike Slinn
• Distinguished engineer
• Contributor to Ethereum Java and Scala libraries
• Expert witness
• Operates ScalaCourses.com
• Developing Ethereum courses
(www.cryptocourses.tech)
• Author of EmpathyWorks
• Twitter: mslinn
Key Facts about Mike Slinn
• Focuses on generating business value by
applying people, process and technology
• Wrote 3 books on distributed computing
• Created hundreds of online lectures on
advanced computing concepts
• Uses many computer languages (“polyglot”)
Confession
Smart contracts cannot actually learn

• HOWEVER •

• Distributed applications (ĐApps) can learn


• Various web3 components can too
What ĐApp Components Might Learn?

• User interface
• Gateway contracts
• Oracles
Beware Non-Deterministic Behavior
• Blockchain requires determinism
• An AI-driven product may not have
deterministic behavior and may produce
counter-intuitive results
• A personalized recommender system may
produce different results to a user action after
learning additional preferences
Use Cases
With Architecture Diagrams
Self-Optimizing Contracts
• Optimize transactions for greatest margin,
minimal waste, constant deal flow, or other
criteria
• Results would improve over time
Genetic algorithms
Evolution strategies
Evolutionary programming
Simulated annealing
Gaussian adaptation
Hill climbing
Swarm intelligence
Integer linear programming
Fraudulent Event Detection
• Smart contracts currently act on all events
• Fraud detection often employs machine
learning
• Incorporating ML into smart contracts could
make them resistant to fraud
Automated Customer Service Agents
• Chatbots and voice interfaces
• Much more natural to use
• Can be built into devices
Medical Diagnosis Expert System
• Smart contract mediates access to an expert
system (oracle)
• Accepts anonymous patient data
• Passes data to an expert system that
performs analysis using machine learning
• Returns diagnostic results
• Charges for the service
Learning
How do Computers Learn?
• Trial and error with feedback
• Training
Types of Machine Learning
Association rule Classifier systems
Artificial neural networks Reinforcement
Bayesian networks Representation
Clustering Rule-based
Decision tree Similarity and metric
Deep Sparse dictionary
Genetic algorithms Support vector machines
Inductive logic programming
How Might Smart Contracts Learn?
• “Learning” computation must occur off-chain
• Enforced by the Ethereum fee structure
Machine Learning Applications
Automated theorem proving Machine perception, including computer
Adaptive websites vision and object recognition
Bioinformatics Optimization and metaheuristic
Classifying DNA sequences Recommendation systems
Detecting credit-card fraud Robot locomotion (autonomy)
General game playing Sentiment analysis
Information retrieval Speech and handwriting recognition
Internet fraud detection Structural health monitoring
Insurance Syntactic pattern recognition
Linguistics User behavior analytics
Medical diagnosis Translation
Caution
Security / Complexity Tradeoff
Solidity and Security
• Contracts written in Solidity are difficult to
make secure.
o Formal verification could help.
• Solidity’s support for types is primitive
Security Cannot Be Retrofitted
• Secure systems can only be designed that
way from the start
o Trying to secure an existing platform can only give
marginal improvements
• Need orders of magnitude of improvements
to smart contract security
o Not possible without a fresh start
Better Language
Support
Pact / Kadena
• Functional, interpreted Lisp-like syntax
• Features type inference
• Similar to database stored procedures in an
online transaction processing (OLTP) system
• Not Turing complete
• Runs on the Kadena blockchain
AxLang
• Smart contract language designed to support
formal verification.
• Cross-compiled Scala DSL for Ethereum
• Designed to scale
• Not yet ready
Thank you! Questions?
Mike Slinn
mslinn@micronauticsresearch.com
650-678-2285

Das könnte Ihnen auch gefallen