Presentation is loading. Please wait.

Presentation is loading. Please wait.

BlockChain & AI Kristian Zarb Adami.

Similar presentations


Presentation on theme: "BlockChain & AI Kristian Zarb Adami."— Presentation transcript:

1 BlockChain & AI Kristian Zarb Adami

2 Warm up example… Kf1Bg2Ke2c5Rg8Ke7Re8Ke8Kd1
e3d5e4e4Qd7Bd7Kd7c3h6Qa4Kd8Qd4Ke8Qe4e5Qe5Kd7Nf3Kd8Qd5Ke7Ne5Ke8 Bd7Nf7c6Nh8Bh3f3Bg2c4Bf3Rg1Bb4Rg7Bd2Kf1Bg2Ke2c5Rg8Ke7Re8Ke8Kd1Bg5B f4Nc6Bc7Rd8Bd6Rd6Nd2Bf3Kc2Rd2Kb1 We need to agree on the starting position of the board… We need to agree the historical sequence of moves on the board Then we can reconstruct the current state of the board

3 A primer in cryptography…
b1466a8ed667d0dd4c f59e20fb27b3fa8894e957f d5 25f682044b5badaff8b296bf6fd b238fcff5559e64f38c88bb9790f The 256-bit string is created using what is known as a ‘Hash function’

4 This Talk is about Chess…
Chess (Shannon Number: (atoms in the universe: 1080) 1997 – IBM’s Deep Blue (specifically developed for chess) beats Chess Master Gary Kasparov. Deep Blue was capable of evaluating 100 million positions a second. Since then AI has taken over and in 2017, Google’s DeepMind learnt all the Chess history in 4hours, having played 1000’s of games and beating all other algorithms, using the newest ‘reinforcement learning’ algorithms

5 A Hash function… A Hash Function is a function that, given a byte-stream (file) as input, will output a fixed length n-bit number. This is called the hash or message digest. The input file can any digital file – text, image, video, spreadsheet, document, audio, executable, script, etc. An example: I love Eilieen Montesin 29269DC8A439E3EC2A834534B684D66D35831AFBD4A3C 7B8B2C2963C19CE1FAF I love Eilieen Montesin. C7A89639FADAEE56CD174FBE6F8FAE4132AC0F1C6BF AB220E14BD74

6 Digitising Assets… Anything that is capable of being owned or controlled to produce value, is considered an asset   can be tangible or intangible value can be converted into cash.   Cash also an asset. Asset examples: Cars, planes, property (physical) Bonds, securities, repurchase agreements (intangible) Licenses, IP, & patents (intangible assets) Music, video, games (intangible, digital assets)

7 Public Records A public record is any information, minutes, files, accounts or other records which a governmental body is required by law to maintain, and which must be accessible to scrutiny by the public. This includes the files of most legal actions. A court will take judicial notice of a public record introduced as evidence. For example: a recorded deed to show transfer of title or a criminal judgment are both public records.

8 Digitising Ledgers… Many ledgers, public or private, today are digital and are stored on centralized databases. All records and transactions are supported by signed and time-stamped documentation. These ledgers are: Trusted Accessible (public ledgers) Do we trust ledgers that do not have the above attributes?

9 Centralized Systems Single Point of Failure Single Point of Attack
Single Point of Compromise Single Point of Shutdown Easy to Control (for Governments and Big Business) In a centralized system, there is a central actor (which could be a single machine or, more generally, a service) to which everyone else talks. Facebook and Dropbox use distributed systems internally, but are considered as centralized services because they are controlled by one entity.

10 Just imagine… We could create a digital ledger that:
Does not require signed and timestamped documentation to support records or transactions. Is Immutable Is Authoritative Is Mutual (shared in common or owned by a community) Is Scalable Is Secure Is Interoperable Is Transparent Such a digital ledger exists. It is called

11 The BlockChain A blockchain is a continuously growing list of records, called blocks, which are linked and secured using cryptography. A blockchain is, therefore, nothing more than a digital ledger. A ledger is a book that stores records or transactions of some sort “A blockchain lets mutually distrusting entities agree on history…which lets them agree on the current state of the ‘system’”

12 Immutability… If you can't change it, it's immutable. There are many things in life that are immutable; these unchangeable things include death, taxes, the laws of physics, and Blockchain.

13 What’s the fuss… Blockchain made it possible, for the first time, to have a distributed, immutable, cryptographically secure, transparent ledger. This is not easy to do. Digital data has many problems: Easy to copy Can easily be edited, changed, faked, deleted. Centralized databases can be controlled, hacked, etc. Some problems, such as the double-spending problem, had seemed insurmountable

14

15 Distributed Ledgers In a ledger (public or otherwise) that does away completely with supporting (signed) documentation then having just reliability, redundancy, and performance is just not enough. Nobody will trust their assets (money, contracts, property, etc) on a ledger (distributed or centralized) that is not immutable unless each entry has supporting (signed) documentation. Immutability in a digital ledger proved very difficult to achieve. Digital data is easy to copy. That is, it seems, until Satoshi Nakamoto introduced Blockchain on an unsuspecting World in 2006.

16

17 Blockchain – A Functional Perspective
Blockchain solved the immutability problem. In particular, it solved the double- spending problem (for cryptocurrencies). Blockchain is an example of Distributed Ledger Technology or DLT. Blockchain is a clever application of cryptographic and distributed database technologies that finally allows us to have a public or private ledger that is Immutable, Authoritative, Mutual, Scalable, Secure, Interoperable, Transparent, Digitally Signed, and Timestamped.

18 What is the blockchain A Blockchain is a single, shared, long sequential (ordered) chain of blocks. Each block: Contains hundreds or thousands of viable transactions of any type. The Blockchain is shared with the thousands of computers called Blockchain nodes on a peer-to-peer network. Nodes can be set up using a powerful server and downloaded Blockchain software. Nodes run the Blockchain software. They store, and share, an up-to-date version of the Blockchain (ledger). They also validate and mine blocks and add them to the Blockchain

19

20 How (the bitcoin) BlockChain works…
There are many variations of Blockchain We will use the structure of the Blockchain used by Bitcoin This includes the mining algorithms, distributed consensus, and block structure

21 What is a Block? A block is a group (bounded number or size) of transactions of any kind that are stored in the Blockchain. Each transaction is digitally signed (using the Private key) by all the stakeholders in that transaction. Also every transaction is also hashed using SHA-256. Also, every Block contains a header containing a number of fields. The blocks are created, and stored, in a linear sequence in a reverse linked list. Each block points to its predecessor. 0 Genesis Block Block 1 Block 2 Block 3 Block 4

22 How does it work? A Blockchain is an ordered sequence of ‘blocks’.
It is a linked list where the pointer to another node is the hash of the target node. There is a good reason why the pointers ‘point’ backwards! The first block is called the Genesis block. This is the first block created in the Blockchain.

23

24 BlockChain Mining Setting up a Blockchain node is expensive since it requires a server and power (electricity). Few people would set up a Blockchain node for fun. The Blockchain cannot function unless there are many (?) nodes to provide redundancy and distributed consensus. Persons, or entities, are incentivized to set up Blockchain nodes by a process called ‘mining’. Node owners use mining to earn tokens (digital currency) and transaction fees to compensate them for the cost and effort of running a Blockchain node.

25 How Mining Works Mining is required to sustain the Blockchain P2P Network. Full Nodes (or Miners) earn money (tokens, Bitcoins, etc) by mining blocks. Broadcast nodes create transactions (of any type). These are sent to the Relay nodes for broadcasting. Full nodes (miners) then First validate the transactions Build a new block from the transactions received. If they successfully mine the block they broadcast it to the network and the block is added to the Blockchain. They get tokens (or Bitcoins) in return. What happens if two Full Nodes mine a block at the same time? Can a transaction be in two blocks?

26 How Mining Works Each block contains a link to the previous block
User creates new transaction on a Broadcast node User/s signs transaction using private key/s Transaction is broadcast to miners via relay nodes Users listen for new blocks and merge them into ledger Miners aggregate transactions into Blocks Each block contains a link to the previous block Miners validate blocks and perform Proof of Work When two blocks are mined at the same time, the longer chain wins. Mined block is broadcast to the network

27 Adding new blocks to the chain
“In a distributed consensus-based on the proof of Work, miners need a lot of energy. One Bitcoin transaction required the same amount of electricity as powering 1.57 American households for one day” Experts now argue that bitcoin transactions could consume the same amount of electricity as Denmark by 2020 There are now new ways of verifying and accepting transactions: Proof of Stake Permissioned blockchains Proof of Storage

28 Why you can’t cheat the chain…
The older a block is the more computing time is required to hack the Blockchain. This is because all the blocks from the hacked block (in red) to the end of the chain must be re-mined. This is computationally very expensive.

29 Some concerns… Mining takes too long. It take 10 minutes to mine a block and then more time (at least one hour) to confirm. Mining, actually Proof of Work, is too compute intensive and uses too much energy. Normal people can no longer set up Full Nodes – too much computing power is required. Mining Companies have a vested interest in the price of Bitcoin and other currencies that use a Blockchain as a ledger and Proof of Work for mining. Proof of Work may be replaced by Proof of Stake. In the long run, Blockchains, or any other P2P network, may have to be supported by transaction fees only.

30 BlockChain 2.0 – the TANGLE
The main innovation behind IOTA is the Tangle. It is a novel new distributed ledger architecture that is based on a DAG (Directed Acyclic Graph). The Tangle still has the same underlying principles as a Blockchain: it’s still a distributed ledger and it is still a P2P Network. It also still relies on a consensus and validation mechanism. However, it is must faster and far more efficient.

31 Artificial Intelligence and Machine Learning
“the ability to acquire and apply knowledge and skills” Learning: “the acquisition of knowledge or skills through study, experience, or being taught”

32 Growth of AI In 2016, interest in AI outranked all other technologies.
According to a 2016 Infosys survey of 1,600 businesses in 7 countries; ◦ 76% believed that AI would be fundamental to their future; AI would contribute 39% to their annual revenues by 2020; 70% believe it will result in positive changes for society, Many thought leaders compare AI to innovations like electricity and the Internet in terms of the change it is likely to bring. In 2016, sales of AI were $644 million. By 2025, sales are estimated to be $36 billion

33 What is the difference between AI and normal computer program…
Traditional Programs: Manipulate the stored symbols using a set of previously defined instructions. AI Programs: Engage in pattern matching and problem solving, where information about the world, presented to the AI program in digital format, is used to solve complex tasks; Can self-learn, potentially including (down the road) developing its own new algorithms to achieve the objectives for which the program was created.

34 Back to our chess game… Chess (Shannon Number: (atoms in the universe: 1080) 1997 – IBM’s Deep Blue (specifically developed for chess) beats Chess Master Gary Kasparov. Deep Blue was capable of evaluating 100 million positions a second Google’s DeepMind division: DeepMind Technologies founded in 2010 in England to “solve intelligence”; Acquired by Google in 2014 for $500 million; Unlike IBM’s Deep Blue (designed for single purpose), DeepMind uses “reinforcement learning” to start from scratch in self-learning, and then mastering, different games

35 Three types of AI Artificial Narrow Intelligence (“ANI”): ability to carry out a specific task (play chess; get information based on voice directions (SIRI or Alexa); spot spam ; driverless cars). Artificial General Intelligence (“AGI”): ability to carry out different tasks that a human could do. Artificial Super Intelligence (“ASI”): ability to learn from its experiences and from new data to perform a wide range of actions and to generate new computer code on its own to help achieve its objectives.

36 AI is traditionally used to…
Classify and Cluster data Identify spam s Identify fraudulent transactions Identify cancer classify galaxies Interpolate and generate functional behaviour predict stock prices motion control autonomous cars

37 Machine Learning Algorithms
Algorithms and processors that can classify and cluster raw input data and that improve – learn - as they are given more data. ◦ “Classify”: creating or applying labels to data; “Cluster”: identifying similarities and differences between data in the classifications

38 Machine Learning Techniques

39 Supervised Learning Split the data into a:
Training set Validation set Testing set Run different kinds of algorithms such as: Neural Networks Genetic algorithms Many more…

40 Unsupervised Learning
With no labels it uses statistical methods (such as clustering) to discover properties in the data: Much more powerful and consequently, much harder…

41 Deep Learning State of the Art algorithms:
“The AI program automatically refines its methods, and improves its results, as it gets more data, using multiple layers of abstraction – the way the mind works”

42 Back to Chess Google DeepMind learnt the rules of chess by watching thousands of games in just under four hours It then played against ‘Stockfish 8’ and won or drew its 100 matches Interestingly, the same algorithm learnt other Games such as ‘Go’ using what is known in the field as ‘reinforcement learning’

43 Bringing AI to business…
Amazon, Google, and Microsoft are spending billions of dollars to be in a position to provide AI services via the Cloud to all businesses, including small businesses that could otherwise never afford to develop such services themselves. This could provide small businesses and start-ups with a competitive boost that they have never had in competing for business

44 BlockChain and AI BlockChain can anonymise data providing rich datasets on which AI algorithms can train For example, personal medical records can be stored in a ‘medi-chain’, anonymising the data, such that no GDPR are infringed

45 Joining the dots…

46 AI in HealthCare AI will come to dominate many areas of health care because of: Global shortfall of 4.3 million doctors and nurses; AI is beginning to demonstrate superiority over humans in diagnosing medical conditions and in identifying the best treatment. “Machine learning could be a game-changer in medicine because, unlike humans, computers don’t get tired and have an infinite capacity for learning and memorization AI can reduce the burden on doctors and nurses so they can focus on the uniquely human elements of patient care.” Patients Are About to See a New Doctor: Artificial Intelligence, January 2017

47 It’s already happening…
By tracking 30,000 different points on patients’ hearts and 8 years of patient data, AI algorithm was able to predict which patients with pulmonary hypertension would die within a year with 80% accuracy. London Institute of Medical Services AI was able to analyze 17 different diseases with 86% accuracy on the basis of patients’ breath. American Chemical Society. In 2017, using the patient’s DNA and its own database of tens of millions of oncological reports and studies, IBM’s Watson diagnosed a Japanese woman’s rare form of cancer in 10 minutes; solving a problem that the entire hospital medical staff could not solve.

48 Investments and Smart Contracts…
In 2001 IBM published a paper highlighting how several algorithms were able to outperform actual human stock traders. On October 18, 2017, the first ETF using only AI for stock selection (running on IBM’s Watson platform) began trading. “In 2000, Goldman Sachs’ cash equities trading desk in New York employed 600 traders. Today, that operation has two equity traders, with machines doing the rest In 10 years, Goldman Sachs will be significantly smaller by head count than it is today. Expect the same to happen on every trading floor at every major financial company.” -- “Goldman Sacked: How Artificial Intelligence Will Transform Wall Street,” Newsweek, Feb. 26, 2017

49 Conclusion – Do’s and Don’t’s
Don’t expect to become a world champion at chess any time soon Don’t buy a lot of computers to start mining Do think about a private blockchain for your enterprise – my feeling is that every entity will have a blockchain in the same way as everyone has a facebook page and every company a website Do think about data that your customers give you and how to turn it into information that is useful for your company – be it through AI algorithms or just standard algorithms Do send me questions and queries you might have to

50

51 EXTRA SLIDES

52 BlockChain KillerApps

53 BlockChain KillerApps

54

55

56 Commercial Real Estate example…

57 What does a block look like?

58 How Proof of Work actually works!
The objective of Proof of Work is to produce a hash for the Block (actually for the header of the block). This is easy right? Computing the SHA-256 hash of the header can be done very quickly. However, Proof of Work makes the miners compete amongst themselves to find the hash with the smallest number of leading zeros.

59 Don’t do this at home…

60


Download ppt "BlockChain & AI Kristian Zarb Adami."

Similar presentations


Ads by Google