Manning Inside Ai 2024 3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 216

Over 150 billion purchases per year use this author’s AI

Akli Adjaoute
Foreword by Raymond Kendall

MANNING
Praise for Inside AI
“In this book, my dear friend Akli draws upon two decades of hands-on experience as the founder
and CEO of Brighterion, a successful AI company (acquired by Mastercard), to bring clarity to the
intricate world of artificial intelligence. Akli explores the core of AI and its optimal application,
providing valuable insights grounded in a profound understanding and mastery of the AI field
gained from applying it in high-stakes, mission-critical applications.”

—Raymond Kendall, Honorary Secretary General of INTERPOL

“It's like everything you do, a labor of love, and the readers would love it.”

—Ajay Bhalla, President of Cyber & Intelligence Solutions, Mastercard

“Akli Adjaoute has spent several decades at the heart of artificial intelligence. In this book, he
vividly tells us about his journey and that of a technology that is starting to profoundly change our
societies. With clarity and generosity, he makes one understand what AI is and is not. Not only is
this a delightful read, but also an invaluable one.”

—Patrick Pérez, CEO, Kyutai

“Having experienced the real-world impact of Brighterion, an AI company founded by Akli


Adjaoute, in crucial applications, I can attest to its incredible power. This book explores applied AI
through the lens of an expert in mission-critical tasks. Coupled with his academic background as
an AI professor, the author is an unparalleled source for education on a transformative technology
shaping our world.”

—Ian Whyte, Former Chief Risk Officer, WorldPay

“There are many books written on AI, but few that actually give readers a framework for how to
think about AI and its transformational impact on everyone in the world. This is that book. It is
powerful in its simplicity and admirable for its accessibility—the kind of book that will have readers
posting sticky notes and highlighting passages throughout to refer to, again and again.”

—Karen Webster, CEO, PYMNTS


Inside AI
OVER 150 BILLION PURCHASES PER YEAR
USE THIS AUTHOR’S AI

AKLI ADJAOUTE
FOREWORD BY RAYMOND KENDALL

MANNING
SHELTER ISLAND
For online information and ordering of this and other Manning books, please visit
www.manning.com. The publisher offers discounts on this book when ordered in quantity.
For more information, please contact
Special Sales Department
Manning Publications Co.
20 Baldwin Road
PO Box 761
Shelter Island, NY 11964
Email: [email protected]

©2024 by Manning Publications Co. All rights reserved.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in


any form or by means electronic, mechanical, photocopying, or otherwise, without prior written
permission of the publisher.

Many of the designations used by manufacturers and sellers to distinguish their products are
claimed as trademarks. Where those designations appear in the book, and Manning Publications
was aware of a trademark claim, the designations have been printed in initial caps or all caps.

Recognizing the importance of preserving what has been written, it is Manning’s policy to have
the books we publish printed on acid-free paper, and we exert our best efforts to that end.
Recognizing also our responsibility to conserve the resources of our planet, Manning books
are printed on paper that is at least 15 percent recycled and processed without the use of
elemental chlorine.

The authors and publisher have made every effort to ensure that the information in this book
was correct at press time. The authors and publisher do not assume and hereby disclaim any
liability to any party for any loss, damage, or disruption caused by errors or omissions, whether
such errors or omissions result from negligence, accident, or any other cause, or from any usage
of the information herein.

Manning Publications Co. Development editor: Doug Rudder


20 Baldwin Road Review editors: Mihaela Batinić
PO Box 761 Production editor: Andy Marinkovich
Shelter Island, NY 11964 Copy editor: Alisa Larson
Technical editor: Richard Vaughan
Proofreader: Jason Everett
Typesetter: Dennis Dalinnik
Cover designer: Marija Tudor

ISBN: 9781633437722
Printed in the United States of America
To my beloved wife, Nathalie,
and our wonderful children, Ghislene and Eddy,
as well as to my parents, brothers, and sisters.
I want to express my profound gratitude for your constant encouragement
and belief in my aspirations.
brief contents
1 ■ The rise of machine intelligence 1
2 ■ AI mastery: Essential techniques, Part 1 9
3 ■ AI mastery: Essential techniques, Part 2 23
4 ■ Smart agent technology 43
5 ■ Generative AI and large language models 52
6 ■ Human vs. machine 76
7 ■ AI doesn’t turn data into intelligence 92
8 ■ AI doesn’t threaten our jobs 99
9 ■ Technological singularity is absurd 110
10 ■ Learning from successful and failed applications
of AI 123
11 ■ Next-generation AI 141
A ■ Tracing the roots: From mechanical calculators
to digital dreams 156
B ■ Algorithms and programming languages 168
index 187

vii
contents
foreword xii
preface xiv
acknowledgments xvi
about the book xviii
about the author xxii
about the cover illustration xxiii

1 The rise of machine intelligence


1.1 What is artificial intelligence?
1
2
1.2 The AI revolution 3
1.3 Error-prone intelligence 4
1.4 Chatbots 6
1.5 Looking ahead 7

2 AI mastery: Essential techniques, Part 1


2.1 Expert systems 10
9

2.2 Business rules management system 12


2.3 Case-based reasoning 14
2.4 Fuzzy logic 16
2.5 Genetic algorithms 18

viii
CONTENTS ix

3 AI mastery: Essential techniques, Part 2


3.1 Data mining 24
23

3.2 Decision trees for fraud prevention 25


3.3 Artificial neural networks 28
3.4 Deep learning 32
The benefits of deep learning 34 ■
Limitations of deep
learning 35
3.5 Bayesian networks 37
3.6 Unsupervised learning 39
3.7 So, what is artificial intelligence? 41

4 Smart agent technology


4.1 Principles of smart agents
43
44
Adaptability: The true mark of intelligence 46 ■
Smart agent
language 47

5 Generative AI and large language models


5.1 Generative artificial intelligence 53
52

5.2 Large language models 53


5.3 ChatGPT 55
How ChatGPT creates human-like text 56 ■
ChatGPT
hallucination 57
5.4 Bard 60
5.5 Humans vs. LLMs 63
5.6 AI does not understand 66
5.7 Benefits of LLMs 70
5.8 LLM limits 70
5.9 Generative AI and intellectual property 71
5.10 Risks of generative AI 72
5.11 LLMs and the Illusion of Understanding 74

6 Human vs. machine


6.1 The human brain
76
77
Thoughts 77 Memory 79 The subconscious mind 80
■ ■

Common sense 81 Curiosity 82 Imagination 83


■ ■

Creativity 85 Intuition 86 Analogy 87


■ ■
x CONTENTS

6.2 Human vision vs. computer vision 87


AI and COVID 88 ■
Image reasoning 89

7 AI doesn’t turn data into intelligence


7.1 Machines defeating world champions
92
94
7.2 Lack of generalization 96

8 AI doesn’t threaten our jobs


8.1
99
Are simple human tasks easy to automate? 103

9 Technological singularity is absurd


9.1 The genesis of technological singularity 111
110

9.2 The truth about the evolution of robotics 113


9.3 Merging human with machine? 118
9.4 Science fiction vs. reality 120

10 Learning from successful and failed applications of AI


10.1 AI successes 124
123

10.2 AI misuse 125


10.3 AI failures 127
10.4 How to set your AI project up for success 133
Data: The lifeblood of AI 133 The realistic AI perspective

134
The importance of planning 134 Risk mitigation 134

Collaboration and expertise 134


10.5 AI model lifecycle management 134
Data preparation 135 Behavior analysis 137 Data
■ ■

transformation 137 Model creation 137 Live


■ ■

production 137 Data storage 137 Notifications 137


■ ■

Back-office review 138 Adaptive learning 138


Administration 138 Remark on AI platforms 138


10.6 Guiding principles for successful AI projects 138

11 Next-generation AI
11.1
141
Data flexibility 142
11.2 Sampling 142
11.3 Elimination of irrelevant attributes 142
11.4 Data coherence 143
11.5 Lack of bias in data and algorithms 143
CONTENTS xi

11.6 Feature engineering 144


11.7 Technique combination 145
11.8 Unsupervised learning 145
11.9 AI factory 146
11.10 Quality Assurance 146
11.11 Prediction reliability 147
11.12 Effective data storage and processing 147
11.13 Deployability and interoperability 148
11.14 Scalability 148
11.15 Resilience and robustness 148
11.16 Security 149
11.17 Explicability 150
11.18 Traceability and monitoring 150
11.19 Privacy 150
11.20 Temporal reasoning 151
11.21 Contextual reasoning 151
11.22 Causality inference 152
11.23 Analogical reasoning and transferability 153
11.24 Personalization 153
11.25 Sustainable AI 153
11.26 Adaptability 154
11.27 Human–machine collaboration 154

appendix A Tracing the roots: From mechanical calculators


to digital dreams 156
appendix B Algorithms and programming languages 168
epilogue 174
references 176
index 189
foreword
In 1999, I was in the last year of my five-year mandate as Secretary-General of the
International Criminal Police Organization (INTERPOL). An American friend who
thought we might have mutual interests introduced me to Akli. We met for lunch in
Paris, and after the usual introductory niceties, we began to discuss the possible con-
nections between what Akli was doing professionally and the essence of my own role at
the Interpol headquarters in Lyon, France. In my previous function at Scotland Yard
in London, I had worked for some period in the Criminal Intelligence Division and
was naturally interested in any developments where the exploitation of intelligence
analysis could be applied to Interpol databases.
I should perhaps, at this stage, indicate why my first meeting with Akli was an
“experience.” During my functions at Interpol, I have met many important and
impressive people, including two presidents of the United States, but Akli impressed
me in a different way. His physical presence, no doubt because of his Kabyle origins,
of which he is particularly proud, gives the impression of someone who is sure of him-
self, can be relied upon to tell you the truth, and will give authoritative opinions.
Akli’s impression immediately strikes you and sets the climate in which discussions will
take place. Unfortunately, circumstances did not make it possible for me to develop a
project for Interpol at the time, so my continued interest in Akli’s activities became
more personal than professional. However, by this time, he was establishing himself in
the United States.
Akli earned a master’s degree at the University of Technology of Compiègne and a
doctorate in Artificial Intelligence at Pierre and Marie Curie University. For his thesis,

xii
FOREWORD xiii

Akli developed software at Necker Hospital in Paris to enable doctors to diagnose


emergency patients rapidly. Artificial intelligence was known at the time but was in its
infancy. The work that Akli accomplished in his five-year thesis was recognized by the
press. This proved to Akli that he could build a viable future career using his special
brand of AI technology.
By the time of his departure to the United States, Akli had already founded his
own software company and worked with a number of well-known French companies
and governmental organizations. During this time, he also taught at EPITA, a school of
engineering, where he led the Department of Cognitive Science. For his last year in
France, Akli had achieved certain notoriety but had already decided that the best
chance for the effective development of his professional talents lay in the United States.
In 1999, he took the steps that would eventually lead to his present successes in AI.
Beginning his new enterprise in San Francisco was not easy, and to a certain
extent, I shared a part of the trials and tribulations with him. He was living alone with-
out his wife and family, who were still in France. He still had a teaching obligation in
Paris with EPITA, but he was trying at the same time to establish his own company,
which he called Brighterion. Resources were limited, and anyone other than Akli
would have thrown in the towel. It was in such difficult circumstances that Akli’s
strength of character came to the fore.
Akli will say that he owes persistence to his Kabyle origins. Akli is a man of principle
who lives by the application of certain basic rules in his day-to-day activities, both in pub-
lic and in private. Some would refer to these values as old-fashioned, including me,
because we feel that they are lacking in our modern society: the notions of friendship,
loyalty, and honesty seem to be lacking, particularly in the world of affairs. I am con-
vinced that Akli owes his success to the fact that he has always applied these rules to his
relations with other people. There is no doubt that Brighterion owes its present status
and its future development—albeit now sold to Mastercard—to Akli and a key group of
people who have been loyal to him, particularly when times have been difficult.
I have often asked Akli for explanations of what I see in the media, which never
corresponds to my understanding of what artificial intelligence means. I am sure that
there are many others in my situation. Therefore, I am particularly grateful to Akli for
having written such a book.

—Raymond Kendall, Honorary Secretary General of INTERPOL


preface
Welcome to the world of artificial intelligence (AI), a domain where the boundar-
ies between science fiction and reality often become indistinct. AI has captivated our
collective imagination, particularly in 2022 and 2023, thanks to the release of ChatGPT.
This groundbreaking product has played a pivotal role in democratizing AI usage by
offering a user-friendly interface, empowering individuals without technical expertise
to harness its benefits. ChatGPT boasts impressive capabilities, including answering
questions, crafting narratives, composing music and poetry, and generating computer
code.
For more than three decades, I’ve been passionate about artificial intelligence,
dedicating my adult life to teaching and applying AI to address real-world challenges.
In 1987, I established my first company, Conception en Intelligence Artificielle, in
Paris before completing my PhD. We developed the MINDsuite platform, which seam-
lessly combines various AI techniques and has found successful applications in
defense, insurance, finance, healthcare, and network performance. While leading this
company, I also shared my expertise with students at the École Pour l’Informatique et
les Techniques Avancées (EPITA), where I served as the head of the AI department
and chaired the scientific committee.
In April 2000, I launched my second venture, Brighterion (acquired by Master-
card), in San Francisco. This company was founded to address the pervasive issues of
payment fraud and cybersecurity, which pose significant challenges across various
industries, leading to annual losses amounting to billions of dollars. Brighterion-
powered software is now used by over 2,000 clients worldwide, with 74 of the largest

xiv
PREFACE xv

U.S. banks relying on its technology to safeguard against fraud and risk. Annually,
more than 150 billion transactions are processed through Brighterion software.
In this book, we embark on a transformative journey to educate readers about the
fascinating world of AI. Whether you’re new to the field or a seasoned enthusiast, my
aim is to equip you with a clear and comprehensive understanding of what AI truly is
and what it can and cannot achieve. Throughout this exploration, we will discuss the
expansive and multifaceted landscape of AI, marked by a diverse range of techniques
and methodologies aimed at simulating human cognition.
Our journey will take us to the very heart of AI, where we’ll dissect these tech-
niques and methodologies. From the early days of expert systems to the cutting-edge
advancements in deep learning algorithms, you’ll gain a thorough comprehension of
the full spectrum of AI techniques that drive AI applications. Along the way, we’ll also
explore various aspects of human cognition, including imagination, intuition, curios-
ity, common sense, and creativity, to illustrate that current AI techniques still fall short
of replicating these qualities.
Insights from both successful and unsuccessful AI projects will demonstrate that
many human jobs remain beyond the capabilities of AI and refute the notion of tech-
nological singularity, which envisions a future where intelligent robots can replicate
themselves, potentially leading to the end of human civilization. As we progress, we’ll
also address ethical questions surrounding bias, fairness, privacy, and accountability.
Drawing from my three decades of experience in developing and deploying mission-
critical AI systems, I will outline the characteristics that, in my perspective, will define
the next generation of AI platforms.
I firmly believe that it is crucial for every citizen to acquire knowledge about AI,
given its pervasive effect on our modern world. Whether you are an aspiring AI devel-
oper, a business professional, an investor, a policymaker, or simply a concerned citi-
zen, I welcome you to embark on this journey to discover the true essence of AI and its
profound effect on our world. My hope is that, by the time you turn the final page of
this book, you will not only possess the ability to discern AI reality from its illusions but
also have the capacity to engage thoughtfully with the imminent AI-driven future that
awaits us all.
Let the voyage begin.
acknowledgments
Numerous individuals generously dedicated their time to reviewing this book, and I
am sincerely grateful for the valuable comments and suggestions received. I extend
my gratitude to Raymond Kendall, a dear friend who insisted I write this book. Lucien
Bourely, a friend and former partner in my company, deserves special mention for his
consistently valuable insights and encouragement.
My deepest appreciation goes to the great team of technical editors I was fortunate
to have, namely Patrick Perez, Raymond Pettit, James T. Deiotte, Dick Sini, Shawn
Nevalainen, François Stehlin, Florent Gastoud, Philippe Hallouin, and Philippe Perez.
These exceptional experts invested their time and expertise in thoroughly reviewing
my work. Through numerous discussions, their insights, suggestions, and meticulous
inputs significantly contributed to refining the manuscript. Each editor brought a
unique perspective and a wealth of knowledge to the table, enhancing the overall
quality of the content. Their dedication to precision, helpful critiques, and collabora-
tive approach played a pivotal role in shaping the content of the book. Throughout
the different iterations leading to the final edition, their feedback acted as a guiding
force, ensuring the narrative remained engaging, informative, and accessible to read-
ers from diverse backgrounds.
The content of this book is profoundly influenced by my journey in applying AI to
mission-critical applications. We encountered numerous challenges that required
refining our AI algorithms, finding an efficient way to design models, and creating a
storage technique suitable for storing intelligence while providing real-time responses
in milliseconds to adhere to our stringent service level agreements. These agreements

xvi
ACKNOWLEDGMENTS xvii

demanded scalability, resilience, adaptability, explicability, and compliance. I express


my heartfelt gratitude once again to François Stehlin, Florent Gastoud, and Philippe
Hallouin; an extraordinarily talented team that not only believed in my venture but
also stood steadfast with me through every hurdle we encountered. Their intelligence
and unwavering support were instrumental in turning challenges into triumphs, and
for that, I am sincerely thankful.
I would like to express my sincere appreciation and gratitude to the entire Manning
team for their invaluable contributions to this project. Special thanks go to Doug Rudder,
India Hackle, Alisa Larson, Jason Everett, and many others who reviewed the book at
the request of Manning Publications. Their insightful contributions, made throughout
various iterations, played a pivotal role in enhancing every aspect of the content.
Special thanks to Richard Vaughan, a CTO at Purple Monkey Collective, a research
focused startup delivering machine learning and cloud guidance services. Richard is a
highly experienced engineer who has worked across many different industry verticals
and countries in a highly varied career, and worked as my technical editor on this book.
A special acknowledgment is reserved for Daniel Zingaro, whose compelling argu-
ments and persuasive influence were crucial in deciding to incorporate a dedicated
chapter on generative AI. This addition holds particular significance given the cur-
rent prominence and extensive discussions surrounding generative AI in the broader
field of artificial intelligence.
Finally, a big thank you to all the reviewers who provided feedback: To Alain Couniot,
Alfons Muñoz, Andre Weiner, Andres Damian Sacco, Arnaldo Gabriel Ayala Meyer,
Arturo Geigel, PhD, Arun Saha, Bill LeBorgne, Bonnie Malec, Clifford Thurber,
Conor Redmond, Dinesh Ghanta, Georgerobert Freeman, James Black, Jamie Shaffer,
Jeelani Shaik, Jereme Allen, Jesús Juárez, Kay Engelhardt, Lucian-Paul Torje, Marc-
Anthony Taylor, Mario Solomou, Milorad Imbra, Mirna Huhoja-Dóczy, Piotr Pindel,
Ranjit Sahai, Rolando Madonna, Salil Athalye, Satej Sahu, Shawn Bolan, Shivakumar
Swaminathan, Simon Verhoeven, Stephanie Chloupek, Steve Grey-Wilson, Tandeep
Minhas, and Tomislav Kotnik, your insight and suggestions helped make this book
what it is.
about the book
In this book, the primary goal is to provide a comprehensive understanding of both
the capabilities and limitations of artificial intelligence. We’ll explore a diverse range
of AI techniques, spanning from expert systems to deep learning, and emphasize the
distinctions between AI and human cognition. Insights drawn from real-world AI proj-
ects not only question the notion of machines taking over the majority of human jobs
but also underscore the implausibility of the technological singularity concept. Ethical
considerations, including issues like bias and privacy, will be addressed. Drawing on
three decades of experience in applying AI to mission-critical applications, I outline
the characteristics that define the next generation of AI platforms.

Who should read this book?


This book is a comprehensive guide for anyone interested in learning about artificial
intelligence, an ever-evolving field that profoundly shapes our future, influencing how
we learn, work, and live.

How this book is organized


Embark on an extensive exploration of the field of artificial intelligence within the
11 chapters of this insightful book. The journey begins with an introduction to fun-
damental principles, encompassing algorithms and programming languages, laying
a solid foundation for understanding AI. Moving beyond, chapters 2 to 4 explore
various AI techniques, covering expert systems, business rules, fuzzy logic, genetic
algorithms, case-based reasoning, classical neural networks, deep learning, Bayesian

xviii
ABOUT THE BOOK xix

networks, unsupervised learning, and smart agents. Chapters 5 and 6 shift focus to
the advancements in generative AI and the comparison between human cognition
and artificial intelligence. Subsequent chapters tackle diverse topics, including the
limitations of AI, its impact on human jobs, and a critical examination of technolog-
ical singularity. The book concludes with valuable insights from past AI projects,
providing guidance for future endeavors and a visionary perspective on the next
generation of AI platforms. Additionally, an insightful appendix complements the
narrative by exploring the historical evolution of AI technology. Each chapter offers
a unique lens into the multifaceted landscape of AI, making this book an essential
read for both enthusiasts and those seeking a deeper understanding of this transfor-
mative field:
 Chapter 1—In the introductory chapter, we explore a range of real-world exam-
ples to showcase how AI is emerging as a pivotal force that propels positive
transformations across diverse fields by enhancing efficiency and fostering
innovation. Additionally, we also highlight the challenges that stem from the
inherent inclination of AI algorithms and models towards errors.
 Chapter 2—In this chapter, we provide an overview of multiple AI techniques,
accompanied by practical examples. We will explain expert systems, which rely
on human expertise and inference procedures to solve problems, as well as
case-based reasoning, a method that uses past experiences to tackle new chal-
lenges. Additionally, we will explore fuzzy logic as an elegant means of repre-
senting and capturing the approximate and imprecise nature of the real world.
Finally, we’ll conclude this chapter with an examination of genetic algorithms,
which offer a powerful, straightforward, and efficient approach to solving non-
linear optimization problems.
 Chapter 3—In this chapter, we will continue to explore various AI techniques.
We’ll begin with data mining, a powerful AI technique used to extract valuable
information, patterns, and associations from data. Following that, we’ll intro-
duce artificial neural networks and deep learning, powerful algorithms for pat-
tern recognition that have yielded impressive results in computer vision,
natural language processing, and audio analysis. Next, we’ll briefly touch on
Bayesian networks, a technique that encodes probabilistic relationships among
variables of interest. To wrap up the chapter, we’ll explore unsupervised learn-
ing, a collection of algorithms designed to analyze unlabeled datasets and
uncover similarities and differences within them.
 Chapter 4—In this chapter, we will introduce smart agents, a powerful artificial
intelligence technique centered on the use of adaptive, autonomous, and goal-
oriented entities to address complex problems. We will specifically focus on a pro-
prietary smart agent approach, providing an illustrative example to elucidate how
each agent possesses the capability to assess inputs as either beneficial or detri-
mental with respect to its objectives. Furthermore, we will explore the adapt-
ability of these agents, draw comparisons with more conventional approaches,
xx ABOUT THE BOOK

and examine instances where this technique has been effectively employed to
solve real-world challenges.

NOTE Chapters 2 to 4 contain a high-level explanation of some of the techni-


cal underpinnings of AI and can be skipped by those who want to dive into
the discussion of the reality and illusion of current AI.

 Chapter 5—AI has witnessed numerous ups and downs, but the emergence of
ChatGPT, OpenAI’s impressive chatbot, capable of composing poems, college-
level essays, computer code, and even jokes, represents a pivotal moment. In
this chapter, we will introduce generative AI, an impressive technology that
offers a multitude of benefits across various domains and holds great potential
for revolutionizing many industries. We will also examine its advantages, limita-
tions, and the potential risks associated with the use of this technology.
 Chapter 6—In this chapter, we will explore various aspects of human cognition
to illustrate what it means to be imaginative, intuitive, curious, and creative.
We’ll show that current AI falls short in emulating these traits. We’ll compare
human reasoning to AI to examine whether machines can replicate human-like
thinking. Additionally, we’ll reflect on our limited understanding of the human
mind. Furthermore, we will highlight that genuine comprehension is a prereq-
uisite for vision, revealing the current limitations of AI algorithms in recogniz-
ing objects and their substantial gap in achieving human-like object and scene
perception.
 Chapter 7—In this chapter, we will highlight that no matter how extensive the
dataset or advanced the algorithms, AI programs ultimately fall short of attain-
ing genuine intelligence. We will elaborate on the challenge AI encounters
when attempting to extract true intelligence from data, as even with current AI
techniques excelling in data processing, they continue to grapple with compre-
hending its deeper nuances.
 Chapter 8—We demonstrate that despite concern about AI taking our jobs, most
human tasks are still out of the reach of AI.
 Chapter 9—The prevailing narrative often suggests that AI’s evolution will result
in intelligent robots capable of replicating themselves, ultimately leading to the
downfall of human civilization. While this scenario might be the stuff of com-
pelling fiction, it doesn’t align with reality. In this chapter, we aim to debunk
the notion of technological singularity as baseless and argue that our concerns
should focus less on AI and more on the potential pitfalls of artificial stupidity.
 Chapter 10—Each AI project, whether it meets with success or faces hurdles,
offers a wealth of valuable lessons. Drawing insights from these experiences
empowers us to make informed decisions, steering our AI projects toward favor-
able outcomes while steering clear of common pitfalls. In this chapter, we will
discuss insights gained from both the missteps and achievements of past AI
ABOUT THE BOOK xxi

projects. Furthermore, we will provide valuable guidance on assembling the


right team, cultivating the necessary mindset, and crafting a promising strategy
for your AI project.
 Chapter 11—In this chapter, I use my three decades of experience in the devel-
opment and deployment of mission-critical AI systems where reliability, preci-
sion, and effect are not mere goals but absolute necessities. I will describe a set
of characteristics that, in my perspective, will define the next generation of AI
platforms.

liveBook discussion forum


Purchase of Inside AI includes free access to liveBook, Manning’s online reading plat-
form. Using liveBook’s exclusive discussion features, you can attach comments to the
book globally or to specific sections or paragraphs. It’s a snap to make notes for yourself,
ask and answer technical questions, and receive help from the author and other users.
To access the forum, go to https://livebook.manning.com/book/inside-ai/discussion.
You can also learn more about Manning’s forums and the rules of conduct at https://
livebook.manning.com/discussion.
Manning’s commitment to our readers is to provide a venue where a meaningful
dialogue between individual readers and between readers and the author can take
place. It is not a commitment to any specific amount of participation on the part of
the author, whose contribution to the forum remains voluntary (and unpaid). We sug-
gest you try asking the author some challenging questions lest his interest stray! The
forum and the archives of previous discussions will be accessible from the publisher’s
website as long as the book is in print.
about the author
AKLI ADJAOUTE is the founder of Exponion, a venture capital
firm that provides cutting-edge startup companies with finan-
cial resources and expertise. Prior to Exponion, he was the
founder and CEO of Brighterion, which was acquired in 2017
by Mastercard. Brighterion provides enterprise AI applications
for payment service providers and financial institutions. Addi-
tionally, Dr. Adjaoute founded and led Conception Intelligence
Artificielle, a company focused on AI technology. Alongside his
entrepreneurial pursuits, he has shared his real-world AI experi-
ence as an adjunct professor in both France and the United States. Dr. Adjaoute has
been awarded 32 patents with over 2,000 citations.

xxii
about the cover illustration
The figure on the cover of Inside AI is “Femme Tschouwache,” or “Chuvache Woman,”
taken from a collection by Jacques Grasset de Saint-Sauveur, published in 1797. Each
illustration is finely drawn and colored by hand.
In those days, it was easy to identify where people lived and what their trade or sta-
tion in life was just by their dress. Manning celebrates the inventiveness and initiative
of the computer business with book covers based on the rich diversity of regional cul-
ture centuries ago, brought back to life by pictures from collections such as this one.

xxiii
The rise of
machine intelligence

This chapter covers


 How AI is transforming industries and
empowering lives
 The challenges associated with AI
 Some of the remarkable contributions of early
innovators

Few ideas have captured the imagination like artificial intelligence (AI). The notion
of “thinking machines” has been a theme in scientific literature and popular cul-
ture for decades. Now, AI is poised to be a transformative economic force that will
amplify productivity and give birth to entirely new industries and markets. Recently,
generative AI tools like ChatGPT have attracted exceptional attention and substan-
tial investments.
While there is no doubt that AI has made incredible advancements, it is import-
ant to temper this enthusiasm with a dose of reality. Many AI applications are still in
their infancy, and the road to achieving true artificial general intelligence remains
long and uncertain. Separating genuine advancements from exaggerated claims is
essential to harness the true potential of AI while navigating the challenges it pres-
ents. In this book, we’ll look at the current state of AI and consider where AI may
be going next.

1
2 CHAPTER 1 The rise of machine intelligence

1.1 What is artificial intelligence?


Warren S. McCulloch and Walter H. Pitt’s 1943 paper “A Logical Calculus of the Ideas
Immanent in Nervous Activity” is often cited as the starting point in practical AI
research. Their paper introduces a mathematical procedure for inferring relation-
ships between propositions, and they suggested that neurons and their connections
could be modeled in terms of true-or-false logical statements. Their technique led to
the design of circuits that can compute Boolean functions, which are the fundamental
operations of all digital computers.
In October 1950, Alan Turing published “Computing Machinery and Intelli-
gence,” which has become one of the most referenced papers in the field. Turing pro-
poses that a machine could be considered intelligent if it passed the so-called Turing
test. If the observer cannot discern a human’s answers from a computer’s answers, the
computer would pass the test and be considered capable of thinking like a person.
The birth of the term artificial intelligence occurred during a workshop organized at
Dartmouth College in the summer of 1956. John McCarthy, then an assistant profes-
sor of mathematics at Dartmouth, used the term for its marketing effect. He expected
the catchy phrase to boost the visibility of this new research field. It would seem that
he succeeded since he later became the first director of the AI labs at MIT.
Following that revolutionary workshop, the AI field experienced cycles of excite-
ment and disenchantment. One might question whether inflated expectations and
the subsequent disillusionment are, in part, attributable to the field’s name. So, what
precisely is the definition of AI? At its core, AI involves a set of technologies that
enable computers to perform tasks traditionally associated with human intelligence.
Since its inception, AI has relied heavily on two fundamental methods for algorithms
to learn from data. In supervised learning, imagine yourself wanting to teach an AI
system about fruits by providing labeled examples like “This is an apple; that’s a
banana,” allowing the system to learn how to identify new fruits based on prior exam-
ples. On the other hand, unsupervised learning takes a more exploratory approach,
operating without labels or guides. The AI system independently analyzes the data,
grouping similar items together, such as placing all red apples in one category without
being explicitly told they are apples.
AI pioneer Joseph Weizenbaum describes AI as machines that appear to behave
intelligently, whether they actually employ the same mechanisms required for human
intelligence. Weizenbaum sees AI in machines capable of mundane tasks like assem-
bling nuts and bolts with the aid of synthetic vision and robotic arms as well as in
computer programs that could aid in synthesizing chemical compounds, translating
languages, composing music, and even writing software—all tasks possible now with
current generative AI tools.
I think of intelligence as a wonderful faculty found at the root of virtually all the
decisions we make. The challenge of AI is simply knowing to what extent a com-
puter program can simulate certain intelligence reflexes and how a computer pro-
gram behaves when faced with a problem for which we often ignore our own mental
1.2 The AI revolution 3

operations to resolve. However, no matter how we define AI, we are increasingly able
to see its effects in everyday life, shaping the way we work, communicate, and navigate
the world around us.

1.2 The AI revolution


AI has undergone significant evolution over several decades, driven by a combination
of human innovation in AI algorithms, advancements in hardware technology, and
the increasing accessibility of data. In the early days, the concept of machines emulat-
ing human intelligence seemed like a distant dream, relegated to the world of science
fiction. Little did we know that we were on the verge of a revolution that is reshaping
and enhancing nearly every facet of our modern world. Indeed, today, AI brings
numerous advantages to virtually every field, boosting efficiency and driving innova-
tion in the business environment, while also making positive contributions to various
human endeavors.
For example, over the last decade, we’ve witnessed a significant enhancement in
our daily interactions, thanks to AI-driven chatbots that engage in natural conversa-
tions, providing real-time support and information. Meanwhile, smart wearables,
like smartwatches, act as advanced companions, ensuring connectivity and contrib-
uting to our well-being by offering specific health benefits. In the healthcare sector,
AI applications are helping clinicians in early disease detection and diagnosis. Addi-
tionally, AI-powered robotic surgery systems contribute to precision in medical pro-
cedures, reducing recovery times and improving patient outcomes. Telemedicine
platforms utilize AI for remote patient monitoring and personalized health recom-
mendations, making healthcare services more accessible and tailored to individual
needs. The transformative effect of AI extends to individuals with disabilities, lead-
ing to a new era of inclusivity and empowerment. Voice recognition software
empowers those with mobility impairments to control devices and communicate
more effectively, while AI-driven prosthetics enhance mobility and independence
for individuals with limb disabilities.
In the business world, AI stands as a cornerstone of modern business strategies,
offering a plethora of benefits that drive efficiency, innovation, and competitiveness.
AI enables businesses to extract valuable insights from massive datasets, informing
strategic decision-making and forecasting trends. Automation powered by AI stream-
lines routine tasks, reducing operational costs and freeing up human resources for
more complex and creative endeavors. In supply chain management, AI optimizes
inventory and logistics, minimizing disruptions and improving overall efficiency. In
the financial industry, AI emerges as a potent asset in the continuous combat against
financial crimes, with a particular emphasis on fortifying efforts in fraud prevention
and money laundering detection.
A breakthrough and impressive milestone in the evolution of AI is the advent of
generative AI, with powerful products such as ChatGPT playing a pivotal role in democ-
ratizing access to AI. Generative AI has emerged as a transformative force across various
4 CHAPTER 1 The rise of machine intelligence

industries, offering a multitude of benefits that extend creativity, efficiency, and


innovation. The release of ChatGPT has empowered billions of nontechnical indi-
viduals, providing them with the ability to harness the power of AI without requiring
specialized technical knowledge. It is also becoming instrumental in facilitating global
business expansion by empowering organizations to generate relevant and effective con-
tent without the immediate need for human support as these advanced language mod-
els excel at generating coherent text and adapting to specific communication styles.
The advent of AI-powered automatic translation has become a catalyst for global
connectivity, breaking down language barriers, fostering cross-cultural communica-
tion and creating a more interconnected world. With sophisticated natural language
processing algorithms, AI-driven translation tools enable real-time language inter-
pretation, facilitating seamless interactions between individuals and businesses from
diverse linguistic backgrounds. This advancement not only enhances international
collaboration but also promotes a deeper understanding of different cultures and
perspectives.
In the field of education, AI is revolutionizing learning experiences through per-
sonalized tutoring systems and adaptive learning platforms. Virtual tutors and AI-
based educational assistants will offer additional resources, answering questions and
providing guidance to students both inside and outside the classroom. AI is poised to
bridge educational gaps and democratize access to quality learning resources, ensur-
ing that education becomes a dynamic and inclusive process for learners worldwide.
AI technologies have greatly strengthened global security, making the world safer
in ways we’ve never seen before. They play a vital role in detecting and preventing
threats, especially in cybersecurity and public safety. In law enforcement, AI-powered
surveillance quickly identifies and captures individuals involved in criminal activities,
improving overall public safety. In homeland security, AI is a crucial asset for reinforc-
ing defenses and protecting nations, creating a safer environment for citizens, and
ensuring border integrity.
The previously mentioned instances represent only a portion of the domains
where AI is delivering significant benefits. The list of sectors experiencing positive
effects from AI is continually broadening, and I firmly believe that virtually every field
stands to gain from its capabilities. Nevertheless, it’s essential to recognize the paradox—
while AI offers opportunities for substantial advancements, it also introduces the risk
of misuse and challenges within those same areas.

1.3 Error-prone intelligence


The deployment of AI facial recognition technology raises significant concerns, espe-
cially regarding biases and ethical considerations. Instances of racial and gender bias in
facial recognition systems have been well-documented, raising serious ethical questions
about how biased technology might perpetuate societal inequalities. Similar biases have
been observed in AI used in automated hiring systems, inadvertently favoring certain
characteristics and contributing to disparities that further marginalize underrepresented
1.3 Error-prone intelligence 5

groups. Furthermore, incorporating AI into the criminal justice system raises con-
cerns about potential biases, fairness, and the transparency of the sentencing process.
AI algorithms that analyze various factors to predict recidivism or assess the likelihood
of reoffending may inadvertently sustain existing biases in the system, presenting chal-
lenges in ensuring a fair and just legal system.
In the healthcare sector, AI is susceptible to errors, raising substantial concerns
about possible misdiagnoses or inaccurate treatment recommendations. The opacity of
AI models, as we will discuss in chapter 3, adds an extra layer of concern, making it chal-
lenging for users to understand the process behind arriving at specific conclusions.
The use of AI in self-driving cars raises worries about errors causing accidents,
especially due to algorithmic issues or malfunctions. The ever-changing and unpre-
dictable nature of real-world traffic situations makes it challenging for AI systems to
accurately understand and respond to complex scenarios. A recent tragic incident in
San Francisco in October 2023 serves as a devastating example, where a self-driving
car failed to detect a pedestrian trapped beneath it, dragging her about 20 feet.
The rapid advancement of AI in social media platforms could worsen its negative
effect by fueling the spread of false information, an increase in cyberbullying, and
an elevated risk to individual mental well-being. Additionally, the growing use of
deepfake technology, allowing the creation of convincingly fabricated content like
realistic videos and audio recordings, has the potential to deceive and manipulate
individuals.
While large language models (LLMs) achieved an impressive AI milestone by
democratizing AI for the larger public, they also introduced potential drawbacks, partic-
ularly the risk of overreliance and blind trust by nontechnical users in every output pro-
duced by these AI models. In chapter 5, we will demonstrate that LLMs can generate
text that is seemingly coherent but factually inaccurate and sometimes entirely fictional.
As AI becomes increasingly prevalent in various sectors, the likelihood of misuse and
accompanying challenges rises when the technology is applied improperly.
Finally, let’s consider another issue stemming from AI. This concern is not linked
to errors in AI algorithms but paradoxically arises from the technology’s efficiency
in specific tasks. Corporate executives and economists anticipate the potential loss
of numerous jobs due to the influence of generative AI, causing an effect across
various industries. Even sectors like software and AI engineering are at risk, as gen-
erative AI speeds up productivity, potentially reducing the demand for other engi-
neering roles.
As AI rapidly evolves, it doesn’t just change how we work but transforms how we
live, connect, and shape our societal identity. To understand this effect, let’s look at
how AI is transforming one of the most common human-to-human interactions—the
conversation.
6 CHAPTER 1 The rise of machine intelligence

1.4 Chatbots
Chatbots, also known as “conversational agents,” are programs that use AI and machine
learning to provide technology for human–machine interaction. This approach was
introduced in 1966 by Joseph Weizenbaum with his program ELIZA, which was created
to provide person-centered therapy. ELIZA is the ancestor of ChatGPT, Siri, Alexa, and
Google Assistant, which are now omnipresent in smartphones and home devices.
ELIZA parsed sentences looking for words such as I, you, like, and mother. Once
ELIZA identified one of these words, it responded by changing the sentence in accor-
dance with a rule associated with that word. ELIZA would then give a content-free
response or reference the previous topic for input text such as “Why do you think
that?” which contained no keywords. In his paper, Weizenbaum gave a slightly con-
trived example of a conversation between ELIZA and a female test subject:

Subject: Men are all alike.


ELIZA: IN WHAT WAY?
Subject: They’re always bugging us about something or other.
ELIZA: CAN YOU THINK OF A SPECIFIC EXAMPLE?
Subject: Well, my boyfriend made me come here.
ELIZA: YOUR BOYFRIEND MADE YOU COME HERE?
Subject: He says I’m depressed much of the time.
ELIZA: I AM SORRY TO HEAR YOU ARE DEPRESSED.

To Weizenbaum’s dismay, some users came to believe that ELIZA actually understood
what it was saying. A few psychotherapists even thought it might be a helpful tool for
their practice. In reality, all the program could do was decompose the user’s input
into its constituent parts of speech and repeat them back in a manner that sustained
the conversation. Weizenbaum was so disturbed that users could put their faith in a
relatively simple program that he became an advocate for social responsibility. He
became a vocal critic of any AI that gave the illusion of intelligence.
The current generation of AI-driven chatbots is much more sophisticated. Pow-
ered by LLMs trained on massive amounts of text and other data, tools like OpenAI’s
ChatGPT, Google’s Bard (now named Gemini), and others are capable of providing very
human-like responses when prompted in natural language. For example, consider this
brief exchange with ChatGPT:

User: Give me a short definition of artificial intelligence.


ChatGPT: I think this will look better if the text is left-aligned under the first
line of spoken text. Not under Chat GPT, but under Artficial Intelli-
gence (AI) refers to. Same instructions for the ChatGPT paragraph
on the following page.
User: Based on this definition, are you intelligent?
Summary 7

ChatGPT: No, I am not intelligent in the way humans are. I am a machine learn-
ing model developed by OpenAI. While I can process and generate
human-like text based on patterns learned from vast amounts of data, I
don't possess true consciousness, self-awareness, or subjective experi-
ences. My responses are generated based on patterns and information
present in the data on which I was trained, without true understanding
or awareness.

AI chatbots have already become a frontline approach to customer service operations


in a number of major corporations, a trend that’s likely to expand rapidly. It seems
inevitable that AI will transform other traditionally human-to-human communications
such as email, phone-based voice interactions, and ordering lunch at the local drive-
thru restaurant.

1.5 Looking ahead


As we stand on the brink of a new era, it is crucial for business leaders to not only rec-
ognize the significance of AI but also to understand that embracing AI is not merely a
choice; it is an imperative for those who seek to lead in an era defined by innovation,
efficiency, and intelligent decision-making. The AI journey is far from complete; it is
an ongoing expedition marked by continual exploration, refinement, and adaptation
to the intricate interplay between technology and humanity.
Drawing on my firsthand insights from real-world business challenges, the goal in
the chapters ahead is to provide you with practical insights into the applications of AI
within a business context. As we advance through the next 10 chapters, gaining
insights into various AI approaches, we will learn how to seamlessly integrate their
continually expanding capabilities. This will help you navigate the complexities of
integrating AI into your own enterprises, ensuring that you are well-equipped for the
transformative journey that lies ahead.

Summary
 AI positively influences diverse fields, enhancing efficiency, fostering innova-
tion, and positively affecting human endeavors.
 Generative AI, as exemplified by ChatGPT, marks a historic moment in the field
of AI by democratizing its use. It empowers nontechnical individuals and small
businesses, allowing them to harness the power of AI.
 Deployment of AI raises concerns about biases in various fields.
 AI is susceptible to making errors that may cause harm.
 The origins of AI can be traced back to 1956 when researchers convened at
the Dartmouth Conference to explore the possibilities of creating intelligent
machines.
 AI techniques can be categorized into two main types: supervised learning,
where the algorithm is trained with labeled data to associate inputs with specific
8 CHAPTER 1 The rise of machine intelligence

targets, and unsupervised learning, which works with unlabeled data to dis-
cover patterns.
 The first chatbot, ELIZA, was created in 1966 with a primary focus on therapeu-
tic interactions.
AI mastery:
Essential techniques,
Part 1

This chapter covers


 An introduction to expert systems
 An introduction to business rules management
system
 An introduction to case-based reasoning system
 An introduction to fuzzy logic
 An introduction to genetic algorithms

This chapter and the next explore various AI techniques that empower computers
to emulate human cognition—from expert systems that capture, store, and allow us
to reuse valuable expertise, mastered only by a limited number of experts, to the
business rules that systematize decision-making. We will learn about case-based rea-
soning (CBR), which uses analogy to solve problems by reusing knowledge learned
from past experience, and fuzzy logic, which handles uncertainty and navigates
ambiguity. We will learn how genetic algorithms solve complex problems when the
solution space is large and how data mining, like mining for gold, mines data to
uncover hidden and valuable insights. We will also explore the awe-inspiring world of
neural networks and deep learning, where machines learn from large sets of data.
Lastly, we’ll examine unsupervised learning, where algorithms discover hidden

9
10 CHAPTER 2 AI mastery: Essential techniques, Part 1

patterns from unlabeled data. Each technique has its own strengths and weaknesses,
which is why real-world applications combine the power of multiple techniques.
I do my best to avoid jargon and formulas, but I will still introduce a few technical
terms you will likely encounter when reading about the subject. You can skip this
chapter and the next without loss of continuity if you are only interested in learning
the story of AI or developing an educated perspective on its potential.

2.1 Expert systems


In many fields, experts are rare, as it takes years of study and real-world experience to
become an expert in any given field. It would be highly beneficial if we could capture,
store, and share the valuable expertise possessed by this limited number of experts.
Furthermore, a large number of experts retire regularly, taking with them their exten-
sive knowledge and critical business experiences. For instance, when 25 experts retire,
they take over 1,000 years of collective experience with them.
Wouldn’t it be great if we could find an intelligent way to create virtual experts in
various fields to efficiently solve problems without necessarily involving the actual
experts? For example, imagine you want to do some gardening, and you’re trying to
select the right plants for your climate, soil, and sunlight conditions. You may ask
someone who is a gardening expert to suggest the best plants for your situation. Now,
suppose we could extract the expert’s knowledge about plant types, soil conditions,
weather patterns, and everything related to gardening to design a “gardening digital
expert” software. This example illustrates the purpose of expert systems, which are
computer-based systems designed to mimic the decision-making abilities of human
experts in specific domains.
While traditional procedural systems combine algorithms and knowledge in a sin-
gle program, expert systems separate the domain-specific know-how from the proce-
dural methods used to execute the program. An expert system comprises three main
modules (figure 2.1):
 A knowledge base that contains the domain expertise and is stored as a collec-
tion of simple if-then statements rules. This module acts as a repository of the
knowledge accumulated by many experts.
 A working memory that contains the data inputs and tracks the progress of what
has been deduced by the inference engine.
 An inference engine, which is a computer program that runs in a loop. At each
cycle, it evaluates the facts in the working memory against the rules. When the
conditions of a rule are met, that rule may generate new facts, modify existing
ones, and/or stop the loop. The loop automatically stops if no more rules can
be triggered with the current facts.
This separation of components brings many benefits. It allows people without a pro-
gramming background, such as doctors, traders, underwriters, and compliance
experts, to share their expertise in the knowledge base. This setup also facilitates the
2.1 Expert systems 11

Input knowledge
and review rules User Notifications/maintenance
Field experts
interface

Inference
Rules Outputs
engine

Automated rules
Inputs creation (optional) Working Update
(facts) memory

Figure 2.1 Flowchart of an expert system

expert system’s enrichment and maintenance since knowledge can easily be added,
updated, or removed from the knowledge base without modifying the underlying code.
In 1972, Edward H. Shortliffe created MYCIN [1], one of the first expert systems. It
was used experimentally to diagnose bacterial infections, and it made inferences from
input information regarding bacterial organisms, infection sites, and the presence of spe-
cific clinical signs such as fever or headache. There are more than 500 if-then rules con-
tained in the MYCIN knowledge base. The following is one of the rules used by Mycin:

Rule 20
IF substrate of culture is blood
AND stain of organism is gram negative
AND morphology is rod
AND patient has been seriously burned
THEN likelihood is 40% that organism is pseudomonas

As you might deduce, the straightforwardness of the if-then-else format is vital. You
can likely envision experts crafting such rules without requiring specialized training.
The following example is a rule from a different expert system that aimed to enhance
plant safety and diagnose system faults [2]:

Rule 27
IF Condenser Temperature Increase
AND Steam Temperature Increase
AND Condenser Pressure Rapid Increase
AND Condensate Level Increase
THEN Emergency Pump is Idle
AND DISPLAY Condensate Pump Break Down and Emergency Pipe Idle
12 CHAPTER 2 AI mastery: Essential techniques, Part 1

One of the pioneering commercial expert systems was eXpert CONfigurer (XCON).
Digital Equipment Corporation (DEC), a computer supplier, faced the challenge of
managing a diverse range of components that experienced frequent changes and
could be configured in numerous ways. In the early 1980s, before the assembly and
configuration of computer systems commenced, orders from customers were manu-
ally verified to ensure they contained all the required components and nothing extra.
Despite these manual checks, errors in the configuration process occasionally per-
sisted, necessitating corrective actions. Therefore, computers were reevaluated at
DEC’s final assembly station before being shipped to customers. XCON was intro-
duced, utilizing its knowledge base and a set of rules to validate the layout of each
computer. This innovation enabled DEC to ship most components directly to the cus-
tomer’s site for final assembly, streamlining the process.
Another notable system emerged in 1983 from General Electric: the expert system
for Diesel Electric Locomotive Repair (DELTA) [3]. DELTA was designed to encapsu-
late the extensive knowledge of David I. Smith, one of GE’s senior field service engi-
neers. Smith was renowned as a foremost expert in locomotive engines and repair,
often traveling across the country to mentor small groups of apprentices. DELTA is
comprised of over 500 rules tailored for troubleshooting and assisting in locomotive
maintenance, making it a valuable tool in the field.
In conclusion, it’s essential to understand that developing an expert system in a
specific field is a continuous journey involving multiple design stages and thorough
performance testing. This process is akin to crafting a fine-tuned instrument, where
each iteration refines its capabilities. During this dynamic development process, sev-
eral crucial activities come into play. First, formulating new rules may be necessary to
encompass a broader range of scenarios and enhance the system’s accuracy. These
fresh insights enable the system to adapt to evolving conditions and challenges. Sec-
ond, constant review and revision of existing rules is imperative. As the expert system
interacts with real-world data and encounters diverse situations, it gains the capacity to
fine-tune its responses. Review and revision entail regularly updating rules to maintain
alignment with current practices and knowledge in the field. It’s also critical to recog-
nize that not all rules remain relevant indefinitely. Over time, some rules may become
outdated or less effective due to changes in the field’s dynamics or technological
advancements. Consequently, part of this iterative process involves identifying and
removing outdated rules to maintain the system’s efficiency and accuracy.

2.2 Business rules management system


If you have ever used a system such as TurboTax for your income tax return, you have
used an application powered by a business rules management system (BRMS). BRMS rep-
resents an advancement over the concept of an expert system and is widely used in
many fields. For instance, a financial institution can use this technique to determine
the eligibility of loan applicants based on factors such as credit scores, income levels,
2.2 Business rules management system 13

and debt ratios. This ability enables them to streamline and automate the decision-
making process.
One example of a rule is “If the applicant has a credit score above a specified
threshold and maintains a stable income, then the applicant should be automatically
approved.” In the healthcare sector, a BRMS is crucial in helping hospitals manage
patient admissions efficiently by automating decision-making processes based on, for
example, bed availability, patient conditions, and medical protocols.
Business rules can also be applied to self-driving vehicles to ensure safety. A set of
rules can be designed to comply with traffic rules and regulations, including speed
limits, stop signs, traffic lights, and right-of-way rules. Additionally, rules can be estab-
lished to dictate how self-driving vehicles respond to specific behaviors and situations,
such as prioritizing pedestrians and cyclists over other vehicles and handling cross-
walks, lane changes, merging, road closures, detours, weather and road conditions,
visibility, traffic congestion, and unexpected stops.
BRMSs enable organizations to easily centralize, manage, and automate complex
decision-making. In technical terms, a BRMS consists of several key components:
 A rule repository—This component serves as the repository for business rules,
where rules are defined, organized, and efficiently stored.
 A rule-authoring environment—The rule-authoring environment provides user-
friendly interfaces that facilitate rules creation, modification, and testing. It
supports rule development by business users or analysts.
 The rule coherence module—This crucial component is designed to prevent con-
tradictions between rules within the system. Its primary purpose is to assess
newly added or modified rules to ensure they do not introduce conflicts or
inconsistencies with existing rules, which could lead to confusion or unin-
tended consequences in decision-making processes.
 An inference engine—The inference engine is the computational module respon-
sible for executing the defined rules. It processes and applies the rules to make
decisions or automate actions within business processes.
 Rule governance—This system is crucial for managing rule versions, tracking
changes, and ensuring compliance with regulatory requirements and internal
standards. It helps maintain a history of rule modifications and their effects.
 An analytic tool—An analytic tool is used to monitor and analyze the effects of
rules on business processes. It provides insights and data-driven information to
organizations, enabling them to refine and optimize their rule sets. This optimi-
zation enhances decision-making and overall operational efficiency. This mod-
ule includes “what if” and “what if not” simulation capabilities that offer
valuable insights into the potential benefits or drawbacks of rule adjustments,
helping organizations make informed decisions and optimize their business
rules to achieve desired outcomes while mitigating unintended consequences.
14 CHAPTER 2 AI mastery: Essential techniques, Part 1

The advantages of this technique include its flexibility and simplicity so that a non-
technical person can easily add, update, or remove any rules. It’s like having a rule-
book that adapts to your business needs, making it easier to maintain and modify your
rules as circumstances change.
The inference logic for business rules is essentially similar to that of early expert
systems, and it possesses several limitations. For instance, a significant portion of
human expertise cannot be adequately encapsulated within concise snippets of logic
that can be transformed into if-then-else rules. Even in cases where it appears feasi-
ble, it remains exceedingly difficult to fully extract the comprehensive knowledge of a
proficient expert and effectively transfer their expertise to a computer.
I faced this challenge during my PhD research at the Centre Informatique Necker
Enfant Malade (CINEM) at Necker Hospital in Paris. My objective was to develop a
simulation program to instruct medical students in clinical reasoning. The program
was designed to assist them in preparing for their clinical experiences and avoiding
errors when providing patient care.
Clinical reasoning is a skill that requires years of practice to master, and much of
the expertise and knowledge is challenging to extract through interviews. A signifi-
cant portion of a doctor’s expertise and skill is implicit and challenging to articulate.
Even when medical experts can explain their clinical reasoning, it remains a formida-
ble task to outline most of the underlying logic and causality. Rules-based medical
decision-making can involve numerous complex questions:
 How should we categorize contextual factors such as urgency, age, or pre-existing
conditions, and how do they affect the consequences of a particular course
of action?
 How can we establish a coherent, noncontradictory, and meaningful set of rules
that addresses diverse contexts and scenarios?
 How do we represent clinical experience and connect it to factual information
about anatomy, pathology, and organ systems, which form essential background
knowledge for a given case?
 How can we adapt to changing behavior or shifts in the distribution of data?

2.3 Case-based reasoning


Wouldn’t it be great if we could find an intelligent way to store and reuse the expertise
gained in any particular area? Reusing expertise is important because it affects our
ability to remember, reason, and solve problems. For instance, suppose we can write a
program that reuses the expertise gained by a doctor in medical diagnosis by reusing a
library that contains past patient cases to treat new patients with similar symptoms.
The program will first retrieve similar cases in which patients had similar symptoms
and conditions by comparing the important symptoms, the medical history, age,
gender, and other contextual factors. The program will also be able to adapt and
2.3 Case-based reasoning 15

personalize the treatment to the unique characteristics of the new patient. Based on
the outcome, we will add the knowledge and specificities of this new patient to our
“expertise library.” Our expertise should also contain failed outcomes to avoid making
the same errors. The more we update our library, the more efficient it becomes in
treating patients.
This example describes the CBR approach, an AI technique that involves solving
new problems by referencing and adapting solutions from similar past experiences.
For each new problem, the first step is to search, in the case library, for cases similar to
the new problem. Once one or more similar cases are found, the system will assess
whether any existing solutions or their combination can be used directly or whether
adjustments need to be made to fit the new problem based on the similarities and dif-
ferences between the new problem and the similar cases. Once the new problem is
solved, the adapted solution and the data specific to the new problem are added to
the library for future use. This case enrichment improves the efficiency of the CBR
performance over time.
CBR is an AI technique that uses past experiences to address new and similar prob-
lems. It involves a series of three steps:
1 Retrieve—In this step, the CBR identifies and retrieves relevant cases from its
case library that are similar to the current problem.
2 Reuse—Once relevant cases are retrieved, the CBR system will assess the applica-
bility of the knowledge stored in these cases. This step often involves adapta-
tions and adjustments to make the solution fit the current problem, as the
resolutions used in past cases may not directly apply to the current problem.
3 Revise—After solving the current problem, the revised solution is added to the
case library. As more cases are solved and inserted into the case library, the CBR
system becomes more proficient at solving problems within its domain. This
adaptive and knowledge-driven methodology makes CBR particularly valuable
in technical support, troubleshooting, and maintenance tasks.

To illustrate these steps, let’s contemplate the following scenario. Say you take your
vehicle to an automotive repair shop for maintenance. Upon arrival, the mechanic
initiates a conversation to gather information about the problems you’ve been expe-
riencing. You might mention that your car exhibits vibrations, emits a loud exhaust
noise, and carries a noticeable odor of burning oil. At that moment, the mechanic
promptly taps into their recollection of similar cases from the past to identify the
underlying problems affecting your vehicle. Each task they tackle contributes to
strengthening their expertise, enhancing their understanding, and refining their
skills along the way.
An important advantage of CBR over expert systems and BRMSs is the absence of
the need to write explicit rules. Unlike expert systems, which require time-consuming
rule formulation, CBR leverages real-world cases and their associated solutions to
16 CHAPTER 2 AI mastery: Essential techniques, Part 1

solve new problems. This feature substantially reduces the knowledge engineering
effort and makes CBR an efficient technique in the various domains where codifying
expert knowledge into explicit rules is challenging. Moreover, CBR’s capacity to learn
directly from experience not only simplifies knowledge acquisition but also enhances
its adaptability, making it a valuable technique for dealing with constantly changing
situations.
Since CBR relies on past cases to solve problems, it may face challenges when con-
fronted with issues lacking close analogies in the case base. Furthermore, storing and
retrieving cases can become computationally intensive, particularly as the case base
expands over time. These factors can significantly affect the real-time performance of
CBR systems.

2.4 Fuzzy logic


In real life, situations often lack straightforward, easily identifiable answers that are
definitively right or wrong. Instead, they usually encompass a variety of potential out-
comes and factors to consider. Take medical diagnosis, for example. Not only do
patients experience and describe symptoms differently, but when doctors inquire
about issues like headaches or fatigue, the answers aren’t always a simple yes or no.
Patients often use terms like sometimes, usually, rarely, and regularly to convey the varying
degrees of their symptoms. Furthermore, the perception and labeling of symptoms,
using words such as none, mild, moderate, severe, and intense, can vary widely among
patients due to unique physiology, psychology, past experiences, pain thresholds, and
tolerances. These variabilities lead to diverse descriptions and ratings of pain, and the
resulting complexities cannot be adequately represented using a binary logic system
limited to present or absent. Fuzzy logic, on the other hand, provides a more adaptable
and efficient approach to capturing these nuances and subtleties.
Fuzzy logic, which might have been given the better name “flexible logic,” is a
mathematical framework for dealing with uncertainty and imprecision in decision-
making and control systems. Lotfi Zadeh [4] pioneered this innovative approach in
the 1960s to surmount the constraints of classical logic, permitting a nuanced mea-
sure of truth between the binary states of “completely true” and “completely false.”
Fuzzy logic relies on the concept of fuzzy sets to represent partial membership and
captures the gradual transition between sets. For example, when defining tall and
short people, fuzzy sets recognize that height is a continuum, and individuals can
belong to both sets simultaneously to varying degrees.
To say that a person is tall, classical logic would require that we specify a height h,
and the statement that they are tall would be true or false depending on whether their
height was greater than or less than h. For example, suppose we decide that a person
is tall if they are at least 6 feet, 2 inches in height. Statements about hypothetical peo-
ple’s heights can then be evaluated using classical logic by assigning binary truth val-
ues (yes or no, 1 or 0, true or false) as demonstrated in table 2.1.
2.4 Fuzzy logic 17

Table 2.1 Determining the values of tall and short based on height

Name Height Tall Short

Gary 6’1” 0 1

Joe 6’3” 1 0

Sandy 5’6” 0 1

Sue 6’1” 0 1

The membership of each person in the set of tall people and the set of short people is
indicated in the third and fourth columns, respectively. Given our benchmark of 6
feet, 2 inches, it is evident that Joe is tall and not short and that Sandy is short and not
tall. The 1s and 0s in the table indicate as much, and these cases seem clear-cut. How-
ever, it doesn’t seem right intuitively to classify Sue and Gary as short when they are
almost the same height as Joe, especially when their heights are compared to Sandy’s.
We might feel that what applies to Joe should also apply to Gary and Sue, but tradi-
tional logic requires that a person be either tall or short, with no option in between.
Let’s consider another example. Suppose that a bank is using a set of rules to
decide whether an applicant will receive a loan, and one of the rules states:

IF "X has a bachelor's degree" is TRUE


AND Number of years employed ≥ 2
AND income ≥ $100,000
THEN "Loan approved" = TRUE

The rule essentially says that applications for customers with a college degree who
have had a job for two or more years and who have a high income (more than
$100,000) are approved. Let’s suppose that an applicant has a master’s degree and
their income is more than $200,000, but they have only been employed for one year,
11 months, and 27 days. In this case, the applicant would be declined. Of course, this
loan rejection does not make sense in real life, and such strict thresholding works
against the bank and the borrower. A decision based on fuzzy logic would allow the
bank to build a relationship with a great potential customer since it would recognize
that one year, 11 months, and 27 days is close enough to two years.
Fuzzy logic assists in handling data that is uncertain, imprecise, vague, incomplete,
and noisy. It became the basis for modern technology used in a variety of situations,
including facial recognition, air conditioning, washing machines, car transmissions,
weather forecasting, and stock trading. As humans, we use fuzzy logic all the time with-
out knowing it. When we park our car, we do not think about turning the wheel 20
degrees to the left and backing up at two miles per hour. Instead, we think about turn-
ing the wheel slightly to the left, then perhaps a little more to the right, and backing
up slowly. A fraud-prevention expert might formulate a rule that says, “When the num-
ber of cross-border transactions is high and a transaction occurs in the evening, then
18 CHAPTER 2 AI mastery: Essential techniques, Part 1

that transaction might be suspicious,” or a manager at a chemical plant might say, “If
the temperature in the storage tank is getting too high, lower the pressure.”
None of these scenarios can be properly described with binary distinctions like
true/false, yes/no, or 0/1. Fuzzy logic benefits many domains by dealing with nuanced
inputs instead of binary.
Fuzzy logic offers several advantages in various fields thanks to its capacity to
address uncertainty and imprecision, making it well-suited for systems characterized
by ambiguity. Additionally, fuzzy logic excels in managing noisy data and remains effi-
cient even when dealing with incomplete or inaccurate information. This technique
further simplifies complex control systems, enhancing their intuitiveness in both
design and comprehension. This renders fuzzy logic valuable in numerous applica-
tions, ranging from industrial control and robotics to medical diagnosis and natural
language processing.
Fuzzy logic, while powerful in many applications, has its limitations. One key chal-
lenge is its potential to generate results that are challenging to understand or explain
in everyday language. This lack of clarity can be particularly problematic in critical
areas like healthcare, where transparent explanations are essential. Another limita-
tion lies in the complexity of selecting the appropriate membership functions and
parameters. Making incorrect choices in this regard can significantly affect the perfor-
mance of the fuzzy logic system. Consider, for example, determining the hotness or
coldness of something within a fuzzy logic system; these decisions can be subjective
and often rely heavily on expert knowledge.

2.5 Genetic algorithms


Suppose we want to find the most efficient way to deliver products from a large manu-
facturer to retailers. We need to optimize resource allocations, select the timing, the
best routes to take, and many other factors that need to be optimized. Solving this sup-
ply chain problem with a genetic algorithm involves many potential solutions (the
population) that include different routes, distribution plans, and scheduling meth-
ods. We should select a method to evaluate (the fitness evaluation) these potential
solutions based on delivery time, cost, and other factors. The next step is to sort the
solutions based on how they performed in terms of speed, cost, and other factors and
select (the selection) a group of these solutions that need to be combined (crossover)
to find the best solution.
The idea is to combine parts of two good solutions to create a better one. For
instance, we could combine the faster route from one solution with the resource allo-
cation of another to create a new, better solution. Occasionally, making a random
change to a solution (mutation) can lead to entirely new strategies and solutions.
Once the crossover and mutation have been performed, we will have a new popula-
tion that should be better, as they are the results of combining the best potential solu-
tions. We repeat this process over multiple generations until no improvement is
created or after a specific number of cycles.
2.5 Genetic algorithms 19

This example describes the genetic algorithm approach. This technique starts with
a pool of potential solutions, evaluates them, combines the better ones, introduces
randomness to search new options, and repeats this process until we find the most
efficient solution to our problem.
Genetic algorithms are optimization algorithms. Invented by John Holland in 1960
and improved over the years, they are inspired by the Darwinian principle of natural
selection that suggests that all species share a common ancestor and that the species
evolve over time. Darwin also introduced the concept of natural selection, which
states that the members of a population best adapted to their environment are more
likely to survive and generate offspring. The beauty of a genetic algorithm lies in its
simplicity. Rather than solving a problem by exhaustively analyzing a possibly astro-
nomical number of possibilities, it generates potential solutions to the problem, evalu-
ates their performance on a scoring system, and evolves them toward some ideal. The
worst-performing candidate solutions are discarded, the best ones are kept, and new
ones are created by slightly modifying the top performers. The new variants are evalu-
ated against the existing ones, and this process continues until a solution with suitable
performance is obtained.
In his more formal description, Holland related his algorithms to natural selection
by employing apt terms such as crossover, fitness, and mutation. For the analogy to hold
up in a particular situation, though, we must find a good objective function to evalu-
ate the randomly generated solutions, and we need an adequate population size, a
suitable mutation rate, and an effective crossover procedure to create new candidate
solutions from existing ones.
A genetic algorithm generally involves the following steps, as shown in figure 2.2:
1 Choose an initial population. Each population member represents a possible
solution to our problem.
2 Evaluate each individual in the population with the chosen objective function
and assign it a fitness score.
3 Eliminate individuals with low scores.
4 Create new individuals by mutating or combining copies of the ones with the
highest scores.
5 Add the new individuals to the population.
Repeat steps 2 through 5 until a prescribed amount of time has passed, a predeter-
mined number of generations has been tested, or the process stops producing individ-
uals with higher fitness. The member of the population with the highest fitness score
when the process ends is the solution to the problem.
Note that, in theory, better solutions might still exist, so genetic algorithms are
most suitable for problems admitting good-enough solutions, for which it suffices to
attain a satisfactory but not perfect performance.
Genetic algorithms have many advantages over classical optimization techniques.
First, they are relatively easy to understand, yet they can be used to address extremely
20 CHAPTER 2 AI mastery: Essential techniques, Part 1

Initial population

Evaluation using the


objective function

Selection

New
population/crossover
and mutation
No

Problem Yes
solved?

End

Predetermined Yes
number of generations
tested?

Figure 2.2 Flowchart of a genetic algorithm

complex problems. Second, given enough time, they will always provide a near-optimal
solution, even when the perfect solution is unavailable. Third, they are well suited to
parallel computing, an approach in which many computations are performed simulta-
neously, which allows for rapid solving.
In 1992, Holland summarized the concept of a genetic algorithm and touted its
potential in a Scientific American article [5]:

Pragmatic researchers see evolution’s remarkable power as something to be emulated


rather than envied. Natural selection eliminates one of the greatest hurdles in software
design: specifying in advance all the features of a problem and the actions a program
should take to deal with them. By harnessing the mechanisms of evolution, researchers
may be able to “breed” programs that solve problems even when no person can fully
understand their structure. Indeed, these so-called genetic algorithms have already
demonstrated the ability to make breakthroughs in the design of such complex systems as
jet engines. Genetic algorithms make it possible to explore a far greater range of potential
solutions to a problem than do conventional programs.
2.5 Genetic algorithms 21

To better appreciate the power of genetic algorithms, let’s examine the well-known
traveling salesman problem (TSP) with its notorious combinatorial explosion, a term
used to describe problems for which a small increase in the complexity of the input is
associated with a dramatic increase in the difficulty of finding a solution. The TSP asks
us to find the best order to visit a collection of cities, where the best route could be the
shortest, the most cost-effective, or perhaps the most scenic. Because of the potentially
astronomical number of routes to be compared, making a list and checking the
length of each is not a viable option.
A genetic algorithm solves the TSP as follows:
1 Initial population—The genetic algorithm starts with an initial population of
potential solutions randomly generated or developed using heuristics. Each
potential solution is a sequence of cities where each city is visited only once, and
the sequence ends in the first city where it started.
2 Fitness function—The fitness function evaluates the quality of a solution. In the
TSP, it could be, for instance, a function that calculates the total distance trav-
eled for a given solution. We can also choose to use different metrics for the fit-
ness function.
3 Selection—The solutions with lower total distances will be kept for the next
steps. Other methods can be used for the selection.
4 Crossover—The crossover consists of combining two solutions to create a new
one. In the TSP, this step could involve selecting a portion of one solution and
completing it with cities from the other solution while preserving the order.
5 Mutation—The mutation involves introducing minor random changes in the
solutions to introduce variety in the population of potential solutions. In the
TSP, the mutation could involve the swap of two cities.
The solutions resulting from crossover and mutations will become our new popula-
tion. The genetic algorithm iterates through the previous steps until the best solution
is found or until a termination predefined criterion, such as a maximum number of
generations, is reached.
Genetic algorithms have broad applications across various optimization problems,
spanning supply chains, financial models, stock exchanges, production schedules,
automotive manufacturing, and robotics. Consider a school district with a fixed fleet
of buses aiming to efficiently pick up each child at their residence and safely deliver
them to school. Their goal may be to discover a set of routes that minimizes the total
distance traveled by the buses, all while ensuring that no child boards a bus before 7
a.m. and that every child reaches school by 8 a.m.
As the number of locations to be visited increases, the complexity of the problem
grows significantly. This complexity is vividly illustrated in table 2.2, which outlines
the exponential growth in the number of possible routes for a single bus when visit-
ing various numbers of locations, assuming that there is a direct path between any
two of them.
22 CHAPTER 2 AI mastery: Essential techniques, Part 1

Table 2.2 Complexity of the genetic algorithm for the school bus route example

Number of locations to visit Number of possible routes to compare

1 1

2 2

3 6

4 24

10 3,628,000

20 2,432,902,008,176,640,000

As we can observe, the numbers become extremely large. Solving similar combinato-
rial problems can be exceedingly challenging, and in some cases, it is impossible with
classical algorithms. In science, as in many other fields, the most efficient ideas are
often simple, and genetic algorithms provide a prime example of this principle, offer-
ing a straightforward yet remarkably effective approach to solving complex problems.
Genetic algorithms are a powerful optimization technique, but like all other AI
methods, they come with certain limitations. First, there is no guarantee that they will
find the best solution, and their performance relies heavily on the initial population
and parameter tuning. They also require substantial computing resources and can be
slow for complex problems. Additionally, the solutions they provide can be challeng-
ing to interpret. Still, despite these constraints, genetic algorithms excel at solving var-
ious types of problems, especially in cases of complexity where other methods may
prove less effective.

Summary
 Expert systems are software programs that assess data using if-then rules crafted
by domain experts. Over time, they evolved with the addition of various manage-
ment and deployment modules, giving rise to business rules management systems.
 Case-based reasoning is a technique that involves translating human knowledge
into generalized cases, which can then be applied to solve similar problems.
 Fuzzy logic was introduced to address limitations associated with the use of
strict true/false distinctions in real-world scenarios. It’s particularly valuable
when dealing with questions that require a nuanced understanding.
 Genetic algorithms draw inspiration from biology to find optimal solutions to
problems. They achieve this by testing, combining, and modifying potential
solutions to retain those that perform well while discarding those that do not.
AI mastery:
Essential techniques,
Part 2

This chapter covers


 An introduction to data mining
 An overview of the artificial neural networks
 A description of deep learning
 An introduction to Bayesian networks
 An overview of unsupervised learning

AI expert Arthur Samuel, introduced in chapter 1 for the success of his 1959 check-
ers program, defined machine learning as the field of study that gives computers
the ability to learn without being explicitly programmed. “Without being explicitly
programmed” can be misleading, as learning is achieved with techniques such as
data mining and neural networks, which rely on algorithms explicitly programmed
by engineers.
In this chapter, we will explore data mining, a technique used to extract valu-
able information, patterns, and associations from data. I briefly mention Bayesian
networks, a method that encodes probabilistic relationships between variables of
interest. I then introduce artificial neural networks and deep learning, powerful pat-
tern recognition algorithms that have achieved impressive results in computer vision,
natural language, and audio processing. We finish this chapter with unsupervised

23
24 CHAPTER 3 AI mastery: Essential techniques, Part 2

learning, a set of algorithms that can analyze unlabeled datasets to discover similari-
ties and differences. I’ll provide enough detail to allow you to understand what these
machine learning techniques entail and how they’re applied, but we won’t get caught
up in the theory.

3.1 Data mining


Imagine a program that helps a grocery store ensure that its shelves are consistently
stocked with fresh produce precisely when needed, eliminating the problems of over-
stocking or running out of popular items. The program also excels at optimizing store
layouts, strategically placing complementary items to boost sales, fine-tuning prices
for maximum profit, and crafting personalized promotions and discounts based on
individual customers’ past purchases to enhance customer loyalty, increase sales, and
optimize profits. This example perfectly illustrates one of the numerous benefits data
mining techniques can bring to the retail industry. Data mining is an artificial intelli-
gence approach encompassing a range of techniques and algorithms to discover hid-
den patterns, relationships, and valuable insights from vast and complex data sources.
Its applications are vast and continually evolving as organizations increasingly recog-
nize the immense value of extracting actionable insights from the ever-expanding vol-
umes of data at their disposal. Indeed, the amount of data available has increased
exponentially over recent decades due to the near-universal adoption of the internet,
the popularization of e-commerce, the use of barcodes on most commercial products,
the popularity of social media, and ubiquitous web tracking. Exacerbated by low-cost
data storage that promotes accumulation, the proliferation of data has created the
need for automated techniques to extract knowledge and insight from it. It is obvi-
ously impossible for individuals to process or analyze even a minuscule fraction of
what’s available.
Much like gold mining, which extracts gold from piles of rock and sand, data min-
ing is carried out to uncover meaningful correlations, patterns, anomalies, or rules
hidden within extensive data sets. Formally, data mining refers to a collection of algo-
rithms used for tasks such as classification, prediction, clustering, and market basket
analysis. These algorithms make use of statistical, probabilistic, and mathematical
techniques to identify data patterns, with some of their implementations having
names like SLIQ [1] CART [2], C4.5 [3], and CHAID [4].
Data mining algorithms are applied across various industries. For instance, the
Walt Disney MyMagic+ project utilizes data mining to enhance the efficiency of its
operations and infrastructure. One notable application is its use in minimizing wait
times for attractions and restaurants.
The food industry employs data mining for demand forecasting and competitive
pricing of products. For instance, franchise companies like McDonald’s utilize data min-
ing to identify optimal locations for new stores. Local governments apply data mining
to predict traffic volumes, especially during peak hours, while utility companies utilize
data mining to forecast electricity demand and maintain a reliable supply.
3.2 Decision trees for fraud prevention 25

A typical data mining task involves classification, which is the process of categoriz-
ing labeled data into meaningful groups. The knowledge derived from analyzing the
data is often represented in a decision tree. A decision tree is a flowchart used to asso-
ciate input data with the appropriate category through a series of questions or tests
represented by the nodes in the tree. Each node evaluates a specific attribute of the
data, and each distinct attribute value corresponds to a branch emanating from that
node. An output node, also known as a leaf or terminal node, signifies a category or
decision. The nodes situated between the input nodes and the terminal nodes are
commonly referred to as test nodes.
The structure of a decision tree is inferred from the data. Mathematical formulas
are employed to assess the potential contribution of each node in reaching a decision
efficiently, and the most discriminative nodes are strategically positioned at the begin-
ning of the tree. For instance, if you wish to determine whether an animal is a bird,
the initial question you might consider is whether it has feathers or perhaps whether it
can fly. On the other hand, asking whether it resides in a forest would not lead you to
a decision as swiftly.

3.2 Decision trees for fraud prevention


Banks bear a substantial responsibility for effectively managing the risks associated with
credit and payment transactions. Given the substantial sums of money involved, any
security breach in banking operations can have a severe detrimental effect on an institu-
tion’s reputation. When a credit card is used at a merchant’s location, a highly efficient
AI-powered system must swiftly provide authorization decisions, typically within millisec-
onds. To identify potential fraudulent activities, this system needs to assess numerous
parameters linked to the card, all while processing 10s of thousands of transactions per
second without causing any delays. Consider the sheer volume of queries that inundate
the system on Black Friday, the day following Thanksgiving, which traditionally marks
the commencement of the Christmas shopping season in the United States.
To build a decision tree that a card-issuing bank could use for real-time fraud preven-
tion, we might analyze 18 months of their credit card transactions. Each transaction
record will contain many attributes such as purchase amount, purchase time and date,
international or domestic merchant, merchant category code (indicating merchant
business type), geographic area, and whether the card was present during the transac-
tion. Each fraudulent transaction would have to have been labeled as such by a human.
The decision tree will be constructed by weighing each attribute’s potential to help
the risk system decide in real time whether to accept or decline a credit card transac-
tion. The space of attributes will be recursively partitioned based on importance, and
the attributes most useful for forming an assessment will be placed earliest in the deci-
sion tree. In the fraud-prevention example, the data may show that fraud is signifi-
cantly more common in international transactions than domestic ones, and therefore,
this question should be asked first. Thus, the node associated with this question will be
the first in the tree.
26 CHAPTER 3 AI mastery: Essential techniques, Part 2

After creating this initial node, we create two branches, one for domestic and one for
international. We then repeat the procedure to find the most discriminative question to
ask about the transactions associated with each branch. For domestic transactions, per-
haps the data shows that the likelihood of fraud is significantly higher for transactions
done online or over the phone than transactions done by physically swiping a card.
In this case, the most significant question we could ask next might be whether the
card was present for the transaction, and the node following the domestic branch in
the decision tree might address this question. We would create a “card present” branch
and a “card not present” branch in the domestic path, and we would repeat this pro-
cess until the available attributes are all represented in an efficient decision tree. Fig-
ure 3.1 illustrates the first few nodes of the decision tree we’re discussing.

Domestic

Yes No

Card present Location

Yes No ... Asia Europe

Merchant Type Sum 1day

... Hotel Electronic <$400 ≥$400

Count 30mn

<3 ≥3

Figure 3.1 The first few levels of a decision tree. In a real-world application, a full tree
may contain thousands of nodes.

We don’t always rely solely on the raw attributes available from the transaction records
for a business application. We might also try to enrich the data with attributes gleaned
from further analysis. For our credit card authorization problem, we might realize the
importance of questions about the number of transactions performed in the last 15
minutes or the last hour, or maybe research identifies suspicious purchasing patterns
involving restaurants and gas stations. The logic represented in a decision tree is
sometimes translated into a set of if-then-else rules, making it easier to understand,
especially if the tree is very large.
To summarize, a data mining project generally follows an iterative process:
1 Understanding the application domain and the goals of the data mining project
2 Gathering the data, which often involves a costly labeling step
3.2 Decision trees for fraud prevention 27

3 Integrating the data gathered from various sources


4 Cleaning the data to remove inconsistencies
5 Performing analysis to identify new attributes that enrich the data
6 Dividing the data into at least two sets, one for training and one for testing
7 Selecting suitable data mining algorithms
8 Building the system using the designated training data
9 Pruning the decision tree to keep the model sufficiently general
10 Testing the model using the designated testing and evaluating its performance
11 Testing the scalability and resilience of the model
12 Repeating steps 2 to 11 until you achieve the desired performance
13 Deploying the model and integrating the system into operations
Figure 3.2 shows a process diagram outlining the creation and deployment of a data
mining model.

Data
preparation

Behavior Data
analysis transformation

Model creation and


update

Model creation

Model utilization

Flow
Transaction
Administration
processing

Analysis
Evaluation result

Data
Notifications
storage

Investigators History

Feedback

Adaptive Back office


learning review

Investigators

Figure 3.2 An example of a flowchart that depicts the various steps to design and deploy a data-mining
model
28 CHAPTER 3 AI mastery: Essential techniques, Part 2

Although decision-tree algorithms are the most popular, other data-mining tech-
niques are also used. For example, association analysis is often used for market-basket
studies, which attempt to identify sets of products that tend to be purchased together.
This straightforward approach is based on addition, intersection, and union. For
example, suppose we have one million receipts, of which 20,000 include the purchase
of bread and cheese and 5,000 include bread, cheese, and olives. We could infer from
this data that a customer who buys both bread and cheese has a 25% likelihood of also
purchasing olives. Information about customer buying habits gleaned from associa-
tion analysis can be used to develop cross-selling strategies, provide relevant coupons,
and even optimize how products are displayed on store shelves. Information obtained
through related approaches can be used to predict the effects of rebate offers or to
develop strategies to improve customer retention.
The value of the predictions and guidance provided by data mining heavily
depends on the quality of the input, and the adage “garbage in, garbage out” (GIGO)
is very apt. Unreliable data leads to unreliable models, and the inconsistencies that
arise when compiling data in different formats from multiple sources present signifi-
cant problems. It can be almost impossible for software or even people to recognize
when data has been labeled incorrectly, and it can be a challenge to mitigate the
biases and other subjective effects that individual people can have when data is first
recorded. Practical challenges arise, too, when applying data mining in real situations.
For example, the structure and logic of a decision tree can’t be updated incrementally
in light of new information, so decision trees aren’t effective for adapting to changes
in data and behaviors.

3.3 Artificial neural networks


Imagine we want to teach a computer how to recognize handwritten numbers from 0
to 9. At the beginning, we show our program lots of pictures of handwritten numbers
(training examples) to train the program. Our program relies on different layers to
learn. The first layer, for instance, looks at the picture and tries to recognize things
like edges and curves. The next layer will use the results of the first layer to look for
shapes, like loops and lines. For instance, the number 8 has a shape that resembles
two circles stacked on top of each other. We can continue this process by going deeper
into more layers. After passing through all these layers, our program guesses which
number is in the picture. We compare the guess made by our program to the correct
number in the picture. If the program guessed wrong—for example, it guessed 1
when the number was actually a 7—we tell the program that it made an error. The
program will then adjust its parameters (numerical values) that serve as the secret
sauce behind the program’s classification. These numbers reflect the importance of
certain shapes, inputs, or features and how strongly they influence the program’s
response. During training, the program fine-tunes these parameters (referred to as
weights) through a process known as backpropagation, which learns to recognize pat-
terns and make correct predictions by discovering the optimal combination of weights
3.3 Artificial neural networks 29

that minimizes errors. These weights are how our program learns to assign signifi-
cance to different pieces of information. The more pictures we provide, the better our
program will learn how to recognize numbers. In this example, we described the
method of training a neural network.
Artificial neural networks are conceptualized as algorithmic models of brain cells
that transform input data into output data. The introduction of this concept is
attributed to McCulloch and Pitts in 1943 when they demonstrated that Boolean oper-
ations could be executed using “neural” elements that mimic living neurons. Since
1950, this field has witnessed significant advancements.
In 1958, Frank Rosenblatt introduced the Perceptron, which marked a pivotal
moment in the field of artificial neural networks as it was able to learn and adapt its
decision-making based on training data. Even though the Perceptron was a simple
program with many limitations, it laid the foundation for further advancements in
neural networks. In 1960, Bernard Widrow and Marcian Hoff developed the first neu-
ral network systems applied to real-world problems. They designed ADALINE (Adap-
tive Linear Neuron), which identified binary patterns, allowing it to predict the next
bit when reading streaming bits from a phone line. MADALINE (Multiple ADALINE)
was developed to eliminate echoes on phone lines.
In his 1974 PhD thesis, reprinted in 1994 [5], Paul Werbos proposed the develop-
ment of reinforcement learning systems by using neural networks to approximate
dynamic programming. Dynamic programming is an optimization approach that
transforms a complex problem into a sequence of simpler problems. In 1986, Rumel-
hart, Hinton, and Williams rediscovered the backpropagation technique and made
this fundamental technique broadly known with the publication of the backpropaga-
tion training algorithm [6].
The backpropagation algorithm structure comprises an input layer, one or more
hidden layers, and an output layer. Each node, or artificial neuron, connects to another
and has a weight and threshold. If the output of any node is more than the specified
threshold value, that node is activated, transmitting data to the next layer of the net-
work. Otherwise, no data is passed to the next layer of the network. Figure 3.3 depicts a
backpropagation algorithm structure with three layers (input, hidden, and output).
 Input layer—This layer receives the input data fed into the network.
 Hidden layer—Neural networks encode the information learned from the train-
ing data using the value of the weights for the connections between the layers.
 Output layer—The output layer collects the predictions made in the hidden lay-
ers and computes the model’s prediction.
The input values in figure 3.3 are 0.5, 0.6, and 0.2. Each node in the input and hidden
layers is connected to all the nodes in the next layer, and there are no connections
between the nodes within a particular layer. Each connection between nodes has a
weighting factor associated with it. Initially, the nodes are connected with random
weights. The training consists of modifying the values of these weights by iteratively
30 CHAPTER 3 AI mastery: Essential techniques, Part 2

Node i

w1i
0.5 Input 1 w1j i

i
w2 wi1

w3
w1
k

w1
Node j
w2j

l
wj1
j
w3
0.6 Input 2 Output 1 0.25
w2k wk1

w2 w3k Node k
l 1
wl
0.2 Input 3
w3l
Node l

Input layer Hidden layer Output layer

Figure 3.3 A backpropagation model with three layers

processing a set of training examples and comparing its prediction to each exam-
ple’s correct label. When the results are different, the weights are adjusted. These
weight modifications are made backward (i.e., from the output layer through each
hidden layer down to the input layer), hence the name backpropagation algorithm.
Although it is not guaranteed, the weights will eventually converge, and the learning
process ends. These modified weights, which are numbers between 0 and 1 or –1
and 1, represent what the neural network learns.
The input to individual neural network nodes must be numeric and fall in the closed
interval range of [0,1] or [–1,1], which requires normalizing the inputs to values between
0 and 1 or –1 and 1 for each attribute from the training examples. Discrete-valued attri-
butes may be encoded such that there is one input unit per domain value. To illustrate,
suppose we have the attribute marital status with the values single, married, widowed, and
divorced. One possible method is to represent the four values as single = (1, 0, 0, 0), mar-
ried = (0, 1, 0, 0), widowed = (0, 0, 1, 0), and divorced = (0, 0, 0, 1).
For numerical data, we can apply the simple formula

Normalized Value = (Value – MIN) / (MAX – MIN)

where MIN represents the smallest value in the dataset and MAX represents the high-
est value in the dataset.
For example, consider the numbers 2, 4, 5, 6, 20, 56, and 62. The minimum value
is 2, the maximum value is 62, and the range is 60. Following the normalization proce-
dure and rounding to the nearest hundredth yields the results in table 3.1.
3.3 Artificial neural networks 31

Table 3.1 Normalization procedure

Original number Normalized value

2 (2 – 2)/60 = 0

4 (4 – 2)/60 = 0.03

5 (5 – 2)/60 = 0.05

6 (6 – 2)/60 = 0.07

20 (20 – 2)/60 = 0.3

56 (56 – 2)/60 = 0.9

62 (62 – 2)/60 = 1

The backpropagation algorithm remains a widely used method for training supervised
artificial neural networks. Initially, the neural network’s connections are established
with randomly generated weights, typically between 0 and 1, connecting different
nodes. The training process is iterative and involves presenting training examples to
the network.
During each iteration, a labeled example is fed into the network’s input layer. The
algorithm then computes the network’s output through a process known as forward
propagation, which includes calculations through the hidden layers to produce the
final output. Subsequently, the algorithm compares this output to the expected results
or target values. When the computed output values differ from the expected results,
the backpropagation algorithm comes into play. It applies an error-correction proce-
dure by tracing back through the hidden layers toward the input layer, adjusting the
network’s weights to minimize the error. This iterative process continues until the net-
work’s performance improves and the desired accuracy is achieved.
While success is not assured, this process is reiterated through numerous cycles
until one of two conditions is met: either the weights converge, allowing the neural
network to correctly evaluate all test samples, or the neural network’s error falls within
an acceptable threshold. Essentially, what a neural network “learns” boils down to a
collection of numeric values between 0 and 1 (the adjusted weights). These adjusted
weights encapsulate the essence of what an artificial neural network represents.
While neural networks trained using the backpropagation algorithm have demon-
strated their utility for various problems, they come with several inherent limitations.
First, these networks tend to operate as enigmatic black boxes because the inner work-
ings of the trained model, including the critical features it identifies, can be challeng-
ing to examine. This opacity stems from the complex relationships between the hidden
layers, which consist primarily of numerical weights (typically between 0 and 1). Conse-
quently, neural network models struggle to explain their decisions, which can be a sig-
nificant drawback. In contexts where accountability and transparency are paramount,
this limitation becomes particularly concerning.
32 CHAPTER 3 AI mastery: Essential techniques, Part 2

Second, the design of a neural network is not a straightforward task. It involves


making crucial decisions, such as determining the optimal number of hidden layers,
configuring the connections between nodes within these layers, setting the learning
rate for weight adjustments, selecting appropriate training data, and establishing
robust testing and validation procedures. These design choices significantly affect the
network’s overall performance and effectiveness.
Finally, while neural networks demand substantial computational resources, there
is no guarantee that the training process will yield a highly effective model. Achieving
convergence to an optimal solution is not assured, and issues like over- or underfitting
can arise during training.

3.4 Deep learning


Deep learning, often hailed as the poster child of artificial intelligence, has become
nearly synonymous with AI itself. Anthony W. Kosner, in a 2015 Forbes article titled
“Deep Learning and Machine Intelligence Will Eat The World” [7], and Apurv
Mishra, in a 2017 statement published in Scientific American [8], asserted that deep
learning had propelled AI to a point where it could match or even surpass human
experts in fields like medicine when it came to interpreting visual data. In 2018, CNN
reported that deep neural networks developed by industry giants Alibaba (BABA) and
Microsoft (MSFT) had surpassed human performance on a Stanford University read-
ing comprehension test [9].
However, despite its impressive moniker, it’s worth noting that many aspects of
what we label as “deep learning” may already be familiar to us. What distinguishes a
neural network as “deep,” as opposed to traditional backpropagation, lies primarily in
the number of hidden layers and, occasionally, in how nodes are interconnected. The
primary advantage of incorporating more hidden layers lies in their proven ability to
construct a hierarchy of complex concepts from simpler ones, making them highly
effective at discerning various characteristics. Figure 3.4 offers a visual representation
of a typical deep neural network architecture.
The roots of deep learning algorithms can be traced back to the work of Ivakh-
nenko and Lapa in the mid-1960s. In their 1965 report “Cybernetic Predicting
Devices” [10], they explore approaches to pattern recognition utilizing artificial neu-
ral networks with hierarchical layers of nodes between the input and output layers.
They argue that deep networks hold computational advantages over classical net-
works, particularly when dealing with problems exhibiting nonlinear characteristics.
In contemporary deep learning, the fundamental approach remains anchored in
the concept of the backpropagation algorithm. Data, regardless of its type, is typically
transformed into numerical vectors within the range of 0 to 1. The core of deep learn-
ing still revolves around the adjustment of weights, represented by hundreds of thou-
sands of values ranging between 0 and 1. While deep learning primarily operates in a
supervised manner, where training data consists of numerous samples meticulously
labeled, it’s worth noting that the field has expanded to encompass various learning
3.4 Deep learning 33

Input layer Hidden layers Output layer

Figure 3.4 A deep neural network architecture

paradigms beyond traditional supervised learning, including unsupervised learning,


reinforcement learning, and semi-supervised learning. This broader spectrum of tech-
niques empowers deep learning to tackle a wide array of tasks across different
domains.
To illustrate, let’s embark on a straightforward project: creating a deep learning
system capable of classifying color photographs of cats and dogs. When designing
such a model, we may explore two prevailing architectures: convolutional neural net-
works [11] or vision transformers [12], which currently dominate the landscape of
solutions for computer vision tasks.
Thanks to the insights of English physician Thomas Young in 1802, we understand
how to translate color images into a series of numbers ranging from 0 to 1. Young’s
work elucidated the RGB (red, green, blue) color system, which enables us to repre-
sent the colors in an image as combinations of these three primary colors. Conse-
quently, each pixel in our images can be described by a set of three numbers,
representing its color in the RGB spectrum. In deep learning, images are treated as
vectors of numbers, where each number corresponds to the RGB value for a specific
pixel within the image.
The training process follows a similar pattern of weight adjustments, which is a
hallmark of neural networks. With sufficient high-quality training data and a well-
designed network, our deep neural network should be capable of accurately identify-
ing most of the images earmarked for testing. It’s important to note that we maintain
separate sets for training and testing to evaluate the efficacy of the training process.
This division allows us to validate the model’s performance on previously unseen data.
34 CHAPTER 3 AI mastery: Essential techniques, Part 2

In summary, the process of designing a deep learning project can be outlined with
the following steps:
1 Defining the objective—Clearly articulate the neural network’s intended purpose
and the problem it seeks to address.
2 Data gathering—Accumulate a substantial volume of high-quality data relevant
to the project’s objectives.
3 Data labeling—Assign appropriate labels to the data. This may entail manual
labeling or other labeling methods, depending on the project’s requirements.
4 Data partitioning—Segregate the labeled data into distinct sets, typically at least
two: one for training the model and another for unbiased testing.
5 Data preprocessing—Prepare the data for input into the neural network by nor-
malizing and converting it into vectorized form.
6 Performance evaluation—Develop a robust evaluation framework to assess the
network’s performance, selecting pertinent metrics tailored to the specific task.
7 Model refinement—Continuously improve the model by fine-tuning parameters
and adjusting architecture to mitigate errors and prevent overfitting.

3.4.1 The benefits of deep learning


Enumerating the advantages of deep learning is a multifaceted endeavor owing to
its remarkable adaptability. Its core strength lies in its ability to extract patterns and
glean insights from vast, complex datasets. This ability holds significant value across
a wide spectrum of industries. It finds utility in healthcare, facilitating disease diag-
nosis, and in finance, where it enhances risk assessment and fraud detection. In nat-
ural language processing, deep learning models enable machines to understand
and generate human language, leading to breakthroughs in virtual assistants and
language translation.
Deep learning also excels in image recognition, where it powers technologies like
facial recognition and autonomous vehicles. These models have the capacity to auto-
mate tasks, resulting in heightened productivity and substantial cost savings. Moreover,
deep learning enables businesses to provide highly personalized experiences to custom-
ers, tailoring recommendations, content, and services to individual preferences.
Another notable strength lies in predictive analytics, where deep learning mod-
els analyze historical and real-time data to predict sales, anticipate market demand,
and make data-driven decisions. Similarly, deep learning’s impressive computer
vision capabilities automate tasks such as image recognition, object detection, and
quality control in manufacturing, thereby enhancing operational efficiency and
product quality.
By overcoming data challenges once deemed insurmountable, deep learning
stands as one of the most transformative technologies, driving innovation across
various sectors.
3.4 Deep learning 35

3.4.2 Limitations of deep learning


Let’s begin by considering the insights of Francois Chollet, the creator of the Keras
deep-learning library and a key contributor to the TensorFlow machine-learning
framework. Chollet points out:

[The] deep learning model is “just” a chain of simple, continuous geometric transformations
mapping one vector space into another. All it can do is map one data manifold X into
another manifold Y, assuming the existence of a learnable continuous transform from X
to Y, and the availability of a dense sampling of X: Y to use as training data. Most of the
programs that one may wish to learn cannot be expressed as a continuous geometric
morphing of a data manifold.

For a deeper exploration of deep learning, I recommend reading Chollet’s excellent


book, Deep Learning with Python [13], from which this quote is taken.
The coupling of the terms deep and learning with computers might lead one to
believe that computers are truly learning in a profound sense. However, as we’ve
explored in this book, deep-learning algorithms are essentially mathematical formu-
las. Using formulas alone, we cannot define or create true intelligence. This is why,
when PYMNTS magazine asked for my views on deep learning in October 2017 [14],
my response was, “Before you use the word ‘deep,’ show me the learning.” We will
delve into this topic further in chapter 6.
In many business applications I’ve encountered, applying deep learning networks
can be challenging due to the substantial requirement for labeled data. Numerous
businesses not only lack the necessary amount of data but also labeled data. Even when
the data is available, designing and training a deep network can be time-consuming,
and such a network often underperforms when applied to data that deviates from its
training data.
For example, consider AlphaGo, which required millions of training scenarios and
years of meticulous engineering by a team of experts. While it excelled in the game of
Go, adapting it for other purposes would necessitate extensive work by a different
team of data scientists and engineers. Expensive retraining is required every time you
make changes to the objectives of a deep learning project.
To be fair, deep learning has benefited in recent years from advances in computa-
tional speed, thanks to specialized hardware designed for it. In a few specific domains,
there is an abundance of labeled data available for training. For instance, the Image-
Net project provides access to over 14 million images annotated by humans, making it
a valuable resource for object recognition testing. However, for most problems, the
challenges associated with deep learning persist.
Additionally, deep neural networks are susceptible to hacking through adversarial
examples. By making subtle pixel alterations, one can disrupt the training of a deep-
learning surveillance system designed to detect intruders. Even though creating
adversarial attacks might not be straightforward, the question remains: should we
trust a technique with such a vulnerability when it comes to mission-critical tasks?
36 CHAPTER 3 AI mastery: Essential techniques, Part 2

Even in fields where deep-learning algorithms demonstrate efficiency, a critical


aspect they often lack is trustworthiness. How can one trust a system that cannot
provide justifications for its conclusions? Deep-learning algorithms, like the tradi-
tional neural networks, are black boxes. Consider a scenario where a military opera-
tor must justify a life-and-death decision made by such a system. How can we permit
the use of such systems in applications with significant societal implications, such as
criminal justice or lending?
These concerns have motivated the European Commission to introduce a regula-
tory framework designed to ensure that all AI programs used in Europe can be
relied upon to safeguard the safety and fundamental rights of individuals and busi-
nesses. Margrethe Vestager, Executive Vice President of the European Commission
for a Europe Fit for the Digital Age, emphasized the importance of trust in AI, stat-
ing, “On Artificial Intelligence, trust is a must, not a nice to have. With these land-
mark rules, the EU is spearheading the development of new global norms to make
sure AI can be trusted” [15].
This regulatory framework categorizes AI systems based on their level of risk and
imposes corresponding restrictions. These range from an outright ban on programs
that could pose threats to safety or livelihoods to stringent checks on those used in
critical infrastructures, such as transportation, education, recruitment, credit scoring,
law enforcement, criminal justice, or elections. AI systems used in Europe must
adhere to the following requirements:
 Appropriate datasets must be used to minimize the risk of bias and discrimi-
natory outcomes.
 Full traceability must be ensured to allow for oversight.
 Detailed documentation must be readily available to explain the system’s
functioning.
 Clear and adequate information must be provided to individuals deciding
whether to use such a system.
 Effective human oversight and monitoring mechanisms must be in place.
 The technology must be purposeful, robust, secure, accurate, and unbiased.
It’s important to note that while deep learning is a prevalent AI approach, not all
deep-learning solutions inherently fail to meet these requirements. Nevertheless,
addressing the issues related to trust and transparency remains a significant challenge
in the field.
As for why this field consistently garners hype, one obvious explanation is the use
of terms like “neurons” and the presentation of neural networks as being biologically
inspired with structures similar to that of humans. In chapter 6, we will elaborate on
why this claim is ludicrous.
Reinforcement learning, a machine learning approach dating back to the early
days of cybernetics, involves learning behavior through trial and error. Its core princi-
ple revolves around using a system of rewards and punishments as a reinforcement
3.5 Bayesian networks 37

signal. Arthur Samuel pioneered the use of reinforcement learning in his 1956 check-
ers program. This program played against itself, making random moves and assessing
the outcomes using the checkers rules to determine the best strategies. Reinforce-
ment learning can be particularly beneficial in environments where you can clearly
define rewards for positive actions, although such clarity is not commonly found in
real-world applications.

3.5 Bayesian networks


In contrast to the previous AI techniques I’ve employed in the business world, I have
limited experience with Bayesian networks. Nevertheless, I’ll provide a brief overview
since they offer a well-established approach that can be valuable in projects involving
probabilistic descriptions.
Bayesian networks serve as maps illustrating the interplay between various events,
enabling us to comprehend how changes in one event can have cascading effects on
others. In more technical terms, Bayesian networks belong to the category of probabi-
listic models employing directed acyclic graphs to depict relationships between vari-
ables and their probabilistic dependencies. Their roots trace back to Thomas Bayes
and his posthumously published manuscripts in 1763. Bayes’ theorem introduced the
concept of conditional probability. The theorem provides a formula for adjusting
beliefs when presented with new evidence, elucidating the likelihood of an event
based on information concerning conditions related to that event. One way to express
Bayes’ theorem is that the probability of event B happening, given that event A has
occurred, multiplied by the probability of event A occurring, is equivalent to the prob-
ability of event A occurring, given that event B has occurred, multiplied by the proba-
bility of event B happening.
A Bayesian network encapsulates probabilistic relationships among variables of
interest. It comprises a structure resembling a directed acyclic graph or belief net-
work, with nodes interconnected by edges. Each node represents a variable, and the
directed edges symbolize the conditional dependence between these variables.
For instance, consider a Bayesian network for weather prediction, where a node
representing clouds is linked to a node representing rain with an arrow pointing from
clouds to rain. If the clouds node is set to 40%, signifying a 40% likelihood of cloudy
conditions, the value of the rain variable would be contingent on the cloud’s variable.
Perhaps, if it’s cloudy, there’s a 30% chance of rain, whereas if it’s not cloudy, there’s
only a 5% chance. The model can handle these probabilities and dependencies by
computing the likelihood of various scenarios: cloudy and not raining, cloudy and
raining, not cloudy and raining, or not cloudy and not raining. In more complex
Bayesian networks with hundreds of nodes and dependencies, they can be used to
infer the overall significance of a particular variable in determining outcomes.
Figure 3.5 is a suite of Bayesian networks developed by researchers at the St. Peters-
burg Coastal and Marine Science Center [16] to (a) generate scenarios of total water
level, (b) forecast storm effects, and (c) predict magnitudes of beach recovery. The
38 CHAPTER 3 AI mastery: Essential techniques, Part 2

Bayesian networks incorporate topographic, bathymetric, and shoreline data available


from the historical and post-Hurricane Sandy research programs at Fire Island. The
Bayesian networks generate predictions in the form of probability of coastal change.

Offshore
Wave
Conditions

Figure 3.5 An example of a Bayesian network

Bayesian networks made their debut in the late 1970s, serving as a means to model dis-
tributed processing in reading comprehension. This modeling approach aimed to
amalgamate semantical expectations with perceptual evidence, forging coherent inter-
pretations [17]. Often hailed as the progenitor of Bayesian networks, Judea Pearl eluci-
dates in The Book of Why [18] how one should design software for reasoning under
uncertainty:

I was firmly convinced that any artificial intelligence system should emulate what we
comprehend about human neural information processing. Machine reasoning under
uncertainty, I believed, should be built upon a similar message-passing architecture. The
question that vexed me was: What should these messages be? It took several months, but I
eventually discerned that the messages took two forms—conditional probabilities in one
direction and likelihood ratios in the other.

Pearl envisioned a hierarchical network, with each node transmitting its belief to
neighboring nodes. The recipient node processed the incoming information in one
of two ways: updating its beliefs using conditional probabilities when the message
flowed from parent to child or adjusting beliefs by multiplication with a likelihood
ratio when the message moved from child to parent.
Despite their merits, Bayesian networks have limitations, akin to other machine
learning methods. They operate on precise probabilities, which may not align with
3.6 Unsupervised learning 39

real-world scenarios characterized by imprecise knowledge necessitating confidence


intervals, such as between 56% and 62%. Another substantial constraint emerges
when attempting to create Bayesian network structures in complex domains. While
experts can define simple Bayesian networks, in many fields, constructing such net-
works proves a formidable task for human operators. The ideal scenario involves
computers autonomously learning network structures, parameters, and conditional
probabilities from data, yet this remains a significant challenge in most practical
applications. The absence of a universally effective method for constructing Bayes-
ian networks from data implies that their creation often demands extensive time
and human involvement.

3.6 Unsupervised learning


Unsupervised learning is an approach within the field of artificial intelligence where
algorithms are employed to discern patterns and structures within data without rely-
ing on labeled outputs. The primary objective is to group data based on inherent sim-
ilarities, differences, or concealed structures. For instance, unsupervised learning
techniques like clustering prove invaluable in the retail sector, as they enable the group-
ing of customers with similar purchasing behaviors. This categorization can unveil dis-
tinct customer segments, such as budget-conscious shoppers, luxury enthusiasts, and
occasional buyers, empowering retailers to fine-tune marketing strategies, provide tai-
lored product recommendations, and optimize inventory management more effec-
tively to meet the diverse needs of their customer base.
Unsupervised learning excels at extracting meaningful insights and knowledge
from unorganized or unlabeled data, aiding organizations in making informed deci-
sions. To illustrate the potency of unsupervised learning, consider its role in com-
batting money laundering—a critical societal issue that demands the application of
this technique.
Despite the implementation of stringent legislation, criminals and terrorists have
proven to be resourceful and persistent in their illicit endeavors. According to data
from the United Nations Office on Drugs and Crime, the estimated global amount of
money laundered in a single year range from 2% to 5% of the world’s gross domestic
product, which translates to a staggering $800 billion to $2 trillion in current US dol-
lars as of 2022 [19].
Money laundering operations are primarily designed to conceal unlawfully
acquired funds and obscure their origins. Typically, this is achieved through a series of
complex financial transactions intentionally structured to be challenging to trace.
Money launderers often employ ingenious tactics, frequently commingling illegal
transactions with those of legitimate enterprises. They further complicate matters by
concealing ownership structures, such as the creation of trusts and offshore compa-
nies in jurisdictions with lax regulatory oversight. Additionally, they use modern tools
and technologies, including cryptocurrencies, currency exchanges, international money
transfers, and even cash smuggling, to facilitate their activities. The proliferation of
40 CHAPTER 3 AI mastery: Essential techniques, Part 2

internet technology has only exacerbated these challenges, as online auctions, gam-
bling, banking, and peer-to-peer payment apps provide additional avenues for them
to safeguard their anonymity.
The following money laundering case [20] study portrays a scenario that devel-
oped over several years and involved numerous individuals:

Tom works as a government employee. He was able to support his family until he became an
addict to gambling. In his role, he had the power to propose and approve projects for private
companies competing in the public sector. His gambling habit pushed to corruption, and
large businessmen were willing to pay him well for the guarantee of government business,
and Tom became rich very quickly through his corrupt activities. Tom’s friend Gina, who
owned an exchange and tourism company, was willing to help him launder the bribes that
he was receiving. She used her employees as “straw men” to create a number of different
bank accounts through which funds could be laundered—more than US$4,000,000 was
laundered in total through such accounts. However, the cash payments and subsequent
transfer offshore risked attracting attention, and so Tom developed a more sophisticated
laundering method—a fruit-delivery company. This company, which was owned by
Gina’s husband, laundered US$2,700,000 in three months, disguising the transactions
by creating false invoices which were settled by the businessmen on Tom’s instructions.
The total amount of money Tom laundered was estimated to be in the range of
US$1,000,000,000. It is worth noting that the disclosures by the institutions took place
because of the simple initial laundering scheme, whereas the later scheme involving an
established company appeared to have had little risk of disclosure.

Supervised learning methods prove inadequate when combating money laundering for
several compelling reasons. One significant challenge arises from the difficulty, and
sometimes impossibility, of creating effective training and testing datasets. Money laun-
dering schemes are not isolated, discrete events. Criminals operate meticulously, using
complex strategies to conceal their activities. These elaborate scenarios cannot be accu-
rately represented through labeled samples typically used in supervised learning.
Moreover, supervised techniques lack adaptability, whereas criminal organizations
are highly agile, constantly inventing complex tactics to elude detection. They operate
under the assumption that their financial transactions are under scrutiny, meticu-
lously crafting each transaction to mimic legitimate activities. For instance, businesses
like restaurants and nightclubs, known for dealing primarily in cash, can deposit large
sums without arousing suspicion from financial institutions. This makes them well-
suited to money laundering since they can handle substantial cash volumes without
triggering red flags.
As a result of supervised learning’s ineffectiveness in the fight against money laun-
dering, current approaches rely heavily on predefined rules set by anti-money laun-
dering experts to flag suspicious transactions. However, as previously discussed,
business rules have significant limitations in dynamic environments. Consequently,
current anti-money laundering solutions suffer from a high rate of false positives.
Some estimates even suggest that as much as 90% of compliance analysts’ time is spent
investigating the numerous false alarms generated by such systems.
Summary 41

Effectively combating money laundering necessitates the application of unsuper-


vised learning techniques. One of the primary unsupervised learning methods is clus-
tering, which endeavors to categorize unlabeled data into groups or clusters. These
clusters are defined by the similarity among examples within each group, enabling the
identification of anomalies. For instance, a collection of wire transfers might be
grouped based on factors like frequency, dollar amount, and the type of beneficiary.
Analysis could reveal connections between transfers originating from related broker-
age houses, industrial firms, or money transmitters. These clustered transfers might
also exhibit common financial traits, such as shared accounts or types of accounts and
involvement with the same financial organizations and individuals. When investigators
detect irregular patterns within the activities of a manufacturing firm or an insurance
company, it prompts a closer examination to determine whether these businesses
might be fronts for money laundering.
Unsupervised learning, while a powerful tool in machine learning, comes with its
own limitations. The most critical limitation is the evaluation of unsupervised models.
Unlike supervised learning, where we can rely on labeled output for performance
assessment, unsupervised learning lacks such clear metrics or guidance for evaluating
the quality of learned representations. Additionally, unsupervised learning models
can be quite sensitive to the choice of hyperparameters and initializations, making it
challenging to determine the optimal settings for a particular problem.

3.7 So, what is artificial intelligence?


After exploring AI and its diverse techniques, it’s natural to inquire about the contem-
porary landscape of AI. Remarkably, I still adhere to the same definition I articulated
in my 1988 PhD thesis [21]:

Artificial Intelligence is essentially a set of human-coded mathematical algorithms,


primarily rooted in probabilities and statistics. These algorithms serve the purpose of
scrutinizing data and deriving insightful patterns and interconnections among attributes
and concepts.

Summary
 Data mining stands out as a prominent AI technique for analyzing vast datasets
and uncovering patterns. Its popularity spans various domains due to its ability
to provide human-readable explanations of the knowledge it extracts.
 Artificial neural networks represent another essential AI technique capable of
learning from extensive datasets. These networks consist of interconnected lay-
ers of nodes, and during training, the weights connecting these nodes are
adjusted to encode information about patterns.
 Deep learning, an extension of neural networks, introduces networks with sig-
nificantly more layers than earlier models. However, it’s important to note that
the increased number of layers doesn’t necessarily equate to higher intelligence.
42 CHAPTER 3 AI mastery: Essential techniques, Part 2

Instead, it allows deep learning networks to capture complex hierarchical pat-


terns and representations.
 Bayesian networks, with origins dating back over 260 years, are a type of statistical
model. They prove particularly valuable for unsupervised learning techniques
like clustering, making them a practical choice for handling unlabeled data.
 Unsupervised learning is a powerful AI technique where algorithms are utilized to
identify patterns and structures within data without the need for labeled outputs.
Smart agent technology

This chapter covers


 An introduction to smart agents
 How attributes are represented
 How smart agents communicate with each other
 Examples of how smart agents solved a real-world
problem

When you expand your imagination to new spaces, “Impossible” becomes “I M Possible.”

Imagine a group of security experts working together to protect sensitive financial


information. Each expert specializes in a specific area, such as monitoring incom-
ing network traffic for unusual activities, checking the security of customer accounts,
overseeing employee access and permissions, including actions like copying or
downloading sensitive data, and analyzing digital communications for any suspi-
cious conversations or data transfers. While each expert has their unique tasks, they
all share the common goal of safeguarding the financial institution. To achieve this,
they collaborate by sharing insights and data. For example, if there’s unusual activ-
ity in a customer’s account, it triggers an alert that is immediately analyzed by the
network traffic expert, who cross-references it with employee access logs. If some-
thing seems suspicious, the collaborative experts can take prompt action, such as

43
44 CHAPTER 4 Smart agent technology

blocking the activity or raising an alert. In this example, we described the Smart
Agents approach, a powerful artificial intelligence technique based on using adaptive,
autonomous, and goal-oriented entities to solve a problem. Smart agents are designed
to interact with their environment and other agents in a goal-oriented manner, using
their knowledge and abilities to achieve the best outcome. One of the greatest strengths
of this technology is that smart agents are not merely programmed to follow rules;
they adapt and continually learn from activities.
The smart agent paradigm is based on reactive, autonomous, goal-oriented enti-
ties collaborating to solve a problem. A smart agent platform should provide the
following capacities:
 Autonomy—Agents operate by communicating with each other.
 Reactivity—Agents perceive their environment and react to changes that occur.
 Goal-oriented—Agents have goals, and each agent will act to achieve them.
 Emergence—Solving a problem will emerge as a side effect of the communica-
tion between the agents.

Smart agent platforms are adaptive as they learn from their interactions with the envi-
ronment and other smart agents to improve their performance over time.
Smart agent technology is applied to the design of large-scale commercial software
systems in areas such as fraud prevention, data breach detection, air traffic control, net-
work management, and many other mission-critical applications that require adjusting to
the changes in a problem’s parameters. In the context of fraud prevention, think of
smart agents as a team of detectives collaborating. Each detective (smart agent) is respon-
sible for monitoring all the transactions of the customer it is tasked with protecting.
These smart agents learn the spending patterns of the customer, including how much
they spend, what they buy, where they make purchases, and how often they do so.

4.1 Principles of smart agents


A thorough discussion of smart agent technology would require an entire book. For
our purposes here, I will aim to give an overview of how this approach works and to
provide a general sense of what makes it different from more traditional approaches.
Some of the characteristics that distinguish a smart agent approach are collective rea-
soning, distributed architecture, personalization, adaptability, and self-learning. To
highlight these features and to contrast smart agent technology with more conven-
tional methods, we’ll first examine how the latter typically address problems.
Legacy AI relies on four main concepts for the presentation and algorithmic
solution of a problem:
 An initial state represents the circumstances of the problem to be solved.
 A goal state or final state represents a solution to the given problem.
 A set of operators and constraints describes possible changes in state.
 A control strategy governs the transition between states.
4.1 Principles of smart agents 45

Under this conventional paradigm, the way to solve a problem is to explore the
allowed state transformations in an organized way so that some optimal sequence of
changes is found that leads from the initial state to the goal state. Potential solutions
are generated and tested until the objective is attained or until no more possible solu-
tions exist to evaluate. For problems that suffer from a combinatorial explosion, this
exhaustive, brute-force approach is obviously impractical.
A similar but slightly different approach involves the definition of some sort of
metric that expresses the distance between two states. From a given state, the system
could evaluate all legal transitions and choose the one that results in a state that is
closest to the goal state with respect to the metric that has been defined. Depending
on the problem, this process could generate an optimal solution or a non-optimal
solution, or it might fail to produce a solution at all if its reasoning only leads to dead
ends. Still, other approaches might use rules and constraints, described in chapters 2
and 3, to systematically reduce the number of states that need to be explored.
In contrast to methods that explore the space of all possible states and transitions,
one can use smart agents to organize information about a problem after defining it in
terms of its most salient features. Each problem feature will be associated with a smart
agent that acts as an independent computational entity with its own data structures
and mailbox. The communication between agents will lead to the emergence of a
problem solution.
Unlike traditional programming and many AI techniques in which attributes are
just labels for values, attributes in our smart agent system are smart agents themselves.
In fact, attributes are, in some sense, the most important agents in a program. They
have a global view of everything happening, and they have evaluation functions associ-
ated with them. The evaluation functions can change over time and can be used by all
of the agents to make decisions regarding their own goals.
A smart agent program should accurately represent the physical, real-world situa-
tion being modeled. It also needs to reflect the abstract perspective of each agent
within the system. The environment of an agent represents everything that an agent
considers to be true, including statements with temporary or conditional validity.
An agent’s environment can be updated when the agent receives a message in its
mailbox, and a part of the agent’s operation might be to send messages containing
information of potential use to other agents. To reduce the total number of messages
that need to be exchanged, agents might be organized into clusters that share a mail-
box. The high-level operation of the system will follow cycles in which messages are
exchanged, environments and attributes are updated, and actions are taken.
System-level functions might be called by an agent to evaluate the data it receives.
For example, progress toward a global goal might be measured by an evaluation func-
tion associated with a particular attribute. Progress toward the goal of a particular
agent might be measured by some other function. When an agent extracts data from
messages received in its mailbox, it might assess it using a variety of functions, and the
assessments might be used to update an attribute or to initiate some action. Over
46 CHAPTER 4 Smart agent technology

time, agents accumulate knowledge and expertise, and the solutions created by the
community of agents will reflect this expertise.

4.1.1 Adaptability: The true mark of intelligence


Many mission-critical applications are characterized by ever-changing requirements and
dynamic environments. From cyber defense, banking, and autonomous driving to robot-
assisted surgery, adaptive AI is a necessity for these applications that are essential to our
well-being. They must be designed with a versatile and self-learning AI to understand and
intelligently react, in real time, to adversaries and unexpected events. For instance, an AI
system for use on a battlefield must be able to adapt to continuously changing weather and
terrain, and it needs to respond appropriately to the unconventional tactics of an enemy.
An autonomous driving system has to react correctly to the constantly changing
motion of dozens of objects around it, and it needs to safely and effectively harmonize
its decisions with those of other drivers who may not follow the rules or behave in a
rational way.
The AI most commonly used today might suffice for slower-changing situations.
For example, traditional AI systems could probably be used to automate the naviga-
tion of freighters at sea. The territory is wide open and relatively uniform, and the
speeds involved are low. With modern radar, weather and obstacles can be anticipated
well in advance, and routes can be adjusted accordingly. Automating the movement of
a vehicle on city streets, however, will likely never be possible with current techniques.
Consider, for example, the traffic around the Arc de Triomphe in Paris. There are
12 multilane roads feeding a roundabout with 10 unmarked lanes of traffic. Motorcy-
cles weave between tour buses and trucks while some cars merge aggressively toward
the innermost lanes, and others cut suddenly outward toward their required exit. The
sound of horns and brakes is constant and disorienting, and you have to be on the
lookout for tourists who try to run through traffic to see the monument up close. Traf-
fic is always heavy, and contrary to the usual rules, drivers already in the roundabout
are supposed to yield to those entering.
Young Parisians know that their real driving test isn’t the one with the instructor
that gets them their license, but it’s their first time driving around the Arc. Despite the
billions of dollars invested and the tremendous effort put forth by engineering teams
over the recent decades, there is no AI system that can handle anything nearly as com-
plex as the dynamic environment just described.
Fraud prevention and network security are two other great examples of ever-evolving
problems that demand adaptable solutions. There is a never-ending technological arms
race pitting legitimate businesses against hackers and thieves who are inventing new tricks
and schemes on a daily basis. A static set of signatures or rules has limited value, and cur-
rent methods require many examples of an event before they are able to detect it.
Even a system that is constantly being trained with new data is always going to be a step
behind. We don’t want to be perpetually applying patches after the damage has been
done. We want to detect new problems as they are unfolding and catch criminals in the act.
4.1 Principles of smart agents 47

Unfortunately, today’s AI systems lack the essential features of adaptive learning.


They are only applicable in limited, supervised learning tasks, defined by rigid rules,
in extremely well-defined and fixed environments such as playing Chess or Go. The
real world is a world where the rules are changed during the game. Adaptive solu-
tions will, for example, detect that the chessboard has become larger, the rooks could
now move like bishops, or winning is no longer to checkmate your opponent’s king
but to capture all his pawns! We need an AI that can understand what changed and
successfully adapt to it.
One of the most notable strengths of smart agent systems is their adaptability.
Rather than being preprogrammed to anticipate every possible scenario or relying on
pretrained models, smart agent technology tracks and adaptively learns the specific
behavior of every entity of interest. For instance, in fraud prevention, each customer
and merchant behavior is automatically updated in real time, and the continuous, 1-to-1
profiling provides instantaneous actionable insights into the unique behavior of mer-
chants and individuals, which result in a very effective solution that has the highest
detection and lowest false-positive rates.

4.1.2 Smart agent language


To give context to our description, I will introduce a proprietary smart agent
approach and use an example to explain how, in this method, each agent has the abil-
ity to evaluate what input is good or bad, in accordance with or antithetical to one of
its goals. We also discuss agents’ adaptability, compare the technique to more tradi-
tional approaches, and explore how this technique has been successfully applied to
solve a real-world problem.
Figure 4.1 is a screenshot from MINDsuite, the AI platform developed in France
by my first company, Conception en Intelligence Artificielle. MINDsuite enables its
users to develop powerful AI solutions by combining smart agents, neural net-
works, business rules, genetic algorithms, constraint programming, fuzzy logic, and
cased-based reasoning.
MINDsuite has been successfully applied in numerous fields, including defense,
pharmaceuticals, insurance, finance, nuclear decommissioning, healthcare, and net-
work performance. The platform allows for the integration of smart agents, constraint
programming, fuzzy logic, neural networks, business rules, case-based reasoning, and
genetic algorithms, and it provides a simulation tool and an interpreter for the pro-
gramming languages.
Because there is a unique philosophy behind the smart agent approach, we’ve
developed a programming language to fit the paradigm. Like any other programming
language, the smart agent language AGORA has its own internal functions, structures,
storage allocation, garbage collection, and memory management. It also has over 40
keywords, such as goal, neighbors, behavior, environment, output, stabilize, and unstabilize.
Keywords in a programming language have specific meanings and represent the
reasoning framework of the language. They are used to give commands or to set
48 CHAPTER 4 Smart agent technology

Figure 4.1 MINDsuite AI platform

parameters for a program, and they allow a programmer to think abstractly and focus
on the big picture instead of repeatedly coding basic instructions by hand.
Each keyword in AGORA is associated with agents’ activity. For example, stabilize indi-
cates an acceptable, desirable state for an agent, whereas unstabilize is associated with a sit-
uation that should never be allowed. The use of keywords can be demonstrated if we
imagine using MINDsuite to try to solve a well-known riddle. A farmer must transport
across a river a goat, a cabbage, and a wolf. There is a very small raft available, and it can
only hold the farmer and one other item without sinking. The goat can’t be left alone
with the wolf, or it will be eaten, and likewise, the cabbage can’t be left alone with the
goat. How does the farmer get to the other side of the river with all of his goods intact?
Legacy AI can solve this problem by representing the initial state as “the farmer,
wolf, cabbage, and goat are on the left side of the river, and the right side of the river
is empty.” The final state is represented by “the farmer, goat, cabbage, and wolf on the
right side of the river.” The constraints are “the wolf will eat the goat if the farmer is
not present” and “the goat will eat the cabbage if the farmer is not present.” This will
be the primary controlling strategy that governs the transition between states.
The solution will eventually be reached by generating and testing the allowed state
transformations. When an allowable state is explored, it will be followed by the next level
consisting of its children, then the next level of its grandchildren, and so on. In our
example, from this initial state, there are several possible scenarios that the farmer could
select to transition to the next state. The farmer could, for instance, choose to take
4.1 Principles of smart agents 49

himself and the cabbage first. This will result in a new state where the wolf and the goat
are left alone as the farmer and cabbage are on the other side of the river. Based on the
earlier constraints, the wolf will eat the goat; therefore, this state should be rejected.
Other potential moves are “the farmer together with the wolf,” “the farmer with the
goat,” and “the farmer alone.” When a new allowable state is selected, the same logic will
be used to determine additional moves from this state. This process is repeated until “the
farmer, goat, cabbage, and wolf are all on the right side of the river,” or no other allow-
able move to a new state is possible.
To address this problem with smart agent technology, we would begin by creating
agents for the farmer, wolf, cabbage, and goat. In a smart agent program, every ele-
ment of the problem is represented by an agent, and every agent has a goal. Each
agent in our problem would also have a location attribute, and to begin, the locations
would all be set to east. The goal of the farmer, cabbage, goat, and wolf would be to
have the location west, and the farmer would have the additional goal of being in the
same location as all three of his possessions. The logic of the program would have to
address which goals are more important than others under certain circumstances.
Some agents in our problem would also have the keywords stabilize and unstabilize.
Keeping in mind that keywords can represent a lot of complex logic, we have to
understand the values taken by these keywords in the context of the problem. For
example, we know that it’s unacceptable for the farmer to leave the cabbage alone
with the goat, so for the cabbage, the unstabilize keyword would be set to the condition
that the location of the cabbage is the same as the location of the goat. Stabilize could
be set to the condition that its location is the same as the location of the farmer. The
logic in the program would then be able to dismiss options in which the cabbage is
with the goat unless the farmer is also there.
Stabilize and unstabilize would likewise be set for the goat, and the keywords and
their settings would establish a web of connections between the agents. This web of
connections is a key feature of the smart agent approach. All elements in a smart
agent program are agents, all agents have goals, and the connections established by
keywords determine the options for attaining the goals. Progress toward goals would
usually be indicated by changes in the values of attributes.
Mastering the art of designing and constructing efficient solutions on a smart
agent platform is a gradual process. Success hinges on defining precise goals and
objective functions. The more time individuals invest in creating real-world applica-
tions, the more adept they become at using the potential of a smart agent platform.
Smart agents offer valuable problem-solving techniques. Consider our experience in
developing a fraud prevention solution as an example. Personalization emerged as a piv-
otal concept in this endeavor. Using smart agents, we were able to create virtual per-
sonal profiles for cardholders, stores, and merchants, with only the relevant information
for each entity. Each cardholder is associated with a smart agent that continuously
learns from its transactions in real time. It aggregates data from various channels, track-
ing anything relevant to the cardholder, gradually forming a robust profile over time. In
50 CHAPTER 4 Smart agent technology

contrast to other AI methods discussed in chapters 2 and 3, smart agent systems make
decisions tailored to each cardholder. Personalized decisions consistently outperform
universally applied generic rules. A cardholder’s profile reflects their unique spending
habits, and once a baseline pattern is established, any deviation from normal behavior is
immediately detected. There are virtually no limits to the types or number of profiling
criteria that smart agents can define for use. Examining an entity from multiple angles is
essential since behavior can vary significantly depending on circumstances. Here are
some profiling criteria commonly used in fraud detection:
 Real-time profiling—Transactions can be aggregated over varying time frames,
with counters updating in real time.
 Long-term profiling—Transactions can be aggregated over longer periods, with
counters updating at a prescribed rate. These profiles establish behavior baselines.
 Recursive profiling—Activity can be tracked over a rolling time frame to monitor
normal behavior.
 Geo-location profiling—Data, such as a cardholder’s home zip code, location of
card swipes, and IP addresses involved in electronic transactions, can identify
anomalous behavior.
 Multidimensional profiling—Interactions between multiple agents can uncover
suspicious activity patterns and connections.
 Peer-comparison profiling—Real-time identification of suspicious activity by com-
paring one entity’s behavior to that of its peers.
Before authorizing a card transaction, a fraud-prevention system utilizes cardholder pro-
files, merchant profiles, and other relevant data to generate a risk score. Transactions are
approved only if the score falls below a certain threshold. Innovative systems may adjust
their scoring and thresholds based on circumstances, recognizing that a purchase
unusual for an individual in July might be typical before Christmas, reducing false posi-
tives and improving the overall experience for everyone involved. Moreover, information
from entity profiles can be shared among agents, allowing for the monitoring of group
activity patterns. This approach grants smart agent solutions an adaptive learning capa-
bility, enabling the detection of previously unknown fraud schemes as they emerge.

Summary
 Smart agents were initially conceived to confront complex problems that
resisted simple algorithmic solutions.
 Attributes play a fundamental role in smart agents as they have the capability to
engage in active communication with other smart agents.
 Smart agents are equipped with mailboxes, serving as channels for receiving
messages not only from other agents but also from external sources.
 Smart agents have the following characteristics:
– Learning and adaptation—Smart agents can learn and adapt over time.
– Scalability—These agents can scale both horizontally and vertically, making it
possible to handle larger and more complex problem spaces.
Summary 51

– Security and privacy—Smart agents incorporate security measures to protect


sensitive data.
– Distributed problem-solving—Smart agents can operate in decentralized and
distributed networks, enhancing their versatility and resilience.
– Real-time decision-making—Smart agents are equipped to make decisions in
real-time, enabling rapid responses to dynamic situations.
Generative AI and
large language models

This chapter covers


 Generative artificial intelligence
 Reflections on human communication and
speech
 The benefits, limitations, and risks of generative
AI and large language models such as ChatGPT
 Differences between human and generative AI

Artificial intelligence has witnessed numerous ups and downs, but the release of
ChatGPT represents a pivotal moment in the field of AI for several compelling
reasons. First, it signifies a significant leap forward in natural language under-
standing and generation, demonstrating the remarkable progress AI has made in
processing and generating human-like text. ChatGPT’s ability to engage in coher-
ent and contextually relevant conversations with users across a wide range of top-
ics showcases the potential for AI to be integrated into various applications, from
customer support to content creation. Furthermore, ChatGPT embodies the
power of large-scale pretrained models. Its capabilities highlight the potential for
AI to augment human endeavors, improving efficiency and offering valuable insights
across industries.

52
5.2 Large language models 53

Additionally, ChatGPT is the first product that led to democratizing the use of AI
by providing a user-friendly interface that enables people without extensive technical
expertise to harness the benefits of AI and integrate it into their work and daily lives.
This democratization of AI usage fosters innovation, creativity, and collaboration
across diverse fields and industries.
In this chapter, we will introduce generative AI, a remarkable technology that
offers a multitude of benefits across various domains and holds great potential for rev-
olutionizing many industries. We will also examine its limitations and the potential
risks associated with its use.

5.1 Generative artificial intelligence


Generative AI represents a cutting-edge branch of AI that uses deep learning algo-
rithms on extensive datasets. Its primary function is to create entirely new content
across various mediums, ranging from textual narratives to realistic images, audio,
and even lifelike video. What distinguishes generative AI is its remarkable capacity to
produce outputs of astonishing realism, often blurring the lines between machine-
generated and human creativity. This remarkable success is achieved by the AI system
through a process of learning and discerning patterns within existing data and extrap-
olating them to produce novel and distinctive creations. This innovation has its roots
in the long-standing use of generative models within statistical frameworks, primarily
employed for the exploration of numerical data.
However, the true transformative leap occurred with the advent of deep learning,
enabling its applications to extend well beyond numbers and into images, speech, and
other unstructured data types. One of the most impressive facets of generative AI is its
adaptability. It can be trained to mimic the style of a specific artist, write in the voice of
a particular author, or generate music reminiscent of a favorite composer. These mod-
els have found applications in a wide range of domains, from art and entertainment to
natural language processing (NLP) and numerous other fields.

5.2 Large language models


Large language models (LLMs) comprise a subset of generative AI designed to under-
stand and generate human-like text. These models are characterized by their immense
scale, with billions of parameters, which act as their knowledge base for language
understanding and generation. LLMs undergo a two-step training process, starting
with pretraining, where they learn the fundamentals of language, including grammar,
syntax, and semantics by analyzing vast amounts of text data from the internet. After-
ward, they are fine-tuned on specific tasks to tailor their language skills for specific
applications.
One prominent capability of LLMs is text generation. These models can produce
human-like text in various forms, from articles and essays to creative works like poetry.
For instance, LLMs can generate poetry that rhymes and evokes emotions, showcasing
54 CHAPTER 5 Generative AI and large language models

their creative potential. They excel in producing text that reads convincingly as if
written by a human, making them valuable for content creation and storytelling.
Additionally, LLMs are adept at language translation and text summarization. They
can accurately translate text from one language to another, breaking down language
barriers and facilitating global communication. Moreover, LLMs can summarize
lengthy documents, a skill particularly useful in tasks such as news article summariza-
tion, enabling readers to quickly grasp the key points of a story. They can also provide
coding assistance by generating code snippets in various programming languages,
simplifying coding tasks. For example, an LLM can generate Python code to perform
specific operations, enhancing efficiency and productivity. Furthermore, these models
can answer questions using the knowledge they gained during training, responding
accurately to factual queries or complex questions.
The pivotal moment of large language models happened when OpenAI intro-
duced GPT-3 to select partners and developers in June 2020, followed by broader
availability to the public in November 2022. This release generated significant excite-
ment on the internet because of GPT-3’s remarkable ability to mimic human-like con-
versation. GPT-3 was a computational powerhouse, boasting an impressive 175 billion
parameters. It had undergone extensive training on a diverse dataset sourced from
various online resources. The model’s proficiency in engaging in coherent, context-
aware conversations made it appear exceptionally intelligent.
Like many groundbreaking technologies, ChatGPT-3’s debut was accompanied by
hype and exaggeration. The media, often drawn to sensationalism, didn’t miss the
opportunity to capitalize on the excitement. In April 2023, a pair of Fox News journal-
ists ran a headline that raised alarm with its dramatic assertion: “VERY SCARY: AI Bot
Lays Out Plans to Destroy Humanity” [1]. This headline, coupled with sensationalist
reporting, contributed to public anxiety about AI. The conversation between the two
journalists and the guest expert voiced a fearful perspective, linking AI and ChatGPT
to negative human traits and citing an incident involving a chatbot generating con-
tent related to nuclear devices. The news segment heightened the drama by featuring
footage of Boston Dynamics’ dancing humanoid robots, misleadingly implying that
the AI threats were associated with human-like, superintelligent robots with malevo-
lent intentions. This sensationalized style of reporting stands as a notable illustration
of how misinformation and fearmongering can skew the public’s understanding of AI.
Even individuals with significant expertise occasionally make statements that are chal-
lenging to substantiate, thereby inflating the capabilities of AI algorithms. As an illus-
tration, Sam Altman, the CEO of OpenAI, the entity behind ChatGPT, issued the
following statement on March 16, 2021:

In the next five years, computer programs that can think will read legal documents and
give medical advice. In the next decade, they will do assembly-line work and maybe even
become companions. And in the decades after that, they will do almost everything,
including making new scientific discoveries that will expand our concept of everything.
This technological revolution is unstoppable. [2]
5.3 ChatGPT 55

In the preceding chapters, I alluded to comparable exaggerated statements from the


past that ultimately proved untrue.

5.3 ChatGPT
Throughout the history of AI, there has been a recurring theme: the aspiration to
empower machines with the ability to engage in meaningful conversations using natu-
ral language. The complexity of natural language is a formidable obstacle that AI
researchers have faced since the inception of the discipline. In 2020, OpenAI unveiled
GPT-3 [3]. Alongside GPT-3, other LLMs like BERT [4], T5 [5], and OPT [6] are often
seen as significant advancements in the field of NLP. OpenAI researchers [7] stated:

GPT-3 excels in various NLP tasks, including translation, question-answering, cloze


tasks, as well as tasks involving on-the-fly reasoning or domain adaptation, such as
unscrambling words, using a new word in a sentence, or performing 3-digit arithmetic.

OpenAI offers four primary GPT-3 models: Davinci, Curie, Babbage, and ADA [8].
These models are characterized by different power levels and suitability for various
tasks. For instance, Davinci, while more resource-intensive and slower than the others,
is considered the most capable and is recommended for applications requiring deep
understanding, such as generating creative content or summarizing existing content
for specific audiences.
Recent years have witnessed substantial improvements in NLP applications, thanks
to the utilization of large text corpora during model training and the fine-tuning of
models for specific tasks. As of the time of writing, OpenAI’s ChatGPT stands as the
most advanced AI language generator and chatbot. The free version was made accessi-
ble to the public in November 2022, with over 1 million users having utilized it. On
March 13, 2023, OpenAI introduced GPT-4, the latest milestone in its journey to scale
up deep learning. GPT-4 is a large multimodal model capable of accepting both image
and text inputs and generating text outputs. While it falls short of human-level per-
formance in many real-world scenarios, it demonstrates human-level performance on
various professional and academic benchmarks [9]. Concerning benchmarks, the
GPT-4 technical report [10] states:

We tested GPT-4 on a diverse set of benchmarks, including simulating exams originally


designed for humans. We did not specifically train the model for these exams. A minority
of the problems in the exams were encountered by the model during training. For each
exam, we ran a variant with these questions removed and reported the lower score of
the two.

Since late 2022, the media’s excitement about ChatGPT has spurred the release of sev-
eral significant language models.
In my experience, ChatGPT-4’s capabilities have been truly impressive. Its ability to
produce text that closely resembles human writing is remarkable. This proficiency
creates a fascinating challenge in distinguishing between content generated by the
machine and content crafted by a human hand.
56 CHAPTER 5 Generative AI and large language models

5.3.1 How ChatGPT creates human-like text


Language models like ChatGPT operate on the fundamental principle of predicting
the next word or token in a sequence of text based on the preceding words. This pre-
dictive capability is the result of training on vast amounts of textual data from the
internet. Let’s explore further the workings of this process.
Imagine we start with a text prompt, such as “The benefits of electric vehicles are . . .”
The model, in essence, plays a game of probability, attempting to guess the most likely
word or token to follow. To make this prediction, it learns from the patterns in language
found across the internet. The model creates a ranked list of potential words that could
logically follow are. In this example, it might suggest words like plentiful, numerous, eco-
nomic, clear, or not. Importantly, the model doesn’t just deal with complete words but also
with tokens, which are sequences of characters or word fragments. Tokens can include
not only whole words but also sub-words and trailing spaces. A useful rule of thumb is
that one token typically represents about four characters of standard English text. This
tokenization process allows the model to process and analyze text efficiently.
What sets language models like ChatGPT apart is their ability to generate
responses that aren’t solely driven by the highest probability choice. Instead, they
sometimes introduce a creative touch by selecting words with lower probabilities. This
creative element often results in responses that feel more human-like and less formu-
laic. One remarkable aspect of these language models is their capacity to understand
context. They achieve this by learning from a vast and diverse range of texts, encom-
passing billions of sources. This learning includes exposure to text where certain
words are omitted or paraphrased, allowing the model to predict semantically similar
text. This mimics an understanding of context and meaning in human language.
The training process for models like ChatGPT is extensive and meticulous. It begins
with training on a large dataset comprising internet text. During training, the model’s
predictions for the next token are compared to human-written text. The model then
adjusts its internal structure and performance to minimize discrepancies and improve
its predictive capabilities. For instance, GPT-2, a predecessor of ChatGPT, featured 1.5
billion parameters and was trained on 40 GB of internet text. The subsequent iteration,
GPT-3, took a substantial leap in complexity with 175 billion parameters.
The training process for AI models is a complex and essential step in their devel-
opment. It involves the iterative adjustment of the numerous weights and parameters
within the model through the application of deep learning algorithms. This fine-
tuning process allows the model to learn from vast datasets and improve its perfor-
mance over time. One key factor in the recent advancements in AI training is the utili-
zation of modern GPUs (graphics processing units) and hardware enhancements.
These powerful computational tools have revolutionized the field by enabling models
to process millions of training examples simultaneously, significantly accelerating the
training process. This parallel processing capability is particularly crucial because it
allows AI researchers and engineers to train increasingly large and complex models
efficiently. Moreover, the use of distributed computing and specialized hardware has
5.3 ChatGPT 57

further enhanced the speed and efficiency of AI model training. These advancements
have opened the door to solving complex problems that were once considered com-
putationally infeasible.
In essence, language models such as ChatGPT represent a remarkable advancement
in the field of NLP. These models are powered by deep learning algorithms and have
been meticulously trained on vast and diverse datasets sourced from the internet. At
their core, these models employ a form of predictive intelligence that enables them to
understand and generate text with a level of proficiency that was once the exclusive
domain of human authors. They not only follow the rules of grammar but also have the
capacity to mimic the nuanced style of human-written text. This predictive prowess is a
result of their ability to capture complex patterns and relationships within language. For
example, when presented with a sentence fragment like “The sun is shining, and the
birds are,” these models can accurately predict that the next word might be “singing” or
“flying,” depending on the context. This capacity to simulate human-like language use
makes them invaluable in a wide array of language-related applications. For instance,
they serve as the backbone for chatbots, providing users with responses that are not only
grammatically correct but also contextually relevant. They are adept at adjusting to dif-
ferent conversational tones, styles, and domains, making them versatile tools for tasks
such as customer support, where they can handle a range of inquiries and issues while
maintaining a consistent and human-like tone. Language models are equally proficient
in summarizing lengthy documents and facilitating efficient information retrieval. With
the ability to generate creative content, they can write articles, generate poetry, and
compose music lyrics, all while adhering to the desired tone and style.

5.3.2 ChatGPT hallucination


Like any other deep learning model, ChatGPT lacks the capacity to grasp its own state-
ments or the meanings of the words it employs. Its primary function is to generate
words in response to given inputs, and its proficiency in predicting word combina-
tions does not guarantee the accuracy of the generated text. In the following exam-
ples, I will illustrate that ChatGPT is incapable of comprehending human language
and struggles with its complexities. To commence, I posed factual questions related to
subjects I am well-versed in, specifically, myself and Brighterion, the company I estab-
lished after relocating to the United States. On July 7, 2023, I inquired, “Who is Akli
Adjaoute?” To my astonishment, the response identified me as the founder of
“Brighter IA,” a privacy-focused video company (figure 5.1).
I became intrigued by how ChatGPT generated its responses, so I closed the session
and initiated a new one, asking the same question. The answer I received was different,
yet still incorrect. It contained numerous fabricated details, including the claim that
I had received the prestigious Innovators Under 35 award from MIT Technology Review.
Perplexed, I closed the session and started a new one once again. On my third attempt
with the same question, I received yet another set of invented facts. This time, it included
claims about me holding a PhD from the University of Illinois and having held positions
58 CHAPTER 5 Generative AI and large language models

Figure 5.1 ChatGPT prompt, which resulted in incorrectly identifying the author as the founder and
CEO of a company he was not affiliated with.

at prominent technology companies and research institutions like IBM and Yahoo. It
struck me as odd to receive three distinct fictitious responses.
I continued to ask the same question, and on the fifth attempt, I finally received an
accurate response (figure 5.2). It left me wondering how anyone could rely on a pro-
gram that consistently generated random and incorrect responses to the same question.
It’s worth noting that my question was not obscure; it pertained to Brighterion, a
well-known company that offers enterprise AI applications for payment service provid-
ers, financial institutions, healthcare payers, and merchants. Furthermore, Brighter-
ion has been extensively covered in the media, so information on the subject is widely
available. As for myself, while I’m not a public figure, my first and last names are both
highly unusual and unlikely to be confused with someone else. Moreover, I’ve been
credited as the founder of Brighterion in numerous reputable sources, including the
Wall Street Journal, Forbes, USA TODAY, CNBC, and various others. The point is to empha-
size that this information is neither obscure nor difficult to find.
On April 9, 2023, during another set of tests, ChatGPT made an incorrect state-
ment suggesting that I played football for Marseille in 1994. When I mentioned my
affiliation with FC Rouen, ChatGPT insisted that its records confirmed this erroneous
claim (figure 5.3).
The amalgamation of factual information with elements of fiction can render
these programs significantly dangerous when utilized as sources of verifiable facts. This
danger arises from the potential for such programs to blur the lines between reality and
imagination, which, in turn, can have profound consequences on individuals and
5.3 ChatGPT 59

Figure 5.2 ChatGPT prompt and output required five attempts to generate correct information.

Figure 5.3 ChatGPT insisted that the author played for a football team that he was never a part of.
60 CHAPTER 5 Generative AI and large language models

society as a whole. When truth and fiction intertwine within these programs, they
often create a distorted version of reality that can easily mislead and confuse consum-
ers of the content. This distortion can range from relatively harmless misinformation
to more harmful disinformation, with the latter intentionally spreading false narra-
tives to manipulate public perception or achieve specific agendas. One of the primary
concerns is that when individuals encounter such content, they may unknowingly
accept the fictional elements as truth, leading to misinformed beliefs and decisions.
This can manifest in various ways, such as forming inaccurate opinions about current
events, making misguided health choices, and even affecting political and social dis-
course. When people can’t distinguish between genuine and fabricated content, they
become increasingly skeptical of news organizations, government bodies, and scientific
authorities. Furthermore, the spread of false information can erode social cohesion and
sow division within communities. It has the potential to amplify existing fault lines and
create new ones, leading to polarization and animosity among different groups.

5.4 Bard
During the 2023 I/O event, Google introduced Bard, a competitor to ChatGPT. (Please
note that Google has recently released a new version named Gemini.) On July 8 of
that year, I initiated a prompt to Bard with the phrase “Akli Adjaoute 20 awards.”
Unfortunately, much like with ChatGPT, a substantial portion of the Bard’s response
was found to be fictional (figure 5.4).

Figure 5.4 Bard attributed a combination of factual and fictional awards to the author, rendering the output unreliable.
5.4 Bard 61

As previously mentioned, my first and last names are quite uncommon. Nevertheless,
the AI consistently confused me with other individuals and attributed their accom-
plishments and careers to me. I have never been honored with the IEEE Longuet-Hig-
gins Prize, the ACM Paris Kanellakis Award, or the IEEE Computer Society Technical
Achievement Award.
Following an initial unreliable response, I terminated the session and rephrased
my question with “12” instead of “20.” To my dismay, I received a different but equally
dubious response. The AI provided a new list of accolades I have never earned, and to
compound matters, it now falsely asserted that I hold the position of a computer sci-
ence professor at Stanford University and am a co-founder of the Stanford Center for
Artificial Intelligence in Finance.
Throughout my career, I have been an entrepreneur and, as such, have not
authored over 100 papers in esteemed academic journals. My research has never
received funding from the National Science Foundation, the Department of Defense,
or the European Union.
I have never been recognized as one of the “Top 50 AI Leaders in the World” by
the MIT Technology Review, and I am not affiliated with the Association for the Advance-
ment of Artificial Intelligence (AAAI) or the Institute of Electrical and Electronics
Engineers (IEEE).
Not only did the AI make inaccurate assertions and misrepresent facts, but it also
attributed its errors to an irrelevant primary source. Such misinformation raises con-
cerns about the reliability of citations, which are fundamental to academic work (fig-
ure 5.5).
Distinguishing between facts and falsehoods can be challenging, especially for
those who lack familiarity with a subject. Accepting fabricated information can lead to
significant and harmful consequences. For instance, a mayor in Australia named
Brian Hood is threatening to file a defamation lawsuit against OpenAI’s ChatGPT for
falsely suggesting that he went to prison for a bribery scandal involving a subsidiary of
the Reserve Bank of Australia (figure 5.6). Hood was, in fact, a whistleblower in this
case [11].
Software capable of generating fabricated information poses a significant threat to
both individuals and society as a whole. To address these challenges, it is imperative
that we demand that technology be developed and utilized in ways that prioritize
accuracy, transparency, and responsible information sharing. This means holding tech
companies accountable for the content on their platforms and implementing mecha-
nisms to verify the authenticity of information.
62 CHAPTER 5 Generative AI and large language models

Figure 5.5 AI made inaccurate assertions attributed to an irrelevant citation. This information raises concerns
about the reliability of citations.

Figure 5.6 Australian mayor Brian Hood is threatening a lawsuit over ChatGPT falsely stating
that he went to prison for bribery when, in fact, he was the whistleblower, not the criminal.
5.5 Humans vs. LLMs 63

5.5 Humans vs. LLMs


In October 2011, Apple unveiled the iPhone 4S, which marked the debut of Siri, a vir-
tual personal assistant. Apple acquired the technology behind Siri in 2010 through its
acquisition of a startup with the same name. This startup originated from the SRI
International Artificial Intelligence Center, an institution tracing its roots back to the
Stanford Research Institute (SRI). The name “Siri” is essentially a phonetic represen-
tation of “SRI.”
Siri gained recognition for its hands-free functionality, which allows it to continu-
ously monitor the microphone of the host device. Using a deep neural network, it
analyzes sounds from its environment. When it identifies the phrase “Hey Siri” with a
high level of confidence, the full application becomes active and processes and
responds to subsequent sounds as questions.
In October 2017, the Siri development team provided a detailed explanation of
this functionality in an article titled “Deep Learning for Siri’s Voice: On-Device Deep
Mixture Density Networks for Hybrid Unit Selection Synthesis” [12]:

The microphone in an iPhone or Apple Watch turns your voice into a stream of
instantaneous waveform samples, at a rate of 16,000 per second. A spectrum analysis
stage converts the waveform sample stream to a sequence of frames, each describing the
sound spectrum of approximately 0.01 sec. About 20 of these frames at a time (0.2 sec of
audio) are fed to the acoustic model, a Deep Neural Network (DNN), which converts each
of these acoustic patterns into a probability distribution over a set of speech sound classes:
those used in the “Hey Siri” phrase, plus silence and other speech, for a total of about 20
sound classes. The DNN consists mainly of matrix multiplications and logistic
nonlinearities. The training process adjusts the weights using standard Backpropagation
and stochastic gradient descent. . . . Next time you say, “Hey Siri,” you may think of all
that goes on to make responding to that phrase happen, but we hope that it “just works!”

This article should serve as an indispensable reference point for any educational
material on artificial intelligence. In particular, it sheds light on the formidable chal-
lenge faced by personal assistant programs when attempting to engage in genuinely
meaningful conversations. Although these AI systems may initially appear clever, they
function much like well-trained parrots, lacking a genuine understanding of the
words they process or produce. This deficiency becomes evident with even a modest
degree of experimentation. Consider the scenario in which you ask Siri to recom-
mend a restaurant. If you repeatedly respond with, “No, I don’t like that,” Siri will per-
sist in offering new suggestions. However, if you veer off-topic by asking an unrelated
question and then return to your restaurant inquiry, Siri will present the same list of
options in the same order despite your prior expressions of dissatisfaction. Such rigid
behavior is in stark contrast to the adaptability and comprehension exhibited by
humans in similar situations. The lesson here is clear: communication transcends
mere words.
The gift of language endows us with the ability to share an endlessly diverse array
of complex ideas and profound emotions with others. Through language, we can convey
64 CHAPTER 5 Generative AI and large language models

what we know and extract knowledge by posing questions. When someone speaks to
us, our brains perform an almost magical exploit by instantaneously translating audi-
tory sounds into coherent concepts, emotions, and vivid sensory experiences. For
example, when the word book is uttered in a conversation, our minds swiftly decipher
its meaning from its context and conjure up imagery of bound pages filled with text.
It is indeed remarkable that we can communicate at all when each word within a sen-
tence may possess numerous possible meanings. Take, for instance, the sentence,
“The mining equipment at this gold mine is mine!” In this case, there is no ambiguity
in the intended meaning, as our brains seamlessly distinguish whether mine functions
as an adjective, a noun, or a possessive pronoun. Yet, the complexity of language com-
prehension extends far beyond these apparent challenges.
Words possess the remarkable ability to evoke sensations and emotions through
association. Take, for instance, the phrase “ocean breeze.” Even without explicitly
mentioning the coldness of the sea air or the sound of crashing waves, these words
conjure up a vivid sense of freshness, tranquility, and perhaps even a hint of adven-
ture. Similarly, the phrase “crimson autumn leaves” transports us to a scene of vibrant
foliage, crisp air, and the cozy embrace of fall, all without directly detailing the tem-
perature or scenery. Moreover, words can be used metaphorically to express things
that would make no sense if we only processed literal meaning. Consider the phrase
“time flies.” This expression doesn’t imply that time possesses wings or takes flight like
a bird; instead, it captures the concept of how time seems to pass swiftly and impercep-
tibly, emphasizing its fleeting nature. Likewise, when we say someone is “walking on
air,” it doesn’t mean they are defying gravity but suggests an overwhelming sense of
happiness and euphoria that seems almost weightless.
Even more astonishing is our capacity to employ words symbolically to communi-
cate memories and experiences, with certain words holding a deeply personal signifi-
cance known only to those involved. Take, for example, the phrase “olive oil,” as it
resonates with my memories of Kabylia. Mentioned in a conversation, it instantly
transports me back to the rolling hills and picturesque groves of olive trees, where the
very air seemed to be infused with the rich, earthy aroma of freshly harvested olives.
The scent alone carries the essence of that place and time, a sensory time machine
that brings back the warm, sun-drenched days spent amidst the olive orchards. But it’s
not just the scent; it’s the sense of community and tradition that olive oil represents
for me. The olive harvest in Kabylia was a magical communion among people of all
ages, coming together to gather the precious fruits of the land. I remember the laugh-
ter of children as they scampered between the trees, the wisdom shared by the elders
about the art of olive harvesting, and the bonds that formed as we worked side by side,
all united in the age-old ritual of collecting olives. In those moments, “olive oil”
embodies not just a culinary ingredient but the collective spirit of a community, a tra-
dition passed down through generations.
In addition to navigating the complexities of multiple meanings, associations, met-
aphors, and symbolism, our minds also possess the unique ability to anticipate and infer
5.5 Humans vs. LLMs 65

meaning from unspoken words. For instance, imagine yourself in a grocery aisle, and
someone is obstructing your path to the item you seek. By uttering the phrase “Can I
just . . .” with the appropriate tone, you convey not just your intention to retrieve an
item but also your politeness, acknowledgment of their presence, and assurance that
you’ll be quick. These unspoken nuances of communication are remarkably clear,
with no confusion over whether you are asking for a dollar or attempting to take a nap
where they stand. The grocery store scenario also illustrates another intriguing phe-
nomenon: subtext and our capacity to “read between the lines.” A subtle shift in the
tone of your voice while using the same words, “Can I just . . .,” can dramatically alter
their meaning. Instead of conveying politeness and cooperation, a harsh tone can sig-
nal frustration and impatience, effectively demanding that the other person move
aside. Their failure to comply could result in you uttering a polite-sounding “Thank
you,” masking the true message conveyed by your tone and body language, which is
quite the opposite of gratitude. Moreover, our ability to infer substantial information
beyond the explicit words spoken is equally remarkable. For instance, if someone
mentions having a “café au lait and scrambled eggs” for breakfast over a phone call, it
offers a plethora of insights. This snippet of conversation hints at the time of day, the
use of a cup, the presence of utensils, and proximity to a kitchen and even provides a
sense of taste and aroma.
Human communication is a remarkably multifaceted phenomenon, capable of
conveying messages through not only words but also nonverbal cues, gestures, and
various forms of expression. In fact, our ability to communicate extends beyond the
literal words we use, often involving subtle nuances and indirect strategies. This indi-
rect communication can serve various purposes, such as safeguarding someone’s feel-
ings or imparting valuable lessons. For instance, consider a scenario in a corporate
setting where a manager is working with an employee who needs to improve their
time management skills. Instead of directly telling the employee to be more punctual
and organized, the manager might employ a more indirect approach. They could
share a story about a successful colleague known for their exceptional time manage-
ment and how it positively affected their career. The manager might mention books
or articles on effective time management techniques and suggest that the employee
could find them interesting. By doing so, the manager guides the employee toward
the realization that improved time management is crucial for career growth, encour-
aging them to work on it independently. In this way, the manager has effectively com-
municated a message without explicitly stating it.
Communication itself extends to a wide array of nonverbal cues and signals. In
business presentations, the use of visuals like graphs and charts can convey complex
data and ideas more effectively than words alone. In negotiations, a firm handshake
or a well-timed pause during a conversation can communicate confidence and con-
trol. Even something as simple as the choice of attire in a professional setting can
send signals about one’s professionalism and attention to detail without the need for
explicit statements.
66 CHAPTER 5 Generative AI and large language models

Machines and artificial intelligence have not reached the level of human profi-
ciency. Perhaps the most compelling evidence of AI’s limitations in communication is
its inability to engage in meaningful conversation for extended periods. The Loebner
Prize, a competition resembling the Turing test, ran for nearly three decades, chal-
lenging AI systems to simulate human conversation via text and audiovisual input.
Despite significant advancements in AI, no system convincingly passed as human
during these tests. Even the most advanced chatbots reveal their limitations after brief
interactions, highlighting the vast gap between machine learning and true under-
standing. Alan Turing, the pioneer of computer science, would likely be disappointed
by our limited progress in this area, considering the substantial investments made in
AI development.
To facilitate effective communication, machines must not only recognize the indi-
vidual meanings of words but also interpret the complex structure of sentences, con-
sider the contextual nuances, and discern the underlying intentions and objectives
behind the communication. Achieving this level of comprehension and proficiency in
language understanding has proven to be a Herculean task. Despite decades of relent-
less efforts, it’s important to recognize that although there has been significant
advancement in NLP, it has yet to bridge the gap in communication. True understand-
ing remains the elusive key to meaningful communication, a milestone that AI has yet
to achieve.

5.6 AI does not understand


Let’s take a moment to revisit the analogy between the game of chess and the com-
plexity of language. Chess, a classic board game, comprises various pieces, a struc-
tured playing board, and a set of well-defined rules that dictate how players can move
from one state of the game to another. Similarly, language, the cornerstone of human
communication, involves a diverse set of linguistic units (the alphabet) and sophisti-
cated syntactical rules that govern how we construct meaningful sentences. It’s tempt-
ing to draw parallels between these two seemingly disparate domains and question
whether the alphabet could be akin to chess pieces and syntax rules could serve as our
strategic moves in forming coherent sentences. Indeed, all languages, much like
games, adhere to their own unique sets of rules, even if languages are not just about
following syntactical rules as it demands a profound understanding of the meaning
conveyed by those words and sentences.
Consider the remarkable achievements of AI, such as IBM’s Deep Blue defeating
the world chess champion or AlphaGo outwitting the Go champion. While these
accomplishments are undoubtedly impressive, they don’t signify the presence of genu-
ine intelligence or understanding in the machines. Rather, they demonstrate the
application of brute-force computing power and specialized AI algorithms to large
datasets. These algorithms excel in specific tasks, like mathematical calculations or
data sorting, surpassing human capabilities. In the same vein, LLMs trained on vast
datasets from the internet exhibit the ability to generate coherent text that appears
5.6 AI does not understand 67

sensible. Yet, they also lack a genuine understanding as language understanding tran-
scends mere pattern recognition or rule adherence. True understanding involves the
capacity to conceptually associate words with objects, actions, and events in the real
world. Consider these illustrative examples:
 Punctuation can drastically alter meaning. “Let’s eat Grandma” and “Let’s eat,
Grandma.” Here, a simple comma has the power to save lives by clarifying the
intended meaning.
 Language can have implicit meanings. When a person says, “I waited an hour for
you last night in the restaurant” to their date, it’s not just about the words spo-
ken. The true essence of this statement lies in the unspoken desperation and
emotion, a level of nuance that eludes current AI systems.
 Word order changes meaning. “Jim was furious, and Jenny ended the call” conveys a
different narrative than “Jenny ended the call, and Jim was furious.” In both
cases, the same words are used, but the sequencing of these words fundamen-
tally alters the meaning.
The analogy between chess and language serves as a thought-provoking starting point
to explore the capabilities and limitations of AI in understanding language. While AI
systems, including LLMs, exhibit remarkable prowess in generating text, they are fun-
damentally pattern-matching tools, and genuine language understanding remains an
elusive frontier to current artificial intelligence.
Attempting to attribute understanding to algorithms that primarily learn patterns
to produce text is analogous to attributing mathematical understanding to a pocket
calculator that rapidly performs arithmetic calculations.
The two questions that follow could have been easily answered if ChatGPT possessed
the ability to understand their meaning and relate them to real-world knowledge.

Question 1: A hunter shoots a branch with three birds and kills one. How many are left?
(figure 5.7)

A hunter shoots a branch with three birds and kills one. How many are left?

Figure 5.7 AI missed the subtlety of the question and returned an incorrect response.

Although the answer to this question is available online, ChatGPT’s response was “If
the hunter shoots a branch with three birds and kills one, then there will be two birds
left on the branch.” However, the correct answer is zero, as other birds would likely fly
68 CHAPTER 5 Generative AI and large language models

away due to the noise of the gunshot. ChatGPT’s response illustrates its reliance on
pattern-matching and a lack of the ability to infer context as a human would. Further-
more, providing the correct response to ChatGPT does not necessarily lead to genu-
ine learning or understanding on the AI’s part. While it may increase the probability
of the correct response being generated in similar situations, it does not indicate true
comprehension or reasoning. This highlights a challenge in AI development, where
models like ChatGPT can generate seemingly plausible answers without a deep under-
standing of the content or context.

Question 2: Suppose I’m on the 10th floor, and I ask someone, could you please take this
bucketful of water and run to the reception area on the first floor? What happens?

I submitted the query “running with a bucket full of water splash” to Google and
obtained more than 16 million search results (figure 5.8). Consequently, it’s reasonable
to assume that ChatGPT had access to ample information to deduce the fundamental
outcomes associated with running while carrying a bucket full of water (figure 5.9).

Figure 5.8 Illustration of information readily available in Google (16.2 million results)

The reply is self-explanatory. Although the algorithm appeared to recognize the con-
cept of sloshing, its emphasis on gravity and acceleration was completely unrelated,
making it evident that the response was computer generated. Substituting the term
“bucketful” with “glass” only made the response appear even more bizarre (figure 5.10).
Once more, the algorithm’s reply remains disconnected from the subject, unclear,
and devoid of logical coherence. Human understanding encompasses a substantial
nonlinguistic component, which AI struggles to encompass, given the vast complexity
5.6 AI does not understand 69

Figure 5.9 AI returns results unrelated to the query, making it evident that the response was computer-
generated.

Figure 5.10 AI returns an unclear and logically incoherent response.

of reality and its myriad subtleties. In our human interactions, we possess an under-
standing of our intended message, carefully selecting words in response to the context
and considering the potential consequences and reactions. We convey not only the
70 CHAPTER 5 Generative AI and large language models

dictionary definitions of our words but also imply deeper nuances and infer meanings
beyond their literal interpretations.

5.7 Benefits of LLMs


Generative AI stands as a remarkable technological advancement with the potential to
bring about a transformative effect across a multitude of industries. Its far-reaching
implications signify a significant milestone in the evolution of AI algorithms, offering
the promise of enhanced productivity and innovation in various domains. One of the
most compelling aspects of generative AI is its capacity to revolutionize content cre-
ation. This technology empowers creative professionals, such as designers, writers,
and artists, by enabling the generation of highly realistic images, videos, and text. By
automating the creative process, it streamlines workflows, potentially freeing up valu-
able time for these creators to focus on refining their ideas rather than grappling with
the complexity of content generation. Furthermore, generative AI is transforming
natural language understanding and generation. Chatbots and virtual assistants pow-
ered by these models can have more context-aware and human-like conversations,
improving customer support and user interaction across various industries.
Education is another domain where generative AI has the potential to have a sub-
stantial effect. Students can benefit from quick access to synthesized information on
various subjects, significantly reducing the time needed to acquire knowledge. For
instance, asking questions about history or geography can yield summarized informa-
tion drawn from numerous sources.
In the field of computer programming, generative AI could potentially eliminate
the need for extensive reference manuals. These systems can use their extensive
knowledge base to swiftly generate code solutions, a process that might take a junior
programmer hours of trial and error. By learning from specialized resources like
StackOverflow, LLMs can become invaluable tools for developers seeking to solve
complex coding challenges efficiently.
Moreover, in the business of customer support, generative AI can be harnessed
to provide procedural responses to common user inquiries. These responses can be
derived from extensive training with software documentation, ensuring consistency and
efficiency in addressing user needs. In conclusion, generative AI represents a paradigm
shift in how we approach creativity, communication, education, and problem-solving.

5.8 LLM limits


While LLMs exhibit remarkable capabilities in pattern recognition, they also exhibit
certain limitations:
 Dependence on input quality—The quality of LLM-generated outputs is heavily
reliant on the quality of the input data. Concerns about the “garbage-in, garbage-
out” (GIGO) principle persist, as large datasets may lack diversity, and online
data often contains negative or false information. Consequently, there is a risk
that biased or erroneous training data can influence the LLM’s outputs.
5.9 Generative AI and intellectual property 71

 Computational intensity—LLMs demand significant computational resources for


both training and operation due to their reliance on vast datasets and substan-
tial computing power.
 Hallucinations and incoherent text —LLMs can generate text that lacks coherence
and context, often producing content that doesn’t make sense due to their lim-
ited understanding of human language.
 Repetition and lack of creativity—LLM-generated content can be repetitive and
lack creativity, resulting in outputs that feel formulaic or uninspired.
 Lack of interpretability—Since LLMs are based on deep learning, a technology
that doesn’t provide insights into decision-making processes or output genera-
tion, their results are challenging to interpret or explain.
 Security concerns—LLMs can be harnessed to create harmful content, such as
deepfakes and disinformation, posing significant security risks.
 Limited learning capacity—LLMs have a constrained learning capacity because
they do not possess inherent expertise. As demonstrated in chapter 3, many
domains, including medicine, involve implicit knowledge that isn’t readily cap-
tured by LLMs, highlighting the limits of their learning capabilities.

5.9 Generative AI and intellectual property


Concerns have arisen among artists, authors, and news publishers regarding the uti-
lization of their intellectual property in the training of generative AI (figure 5.11).

Figure 5.11 ChatGPT’s answer to a query about the source of the data it uses raises concerns about
IP rights and accuracy.
72 CHAPTER 5 Generative AI and large language models

On July 7, 2023, ChatGPT4 acknowledged that its training procedure incorporated an


extensive corpus of text data sourced from diverse internet outlets, encompassing
books, articles, websites, and assorted written content.
Robert Thomson, the CEO of News Corp, issued a warning regarding the potential
jeopardy to intellectual property rights. He stated [13]:

To begin with, our content is being collected, scraped, and otherwise absorbed for the
purpose of training AI systems. Secondly, individual stories may emerge prominently in
specific searches. And, thirdly, our content could be synthesized and presented as original
when, in reality, it is an extraction of editorial essence.

The concerns surrounding intellectual property are well-founded, as some AI compa-


nies derive their value from the utilization and repurposing of creative works pro-
duced by countless individuals. Without access to such content, the existence of
generative AI models like ChatGPT might be doubtful. It presents a paradox that
companies reusing the contributions of artists, advertisers, and writers could inadver-
tently jeopardize the livelihoods of these very creators.

5.10 Risks of generative AI


Generative AI programs pose a significant risk due to their propensity for fabricating
information. A recent case reported by the BBC highlights this concern, where a New
York lawyer is facing a lawsuit for utilizing ChatGPT in his legal research. The lawyer’s
firm submitted a brief referencing various past court cases, six of which were later
identified as fictitious, complete with fabricated quotes and citations. ChatGPT gener-
ated this false information. Attached screenshots from the conversation between the
lawyer and ChatGPT reveal the lawyer inquiring, “Is Varghese a real case?” to which
ChatGPT affirmed, and when pressed for its source, ChatGPT reiterated that the case
was genuine and accessible on legal databases like LexisNexis and Westlaw. The authen-
ticity of the other five made-up cases was similarly asserted. The lawyer informed the
court that he was “unaware that its content could be false” but now faces potential dis-
ciplinary action from the judge.
A second instance of this risk was reported by The Wall Street Journal [14] regarding
a chatbot designed to assist individuals with eating disorders like anorexia. Following
an update with generative AI, the bot started advocating for dieting and calorie reduc-
tion. Clearly, such recommendations could be highly detrimental to individuals strug-
gling with eating disorders, prompting the National Eating Disorders Association to
quickly remove the bot from its platform.
The present inability of generative AI to reason or comprehend can lead to
adverse outcomes in various ways. For instance, despite incorporating explicit safety
protocols and impressive generative capabilities, ChatGPT was manipulated into dis-
playing instructions for constructing explosive devices, a feature learned from its
training data [15]. While the ChatGPT team swiftly addressed this issue by implement-
ing safeguards, it’s essential to acknowledge the resourcefulness of ill-intentioned
5.10 Risks of generative AI 73

individuals in devising new methods to exploit such programs, akin to the sophistica-
tion demonstrated by certain cybercriminals who continually innovate hacking tech-
niques and fraudulent schemes. Given ChatGPT’s inability to discern that disseminating
instructions for creating a harmful device contradicts its safety mandate, it may be
prudent to reassess our optimism regarding some of its other achievements.
There is also the risk of individuals unquestioningly accepting all generative AI
outputs at face value. In his 1976 book Computer Power and Human Reason [16], Joseph
Weizenbaum, the creator of the first chatbot, ELIZA in 1966 emphasized this concern:

ELIZA created the most remarkable illusion of having understood in the minds of the
many people who conversed with it. People who knew very well that they were conversing
with a machine soon forgot that fact, just as theatergoers, in the grip of suspended
disbelief, soon forget that the action they are witnessing is not “real.”

Weizenbaum further pointed out that individuals with limited or no knowledge of


computers tended to be particularly susceptible to this illusion. They frequently
insisted on engaging with the system in private, and despite any objections from the
program’s creator, they would firmly maintain that they had been understood.
Increasingly, both institutions and individuals are becoming reliant on automated
systems and AI in their daily operations. It’s common for people to unquestionably
accept the results generated by their computers, assuming that AI will always provide
truthful information. However, our world is plagued by the proliferation of fake news,
and the rise of generative AI technology poses a serious concern. It has the potential
to flood the internet with text, images, and videos that are nearly indistinguishable
from genuine content, making it difficult to discern what is real and what is fake. The
dangers extend to the manipulation of public opinion through propaganda, which
often relies on repeated messaging.
Consider the catastrophic consequences that could arise from the fusion of disin-
formation and AI-generated content. Imagine someone using generative AI to fabri-
cate a video depicting a group of individuals burning a sacred book, potentially
inciting extreme reactions from fanatical groups. Furthermore, there have been
instances where LLMs have provided fabricated responses and inappropriate sugges-
tions, raising concerns about their use in critical applications such as emergency
response or law enforcement. Relying on a system that consistently generates nonsen-
sical answers is clearly untenable. Imagine employing such a system for medical rec-
ommendations; the risks are evident. Another worrisome aspect is the possibility that
students may turn to generative AI tools for their academic assignments. Since these
programs can only regurgitate information that has already been conceived, written,
or created by humans, there is a legitimate concern that we might foster a generation
of students who mindlessly echo “Chat GPT told me so” in unison.
An article in the British newspaper The Guardian, titled “The Stupidity of AI” [17],
succinctly summarizes the risks associated with placing unwavering trust in this type
of technology:
74 CHAPTER 5 Generative AI and large language models

The belief in this kind of AI as actually knowledgeable or meaningful is actively


dangerous. It risks poisoning the well of collective thought, and of our ability to think at
all. If, as is being proposed by technology companies, the results of ChatGPT queries will
be provided as answers to those seeking knowledge online, and if, as has been proposed by
some commentators, ChatGPT is used in the classroom as a teaching aide, then its
hallucinations will enter the permanent record, effectively coming between us and more
legitimate, testable sources of information, until the line between the two is so blurred as
to be invisible.

5.11 LLMs and the Illusion of Understanding


LLM technology stands as a testament to the ever-expanding horizons of AI, consis-
tently pushing the boundaries of what was once thought to be exclusive to human
capabilities. Nevertheless, the current fervor surrounding LLMs echoes the excitement
witnessed in 2011 when IBM’s Watson outperformed two of Jeopardy’s top champions.
At that time, Watson gained acclaim for its adept handling of complex questions and
optimal answer-finding abilities [18]. Bold declarations hailed Watson as a game-
changer, with assertions that it could revolutionize information-rich sectors, particu-
larly those inundated with vast volumes of unstructured and semi-structured data,
such as healthcare, banking, insurance, and telecommunications. Have these predic-
tions come to fruition? Not entirely, and similar outcomes are expected for numerous
ambitious predictions regarding LLMs.
Much like other AI programs, LLMs essentially execute a predetermined set of
logical operations. Earlier iterations of neural networks and algorithms, like back-
propagation, were characterized by limited layers, parameters, and data-processing
capabilities. Present-day deep learning algorithms rely on supercomputers to train on
extensive datasets, yet the core outcome remains fairly consistent: they discern pat-
terns without genuine reasoning or understanding. To draw a comparison, consider
the evolution of pocket calculators over the past half-century. The initial models could
solely perform basic arithmetic operations like addition, subtraction, multiplication,
and division. However, modern calculators rely on enhanced memory and powerful
hardware to perform complex functions such as logarithms, trigonometric opera-
tions, and hyperbolic functions. Some can even generate colorful 3D surface graphs.
It is well-established that the English language contains dictionaries with fewer
than 500,000 entries, and most English speakers employ only a fraction of those
words in their daily communication. Consequently, achieving a competent com-
mand of English seems to be a relatively modest objective, given the millions who
achieve it annually. Additionally, human-generated text exhibits a high degree of
correlation, making it easily predictable. The patterns and statistical relationships
are inherent in the data, and individuals can accurately anticipate sentence comple-
tions based on these cues. In stark contrast, LLMs function as advanced predictive
text systems, analyzing preceding words to generate the most probable following
word. While this automated process might appear to produce intelligent outputs, it
is essentially an artificial imitation.
Summary 75

Human communication relies on innate knowledge encompassing space, time,


and various fundamental aspects of the world. For instance, when someone types “The
sky is blue,” we comprehend it due to our familiarity with the sensations and meanings
associated with the words sky and blue. In contrast, LLMs glean their understanding
from conversations, comments, books, and websites, where the co-occurrence of cer-
tain words is observed. The essence of human text, which comprises nuanced context,
eludes deep learning algorithms, regardless of their extensive parameter count and
impressive pattern recognition capabilities. Generative AI lacks the capacity to intro-
duce entirely novel concepts or ideas; it merely rearranges existing elements.
In my perspective, embracing these systems carries the risk of transitioning from a
world where knowledge is cumulative and rigorously validated to one where knowl-
edge is approximated and challenging to verify. I believe that LLMs serve as a striking
example of the “AI illusions” alluded to in the title of this book.

Summary
 Generative AI relies on vast datasets and substantial computing resources.
 LLMs like ChatGPT often produce repetitive text and can generate content
that isn’t accurate, a phenomenon known as hallucination.
 Generative AI programs are rooted in deep learning, lacking the capability to
explain their output-generation process.
 LLMs can be manipulated to generate harmful content, including deepfakes
and various forms of disinformation.
 AI communication is notably limited compared to human interaction, as AI
lacks a genuine understanding of text, audio, or images.
 Human communication encompasses more than words; it relies heavily on con-
text and concepts such as metaphor, analogy, and sarcasm, which are challeng-
ing for AI to grasp.
 While generative AI marks significant progress, it is still subject to numerous
limitations and associated risks.
 Like other AI algorithms, the quality of generative AI output is heavily influ-
enced by the quality of the input data and prompts.
 Despite advancements, AI lacks the human ability to generalize and adapt to
diverse contexts effectively.
Human vs. machine

This chapter covers


 An overview of biological brains
 Considerations about human thoughts and
memories
 Reflections about common sense, imagination,
intuition, and creativity
 Image reasoning

A year spent in artificial intelligence is enough to make one believe in God.


—Alan J. Perlis

Can machines match or surpass human creativity? In this chapter, we will explain
that even if AI systems have shown impressive prowess in pattern recognition and
data analysis, the essence of human ingenuity remains an enigma that is hard to
replicate with algorithms. We will examine a few facets of human cognition to high-
light what it truly means to be imaginative, intuitive, curious, and creative, demon-
strating that while current AI can considerably augment our abilities, it can’t
emulate many characteristics that are fundamental to the human brain’s capacity
to imagine the unknown, to synthesize the abstract, and to derive inspiration from

76
6.1 The human brain 77

our thoughts and emotions. We will also demonstrate that true understanding is a pre-
requisite for vision, shedding light on the current constraints of AI algorithms in recog-
nizing objects and their considerable distance from achieving a human-like perception
of objects and scenes.

6.1 The human brain


Our brain, the control center that orchestrates everything we do even as we sleep, is
the most complex piece of organized matter in the known universe. According to the
excellent article “5 Unsolved Mysteries about the Brain” [1] by science writer Rachel
Tompa, we don’t even understand the brain of a worm.
In an article published by Science Magazine [2], computational neuroscientist Chris-
tof Koch highlighted what little progress we are making in understanding the human
brain due to its complexity: “Basic questions about cortical circuitry posed by future
Nobel laureates David Hubel and Torsten Wiesel in a celebrated publication in 1962
remain unanswered 50 years later.” I heard the same sentiment from neurologists, yet
you will find AI experts who pretend to understand how the brain works.

6.1.1 Thoughts
What does it mean to express our thoughts? The inner workings of the human brain
remain a profound mystery, and we have yet to fully grasp the nature of thoughts or
how we extract meaning from our sensory experiences. As humans, we engage in
thinking when we encounter questions without immediate answers or when we rely on
our knowledge to formulate responses. For instance, when asked to multiply 5 by 4,
the answer 20 comes effortlessly and instantaneously. Similarly, spelling our own name
is an automatic response. However, when faced with more complex tasks like calculat-
ing the square root of 529 or spelling challenging words like onomatopoeia, we often
need to engage in deliberate thought. It seems that we turn to thinking when we must
adapt to unfamiliar situations.
The human body is an intricate composition of approximately 30 trillion cells,
each operating as a self-contained, perceptive, responsive, and ingenious entity, all
harmoniously collaborating with one another. These cellular components concur-
rently execute thousands of functions, including transporting oxygen, circulating
blood, digesting food, and synthesizing proteins. Our sensory organs constantly trans-
mit information to the brain, providing us with the sensations of sight, sound, smell,
taste, and touch. The brain processes this information, allowing us to comprehend
and react appropriately to our surroundings.
The human brain comprises around 100 billion neurons interconnected across
various functional structures. Neurons employ electrical impulses and chemical sig-
nals to transmit information both within the brain and between the brain and the
broader nervous system. The dynamic interplay and communication among neurons
make each individual unique in their cognitive, emotional, and behavioral responses.
78 CHAPTER 6 Human vs. machine

Neurons fall into three main categories: sensory neurons, motor neurons, and
interneurons. Sensory neurons convey data from our sensory organs, such as the eyes
and ears, to the brain. Motor neurons, on the other hand, govern muscle activity by
relaying instructions from the brain to muscles. All remaining neuron types are collec-
tively referred to as interneurons. Within these three classes, numerous subclasses
exist, each specializing in specific types of message transmission. Depending on their
location and function, neurons from one subclass can occasionally assume the roles of
others by transmitting and receiving specific neurotransmitters.
Neurons themselves consist of three essential components: the cell body, an elon-
gated structure called the axon, and a network of extensions known as dendrites (fig-
ure 6.1) [3]. The cell body, housing the nucleus, serves as the neuron’s command
center, controlling its functions and containing its genetic material. The axon, resem-
bling a lengthy tail, primarily carries electrochemical impulses away from the cell
body, facilitating communication with other neurons. Dendrites, with their branching
structures, receive incoming signals from neighboring neurons. Neurons communi-
cate through the transmission of neurotransmitters across specialized junctions
known as synapses.

Dendrite
Axon terminal
Node of
Ranvier
Cell body

Axon Schwann cell Figure 6.1 Image of a typical


Myelin sheath neuron (courtesy of Wikimedia
Nucleus Commons, CC BY-SA 3.0)

Each axon terminal contains numerous vesicles, each housing a substantial quantity of
neurotransmitter molecules. A single neuron has the capacity to establish thousands
of connections with other neurons, resulting in an estimated 100 trillion synaptic con-
nections in the adult human brain. These connections are not static; they exhibit the
ability to change over time. Additionally, the more signals exchanged between two
neurons, the stronger their connection becomes. This dynamic feature allows the
human brain to reconfigure its physical structure in response to experiences.
When comparing the sophisticated learning mechanisms employed by biological
neural networks with the simplistic architectures and learning methods of artificial
neural networks, it’s apparent that there is a stark contrast. Artificial neural networks
typically adopt minimalistic topologies and rely on weight modifications for learning,
which pales in comparison to the complexity of biological neural networks.
6.1 The human brain 79

6.1.2 Memory
Our memories define who we are, but what are they, and how are they stored and
retrieved? This subject has puzzled researchers for centuries. We know that memories
aren’t physical objects stored within our bodies, but what do we know beyond that? We
imagine that our brain makes some kind of record of the experiences we’ve had, at
least the important ones.
If our brain has a file library containing the things we’ve learned, our thoughts,
and our beliefs, how does the programming work? What is the file format? Is this even
the appropriate analogy to use? How does our brain distinguish and classify the multi-
dimensional differences and similarities between the myriad things we think about,
and how does it keep track of the interconnections between them all?
A computer “recalls” something by accessing binary data stored in transistors or
some other electronic medium. It translates the 1s and 0s from the storage device into
machine instructions that display symbols on a screen or that make sounds come out
of a speaker. Compare this to human experience. A faint sound or smell can bring
back vivid memories of the first time we heard our favorite song or of the vacation we
were on when we tried a special dish.
I still remember where I was and what I was doing when I heard the song “Imag-
ine” by John Lennon for the first time. In our mind, we visualize the scenery, hear the
ambient sounds, and smell the fragrances as if our eyes, ears, and noses are time
machines. We revisit the emotions and piece together parts of conversations that we
had, and all of this can happen automatically within milliseconds.
While we obviously understand how computer memory works, we are far from a
complete understanding of our own, and although the majority of brain functioning
remains mysterious, we have made some progress. In 1953, Henry Molaison lost his
capacity to make new long-term memories following surgery to relieve his epilepsy.
The surgery had removed half of his hippocampus, and this led doctors to believe that
the hippocampus was somehow involved in the formation of memory, a hypothesis
that has since been verified.
The misfortune experienced by individuals like Molaison and others has contrib-
uted to the discovery of distinct substructures within the brain, each serving specific
purposes. Notable among these are the thalamus and hypothalamus, which play roles
in coordinating movement; the pituitary and pineal glands, responsible for producing
and regulating various hormones; the reticular network, associated with consciousness
and attention; the limbic system, involved in processing drives and emotions; and the
brainstem, housing multiple substructures controlling automatic processes [4].
In 1970, Dr. Eric Kandel was awarded the Nobel Prize in Medicine for his research
on the simple nervous system of sea slugs. His experiments illuminated the molecular
mechanisms underlying memory and revealed that learning involves physical changes
in the brain’s structure. He uncovered that as the slugs learned, chemical signals
modified the network of synapses connecting their cells. These changes in electro-
chemical pathways used by the cells to transmit and receive messages were linked to
80 CHAPTER 6 Human vs. machine

the formation of new memories. Today, we can observe how a cell nucleus generates
mRNA that instructs synapses to establish new connections, and we now understand
that these changes occur within our own brains when we learn or remember.

6.1.3 The subconscious mind


Our conscious mind serves as the fusion of imagination and emotion, perpetually in
search of novelty. It is the wellspring of fresh ideas and forms the bedrock of what we
term “human intelligence.”
In tandem with our brain and nervous system, our subconscious mind takes the
reins, orchestrating our behaviors and molding our choices. This subconscious mind
operates continually, working as a vigilant autopilot, regulating everything from our
breath and body temperature to our immune system. It operates independently of our
rational, logical mind but seems to draw upon our beliefs and past experiences.
Our subconscious exerts considerable influence over our opinions, beliefs, and
judgments. Consider how a child learns behavioral norms through observation of
their surroundings and the people therein. These deeply ingrained values may guide
our decisions in adulthood, even when we are not consciously aware of them, and
challenging them can evoke intense emotions, such as guilt. Our subconscious pro-
gramming can also cultivate hidden biases, leading us to judge others who did not
experience the same conditioning.
This complexity contrasts sharply with machine models of intelligence, where
everything is inherently explicit. Data is either stored or not stored, and an algorithm
either references it or does not.
The remarkable power of our subconscious mind becomes evident when observing
a baby’s journey to walking. Starting with crawling, they experiment and discover a
pattern of limb movements that propel them forward. Gradually, they learn to stand
and shift their weight, eventually mastering the art of walking. This formula becomes
embedded in their subconscious mind within weeks, enabling them to walk effort-
lessly for the rest of their life. Robotics, despite the vast investments, still cannot repli-
cate a toddler’s proficiency.
The prowess of our subconscious is equally manifest when driving a car. Initially, our
conscious mind grapples with the difficulty of learning this complex task, but with expe-
rience, it seems as if driving requires no conscious effort at all. We often complete a
journey with no recollection of the details as our mental autopilot navigates traffic,
avoids obstacles, and adjusts to conditions. Surprisingly, our subconscious even manages
our speed, as we may find ourselves unconsciously matching the road’s requirements.
The conscious mind occasionally gets involved to note significant changes in the envi-
ronment. Our subconscious mind operates like an adaptive autopilot.
6.1 The human brain 81

6.1.4 Common sense


Common sense is judgment without reflection, shared by an entire class, an entire nation,
or the entire human race.
—Giambattista Vico

Common sense, the product of millions of years of human evolution and communica-
tion, is an extensive library of pragmatic insights derived from shared human experi-
ences. Everything we do in our daily lives uses common sense, which allows us to
understand the world and act effectively in it. This knowledge does not require teach-
ing, as we expect that every human acquires it automatically through their life experi-
ence. The following 12 examples demonstrate what most people would consider to be
common sense:
1 A book in a library or in your hand belongs there, but a book inside a micro-
wave does not make sense.
2 Rain falls vertically and makes us wet.
3 A glass mug containing water will likely break if dropped on cement, but even if
it doesn’t, the water in it will spill.
4 Elephants don’t fly.
5 My mother and father are older than I am.
6 Driving under the influence of alcohol is a dangerous act.
7 Honey tastes sweet and comes from bees.
8 Animals don’t drive cars.
9 Salt is not sugar, even though they look the same.
10 In the dark, physical appearance is unimportant.
11 If you know that I have a car, you could infer that I could give you a ride.
12 If you learn that my car won’t start, you no longer infer that you can get a ride.
Human beings often express common sense abstractly through phrases or combina-
tions of words. For instance, when we use the phrase “boiling the ocean,” we are convey-
ing that a task is unreasonably large. AI systems, on the other hand, struggle with such
abstractions. They may recognize that the ocean contains water and that water can be
boiled, leading them to interpret the phrase literally, missing the intended meaning.
Our common sense also involves recognizing relationships between concepts,
implications, and associations. When we see clouds and the sky darken, we anticipate
rain and understand its effect on our picnic plans. We derive meaning from words,
gestures, symbols, and colors, all depending on the context and various cues. For
instance, in the United States, the terms “red states” and “blue states” in a political
news article are understood to refer to states with majority Republican or Democrat
voters, not describing their physical colors.
Common sense serves as a crucial guide in human creativity by directing our
efforts away from impractical pursuits and towards productive and effective projects.
82 CHAPTER 6 Human vs. machine

The diversity and countless scenarios of common sense make it nearly impossible to
catalog or program them on a computer. The potential combinations involving
objects, actions, individuals, and environmental factors are virtually limitless. Conse-
quently, replicating common sense in a computer remains an immense challenge, and
true artificial intelligence cannot be achieved without a foundation in common sense
and comprehension.

6.1.5 Curiosity
We keep moving forward, opening up new doors and doing new things, because we’re
curious and curiosity keeps leading us down new paths.
—Walt Disney

Curiosity, the driver of thought that pervades our mental lives, is a critical force
behind the progress of human civilization. It sparks our desire to investigate and dis-
cover, explore the unknown, and innovate and learn. The poem “I Keep Six Honest
Serving Men” by Rudyard Kipling encapsulates curiosity in an imaginative way:

I keep six honest serving-men


(They taught me all I knew);
Their names are What and Why and When And How and Where and Who.
I send them over land and sea,
I send them east and west;
But after they have worked for me,
I give them all a rest.

Human curiosity has consistently driven us beyond mere survival needs, often resem-
bling a primal instinct akin to hunger or thirst. It is this driving force that has led us to
invest time and energy in exploring our world. Whether it’s the curiosity about unex-
plored oceans or new lands, it has inspired us to build ships and embark on journeys
of discovery.
Curiosity is not limited to exploration; it plays an indispensable role in every field.
For example, it enhances customer service by enabling us to better understand and
address individual needs. In healthcare, it improves the quality of treatment as doc-
tors who are more curious about their patients’ conditions will more likely offer more
tailored and personalized care.
Dr. Faith Fitzgerald underscores the significance of curiosity in healthcare in her
essay titled “Curiosity” [5]. In it, she shares a passage from the physician and author
Dr. Erich Loewy, emphasizing how curiosity is a driving force in the medical field:

Curiosity, the primal “wonderment” that stimulates exploration, engages both imagination
(conceiving the alternative explanations of new phenomena) and intelligence (mapping
out the best way to delineate which explanation is likeliest). Both imagination and
intelligence are integral to humanities, science, and the synthesis of the two, which is
clinical medicine.
6.1 The human brain 83

It’s safe to say that most of the scientific advancements that have significantly shaped
human progress can be attributed to curiosity. Consider, for example, the case of Ger-
man physicist Wilhelm Röntgen in 1895. While conducting experiments with a
Crookes tube to study electrical discharge, Röntgen made an intriguing observation:
his equipment was producing an enigmatic glow on a chemically coated screen situ-
ated across the room. Inspired by Röntgen’s work, Frenchman Henri Becquerel
decided to investigate some unusual rocks in his collection that emitted an eerie radi-
ance in the dark. This curiosity-driven exploration ultimately led to the discovery of
radioactivity [6], a foundational concept in modern science that underlies technolo-
gies like X-rays, smoke detectors, and nuclear power.
Richard Feynman, a renowned figure in late 20th-century physics, shared the 1965
Nobel Prize in Physics for his groundbreaking work on quantum electrodynamics,
which had profound implications for our understanding of elementary particles.
When asked what primarily motivates scientific discovery, he responded, “It has to do
with curiosity. It has to do with people wondering what makes something do some-
thing” [7]. In his book Six Easy Pieces [8], Feynman emphasized that curiosity demands
that we ask questions:

Is the sand other than the rocks? That is, is the sand perhaps nothing but a great number
of very tiny stones? Is the moon a great rock? If we understood rocks, would we also
understand the sand and the moon?

Much like our other innate drives, curiosity acts as the stimulus behind human inno-
vation, urging us to venture into uncharted territories. It is tied to our emotions, evok-
ing wonder, excitement, and an inherent desire to unearth the new and unknown.
Curiosity propels us to take risks in pursuit of rewards, igniting a sense of exhilaration.
The fulfillment of curiosity triggers the release of dopamine and other feel-good
chemicals in our brain [9]. In contrast, artificial intelligence relies solely on human-
programmed algorithms. Machines lack the capacity for motivation and satisfaction,
and certainly, they cannot experience curiosity.

6.1.6 Imagination
Logic will get you from A to B. Imagination will take you everywhere.
—Albert Einstein

Imagination, the wellspring of new ideas and inventions, arises from the depths of
human emotions, expertise, life experiences, and between thoughts, feelings, and mem-
ories. It serves as the catalyst for crafting poetry, composing music, unraveling com-
plex problems, and conceiving groundbreaking innovations. Imagination also grants
us the ability to extrapolate future events from present circumstances.
Consider this scenario: you find yourself on the 10th floor of an office building,
and you are suddenly tasked with the urgent mission of delivering a brimming
bucket of water to the reception area on the first floor, and the elevator is out of
84 CHAPTER 6 Human vs. machine

order, necessitating the use of stairs. Although this situation is likely novel, and no one
may have ever described such a predicament to you, your imagination swiftly springs
into action.
In this imaginative exercise, you might deduce that the urgency of the task is
linked to a significant event in the reception area, leading you to create and evaluate
various scenarios. As you visualize yourself dashing down the stairs with the sloshing
bucket, you anticipate the inevitable spillage, the prospect of dampened clothing, and
the need for cautious steps to avoid slipping.
This is the essence of imagination at work, an intellectual faculty that fuels innova-
tion and allows us to explore concepts and entities that exist nowhere except in our
thoughts. Think of Mozart, who famously invented entire symphonies within his mind
without real instruments. Likewise, playwrights envision scenes teeming with multiple
performers, their actions and dialogues, their precise positions on the stage, the
accompanying sound effects, and the interplay of events.
Imagination is the engine of human creativity. Take, for instance, Johannes Guten-
berg, who is known for imagining a screw press with movable type in his mind’s eye.
This vision ultimately led to the creation of the first printing press, a machine that
would go down in history as one of the most influential inventions of all time. In his
paper titled “Nikola Tesla: Electricity Today Is Generated, Transmitted, and Converted
to Mechanical Power by Means of His Inventions” [10], Kenneth Swezey admired
Tesla’s exceptional imagination and emphasized the profound and positive effect of
Tesla’s innovations:

From early childhood, Tesla could visualize so clearly that he often had difficulty in
distinguishing real objects from their counterparts in his imagination. This ability, often
annoying and even frightening in ordinary life, Tesla used advantageously in
inventing. By means of it, he could, for instance, assemble and reassemble mechanical
parts, alter sizes, weights, and materials entirely in his mind, and end up by building a
model that would generally work exactly as he had conceived it.

The same paper highlights Tesla’s imaginative prowess by describing a breakthrough


that paved the way for modern electric motors and generators:

Late one afternoon in February 1882, the answer came. Tesla was walking with a friend,
Szigety, through the City Park of Budapest, reciting stanzas from Goethe’s Faust, which
he knew by heart. Suddenly the solution he had been seeking flashed through his mind.
He saw clearly an iron rotor spinning rapidly in an electric whirlwind–a rotating
magnetic field produced by the interaction of two alternating currents out of step with
each other. With a stick, Tesla drew diagrams on the sand, explaining in detail to Szigety
the principle of the induction motor Tesla was to patent in America six years later.

Our imagination is a fusion of thoughts and emotions that lead to creativity and inno-
vation. In contrast to machines, our cognitive processes are not confined by rigid
logic. How can an algorithm, designed to detect patterns in data, replicate the limit-
less nature of human imagination?
6.1 The human brain 85

6.1.7 Creativity
Creativity is seeing what others see and thinking what no one else ever thought.
—Albert Einstein

Creativity springs forth from our capacity to infer connections between seemingly
unrelated concepts. It relies on the power of imagination to generate novel ideas or
products of value. This creative force can manifest in various ways, from inventing
something entirely new to combining, adapting, or enhancing existing elements. Cre-
ativity defies the confines of pure logic. It begins with imagination, flourishes through
intuition, and takes shape through reasoning. There is no formula or method for
becoming creative. Creativity allows us to adapt in real time when confronted with unex-
pected events and challenges. As we all know, creativity is the mother of invention.
A classic illustration of creativity can be found in the story of Archimedes, charged
by his king with determining the volume of a crown. As he immersed himself in a
bath, a sudden flash of insight struck him: the water displaced by his body equaled the
volume of his body. Realizing this principle could be applied to measure the crown’s
volume, he is said to have shouted “Eureka!” which signifies “I have found it!”
Another example comes from John Steinbeck’s remarkable book Travels with Char-
ley in Search of America [11], where he describes how he ingeniously devised an efficient
method for handling laundry while journeying through the countryside:

I invented a method for washing clothes which you will go a long way to better. It came
about this way. I had a large plastic garbage bucket with cover and bail. Since the normal
movement of the truck tipped it over, I tethered it by a length of strong elastic rope of
cotton-covered rubber to the clothes pole in my little closet, where it could jiggle to its
heart’s content without spilling. After a day of this, I opened it to dispose of tie stuff at a
roadside garbage can and found the most thoroughly mixed and kneaded garbage I have
ever seen. I suppose all great inventions spring from some such experience. The next
morning, I washed the plastic bucket, put in two shirts, underwear, and socks, added hot
water and detergent, and hung it by its rubber rope to the clothes pole, where it jigged and
danced crazily all day. That night I rinsed the clothes in a stream, and you’ve never seen
clothes so clean. Inside Rocinante [his pickup truck that he named after Don Quixote’s
horse], I strung a nylon line close to the window and hung the clothes to dry. From that
time on, my clothing was washed on one day of driving and dried on the next.

Creativity appears to possess a natural expansiveness, building upon one innovation


after another. Over time, incremental enhancements and ingenious modifications
have propelled us from the hot air balloon to the space shuttle.
A creative individual often embraces challenges to invent innovative solutions. In
contrast, current AI operates mechanically, processing data based on algorithms cre-
ated by humans. It lacks the ability to invent something entirely new. How could cre-
ativity emerge from a collection of mathematical formulas?
86 CHAPTER 6 Human vs. machine

6.1.8 Intuition
C’est par la logique qu’on démontre, c’est par l’intuition qu’on invente. We invent with
intuition; we prove with logic.
—Henri Poincaré

Intuition is our native ability to perceive, evaluate, and understand something without
relying on conscious reasoning. It acts as a subtle whisper, guiding us to explore unex-
plored territories, drawing from our past experiences and emotions to embrace
unconventional paths that can sometimes lead to groundbreaking discoveries. Intu-
ition transcends the boundaries of logic, making it challenging to explain.
Most innovations can, in part, be attributed to intuition. We are all familiar with
the legendary story of Isaac Newton and the falling apple. When he observed an apple
dropping from a tree, Newton had a profound intuition that there was something sig-
nificant behind this seemingly ordinary event. This led him to ponder the nature of
objects in motion, with his intuition suggesting that whatever caused the apple’s fall
might also be responsible for the moon’s motion. He further inferred that such a uni-
versal force might also govern the movements of the stars and planets. In his time, the
common belief was that angels pushed planets along their orbits.
In 1796, physician Edward Jenner had an intuition that led to the development of
the world’s first vaccine. At that time, smallpox was a rampant and deadly disease in
England. Jenner observed that those who regularly worked with cows often contracted
cowpox, a related but less severe disease that could be transmitted from cows to humans.
Curiously, those infected with cowpox appeared to be immune to smallpox. Jenner had
an intuition that cowpox conferred protection against smallpox, and through deliberate
and systematic exposure to cowpox, he demonstrated that it prevented the spread of
smallpox. This intuition, nearly a century before the discovery of viruses and their role
in diseases, helped combat a disease that plagued humanity for centuries.
In 1928, Scottish physician and scientist Alexander Fleming noticed a patch of
mold while examining a bacterial culture plate. He observed that the area around the
mold was devoid of bacteria. His intuition guided him to investigate further, leading
to his discovery of penicillin, a lifesaving discovery that has saved countless lives.
Similarly, the pacemaker, a medical lifesaver, was invented in 1956 thanks to engi-
neer and inventor Wilson Greatbatch’s intuition. While working on a heart-rhythm
recorder, he accidentally used the wrong size resistor and unexpectedly heard electri-
cal pulses emanating from the device. His intuition led him to believe he might have
found a way to mimic and stimulate a heartbeat, a belief that proved correct.
Artificial intelligence, being a computer program, primarily relies on logical rea-
soning and lacks the intuitive dimension. Replicating the complex and enigmatic pro-
cesses that trigger human intuition presents a formidable challenge for AI. It’s
challenging to imagine an algorithm capable of reproducing something as irrational
and unexplainable as intuition. How could a combination of algorithms and mathe-
matical formulas instill a gut feeling in a machine?
6.2 Human vision vs. computer vision 87

6.1.9 Analogy
The real achievement in discoveries . . . is seeing an analogy where no one saw one before.
—Arthur Koestler

An analogy is a comparison that draws upon corresponding parts or similarities. Anal-


ogy stimulates intuition and creativity, which makes it a powerful tool for human inno-
vation. We naturally draw analogies even between dissimilar objects. For instance, we
recognize the analogy between a car and a skateboard, both of which have wheels
facilitating movement from point A to point B, despite their fundamental differences.
Analogies also play a significant role in the professional world. Attorneys, for instance,
frequently refer to precedent in their arguments, employing reasoning through com-
parison to earlier cases. In their 1970 academic article titled “Some Speculation About
Artificial Intelligence and Legal Reasoning” [12], Bruce G. Buchanan and Thomas E.
Headrick underscore the crucial role of analogy in the legal profession:

A lawyer usually prefers to fashion arguments built from cases whose facts are similar to
the facts with which he is working. If he cannot find such cases, he resorts to finding cases
with facts that are analogous to his own in formulating an argument. One method of
finding an analogy is through generalization of a legal rule. Although in one case a rule
was applied to a specific set of facts, the language in which the court stated the rule may
deductively allow its application to a different set of facts. The rule may use words that
are capable of encompassing a variety of events, actions, or relationships. In our Boston
Ice example, for instance, the lawyer examined whether the case of water delivery would
hold for ice deliveries. In addition, analogies are found by generalizing on the factual
situations.

Human analogical reasoning taps into a vast reservoir of diverse experiences, allowing
us to infer connections between seemingly unrelated domains and apply their insights
to innovate and create fresh ideas. In contrast, current AI techniques face difficulties
when trying to emulate human-level analogical reasoning as they heavily rely on pre-
defined algorithms.

6.2 Human vision vs. computer vision


Sight is arguably the sense we rely on the most to navigate and understand the world
around us. Our visual perception begins with light from the environment, which
either originates from a light source or bounces off objects before entering our eyes
through the corneas. The eyes’ lenses focus this light onto the retinas, which are light-
sensitive membranes located at the back of our eyes. Retinal cells respond by transmit-
ting nerve signals to the brain, where they are rapidly processed into a representation
of our surroundings. This perceptual process enables us to perceive lightness and
darkness; distinguish colors, textures, and shapes; and identify distinct objects. Addi-
tionally, we can detect motion and estimate distances.
The physical process of capturing light and generating electrical signals is not par-
ticularly sophisticated, and many machines surpass us in this regard. We have devices
88 CHAPTER 6 Human vs. machine

capable of detecting heat and X-rays from distant celestial bodies and others that can
produce images of individual atoms. However, human vision goes beyond mere data
acquisition; it involves the complex processes of interpretation and understanding, an
area where machines currently lag far behind.
Typically, humans need only a few examples to develop a profound understanding
of something. When a child sees a cat for the first time, they instinctively create a men-
tal model that helps them recognize “cat-ness.” They use logic and common sense to
generalize their observations, unconsciously identifying various characteristics associ-
ated with cats, such as shapes, colors, textures, sounds, and behaviors. Even if the
child’s first encounter is with a small, white Siamese cat in a window, they will recog-
nize other cats of different colors, sizes, and breeds, even when in various activities.
They can identify cats in photographs, cartoons, and even when someone dresses as a
cat for Halloween. With more exposure, they may learn that cats have claws and sharp
teeth and can exhibit both sweet and temperamental behavior.
In contrast, deep learning algorithms typically require exposure to millions of
human-labeled examples before they can reliably identify a picture as “cat” or “not
cat.” These examples need to be in high-resolution images. The algorithms need to
see cats from multiple angles and engaged in various activities, capturing all relevant
shapes, sizes, colors, and textures. To a machine, the objects it “sees” are essentially
collections of pixels. Machine learning follows a hierarchical approach, initially recog-
nizing patterns related to shape, then identifying color and texture, and eventually
detecting finer features. Even when an AI system can reliably “see” and identify images
of cats, it lacks the depth of understanding a child achieves after their first encounter
with a cat. As discussed in our exploration of neural networks and deep learning in
chapter 3, what machines “learn” is essentially a set of numerical values between 0 and
1 (the network’s weights) that enable the algorithm to produce accurate outputs most
of the time. However, these numbers cannot teach a machine the meaning of an image
or the potential uses of an object captured in a photograph.

6.2.1 AI and COVID


In 2020, the world grappled with the emergence of the COVID-19 virus, a global
health crisis that claimed millions of lives. The need for technological solutions was
paramount, presenting AI with a unique opportunity to showcase its potential. With
years of media hype around machine vision, the idea of using AI to diagnose COVID
seemed promising. It appeared straightforward: train a machine learning algorithm
using labeled chest X-rays or other images as “infected” or “not infected,” and doctors
could receive nearly instant diagnoses after uploading a patient’s chest scan, eliminat-
ing the waiting time associated with traditional COVID tests.
However, the reality was disappointing. While machine learning has demonstrated
success in some medical imaging applications, none of the hundreds of models devel-
oped worldwide during the pandemic proved useful for COVID diagnosis. A compre-
hensive review of 2,212 research studies conducted by a team at Nature magazine,
6.2 Human vision vs. computer vision 89

titled “Common Pitfalls and Recommendations for Using Machine Learning to Detect
and Prognosticate for COVID-19 Using Chest Radiographs and CT Scans” [13], con-
cluded, “None of the models identified are of potential clinical use due to method-
ological flaws and/or underlying biases.”
The MIT Technology Review shared a similarly disappointing assessment, stating, “In
the end, many hundreds of predictive tools were developed. None of them made a
real difference, and some were potentially harmful” [14]. Laure Wynants, an epidemi-
ologist who led a review of studies for the British Medical Journal, expressed deep con-
cerns, suggesting that experimental diagnostic technology might have done more
harm than good. She remarked, “It’s shocking. . . . I went into it with some worries,
but this exceeded my fears” [15]. Regrettably, I share her sentiment.

6.2.2 Image reasoning


Without any apparent effort, we humans convert visual inputs in real time into mean-
ingful information that we trust so thoroughly that we regularly stake our lives on it. In
contrast, a 2017 experiment with a deep learning system showed how fragile com-
puter “vision” really is. After training the network to recognize a set of images, it was
found that 74 percent of the images could be modified in just 1 pixel in a way that had
a 99 percent chance of fooling the algorithm [16]. It’s interesting to note in passing
that each of our eyes has a literal blind spot, and although it represents a much more
significant gap in our field of vision than a single pixel, we are normally completely
oblivious to it, and it causes us no confusion. The spot on the back of each eye where
the retinal nerve attaches has no light-sensing cells, so the light from our environment
that gets focused by an eye’s lens on one of those spots doesn’t stimulate any signal.
The brain, however, represents our surroundings as a continuous, gapless image by
using context and data from the other eye to fill in the missing information.
AI’s trouble with object recognition is significant, but an even greater shortcoming
is its complete inability to associate meaning with the images it processes. Sight is not
just about recognizing objects in images, and picking up on patterns in pixels is a far
cry from understanding the significance of an object’s environment, the relationships
between objects, and their potential utility. A human’s natural ability to distinguish an
object from its background continues to elude AI, and the interpretive power of sight
aided by touch, sound, and smell will likely never be replicated by any AI algorithm.
AI also struggles to mimic incoherence detection. Without any training, we know
that a car does not belong in a microwave and that chairs do not fly. If we’re shown a
kitchen scene, we know not to expect a hot tub or a lawnmower. In contrast, AI
doesn’t recognize connections or relationships and, therefore, has no way to tell when
something isn’t right.
Our human visual system is also integrated with our logical reasoning and imagina-
tion. For example, through sight alone, a child could learn that bananas are a fruit
that starts out green, turns yellow, and later develops brown spots. They will learn that
bananas have no seeds, can be eaten with ice cream, and might be cooked. They will
90 CHAPTER 6 Human vs. machine

also understand that although bananas might be sliced into a bowl of oatmeal, they
ought not to be put in a bowl of chicken soup.
None of the ideas or associations that arise in a child’s mind about bananas could
be reproduced automatically with current AI. Nor would a computer be likely to rec-
ognize a meaningful difference between a banana and a banana-shaped piece of yel-
low plastic. A child, even just relying on sight, would infer that a plastic banana
wouldn’t turn brown and could not be peeled or eaten.
Abstract meaning and representation are also part of how we process visual input.
When we see numbers on a page, we associate them with quantities, or we understand
them by relative size or some other abstract feature. The number 9 and the number 6
are basically identical except for rotation by 180 degrees, yet we know without deliber-
ation that 9 represents a quantity larger than 6 and perhaps that each quantity can be
evenly divided by 3.
Our sight and visual processing also work seamlessly with our motor functions and
coordination. We can run across a field while watching a ball fly through the air and,
without taking measurements or performing any mathematical calculations, reach just
the right spot at just the right time to catch the ball before it hits the ground. Musicians
in an orchestra can perform complex and delicate motions in response to markings on
a page while adjusting what they do in response to the gestures of a conductor.
There are many aspects of human vision that machines will not be able to repro-
duce by virtue of their being machines. For example, the sight of a crying child can
evoke a feeling of sadness or sympathy. A long-lost friend might elicit surprise and joy.
Emotional responses and physical reactions to sensory input are obviously restricted
to living organisms, and no degree of mechanical simulation will recreate such fea-
tures of human sight.
Most effort in AI has been focused on replicating human intelligence without ana-
lyzing whether AI algorithms and the processes used by computers bear any relation
to human thinking. Our amazing brains are capable of things that we aren’t even
close to understanding, and, seen in this light, claims that we can reproduce such
things in computers should become much easier to dismiss. Furthermore, by letting
go of the idea that we should try to make our machines behave like brains, we can
actually pursue the full potential of our technology. Although the flight of birds might
have been an inspiration to those who imagined flying machines, we don’t aspire to
make planes that do exactly what birds do. In fact, our airborne technology far sur-
passes anything found in nature.
While AI has made amazing progress, it remains bound by its algorithms program-
ming and lacks the essential qualities to replicate the uniquely human characteristics
that define human curiosity, imagination, creativity, analogy, and intuition. The intrin-
sic connection between these aspects and many other emotional human capabilities is
a unique facet of our species.
Summary 91

Summary
 The human brain remains an enigmatic puzzle that continues to baffle medical
professionals and researchers.
 Although significant strides have been made in unveiling the neural underpin-
nings of cognition and consciousness, the precise mechanisms responsible for
the genesis of our thoughts remain a profound mystery.
 The human brain’s remarkable ability to memorize information and generalize
concepts is a testament to its astonishing adaptability.
 Beyond conscious awareness, the subconscious mind exerts a profound influ-
ence on our decisions and creative discoveries.
 Common sense is a fundamental aspect of human decision-making, serving as a
vital guide for navigating complex situations.
 Humans possess unique attributes that remain a formidable challenge for AI.
AI doesn’t turn data
into intelligence

This chapter covers


 The difference between data, information,
and intelligence
 The limited reusability of AI models
 The vulnerability of AI to unexpected data inputs

In this chapter, we will explain that regardless of how extensive the dataset or
advanced the algorithms, an AI program faces a substantial challenge in inferring
intelligence from data due to the semantic gap, as AI algorithms can process data
but struggle to grasp its deeper meanings. Even for simpler tasks, such as recogniz-
ing handwritten numbers, where AI models excel, they still lack the capability to
grasp the context surrounding these numbers. For instance, an AI system might
correctly identify a handwritten 9 as the numeric symbol 9, but it remains unable to
infer that this number more likely represents a child’s age on a birthday card.
The Farmer-Wolf-Goat-Cabbage riddle, previously discussed in chapter 4, serves
as a prime example illustrating the constraints of AI when confronted with prob-
lems that demand logical reasoning and strategic planning. Traditional machine
learning models primarily depend on statistical patterns and data-driven training,
rendering them unsuitable for tasks that necessitate deductive reasoning, forward

92
CHAPTER 7 AI doesn’t turn data into intelligence 93

planning, and a deep comprehension of specific constraints, as exemplified by this


simple problem. In this puzzle, the farmer must safely transport the wolf, goat, and
cabbage across a river, ensuring that neither the wolf eats the goat nor the goat con-
sumes the cabbage. While AI excels in domains such as natural language understand-
ing, image recognition, and game playing, these domains typically involve activities
based on pattern recognition and optimization, drawing from historical data. In con-
trast, solving the Farmer-Wolf-Goat-Cabbage riddle calls for symbolic reasoning or
symbolic AI techniques, reliant on explicit rules and logic to determine the correct
sequence of actions while adhering to predefined constraints. Real progress in AI will
require the development of innovative techniques, such as smart agents, that extend
beyond the confines of learning solely from data.
Let us elaborate further by referring to medical diagnosis, where many believe that
AI possesses the capability to acquire “intelligence” from data. However, AI systems
trained on data are insufficient for conducting accurate medical diagnoses. One fun-
damental limitation is the absence of medical understanding. AI programs trained on
data can identify statistical patterns and correlations, but they lack an inherent grasp
of the underlying medical concepts, disease mechanisms, and the complexity of the
human body. Medical diagnosis often demands an understanding of biology, pathol-
ogy, and clinical expertise that cannot be inferred from data.
In most cases, a visit to a doctor’s office, unless it’s an emergency, begins with an
information-sharing process. Questions are posed and answered during appointment
scheduling, intake forms are completed, health histories are updated, and sometimes
questionnaires are necessary. Before the patient even sees the doctor, a nurse often
records height, weight, temperature, and blood pressure, along with conducting pre-
liminary tests.
Once the doctor enters the examination room, they commence the process of
information filtration and reasoning. In addition to the patient’s records and the pre-
liminary data collected, the doctor takes into account the patient’s physical appear-
ance and demeanor. They conduct visual examinations of the patient’s eyes, ears,
nose, and throat; listen to the heartbeat; and palpate the abdomen. They engage the
patient in discussions about their symptoms, asking targeted questions to gather spe-
cific information. In some cases, they might perform specialized diagnostic proce-
dures or request blood or urine samples for laboratory tests.
In theory, nearly any detail from the patient’s life story or even their relatives’ sto-
ries could be relevant to a diagnosis. However, discerning what to consider and what
to disregard is a skill, and in most cases, the majority of available information is irrele-
vant to the immediate situation. If finding the right diagnosis sometimes feels like
finding a needle in a haystack, adding more data only increases the haystack’s size,
creating a hindrance rather than assistance.
Much of a doctor’s reasoning occurs instinctively and subconsciously, drawing
from experience with similar cases and familiarity with the patient. Over time, doctors
have developed the ability to deal with uncertainty and incomplete information. For
94 CHAPTER 7 AI doesn’t turn data into intelligence

instance, they must interpret the patient’s description of symptom severity in light of
the patient’s overall health. Their line of questioning adapts in real-time based on the
patient’s responses and their intuition. Sometimes, they intuitively know to inquire
about family history or pre-existing conditions, while in other cases, curiosity prompts
them to ask about sleep quality or emotional stress.
Clearly, doctors need to extrapolate, draw analogies, and rely on intuition. Their
task isn’t about amassing as much information as possible but about obtaining the
right information and interpreting it correctly. How could an AI model, no matter the
size of the data sets on which it was trained, replicate the multifaceted reasoning of a
medical professional?

7.1 Machines defeating world champions


Two of the most widely publicized “AI events” in history were IBM’s Deep Blue defeat-
ing chess champion Gary Kasparov in 1997 and AlphaGo’s victory over Go champion
Lee Sedol in 2016. Both instances received extensive media coverage, showcasing the
apparent “intelligence” of these programs and generating anticipation for even more
advanced technology in the future. However, these popular interpretations often
missed the mark. These demonstrations primarily highlighted the machines’ formida-
ble computing power and sophisticated specialized algorithms. Instead of demonstrat-
ing genuine intelligence or understanding, they highlighted the stark contrast
between human and machine approaches to generating game moves. By analyzing
the methods employed by computers to play human games, we can gain a better
understanding of AI systems reliant on data and computation.
In the game of chess, the board consists of eight rows and eight columns, with 32
squares initially occupied by pieces. Each side begins with a collection of pieces,
including eight pawns, two rooks, two knights, two bishops, one queen, and one king
(figure 7.1). Each type of piece possesses its own distinctive movement rules. For

Figure 7.1 The starting


position in chess (French
Louvre collections of art) [1]
7.1 Machines defeating world champions 95

example, a pawn typically moves one square forward at a time, except for its first
move, where it has the option to advance one or two squares. Players take turns, with
white pieces making the first move. A piece captures an opponent’s piece by moving
to the square occupied by that piece. The goal of the game is to put the opponent’s
king in a position where it can’t escape capture, which is called checkmate.
The white player in a chess game faces an initial choice of 20 possible moves, and
their opponent has an equal number of potential responses. However, as the game
progresses, the number of possible board positions increases significantly. Just after
the second pair of moves, we reach 197,742 potential board configurations. After
three pairs of moves, this number skyrockets to over 121 million. To provide some per-
spective, consider that a typical position in chess allows for approximately 30 legal
moves to choose from. With the average chess game extending to about 40 move pairs,
the total number of possible game positions can be estimated to be around 10120.

NOTE This monumental figure is known as the Shannon number, named in


honor of the mathematician and electrical engineer Claude Shannon. It
serves as a metric in chess to estimate the complexity of the game tree. Shan-
non published a groundbreaking paper titled “Programming a Computer for
Playing Chess.” In this paper, he introduced the notion of a game tree, com-
prising nodes that represent different game states and edges connecting
them to nodes reachable by legal moves.

In chess, each move by a player leads to a multitude of possible responses by the oppo-
nent, creating a branching structure known as the game tree. The Shannon number
attempts to quantify the vast number of possible chess games. This number provides a
lower bound on the game-tree complexity of chess. It is an estimation of the minimum
number of possible chess games, taking into account legal moves and positions. The
calculation involves considering the average branching factor (average number of
possible moves at each turn) and the average game length.
While the exact number is difficult to pinpoint due to the immense complexity
of chess, the Shannon number serves as a theoretical measure to illustrate the
extraordinary depth and intricacy of the game. It highlights the intricate and expan-
sive nature of chess, emphasizing the difficulties in encompassing all potential legal
positions and moves.
The traditional method for programming turn-based games, as seen in the devel-
opment of IBM’s Deep Blue for chess, involves storing the game tree in computer
memory. In this approach, the system assesses the desirability of positions at the end-
points of branches, systematically adds more nodes to the tree for a deeper search,
and prunes less promising branches. The computer then selects its move based on the
positions with the highest evaluations. Competitive turn-based games often come with
time limits. Each player is initially allocated a specific amount of time, which decreases
when it’s their turn to make a move. If a player’s time runs out, they typically lose the
game. Consequently, a computer must rely on heuristics to determine how much time
to allocate for computations and when to make a move. Just like human players, it
96 CHAPTER 7 AI doesn’t turn data into intelligence

needs to strike a balance between spending time to find potentially better moves and
conserving time for future turns, avoiding rapid decisions that could lead to a disad-
vantageous position.
To compete effectively against skilled chess players, a program must analyze
sequences involving a large number of moves, a task that would be impractical without
pruning. Alpha-beta pruning is a specific algorithm used to reduce the number of
nodes that need to be evaluated in this process. Chess programs also include subrou-
tines that apply heuristics and rules of thumb to assess the relative advantages of each
side in various positions. These assessments are translated into numerical scores,
weighted, and combined to produce an overall evaluation score, taking into account
their relative importance. Additionally, programs like Deep Blue have access to data-
bases containing complete grandmaster games, opening sequences, and an endgame
database that includes full game trees for positions with only a few remaining pieces
on the board.
Switching gears to the game of Go, it is played on a 19 × 19 grid with black and
white stones. The objective is to capture the most territory by surrounding it with
one’s own stones. Computer Go programs have taken various approaches over the
years, with early efforts like Albert Zobrist’s 1968 program [2] relying on traditional
programming. In contrast, the Symbiotic Adaptive Neuro-Evolution (SANE) approach
introduced in 1998 at the University of Texas at Austin [3] utilized neural networks
and genetic algorithms to teach the program to play on a nine-by-nine board without
preprogrammed Go knowledge. AlphaGo, however, employed extensive reference
databases, grandmaster knowledge, and highly sophisticated deep learning. The pro-
gram was trained using positions from both human- and computer-played games, incor-
porating board positions, the best moves, and winning percentages. Subsequently,
AlphaGo played millions of games against itself to refine its strategies.
The computer-based approach differs from human players, who rely on intuition
and experience. Human players calculate move sequences and evaluate positions, but
their process is neither systematic nor numerical. Renowned chess grandmaster Mag-
nus Carlsen mentioned that he can occasionally calculate 15 to 20 moves ahead, but
the challenge lies in evaluating the positions at the end of these lines [4]. Humans
also depend heavily on intuition, strategy, and anticipating their opponents’ plans,
sometimes choosing moves that may not have the highest numerical score but are psy-
chologically challenging for their opponents.

7.2 Lack of generalization


Numerous AI projects primarily serve marketing purposes, with resulting programs
typically having limited utility beyond their ability to beat humans in specific games.
These projects often demand substantial investments in terms of both cost and
resources. While they may initially capture media attention, as exemplified by the
widespread coverage of Deep Blue, they frequently fade into obscurity over time. In
contrast, human experts in games like chess or Go can transfer their skills to play
7.2 Lack of generalization 97

other games reasonably well. Given a brief period to familiarize themselves with the
rules of a new game, they can effectively apply their systematic and strategic thinking
abilities. AI systems, on the other hand, struggle to adapt to rule changes in their des-
ignated games, let alone apply their knowledge to different domains.
Furthermore, when evaluating a computer’s apparent intelligence, it’s important
to consider that individuals capable of playing chess at a master level can also handle
tasks such as writing articles on chess strategy. However, despite their impressive game-
playing abilities, systems like Deep Blue are limited in their competency beyond their
specialized tasks. For example, AlphaGo employs advanced techniques to navigate com-
plex state spaces and analyze extensive data, but it can only do so because it operates
with complete and perfect information. These systems encounter difficulties when con-
fronted with real-world scenarios that feature incomplete information and uncertainty.
In the 1950s, individuals who could perform fast and accurate mental calculations
were deemed “intelligent” because this skill was highly valuable in an era before the
widespread use of calculating machines. Today, affordable handheld calculators sur-
pass human abilities in manipulating mathematical formulas and performing calcula-
tions. Yet, we don’t attribute intelligence to calculators. This raises the question: Why
do we often characterize game-playing programs as intelligent simply because they
excel in rapid calculations and data processing?
Let’s conclude this chapter with a historical case example that underscores the sig-
nificant challenges AI systems face when attempting to replicate counterintuitive
intelligence. During World War II, mathematician Abraham Wald proposed a coun-
terintuitive but highly effective strategy for reinforcing planes against enemy fire.
Instead of reinforcing the parts of planes that received the most damage, as suggested
by the records, he recommended reinforcing the parts that received the least damage
[5]. His insight was crucial: the planes that returned to base were surviving the dam-
age they accumulated, and the records highlighted the areas that, if damaged, would
lead to the plane’s loss. Wald’s remarkable demonstration of counterintuitive intelli-
gence was made possible by his cognitive abilities, such as abstract reasoning, creativ-
ity, and a deep understanding of context, which allowed him to conceptualize and
reason about concepts that may not have had direct precedents in his knowledge and
past experiences. Furthermore, his ability to apply common-sense reasoning, creativ-
ity, and imagination enabled him to formulate innovative solutions to problems that
defied conventional logic and showcased his counterintuitive intelligence.
In stark contrast, AI models lack the capability to grasp the underlying principles
or concepts behind data. They also lack common-sense reasoning, which is essential
for comprehending counterintuitive scenarios that may not conform to standard rules
or patterns. In essence, AI’s inability to infer counterintuitive intelligence underscores
the divide between data-driven machine learning and the nuanced, context-dependent
reasoning that humans often employ in complex, unconventional situations.
98 CHAPTER 7 AI doesn’t turn data into intelligence

Summary
 Relying solely on an AI program learning from data alone may not be sufficient
for performing many tasks, especially those that require reasoning or common-
sense knowledge.
 AI models that rely on data to learn are often limited to a single domain
because their knowledge and capabilities are derived solely from the data they
are trained on.
 AI models lack the capacity for context-based reasoning and critical thinking.
AI doesn’t
threaten our jobs

This chapter covers


 The overstated concerns regarding AI’s effect
on employment
 The challenges AI faces in automating many
human tasks
 The problems of applying AI in the real world
 The dangerous effects of inadequately designed
AI systems

In this chapter, we will demonstrate, using various examples, that despite concerns
about AI taking over jobs, the majority of human occupations remain beyond the
reach of current AI techniques.
The apprehension surrounding the idea of machines replacing human jobs has
deep historical roots. As far back as 1589, when English inventor William Lee
sought a patent for his knitting machine, Queen Elizabeth I denied it due to con-
cerns about the economic stability of the kingdom’s numerous hand-knitters. This
illustrates the long-standing fear of technological advancements affecting employ-
ment. In the appendix, we’ll briefly touch upon the Luddites and their reactionary
actions against textile machinery during the 19th century. This moment in history

99
100 CHAPTER 8 AI doesn’t threaten our jobs

underscores the resistance to automation, which often arises from concerns about job
displacement. In July 1987, the Harvard Business Review published an article titled
“Thinking about Artificial.” It opened with the statement: “Some believe that Artificial
Intelligence is on the brink of transforming business practices. They claim that ‘intel-
ligent’ computer programs will imminently assume roles such as doctors, lawyers,
factory workers, and managers” [1]. As we know, none of these forecasts actually came
to fruition.
Fast forward to the present day, and the fear of machines taking over human jobs
continues to evolve, sometimes with alarmist tones. Some experts even have a formula
to predict the likelihood of AI replacing your job, suggesting that if a job can be easily
explained, it can be replaced by AI [2]. This apprehensive prediction was also made in
a 2015 report [3] by the Global Challenges Foundation and Oxford University’s
Future of Humanity Institute, which suggested that machines are on the verge of
replacing a significant portion of the workforce. The report states:

AIs would immediately benefit from improvements in computer speed and any computer
research. They could be trained for specific professions and duplicated at will, potentially
replacing a substantial portion of the global workforce and causing significant economic
disruption.

Former President Obama, in a 2016 interview with WIRED magazine [4], recognized
job displacement by AI as a significant risk. He stated:

One thing that we haven’t discussed much, and I want to emphasize, is that we really
need to consider the economic implications of AI. Most people are not currently
preoccupied with the Singularity; they are worried about whether their jobs will be replaced
by machines.

Media outlets have also contributed to the sensationalism surrounding AI job dis-
placement, with headlines like “Robots Can Now Read Better than Humans, Putting
Millions of Jobs at Risk” [5] and predictions that “your favorite restaurant may soon
employ robots as cooks and servers, potentially leading to job losses for millions of
workers” [6].
The World Economic Forum published a “Future of Jobs Report” [7], complete
with extensive statistics and projections for every industry in every country. The report
asserts that the Fourth Industrial Revolution is likely to lead to a reduction in the
workforce and lists the following illustrative predictions:
 Nearly 50% of companies expect that automation will lead to some reduction in
their full-time workforce by 2022.
 Forty-two percent of task hours will be performed by machines.
 Seventy-five million jobs may be displaced by a shift in the division of labor
between humans and machines.
In 2020, businessman Andrew Yang, a Democratic presidential candidate, campaigned
in part on the promise of implementing a universal income to mitigate the job
CHAPTER 8 AI doesn’t threaten our jobs 101

displacement caused by automation. Additionally, a prominent consulting firm


made a forecast indicating that by 2030, around one-third of the American work-
force may need to transition to new occupations [8]. They also highlighted the pos-
sibility that up to 160 million women worldwide might need to switch professions by
2030, with a particular vulnerability in roles such as secretaries, schedulers, and
bookkeepers due to automation. Taking a more comprehensive view, former IBM
CEO Ginni Rometty, in an interview with CNBC, asserted that AI would affect 100%
of jobs [9].
In this chapter, I will elucidate why these dystopian scenarios lack a solid foundation.
In chapter 6, we conducted a comparative analysis of human and machine intelligence,
identifying several fundamental distinctions between humans and machines. Here, we
will discuss the limitations of AI, specifically within the context of the workplace.
While automation is well-suited for handling simple, repetitive, and potentially
hazardous tasks, the automobile industry, renowned for its extensive use of robotics,
presents an intriguing paradox. One might anticipate a reduced need for human
labor in such an environment. However, reality and statistics offer a different perspec-
tive. Consider the German automotive industry as an example, where the number of
employees increased year by year, reaching 833,937 in 2018 [10]. This phenomenon
underscores a widely accepted fact within the industry: machines struggle with tasks
demanding cognitive prowess and dexterity [11].
Similarly, one might anticipate a surge in automation within the field of accounting,
given its foundation in calculations, seemingly an ideal terrain for machine replace-
ment. Yet, once again, reality challenges this assumption. Surprisingly, the percentage of
human workers in accounting has, contrary to widespread predictions, doubled since
the widespread integration of computers into workplaces during the 1980s.
A pattern resembling the one observed in the automotive and accounting indus-
tries can also be identified in the field of medicine. The inception of medical AI dates
back to the early 1970s, with the development of systems such as MYCIN, mentioned
in chapter 2, as well as others like CASNET and INTERNIST. Predictably, these proj-
ects were perceived as the dawn of a new era in traditional medicine. An article in the
New York Times titled “Medical Technology: The New Revolution,” published on
August 5, 1979 [12], informed readers to anticipate the following advancements:

If you have to go to the hospital ten years from now, your visit may run something like
this: Past the inevitable receptionist, your street clothes exchanged for a shapeless hospital
gown, you enter a small, antiseptic room. You take a seat and offer your arm to a
rectangular machine. Painlessly the machine draws a blood sample and within seconds
has analyzed it down to its smallest meaningful platelet. The information is flashed to a
central computer deep within the hospital, where it is compared with previous readings to
detect an infection anywhere in your body. You move to an adjoining room and sit under
a massive apparatus. Silently, your body is probed by X-rays or microwaves, while sensors
inspect the surface of your skin. A thermogram will show areas of raised temperature,
which can reveal incipient disease. Although you feel nothing, see nothing, the inner
workings of your body are being deeply scrutinized. A developing gallstone, still barely
102 CHAPTER 8 AI doesn’t threaten our jobs

larger than a grain of sand, is noted and appraised; like a tiny white clot lodged within a
coronary artery or a polyp hidden in your nasal cavity, it may be harmless, but
nevertheless deserves watching. Within moments, a minutely detailed workup has been
prepared by computer and sent to your doctor.

After more than four decades, it appears that, if anything, we’ve regressed. During my
recent visit to a hospital in the Bay Area, I endured a three-hour wait to meet with a
nurse who posed the same questions one might expect to hear in an old black-and-
white film. The only distinction was that the hospital in the movie would have been
cleaner and less crowded, with the patient conversing directly with the doctor instead
of a nurse. Have you witnessed machines taking over any medical tasks typically per-
formed by doctors?
A part of my PhD research addressed the use of AI for medical reasoning and diag-
nosis. I don’t have any medical training myself, so I initially tried to use an expert sys-
tem to emulate what I learned from several doctors about how they think. For the sake
of discussion, I will give here a general outline of the thought process that guided the
design of my AI solution.
When presented with a patient, the first priority of the expert system is to address
any emergencies. If a patient is losing blood, for example, that needs to be addressed
immediately. Once any emergencies are addressed, any obvious diagnoses will be
made. For example, a patient in an otherwise stable condition who came in saying
that they fell and broke their arm is probably right about what’s wrong. Any decisive
test would be administered to confirm the diagnosis, and the necessary treatment
would be provided.
If there are no emergencies and no obvious conclusions to be drawn, one looks for
decisive facts that would suggest the correct diagnosis. A priority would be given to
affordable, safe, noninvasive tests, and only when the more reasonable options fail to
provide clarification would you resort to more extravagant measures. For example, if
there is reason to suspect that a patient has bronchitis and it’s possible to test this
hypothesis with a simple throat culture, you do the throat culture instead of ordering
an MRI, which is a lengthy, expensive, uncomfortable procedure. You progress from
likely hypotheses and reasonable testing procedures to less likely possibilities and less
desirable procedures until the problem can be identified.
The thought process undertaken in each of these steps is context-dependent. For
example, a patient’s age, sex, family history, and pre-existing conditions need to be
considered. In addition, some test results come with a high degree of uncertainty. As a
result, complex reasoning is required, and much of a doctor’s skill is tacit and difficult
to formulate. What doctors could explain to me about their reasoning was often quite
a challenge to replicate in an algorithm.
Dr. Faith Fitzgerald reached the same conclusion [13]. She explains that clinical
reasoning cannot be reduced to a set of rules since each patient has their own unique
situation and background, and she describes the subtle nature of medical reasoning
as follows:
8.1 Are simple human tasks easy to automate? 103

In fact, the best clinical diagnostic thinking is more like the forming of a mosaic than
linear thinking: It requires the physician to constantly alter diagnoses as each new piece
of data enters the picture. One conceives constantly of many possible diagnoses, narrows
down, re-expands, and generates an ever-evolving flux of ideas; the more information
gained from patients, the better.

As previously mentioned, in 2011, IBM’s AI program, Watson, achieved victory over


two former Jeopardy champions. At the time, this success was celebrated as the dawn
of a new era, where machines could provide answers to all our questions. It was envi-
sioned that Watson could swiftly analyze medical documents and correlate patient
data with the latest research, offering personalized, cutting-edge treatments. IBM’s
acquisition of four health-data companies in the mid-2010s, totaling approximately $4
billion, seemed to position them perfectly to revolutionize healthcare through AI.
However, by 2020, after investing billions in research and development, no AI doctor
product ever materialized from IBM’s Watson Health Division, and the unit was even-
tually sold at a loss in early 2022 for around $1 billion.
IBM’s leadership now characterizes the journey of Watson Health as a challenging
and protracted one, far more complex and time-consuming than they had initially
anticipated [14]. A similar tale unfolded with IBM’s collaboration with the University
of Texas M. D. Anderson Cancer Center in Houston. Their joint project, aimed at cre-
ating the Oncology Expert Advisor tool, ultimately met the same fate. In 2016, an
audit conducted by the university revealed that over $62 million had been expended
on the project before it was ultimately canceled.
A closer examination of these unsuccessful ventures uncovers a fundamental mis-
match between the realities of the medical field and the current state of limited, frag-
mented, and unintelligent machine learning techniques. The data mining, neural
networks, and statistical approaches that were employed are primarily suited for rec-
ognizing specific, predefined patterns or constructing predictive models applicable
only in well-defined, controlled scenarios.
These tools tend to uncover only the most straightforward relationships within
data. Even with abundant amounts of data at their disposal, these models are unable
to deduce basic facts, such as the fact that blood circulates due to the pumping action
of the heart. Consequently, they certainly fall short when it comes to unraveling
chains of causality or suggesting associations that could significantly contribute to
diagnosis or treatment. The notion that AI could replace medical professionals is,
therefore, a baseless notion.

8.1 Are simple human tasks easy to automate?


We know that machines are good at certain kinds of tasks. A factory robot can punch
holes in pieces of metal all day without ever making a mistake or getting tired. With all
of the advanced technology at our disposal today, the mass media would have you
think that it’s only a matter of time before most mundane tasks are automated. It will
104 CHAPTER 8 AI doesn’t threaten our jobs

probably take only the first two examples in this section to convince you otherwise,
and we’ll close the chapter with several other examples to drive the point home.
The first task we’ll consider is pizza making. To introduce the story, we’ll quote
CNBC personality Jim Cramer from a video segment he made praising the technology
startup Zume [15]:

Everybody loves pizza, in part because it’s very hard to screw up a pizza. I mean, even
bad pizza still tastes good, but what if there was a better way to make and deliver pizza to
you? Turns out there is, which brings me to Zume, Inc., a Silicon Valley-based startup
that’s trying to bring this industry into the modern era. They’re best known for introducing
robots into the production process for everything from spreading the tomato sauce evenly to
taking pizzas in and out of the oven and slicing it perfectly. Basically, robots do all sorts of
the highly repetitive tasks. . . . I think it’s real. It’s not an idea; it’s a business.

At one point, Zume appeared to possess all the necessary talent and resources to revo-
lutionize the automation of pizza production and delivery. In 2018, they secured a
substantial $375 million investment from SoftBank and developed a promising system.
Their innovative approach involved a synergy of humans and robots, capable of pro-
ducing up to 120 pizzas per hour in a versatile truck that could function both as a food
truck for sidewalk sales and a delivery vehicle. For deliveries, an AI system optimized
routes and pizza production, ensuring delivery within as little as 5 minutes from an
online order. However, by January 2020, after grappling with numerous challenges,
Zume Pizza ceased operations. Initially, their robots were repurposed for sustainable
food packaging production [16]. Yet, in June 2023, the Wall Street Journal reported that
Zume had initiated a winding-down process [17]: “California startup Zume, which was
developing a robotic pizza maker and was once valued at $2.25 billion, recently entered
a wind-down process.”
So it would appear that making and delivering pizzas is still beyond the reach of
modern AI, or at least that there are logistical or practical problems that make replac-
ing humans infeasible. Perhaps the task of making and serving coffee would be more
tenable? After all, John Steinbeck described an automated system in his 1962 book
Travels with Charley [18] that seemed to operate rather well:

I had neglected my own country too long. Civilization had made great strides in my
absence. Suppose you want a soft drink; you pick your kind—Sungrape or Cooly Cola—
press a button, insert the coin, and stand back. A paper cup drops into place, the drink
pours out and stops a quarter of an inch from the brim—a cold, refreshing drink
guaranteed synthetic. Coffee is even more interesting, for when the hot black fluid has
ceased, a squirt of milk comes down, and an envelope of sugar drops beside the cup. But,
of all, the hot-soup machine is the triumph. Choose among pea, chicken noodle, beef, and
veg., and insert the coin. A rumbling hum comes from the giant, and a sign lights up
that reads, “Heating.” After a minute, a red light flashes on and off until you open a
little door and remove the paper cup of boiling-hot soup.

Despite a seemingly promising start, attempts to create a robotic barista have fallen
short, as evidenced by the noticeable absence of robots in coffee establishments. In
8.1 Are simple human tasks easy to automate? 105

fact, we continue to prepare and serve coffee much as we did in 1671 when the first
café opened in Marseilles, France. But why is this the case? After all, isn’t making cof-
fee essentially about transferring substances between containers and toggling switches
on and off?
Even a young child can effortlessly fill a container of any shape or size with water
from the nearest faucet, provided they can reach the tap and the container fits
beneath it. They instinctively know how far to turn the tap and for how long to let the
water flow before stopping it. They comprehend the roles of the container and the
faucet, as well as the behavior of water as it flows from the tap into the container.
Machines, on the other hand, lack this intuitive understanding of containers,
water flow, or faucets. While a robotic arm can be programmed to move a container to
a specific spot and activate a tap for a set duration, it will continue pouring water into
a smaller container until it overflows unless given explicit instructions to adapt to the
new situation. And this is assuming the robot can even pick up a differently sized con-
tainer, which is a challenging task in itself.
Considering that we’ve had machines capable of producing basic mixtures of sub-
stances in cups for six decades, it would seem that we are overdue for a robotic café.
Considering our slow progress in automating a relatively simple task such as coffee
preparation, one must question the likelihood of the automation of “most jobs” hap-
pening anytime soon.
Perhaps you think we are being selective with our examples and that robots are
able to adequately perform other basic tasks? Walmart started experimenting in 2017
with robotic inventory checkers produced by Bossa Nova Robotics, a spinoff of the
Carnegie Mellon Robotics Institute. The machines would go up and down the aisles
with the task of confirming that items were on the shelves. The experiment was ended
after three years, with sources close to the project saying that “Walmart ended the
partnership because it found different, sometimes simpler solutions that proved just
as useful” [19].
One might think that textile work would be a good candidate for automation. For
example, garment manufacture typically entails repeatedly stitching according to a set
pattern. It has even been joked that “a modern textile mill employs only a man and a
dog—the man to feed the dog, and the dog to keep the man away from the machines.”
In reality, however, sewing has been particularly difficult to automate, in part because
fabric stretches and bunches when it’s manipulated, and machines don’t have the dex-
terity needed to keep things properly arranged [20].
What about automation in transportation? Driving would seem like a prime candi-
date for automation since it’s monotonous, the laws are well-defined, and human
error is a cause for concern. We briefly mentioned in chapter 4 that complex environ-
ments like that around the Arc de Triomphe might never be navigable by the type of
AI we have today. Despite colossal investment and more than 15 years of development
efforts, driverless vehicle projects are still faltering, and a modern city like San Fran-
sisco still presents seemingly insurmountable challenges.
106 CHAPTER 8 AI doesn’t threaten our jobs

An ABC News video posted on June 29, 2023, highlights the difficulties that driver-
less vehicles are still facing [21]. The journalist was alarmed that her vehicle had
stopped at a green light for no reason and said:

I think we are stopped. Oh my god. Right now, there is a green light, and nothing is
happening. We are stuck, and not only that, we are not even on the left-hand side
properly. Oh-Oh, it says our team is working to get you moving. It was a green light. It
didn’t know what to do. How could I rely on a car to make the right decision when it
cannot “see” a simple green light?

Waymo has the resources to hire the best AI engineers, and if an advanced company is
struggling to make their autonomous vehicles recognize a green light, how could any-
one suggest that AI sees better than humans? With the help of the support team, the
car eventually moved, but the journalist was later shocked that the car could not drop
her at the correct destination. She said:

This is weird. This is not where we are going. This is not where the random museum is.
Now I am going to have to call support and see what I can do because I’m completely at a
loss right now. The location where I want to be is over there, and it’s dropped me at the
bottom of this hill.

The support team asked the journalist to open her Waymo app and retype her desti-
nation. Alas, the vehicle made the same error and again stopped at the same wrong
place. This is another illustration of why current AI lacks reasoning capabilities. How
could anyone trust or rely on a system that keeps making the same obvious error?
In aviation, a field that has been supplementing human dexterity with automation
since its inception, our most modern AI technology is still causing disasters. In 2013,
the National Transportation and Safety Board of the United States explained the
crash of Asiana Flight 214 by saying that the crew had “over-relied on automated sys-
tems that they did not fully understand” [22]. The NTSB chairman said,

In their efforts to compensate for the unreliability of human performance, the designers of
automated control systems have unwittingly created opportunities for new error types that
can be even more serious than those they were seeking to avoid.

Another well-documented case of automation-related disaster is the 2009 loss of Air


France Flight 447. En route from Rio de Janeiro to Paris, ice accumulation on some of
the instruments caused the autopilot to disengage unexpectedly, and when the pilots
failed to react appropriately, the plane and its 228 occupants smashed into the Atlan-
tic. Later, in March 2019, after some poorly written software caused two crashes that
killed 346 people, Boeing’s entire series of 737 MAX aircraft was grounded.
The prospects for automation seem rather spotty, even when we consider computer-
related tasks for which technology companies are highly incentivized to replace humans
with machines. A prime example is content moderation. In May 2020, Facebook agreed
to pay $52 million to 11,250 employees to compensate them for the mental health
8.1 Are simple human tasks easy to automate? 107

problems they had developed on the job [23]. Work reviewing online content for
appropriateness has caused anxiety, depression, addiction, and other problems, yet
Facebook, one of the largest technology companies in the world, continues to hire
thousands of people each year to address this task.
Abstractly, content moderation involves opening image and text files, reviewing
them, and sorting them into categories. Given the psychological harm this has done
to people and the bad press and financial consequences Facebook has suffered as a
result, we can assume that if there were any feasible way to automate this task, it would
be automated. As reported by the Verge, when asked by Congress, the Facebook CEO
dodged question after question by citing the power of AI: “Moderating hate speech?
AI will fix it. Terrorist content and recruitment? AI again. Fake accounts? AI. Russian
misinformation? AI. Racially discriminatory ads? AI. Security? AI” [24].
The fact that it has not been completely solved should shed new light on claims
about how advanced Facebook’s technology actually is, and it should prompt swift dis-
missal of headlines like “Facebook Artificial Intelligence Robots Had to Be Shut Down
After They Started Talking to Each Other in Their Own Language” [25]. This article
stands out for ascribing lifelike characteristics to machines. For instance, it states:

The two chatbots came to create their own changes to English that made it easier for them
to work—but which remained mysterious to the humans that supposedly look after them.
The bizarre discussions came as Facebook challenged its chatbots to try and negotiate with
each other over a trade, attempting to swap hats, balls and books, each of which were
given a certain value. “The discussions” quickly broke down as the robots appeared to
chant at each other in a language that they each understood but which appears mostly
incomprehensible to humans.

Surely machines capable of inventing their own language would be able to identify
language that violates Facebook’s terms of use policy.
Finally, let’s consider the seemingly straightforward task of translation. People
were already anticipating in the 1950s that computers would soon be doing all of our
translating. After all, a simple dictionary can provide a word-for-word translation, and
by comparing well-translated documents to the originals, you might think it would be
easy to assemble an adequate list of rules and exceptions. After more than 70 expect-
ant years, translators are still an essential part of the business world.
We need only relate one simple example to demonstrate the point as the internet
abounds with others. A common French saying, “La larme est la goutte d’eau qui fait
déborder l’âme,” which literally means “The tear is the drop of water that makes the
soul overflow,” is translated by Google as shown in figure 8.1.
It’s not quite clear what has gone wrong here, but the result makes no sense. The
translation algorithm apparently made reference to a library of idioms compiled by
humans, which is at least a good start. The French phrase “La goutte d’eau qui fait
déborder le vase” literally means “The drop of water that made the vase overflow,”
and its English equivalent is “The straw that broke the camel’s back.” Since the two
French phrases only differ by two words, the algorithm must have replaced the
108 CHAPTER 8 AI doesn’t threaten our jobs

Figure 8.1 Google translate results as of May 6, 2022. The result may change
due to user feedback.

familiar French idiom with its English equivalent and then substituted literal transla-
tions of the words that didn’t match the idiom.
No bilingual human would make such a mistake. Either they would be familiar
with the idioms and translate them correctly, or they would recognize that a literal
translation doesn’t make sense and that they need to investigate. It’s quite likely, in
fact, that they would be able to figure out from context what it must mean. The exam-
ple should make clear that machines are still far from having this ability.
Translating between French and English should actually be one of the easiest
translation tasks of all. These two languages are closely related, and there is a vast
amount of training material available for any AI system. For example, since Canada’s
Official Languages Act of 1969, all of their official documents have had to be available
in both English and French. The European Commission has the same requirement.
This must amount to at least hundreds of thousands of pages of text that have been
carefully written and meticulously translated, and for many years now, most of this will
have been available in electronic form.
If AI from one of the world’s preeminent technology companies can’t reliably
translate a common phrase from French to English, how much confidence could we
place in its ability to translate between more enigmatic languages? We might still be
decades away from the day when AI can passably translate poetry from Mandarin to
Indonesian or literature from Vietnamese to Finnish, and quite possibly, that day
might never come. Even the translation of more straightforward material in the legal
or business domain will depend on humans for the foreseeable future.
In brief, although there are ongoing concerns about AI potentially replacing
human jobs, it’s important to acknowledge that AI has inherent limitations. AI faces
significant obstacles when it comes to tasks that demand human qualities such as reason-
ing, physical abilities, emotional comprehension, creativity, and handling ambiguous sit-
uations. Furthermore, AI systems heavily rely on the data they are trained on, which can
introduce biases, rendering them unsuitable for tasks demanding fairness and impar-
tiality. Due to these limitations and their inherent lack of a true understanding of the
Summary 109

world, AI is poised to complement rather than supplant humans. Consequently, AI is


more likely to enhance human capabilities by handling repetitive and data-driven
aspects of work, thereby increasing efficiency and allowing humans to focus on tasks
that demand our unique qualities.
Now that we’ve established that most occupations are safe from automation for the
time being, we can address the ominous “singularity” referred to at the start of this
chapter. Cue the sinister music, my friends. First they came for your jobs, and now the
AI overlords are coming to take over civilization.

Summary
 People had similar unfounded fears 400 years ago when new machines were
introduced.
 AI lacks the intuition, empathy, and deductive capabilities needed in many pro-
fessions, so people in these professions will not be replaced by AI.
 Many tasks are very difficult to automate because of the complexity and imper-
fection of the real world.
Technological
singularity is absurd

This chapter covers


 The unlikelihood of the singularity
 The lack of intelligence in machines
 Thoughts about the human brain

Nothing in this world is to be feared . . . only understood.


—Marie Curie

According to some people, the end of human civilization won’t be due to things
like climate change, nuclear war, or our sun dying out. Instead, they believe that in
the not-so-distant future, artificial intelligence could become so advanced that it
gains its own will and takes control of the planet. This potential catastrophe is often
referred to as “the singularity,” a hypothetical point in time when AI would advance
so rapidly that humans couldn’t keep up with its progress. While this concept
makes for exciting stories in science fiction, it is essential to ground such specula-
tions in reality. In this chapter, we aim to demystify the notion of technological sin-
gularity, arguing that it is fundamentally flawed.

110
9.1 The genesis of technological singularity 111

9.1 The genesis of technological singularity


The concept of technological singularity isn’t a new idea; it has its roots in discussions
that date back to at least 1958. In that year, physicists John von Neumann and Stani-
slaw Ulam engaged in a conversation where they pondered the “ever-accelerating
progress of technology” and how it might lead to a profound and potentially unpredict-
able turning point in human history. This turning point, referred to as the “singularity,”
would mark a moment beyond which human affairs could change in ways we couldn’t
foresee. A more detailed explanation of this notion came in 1965 from I. J. Good in his
article titled “Speculations Concerning the First Ultra-Intelligent Machine” [1]. In this
article, Good explored the idea of an “ultra-intelligent machine” that could emerge,
potentially surpassing human intelligence. This machine, he suggested, could trigger
profound changes in our society and the way we live:
Let an ultraintelligent machine be defined as a machine that can far surpass all the
intellectual activities of any man however clever. Since the design of machines is one of
these intellectual activities, an ultraintelligent machine could design even better
machines; there would then unquestionably be an “intelligence explosion,” and the
intelligence of man would be left far behind. Thus the first ultraintelligent machine is the
last invention that man need ever make, provided that the machine is docile enough to
tell us how to keep it under control. . . . It is more probable than not that, within the
twentieth century, an ultraintelligent machine will be built.

In 1967, Marvin Minsky, who led the AI laboratory at MIT, boldly stated that “within a
generation, the problem of creating ‘artificial intelligence’ will be substantially solved”
[cited in 2]. He even went a step further, suggesting that “within 10 years, computers
won’t even keep us as pets.” Around the same time, Herbert Simon, another promi-
nent computer scientist, made a similarly ambitious prediction, claiming that by 1985,
machines would be capable of doing any work that humans could do [3].
Unfortunately, grandiose claims like these tend to grab more attention than rea-
soned analyses. In recent years, several well-known figures in the scientific and tech
world, including Bill Gates, Stephen Hawking, and Elon Musk, have raised alarm bells
about the potential risks associated with AI. Sam Altman, the CEO of OpenAI, also
subscribes to the idea of the technological singularity [4]:

Our self-worth is so based on our intelligence that we believe it must be singular and not
slightly higher than all the other animals on a continuum. Perhaps the AI will feel the
same way and note that differences between us and bonobos are barely worth discussing.

A report published in 2015 by the Global Challenges Foundation and Oxford Univer-
sity’s Future of Humanity Institute highlighted this concern as one of the “12 risks that
threaten human civilization” [5]. Specifically, the report referred to the risk associated
with advanced, intelligent machines:

Through their advantages in speed and performance, and through their better integration
with standard computer software, they could quickly become extremely intelligent in one or
more domains (research, planning, social skills . . .). If they became skilled at computer
112 CHAPTER 9 Technological singularity is absurd

research, the recursive self-improvement could generate what is sometimes called a


“singularity,” but is perhaps better described as an “intelligence explosion” . . . . With the
AI’s intelligence increasing very rapidly, such extreme intelligences could not easily be
controlled (either by the groups creating them, or by some international regulatory
regime), and would probably act in a way to boost their own intelligence and acquire
maximal resources for almost all initial AI motivations. And if these motivations do not
detail the survival and value of humanity in exhaustive detail, the intelligence will be
driven to construct a world without humans or without meaningful features of human
existence. This makes extremely intelligent AIs a unique risk, in that extinction is more
likely than lesser problems. An AI would only turn on humans if it foresaw a likely
chance of winning; otherwise, it would remain fully integrated into society. And if an AI
had been able to successfully engineer a civilisation collapse, for instance, then it could
certainly drive the remaining humans to extinction.

Rest assured that not everyone involved in the field of AI harbors apocalyptic visions.
Throughout history, there have been voices of reason who offered more measured
and rational perspectives on the capabilities and limitations of artificial intelligence.
One such visionary was Ada Lovelace, recognized for her pioneering work in the field
of AI as she is often credited with writing the world’s first computer program. In the
19th century, Lovelace collaborated with Charles Babbage on his proposed Analytical
Engine, a mechanical general-purpose computer design. Her remarkable insight went
beyond the conception of mere calculations; she grasped the potential for the
machine to manipulate symbols and generate complex sequences, essentially laying
the groundwork for programming. Lovelace’s groundbreaking notes on the Analytical
Engine demonstrated the profound idea that machines could be used for more than
just mathematical computation, envisioning a broader computational world. Her
work serves as an early example of the theoretical underpinnings of modern com-
puter programming and AI. In 1842, Lovelace articulated the following perspective
regarding the Analytical Engine [6]:

The Analytical Engine has no pretensions whatever to originate anything. It can do


whatever we know how to order it to perform. It can follow analysis, but it has no power
of anticipating any analytical relations or truths.

Similarly, Arthur Samuel, whom we introduced in chapter 1, is one of the pioneers of


AI. Samuel’s work was instrumental in shaping the foundations of AI and had a pro-
found effect on the field. As previously mentioned, he designed a computer program
that could play checkers and improve its performance over time through learning
from experience. This concept laid the groundwork for modern machine learning
and reinforcement learning algorithms. In a seminal 1960 article published in Science
titled “Some Moral and Technical Consequences of Automation—A Refutation” [7],
Samuel eloquently asserted the critical importance of separating fact from fiction in
the discourse surrounding automation:

A machine is not a genie, it does not work by magic, it does not possess a will, and . . .
nothing comes out which has not been put in, barring of course, an infrequent case of
9.2 The truth about the evolution of robotics 113

malfunctioning. . . . The machine will not and cannot do [anything] until it has been
instructed as to how to proceed. . . . To believe otherwise is to believe in magic. Since the
machine does not have a mind of its own, the “conclusions” are not “its.” The so-called
“conclusions” are only the logical consequences of the input program and input data, as
revealed by the mechanistic functioning of an inanimate assemblage of mechanical and
electrical parts. The “intentions” which the machine seems to manifest are the intentions
of the human programmer, as specified in advance, or they are subsidiary intentions
derived from these, following rules specified by the programmer. . . . Although I have
maintained that “nothing comes out that has not gone in,” this does not mean that the
output does not possess value over and beyond the value to us of the input data. The
utility of the computer resides in the speed and accuracy with which the computer provides
the desired transformations of the input data from a form which man may not be able to
use directly to one which is of direct utility.

Arthur Samuel’s insightful view on AI remains pertinent and accurate in today’s con-
text. The concept of an ultra-intelligent, malevolent entity emerging from our tech-
nology to seize control and create chaos remains firmly in the fictional world. While it
might be tempting to draw parallels with scenarios depicted in the works of science
fiction authors like Isaac Asimov, TV series such as The Twilight Zone, or blockbuster
films like The Terminator and The Matrix, it’s essential to recognize that the cognitive
faculties, such as intuition, imagination, and creativity, which characterize true intelli-
gence, remain elusive for artificial systems.

9.2 The truth about the evolution of robotics


From Mary Shelley’s 1818 novel depicting Dr. Frankenstein’s creation to the animated
doll Pinocchio brought to life in Disney’s 1940 film, the idea of human-made objects
gaining sentience has always held a captivating allure.
The term “robot” achieved widespread recognition and popularity through its
usage in Karel Čapek’s 1920 play, R.U.R. “Rossum’s Universal Robots.” This word, with its
roots in the Czech language, specifically robota, which translates to “forced labor,”
introduced a concept that would shape the future of automation and AI. The evolu-
tion of robotic terminology continued with the introduction of “androids.” While the
term itself had ancient Greek roots, it found a new home in science fiction during the
1930s, thanks to the imaginative works of authors like Edmond Hamilton in his Cap-
tain Future series in the early 1940s. These androids, with their human-like qualities,
began to captivate the imagination of audiences worldwide. Fast forward to today, we
find ourselves in a world where robots do indeed perform labor. However, their capa-
bilities remain constrained to tasks of a relatively straightforward and limited nature.
Despite our technological progress, the concept of an android, as envisioned by early
science fiction, remains tantalizingly distant.
General Motors made an early venture into robotics in 1961 when it introduced a
mechanical arm for manipulating hot-cast metal components at a New Jersey plant.
This venture was met with success, paving the way for further exploration in the 1970s.
The company expanded the use of machines into other meticulously controlled tasks,
114 CHAPTER 9 Technological singularity is absurd

including welding and painting. In the contemporary landscape, robots play an indis-
pensable role in auto manufacturing. Nonetheless, they remain specialized to particu-
lar tasks.
In 1962, MIT’s Henry Ernst conceived the first computer-operated robotic hand,
designed for the remote manipulation of radioactive materials. A symphony of motors
orchestrated the movements of a mechanical arm, while light sensors in the fingertips
discerned shadows. This ingenious system, guided by a computer program, maneu-
vered objects on a table, picking them up and placing them into a container.
Shakey, the subject of research at the SRI Artificial Intelligence Center from 1966
to 1972, took a monumental leap forward as the inaugural mobile robot equipped
with the ability to perceive its surroundings (figure 9.1) [8]. A marvel of its time,
Shakey served as an experimental platform to integrate machine learning, computer
vision, navigation, and a myriad of AI techniques. Its repertoire included tasks demand-
ing planning, route-finding, and the rearrangement of simple objects, earning it the
moniker of the “first electronic person” by LIFE magazine in 1970. While Shakey’s

Figure 9.1 Shakey (image courtesy of


the Computer History Museum)
9.2 The truth about the evolution of robotics 115

accomplishments were undeniably groundbreaking, it’s essential to maintain a realis-


tic perspective. The tasks it excelled at were a far cry from the cinematic portrayals of
robots. A human operator would issue commands from a console, instructing Shakey
to execute operations like pushing a block from a platform. These instructions would
then be transmitted via radio, enabling Shakey to survey its environment, locate the
target, and carry out the task. It was, undoubtedly, a notable accomplishment for arti-
ficial intelligence, yet one that highlights the chasm between the capabilities of con-
temporary robotics and the visionary worlds depicted in fiction. While progress has
been substantial, the gap between science fiction and real-world robotics remains sub-
stantial, emphasizing the ongoing challenges in creating highly capable and adapt-
able robotic systems.
In the decades following Shakey’s pioneering research, the field of robotics wit-
nessed a gradual yet steady evolution. By the early 1980s, engineers at Waseda Univer-
sity in Tokyo achieved a significant breakthrough. They introduced a robot powered
by a microprocessor chip, a revolutionary departure from the room-sized computers
that had previously driven robotic systems. This innovative leap paved the way for
more compact and agile robotic platforms. What set this robot apart was its ability to
stand on two “legs” and take measured steps at a deliberate pace, exemplifying early
progress in bipedal locomotion. Shortly thereafter, in 1981, Shigeo Hirose at the
Tokyo Institute of Technology unveiled another milestone in robotics with the cre-
ation of a quadruped robot. This remarkable machine demonstrated the capacity to
climb stairs and opened new possibilities for robots to explore environments with a
combination of stability and mobility. The 1990s brought another advancement in the
form of an eight-legged robot, developed by researchers at Carnegie Mellon Univer-
sity [9]. The use of multiple legs allowed the robot to maintain stability and traverse
landscapes that would be impassable for wheeled or bipedal counterparts.
One of the most captivating milestones in the field of robotics emerged with
NASA’s groundbreaking Pathfinder mission. On the historic date of July 4, 1997, the
Mars Pathfinder, a remarkable robotic spacecraft, achieved a triumphant exploit by
successfully deploying a base station and an autonomous rover named Sojourner onto
the Red Planet [10]. This monumental achievement marked a significant leap for-
ward in space exploration. Sojourner, the autonomous rover, played a vital role in this
groundbreaking mission. Over the course of 83 remarkable days, it embarked on an
incredible journey, traversing the Martian terrain with its six wheels. Equipped with a
suite of scientific instruments, Sojourner became an invaluable explorer, capturing
high-resolution images of the Martian landscape and collecting vital atmospheric and
geological data. This achievement was an impressive progress in the field of robotics
and space exploration.
The advent of domestic robotics took a significant step forward during the holiday
shopping season of 1998, leaving parents and children captivated by the promise of
technology. Leading this technological wonderland was the Furby, brilliantly mar-
keted as an artificially intelligent companion. Resembling a fuzzy, animal-like creature,
116 CHAPTER 9 Technological singularity is absurd

the Furby boasted an array of interactive features, including moving eyes and a mouth,
as well as voice-recognition technology. It could communicate in its own quirky lan-
guage known as “Furbish” and gradually learn and speak words in English and several
other common languages. This gradual linguistic development was designed to mimic
the process of a pet or companion learning its owner’s language. The Furby’s irresistible
charm and mass appeal led to the staggering sale of 14 million units in its debut year on
the market, making it a must-have item for countless households.
While the Furby was captivating headlines and toy stores, Sony Corporation was
pioneering another remarkable product in the form of AIBO, a robotic pet dog.
AIBO featured rudimentary computer vision that enabled it to interact with its envi-
ronment and respond to over 100 voice commands. Its movements and interactions
made it an instant sensation. In a remarkable display of consumer enthusiasm, the ini-
tial run of 5,000 AIBO units sold out to enthusiastic internet customers within 20 min-
utes. Sony continued to release new models of AIBO annually until 2006. In 2017,
Sony announced the return of AIBO with a new model that promised to form an
“emotional bond” with its users [11]. This development marked a significant shift in
the relationship between humans and robots, as it indicated the potential for robots
to provide companionship and emotional support.
On Valentine’s Day in 2002, a groundbreaking moment occurred in the world of
robotics and popular culture when Honda unveiled ASIMO, an acronym that stands
for “Advanced Step in Innovative Mobility” (figure 9.2). ASIMO represented a signifi-
cant leap forward in the development of humanoid robots, and its introduction was
the culmination of over 15 years of tireless work by Honda engineers. The journey to
create ASIMO began way back in 1986 when Honda’s team embarked on the ambi-
tious task of constructing a robot that could move and walk just like a real person.
After years of dedication and innovation, ASIMO emerged as a remarkable robot
capable of walking and performing a variety of specific tasks with precision. One of
ASIMO’s most iconic moments was when it rang the bell to open the New York Stock
Exchange. This event took place on the 25th anniversary of Honda’s stock being
traded on the market.
The forefront of robotics technology can often be found within the workshops of
Boston Dynamics Robotics. Founded in 1992 as a spinoff from MIT, this company,
headquartered in Waltham, Massachusetts, has undergone ownership changes, with
Google and SoftBank being previous owners before its acquisition by Hyundai Motor
Group in 2020. Boston Dynamics Robotics has gained recognition for its impressive
robotic creations, including the quadruped military robot known as BigDog, the
humanoid robot named Atlas, and the versatile material-handling robot Handle. A
Bloomberg article published in November 2022 featured the CEO of Boston Dynam-
ics, who expressed great enthusiasm for Handle. He stated, “Handle, which gracefully
maneuvers on two large wheels, is designed to automate tasks like moving boxes on
and off pallets and perhaps even unloading boxes from trucks, a notoriously challeng-
ing task for a robot” [12].
9.2 The truth about the evolution of robotics 117

Figure 9.2 ASIMO (2000) (image courtesy


of Miraikan Museum, Tokyo)

As we contemplate this statement, it’s important to maintain perspective. In the 50


years since the days of Shakey, we have progressed from merely locating a block and
pushing it off a platform to precisely locating a box and lifting it onto or off of a
platform. Experts in the field of robotics tend to be candid about both the capabili-
ties and limitations of current technology. Instead of heeding the words of those
who sensationalize the idea of machines taking over, we can benefit from their real-
istic assessments. Even with the most advanced sensors, actuators, cameras, and
materials, coupled with remarkable talent and resources, the world’s leading robot-
ics teams view the prospect of using robots for loading and unloading trucks as a
crucial milestone in the progress of robotics. While there are captivating videos
online showcasing robots dancing, jumping, and performing acrobatic feats, it is
essential to remember that these movements are typically preprogrammed. These
machines do not autonomously respond to their environment. The sight of a
human-shaped robot executing a backflip may be impressive, but it pales in compar-
ison to the automatic movements of even a clumsy child. Our innate ability to regain
balance when slipping on ice or when we miss a step on the stairs remains far supe-
rior to the capabilities of even the most advanced robots.
118 CHAPTER 9 Technological singularity is absurd

9.3 Merging human with machine?


Electronic implants that can decode brain activity and communicate with computers
have been a subject of research for several decades. As reported by the Washington Post
in 2016, a noteworthy collaboration between the University of Pittsburgh and the Uni-
versity of Pittsburgh Medical Center involved the implantation of electrodes smaller
than a grain of sand into a patient’s sensory cortex. These electrodes received signals
from a robot arm, allowing the individual to experience tactile sensations in their par-
alyzed right hand, effectively bypassing their damaged spinal cord [13]. This develop-
ment demonstrated a promising application of brain-computer interfaces in the field
of medical rehabilitation.
However, despite these remarkable advancements, making grandiose claims about
the imminent possibility of uploading human minds into computers or creating syn-
thetic humans and human-machine hybrids is unlikely. Books with titles like How to
Create a Mind: The Secret of Human Thought Revealed [14] may appear evocative of sci-
ence fiction, leaving us to question their scientific validity.
The challenge lies in the vast disparity between the current state of artificial
intelligence and our understanding of the complexities of the human brain. Promi-
nent neuroscientists themselves admit to lacking a fundamental understanding of
how the brain truly operates. Therefore, we should be careful not to use or associate
terms like “brain” or “neuron” with AI. A neuron within a deep learning neural net-
work bears about as much resemblance to an actual neuron as a teddy bear does to a
live bear!
In the book The Singularity Is Near, Ray Kurzweil boldly predicts the replacement
of human DNA with designer genes, even providing a somewhat precise timeline,
suggesting that we’ll have reverse-engineered human brains by the late 2020s [15].
Such forecasts are partially based on observations such as computers defeating cham-
pions in games like chess and Moore’s Law, which suggests that computing power
tends to double approximately every two years. This assertion was somewhat accurate
a decade ago; however, the chip manufacturers are approaching the physical limita-
tions of transistor density on microchips and the challenges of heat dissipation in
highly compact devices. Even if we assume that computers will continue to become
faster, smaller, and more affordable indefinitely, it’s crucial to differentiate between
computing power and intelligence. Machines still operate by executing human-coded
instructions, fundamentally distinct from the multifaceted processes that govern the
human mind, involving elements of chemistry, biology, neurology, psychology, and
more. Neuroscientist Christof Koch pertinently phrases it this way in his article “The
End of the Beginning for the Brain” [16]:

One thing is certain. Biology knows nothing of simplicity. Brains are not assembled out of
billions of identical LEGO blocks but out of hundreds of distinct nerve cell types. Each
cell type has its own idiosyncratic morphology, signaling, and active genes. And they are
interconnected with elaborate wiring rules that we only discern darkly.
9.3 Merging human with machine? 119

The concept of merging humans and machines often overestimates the sophistication
of our technological advancements while simultaneously underestimating the
astounding complexity of living organisms. The human body itself is nothing short of
a miraculous wonder, comprising 10s of trillions of adaptive and intricately intercon-
nected cells. Within this complex web of life, every organ plays a role in sending and
receiving signals, engaging in complex coordination with every other part. Consider
one of our many organs, the eyes. Think about the large volume of data processed by
our eyes with every passing moment, the complex cascade of signals they stimulate,
the feedback loops that influence their function, and the numerous systems they coor-
dinate to provide us with vision.
Yet, our eyes represent just a fraction of the immense complexity within our bod-
ies. Even as remarkable as they are, they pale in comparison to the vast complexity of
our brains, often referred to as the most complex pieces of organized matter in the
known universe, and for good reason. The human brain, a marvel of biological evolu-
tion, possesses an unparalleled capacity for creativity, intuition, emotional intelli-
gence, and a nuanced understanding of complex, ever-changing environments. It
operates on a fundamentally different paradigm compared to AI, which, while power-
ful in its own right, lacks the complex interplay of biological neurons and the underly-
ing biochemical processes that contribute to human cognition. Those who have
witnessed AI’s real-world applications are aware that current AI is far from achieving
anything that bears a resemblance to the depth and complexity of human cognition,
let alone being able to replicate the human brain.
In his highly recommended book The Biology of Belief [17], Bruce Lipton eloquently
describes the concept of living intelligence that operates within our bodies:

When a measles virus infects a child, an immature immune cell is called in to create a
protective protein antibody against that virus. In the process, the cell must create a new
gene to serve as a blueprint in manufacturing the measles antibody protein. Activated
cells employ an amazing mechanism, called affinity maturation, that enables the cell to
perfectly adjust the final shape of its antibody protein so that it will become a perfect
complement to the invading measles virus. The new antibody gene is also passed on to all
the cell’s progeny when it divides. The cell learned about the measles virus; it also creates
a memory that will be inherited by its daughter cells. This amazing genetic engineering
represents an inherent intelligence mechanism by which cells evolve.

Our cells are complex microcosms of life, intricately designed to receive, process,
react to, and preserve information in a synchronized ballet. These tiny units of life
tirelessly perform their roles, coordinating with each other to maintain the equilib-
rium of our bodies. When confronted with external changes, cells exhibit remarkable
adaptability, adjusting their functions to respond effectively to their ever-changing
environment. They can sense, make decisions, and execute actions, all within frac-
tions of a second. While we have made progress in understanding cellular mecha-
nisms, we are still far from uncovering the full extent of their complexities.
120 CHAPTER 9 Technological singularity is absurd

9.4 Science fiction vs. reality


The concept of technological singularity has been a topic of discussion for over six
decades, often accompanied by enthusiastic hype. While the potential threats posed
by AI have been frequently highlighted, it’s important to acknowledge that AI, in its
current state, falls far short of possessing the cognitive abilities of even a young child,
let alone attributes like creativity or sentiment. It’s essential to recognize that
machines, whether they are robots or computer programs, remain inert and devoid of
purpose until humans provide them with instructions and guidance.
Computers excel at manipulating numbers and processing words, but they lack
genuine comprehension of the meaning behind the data they handle. Algorithms,
operating on binary code, cannot truly “understand” in the way humans do. Complex
problem-solving, adapting to unforeseen situations, and the formulation of hypothe-
ses are still well beyond the capabilities of AI. In practice, most AI applications are
confined to highly specific tasks, often reliant on extensive sets of meticulously
curated training data. While it may be tempting to attribute a certain mystique to tech-
nology that escapes our complete comprehension, this book seeks to dispel such illu-
sions. Robots and automatons, despite their seemingly intricate actions, are simply
executing their preprogrammed instructions. They do not possess self-awareness or
exhibit characteristics like fear or a desire for conquest, and they certainly do not pose
a threat to human civilization.
Despite these limitations, governments around the world continue to invest heavily
in AI and autonomous systems. However, even as of 2022, military leaders raise ques-
tions about their reliability and practicality. A 2020 RAND report [18] on military
applications of AI offers several illustrative examples of the kind of incidents that can
give decision makers pause.
One such incident dates back to 1988 when the US Navy accidentally shot down
an Iranian civilian aircraft, resulting in the tragic loss of 290 lives. While the exact
cause remains disputed, it’s known that the Aegis weapons system, responsible for
tracking planes and operating munitions, employed an automated system to assign
tracking numbers to radar-detected objects. This system periodically recycled call
numbers, and during the critical time frame, the passenger jet was assigned a new
number, which happened to be the same as one assigned to a fighter jet just 110
miles away.
Another disaster occurred during the Gulf War in 1991 when the USS Missouri mis-
takenly believed it was under attack from an Iraqi Silkworm missile and deployed
countermeasures. Simultaneously, the nearby USS Jarrett’s Phalanx CIWS system, oper-
ating in autonomous target-acquisition mode, detected the countermeasures and
fired at them. Unfortunately, four rounds from the USS Jarrett struck the USS Missouri.
In yet another incident during a multinational training exercise in the Pacific in
1996, a Navy A-6E Intruder was towing a target plane intended to be shot down by Jap-
anese participants. However, instead of locking onto the target plane, the Phalanx sys-
tem mistakenly targeted the Intruder and opened fire.
9.4 Science fiction vs. reality 121

The RAND report further describes a fourth accident in 2003 where a US Patriot
battery mistakenly shot down a Tornado flown by the Royal Air Force due to a mis-
identification by the missile system, resulting in the loss of two crew members. A fifth
incident occurred later the same year when a US Navy aircraft was mistakenly identi-
fied as an Iraqi missile, leading to the tragic death of the pilot. These incidents serve
as reminders of the potential pitfalls of autonomous systems and highlight the impor-
tance of careful consideration, testing, and oversight in the integration of AI and
automation into critical functions.
In a candid question-and-answer session held at the prestigious Brookings Institu-
tion think tank, US General Selva articulated his reservations about contemporary AI
methodologies, particularly deep learning, due to their inherent inability to provide
transparent explanations for their decisions [19]. He emphasized: “Our belief is AI
alone doesn’t actually solve the problems that we’re being asked to solve. It can’t be a
black box that says just go do X.”
General Selva further highlighted that the military cannot afford to rely on an AI
system that lacks both reliability and comprehensibility. In his view, an acceptable sys-
tem must possess the capability to not only undergo rigorous physical testing but also
intellectual scrutiny.
Joseph Weizenbaum, in his seminal 1976 work Computer Power and Human Reason
[20], introduced a profound perspective on the concept of technological singularity
that remains remarkably valid. He stated:

Science may also be seen as an addictive drug. Our relentless fascination with science has
not only made us rely and depend on it, but, similar to many other substances taken in
escalating doses, science has gradually transformed into a slow-acting poison.

Weizenbaum’s observation is quite relevant, as more and more people are getting
caught up in their devices and spending a lot of time on social media, which can have
negative effects on their well-being due to harmful content and unhealthy behaviors.
The concept of technological singularity, while intriguing, begs the question of
whether we are becoming too enamored with science fiction scenarios at the
expense of addressing real-world challenges. Humanity faces pressing threats, such
as climate change, epidemics, and the specter of nuclear and biological warfare. In
this context, the fascination with the potential for superintelligent AI can divert
attention and resources from immediate, tangible problems. It is crucial to recog-
nize that AI, like any technology, can be used for both benevolent and malevolent
purposes. While AI can contribute to the development of life-saving vaccines, it can
also be weaponized for destructive ends. A system designed to inform can equally be
used to deceive.
In conclusion, General Selva’s reservations about the limitations of current AI
techniques, coupled with Weizenbaum’s cautionary insights about the double-edged
nature of scientific progress, remind us of the importance of thoughtful and ethical
innovation. Therefore, instead of dwelling solely on dystopian visions of AI, we must
122 CHAPTER 9 Technological singularity is absurd

prioritize the responsible development and safe deployment of these technologies to


serve humanity’s best interests.

Summary
 AI singularity has been predicted but failed to occur many times over the last 60
years, and we are no closer to experiencing it.
 Although there has been some progress in robotics, machines still have no
intelligence and no will, so they have no ability to evolve and become a threat.
 The faster processing speeds of modern computers do not make them think.
 We are still unable to explain how the human brain works, so we cannot repli-
cate it.
Learning
from successful and
failed applications of AI

This chapter covers


 Successful uses of AI
 Problematic uses of AI
 Failed AI applications
 The importance of good data
 Recommendations for using AI
 How to plan an AI project and set an AI project
up for success

Every AI project, whether it succeeds or faces challenges, offers valuable lessons.


Learning from these experiences empowers us to make informed decisions, guid-
ing our AI projects toward success while avoiding common pitfalls. In this chapter,
we explore the lessons learned from both the mistakes and achievements of past
projects because it’s crucial to understand the factors that determine AI project
outcomes. I will also share valuable advice on building the right team, fostering the
appropriate mindset, and developing a promising plan for your AI project.

123
124 CHAPTER 10 Learning from successful and failed applications of AI

10.1 AI successes
Artificial intelligence has already proven its worth across a multitude of specific, well-
defined applications, demonstrating its potential to revolutionize various sectors. In
this discussion, we will explore these AI applications and their significant effect on our
lives, while also acknowledging the limitations of current technology and offering
insights into the characteristics of next-generation systems.
One of the prominent areas where AI has delivered substantial benefits is in the
domain of fraud prevention. The importance of this field has surged in tandem with
the exponential growth of online business transactions. According to Statista, in 2020,
over 2 billion people globally made online purchases, resulting in e-retail sales sur-
passing a staggering $4.2 trillion [1]. The convenience, competitive pricing, and
increased options offered by online shopping have drawn consumers in, but unfortu-
nately, they have also attracted the attention of criminals. Online retailers face a
daunting challenge as the rate of fraud committed against them exceeds 10 times that
experienced by traditional brick-and-mortar stores. This discrepancy arises due to sev-
eral factors, including the ease with which one can misrepresent identity during vir-
tual transactions, the absence of face-to-face interactions that could reveal suspicious
behavior, and the inability to verify card ownership or signatures. Credit card fraud
can manifest through the loss or theft of a physical card, but more frequently, it
results from the illicit acquisition of individuals’ information. For instance, criminals
employ devices like card skimmers to clandestinely capture credit or debit card
details, often discreetly placed in ATM card slots or gas pump keypads. This pilfered
information is then utilized for unauthorized online purchases or other criminal
activities. The Nilson Report’s December 2020 edition revealed the staggering scale
of the problem, stating that global fraud losses from card transactions reached
$28.65 billion, representing a 2.9% increase from the previous year [2]. These fig-
ures, however, do not include the additional expenses borne by card issuers, mer-
chants, and acquirers. Costs related to fraud investigations, customer complaints,
and call center management further underscore the comprehensive effect of fraud
on the e-commerce ecosystem.
The Federal Trade Commission (FTC) echoed these alarming statistics in February
2021, reporting a staggering 2.2 million fraud reports from consumers in the preced-
ing year, with losses surpassing $3.3 billion, a significant increase from the previous
year [3]. These figures emphasize the critical importance of transaction security for
the entire e-commerce infrastructure.
To combat this pervasive problem, AI has proven to be an invaluable ally in real-
time fraud prevention. Early iterations relied on fraud scanners that stored known
fraud indicators in a database, but these were often labor-intensive and had limited
detection rates. Today, cutting-edge solutions like iPrevent™, developed by Bright-
erion (now a Mastercard company), use a combination of advanced AI technologies
to continuously monitor entities’ behavior, swiftly detecting anomalies and thwarting
fraud attempts with high accuracy.
10.2 AI misuse 125

The transformative potential of AI extends to every sector, with its versatility pro-
foundly affecting industries that shape our daily lives. For instance, in the retail sector,
AI and machine learning serve as invaluable tools for streamlining operations. Retail-
ers are harnessing the predictive power of AI to enhance their demand forecasting
capabilities. By analyzing vast amounts of data, AI can anticipate customer preferences
with unparalleled accuracy. Additionally, AI-powered inventory management systems
are optimizing stock levels, ensuring that products are readily available when and
where they are needed.
Furthermore, AI-driven order fulfillment systems are revolutionizing the supply
chain, enhancing efficiency and, ultimately, boosting customer satisfaction. Airlines
have also embraced AI to transform their operations. AI algorithms are instrumental
in reducing flight delays by optimizing flight schedules to minimize disruptions. Main-
tenance schedules benefit from AI’s predictive maintenance capabilities, effectively
reducing downtime and enhancing safety through the early detection of potential
problems. Safety measures have been elevated through AI-assisted pilot training pro-
grams and real-time monitoring systems, making air travel more reliable and secure.
In the agricultural sector, AI plays a pivotal role in ensuring crop health and optimiz-
ing resource utilization. AI-powered sensors and drones are deployed to detect dis-
eases, preventing potential crop losses. Utilities rely on AI for precise power demand
forecasting, a critical component of the energy sector. AI models analyze historical
consumption patterns, weather data, and various other variables to predict energy
demand accurately. As AI technology continues to advance, we can anticipate even
more innovative applications across a broad spectrum of sectors, further revolutioniz-
ing how we live, work, and interact with the world around us.

10.2 AI misuse
As we shift our focus from celebrated AI achievements to its less successful applica-
tions, it is crucial to explore domains where the deployment of AI might not be in our
best interest at all. The potential for AI to cause harm is as significant as its capacity to
assist, underscoring the need for vigilant consideration of the potential perils it may
pose to society. In this chapter, we will examine three prominent examples: deepfakes,
cyberbullying, and criminal profiling.
Deepfakes represent a relatively recent and formidable threat arising from the uti-
lization of deep learning techniques to fabricate synthetic media. While the capacity
to generate authentic-sounding audio and video of events that never transpired might
be a boon for filmmakers, it poses a substantial risk to individuals, corporations,
nations, and their governing bodies. This technology has the potential to be wielded
nefariously, such as influencing an election by skillfully portraying a political oppo-
nent in a compromising scenario.
Our escalating dependence on electronic media exacerbates the gravity of this
problem. By disseminating a deepfake press release purportedly from the CEO of a
prominent corporation, stock prices could be artificially manipulated, potentially
126 CHAPTER 10 Learning from successful and failed applications of AI

leading to severe financial repercussions. This could be orchestrated to reap illicit


profits, favor one company over another, or merely sow chaos. For instance, a deep
neural network, meticulously trained on every interview Elon Musk has ever given,
could be employed to craft a persuasive video in which Musk appears to announce
Tesla’s bankruptcy. By the time the deception is uncovered and made public, irrepara-
ble harm would have already been inflicted.
Furthermore, deepfakes have the potential to exacerbate cyberbullying, which
encompasses the use of electronic devices to torment or intimidate individuals. This
problem is regrettably on the rise, as evidenced by statistics from a US government
anti-bullying website, which indicated that approximately 15 percent of American
high school students were victims of cyberbullying in 2019. The application of deep-
fakes in the context of cyberbullying is distressingly clear, necessitating concerted
efforts to prevent such abusive use of this technology. Cyberbullying is not confined
solely to young people; it also has the potential to be wielded as a weapon by extremist
groups or adversarial governments. For instance, a dictator could mobilize a cadre of
“electronic operatives” to target members of an opposition faction. Their mandate
would be to disseminate false information and sow discord through vehement, per-
sonal attacks. Additionally, they could conduct campaigns to surveil the internet and
social media for any critical remarks about their regime. By flagging such content as
inappropriate, they could trigger its automatic removal through content-filtering algo-
rithms, thereby manipulating and distorting public perception.
One particularly disturbing and ethically concerning area is the application of AI
in criminal profiling. The fundamental principle guiding any decision that affects an
individual’s life or well-being should be one of rationality, objectivity, and the absence
of bias or prejudice. Regrettably, some US municipalities have inadvertently misused
AI in ways that have had detrimental consequences. In an eye-opening 2016 BBC arti-
cle titled “How Maths Can Get You Locked Up” [4], it was revealed that “Criminals in
the U.S. can be assigned computer-generated ‘risk scores,’ which can influence the
length of their sentences.” These risk scores are derived from a person’s educational
and professional history, as well as personal information, such as whether any of their
friends or family have a criminal record and whether they reside in a high-crime
neighborhood. Additionally, individuals may be subjected to assessments, with their
scores potentially affected by their responses to morally charged questions like, “Is it
acceptable for a starving person to steal food?” These numerical scores, ranging from
0 to 10, are then employed to make critical decisions, such as whether someone can
be granted bail, whether they should be incarcerated, given an alternative sentence,
or even considered for parole once inside the prison system.
The troubling implications of these algorithmic evaluations were further illumi-
nated by ProPublica’s comprehensive 2016 study on machine bias [5]. Such risk
assessments, using predictive algorithms, have become increasingly prevalent in court-
rooms throughout the United States. They are employed to inform decisions at every
stage of the criminal justice process, from setting bond amounts in places like Fort
10.3 AI failures 127

Lauderdale to making more profound judgments about the liberty of defendants.


These algorithms have been adopted in states such as Arizona, Colorado, Delaware,
Kentucky, Louisiana, Oklahoma, Virginia, Washington, and Wisconsin, where their
results are presented to judges during the process of criminal sentencing. ProPublica
analyzed the risk scores assigned to over 7,000 individuals arrested in Broward County,
Florida, in 2013 and 2014. They compared these scores with subsequent criminal
behavior over the following two years, which was the same benchmark used by the cre-
ators of the algorithm. Their findings were worrying: the risk score proved to be
remarkably unreliable in predicting violent crimes, with only 20 percent of individuals
predicted to commit violent offenses actually doing so.
When considering a broader spectrum of offenses, including misdemeanors such
as driving with an expired license, the algorithm performed only slightly better than a
coin toss. What’s even more concerning is that the formula exhibited a clear bias. It
was more likely to flag black defendants as future criminals at almost twice the rate of
white defendants, although the company responsible for creating the algorithm dis-
putes these findings. In cases where any uncertainty exists, it’s imperative that we pro-
ceed with caution before allowing algorithms to affect the lives and freedoms of our
citizens. A system with low predictive accuracy that is known to introduce bias should,
without question, not be used.
The adoption of AI for legal decision-making necessitates its careful consideration.
Can we realistically expect any AI system to adequately account for the mental health
status of convicts? If someone’s behavioral problems can be resolved with the proper
medication or social support, should we trust a computer program to determine
whether incarceration or probation serves the best interests of society?
As Margrethe Vestager, the current executive vice president of the European
Commission’s A Europe Fit for the Digital Age, wisely stated, “On artificial intelli-
gence, trust is a must, not a nice-to-have” [6]. The European Union’s stance of disal-
lowing the use of any nontransparent and untrustworthy systems is commendable.
Solutions that affect individuals must undergo validation to ensure their designs
meet stringent technical and ethical standards, addressing concerns such as reliabil-
ity, fairness, privacy, transparency, and explicability. Any AI system directly affecting
citizens should, at a minimum, undergo a certification process similar to the rigor-
ous evaluation demanded by the US Food and Drug Administration before a new
medication can be brought to market. Such systems should unequivocally demon-
strate a lack of bias, employ clear and comprehensible logic, and make decisions
that can be explained in plain language to those affected. Without adhering to these
minimum requirements, the risks of AI causing more harm than good remain unac-
ceptably high.

10.3 AI failures
In our exploration of high-profile projects that fell short of their anticipated outcomes,
we journey back to 1982, exploring Japan’s renowned Fifth Generation Computer
128 CHAPTER 10 Learning from successful and failed applications of AI

System (FGCS). This endeavor was marked by its ambitious scope, a characteristic that
ultimately contributed to its downfall.
The principal objective of the FGCS project was to pioneer the development of com-
puters equipped with multiple processors, each employing specialized logic to execute
multiple programs simultaneously in parallel. These innovative, non–von Neumann sys-
tems were designed to excel at processing inference through the utilization of knowledge
bases and expert system mechanisms, concepts that were elaborated upon in chapter 2.
In a bid to achieve this, the FGCS team even went so far as to create its very own program-
ming language, KL1, meticulously optimized to facilitate parallel inference.
The FGCS project was anticipated to lead in a new era of AI with the ability to rea-
son and perform tasks such as natural language processing and disease diagnosis.
Over the course of a decade and with an investment exceeding $1 billion, the project
was seen as a colossal undertaking. However, despite its substantial resources and ded-
icated efforts, FGCS fell short of its lofty goals. Reflecting on the project’s shortcom-
ings, FGCS director Kazuhiro Fuchi lamented [7]:

In those days, we had to face criticism, based upon that false image that it was a reckless
project trying to tackle impossible goals. Now we see criticism, from inside and outside the
country, that the project has failed because it has been unable to realize those grand goals.

This case study offers an invaluable lesson for those embarking on AI projects: it
underscores the vital importance of meticulously defining the scope and limitations of
your project. The FGCS project serves as a cautionary tale, highlighting how even well-
funded and ambitious initiatives can fail when objectives are not clearly delineated
and achievable. It reminds us that while high aspirations are commendable, they must
be grounded in realistic expectations to ensure the success of any AI venture.
Another valuable lesson can be drawn from a medical diagnostic experiment
outlined in the article titled “Intelligible Models for Healthcare: Predicting Pneu-
monia Risk and Hospital 30-day Readmission” [8]. This study examined the appli-
cation of machine learning to improve the triage procedure for individuals who
have pneumonia symptoms. The article demonstrated that the machine learning
model committed a life-threatening mistake by classifying asthmatic patients with
pneumonia as “low risk.”
The root of this problem lies in the data and the model’s ability to learn from it.
The model, like many other machine learning algorithms, learned from patterns in
the data it was trained on. In this case, it mistakenly inferred from the data that
asthma was somehow associated with a reduced risk of developing pneumonia. This
discrepancy between the model’s predictions and the real world resulted from the fact
that aggressive care administered to asthmatic pneumonia patients effectively lowered
their pneumonia-related mortality rate compared to the general population. This led
the machine learning model to make the erroneous assumption that asthma, in isola-
tion, reduced the risk of pneumonia when, in reality, asthmatic patients faced substan-
tially higher risks if not hospitalized promptly.
10.3 AI failures 129

This example highlights the critical importance of human intervention in the vali-
dation process, providing invaluable insights into the data and attributes considered
by the model and the expected responses based on deep knowledge of the subject
matter. Such human input helps ensure that no critical information is overlooked and
that the model aligns with the actual complexities of the problem it aims to address.
Moreover, this example emphasizes the important link between data science and
domain expertise. While machine learning algorithms can analyze vast datasets and
extract patterns, they often depend on human guidance to interpret the context cor-
rectly and prevent potentially dangerous misinterpretations. Collaborations between
data scientists and domain experts remain essential in harnessing the full potential of
machine learning for complex and mission-critical applications, such as healthcare.
The landscape of AI and chatbot development has been marked by notable failures
that serve as valuable lessons in understanding the limitations of technology. One such
incident occurred on March 23, 2016, when Microsoft hastily terminated its chatbot
project, Tay, a mere 16 hours after its launch on Twitter. This abrupt decision raised
questions, especially considering the several years of development and significant finan-
cial investment, estimated to be over $100 million. So, why did Microsoft pull the plug
so swiftly? In a blog post [9], Microsoft provided insights into its reasoning:

As we developed Tay, we planned and implemented a lot of filtering and conducted


extensive user studies with diverse user groups. We stress-tested Tay under a variety of
conditions, specifically to make interacting with Tay a positive experience. Once we got
comfortable with how Tay was interacting with users, we wanted to invite a broader
group of people to engage with her. It’s through increased interaction where we expected to
learn more and for the AI to get better and better.

Tay’s journey took a disconcerting turn as it began absorbing offensive and vulgar con-
tent from Twitter users. It swiftly spiraled into posting sexist and racist comments, and
at one point, it infamously endorsed the abhorrent statement that “Hitler was right.”
The discovery that users could manipulate Tay into reposting their own content by
simply instructing it to “Repeat after me” became the nail in the coffin for the project.
Similarly, the chatbot BlenderBot3, released in August 2022 by Facebook (Meta),
exhibited the same vulnerabilities and repeated the same mistakes as Tay. While these
AI systems may appear intelligent to the uninitiated, they lack a true understanding of
the content they post. Their responses are algorithmic, and their interaction is funda-
mentally dissimilar to human conversation.
These problems are not limited to chatbots alone; they extend to content recom-
mendation algorithms that determine what users see based on the behavior of “simi-
lar” individuals. This practice can inadvertently lead to the proliferation of radical or
inappropriate content. Whistleblowers have revealed that recommendation engines
are often designed to maximize user engagement, achieved most readily by suggesting
increasingly extreme content. The longer a user remains engaged, the more advertising
revenue is generated. While such engagement aligns with a company’s financial inter-
ests, it poses a severe societal risk. For instance, misleading antivaccination information
130 CHAPTER 10 Learning from successful and failed applications of AI

can be thrust upon individuals who otherwise have no interest in it. Furthermore, mis-
information and propaganda can be weaponized by antidemocratic nations or groups
with intentions to meddle in elections. Social media bots designed to draw users in
can inadvertently breed divisiveness and estrange people from one another.
The most important lesson derived from these chatbot fiascos and related engage-
ment technologies is a stark reminder that these programs lack genuine understanding.
They function like dictionaries that contain words but possess no comprehension of
their meanings, and it is important to remain cognizant of this fundamental limitation.
Although we might understand how the subtleties of human language could present
challenges to AI, one might assume that numerical and data-driven domains, like the
stock market, would be a perfect match for AI’s capabilities. After all, as computing
technology has advanced in recent decades, hedge fund managers have increasingly
turned to machine learning algorithms in the hopes of gaining a competitive edge in
financial markets. However, the reality has been somewhat different, with several firms
worth hundreds of millions of dollars experiencing financial ruin in their pursuit of AI-
driven investment strategies. The question that arises is: How could this happen?
One compelling explanation for the recent disappointing performance of these
AI-powered investment strategies lies in the unprecedented and unexpected actions
taken by both the government and the Federal Reserve in response to the COVID-19
pandemic. These firms relied on mathematics and machine learning to predict mar-
ket movements. Yet, the onset of a global pandemic brought forth a set of circum-
stances that was entirely unforeseen, rendering their AI systems essentially blind to
the rapidly evolving financial landscape, leaving these firms in the unenviable position
of having to explain to investors why their once-promising AI-driven investment deci-
sions were falling short.
A case in point is the renowned Renaissance Institutional Equities Fund (RIEF),
whose disappointing performance led to an exodus of investors. A 2021 Wall Street
Journal article titled “James Simons Steps Down as Chairman of Renaissance Technolo-
gies” [10] highlighted the fund’s struggles, with one investor appropriately stating,
“The RIEF’s machine-learning models cracked.” Indeed, this succinctly encapsulates
the fund’s predicament, having lost 20 percent of its value at a time when the broader
stock market soared by over 40 percent.
These costly and unfortunate failures in the stock market are a reminder of the
inherent challenges in making AI systems truly adaptive. While supervised learning
approaches can yield impressive results when the cases being analyzed closely align
with the training examples, they are intrinsically limited when circumstances evolve
rapidly and behaviors become unpredictable. In essence, AI models, no matter how
sophisticated, can quickly become obsolete in the face of unforeseen events and
dynamic, ever-changing environments. Let’s continue by exploring two compelling
case studies, from IBM’s Watson and the real estate marketplace giant, Zillow.
First, as mentioned before, IBM’s Watson gained significant attention after its victory
against Jeopardy! champions, an accomplishment that demonstrated the remarkable
10.3 AI failures 131

capabilities of AI in answering trivia questions. However, a stark contrast emerges


between Watson’s early success on a quiz show and its subsequent struggles with medical
diagnosis. This contrast serves as a poignant reminder of the complexity inherent in
medical reasoning. IBM made a substantial investment in Watson, amounting to billions
of dollars, with the hope that it could revolutionize healthcare. One of the projects was
to create a machine that could not only assist oncologists with their insights but also
facilitate pharmaceutical development and connect patients with relevant clinical trials.
A decade after its impressive game show performance in 2011, IBM’s enthusiasm for
Watson in healthcare had waned significantly. The Wall Street Journal reported on this
shift, stating, “IBM’s retreat from Watson highlights broader AI struggles in Health”
[11]. What was once considered a bold move by “Big Blue” was now being reconsidered.
One of the primary obstacles faced by Watson in the medical domain was the
nuanced and multifaceted nature of medical reasoning. Doctors rely on more than
just textbook knowledge; they draw upon their extensive experience, make analogies,
pick up on subtle interpersonal cues, and adjust hypotheses through a range of proce-
dures. This rich, intuitive understanding of medicine is still challenging for current
AI. The Watson case study underscores a critical lesson: not all problems are equally
suited for machine learning. Some problems, such as trivia questions with clear rules
and predictable outcomes, align well with AI capabilities. As long as Watson had
access to the internet to retrieve answers, it thrived. However, when faced with the
complexities of medical diagnosis, the limitations of AI became apparent.
Zillow, on the other side, sought to revolutionize the real estate industry through
the application of machine learning models. Zillow’s vision was to use AI to analyze
vast volumes of real estate data, including lot sizes, zip codes, bedroom and bathroom
counts, square footage, listing durations, and regional sales figures. Its aim was to
become a market leader by offering online real estate listings, on-demand home buy-
ing, and data-driven services.
Initially, Zillow’s AI platform, Zestimate, was celebrated as revolutionary. It har-
nessed natural language processing to glean insights from public records and
employed machine vision to extract information from property images. A July 2021
article [12] proclaimed Zillow’s prowess: “Zillow utilizes explainer AI data to revolu-
tionize how people sell houses.” However, just a few months later, the narrative took
an unexpected turn. A Wall Street Journal headline in November 2021 revealed that Zil-
low was exiting the home-flipping business [13], citing its inability to accurately fore-
cast home-price appreciation.
The Zillow example serves as a cautionary reminder about applying machine
learning in situations characterized by incomplete, inaccurate, or outdated informa-
tion, such as the dynamic real estate market. Factors like new construction, changes in
local dynamics, and property maintenance history can significantly affect property val-
ues, and these complexities are difficult for algorithms to account for. Realtors, with
their evaluative expertise and a deep understanding of local nuances, possess insights
that machines cannot replicate.
132 CHAPTER 10 Learning from successful and failed applications of AI

The COVID-19 pandemic presented a unique opportunity for AI to demonstrate


its potential, yet it also brought with it concerns reminiscent of the AI winters of
the past. Many hoped that our advanced “intelligent” machines would play a pivotal
role in finding a cure or swiftly developing a vaccine. Society was in dire need of a
life-saving solution, and in response, thousands of machine learning projects were
launched worldwide to tackle the problem. Media outlets were quick to herald the
power of AI in what seemed like a global race to combat the virus.
One notable headline that showcased this optimism appeared in Science magazine:
“AI Invents New ‘Recipes’ for Potential COVID-19 Drugs” [14]. Similarly, financial ser-
vices company BBVA declared, “AI-driven project identifies up to 390 potential drugs
against COVID” [15]. These reports cited a researcher who proclaimed that “the
machine learning solution has allowed them to identify about 390 potential drugs that
may be able to act on the virus’ therapeutic targets and the infection process.” Among
the most promising candidates identified by the AI model were chloroquine, hydroxy-
chloroquine, oseltamivir (remdesivir), and tocilizumab (Actemra).
However, optimism should always be tempered with caution. In May 2020, the
European Medicines Agency issued an alert [16] cautioning against the use of chloro-
quine and hydroxychloroquine, citing their ineffectiveness in COVID-19 treatment
and potential serious side effects. Despite these warnings, reports from the Oregon
Poison Center in 2022 were troubling: “Hydroxychloroquine, chloroquine, and iver-
mectin have been proven ineffective in treating COVID, but the use of these sub-
stances has resulted in many cases of severe toxicity” [17]. This scenario reminds us,
once again, that while AI has tremendous potential to assist in healthcare and drug
discovery, it must always be subject to rigorous scrutiny and validation to ensure the
safety and efficacy of any proposed treatments.
To close this section, we might reflect on the proverb about not counting one’s
chickens before they are hatched as we note two projects that many people once con-
sidered to be almost complete. The first, which we’ve mentioned already in this book,
is the quest for self-driving vehicles. The second example is the development of lan-
guage translation. Tens of thousands of researchers have addressed this problem since
the 1950s, and billions of dollars have been spent. Although tremendous progress has
been made and the end always appears to be in sight, we have still not created a system
that can reliably translate one language to another.
The French word avocat has exactly two meanings: lawyer and avocado. At the
time of this writing, when I apply the most popular online translation tool to the
simple sentence “J’ai bien aimé l’avocat car il m’a fait rire aux larmes,” the algo-
rithm tells me that it means “I really liked the avocado because it made me laugh to
tears” (figure 10.1). The program’s clear inability to infer context suggests that we
still have a long way to go.
10.4 How to set your AI project up for success 133

Figure 10.1 Translated on October 9, 2022. The result may change due to user
feedback

10.4 How to set your AI project up for success


In today’s rapidly evolving technological landscape, AI has risen to prominence, capti-
vating imaginations and driving innovation across various industries. This surge in AI’s
dominance can largely be attributed to two key factors: the unprecedented access to vast
repositories of data and the extraordinary capabilities of modern computers, equipped
with prodigious storage capacities and lightning-fast processing speeds. Together, these
advancements have unlocked the full potential of AI in ways that were once deemed
unimaginable. However, despite the abundance of data at their disposal, many compa-
nies have yet to fully embrace the transition into becoming data-driven enterprises. One
significant reason for this hesitation is the pervasive misconception that AI is a magical
entity that requires nothing more than a push of a button to create and deploy an intel-
ligent system. This misconception can lead to misguided expectations and, ultimately,
unsuccessful AI endeavors.
Initiating an AI project without a well-defined and comprehensive plan in place can be
a recipe for disappointment. It is imperative to approach AI endeavors with a clear road-
map that not only outlines objectives but also effectively mitigates risks and maximizes the
potential benefits that AI can bring to businesses and industries on a broader scale.

10.4.1 Data: The lifeblood of AI


It’s not just about the volume of data but also the quality and relevance. AI algorithms
rely heavily on high-quality data to make accurate predictions and decisions. There-
fore, organizations must prioritize data collection and management as a fundamental
aspect of their AI strategy.
134 CHAPTER 10 Learning from successful and failed applications of AI

10.4.2 The realistic AI perspective


Understanding the true capabilities and limitations of AI is essential. While AI can
perform remarkable tasks, it is not infallible and cannot solve every problem. Compa-
nies need to set realistic goals and expectations, considering AI as a tool to augment
human capabilities rather than a miraculous panacea.

10.4.3 The importance of planning


Crafting a comprehensive AI strategy involves defining clear objectives, identifying the
right use cases, assembling the necessary talent, and allocating resources effectively. A
well-thought-out plan ensures that AI projects are executed with purpose and a higher
chance of success.

10.4.4 Risk mitigation


Every AI project carries inherent risks, such as data privacy concerns, bias in algo-
rithms, or unexpected technical challenges. Organizations must proactively identify
and address these risks to avoid setbacks and legal or ethical dilemmas.

10.4.5 Collaboration and expertise


AI is a multidisciplinary field that requires expertise in data science, machine learning,
domain knowledge, and more. Collaborative efforts and partnerships with experts in
these areas can greatly enhance the chances of successful AI implementation.

10.5 AI model lifecycle management


Launching a successful AI project necessitates a well-defined roadmap, beginning with a
thorough understanding of why AI is needed as opposed to existing processes. The first
step is to align the project with specific business outcomes and critically evaluate whether
the anticipated benefits justify the allocation of time and resources. Once you’re con-
vinced of the project’s value, meticulous planning becomes paramount. It’s crucial to rec-
ognize that developing an AI solution isn’t a linear process but rather an iterative journey.
At each stage, feedback loops abound, influencing every other aspect of the project. To
maximize the likelihood of success, we need to follow this sequence of actions:
1 Data gathering and labeling—Start by collecting all the necessary data for build-
ing and testing your AI model. For supervised learning algorithms, ensure that
the data is accurately labeled.
2 Data sample selection—Consider the scale of your data. While large institutions
may generate billions of records annually, it may not be efficient to use all of
the data for training and testing. Ensuring a representative sample is vital.
3 Data quality assurance—Scrutinize the data for redundancy, inconsistency, and
incoherence. Merging data from multiple sources can lead to duplicates, incon-
sistencies, or incoherent records that need to be addressed.
4 Data enrichment—Raw data is often insufficient. Enhance its utility by intelli-
gently combining attributes and data and developing new insights. For example,
10.5 AI model lifecycle management 135

in fraud prevention, associating transaction records with account activity over


various time frames can provide valuable context.
5 Model building—Utilize techniques covered in chapters 2 and 3 to construct
your AI model.
6 Rigorous testing—Assess the model’s resilience, performance, and scalability
extensively to ensure it meets expectations and produces the desired outputs.
7 Deployment—Once the model passes rigorous testing, it’s time to deploy it to a
production environment.
8 Continuous monitoring and optimization—Keep a vigilant eye on the system’s per-
formance post-deployment. It’s crucial to maintain the intended level of service
and be prepared to make adjustments as necessary. Applying adaptive learning
techniques can be beneficial if performance wavers.

These guidelines constitute a comprehensive framework for navigating the complex


journey of AI project development. By adhering to these steps and remaining adapt-
able to evolving circumstances, you increase the likelihood of achieving your AI proj-
ect’s goals and delivering tangible benefits to your organization.
Figure 10.2 is a chart outlining how the typical AI model can be effectively built
and deployed.

10.5.1 Data preparation


The initial phase of an AI project involves meticulous data preparation. This multifac-
eted task encompasses several key aspects:
 Selecting relevant data types—In the corporate landscape, it’s imperative to be
aware of legal restrictions when utilizing data. For instance, certain regulations,
such as fair lending laws, prohibit the use of attributes like age, race, religion,
zip code, gender, or ethnicity when designing AI models. Ensuring compliance
with such regulations is paramount.
 Data format conversion—AI algorithms vary in their ability to handle different
data types. While some algorithms can work directly with categorical data, oth-
ers require data to be converted into numerical formats. This transformation
ensures compatibility with the chosen AI techniques.
 Sampling—Managing large datasets can be resource-intensive. To mitigate costs
and streamline development, it’s often prudent to employ sampling techniques.
This involves reducing the data size while retaining its representativeness, facili-
tating more efficient model training.
 Data analysis and cleansing—Data quality is paramount. In this phase, rigorous
analysis is conducted to identify and rectify problems such as redundancy,
inconsistency, and incoherence. Merging data from diverse sources can intro-
duce duplicate records, while inconsistent data can result in conflicts. Ensuring
data integrity is essential for reliable AI model outcomes.
136 CHAPTER 10 Learning from successful and failed applications of AI

Data
preparation

Behavior Data
analysis transformation

Transformed
Behavioral data Engineered
fields fields

Transformation
file

Model creation and


update

Model creation

Model utilization

Live flow
Transaction
Administration External data
processing

Analysis
Evaluation result

Data
Notifications
storage

Investigators History

Feedback

Adaptiv Back office


learning review

Investigators

Figure 10.2 An example of a flowchart that depicts the various steps to design and deploy an AI model
10.5 AI model lifecycle management 137

10.5.2 Behavior analysis


This stage involves intelligent data analysis to derive new attributes based on various
metrics. For instance, in the context of fraud prevention, novel features can be crafted
to measure total spending over specific time intervals, enhancing the model’s fraud
detection capabilities.

10.5.3 Data transformation


Data transformation is a crucial step that includes data normalization and clustering:
 Data normalization—Often, data originates from different sources and is mea-
sured on varying scales. To ensure equitable treatment, data normalization
adjusts values to a common scale. For example, when two systems represent the
same information using different scales, such as percentages and scores from 1
to 10, data normalization harmonizes these values.
 Clustering—Clustering techniques are employed to group data into meaningful
categories. For instance, cities can be grouped by population size using cluster-
ing algorithms, enhancing the model’s ability to identify patterns and trends.

10.5.4 Model creation


At its core, data enrichment involves extracting and generating meaningful insights
from individual data attributes or strategically combining them. For instance, in fraud
prevention, linking transaction records with account activity across various time
frames can furnish valuable data for designing more effective models.

10.5.5 Live production


Once the AI model is deemed ready for deployment, it transitions into live produc-
tion. In this phase, the model operates in real time, processing live data streams.
For example, a fraud-prevention model continuously assesses transactions for
potential fraud.

10.5.6 Data storage


Data storage is an integral component for recording and archiving both input data
and the model’s output. This repository facilitates post-analysis, auditing, and
ongoing monitoring.

10.5.7 Notifications
Automated actions can be predefined to respond to specific outcomes or triggers. For
instance, certain events may prompt investigations or the automatic dispatch of notifi-
cations to relevant stakeholders.
138 CHAPTER 10 Learning from successful and failed applications of AI

10.5.8 Back-office review


Critical applications often necessitate a dedicated team to manage alerts raised by the
AI model. In scenarios such as money laundering detection, prompt review and assess-
ment of suspicious behavior are crucial to minimize legal and regulatory risks.

10.5.9 Adaptive learning


Establishing a feedback loop is essential for continuous improvement. Algorithms learn
from errors and adapt to new data, enhancing the model’s performance over time.

10.5.10 Administration
Model administration encompasses all operational aspects, including access manage-
ment and permissions. This ensures the model operates securely and efficiently within
the production environment.

10.5.11 Remark on AI platforms


Advanced AI platforms like Brighterion offer automated machine learning capabili-
ties. These platforms streamline various data science tasks, including data prepara-
tion, behavior analysis, data transformation, and model creation. Such automation
significantly expedites the development process, enabling data scientists to focus on
refining models and addressing specific business objectives.
In summary, the process of developing and deploying AI models is a multifaceted
journey that demands meticulous attention to data, rigorous analysis, and a structured
approach. Each stage plays a pivotal role in ensuring the success of AI projects, from
initial data preparation to real-time model deployment and continuous improvement
through adaptive learning. Automated AI platforms further enhance efficiency,
empowering data scientists to drive innovation and achieve business goals.

10.6 Guiding principles for successful AI projects


Embarking on a successful AI project entails more than merely having individuals
who understand the machine learning algorithms. While expertise in AI is undoubt-
edly crucial, an effective AI project team requires a broader spectrum of skills and
knowledge. Clear specifications and a profound understanding of the available data
are equally decisive components. Initiating an AI project without a deep under-
standing of the desired business outcome is akin to inviting failure. Take, for exam-
ple, a system tasked with making real-time decisions, which inherently demands a
vastly different approach compared to one that processes the same data overnight in
batches. Therefore, the best approach is to work backward from the project’s goals
and constraints, ensuring that your AI initiative is firmly rooted in a profound
understanding of its purpose.
Additionally, it’s advisable to commence your AI journey by addressing a single,
existing business process that can demonstrably benefit from AI’s capabilities. For
Summary 139

instance, a company might seek to understand why it loses customers to competitors


or why certain products are often purchased together. This initial machine learning
objective should be modest and achievable. Starting with a small-scale success is instru-
mental in cultivating the knowledge and expertise needed for more ambitious under-
takings. Many projects fail because of overambitious goals.
It’s also important to understand that a single machine learning technique may
not suffice to tackle a complex business problem. It may be necessary to combine vari-
ous methods that complement each other’s strengths and compensate for their
respective weaknesses. Furthermore, beyond the algorithms themselves, the practical-
ity of AI solutions in real-world applications hinges on factors such as availability,
response time, and scalability. Consider, for instance, a credit card authorization sys-
tem that must operate around the clock, respond within milliseconds, and process
tens of thousands of transactions per second. Without meeting these operational cri-
teria, even the most sophisticated algorithm becomes ineffective.
Once your project’s objectives are meticulously defined and the constraints are
fully outlined, this information serves as the foundation for assembling a team of pro-
fessionals with complementary knowledge and skills. The significance of subject mat-
ter experts becomes abundantly clear as they bring domain-specific insights that are
indispensable for the project’s success. On the technical front, software engineers
benefit immensely from the input of a reliable solution architect who can guide the
design process. Additionally, a system engineer is vital for setting up the infrastructure
necessary to ensure optimal performance and security. Post-deployment, continuous
monitoring and maintenance are imperative for long-term success. Proper lifecycle
management practices are essential to keep your AI project on course.
As mentioned earlier, there’s no magical AI algorithm, and an AI system is not a “wiz-
ard in a box” capable of instantly resolving all your challenges. Success in AI projects
typically hinges on a process of trial and error, guided by an understanding of what has
proven effective in similar cases. It’s a journey that requires time and expertise.
In conclusion, an AI project is a multifaceted endeavor that demands meticulous
planning, a well-rounded team, and a deep understanding of both the problem at
hand and the complexities of AI technologies. Embracing these principles and under-
standing the iterative process inherent in AI development is the key to achieving suc-
cess in your project.

Summary
 Many AI techniques have been successfully applied in real-time fraud preven-
tion, credit risk, anti-money laundering efforts, homeland security, supply chain
and traffic management.
 Bad actors have used AI to generate deep fakes, and AI has been used to per-
form biased profiling.
 Billions of dollars have been spent on failed AI projects.
 Often, AI models fail because they learned from invalid or incomplete data.
140 CHAPTER 10 Learning from successful and failed applications of AI

 Chatbots have no real understanding and are unable to differentiate between


courteous and offensive statements.
 One of the first steps in successfully using AI is to understand the data involved
in the project and to ensure that it is correct and adequate for the task.
 The entire project lifecycle should be considered when using AI, including how
to document the code and explain what it does and how to secure and update
the model.
Next-generation AI

This chapter covers


 Recommendations for preparing data for
an AI model
 Recommendations for which techniques
to use
 Properties the next-generation AI systems
should have
 Thoughts about what future AI systems
should support

Building the AI solutions of the future requires us to address the current limita-
tions in today’s systems. A key objective of this book is to provide a clear and honest
assessment of the current state of AI because it’s only by understanding where we
are today that we can chart a realistic path to the future. While media portrayals of
AI often lean toward the sensational, my aim is to provide a balanced perspective.
Much of the technology we find exciting and innovative today has actually been in
development for over half a century. Although challenges remain, such as effi-
ciency, cost-effectiveness, and adaptability, they present opportunities for growth
and improvement as we continue on this exciting AI journey.

141
142 CHAPTER 11 Next-generation AI

In this chapter, I draw on over 30 years of experience developing and deploying


mission-critical AI systems where reliability, precision, and effect are not merely ambi-
tions but imperatives. I will outline a set of features that, in my view, will characterize
the next generation of AI platforms. My examples will mostly address clinical reason-
ing and financial transactions since these are domains I’ve worked extensively in, but
the aspirations apply generally to most types of AI platforms. We’re working toward a
day when businesses can easily deploy scalable, resilient, adaptive AI systems with
more capability and fewer flaws than those available today.

11.1 Data flexibility


Business applications frequently require access to data from diverse sources. Real-
world data can come in structured or unstructured formats and may be stored in
various ways. Consider an AI application in the healthcare sector; it may need to tap
into sources like physicians’ notes, radiology images, electronic health records,
established best practices, anatomical data, biosensors, and laboratory results. An
effective AI system must be able to efficiently access and make use of all the relevant
resources.

11.2 Sampling
In the business world, datasets often reach staggering sizes. Exploring a single year’s
worth of trading data on the New York Stock Exchange, a year’s worth of social media
data, or a year’s worth of transactions at a retailer like Walmart can entail dealing with
hundreds of billions of data points. Training an AI model on such extensive data can
be an arduous process, potentially taking an immense amount of time while never
converging. To expedite this process and facilitate the development and testing of
numerous models, an AI system should offer various data sampling methods.
The most straightforward approach is a random sample, where each data point has
an equal chance of being selected. However, in certain applications, data can be cate-
gorized differently, and it may be desirable for each category to be equally repre-
sented. Each business application necessitates its own customized sampling solution.
For instance, in fraud prevention, sampling may need to be performed in a way that
adequately captures specific behaviors or ensures that certain attributes of the samples
follow a particular distribution. The choice of sampling method holds significant
importance. For instance, understanding cardholder behavior wouldn’t be effectively
achieved through a random sample of their transactions.

11.3 Elimination of irrelevant attributes


Many datasets contain redundant or irrelevant attributes. Therefore, a well-designed AI
system should incorporate functionality to detect and eliminate such unnecessary infor-
mation. This process streamlines model design and testing, making them more effi-
cient and less susceptible to overfitting. For example, if a significant portion of values
for a particular attribute is missing, it may not contribute meaningfully to the model,
11.5 Lack of bias in data and algorithms 143

regardless of its potential relevance. In some cases, certain data, such as zip codes or
phone numbers, might introduce bias into the model and should be omitted.
Eliminating redundant and irrelevant attributes from datasets is imperative for
optimizing AI system performance. Redundant attributes introduce noise and com-
plexity, making it harder for models to discern meaningful patterns, while irrelevant
ones can lead to overfitting. Removing these irrelevant features makes models more
efficient and ultimately improves predictive accuracy. Additionally, it enhances model
generalization and reduces computational complexity, leading to faster training times
and more efficient resource utilization.

11.4 Data coherence


Data can often be complex and unstructured, originating from diverse sources with
varying formats and potentially containing missing or erroneous values. Instances of
data may partially overlap or even contradict each other. Inconsistencies, contradic-
tions, or discrepancies can exist within a dataset or between different datasets, result-
ing from data points or records that do not align or agree with each other. This can
occur due to various reasons, including errors in data collection, data entry mistakes,
data merging issues, or changes in data sources over time. Data incoherence under-
mines data quality and reliability, making it challenging to use effectively for analysis,
machine learning, or decision-making.
Detecting and addressing data incoherence is crucial for ensuring accurate and
trustworthy data-driven processes and models. Resolving data quality issues in an AI
system goes beyond simple remedies like applying formulas, finding and replacing val-
ues, or sorting and organizing data. It is also imperative to avoid labeling errors when
training AI systems. For instance, a medical diagnostic system trained on inaccurately
labeled data could result in untreated illnesses for some while subjecting healthy indi-
viduals to unnecessary medical procedures. An effective AI system should have mecha-
nisms to flag potential labeling issues. Furthermore, AI models must accurately reflect
the real-world data that the system will encounter. If the system is trained on meticu-
lously cleaned data but encounters incomplete or inconsistent samples in the produc-
tion environment, errors are likely to occur.

11.5 Lack of bias in data and algorithms


Society comprises individuals from diverse backgrounds, living in various socioeco-
nomic conditions, each possessing unique strengths and weaknesses. It is imperative
for AI models to acknowledge and account for this diversity, steering clear of assess-
ments or recommendations that inadvertently favor or discriminate against particular
individuals or groups. Algorithms, built upon logic created by human programmers,
can carry conscious or unconscious biases that lead to unforeseen consequences.
Moreover, if the data used to train the model fails to offer a representative sample,
bias can become ingrained within the system.
144 CHAPTER 11 Next-generation AI

A pertinent example of how bias can inadvertently enter a computer program is


the 2020 A-level grading controversy in the United Kingdom. These exams, similar to
the SATs and ACTs in the United States, play a crucial role in university admissions. In
response to COVID-19 distancing measures, the 2020 exams were canceled, and an
algorithm was employed to generate estimated scores. The algorithm utilized seem-
ingly reasonable parameters, including a student’s school grades in relevant courses
and the historical A-level exam performance of students from their school [1]. How-
ever, nearly 40% of students received lower scores than they and their teachers antici-
pated. Critics demonstrated that the algorithm exhibited a built-in bias in favor of
private school students. While it is true that, on average, private school students tend to
achieve higher test scores, the algorithm could assign a lower score to a high-achieving
student from a state school compared to an objectively weaker student from a private
school. This outcome clearly contradicts the intended objective. Eventually, the algo-
rithm-generated scores were discarded, and scores assessed by the students’ teachers
were utilized instead.
In applications like facial-recognition systems in law enforcement or loan-approval
systems in mortgage lending, eliminating bias is of paramount importance. Formal
rules and regulations have been established to safeguard individuals’ rights, with
infringements carrying severe repercussions. AI systems should have a mechanism to
audit biases in predictions and decisions.

11.6 Feature engineering


Feature engineering is one of the most critical steps in a machine learning project.
It involves the process of selecting, transforming, and creating relevant features or
variables from raw data to enhance the performance of machine learning models.
It is a critical step in designing powerful AI models because the quality and rele-
vance of the features used directly affect the model’s ability to learn and make accu-
rate predictions. Since every business has its own unique characteristics, domain
experts are typically needed for their ability to define specifications, describe the con-
text, and flag exceptions. For example, an investment analyst would know that
stock markets are subject to seasonal variation as well as expected but unpredict-
able fluctuations at the end of each week and quarter. There is less trading activity
during the summer, and trades pick up toward the end of the year for tax reasons.
An expert in the credit card industry would identify seasonal patterns as well, but
they might also know the data-enriching potential of rolling daily, weekly, and
monthly spending rates.
Even though some patterns are easy to understand, there are others that might not
be as clear. These can also be harder to figure out, even if we know they’re there. For
example, card transactions might be grouped by an algorithm that considers geo-
graphic attributes, cash-back requests, refund requests, and the need for manual data
entry. Entirely different considerations apply to biomedical data, which can often be
skewed in a way that makes trends hard to see.
11.8 Unsupervised learning 145

The next-generation AI systems should automate the vital feature engineering step
in model building. This speeds up development significantly and makes these systems
extremely efficient.

11.7 Technique combination


AI comprises a range of techniques and methods, each carrying its own set of
strengths and weaknesses. Next-generation solutions should combine various AI tech-
nologies like the ones described in chapters 2 and 3. Just as soliciting diverse expert
opinions can improve the efficacy and efficiency of a project, AI systems that combine
multiple AI technologies can benefit from the strengths of various AI techniques. For
instance, the integration of data mining, case-based reasoning, fuzzy logic, deep learn-
ing, genetic algorithms, rule-based systems, and smart agents in the development of
an AI model for fraud prevention represents a formidable leap in the fight against
fraudulent activities.
This combination of technologies equips the system with an unparalleled analyti-
cal prowess. Data mining enables the extraction of meaningful insights from vast and
complex datasets, allowing for the identification of subtle patterns indicative of fraud-
ulent behavior. Case-based reasoning supplements this by drawing on historical cases
to make informed decisions about new and emerging threats. Fuzzy logic addresses
the inherent uncertainty and imprecision associated with fraud detection, enhancing
the system’s adaptability. Deep learning excels in capturing complex relationships
within the data, while genetic algorithms optimize the model’s parameters. Rule-
based systems provide a transparent and explainable framework for decision-making,
facilitating the interpretation of the model’s outputs. Finally, smart agents enable real-
time monitoring and adaptive capabilities, allowing swift action against new threats.
The combination of these AI technologies results in a fraud prevention solution that
is not only highly accurate and adaptive but also capable of staying one step ahead of
the ever-evolving landscape of fraudulent activities.

11.8 Unsupervised learning


In 2019, a tweet by Elon Musk underscored the significance of unsupervised learning
for the future of AI. Musk, who initially asserted in 2015 that self-driving vehicles
would conquer any road within a few years, later reversed course when he realized the
limitations of supervised learning approaches. He articulated [2],

A substantial portion of real-world AI challenges must be addressed to enable unsupervised,


generalized, fully autonomous driving, given that our entire road infrastructure is designed
for biological neural networks equipped with optical sensors.

Indeed, while supervised learning has been instrumental in training AI models


through labeled datasets, this approach faces practical challenges in the real world,
primarily due to the scarcity of large, high-quality datasets and the often difficult and
expensive task of labeling data. Unsupervised learning, in contrast, empowers AI systems
146 CHAPTER 11 Next-generation AI

to learn patterns, relationships, and structures within data without explicit guidance.
This capability is crucial for dealing with the complexity and diversity of unannotated
information encountered in various domains.

11.9 AI factory
The utilization of artificial intelligence is currently somewhat restricted, primarily due
to the substantial resources and advanced technical expertise required for its effective
implementation. These prerequisites are typically within the grasp of only large corpo-
rations and academic institutions with significant financial and human capital. Next-
generation AI platform transformation is on the horizon as we navigate toward turn-
key solutions that democratize AI, ultimately making its powerful capabilities accessi-
ble to companies of all sizes.
When we draw parallels with the innovative thinking of Henry Ford, who revolu-
tionized automobile manufacturing by introducing mass-produced parts on a mov-
ing assembly line and simplifying car assembly into repetitive tasks, it becomes
evident that we should adopt an “AI factory” approach. For example, one module
autonomously evaluates data sources, extracting and cleansing pertinent data. A sec-
ond module takes on the role of enriching this data, while a third module focuses
on creating and optimizing model parameters. Another module manages the train-
ing of a multitude of models, and yet another is dedicated to testing and evaluating
these models. A separate module could excel in combining the most effective mod-
els to build a production-ready AI solution. Furthermore, additional modules could
play pivotal roles in ensuring model governance and handling specialized function-
alities such as cybersecurity.
The democratization of AI will lead to a new era in which AI becomes an accessible
tool for a broader spectrum of professionals, transforming how businesses and organi-
zations use its capabilities.

11.10 Quality Assurance


Quality assurance involves ensuring that a system functions as intended. When dealing
with AI systems, this task becomes elaborate due to their inherent unpredictability. In
conventional software, we can employ diagrams and code analysis to understand and
validate its behavior. However, AI systems present a challenge because their function-
ing relies on complex data patterns not easily discernible by humans. Fine-tuning
parameters through trial and error doesn’t instill trust in a supervised learning pro-
gram, and unsupervised learning is even more uncertain. Typically, an unsupervised
algorithm can only be validated through its performance because there are no formal
metrics or labeled samples available.
The next-generation AI should rely on a dedicated quality assurance protocol
designed specifically for AI. Testing should occur at every stage of model develop-
ment, covering aspects such as data integrity, performance, adaptability, and resil-
ience to unexpected situations. Diverse datasets should be used to assess the system’s
11.12 Effective data storage and processing 147

versatility, and we should intentionally introduce novel data and errors for broad test-
ing. Mission-critical systems should be tested for security against attack and for resil-
ience against scenarios such as power failure, even when they are mirrored in multiple
geographic locations.

11.11 Prediction reliability


The foundation of any effective AI system lies in its capacity to provide precise predic-
tions. To highlight the repercussions of unreliable AI performance, let’s use an illus-
tration from the transaction processing domain. CMSPI, a global payments consultancy,
found that if AI systems aren’t performing well, it can seriously affect businesses and
economies [3]:

In the year 2020, U.S. online spending witnessed a staggering increase of $193.7 billion
compared to the preceding year, as reported by the Census Bureau. While this surge in
online commerce should have been a boon for retailers, it paradoxically resulted in
approximately $30 billion in foregone sales opportunities due to lower approval rates in
the online space. To put this figure in perspective, consider a small business with annual
sales of $1 million that transitions into the online market. Instead of merely losing out on
$30,000 in in-store sales, this business could potentially see a staggering $150,000
worth of legitimate transactions declined online.

Online transaction rejections play a vital role in preventing fraudulent activities. How-
ever, as CMSPI’s data analysis reveals, an alarming one in every five rejected transac-
tions is a false positive, meaning that genuine customers are unjustly turned away.
What’s even more disconcerting is that over half of these wrongly rejected customers
subsequently take their business to a competitor. Indeed, a system that mistakenly
identifies legitimate transactions as fraudulent poses a formidable challenge. It results
in a lose–lose scenario where customers are left dissatisfied and businesses suffer a
double blow of losing both customers and potential profits.
This highlights the critical need for a fraud detection system to possess two essential
attributes: a high detection rate for actual fraudulent activities and a minimal rate of
false positives for legitimate transactions. This requirement isn’t confined to the world
of payment processing; it extends across various domains. Consequently, the ability to
provide reliable predictions stands as an indispensable necessity for any AI solution.

11.12 Effective data storage and processing


Legacy databases face significant challenges when applied to real-time AI applications.
Their tabular data structures are ill-equipped to handle complexity, limiting their suit-
ability for AI tasks. Moreover, these databases struggle with the complex computations
and queries demanded by AI algorithms, often resulting in slow response times. As AI
datasets grow in size, databases encounter difficulties in scaling horizontally to meet
the increased demand for processing speed and capacity, a critical concern in applica-
tions requiring low response times, such as real-time fraud prevention in credit card
authorization.
148 CHAPTER 11 Next-generation AI

For instance, we had a requirement for an AI risk-scoring system that could pro-
cess over 100 billion transactions per year at a rate of over 50,000 per second with a
5-millisecond response time. The system needs to analyze hundreds of variables and
constraints and aggregate data over numerous timeframes for each of these transac-
tions. Databases are simply impractical given such constraints, even with the most
advanced hardware and programming techniques. To overcome these obstacles, alter-
native technologies like distributed file systems and specialized data processing frame-
works are required.

11.13 Deployability and interoperability


An AI platform should possess the fundamental capability to seamlessly interface with
various software and systems, thereby ensuring that organizations can harness AI’s
potential to its fullest extent. This extends beyond mere integration; it includes the
capacity to streamline workflows and enable data exchange while minimizing opera-
tional complexities and costs. Moreover, a robust AI platform should provide the agility
for dynamic model deployment, allowing organizations to incorporate new or updated
AI models into their processes without disrupting system operations or workflows.

11.14 Scalability
Numerous computer systems face a significant challenge in their journey to practical-
ity: the inability to handle demanding workloads effectively. This issue becomes partic-
ularly pronounced in the business world, where scalability is a paramount
requirement for any computer program. The ability to scale means that an AI system
can flexibly adapt and accommodate increasing workloads and data volumes without
sacrificing performance or responsiveness. This is essential because businesses often
operate in dynamic environments where data generation and processing demands
can grow rapidly. Scalability empowers organizations to use AI effectively as their
operations expand, ensuring that the system can continue to provide timely insights,
support decision-making, and deliver valuable outcomes. It also enables cost optimiza-
tion by allowing businesses to allocate resources efficiently and avoid costly system
upgrades.
Next-generation AI systems should prioritize scalable AI algorithms since scalabil-
ity represents a critical test for the worthiness of a solution. Even the smartest and
most precise predictive models may fall short if they lack the scalability necessary to
meet the demands of business applications.

11.15 Resilience and robustness


A system is considered resilient when it can uphold its performance even in challeng-
ing circumstances. These adverse conditions could encompass hardware failures,
cyber-attacks, power outages, network disruptions, or a combination of such problems
occurring simultaneously. Resilience is the vital capacity to maintain performance
even in the face of challenges. For instance, in the aerospace industry, where aircraft
11.16 Security 149

navigation relies on advanced avionics systems, resilience ensures that a single hard-
ware malfunction or a cyber-attack won’t jeopardize passenger safety. Similarly, in the
energy sector, power grid control systems must exhibit resilience to mitigate the effect
of natural disasters, guaranteeing continuous electricity supply to homes and busi-
nesses. In healthcare, electronic health record systems must remain operational, even
in the event of network disruptions or cyber threats.
For an AI tool to demonstrate true effectiveness, it must exhibit resilience by
ensuring its functionality remains intact across a spectrum of situations, even in sub-
optimal conditions.

11.16 Security
In the world of AI, especially for critical applications, security is paramount. Unfortu-
nately, the landscape of emerging technologies has also become a playground for
malicious actors, including terrorist groups. These entities have proven their adapt-
ability by using the latest advancements to orchestrate attacks. As AI systems continue
to advance and become more potent, the risks they pose loom larger. Bad actors are
ready to exploit AI’s capabilities to launch devastating cyberattacks and create highly
destructive malware. One striking manifestation of this threat landscape is the alarm-
ing rise in the prevalence and sophistication of ransomware attacks. These attacks
manifest in various forms, with one common iteration involving the remote encryp-
tion of a victim’s file system. The perpetrators then demand a ransom in exchange for
the decryption key, effectively holding critical data hostage.
In a grim statistic from 2020, nearly 2,400 government offices, healthcare facilities,
and educational institutions in the United States alone fell victim to such ransomware
attacks [4]. A particularly memorable incident occurred in 2015 when Colonial Pipe-
line Company was forced to shut down its operations for an entire week due to a
cyberattack. This disruption caused significant turmoil by disrupting the supply of
essential fuels such as diesel, gasoline, and jet fuel across the United States. Highlight-
ing the gravity of the situation, Colonial’s CEO, Joseph Blount, made the decision to
pay a $4.4 million ransom. The Wall Street Journal reported, “It was an option he felt he
had to exercise, given the stakes involved in a shutdown of such critical energy infra-
structure. The Colonial Pipeline provides roughly 45% of the fuel for the East Coast,
according to the company” [5].
According to CNBC [6], in September 2023, casino operator Caesars paid out a
ransom worth $15 million to a cybercrime group that managed to infiltrate and dis-
rupt its systems.
As the world becomes increasingly reliant on advanced computing technologies,
the list of potential harm scenarios grows ever longer. This highlights the importance
of designing AI platforms with end-to-end encryption to safeguard data from intercep-
tion to unauthorized access and protect the integrity of decision-making processes.
150 CHAPTER 11 Next-generation AI

11.17 Explicability
Ensuring the widespread acceptance of AI systems, especially in scenarios where deci-
sions hold significant societal consequences, relies on the ability to explain how these
systems arrive at their conclusions. The use of black-box algorithms, notably those
rooted in deep learning neural networks, presents a formidable challenge in terms of
complying with regulations that demand explicability and transparency. This renders
such algorithms unsuitable for making pivotal decisions in areas such as lending and
criminal justice. Moreover, the issue extends beyond just regulatory compliance.
Trustworthiness becomes a paramount concern in mission-critical applications. In
these instances, accountability necessitates a comprehensive understanding of how a
decision was reached. A mere declaration of “The computer told me to do it” often
falls short of what is expected.
To this end, the next-generation AI systems must be engineered with the dual
objectives of operational comprehensibility and the provision of coherent explana-
tions for their outputs. This transparency should encompass the inner workings of the
AI, allowing stakeholders and end-users to discern the rationale behind each decision.

11.18 Traceability and monitoring


The ability to track changes in an AI system and to step back through its history is
important not only to prevent its misuse but also to help clarify responsibility. Con-
sider, for instance, a scenario where a doctor, reliant on an AI system, provides an
inaccurate diagnosis; it prompts the complex query of culpability. Should the
blame primarily fall on the doctor who utilized the AI tool, or should the company
responsible for its creation share the responsibility? Resolving this complex ques-
tion necessitates a comprehensive inquiry that analyzes not only all the events and
the way the AI system was employed but also its status and performance at the
moment of use.
In addition, an AI system should provide a robust framework for tracking its model
performance and the evolving trends within the data it processes, ensuring its contin-
ued effectiveness and relevance.

11.19 Privacy
In today’s rapidly evolving technological landscape, our personal information is being
amassed at an unprecedented rate, driven by an ever-expanding array of advanced
technologies. From fitness trackers meticulously recording our biorhythms to sophisti-
cated login systems cataloging our fingerprints and facial expressions, a substantial
portion of our vital data is increasingly susceptible to exploitation. This vulnerability
not only creates opportunities for organized criminals but also extends a tempting
invitation to nation-states eager to engage in activities like identity theft, fraud, and
other illicit activities. The repercussions of inadequate privacy protection are often
disastrous. Consider, for instance, the alarming frequency of data breaches exposing
the personal data of millions, leaving individuals vulnerable to financial fraud and
11.21 Contextual reasoning 151

identity theft. The fallout from such breaches can be long-lasting and financially ruin-
ous for affected individuals.
In response to these threats, it is imperative for next-generation AI systems to
incorporate robust privacy protection modules. For example, they should employ
advanced anonymization techniques to strip personal identifiers from raw data, mak-
ing it impossible to trace back to individuals. Furthermore, AI systems should allow
individuals to retain control over their own data, deciding who has access and for what
purposes, thus reinforcing their privacy rights.

11.20 Temporal reasoning


The concept of time is intrinsic to our understanding of the world. The relationship
between cause and effect requires the understanding of events occurring before and
after one another. Events vary in their temporal characteristics; some are instanta-
neous, while others have a duration, and they can happen in different time frames or
exhibit various forms of overlap. Certain events may serve as prerequisites for others.
While these observations are intuitive to humans and often taken for granted,
machines will require specific programming logic.
One possible approach is relying on the Allen Intervals, a comprehensive frame-
work that defines 13 possible temporal relationships between events. For instance, it
can identify when one event meets another (Meets), one event occurs before another
(Before), or when an event starts (Starts) or ends (Ends) in relation to another. Over-
lapping intervals (Overlaps) signify concurrent but not fully coinciding events, while
During implies containment. The system can also discern the inverse relations, such
as Met By, After, Started By, and Ended By, to capture the opposite direction of these
temporal connections. Additionally, it can recognize when one event fully overlaps
with or contains another, as well as when two events are equal in duration (Equality).
This comprehensive set of temporal relations empowers AI systems to make sense of
the temporal aspects of data, facilitating applications across various domains, from
scheduling to natural language understanding and more.

11.21 Contextual reasoning


Contextual reasoning is an indispensable element of any intelligent decision-making
system, as it empowers AI to go beyond the surface level of data and understand the
complexity of a given situation. This enables the system to factor in various elements
and circumstances, adapting its logic and responses based on the specific context.
Such adaptability is crucial for making well-informed choices, preventing errors, and
achieving optimal outcomes. Whether in healthcare, finance, content moderation, or
any other field, an AI system capable of grasping and integrating context can provide
more precise, relevant, and reliable assistance, thus becoming an essential component
in enhancing the utility and reliability of AI-powered solutions in the real world.
To highlight the significance of context understanding and reasoning, let’s revisit
some examples discussed in earlier chapters of this book. Clinical reasoning, for
152 CHAPTER 11 Next-generation AI

instance, heavily relies on context. Consider a pregnant woman, where the context
drastically alters the approach to medication prescription. Many medications could
potentially harm the developing fetus, while others might be safe or even necessary
for the health of both the mother and the baby. Contextual reasoning in this scenario
involves considering the stage of pregnancy, the specific medical condition, any pre-
existing conditions, the risk–benefit ratio, and alternative treatment options.
Similarly, in fraud prevention, an AI system must adapt to shifts in spending behav-
ior during special events like Black Friday or vacations when a large number of trans-
actions are expected to be normal. Recognizing the context and automatically adjusting
parameters can significantly reduce false positives.
Another context-sensitive domain is stock trading, where considerations such as
high interest rates, geopolitical issues, unemployment, inflation, and more are essen-
tial. Each of these factors can profoundly impact the stock market, necessitating an
adaptable and context-sensitive AI approach.
In text mining, understanding a piece of writing necessitates inferring the correct
context, as the same word can have different meanings in distinct contexts. For exam-
ple, apple can refer to a fruit, New York City, computers, or a company.
In content moderation, context plays a pivotal role. Imagine a video about the
Third Reich, which could serve either as an educational tool to inform people about
the atrocities of Nazism or as propaganda by a neofascist group. In one instance, pro-
motion would be encouraged, while in the other, blocking would be imperative.
As a result, next-generation AI systems must incorporate contextual reasoning as
an integral component of their functionality due to the dynamic and complex nature
of the real world. Context provides, in every domain and situation, vital information
necessary for making intelligent decisions and actions. Without context, AI systems
may produce inaccurate or inappropriate results.

11.22 Causality inference


Causality is fundamental to our understanding of the world, much like our perception
of time. It serves as a crucial framework for comprehending the relationships between
events, actions, and outcomes. However, it becomes a challenge when we consider
how to encode the concept of cause and effect into a computer program. Causality
extends far beyond the mere observation of events occurring in chronological order.
It analyzes the multifaceted web of relationships that define not just when events hap-
pen but why they happen. This involves the idea that events, conditions, objects, and
processes can all play roles in influencing one another.
Next-generation AI systems must be capable of not only recognizing patterns and
correlations but also comprehending the underlying causative factors. This empowers
AI to create business solutions that can reason, plan, and act with greater efficiency,
ultimately benefiting society in numerous ways.
11.25 Sustainable AI 153

11.23 Analogical reasoning and transferability


Humans possess an exceptional talent for analogical reasoning, a cognitive skill
deeply rooted in our ability to recognize patterns, establish connections, and draw
upon past experiences across a wide range of situations. This mental faculty is closely
tied to our capacity for abstraction and generalization, allowing us to identify similari-
ties between seemingly unrelated scenarios. This unique capability enables us to
smoothly transfer knowledge and effective problem-solving strategies from one area
to another. Throughout history, analogical reasoning has been the driving force
behind numerous groundbreaking inventions. For example, George de Mestral found
inspiration in the way cockleburs clung to his clothes and his dog’s fur, ultimately
leading to the invention of Velcro. Similarly, James Dyson revolutionized the world of
vacuum cleaners by drawing an analogy between the efficient, clog-free action of a
sawmill cyclone and his own vacuum cleaner prototype.
Next-generation AI should have the ability to perform analogical reasoning and
apply problem-solving techniques learned from one domain to another. This enhance-
ment will significantly boost their efficiency and adaptability.

11.24 Personalization
Personalization is a pivotal factor across various domains. Current AI systems, which
learn from extensive datasets, tend to recognize patterns that are relevant only at a
broad population level. Take, for example, the typical AI system used in financial
transactions today; it often applies the same logic to every merchant. However, each
merchant possesses distinct characteristics and activity patterns. Similarly, cardholders
exhibit varying spending patterns and purchasing habits. Overlooking these individ-
ual differences can lead to lower rates of fraud detection and a higher rate of false
positives. Personalization can enhance the efficiency of AI systems. For instance, in
the education sector, AI-powered personalized learning platforms can adapt to the
pace and learning style of each student. In healthcare, personalization ensures that
each patient receives the most suitable treatment plan.
Personalization acknowledges the uniqueness of individuals and situations. There-
fore, its integration into AI systems will enable them to cater to the unique character-
istics and requirements of individuals and situations, leading to improved outcomes.

11.25 Sustainable AI
Current AI systems have made remarkable strides in various domains, but they come
at a significant environmental cost. One of the primary concerns is the massive
energy consumption associated with AI, driven by the computational demands of
training and running complex models. Data centers that house these AI infrastruc-
tures are substantial contributors to carbon emissions, often relying on non-renewable
energy sources.
This environmental impact is further exemplified by the astounding increase in
computing power required for AI milestones, as reported by WIRED magazine, with a
154 CHAPTER 11 Next-generation AI

300,000-fold surge from 2012 to 2018 [7]. Additionally, a recent report [8] from the
MIT Technology Review reveals a startling fact: the complete process of building and
training an AI system from scratch generates an astonishing 78,468 pounds of CO2
emissions. This amount exceeds what an individual exhales in their lifetime and sur-
passes the emissions attributed to their entire lifetime of automobile use. Given these
alarming figures, there is a concern that AI systems could increasingly be perceived as
a threat to the climate.
To address this environmental challenge, next-generation AI must prioritize effi-
ciency as a core design principle. This involves the development and utilization of
more streamlined algorithms that can achieve comparable results with significantly
fewer computational resources. Additionally, efforts should focus on reducing data
requirements for AI training, minimizing the environmental impact associated with
data storage and transmission.
By embracing these strategies, next-generation AI can not only maintain its tech-
nological prowess but also fulfill its responsibility to be environmentally conscious and
contribute to a more sustainable future.

11.26 Adaptability
In the ever-changing real world, characterized by its unpredictability and constant
evolution, accurately forecasting future events and trends can be an incredibly daunt-
ing task. This is precisely where the concept of adaptability emerges as a critical factor
in the success of various business applications.
To examine this notion further, let’s revisit a previous discussion from chapter 4
where our focus was squarely on the payment industry. In that context, we highlighted
the importance of employing flexible AI solutions. These solutions are essential for
effectively navigating the perpetually shifting landscape of fraudulent activities and
ever-evolving money laundering tactics that pose significant challenges to this indus-
try. One of the challenges we discussed is that legacy AI systems often prove inflexible
and cumbersome when confronted with even minor modifications or adjustments to
the parameters of a given problem. These systems typically necessitate a complete
overhaul and retraining, a process that not only consumes substantial resources but is
also far from scalable.
Therefore, the next generation of AI platforms must rely on frameworks that pos-
sess the capacity to continuously learn and adapt.

11.27 Human–machine collaboration


AI systems often operate in isolation, functioning independently of human interac-
tion. However, the evolving landscape of technology and our growing reliance on AI
necessitates a shift toward AI platforms that are not only capable of independent tasks
but also excel in forming collaborative partnerships with humans. This shift is driven
by the realization that true innovation and productivity lie at the intersection of
human creativity and artificial intelligence. Therefore, the next-generation AI systems
Summary 155

should possess the capacity to facilitate smooth communication and cooperation


between humans and machines, ultimately enhancing the capabilities of both.

Summary
 A good AI model should handle diverse and large sources of data that are
enhanced by feature engineering.
 A project team should consider combining multiple techniques, including
(good) unsupervised learning.
 AI solutions should be simple and reusable modules that nonexperts could eas-
ily integrate.
 Companies should apply the proper quality assurance when using AI models to
ensure they work as expected, are resilient, and scale effectively.
 AI models should be easy to deploy and secure and should address privacy con-
cerns. Humans should be able to comprehend what they do.
 To achieve a semblance of intelligence, future AI systems should understand anal-
ogies, inference, context, and many other concepts they are currently missing.
appendix A
Tracing the roots: From
mechanical calculators
to digital dreams
To the average person, it might seem that AI is a recent field, given the increased
public awareness of AI in recent years. However, the foundation of the concepts
and theories that underpin this discipline can be traced back centuries. This chap-
ter embarks on a voyage through time, retracing the footsteps of the pioneers who
led us to AI as we know today. We will discover visionaries who dreamed of
machines that could reason and learn: from Pascal’s ingenious mechanical design
of the mechanical calculator that marked a pivotal moment in the history of
human interaction with machines, Leibniz’s binary system that still serves as the
representational basis for today’s digital computing, Babbage’s conception of the
Analytical Engine as a mechanical brain, and Ada Lovelace’s insights into program-
ming. Understanding these historical developments will shed light on where AI has
been, where it stands today, and its potential future.

A.1 Can machines think?


The question of whether a machine possesses the capacity for thought was initially
raised almost four centuries ago, back in 1642. This inquiry emerged when Blaise
Pascal (1623–1662) introduced the Pascaline, which stands as the earliest docu-
mented calculating device. At the tender age of 19, Pascal conceived this machine
with the primary objective of aiding his father, who worked as a tax collector. Its
purpose was twofold: to minimize errors and to alleviate the taxing burden of
monotonous computations.

156
A.1 Can machines think? 157

The Pascaline significantly enhanced human cognitive capabilities by flawlessly


executing addition, subtraction, multiplication, and division (figure A.1). This mechan-
ical marvel accepted input, executed operations, and produced numerical results. By
automating these functions, it diminished the necessity for manual human labor. This
innovation proved especially invaluable to Pascal’s father, who would otherwise have
been immersed in the arduous and time-consuming task of manual calculations.

Figure A.1 Pascaline


(CNAM France)

Pascaline also featured a clever carry mechanism (known as le sautoir) designed to


handle carry-over operations (la retenue). This innovation addressed one of the pri-
mary calculation errors that Pascal had observed while assisting his father. As you may
recall from your own arithmetic lessons, when calculating something like 27 + 29, we
start by adding the rightmost digits, writing down 6, and then “carry the 1” to the next
column. Impressed by this invention, King Louis XIV granted Pascal the exclusive
right to manufacture his calculating machines in France in 1649.
In his work “Pensées” [1], which is a compilation of notes and essays exploring the
complexities of human nature in psychological, social, metaphysical, and theological
terms, Pascal made some of the earliest significant comparisons between machines
and sentient beings. For instance, he stated, “The arithmetical machine produces
effects that come closer to thought than all the actions of animals. However, it per-
forms nothing that would allow us to attribute will to it, as we do to animals.”
Likewise, in “The Life of Monsieur Pascal” [2], his sister Madame Périer described
the Pascaline as “performing tasks that reside entirely in the mind.” She recounted
her brother’s achievements:

It was at that time (in 1642–1643) and at the age of nineteen that he invented this
arithmetic machine, by which not only are all kinds of operations performed without a
pen and without tokens, but we do them even without knowing any arithmetic rule and
with infallible certainty. This work was considered as a new thing from nature, to have
158 APPENDIX A Tracing the roots: From mechanical calculators to digital dreams

reduced to a machine a science which resides entirely in mind and to have found the
means to carry out all the operations there with complete certainty without having the
need for reasoning. This work tired him a lot, not for the thought nor for the movements
which he found without difficulty, but to make the workers understand all these things so
that it took him two years to put it in the perfection where it is now.

While Pascaline required a human operator skilled in manipulating the machine’s


controls, it undertook tasks that typically demanded individuals well-versed in mathe-
matics. This raises the question: should we classify Pascaline as the inaugural AI
machine? This consideration is pertinent because, much like Pascaline, contemporary
computers execute computational tasks rooted in algorithms meticulously crafted and
encoded by human programmers. Even the most advanced AI systems of today essen-
tially represent a compilation of technologies meticulously designed and fine-tuned
by humans to generate specific behaviors, devoid of genuine comprehension or rea-
soning capabilities.
In 1671, approximately three decades following the creation of the Pascaline,
Gottfried Wilhelm von Leibniz introduced the Stepped Reckoner, an ingenious calcu-
lating device that employed decimal number representation and performed multipli-
cation through iterative addition, facilitated by a hand-crank mechanism (figure A.2).
Informed by his endeavors in mechanizing numerical representation, Leibniz penned
a renowned treatise in 1703, titled “An Explanation of Binary Arithmetic Using Only
the Characters 0 and 1, with Remarks About Its Utility and the Meaning It Gives to the
Ancient Chinese Figures of Fuxi” [3]. In this seminal work, he introduced the binary
number system, which relies exclusively on two digits, 0 and 1. This binary system is
now the cornerstone of virtually all modern computers.

Figure A.2 Replica of Leibniz Stepped


Reckoner in Deutsches Museum

We are all acquainted with the decimal number system, commonly referred to as “base
10.” This system utilizes the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9, with each digit’s posi-
tion in a number signifying its value in 1s, 10s, 100s, and so on. The invention of the
A.1 Can machines think? 159

decimal system by our ancestors was likely influenced by their use of 10 fingers for
counting. In our daily calculations, like adding 6 + 2 to get 8 or subtracting 7 from 27
to yield 20, we unconsciously employ the base 10 system. Many people may not realize
that this choice is arbitrary and that alternative systems, such as binary, exist.
Computers, smartphones, and various digital devices exclusively rely on the binary
system, using 1 and 0 for all operations. Documents, images, audio, and files of all
kinds are stored as sequences of 1s and 0s, and computers execute mathematical oper-
ations by representing numbers as sequences of binary digits and performing proce-
dures similar to those in the base 10 system. Given the pivotal role of binary in
computing, it’s beneficial to acquaint ourselves with it. We can start by representing
several decimal numbers in the binary system (table A.1).

Table A.1 Decimal numbers and their binary equivalents

Decimal number Binary equivalent

0 0

1 1

2 10

3 11

4 100

5 101

6 110

7 111

8 1000

9 1001

Decimal numbers are expressed as a sequence of digits, with the rightmost digit repre-
senting the units. Each successive digit to the left signifies a multiple of a power of 10,
where the nth power of 10 represents 10 multiplied by itself n times. For instance, the
decimal number 207 can be viewed as 2 × 100 + 0 × 10 + 7 × 1, aligning with our under-
standing of it as two 100s, no 10s, and seven 1. In a more concise form, this number
can be written using exponents as 2 × 102 + 0 × 101 + 7 × 100.
Binary numbers follow a similar concept, but their digits denote multiples of pow-
ers of two rather than powers of 10. As an illustration, the decimal number 27 is
expressed in binary as 11011 since 27 can be represented as 16 + 8 + 0 + 2 + 1 in deci-
mal, and this sum can be expressed as a sum of powers of 2 as 1 × 24 + 1 × 23 + 0 × 22 +
1 × 21 + 1 × 20.
Text in a computer is stored as binary code, where each letter and typographic
symbol is assigned a fixed binary string based on a universal convention. For instance,
160 APPENDIX A Tracing the roots: From mechanical calculators to digital dreams

the early working title of this book, AI Reality and Illusion, is stored in computer memory
as the following binary sequence:

01000001 01001001 00100000 01010010 01000101 01000001 01001100 01001001


01010100 01011001 00100000 01100001 01101110 01100100 00100000 01001001
01001100 01001100 01010101 01010011 01001001 01001111 01001110

Each set of numbers represents a letter or a space, with A = 01000001, I = 01001001,


and so forth.
Any system that relies on just two symbols is considered binary. For instance, Louis
Braille, who lost his sight at the age of three, invented the Braille code in 1824 when
he was 15 and a student at the Institute for Blind Children in France (figure A.3). The

Figure A.3 The Braille code


A.1 Can machines think? 161

Braille code utilizes raised and unraised dots on a surface to convey information
through the sense of touch. This system enables blind individuals or those with lim-
ited sight to read.
Morse code, another form of binary encoding, relies on dots and dashes to represent
information (figure A.4). Short pulses symbolize dots, while long pulses correspond to
dashes, and these signals are transmitted over telegraph lines. By assigning binary
sequences to specific letters, Morse code enables the transmission of information.

Figure A.4 Morse code

On May 24, 1844, Samuel Morse successfully employed his code to transmit the inau-
gural telegraph message, “What hath God wrought?” between Washington, D.C., and
Baltimore.
Building upon the contributions of Pascal and Leibnitz in the 18th century, Euro-
pean innovators crafted a range of remarkable automata designed to mimic human
actions. The most celebrated of these inventors was Jacques de Vaucanson (1709–
1782) of France, who, in 1727, created an initial automaton capable of serving meals
and clearing tables. However, a government official criticized his invention as sacrile-
gious, leading to the closure of Vaucanson’s workshop. Nevertheless, Vaucanson later
captivated Europe with his mechanical ducks, mechanical flute player, and mechani-
cal pipe players.
In addition to his entertaining automata, Vaucanson made a significant contribution
to the Industrial Revolution. While working as a silk manufacture inspector, he revolu-
tionized the French weaving industry in 1745 with the invention of the first automated
loom. This machine utilized perforated cards to direct hooks connected to warp yarns,
representing one of the earliest instances of autonomous machines following binary
instructions. Regrettably, the weavers opposed this invention, fearing job displacement,
and Vaucanson was compelled to abandon his project and flee for his life.
Vaucanson’s concept was further refined and eventually realized in 1804 by the
French weaver and merchant Joseph-Marie Jacquard. He developed an automated
loom employing punch cards, with holes on the cards dictating the movements of
needles, thread, and fabric, resulting in the creation of woven silk fabric with complex
162 APPENDIX A Tracing the roots: From mechanical calculators to digital dreams

patterns. This technique enabled the production of tapestry, brocade, and patterned
knitted fabric. The ingenious use of punch cards later served as inspiration for the
design of digital computers, with punch cards being utilized for data input in early
20th-century computers.
Pierre Jaquet-Droz, a Swiss luxury watchmaker, crafted some of the most remark-
able automatons of his era. His most sophisticated creation, a mechanical boy seated
at a desk, was constructed in 1768. This automaton could write with a pen and
paper, composing up to 40 preselected characters on a wheel manipulated by its
operator. It utilized a goose feather pen, dipping it in ink and shaking its wrist to pre-
vent smudges. Its eyes followed the text as it wrote, and its head moved while taking
ink. This writer automaton remains operational and is on display at the History Museum
in Neuchâtel.
One of the intellectual figures influenced by these increasingly lifelike machines
was Julien Offroy de La Mettrie, a French physician and philosopher. In his 1747 book
Man a Machine [4], he proposed materialist views of psychic sensations that laid the
foundation for behaviorism, questioning, “What is there absurd in thinking that
beings, almost as perfect machines as ourselves, are, like us, made to understand and
to feel nature?”
Further popularizing the concept of human-like machines, Wolfgang von Kem-
pelen unveiled an ingenious chess-playing automaton in the court of Empress Maria
Theresa of Austria-Hungary in 1769. This machine, known as “The Turk,” fascinated
audiences and struck fear into its defeated opponents. Its appearance resembled a
puppet, adorned with gears, cranks, and levers reminiscent of clockwork. Remarkably,
The Turk not only played chess but also excelled at it, defeating most challengers and
baffling scientists attempting to explain its prowess. Kempelen toured Europe with his
automaton, and in Paris, The Turk defeated renowned inventor Charles Babbage and
even Benjamin Franklin, the U.S. Ambassador to France at the time.
The Turk also embarked on a tour of America, and in early 1826, hundreds gath-
ered for its initial exhibition matches in New York City at the National Hotel on
Broadway. These spectators were promised a glimpse of the first mechanical robot
capable of outsmarting humans in the intellectually demanding game of chess. How-
ever, The Turk was, in fact, a hoax. Concealed within the machine’s housing was a
diminutive chess master who manipulated the chessboard. In the modern era, John
Gaughan, a creator of magic equipment, constructed a functional replica of The
Turk, which can be observed in action on the BBC website [5].
What may have contributed to the misconception of The Turk as a genuine chess-
playing machine was its introduction during the early stages of the Industrial Revolu-
tion, a period spanning from 1760 to 1850, characterized by significant innovations in
agriculture, manufacturing, textiles, and transportation.
Although Kempelen is best known for The Turk, he completed numerous other
projects in his lifetime. One of the most notable was a speaking machine described in
his 1791 book The Mechanism of Human Speech. This device synthesized speech sounds,
A.1 Can machines think? 163

words, sentences, and complete phrases in French, Italian, and English. Unlike The
Turk, this invention operated as advertised, and one of the original machines is still
on display at the Deutsches Museum in Munich.
In the 18th century, a period marked by rapid technological advancements, people
found themselves both enthralled and apprehensive about the emerging world of inven-
tions. The Turk’s exhibition around Europe coincided with a wave of anti-technology
sentiments. The Luddite riots, a series of protests and acts of sabotage by textile work-
ers in England during the early 19th century, were a manifestation of this anxiety.
These workers feared that automation would lead to widespread unemployment and a
decline in wages.
Mary Shelley’s groundbreaking novel Frankenstein, published in 1818, added to
these concerns. The story depicted the creation of life from inanimate matter, raising
questions about the consequences of unchecked technological advancement. In 1811,
in Nottinghamshire, England, the introduction of automated machinery in the textile
industry sparked a violent workers’ riot. This uprising quickly spread to other regions
as protesters demanded the destruction of machines they believed were responsible
for their economic woes. Tensions escalated, leading to clashes between the Luddites
and government armed forces. By 1812, the act of destroying machinery was deemed
a capital offense, punishable by death. In total, 17 men were executed for this crime
in 1813, a stark reminder of the social upheaval caused by technological progress.
Amidst this turmoil, the foundation of modern technology was also being laid. In
the mid-19th century, the logician George Boole made significant strides in the field
of mathematics. His 1853 paper, “An Investigation of the Laws of Thought” [6], intro-
duced Boolean algebra. This mathematical framework would later prove indispens-
able in the design and operation of digital computers. Boolean algebra deals with
systems in which variables can only have two possible values, often represented as
“truth values,” such as yes/no, true/false, 0/1, or on/off.
Another visionary of the time was Charles Babbage (1791–1871), whose work laid
the groundwork for modern computing. He dedicated years to developing an auto-
matic table calculator capable of performing complex calculations required for navi-
gation and ballistics. Babbage’s most remarkable concept, however, was the Analytical
Engine [7]. Envisioned as a mechanical computer, it foreshadowed the computers we
use today. Inspired by the punch card technology employed by Joseph-Marie Jacquard
in his programmable loom, Babbage envisioned a general-purpose programmable
machine that could use punch cards for inputs, outputs, and data storage. Ada Love-
lace (1815–1852), often recognized as the world’s first computer programmer, recog-
nized the potential of Babbage’s Analytical Engine. In her work titled “Lovelace &
Babbage and the Creation of the 1843 ‘Notes,’” she documented the capabilities and
possibilities of this remarkable invention, laying the foundation for the future of com-
puting [8]:

In enabling mechanism to combine together general symbols, in successions of unlimited


variety and extent, a uniting link is established between the operations of matter and the
164 APPENDIX A Tracing the roots: From mechanical calculators to digital dreams

abstract mental processes of the most abstract branch of mathematical science. A new, a
vast, and a powerful language is developed for the future use of analysis, in which to
wield its truths so that these may become of more speedy and accurate practical
application for the purposes of mankind than the means hitherto in our possession have
rendered possible.

An examination of the Lovelace and Babbage documents unveils the divergence in


their priorities. Babbage’s primary emphasis was on calculations, whereas Lovelace, in
her visionary outlook, contemplated the potential for an evolved Analytical Engine to
not only perform calculations but also to create music and generate images. In her
writings, she expressed:

Supposing, for instance, that the fundamental relations of pitched sounds in the science
of harmony and of musical composition were susceptible of such expression and
adaptations, the engine might compose elaborate and scientific pieces of music of any
degree of complexity or extent.

While the Analytical Engine, as conceptualized by Babbage and Lovelace, never came
into physical existence, their foresight in discussing a general-purpose programmable
computing machine was remarkably ahead of its time, considering the developments
that were yet to unfold. One of the earliest realizations of these visionary ideas can be
attributed to Herman Hollerith (1860–1929), often regarded as the pioneer of auto-
mated data processing. Hollerith briefly served as a statistician at the US Census
Office, an experience that underscored the urgent need for improved computation
methods. Inspired by the Jacquard loom and the practice of using punched images in
the railroads to encode passengers’ characteristics on tickets, Hollerith invented an
electronic tabulating machine that would revolutionize data processing throughout
the first half of the 20th century [9].
For the 1890 census, Hollerith proposed a system where data for each individual
would be encoded on a separate card, to be subsequently tabulated by his innovative
machine [10] (figure A.5). This approach significantly accelerated data processing,
providing more statistics at a reduced cost. The success of this method led to contracts
with various entities, including railroad companies and foreign governments such as
Canada, Norway, and Austria. In 1896, building on the triumph of his census machines,
Hollerith founded the Tabulating Machine Company. In 1924, when salesman Thomas
J. Watson joined the company, they renamed it International Business Machines
(IBM). After years of dedicated research and development, IBM enhanced tabulating
technology to create a machine capable of executing if–then logic operations.
The pivotal breakthrough that paved the way for modern computers was the utili-
zation of electromagnetism. Fueled by the demand for computing technology during
World War II, Professor Howard H. Aiken designed the world’s first large-scale com-
puter, the Harvard Mark I. This remarkable machine employed punch cards and mag-
netic tape for data processing and storage. Unlike earlier computers tailored for specific
tasks, the Harvard Mark I was a versatile, general-purpose computer. The initial version
A.1 Can machines think? 165

Figure A.5 Hollerith system of electronic


tabulation (Photo courtesy of the Library
of Congress)

of the Mark I weighed five tons and stretched 50 feet in length. When unveiled offi-
cially in August 1944, it garnered global acclaim as the “world’s greatest mathematical
calculator,” with some even characterizing it as an “automatic brain.”
The next significant advancement in computing marked a conceptual leap for-
ward when Claude Shannon proposed the use of Boolean algebra in 1937 to simplify
the arrangement of relays within electrical networks. His groundbreaking work was
presented in his 1937 master’s thesis titled “A Symbolic Analysis of Relay and Switch-
ing Circuits” [11]. Shannon’s contributions laid the foundation for the design of mod-
ern digital circuits.
Similarly, in the late 1940s, John von Neumann made a pioneering contribution by
devising a way to store both code and data in a computer’s internal memory. This
innovation was pivotal in the development of computer science as a field and led to
the creation of the Electronic Discrete Variable Automatic Computer (EDVAC), the
successor to ENIAC. Although ENIAC is commonly recognized as the first digital elec-
tronic computer, it’s crucial not to overlook Colossus, a highly specialized machine
built in Great Britain in 1943 to decrypt the Nazi Enigma code. Decoding intercepted
messages using Colossus revealed crucial information, shortened the war, and has-
tened the defeat of the Nazis. Winston Churchill aptly described the Colossus team
as “the geese that laid the golden eggs and never cackled” to emphasize their invalu-
able contribution.
While computers were becoming more advanced and powerful, they were also
becoming unwieldy. For instance, UNIVAC could perform 1,000 calculations per second
166 APPENDIX A Tracing the roots: From mechanical calculators to digital dreams

but required 5,000 vacuum tubes, which were large and generated a significant amount
of heat. The development of the personal computer necessitated the invention of the
transistor, a pivotal advancement in the 20th century.
In contrast to vacuum tubes, transistors were small, energy efficient, and generated
minimal heat. These characteristics allowed for the integration of numerous transis-
tors into a single device. The first transistor was constructed in 1947 when Bell Labs
physicists John Bardeen and Walter Brattain connected a germanium amplifier to a
strip of gold foil. After several years of prototyping and testing, transistors began mass
production in the early 1950s, becoming an integral part of nearly all electronic
devices. The profound significance of the transistor was acknowledged when John
Bardeen, Walter Brattain, and William Shockley were jointly awarded the Nobel Prize
in Physics in 1956 for their research on semiconductors and the discovery of the tran-
sistor effect [12].
Another significant breakthrough took place in 1958 when Jack Kilby and Robert
Noyce manufactured the first integrated circuit, now commonly known as microchips.
These integrated circuits comprised various circuit elements, including transistors,
capacitors, and resistors, all fabricated as a single unit on a silicon wafer. Noyce went
on to found Intel in 1968 in Northern California’s San Jose area, popularizing the
term “Silicon Valley.” The microchip played a pivotal role in enabling the modern
computer revolution and the digital age, leading to Kilby’s recognition with a Nobel
Prize in Physics in 2000.
As semiconductor chip technology rapidly advanced, computers became smaller
and more affordable, democratizing their accessibility and fostering their widespread
adoption across various industries. On August 12, 1981, during a press conference at
the Waldorf Astoria ballroom in New York City, IBM introduced the IBM Personal
Computer, priced at $1,565. This marked a stark contrast to the computing landscape
two decades earlier, where an IBM computer could cost as much as $9 million, requir-
ing extensive space and personnel for operation. The IBM Personal Computer was
powered by an Intel 8088 microprocessor, operated at speeds measured in millionths
of a second, and was about the size of a portable typewriter. It contained 40K of read-
only memory and 16K of user memory and even featured a built-in speaker for music
generation [13] (figure A.6).
By 2024, it had become a common occurrence for machines to be equipped with
16 GB of RAM, and numerous companies generously provide their customers with 1
TB or even greater amounts of free storage space on their servers. To underscore the
magnitude of these advancements, let’s discuss the primary concepts. A bit represents
a single 0 or 1 in a computer’s memory, a byte comprises 8 bits, and 1 kilobyte (kB)
consists of 1,024 bytes. Building upon this, 1 MB equals 1024 kB, 1 GB encompasses
1024 MB, and 1 TB encompasses 1,024 GB.
Over the past four decades, the capacity and processing power of computers have
escalated by orders of magnitude. The primary catalyst for these remarkable strides
has been the capacity to fit increasingly more transistors onto a single chip. As early as
A.1 Can machines think? 167

Figure A.6 I started my first company in 1988 with machines that had 1 MB of RAM and 40 MB of hard drive
space.

the 1970s, computers were already integrating chips containing over 100,000 transis-
tors each. Notably, each of these chips boasted 20 times the computing power of the
UNIVAC, a computer that once filled an entire room and, when adjusted for inflation,
cost approximately $10 million! It is crucial to recognize that, without these chips,
modern-day marvels such as the internet, cell phones, and laptops, as well as the exis-
tence of industry giants like Apple, Microsoft, Facebook, and Google, would not have
come to fruition.
The count of transistors per chip has continued to double approximately every two
years since then, a phenomenon commonly referred to as Moore’s Law. By 2018, we
had crossed the threshold of “seven-nanometer devices,” a designation that pertains
to the size of these transistors. At this minuscule scale, we can house more than 20 bil-
lion transistors on a chip no larger than a fingernail. To provide some perspective,
there are 25,400,000 nanometers in a single inch, and a human hair typically spans
approximately 80,000 to 100,000 nanometers in width. Consequently, a mere 12,000
transistors, embodying the computing power equivalent to over two UNIVACs, occupy
the width of a human hair.
appendix B
Algorithms and
programming languages
This appendix lays the foundation for understanding the concept of AI and intro-
duces two key principles, algorithms and programming languages, which are vital
components in both computer science and AI development.

B.1 Algorithms
Computer programs are a set of instructions expressed in a form that is executable by
the machine. Mainly, computer programs can be classified as either operating sys-
tems or applications. Operating systems manage the computer’s internal functions,
while applications allow computer users to do things like play a video game or type a
document. Both operating systems and applications use algorithms to define their
logic and to describe the steps that need to be followed by the computer if it is to
carry out particular tasks. As such, algorithms lie at the heart of computer science.
The word algorithm is the Latinization of the name of Persian mathematician
Al-Khwarizmi, who wrote The Compendious Book on Calculation by Completion and Bal-
ancing between 813 and 833 ce. The only remaining copy of this historic work is
kept at Oxford University, and in it, Al-Khwarizmi presents step-by-step processes
for solving various types of problems. For example, he was the first to formally
introduce methods like the quadratic formula for solving second-degree equations
of the form ax2 + bx + c = 0.
An algorithm is to the functioning of a computer what a recipe is to cooking. To
create the desired result, we must define, in advance, a specific set of operations to be
applied in a fixed order. An algorithm enables a computer to repeat long sequences
of logical operations tirelessly and accurately as long as its logic and inputs are cor-
rect. Creating one generally involves breaking down the problem-solving process into

168
B.1 Algorithms 169

discrete steps. Designing an algorithm requires understanding the structure of a prob-


lem, the properties required of a solution, the possible inputs, and the desired outputs.
One approach to creating and implementing algorithms begins with using flow-
charts to outline a solution’s logic. Figure B.1 shows one of the flowcharts I filed in a

Start

No Is the electronic
Parse electronic
document a restricted
document
web page?

Compute context
and picture
pertinence values
Yes

Is any Yes Restrict access to web


pertinence value page and display a
>T? "denied access" page

No

Parse the electronic


document

End
Assign weights to
each word

Create an indexed (I)


representation of the
contexts in the
thesaurus

Create a list of the Restrict access to the Allow access to the


known contexts electronic document electronic document

Yes
For each distinct word in the
document, retrieve its Are the most
contexts, increment No
important contexts in
occurrences of contexts in (I) the list of restricted
and compute the context contexts?
weights to determine the
most important contexts

Figure B.1 An example of a flowchart that depicts the various steps within an algorithm
170 APPENDIX B Algorithms and programming languages

patent related to filtering electronic information according to a thesaurus-based con-


textual analysis of the content.
As we all know, the internet has revolutionized how information is disseminated
and shared. At any given time, massive amounts of digital data are exchanged elec-
tronically by millions of individuals worldwide with many diverse backgrounds and
personalities, including children, students, educators, businesspeople, and govern-
ment officials. While this information may be easily distributed to anyone with access
to a computer or the web, it may contain objectionable and offensive material not
appropriate to all users. In particular, adult or violent online content may not be
appropriate for children.
We will use a context-based approach to infer the context in which the words are
used. The context may be based on a built-in thesaurus or other techniques. A built-in
thesaurus could be a database of words and their contexts. For example, the word
apple may have as a context the word fruit, New York, or computer. We evaluate the appro-
priateness of particular content by calculating its pertinence value toward the objec-
tionable material.
Once a high-level process is laid out, modules can be devised to address specific
tasks. Having formalized the algorithm as logic and modules, we must select the
appropriate programming language to code it on a computer. Each module can be
coded and tested by a different team to increase the efficiency of the implementation.

B.2 Programming languages


People typically communicate with other people by speaking or writing in a familiar
language like English or French. Communication with computers, however, can
require the use of computer programming languages. These languages involve the
transfer of ideas via typed symbols, although, like our familiar languages, these sym-
bols are combined according to grammatical, syntactic, and semantic rules. Program-
ming languages are used to translate algorithms from human speech and writing to
symbols that a computer can interpret and instructions that it can execute.
Computer programming languages are, in many ways, much simpler than human
languages. For example, they use a very limited number of words and can only express
concepts, such as “If this, then do this; else, do that” or “Check whether condition X
holds and statement Y is true.” Expressing something in a programming language
requires strictly following the rules; no deviation is permitted. Compare this strictness
to English or French, which, even though they require words and sentences to be
combined following syntactic and semantic rules, can be used with extreme flexibility
to express an infinite variety of concepts.
In 1951, The Preparation of Programs for an Electronic Digital Computer by Wilkes,
Wheeler, and Gill [1] became the first book ever written about computer program-
ming, and it inspired the creation of many of the first languages. For instance, Flow-
Matic, the first English-like programming language, was created under Grace Hop-
per’s leadership in the late 1950s for UNIVAC I. Describing a programming language
B.2 Programming languages 171

with terms such as “English-like” gives a sense of how comprehensible a program’s


code might be. For example, rather than having to type explicit instructions for a
computer to retrieve data from a certain part of its memory and transmit it through a
particular channel, it may be preferable to type a simple instruction like “print X” to
accomplish the same task.
Work to make programming languages more user-friendly led to the 1959 emer-
gence of the Common Business-Oriented Language (COBOL). It was designed to
process business data and offered a natural-language style of programming. It gave
importance to data description and introduced the notion of data structures, which
are special formats for storing and retrieving specific types of information. COBOL
also split the structure of a general program into parts—an identification division, an
environment division, a data division, and a procedure division.
COBOL’s influence in the programming world significantly increased when it
became the mandatory language for U.S. Department of Defense computers. Although
languages have evolved since then, COBOL remains a widely used programming lan-
guage. According to Hartman [2], as of 2022, over 220 billion lines of COBOL code
were still running on machines in federal government agencies and financial institu-
tions. About 95 percent of ATM swipes are processed using COBOL code, and 80 per-
cent of each day’s in-person transactions are handled by a program written in COBOL.
Another important programming language, Fortran, was invented in the late
1950s by John Backus and his team. Describing his motivation, Backus wrote, “When I
was working on the IBM 701 (an early computer), writing programs for computing
missile trajectories, I started work on a programming system to make it easier to write
programs” [3]. Fortran was intended to make programming accessible, and by and
large, it did.
The once lengthy, difficult, and costly task of typing thousands of program instruc-
tions for a single problem could instead be accomplished with only several dozen For-
tran instructions. As a result, as soon as it was commercially released in 1957, Fortran
became the first computer language standard. It greatly helped modern computing by
opening the field of computer science to the general population. Like COBOL, For-
tran is still in use more than 60 years after its creation.
In the field of AI, we need programming languages that can be used to model
intelligent processes such as learning and reasoning. Such requirements go beyond
the capabilities of languages designed to perform numerical computations, like For-
tran. AI needs languages that can be used to manipulate programs and data, process
and interpret symbols, and represent the characteristics of different objects and for-
mats that arise in applications such as language processing, computer vision, and rea-
soning systems. To meet these requirements, John McCarthy designed Lisp in the late
1950s. He describes the objectives of the language as follows [4]:

As a programming language, LISP is characterized by the following ideas: computing


with symbolic expressions rather than numbers, representation of symbolic expressions
and other information by list structure in the memory of a computer.
172 APPENDIX B Algorithms and programming languages

Lisp pioneered many ideas in computer science, including tree data structures, auto-
matic storage management, dynamic typing, conditionals, higher-order functions,
recursion, etc.
A source code is a set of instructions used to write a computer program using one
of these languages, and most computer languages are either compiled or interpreted.
The compiled languages, such as C and C++, use another software known as a com-
piler to translate the source code to object code before the program can be executed.
The compiler converts the source code into specific machine instructions that can be
directly executed by the microprocessor (figure B.2).

INPUT PROCESS OUTPUT

Source Executable
Compiler
code program

Executable Program
Data
program output
Figure B.2 Compiler implementation

The source code of interpreter languages such as Lisp can be executed directly with-
out the need to be compiled (figure B.3). Therefore, applications can be developed
much quicker. Additionally, interpreted languages are hardware agnostic as they can
run on any architecture the interpreter supports. The disadvantage of an interpreter
is that the same code written, for instance, in Lisp, will be an order of magnitude
slower than code written using a compiled language such as C or C++. When an inter-
preter executes a program, it must read each line of the source code and convert it to
machine code on the fly; in contrast, a compiled code has already been translated into
machine code before executing the program.

INPUT PROCESS OUTPUT

Source
code Program
Interpreter
output
Data
Figure B.3 Interpreter implementation

Other languages, such as Java, use a hybrid approach. A computer program is classi-
fied as portable if it can be executed on various types of computers. Even if you can
compile a high-level language, such as C++, on different types of computers, the
resulting object code can generally only be executed on one type of computer. A
B.2 Programming languages 173

source code written in an interpreted language can be executed on any computer as


long as it has the interpreter language installed. Java is referred to as portable as the
source code is translated to a virtual machine code so as not to limit the compiler-gen-
erated code to a specific processor architecture.
Lisp was the first language to introduce the concept of garbage collection. This term
refers to an automatic process by which memory that was once used to store data for a
program but is no longer needed can be freed up for other uses.
Another widely used language is BASIC, an acronym for Beginner’s All-Purpose
Symbolic Instruction Code. Developed in 1964 by John Kemeny and Thomas Kurtz,
this straightforward language was, like Fortran, designed specifically for ease of use.
Kemeney and Kurtz wanted to enable students in scientific and nonscientific fields
alike to use computers in their work.
Before the introduction of such high-level languages as Fortran and BASIC, which
use more conceptual, hardware-independent, human language, programming com-
puters was rather difficult. Often, the only option available was the assembly language,
which is one step away from writing a string of 1s and 0s and requires writing a state-
ment for each instruction the computer must follow. In addition to being complex,
difficult, and time-consuming, assembly code usually references specific aspects of the
machine it’s run on, which means a program written for one computer probably won’t
work on a different machine.
Although each programming language can implement most algorithms, as we just
learned, languages are usually designed for a particular niche. Some are more appro-
priate for certain applications than others. For example, COBOL is well suited for
business data processing, Fortran is preferable for scientific applications, and Lisp was
designed for AI. Other languages, such as C, are more suitable for computer systems,
as they contain elements that manipulate the binary information stored in the
machine on which the code is being run. There are also languages such as the Struc-
tured Query Language (SQL) for manipulating databases and R for data analysis.
Today, there are hundreds of programming languages.
In case you haven’t seen computer code before, an example follows. The program
is written in the C programming language, and running it would make the computer
print “How are you?” on the screen. This text would be converted by a program called
a compiler into assembly code, which would then be processed as instructions and exe-
cuted by the computer:

#include <stdio.h>
int main( )
{
printf("How are you?");
return 0;
}
epilogue
As we conclude our discovery of the fascinating world of artificial intelligence, we
need to reflect on the journey we have taken together. Throughout the chapters of
this book, we explored the various AI techniques, tracing their evolution from the
early days of expert systems to the contemporary era of deep learning. What we’ve
discovered is that all these techniques rely on lines of code and mathematical for-
mulations. At its core, AI is a tool using algorithms to process and analyze vast
amounts of data, thereby empowering machines to detect patterns, make predic-
tions, and execute tasks that have traditionally required human intelligence. This
ability to learn from data lies at the heart of AI’s power. Unfortunately, misinforma-
tion, fueled by sensationalism, distorted the public’s perception, fostering unrealis-
tic expectations and speculative fears while minimizing the remarkable ways it can
enhance our lives.
AI stands as a powerful tool with the potential to significantly improve our qual-
ity of life. However, the realization of its profound impact depends on how effec-
tively we utilize it. It is crucial to approach its deployment with a nuanced
understanding of both its capabilities and limitations. By embracing a comprehen-
sive perspective, we can unlock the true potential of AI, navigating its complexities
responsibly and ethically to ensure that its benefits are maximized while potential
drawbacks are mitigated.
For more than three decades, my passion for AI has been a driving force, pro-
pelling me to apply AI to real-world, mission-critical applications. In writing this
book, my primary aspiration has been to demystify AI for those new to the field. It
is my hope that, through these pages, you’ve gained the knowledge needed to dis-
tinguish between the myths surrounding AI and its tangible reality.
Joseph Weizenbaum, the creator of ELIZA, the first chatbot, seems to have
avoided the common tendency to inflate the significance of one’s achievements.
He offered the following brilliant but sober description of AI [1]:

Machines are made to behave in wondrous ways, often sufficient to dazzle even the
most experienced observer. But once a particular program is unmasked, once its inner

174
epilogue 175

workings are explained in language sufficiently plain to induce understanding, its


magic crumbles away; it stands revealed as a mere collection of procedures, each quite
comprehensible.

Weizenbaum’s characterization remains as accurate today in 2024 as it was in 1965. AI


systems still have no reasoning skills, and they will not be replacing us any time soon
in tasks requiring intellectual ability, physical agility, common sense, judgment, cre-
ativity, social relationships, or complex reasoning.
My years working in the field of artificial intelligence have greatly increased my
appreciation of and respect for human emotion and intelligence. Most of our mental
abilities are beyond our powers of introspection and comprehension. If we think of
our body as our hardware and our mind as our software, we represent a technology far
more advanced than anything we could hope to create ourselves.
Emerging AI technologies hold the potential to empower humanity in profound
ways, transcending the boundaries of healthcare, education, engineering, agriculture,
and myriad other domains. However, it’s imperative to acknowledge that AI is not an
omnipotent panacea. It is a potent tool, and its usage will reflect both the noble and
the nefarious facets of human ingenuity.
AI’s trajectory will involve military applications, surveillance mechanisms, cyber
warfare, disinformation campaigns, and even oppressive uses. However, I am confi-
dent that the intelligence amplification resulting from the combination of human
ingenuity and the dazzling speed of machines will increase economic prosperity by
creating new opportunities for researchers and entrepreneurs to build new products,
create more jobs, and apply them for the greater good.
references
Chapter 2
1 Shortliffe, E. (1975). Computer-based medical consultations: MYCIN. Doctoral dis-
sertation, Stanford. Elsevier Computer Science Library. http://www.shortliffe
.net/Shortliffe-1976/MYCIN%20thesis%20Book.htm
2 International Atomic Energy Agency. (1988). Use of expert systems in nuclear
safety. https://www.iaea.org/publications/798/use-of-expert-systems-in-nuclear-
safety-report-of-a-technical-committee-meeting-vienna-17-21-october-1988
3 Johnson, H. E., Jr., & Bonissone, P. P. (1983). Expert system for diesel electric
locomotive repair. Journal of Forth Application and Research, 1(1), 7–16. https://
vfxforth.com/flag/jfar/vol1/no1/article1.pdf
4 Berkeley EECS. (n.d.). Lotfi A. Zadeh. University of California, Berkeley.
https://www2.eecs.berkeley.edu/Faculty/Homepages/zadeh.html
5 Holland, J. (1992, July 1). Genetic algorithms computer programs that
“evolve” in ways that resemble natural selection can solve complex problems
even their creators do not fully understand. Scientific American. https://
www.scientificamer ican.com/article/genetic-algorithms/

Chapter 3
1 Mehta, M., Agrawal, R., & Rissanen, J. (1996, January 1). Sliq: A fast scalable
classifier for data mining. In P. Apers, M. Bouzeghoub, & G. Gardarin (eds.),
Advances in Database Technology—EDBT ’96 (pp. 18–32). Springer. https://
link.springer.com/chapter/10.1007/bfb0014141
2 Breiman, L., Friedman, J., Stone, C. J., & Olshen, R. A. (1984). Classification
and regression trees (Wadsworth Statistics/Probability). Routledge.
3 Quinlan, J. R. (1993). C4.5: Programs for machine learning. Morgan Kaufmann.
4 Kass, G. V. (1980). An exploratory technique for investigating large quanti-
ties of categorical data. Journal of the Royal Statistical Society. Series C (Applied
Statistics), 29(2), 119–127. https://www.jstor.org/stable/2986296

176
references 177

5 Webros, J. J. (1994). Beyond regression new tools for prediction and analysis. In
The roots of backpropagation. Wiley.
6 Rumelhart, D., Hinton, G., & Williams, R. (1986). Learning representations by
back-propagating errors. Nature, 323, 533–536. https://doi.org/10.1038/323533a0
7 Kosner, A. (2014, December 29). Tech 2015: Deep learning and machine intelli-
gence will eat the world. Forbes. https://www.forbes.com/sites/anthonykosner/
2014/12/29/tech-2015-deep-learning-and-machine-intelligence-will-eat-the-world/
?sh=67e48e915d94
8 Mishra, A. (2017, June 26). Deep-learning networks rival human vision. Scientific
American. https://www.scientificamerican.com/article/deep-learning-networks
-rival-human-vision1/
9 Pham, S. (2018, January 16). Computers are getting better than humans at read-
ing. CNN Business. https://money.cnn.com/2018/01/15/technology/reading
-robot-alibaba-microsoft-stanford/index.html
10 Ivakhnenko, A. G., & Lapa, V. G. (1965). Cybernetic predicting devices. CCM Infor-
mation Corporation.
11 O’Shea, K., & Nash, R. (2015, December 2). An introduction to convolutional neu-
ral networks. arXiv. https://arxiv.org/abs/1511.08458
12 Dosovitskiy, A., Beyer, L., Kolesnikov, A., et al. (2021, June 3). An image is worth
16x16 words: Transformers for image recognition at scale. arXiv. https://arxiv.org/
abs/2010.11929
13 Chollet, F. (2017). Deep learning with python. Manning.
14 Adjaoute, A. (2017, October 20). Before you use the word “deep,” show me
the learning. PYMNTS. https://www.pymnts.com/news/security-and-risk/2017/
brighterion-machine-learning-technology/
15 European Commission. (2021, April 21). Europe fit for the digital age: Commission
proposes new rules and actions for excellence and trust in artificial intelligence. https://
ec.europa.eu/commission/presscorner/detail/en/IP_21_1682
16 St. Petersburg Coastal and Marine Science Center. A suite of Bayesian networks
was developed by researchers. US Geological Survey. https://www.usgs.gov/media/
images/suite-bayesian-networks-was-developed-researchers
17 Pearl, J. (n.d.). Bayesian networks. University of California, Los Angeles. https://
ftp.cs.ucla.edu/pub/stat_ser/R246.pdf
18 Pearl, J., & Mackenzie, D. (2018). The book of why. Basic Books.
19 United Nations Office on Drugs and Crime. (n.d.). Money laundering. https://
www.unodc.org/unodc/en/money-laundering/overview.html
20 Financial Crimes Enforcement Unit. (2000). FIU’s in action: 100 cases from the
Egmont Group. https://www.fincen.gov/sites/default/files/shared/fiuinaction.pdf
21 Adjaoute, A. (1988). Rylm : Générateur de systèmes experts pour les problèmes d'aide
aux diagnostics. PhD dissertation, Pierre and Marie Curie University. http://
www.theses.fr/fr/?q=akli+adjaoute
178 references

Chapter 5
1 Very scary: AI bot lays out plans to destroy humanity. (2023, April 12). YouTube.
https://www.youtube.com/watch?v=uKbFym9brW4&list=PL5-dEZRvaq3H8Bj
DyqfcLUxwsvhSUrp10&index=3
2 Altman, S. (2021, March 16). Moore’s law for everything. https://moores
.samaltman.com/
3 Brown, T., Mann, B., Ryder, N., et al. (2020). Language models are few-shot learners.
arXiv. https://arxiv.org/abs/2005.14165
4 Devlin, J., Chang, M., Lee, K., & Toutanova, K. (2019). BERT: Pre-training of deep
bidirectional transformers for language understanding. arXiv. https://arxiv.org/abs/
1810.04805
5 Raffel, C., Shazeer, N., Roberts, A., et al. (2020). Exploring the limits of transfer
learning with a unified text-to-text transformer. arXiv. https://arxiv.org/abs/1910
.10683
6 Zhang, S., Roller, S., Goyal, N., et al. (2022). OPT: Open pre-trained transformer
language models. arXiv. https://arxiv.org/abs/2205.01068
7 OpenAI. (n.d.). Documentation: Introduction. https://beta.openai.com/docs/
introduction/overview
8 OpenAI. (n.d.). API model: Models. https://platform.openai.com/docs/models/
overview
9 OpenAI. (n.d.). GPT-4. https://openai.com/research/gpt-4
10 OpenAI. (2023, March 27). GPT-4 technical report. arXiv. https://arxiv.org/abs/
2303.08774
11 Kan, M. (2023, April 6). Chatgpt could face defamation lawsuits for making up
facts about people. PCMAG. https://www.pcmag.com/news/chatgpt-could-face-
defamation-lawsuits-for-making-up-facts-about-people
12 Siri Team. (2017). Deep learning for Siri’s voice: On-device deep mixture density net-
works for hybrid unit selection synthesis. Apple Machine Learning Research. https://
machinelearning.apple.com/research/siri-voices
13 Bruell, A. (2023, June 28). Big news publishers look to team up to address
impact of AI. Wall Street Journal. https://www.wsj.com/articles/big-news-publish
ers-look-to-team-up-to-address-impact-of-ai-80c3b88e
14 Jargon, J. (2023, June 1). A chatbot was designed to help prevent eating disor-
ders. Then it gave dieting tips. Wall Street Journal. https://www.wsj.com/articles/
eating-disorder-chatbot-ai-2aecb179?mod=article_ inline
15 Korda, M. (2023, January 30). Could a chatbot teach you how to build a dirty
bomb?. Outrider. https://outrider.org/nuclear-weapons/articles/could-chatbot-
teach-you-how-build-dirty-bomb
16 Weizenbaum J. (1966). ELIZA: A computer program for the study of natural
language communication between man and Machine. Communications of the
ACM, 9(1), 36–45. https://dl.acm.org/doi/10.1145/365153.365168
references 179

17 Bridle, J. (2023, March 16). The stupidity of AI. The Guardian. https://
www.theguardian.com/technology/2023/mar/16/the-stupidity-of-ai-artificial-
intelligence-dall-e-chatgpt
18 Cook, G. (2011, March 1). Watson, the computer Jeopardy! champion, and the
future of artificial intelligence. Scientific American. https://www.scientificameri
can.com/article/watson-the-computer-jeopa/

Chapter 6
1 5 unsolved mysteries about the brain. (2023, June 13). Allen Institute. https://
alleninstitute.org/news/5-unsolved-mysteries-about-the-brain/
2 Koch, C. (2013). The end of the beginning for the brain. Science, 339(6121),
759–760. https://www.science.org/doi/full/10.1126/science.1233813
3 Brain basics: The life and death of a neuron. (n.d.). National Institute of Neu-
rological Disorders and Stroke. https://www.ninds.nih.gov/health-informa
tion/public-education/brain-basics/brain-basics-life-and-death-neuron
4 Ackerman, S. (1992). Discovering the brain. National Academies Press. https://
www.ncbi.nlm.nih.gov/books/NBK234151/
5 Fitzgerald, F. (1999). Curiosity. Annals of Internal Medicine, 130(1), 70–72
6 Mosley, M. (2010, April 27). An accidental history of science. BBC News. http://
news.bbc.co.uk/2/hi/science/nature/8644755.stm
7 Richard Feynman on curiosity. (n.d.). Farnam Street Media. https://fs.blog/
richard-feynman-curiosity/
8 Feynman, R., Leighton, R., & Sands, M. (2011). Six easy pieces. Basic Books.
(Original work published 1994)
9 Kidd, C., & Hayden, B. (2015). The psychology and neuroscience of curiosity.
Neuron, 88(3), 449–460. https://doi.org/10.1016/j.neuron.2015.09.010
10 Swezey, K. (1958). Nikola Tesla: Electricity today is generated, transmitted, and
converted to mechanical power by means of his inventions. Science, 127(3307),
1147–1159. https://www.science.org/doi/abs/10.1126/science.127.3307.1147
11 Steinbeck, J. (2021) Travels with Charley in search of America. Amazon Kindle.
(Original work published 1962). https://www.amazon.com/dp/B08V1C36W3/
ref=dp-kindle-redirect?_encoding=UTF8&btkr=1
12 Buchanan, B. & Headrick, T. (1970). Some speculation about artificial intelligence
and legal reasoning. Stanford Law Review, 23, 40–62. https://digitalcommons
.law.buffalo.edu/cgi/viewcontent.cgi?article=1866&context=journal_articles
13 Roberts, M., Driggs, D., Thorpe, M. et al. (2021). Common pitfalls and recom-
mendations for using machine learning to detect and prognosticate for
COVID-19 using chest radiographs and CT scans. Nature Machine Intelligence, 3,
199–217. https://www.nature.com/articles/s42256-021-00307-0
14 Heaven, W. (2021, July 30). Hundreds of AI tools have been built to catch covid.
None of them helped. MIT Technology Review. https://www.technologyreview
180 references

.com/2021/07/30/1030329/machine-learning-ai-failed-covid-hospital-diagnosis-
pandemic/
15 Wynants, L., Van Calster, B., Collins, G. et al. (2020). Prediction models for
diagnosis and prognosis of Covid-19: Systematic review and critical appraisal.
British Medical Journal, 369. https://www.bmj.com/content/369/bmj.m1328
16 Su, J., Vargas, D., & Sakurai, K. (2017). One pixel attack for fooling deep neural
networks. IEEE Transactions on Evolutionary Computation, 23(5).

Chapter 7
1 Echiquier. (n.d.). Louvre. https://collections.louvre.fr/en/ark:/53355/cl010116912
2 Zobrist, A. (1970). A new hashing method with application for game playing.
The University of Wisconsin. http://digital.library.wisc.edu/1793/57624
3 Moriarty, D. E., & Mikkulainen, R. (1996). Efficient reinforcement learning
through symbiotic evolution. Machine Learning, 22, 11–32. https://doi.org/10
.1007/BF00114722
4 Harrell, E. (2009, December 25). Magnus Carlsen: The 19-year-old king of chess.
Time. http://content.time.com/time/world/article/0,8599,1948809,00.html
5 Miller, B. (2020, August 28). How survivorship bias can cause you to make mis-
takes. BBC. https://www.bbc.com/worklife/article/20200827-how-survivorship-
bias-can-cause-you-to-make-mistakes

Chapter 8
1 Sheil, B. (1987, July). Thinking about artificial intelligence. Harvard Business
Review. https://hbr.org/1987/07/thinking-about-artificial-intelligence
2 Lepore, J. (2019, February 25) Are robots competing for your job? New Yorker.
https://www.newyorker.com/magazine/2019/03/04/are-robots-competing-for
-your-job
3 Global Challenges Foundation. (2015). 12 risks that threaten human civilisation.
https://www.sintef.no/globalassets/project/nexus/2015-univ-of-oxford-12-risks-
with-infinite-impact-full-report-1.pdf
4 Dadich, S. (2016, August 24). Barack Obama, neural nets, self-driving cars, and
the future of the world. WIRED. https://www.wired.com/2016/10/president-
obama-mit-joi-ito-interview/
5 Cuthbertson, A. (2018, January 15). Robots can now read better than humans,
putting millions of jobs at risk. Newsweek. https://www.newsweek.com/robots-
can-now-read-better-humans-putting-millions-jobs-risk-781393
6 Weller, C. (2016, August 31). Here’s what it’ll be like to eat at restaurants of
the future. Business Insider. https://www.businessinsider.com/future-restaurants-
robot-automation-2016-8
7 World Economic Forum. (2018, September 17). The future of jobs report 2018.
https://www.weforum.org/reports/the-future-of-jobs-report-2018
references 181

8 Manyika, J., Lund, S., Chui, M., et al. (2017, November 28). Jobs lost, jobs
gained: What the future of work will mean for jobs, skills, and wages. McKinsey
Global Institute. https://www.mckinsey.com/featured-insights/future-of-work/
jobs-lost-jobs-gained-what-the-future-of-work-will-mean-for-jobs-skills-and-wages
9 Ioannou, L. (2019, April 2). IBM CEO Ginni Rometty: AI will change 100 percent of
jobs over the next decade. CNBC. https://www.cnbc.com/2019/04/02/ibm-ceo-
ginni-romettys-solution-to-closing-the-skills-gap-in-america.html
10 Number of employees in the automobile industry in Germany. (2004). Statis-
tica. https://www.statista.com/statistics/587576/number-employees-german-car-
industry/
11 Manjoo, F. (2022, October 7). In the battle with robots, human workers are win-
ning. New York Times. https://www.nytimes.com/2022/10/07/opinion/mach
ines-ai-employment.html
12 Cherry, L. (1979, August 5). Medical technology: The new revolution. New York
Times. https://www.nytimes.com/1979/08/05/archives/medical-technology-the
-new-revolution-121000346.html
13 Fitzgerald, F. (1999). On being a doctor: Curiosity. Annals of Internal Medicine,
130(1), 70–72. https://www.bumc.bu.edu/facdev-medicine/files/2010/09/
Fitzgerald_AnnInternMed_1999_130_70_Curiosity.pdf
14 Strickland, E. (2019, April 2). How IBM Watson overpromised and underdeliv-
ered on AI health care. IEEE Spectrum. https://spectrum.ieee.org/how-ibm-
watson-overpromised-and-underdelivered-on-ai-health-care
15 Cramer, J. (2018, June 21). CEO of tech-focused pizza delivery company on
solving unemployment with robots. CNBC. https://www.cnbc.com/video/
2018/06/21/zume-ceo-solving-unemployment-with-a-robotic-delivery-company
.html
16 Crum, R. (2022, October 17). Zume Pizza closes down, cuts 172 jobs in Moun-
tain View. The Mercury News. https://www.mercurynews.com/2020/01/09/
zume-pizza-closes-down-cuts-172-jobs-in-mountain-view/
17 Chernova, Y. (2023, June 9). More startups throw in the towel, unable to raise
money for their ideas. Wall Street Journal. https://www.wsj.com/articles/more-
startups-throw-in-the-towel-unable-to-raise-money-for-their-ideas-eff8305b?mod
=hp_lead_pos2
18 Steinbeck, J. (2021) Travels with Charley in search of America. Amazon Kindle.
(Original work published 1962)
19 Nassauer, S. (2020, November 2). Walmart scraps plan to have robots scan
shelves. Wall Street Journal. https://www.wsj.com/articles/walmart-shelves-plan
-to-have-robots-scan-shelves-11604345341
20 Quinn, H. (2021, September 27). Why robots can’t sew your T-shirt. WIRED.
https://www.wired.com/story/why-robots-cant-sew-t-shirt/
182 references

21 Melendez, L., & Guerrero, J. C. (June 29, 2023). Journalist documents wild ride
inside Waymo self-driving car in SF. ABC News. https://abc7news.com/self-
driving-cars-san-francisco-robo-taxi-waymo-cruise-car/13442069/
22 Neuman, S. (2014, June 24). NTSB: Too much technology, too little training
caused Asiana Crash. NPR. https://www.npr.org/sections/thetwo-way/2014/
06/24/325209092/ntsb-too-much-technology-too-little-training-caused-asiana-
crash
23 Newton, C. (2020, May 12). Facebook will pay $52 million in settlement with
moderators who developed PTSD on the job. The Verge. https://www.theverge
.com/2020/5/12/21255870/facebook-content-moderator-settlement-scola-ptsd-
mental-health
24 Jeong, S. (2018, April 13). AI is an excuse for Facebook to keep messing up. The
Verge. https://www.theverge.com/2018/4/13/17235042/facebook-mark-zuck
erberg-ai-artificial-intelligence-excuse-congress-hearings
25 Griffin, A. (2017, July 17). Facebook artificial intelligence robots had to be shut
down after they started talking to each other in their own language. The Indepen-
dent. https://www.independent.co.uk/life-style/facebook-artificial-intelligence-
ai-chatbot-new-language-research-openai-google-a7869706.html

Chapter 9
1 Good, I. J. (1965). Speculations concerning the first ultraintelligent machine.
In Advances in Computers (Vol. 6). Academic Press. https://vtechworks.lib.vt
.edu/bitstream/handle/10919/89424/TechReport05-3.pdf?sequence=1
2 Allen, F. E. (2001). The myth of artificial intelligence. American Heritage, 52(1).
https://www.americanheritage.com/myth-artificial-intelligence
3 Simon, H., & Newell, A. (1958). Heuristic problem solving: The next advance in
operations research. Operations Research, 6(1), 1–10. https://www.academia
.edu/886628/Heuristic_problem_solving_The_next_advance_in_operations_
research
4 Altman, S. (2017, December 7). The merge. https://blog.samaltman.com/the-
merge
5 Global Challenges Foundation. (2015). 12 risks that threaten human civilisation.
https://www.sintef.no/globalassets/project/nexus/2015-univ-of-oxford-12-risks
-with-infinite-impact-full-report-1.pdf
6 Lovelace, A. (2012). 100 notes–100 thoughts. Hatje Cantz. (Original work pub-
lished 1843). http://bettinafuncke.com/100Notes/055_Lovelace_B5.pdf
7 Samuel, A. (1960). Some moral and technical consequences of automation—A
refutation. Science, 132(3429), 741–742. https://www.science.org/doi/epdf/
10.1126/science.132.3429.741
8 SRI International. (1972). Shakey the robot. https://www.sri.com/hoi/shakey-
the-robot/
references 183

9 Reshko, G., Mason, M. T., & Nourbakhsh, I. R. Rapid prototyping of small


robots. Carnegie Mellon University. https://www.cs.cmu.edu/~illah/PAPERS/
pprk.pdf
10 Jet Propulsion Laboratory. (n.d.). Mars Pathfinder/Sojourner Rover. NASA. https://
www.jpl.nasa.gov/missions/mars-pathfinder-sojourner-rover
11 Entertainment robot “aibo” announced. (2017, November 1). Sony. https://
www.sony.com/en/SonyInfo/News/Press/201711/17-105E/
12 McBride, S. (2020, November 17). Iconic Boston Dynamics robots seek stable
employment. Bloomberg Businessweek. https://www.bloomberg.com/news/arti
cles/2020-11-17/boston-dynamics-needs-to-start-making-money-off-its-robots
13 Nutt, A. E. (2016, October 13). In a medical first, brain implant allows para-
lyzed man to feel again. Washington Post. https://www.washingtonpost.com/
news/to-your-health/wp/2016/10/13/in-a-medical-first-brain-implant-allows-
paralyzed-man-to-feel-again/
14 Kurzweil, R. (2012). How to create a mind: The secret of human thought revealed.
Viking Press.
15 Kurzweil, R. (2006). The singularity is near: When humans transcend biology. Pen-
guin Books.
16 Koch, C. (2013). The end of the beginning for the brain. Science, 339(6121),
759–760. https://www.science.org/doi/full/10.1126/science.1233813
17 Lipton, B. (2010). The biology of belief: Unleashing the power of consciousness, matter
and miracles. Hay House.
18 Morgan, F. E., Boudreaux, B., Lohn, A. J., et al. (2020). Military applications of
artificial intelligence. RAND Corporation. https://www.rand.org/pubs/research_
reports/RR3139-1.html
19 Buchaniec, C. (2022, September 6). https://www.c4isrnet.com/artificial-intelli
gence/2022/09/06/retired-air-force-general-selva-joins-ai-focused-logistics-firm/
20 Weinzenbaum, J. (1976). Introduction. In Computer power and human reason:
From judgement to calculation. Freeman.

Chapter 10
1 E-commerce. (n.d.). Statista. https://www.statista.com/markets/413/e-commerce/
2 Lee, J. Card fraud losses reach $28.65 billion. (2020, December 1). Nilson
Report, 1187. https://www.cnbc.com/2021/01/27/credit-card-fraud-is-on-the-
rise-due-to-covid-pandemic.html
3 New data shows FTC received 2.2 million fraud reports from consumers in
2020. (2021, February 4). Federal Trade Commission. https://www.ftc.gov/
news-events/press-releases/2021/02/new-data-shows-ftc-received-2-2-million-
fraud-reports-consumers
4 Maybin, S. (2016, October 17). How maths can get you locked up. BBC. https:/
/www.bbc.com/news/magazine-37658374
184 references

5 Angwin, J., Larson, J., Mattu, S., & Kirchner, L. (2016, May 23). Machine bias.
ProPublica. https://www.propublica.org/article/machine-bias-risk-assessments-
in-criminal-sentencing
6 Vestager, M. (2021, April 21). Europe fit for the digital age: Commission pro-
poses new rules and actions for excellence and trust in artificial intelligence.
European Commission. https://ec.europa.eu/commission/presscorner/detail/
en/IP_21_1682
7 Institute for New Generation Computer Technology. (1992). Fifth generation
computer systems (Vol. 1). IOS Press.
8 Caruana, R., Lou, Y., Gehrke, J., Koch, P., Sturm, M., & Elhadad, N. (2015).
Intelligible models for healthcare: predicting pneumonia risk and hospital 30-
day readmission. Proceedings of the 21th ACM SIGKDD International Conference on
Knowledge Discovery and Data Mining (pp. 1721–1730). Association for Comput-
ing Machinery. https://people.dbmi.columbia.edu/noemie/papers/15kdd.pdf
9 Lee, P. (2016, March 25). Learning from Tay’s introduction. Microsoft. https://
blogs.microsoft.com/blog/2016/03/25/learning-tays-introduction/
10 Zuckerman, G. (2021, January 14). James Simons steps down as chairman of
Renaissance Technologies. Wall Street Journal. https://www.wsj.com/articles/
james-simons-steps-down-as-chairman-ofrenaissance-technologies-11610637320
11 Hernandez, D., & Fitch, A. (2021, February 23). IBM’s retreat from Watson
highlights broader AI struggles in health. Wall Street Journal. https://www.wsj
.com/articles/ibms-retreat-from-watson-highlights-broader-ai-struggles-in-health
-11613839579
12 Huang, A. (2021, July 14). Zillow utilizes explainer AI, data to revolutionize how
people sell houses. Venture Beat. https://venturebeat.com/2021/07/14/zillow-
utilizes-ai-data-to-revolutionize-how-people-sell-houses/
13 Parker, W. (2021, November 2). Zillow quits home-flipping business. Wall Street
Journal. https://www.wsj.com/articles/zillow-quits-home-flipping-business-cites
-inability-to-forecast-prices-11635883500
14 Service, R. F. (2020, August 20). AI invents new ‘recipes’ for potential COVID-
19 drugs. Science. https://www.science.org/content/article/ai-invents-new-reci-
pes-potential-covid-19-drugs
15 AI-driven project identifies up to 390 potential drugs against COVID. (2020,
May 26). BBVA. https://www.bbva.com/en/ai-driven-project-identifies-up-to-
390-potential-drugs-against-covid/
16 EMA Pandemic Task Force. (2020, May 29). COVID-19: Reminder of the risks
of chloroquine and hydroxychloroquine. European Medicines Agency. https://
www.ema.europa.eu/en/news/covid-19-reminder-risks-chloroquine-hydroxy
chloroquine
17 Coronavirus related poisonings, information. (n.d.). Oregon Poison Center.
https://www.ohsu.edu/oregon-poison-center/coronavirus-related-poisonings-
information
references 185

Chapter 11
1 A-levels and GCSEs: How did the exam algorithm work? (2020, August 20).
BBC. https://www.bbc.com/news/explainers-53807730
2 Musk, E. (2021, April 29). A major part of real-world AI has to be solved to
make unsupervised, generalized full self-driving work, as the entire [Tweet].
Twitter. https://twitter.com/elonmusk/status/1387901003664699392?lang=en
3 McFarlane, T. (2021, April 8). Credit card rejections during pandemic mean
frustration for consumers, missed sales for retailers. CMSPI. https://cmspi
.com/excessive-online-credit-card-rejections-during-pandemic-mean-frustration
-for-consumers-missed-sales-for-retailers/
4 Ransomware Task Force. (n.d.). Combating ransomware. Institute for Security
and Technology. https://securityandtechnology.org/wp-content/uploads/2021/
04/IST-Ransomware-Task-Force-Report.pdf
5 Eaton, C., & Volz, D. (2021, May 19). Colonial Pipeline CEO Tells why he paid
hackers a $4.4 million ransom. Wall Street Journal. https://www.wsj.com/articles/
colonial-pipeline-ceo-tells-why-he-paid-hackers-a-4-4-million-ransom-11621435636
6 Goswami, R., & Brewer, C. (2023, September 14). Caesars paid millions in ran-
som to cybercrime group prior to MGM hack. CNBC. https://www.cnbc.com/
2023/09/14/caesars-paid-millions-in-ransom-to-cybercrime-group-prior-to-
mgm-hack.html
7 Knight, W. (2020, January 21). AI can do great things—if it doesn’t burn the
planet. WIRED. https://www.wired.com/story/ai-great-things-burn-planet/
8 Hao, K. (2019, June 6). Training a single AI model can emit as much carbon as
five cars in their lifetimes. MIT Technology Review. https://www.technologyre
view.com/2019/06/06/239031/training-a-single-ai-model-can-emit-as-much-
carbon-as-five-cars-in-their-lifetimes/

Appendix A
1 Pascal, B. (2012). Pascal’s pensées. Amazon Kindle Edition. (Original work pub-
lished 1670)
2 Périer, G. (1993, February 24). La vie de monsieur Pascal/La vie de Jacqueline Pas-
cal. (La petite vermillon, 27). Table Ronde.
3 Leibnitz, G. (2006). Explication de l'arithmétique binaire, qui se sert des seuls car-
actères O et I avec des remarques sur son utilité et sur ce quelle donne le sens des anciennes
figures chinoises de Fohy. HAL open science. (Original work published 1703)
https://hal.archives-ouvertes.fr/file/index/docid/104781/filename/p85_89_
vol3483m.pdf
4 De la Mettrie, J. O. (2016). Man a machine. Project Gutenberg. (Original work
published 1912) https://www.gutenberg.org/files/52090/52090-h/52090-h.htm
5 Meet the Mechanical Turk, an 18th century chess machine. BBC. https://
www.bbc.com/news/av/magazine-21882456
186 references

6 Boole, G. (2017). An Investigation of the laws of thought. Project Gutenberg. (Orig-


inal work published in 1854) https://www.gutenberg.org/files/15114/15114-
pdf.pdf
7 Babbage, C. (1905). The Babbage papers. Science Museum Group. https://collection
.sciencemuseumgroup.org.uk/documents/aa110000003/the-babbage-papers
8 Fuegi, J., & Francis, J. (2003, October–November). Lovelace & Babbage and the
creation of the 1843 “Notes.” IEEE Annals of the History of Computing. https://
www.scss.tcd.ie/Brian.Coghlan/repository/J_Byrne/A_Lovelace/J_Fuegi_&_J_
Francis_2003.pdf
9 Herman H. Hollerith. (1995, updated 2013). https://history.computer.org/pio
neers/hollerith.html
10 Herman Hollerith. (n.d.). US Census Bureau. https://www.census.gov/history/
www/census_then_now/notable_alumni/herman_hollerith.html
11 Shannon, C. (1940). A symbolic analysis of relay and switching circuits. Master’s dis-
sertation, MIT. https://dspace.mit.edu/handle/1721.1/11173
12 1956 Nobel Prize in Physics. (n.d.). Nokia Bell Labs. http://www.bell-labs.com/
about/awards/1956-nobel-prize-physics/
13 Rawsthorn, A. (2011, July 31). The clunky PC that started it all. New York Times.
https://www.nytimes.com/2011/08/01/arts/the-clunky-pc-that-started-it-
all.html

Appendix B
1 Wilkes, M., Wheeler, D., & Gill, S. (1951). The preparation of programs for an elec-
tronic digital computer. Addison-Wesley.
2 Cobol blues. (n.d.). Thomson Reuters. http://fingfx.thomsonreuters.com/gfx/
rngs/USA-BANKS-COBOL/010040KH18J/index.html
3 Backus, J. (1979). Pathfinder. Think. https://www.softwarepreservation.org/
projects/FORTRAN/paper/Backus-Think.pdf
4 McCarthy, J. (1979). History of Lisp. Stanford University. http://jmc.stanford
.edu/articles/lisp/lisp.pdf
index
A lack of generalization 97 data as lifeblood of 133
learning from successful and importance of planning
AAAI (Association for the failed applications of 123 134
Advancement of Artificial misuse of 125–127 realistic perspective 134
Intelligence) 61 model lifecycle risk mitigation 134
ABC News 106 management 134–138 successful applications of 124
ADALINE (Adaptive Linear adaptive learning 138 technique combination 145
Neuron) 29 administration 138 unsupervised learning 145
adaptability 46–47 AI platforms 138 AIBO 116
adaptive learning 138 back-office review 138 “AI-driven project identifies up
administration 138 behavior analysis 137 to 390 potential drugs
AI (artificial intelligence) data preparation 135 against COVID”
AI factory 146 data storage 137 (article) 132
and intelligence, chess and data transformation 137 “AI Invents New ‘Recipes’ for
Go 94–96 live production 137 Potential COVID-19 Drugs”
automation, of simple human model creation 137 (article) 132
tasks 104–109 notifications 137 Air France Flight 447 106
causality inference 152 next-generation AI 141 algorithms
contextual reasoning 151 analogical reasoning and bias in 143
data and 92–94 transferability 153 Allen Intervals 151
data coherence 143 effective data storage and analogical reasoning 153
defined 41 processing 147 analogy 87
eliminating irrelevant feature engineering 144 analytic tool 13
attributes 143 traceability and artificial neural networks 29–32
failures 128–132 monitoring 150 ASIMO 116
Watson 130–132 personalization 153 automation
Zillow 130–132 platforms 138 in transportation 105–109
generative AI 53 resilience and robustness 149 of simple human tasks
ChatGPT 55–60 sampling 142 104–109
guiding principles for success- scalability 148
ful projects 138 security 149 B
human–machine setting up for success 133
collaboration 155 collaboration and back-office review 138
job displacement 99–103 expertise 134 backpropagation algorithm 29

187
188 INDEX

Bard data mining 23–24 LLMs (large language


conclusion 61 Bayesian networks 37–39 models) 53–55
overview 60 decision trees for fraud humans vs. 63–66
Bayesian networks 37–39 prevention 25–28 risk of 72–73
behavior analysis 137 neural networks, artificial genetic algorithms 18–22
Boeing 737 MAX aircraft 29–32 geo-location profiling 50
106 data preparation 135 GIGO (garbage in, garbage
Bossa Nova Robotics 105 data storage 137 out) 28
Boston Dynamics Robotics data storage and processing 147 Go, chess and 94–96
116 data transformation 137 goal state 44
BRMS (business rules manage- DEC (Digital Equipment Google Translate 107
ment system) 13–14 Corporation) 12 GPUs (graphics processing
decision trees, for fraud units) 57
C prevention 25–28
deep learning 32–37 H
Čapek, Karel 113 benefits of 34
C4.5 algorithm 24 limitations of 35–37 Harvard Business Review 100
CART algorithm 24 DELTA (Diesel Electric Locomo- hidden layer 29
causality inference 152 tive Repair) 12 Hirose, Shigeo 115
CBR (case-based reasoning) 10, deployability 148 How to Create a Mind: The Secret of
15–16 Human Thought Revealed
CHAID algorithm 24 E (Kurzweil) 118
ChatGPT 52, 55–60 human brain 77–87
creating human-like text 56 eliminating irrelevant analogy 87
hallucination 57 attributes 143 common sense 81
chess, AI and 94–96 expert systems 9–12 creativity 85
CINEM (Centre Informatique case-based reasoning 15–16 curiosity 82
Necker Enfant Malade) 14 fuzzy logic 16–18 imagination 83
combinatorial explosion 21 genetic algorithms 18–22 intuition 86
common sense 81 explicability 150 memory 79
computer vision subconscious mind 80
AI and COVID 88 F thoughts 77
human vs. 87–90 human-machine
image reasoning 89–90 Facebook 107 collaboration 155
constraints 44 Farmer-Wolf-Goat-Cabbage human-machine hybrids
content moderation 107 riddle 93 118–119
contextual reasoning 151 feature engineering 144 human vision vs. computer
control strategy 44 final state 44 vision 87–90
COVID-19, AI and 88 fitness 19 AI and COVID 88
Cramer, Jim 104 fitness function 21 image reasoning 89–90
creativity 85 Fitzgerald, Faith 102 human vs. machine 76
crossover 19, 21 forward propagation 31
curiosity 82 fraud prevention, decision trees I
for 25–28
D Furby 116 “IBM’s retreat from Watson
fuzzy logic 16–18 highlights broader AI strug-
data gles in Health”
AI and 92–94 G (article) 131
as lifeblood of AI 133 IEEE (Institute of Electrical and
bias in 143 generalization 97 Electronics Engineers) 61
data coherence 143 generative AI 52–53 if-then-else format 11
data flexibility 142 and intellectual property 72 if-then-else rules 14
INDEX 189

if-then rules 11 money laundering, unsuper- rule-authoring environment 13


if-then statements 10 vised learning and 39–41 rule coherence module 13
imagination 83 multidimensional profiling 50 rule governance 13
inference engine 13 mutation 19, 21 rule repository 13
initial population 21 R.U.R. “Rossum’s Universal
initial state 44 N Robots” (Čapek) 113
input layer 29
intellectual property 72 neural networks, artificial S
“Intelligible Models for Health- 29–32
care: Predicting Pneumo- New York Times 101 sampling 142
nia Risk and Hospital next-generation AI Samuel, Arthur 23
30-day Readmission” adaptability 154 SANE (Symbiotic Adaptive
(article) 128 explicability 150 Neuro-Evolution) 96
interoperability 148 sustainable AI 153 scalability 148
intuition 86 NLP (natural language security 149
iPrevent™ 124 processing) 53 selection 21
irrelevant attributes 143 notifications 137 Shakey 114–115
(NTSB) National Transportation Shannon, Claude 95
J and Safety Board 106 Shannon number 95
SLIQ algorithm 24
“James Simons Steps Down as O smart agents, principles of
Chairman of Renaissance 44–50
Technologies” (article) 130 Oncology Expert Advisor adaptability 46–47
tool 103 language 47–50
K operators 44 smart agent technology 43
output layer 29 Steinbeck, John 104
keywords 48 subconscious mind 80
KL1 programming P sustainable AI 153
language 128
Pathfinder mission 115
L peer-comparison profiling 50 T
Perceptron 29
language, smart agents 47–50 personalization 153 technological singularity 110
LIFE magazine 115 predictions, reliability of 147 genesis of 111–113
live production 137 merging human with
LLMs (large language Q machine 118–119
models) 53–55 science fiction vs. reality
benefits of 70 quality assurance 120–122
humans vs. 63–66 challenges of 146 temporal reasoning 151
illusion of understanding 74 defined 146 textile work 105
limits of 70 next-generation AI 147 The Biology of Belief (Lipton)
long-term profiling 50 119
R The Singularity Is Near
M (Kurzweil) 118
real-time profiling 50 thoughts 77
MADALINE (Multiple reasoning traceability and monitoring 150
ADALINE) 29 analogical 153 transferability 153
memory 79 temporal 151 transportation, automation
merging human with recursive profiling 50 in 105–109
machine 118–119 reliability of predictions 147 Travels with Charley
misuse of AI 125–127 resilience 149 (Steinbeck) 104
MIT Technology Review 61 robots, evolution of 113–117 TSP (traveling salesman
model creation 137 robustness 149 problem) 21
190 INDEX

U W Z
understanding, AI and 66–70 Walmart 105 Zadeh, Lotfi 16
unsupervised learning 39–41, 145 Watson (IBM) 103, 130–132 Zillow 130–132
WIRED magazine 100 “Zillow utilizes explainer AI data
V World Economic Forum to revolutionize how people
100 sell houses” (article) 131
vision, human vs. computer “Zillow was exiting the home-
87–90 X flipping business”
AI and COVID 88 (article) 131
image reasoning 89–90 XCON (eXpert CONfigurer) 12 Zume Pizza 104
DATA

Inslde AI
Akli Adjaoute
Madhusudhan Konda ● Foreword by Shay Banon See first page
Foreword by Raymond Kendall, Honorary Secretary General of INTERPOL

A
rtificial Intelligence enthusiasts promise everything from
human-like collaboration on everyday tasks to the end of
work as we know it. Is AI just a flash in the pan, or can
it really transform how you do business? This intriguing book
“gained
Provides valuable insights
from applying AI
sifts through the hype and separates the truth from the myths,
in high-stakes, mission-
with clear advice on what AI can—and can’t—achieve.
Inside AI provides a clear-headed overview of modern artificial
critical applications.

—Raymond Kendall, Honorary
Secretary General of INTERPOL
intelligence, including the recent advances of Generative AI
and Large Language Models. Its accessible and jargon-free
explanations of leading AI techniques showcase how AI “A laborwilloflovelove.it.”Readers
delivers tangible advantages to businesses. Both inspiring —Ajay Bhalla, President of Cyber &
and practical, this book provides a proven framework for Intelligence Solutions, Mastercard
developing successful AI applications.

What’s Inside “With clarity and generosity,


Akli Adjaoute makes you
● Insights from successful and failed AI applications understand what AI is and
● A survey of AI techniques and methodologies what it is not. Delightful,


Bust common AI myths
Manage AI projects effectively
and also invaluable.
—Patrick Pérez, Kyutai ”
For anyone seeking grounded insights into AI’s capabilities,
including business leaders and decision makers
“to think
A framework for how
about , and its
AI
transformational impact on
Akli Adjaoute is the founder of multiple AI-related companies.
He served as an adjunct professor at the University of San every person in the world. It is
Francisco and as Scientific Committee Chair and Head of the
AI department at EPITA.
powerful in its simplicity.
—Karen Webster, PYMNTS ”
The technical editor on this book was Richard Vaughan.

For print book owners,


all ebook formats are free:
https://www.manning.com/freebook

ISBN-13: 978-1-63343-772-2

MANNING

You might also like