Blockchain Tethered AI: Trackable, Traceable Artificial Intelligence and Machine Learning

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Remove your doubts about AI and explore how this technology can be future-proofed using blockchain's smart contracts and tamper-evident ledgers. With this practical book, system architects, software engineers, and systems solution specialists will learn how enterprise blockchain provides permanent provenance of AI, removes the mystery, and allows you to validate AI before it's ever used. Authors Karen Kilroy, Lynn Riley, and Deepak Bhatta explain that AI's ability to change itself through program synthesis could take the technology beyond human control. With this book, you'll learn an efficient way to solve this problem by building simple blockchain controls for verifying, tracking, tracing, auditing, and even reversing AI. Blockchain tethered AI interweaves the MLOps process with blockchain so that an MLOps system requires blockchain to function, which in turn tethers AI. This guide shows you how. You will: • Learn how to create and power AI marketplaces with blockchain • Understand why and how to implement on-chain AI governance • Control AI by learning methods to tether it to blockchain networks • Use blockchain crypto anchors to detect common AI hacks • Learn methods for reversing tethered AI

Author(s): Karen Kilroy, Lynn Riley, Deepak Bhatta
Edition: 1
Publisher: O'Reilly Media
Year: 2023

Language: English
Commentary: Publisher's PDF
Pages: 304
City: Sebastopol, CA
Tags: Artificial Intelligence; Machine Learning; Genetic Algorithms; Deep Learning; Unsupervised Learning; Reinforcement Learning; Technological Singularity; Supervised Learning; Python; Blockchain; Node.js; PyTorch; User Interface; Design Thinking; Data Quality; Hyperledger Fabric; NestJS

Cover
Copyright
Table of Contents
Preface
Why Does AI Need to Be Tethered?
What You Will Learn
Why We Wrote This Book
A Note to Future Generations
Summary
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgements
Chapter 1. Why Build a Blockchain Truth Machine for AI?
Dissecting AI’s Trust Deficit
Machine Learning Concerns
Opaque Box Algorithms
Genetic Algorithms
Data Quality, Outliers, and Edge Cases
Supervised Versus Unsupervised ML
Reinforcement Learning and Deep Learning
Program Synthesis
Superintelligent Agents
Technological Singularity
Attacks and Failures
Model/Data Drift
Adversarial Data Attacks
Risk and Liability
Blockchain as an AI Tether
Enterprise Blockchain
Distributed, Linked Blocks
Trust and Transparency
Defining Your Use Case
Audit Trail
Local Memory Bank
Shared Memory Bank
Four Controls
Case Study: Oracle AIoT and Blockchain
What’s Next?
Chapter 2. Blockchain Controls for AI
Four Blockchain Controls
Blockchain Control 1: Pre-establishing Identity and Workflow Criteria for People and Systems
Establishing Identity
Predetermining Workflow Among Participants
Blockchain Control 2: Distributing Tamper-Evident Verification
Using Crypto Anchors to Verify Data Sets, Models, and Pipelines
Using Blockchain to Detect Common AI Hacks
Understanding Federated Learning and Blockchain
Understanding Model Marketplaces
Blockchain Control 3: Governing, Instructing, and Inhibiting Intelligent Agents
Establishing a Governance Group
Implementing On-Chain Governance
Developing Compliant Intelligent Agents
Blockchain Control 4: Showing Authenticity Through User-Viewable Provenance
Deciding Whether to Trust AI
Summary
Chapter 3. User Interfaces
Design Thinking
Web Interfaces
Blockchain Tethered AI User Interfaces
BTA User Mockups
Functionality
Traceability and Transparency
Smartphone and Tablet Apps
Email and Text Notifications
Spreadsheets
Third-Party Systems
Working with APIs
Integrated Hardware
Third-Party Services and Tools
System Security
AI Security
Database Security
Blockchain Security
Additional Security
Summary
Chapter 4. Planning Your BTA
BTA Architecture
Sample Model
AI Factsheet: Traffic Signs Detection Model
How the Model Works
Tethering the Model
Subscribing
Controlling Access
Organization Units
Staffings
Users
Analyzing the Use Case
Participants
Assets
Transactions
Smart Contracts
Audit Trail
Summary
Chapter 5. Running Your Model
Exercise: Oracle Cloud Setup
Creating a Cloud Provider Account
Creating a Compartment
Creating a Bucket
Creating a Pre-authenticated Request
Creating Oracle Groups
Creating IDCS Groups
Mapping Oracle Groups
Creating a Policy
Generating a Secret Key
Exercise: Building and Training a Model
Exploring the Model Repository
Installing Python and PyTorch
Starting the Notebook
Configuring Boto3
Running Your Notebook
Checking the Bucket
Optimizing Hyperparameters
Learning Rate for Training a Neural Network
Number of Training Epochs Used
Size of the Training Batches
Size of the Hidden Layers
Understanding Metrics
Accuracy
Loss
Precision
Recall
F1 Score
Summary
Chapter 6. Instantiating Your Blockchain
Exercise: Setting Up Hyperledger Fabric
Installing Node.js, npm, and NestJS
Understanding Hyperledger Fabric 2.0 Required Nodes
Installing, Configuring, and Launching the Blockchain
Creating and Joining Channels
Creating Channels
Joining Channels
Configuring Anchor Peers
Using Chaincodes
Understanding Response Struct
Using GetTxDateTime
Project (project)
Model Version (model-version)
Model Review (model-review)
Model Artifact (model-artifact)
Model Experiment (model-experiment)
Setting Up the Blockchain Connector
Creating Multiple Blockchain Connectors
Setting Up the Oracle Connector
Configuring Your env File with Your OCI Variables
Starting the Oracle Connector
More About Integrating Blockchain and the Application Layer
Blockchain Connector
query
OC User Service
OC Group
Summary
Chapter 7. Preparing Your BTA
Exercise: Installing and Launching Your BTA
Installing the BTA Backend
Understanding Your BTA Backend’s env File
Understanding Your environment.ts File
Launching the BTA Frontend
Exercise: Creating Users and Permissions
Using MailCatcher
Configuring the Super Admin
Creating a New Subscription Account in Your BTA
Configuring Organization Admin’s Node
Configuring Organization Admin’s Channel
Verifying the Subscription
Activating Your Organization Admin
Configuring Access for Your AI Team
Summary
Chapter 8. Using Your BTA
Exercise: Recording Critical AI Touchpoints to Blockchain
Adding a New Project
Adding a New Version
Understanding How Training and Testing Data Use Blockchain
Understanding How Models and Algorithms Use Blockchain
Understanding How Inputs and Outputs Use Blockchain
Understanding How Performance Metrics Use Blockchain
Understanding How New Model Versions Use Blockchain
Understanding How the Uploads Work
Reviewing and Approving the Model
Adding AI’s Purpose and Intended Domain
Exercise: Auditing Your BTA
Tracking Your Model’s Training and Test Data Sets
Tracing Your Inputs and Outputs
Verifying Performance Metrics
Tracing Identity of People and AI Systems
Tracking and Tracing Model Development
Identifying Tampering
Reversing Your Blockchain Tethered Model
Checking the Training Data Sets
Checking the Algorithms
Retraining the Model
Summary
Index
About the Authors
Colophon