Manning Inside Ai 2024 3
Manning Inside Ai 2024 3
Manning Inside Ai 2024 3
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.”
“It's like everything you do, a labor of love, and the readers would love it.”
“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.”
“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.”
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]
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.
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
viii
CONTENTS ix
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
xii
FOREWORD xiii
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
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.
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
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
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
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.
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:
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:
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.
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 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.
Input knowledge
and review rules User Notifications/maintenance
Field experts
interface
Inference
Rules Outputs
engine
Automated rules
Inputs creation (optional) Working Update
(facts) memory
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.
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?
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.
Table 2.1 Determining the values of tall and short based on height
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:
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.
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
Selection
New
population/crossover
and mutation
No
Problem Yes
solved?
End
Predetermined Yes
number of generations
tested?
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]:
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
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
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.
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.
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
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
Data
preparation
Behavior Data
analysis transformation
Model creation
Model utilization
Flow
Transaction
Administration
processing
Analysis
Evaluation result
Data
Notifications
storage
Investigators History
Feedback
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.
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
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
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
2 (2 – 2)/60 = 0
4 (4 – 2)/60 = 0.03
5 (5 – 2)/60 = 0.05
6 (6 – 2)/60 = 0.07
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
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.
[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.
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.
Offshore
Wave
Conditions
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
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
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
When you expand your imagination to new spaces, “Impossible” becomes “I M Possible.”
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.
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.
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
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.
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
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:
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:
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
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.
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
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.
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.
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.
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
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.
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.”
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
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.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
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.
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:
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.
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.
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
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.
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.
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.
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
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
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?
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.
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.
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
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
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.
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.
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
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
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
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
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]:
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.
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
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
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
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
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
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
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:
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
Figure 10.1 Translated on October 9, 2022. The result may change due to user
feedback
Data
preparation
Behavior Data
analysis transformation
Transformed
Behavioral data Engineered
fields fields
Transformation
file
Model creation
Model utilization
Live flow
Transaction
Administration External data
processing
Analysis
Evaluation result
Data
Notifications
storage
Investigators History
Feedback
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.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.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.
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
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
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.
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.
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.
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.
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.
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.
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.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.
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.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.
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.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.
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.
156
A.1 Can machines think? 157
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.
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).
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:
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.
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]:
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.
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
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
Start
No Is the electronic
Parse electronic
document a restricted
document
web page?
Compute context
and picture
pertinence values
Yes
No
End
Assign weights to
each word
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
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).
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.
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
#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
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
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
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
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.
●
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.
ISBN-13: 978-1-63343-772-2
MANNING