Neuro-Symbolic AI - Alexiei Dingli - E-Book

Neuro-Symbolic AI E-Book

Alexiei Dingli

0,0
28,79 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Neuro-symbolic AI offers the potential to create intelligent systems that possess both the reasoning capabilities of symbolic AI along with the learning capabilities of neural networks. This book provides an overview of AI and its inner mechanics, covering both symbolic and neural network approaches.
You’ll begin by exploring the decline of symbolic AI and the recent neural network revolution, as well as their limitations. The book then delves into the importance of building trustworthy and transparent AI solutions using explainable AI techniques. As you advance, you’ll explore the emerging field of neuro-symbolic AI, which combines symbolic AI and modern neural networks to improve performance and transparency. You’ll also learn how to get started with neuro-symbolic AI using Python with the help of practical examples. In addition, the book covers the most promising technologies in the field, providing insights into the future of AI.
Upon completing this book, you will acquire a profound comprehension of neuro-symbolic AI and its practical implications. Additionally, you will cultivate the essential abilities to conceptualize, design, and execute neuro-symbolic AI solutions.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB

Seitenzahl: 336

Veröffentlichungsjahr: 2023

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Neuro-Symbolic AI

Design transparent and trustworthy systems that understand the world as you do

Alexiei Dingli

David Farrugia

BIRMINGHAM—MUMBAI

Neuro-Symbolic AI

Copyright © 2023 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Associate Group Product Manager: Ali Abidi

Publishing Product Manager: Dinesh Chaudhary

Content Development Editor: Shreya Moharir

Technical Editor: Sweety Pagaria

Copy Editor: Safis Editing

Project Coordinator: Farheen Fathima

Proofreader: Safis Editing

Indexer: Hemangini Bari

Production Designer: Ponraj Dhandapani

Marketing Coordinators: Shifa Ansari and Vinishka Kalra

First published: May 2023

Production reference: 1190523

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham

B3 2PB, UK.

ISBN 978-1-80461-762-5

www.packtpub.com

Dedicated with all my heart to my beloved family, my soulmate and wonderful wife Anna, and our precious children, Ben, Jake, and Faye. Your unconditional love, unwavering support, and endless encouragement have been the driving force behind my every achievement. To my parents, who instilled in me the values of hard work and perseverance, and to God, who has bestowed upon me the gift of knowledge and the opportunity to make a small but meaningful difference in the world. I am forever grateful and honored to dedicate this book to each and every one of you.

– Alexiei Dingli

To my family, who have always believed in me and pushed me throughout my journey. In particular, I want to dedicate this book to my sister, Tiziana, for her unwavering motivation, encouragement, and philosophical wisdom; and to my partner, Justine, for her countless sacrifices and constant support day in, day out. Thank you for always being there for me and inspiring me to be the best version of myself. This book is as much yours as it is mine.

– David Farrugia

Contributors

About the authors

Alexiei Dingli is a professor of AI at the University of Malta. As an AI expert with over two decades of experience, his research has helped numerous companies around the world successfully implement AI solutions. His work has been recognized globally, with international experts rating it as world-class. He is a recipient of multiple prestigious awards, including from the European Space Agency, the World Intellectual Property Organization, and the United Nations, to name a few. With a rich collection of peer-reviewed publications to his name, he is also an esteemed member of the Malta.AI task force, which was established by the Maltese government to propel Malta to the forefront of the global AI landscape.

David Farrugia is a seasoned data scientist and a PhD candidate in AI at the University of Malta. David Farrugia has worked in diverse industries, including gaming, manufacturing, customer relationship management, affiliate marketing, and anti-fraud. He has an interest in exploring the intersection of business and academic research. He also believes that the emerging field of neuro-symbolic AI has the potential to revolutionize the way we approach AI and solve some of the most complex problems in the world.

About the reviewers

Asim Munawar is a program director for neuro-symbolic AI at IBM Research, with a PhD in evolutionary algorithms from Hokkaido University. He has 15-plus years of experience with different AI technologies. He has led several research projects and customer engagements in various domains, including computer vision, robotics, acoustic analysis, and natural language processing. Asim is currently leading multiple projects to make large language models accessible to enterprise applications. He is interested in creating next-generation AI by combining symbolic knowledge and reasoning with data-driven learning methods. He holds 20-plus patents in the field of AI and has published more than 60 peer-reviewed articles.

Dr. André Meyer-Vitali is a computer scientist who got his PhD in software engineering, ubiquitous computing, and distributed AI from the University of Zürich. He has worked at the European Patent Office and on many applied research projects on ambient intelligence and multi-agent systems at Philips Research and Netherlands Organization for Applied Scientific Research (TNO) and contributed to AgentLink. Currently, he is a senior researcher at the German Research Center for Artificial Intelligence (DFKI), focusing on engineering and promoting Trusted AI, and is active in the AI networks TAILOR and CLAIRE. His research interests include software and knowledge engineering, design patterns, neuro-symbolic AI, causality, and agent-based social simulation (ABSS) with the aim of creating Trust by Design. André is also a passionate photographer.

Falk Pollok is a senior software engineer at IBM Research Europe and a senior research software engineer for the MIT-IBM Watson AI Lab, specializing in foundation models and multimodal question answering. Falk was a member of the MIT-Harvard-Stanford team on the Defense Advanced Research Projects Agency’s (DARPA)’s Machine Common Sense project, contributed to IBM Watson Orchestrate, was the lead developer for IBM Sapphire and founded IBM’s Engineering Excellence program. He holds a master’s degree in computer science from RWTH Aachen, leadership certificates from Cornell, and IBM’s highest developer profession rank. Moreover, he published eight papers in top conferences such as NeurIPS, AAAI, and Middleware, has two patents, was named a Face of IBM Research, and has received multiple awards, including IBM’s OTA and InfoWorld’s Best of Open Source Software (BOSSIE) award.

Table of Contents

Preface

1

The Evolution and Pitfalls of AI

The basic idea behind AI

The evolution of AI

Philosophy

Logic

Mathematics

Cognitive science

A short history of AI

Subfields of AI

ML

Computer vision

Natural language processing

Robotics

Knowledge representation

Problem-solving and reasoning

Planning

Evolutionary computing

The pitfalls of AI

Is AI limitless?

How important is the data?

Can we get training data?

Have we got good data?

Can a high-performance AI still fail?

Summary

2

The Rise and Fall of Symbolic AI

Defining Symbolic AI

Humans, symbols, and signs

Enabling machine intelligence through symbols

The concept of intelligence

Towards Symbolic AI

From symbols and relations to logic rules

The fall of Symbolic AI

Symbolic AI today

Expert systems

Natural language processing

Constraint satisfaction

Explainable AI

The sub-symbolic paradigm

Summary

Further reading

3

The Neural Networks Revolution

Artificial neural networks modeling the human brain

A simple artificial neural network

Introducing popular neural network architectures

Recurrent neural networks

Competitive networks

Hopfield networks

Delving into deep neural networks

Convolutional neural networks

Long short-term memory networks

Autoencoders

Deep belief networks

Generative networks

Transformers

The rise of data

The complexities and limitations of neural networks

Summary

4

The Need for Explainable AI

What is XAI?

Why do we need XAI?

XAI case studies

The state-of-the-art models in XAI

Accumulated Local Effects

Anchors

Contrastive Explanation Method

Counterfactual instances

Explainable Boosting Machine

Global Interpretation via Recursive Partitioning

Integrated gradients

Local interpretable model-agnostic explanations

Morris Sensitivity Analysis

Partial dependence plot

Permutation importance

Protodash

SHapley Additive exPlanations

Summary

5

Introducing Neuro-Symbolic AI – the Next Level of AI

The idea behind NSAI

Modeling human intelligence – insights from child psychology

The ingredients of an NSAI system

The symbolic ingredient

The neural ingredient

The neuro-symbolic blend

Exploring different architectures of NSAI

Neuro-Symbolic Concept Learner

Neuro-symbolic dynamic reasoning

Dissecting the NLM architecture

Summary

Further reading

6

A Marriage of Neurons and Symbols – Opportunities and Obstacles

The benefits of combining neurons and symbols

Data efficiency

High accuracy

Transparency and interpretability

The challenges of combining neurons and symbols

Knowledge and symbolic representation

Multi-source knowledge reasoning

Dynamic reasoning

Query understanding for knowledge reasoning

Research gaps in neuro-symbolic computing

Summary

7

Applications of Neuro-Symbolic AI

Application 1 – health – computational drug repurposing

Application details

Problem statement

The role of NSAI

Application 2 – education – student strategy prediction

Application details

Problem statement

The role of NSAI

Application 3 – finance – bank loan risk assessment

Application details

Problem statement

The role of NSAI

Summary

Further reading

8

Neuro-Symbolic Programming in Python

Environment and data setup

Solution 1 – logic tensor networks

Loading the dataset

Modifying the dataset

Creating train and test datasets

Defining our knowledge base and NN architecture

Defining our predicate, connectives, and quantifiers

Setting up evaluation parameters

Training the LTN model

Analyzing the results

Solution 2 – prediction stacking

Experiment setup and loading the data

Data preparation

Training our NSAI model

Analyzing the results

Prediction interpretability and logic tracing

Summary

Further reading

9

The Future of AI

Looking at fringe AI research

Small data

Novel network architectures

New ways of learning

Evolution of attention mechanisms

World model

Hybrid models

Exploring future AI developments

Quantum computing

Neuromorphic engineering

Brain-computer interaction

Bracing for the rise of AGI

Preparing for singularity

Popular media

Exploring the expert views

Singularity challenges

Summary

Further reading

Index

Other Books You May Enjoy

Preface

Neuro-symbolic artificial intelligence (AI) has become an increasingly critical area of study as it seeks to bridge the gap between human-like understanding and machine learning (ML) capabilities. Traditional AI has often struggled to grasp the nuances and complexities of human cognition, which is where neuro-symbolic AI comes into play. By combining the strengths of both neural networks and symbolic reasoning, this groundbreaking approach aims to design systems that understand the world as we do.

The main areas of focus in this book are as follows:

The history and limitations of traditional AIThe origins and evolution of symbolic AI and neural networksThe principles and foundation of neuro-symbolic AIPractical applications and programming techniques for neuro-symbolic AIThe need for explainable systems and the future of AI

In this book, we will take you on a journey through the evolution of AI. We will delve into the rise and fall of symbolic AI, followed by the neural networks revolution. Our exploration will then lead us to the exciting intersection of these two domains as we introduce neuro-symbolic AI as the next level of AI. Through the book, we aim to offer you a comprehensive understanding of the opportunities and challenges in the field of neuro-symbolic AI, as well as a practical guide to implementing some of these concepts in Python. We will also discuss the importance of explainable AI and the exciting future developments that await us. Rather than focusing solely on theoretical concepts, our book presents a balanced blend of theory, practical applications, and real-world examples. By using accessible language and detailed illustrations, we hope to make the topic engaging and approachable for both beginners and experienced AI enthusiasts alike.

Embark on this fascinating journey with us, and uncover the potential of neuro-symbolic AI to revolutionize the way we interact with intelligent systems. Let’s explore how we can design systems that truly understand the world as we do and reshape the future of AI together.

Who this book is for

The book is aimed at data scientists, ML engineers, and AI enthusiasts who are looking to expand their knowledge of neuro-symbolic AI and stay up to date with the latest advancements in the field. The book covers all technicalities and provides introductory material for all aspects discussed in the book. However, a basic understanding of AI systems and programming is recommended, especially for the more technical chapters.

The key issues that this audience is facing include building powerful AI systems that are explainable, conscious of the domain, and can work without access to huge datasets. Therefore, the book will provide essential features, including a basic understanding of AI and a working knowledge of Python (and programming in general), to help address these challenges. By providing practical and hands-on examples, the book will also help you to overcome your fear of trying new AI experiments and apply the concepts learned in real-world applications.

What this book covers

Chapter 1, The Evolution and Pitfalls of AI, provides an introduction to the fundamentals of AI, its various types, uses, benefits, and limitations, as well as the mechanics of building AI systems.

Chapter 2, The Rise and Fall of Symbolic AI, discusses the concept of symbolic learning and its history, inner mechanics, and limitations.

Chapter 3, The Neural Networks Revolution, introduces neural networks, their types, potential use cases, and limitations.

Chapter 4, The Need for Explainable AI, highlights the motivation for explainable AI (XAI), its importance, and the current state-of-the-art techniques.

Chapter 5, Introducing Neuro-Symbolic AI: The Next Level of AI, introduces the composite AI topic of neuro-symbolic AI, its mechanics, and its emergence as a way forward for AI development.

Chapter 6, A Marriage of Neurons and Symbols: Opportunities and Obstacles, explores the trade-offs between reasoning and learning and the benefits, challenges, and research gaps in neuro-symbolic computing.

Chapter 7, Applications of Neuro-Symbolic AI, showcases different neuro-symbolic AI applications based on different techniques, inspiring creativity in the adoption of this composite technology.

Chapter 8, Neuro-Symbolic Programming in Python, provides a basic programmatic outline to design and implement neuro-symbolic systems in Python.

Chapter 9, The Future of AI, discusses future developments of AI, the rise of artificial general intelligence (AGI), and the ethical issues associated with the creation of singularity.

To get the most out of this book

The book covers all technicalities and provides material for all aspects discussed in the book. However, a basic understanding of AI systems and Python programming is recommended, especially for the more technical chapters. In some of the chapters, the book also assumes basic knowledge of first-order Boolean logic.

Software/hardware covered in the book

Operating system requirements

Python 3.7+

Windows, macOS, or Linux

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Neuro-Symbolic-AI. If there’s an update to the code, it will be updated in the GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://packt.link/94cl7.

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “Mount the downloaded WebStorm-10*.dmg disk image file as another disk in your system.”

A block of code is set as follows:

html, body, #map { height: 100%; margin: 0; padding: 0 }

Tips or important notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at [email protected] and mention the book title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share Your Thoughts

Once you’ve read Neuro-Symbolic AI, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.

Download a free PDF copy of this book

Thanks for purchasing this book!

Do you like to read on the go but are unable to carry your print books everywhere?

Is your eBook purchase not compatible with the device of your choice?

Don’t worry, now with every Packt book you get a DRM-free PDF version of that book at no cost.

Read anywhere, any place, on any device. Search, copy, and paste code from your favorite technical books directly into your application.

The perks don’t stop there, you can get exclusive access to discounts, newsletters, and great free content in your inbox daily

Follow these simple steps to get the benefits:

Scan the QR code or visit the link below

https://packt.link/free-ebook/9781804617625

Submit your proof of purchaseThat’s it! We’ll send your free PDF and other benefits to your email directly

1

The Evolution and Pitfalls of AI

Artificial intelligence (AI) is considered by many as the new kid on the block, but in reality, it’s more of an elderly person. Significantly, few people realize that the AI drive we’re experiencing today started around the Second World War. Back then, people such as Vannevar Bush, John von Neumann, and Claude Shannon were very much toying with different ideas that eventually led to the creation of today’s modern computers. However, it was Alan Turing, the famous British mathematician, who, after using a rudimentary computer during the war, started visualizing the potential of AI. After the Second World War, many other scientists came on board and eventually created the field of AI. The initial drive was toward using algorithms capable of manipulating symbols (such as alphanumeric characters) but eventually, these techniques hit a brick wall. In the past three decades, we have seen a steady shift toward a different kind of AI, called statistical AI. These algorithms are capable of achieving some incredible feats using large-scale statistical techniques. However, today, we are heading toward another crossroads. The limitations of these technologies are becoming visible. Even though a self-driving car can boast a driving experience of around 60 years of continuous driving, there have been cases where these cars were hacked by simply placing a small sticker on a traffic sign. These AI models do not understand how our world works and because of this, a simple hack can cause one of these cars to steer directly into a wall. Thus, we need better AI, one that is not only capable of maintaining the incredible performance achieved by deep learning (DL) models but is also able to understand our world and how it works.

This chapter aims to explore the evolution of AI so that you can appreciate its humble beginnings and the various achievements of the past decades. However, it is also important to understand that the path taken was not always a straight one and AI scientists had to face various obstacles along the way. By the end of the chapter, you will have a solid understanding of AI and the pitfalls it faced, and you will be able to have a better understanding of the AI ecosystem. In this chapter, we will cover the following main topics:

The basic idea behind AISubfields of AIThe evolution of AIThe pitfalls of AI

The basic idea behind AI

Even though many people do not realize it, they are at the mercy of AI. Today, we have doorbells, lighting, ovens, washing machines, air conditioners, cars, and all sorts of devices that we use on a daily basis having some AI integrated within them. The problem with AI is that these devices don’t have a label on them that clearly shows whether an AI system is controlling them or not. Thus, my state-of-the-art appliance doesn’t look much different from my old one, yet underneath the bonnet, they are worlds apart.

Most people’s AI education has been heavily influenced by Hollywood movies or science fiction books. A.I. Artificial Intelligence, I, Robot, Ex Machina, Blade Runner, The Matrix, and 2001: A Space Odyssey, to name a few, all contributed to building this general understanding of AI. Unfortunately, there seems to be a recurrent theme in all of them. First, AI is all about humanoid robots. Second, they must harm the human race in their quest for freedom. Unfortunately, both assumptions are rather far-fetched. Robotics is a subfield of AI, but a robot is essentially just a shell concealing the AI program, so much so that the bulk of AI research focuses on the software rather than the hardware. For the other part, at the moment, AI is not sentient. It cannot perceive or feel; it has no dreams or aspirations, and to be honest, AI researchers have no idea how to create an AI like that. So, unless we crack this problem and make a sentient machine, it is implausible that an AI would want to harm the human race in any way.

However, not everything is negative since books and movies allow different generations to dream and create their fantasy world about the future of technology. In 1962, the Jetsons animated sitcom launched, portraying a middle-class family of four who lived in Orbit City, a space town, in around 2062. Robotic maids roamed the town, undertaking errands for their masters, and people traveled using flying cars. While we’re still not there, such shows conditioned people’s expectations about the future.

In reality, there have been various advancements in the past years. While we don’t have a robotic maid like in the Jetsons, we do have virtual assistants (such as Alexa, Siri, and Cortana) who can open the curtains for us in the morning, brew some excellent coffee, order food, switch on the TV set on our favorite Netflix show, and also instruct robotic vacuum cleaners to clean the house while we’re sleeping. The point is that AI is designed to be ubiquitous. It is everywhere but non-invasive in such a way that the user doesn’t realize that they’re interacting with a computer. Unfortunately, this makes the understanding of AI somewhat complicated.

AI is a field of study that encompasses multiple disciplines (primarily, computer science) and aims to develop machines capable of intelligent behavior. The term AI is a combination of artificial and intelligence. Artificial refers to the fact that it is human-made and not naturally occurring, while intelligence is a complex concept that lacks a clear definition universally agreed upon. To get around this problem of definitions, Alan Turing, the grandfather of AI, came up with an ingenious idea to define intelligence via association. Humans are capable of labeling intelligent behavior. If we see an animal performing fun tricks that are normally attributed to a human, we say that the animal exhibited a level of intelligence. Machines are considered intelligent if they can do tasks that only intelligent entities or groups, such as humans or social creatures, can perform. AI is the field that focuses on creating machines that demonstrate intelligent behavior.

Since intelligent processes apply to all fields of study, AI can be considered a horizontal area that intersects with all the others. That is why its applications range from controlling a humble climate control system in a car to automating a nuclear power plant. Simple automation using if-then rules can be found on the lower end of the spectrum, while very complex algorithms based on how the human brain works are being developed for the most advanced functions. Today, AI has the ability to execute a wide range of tasks, improve various procedures, and forecast upcoming occurrences with a level of precision that is typically beyond human capabilities.

The use of AI can be highly beneficial for organizations, which is why many are now embracing this technology. With vast amounts of data at its disposal, an AI system can effectively examine it, uncover patterns, and instantly detect any problems. Furthermore, when it comes to monotonous or hazardous manual tasks, AI can automate them, thereby improving efficiency and safety. AI systems have various benefits over their human counterparts; they are precise in their work, don’t get bored, they suffer no burnout, can foresee future trends, and are capable of handling much more data than a person can ever manage. That is why the World Economic Forum predicts that in a few years’ time, automated systems will (for the first time in human history) surpass the number of humans working in industry.

Even though AI emerged out of computer science, there’s a massive difference between the two. Creating intelligent software is not just about programming a computer to drive a car by obeying traffic rules. That is the easiest part. The biggest challenge is the learning aspect. We live in a world with imperfect information that is constantly evolving. Even though there are road guidelines, the width of the road might not be consistent. Road markings start fading with time. Even a perfect road is problematic if there’s a sandstorm, heavy rain, fog, or even snow. An autonomous vehicle has to deal with these conditions and a million others, some of which we haven’t even thought of! So, the only way to achieve that is by using learning algorithms that experience the real world and learn from it when they encounter different conditions. In fact, it is estimated that today’s self-driving vehicles have a collective intelligence of more than 60 years of continuous driving, a feat rather impossible to achieve for any human being.

Although most people started to understand AI and its implications in the past decade, the underlying technology is not new and has been around for more than half a century. The term artificial intelligence was coined in 1956 during the Dartmouth Summer Research Project. Back then, a group of scientists led by Professor John McCarthy organized a two-month workshop aimed at brainstorming about intelligent applications of computers. They wanted to determine whether machines could learn like a young child, using trial and error or by developing some kind of formal reasoning. They wanted to find ways in which machines could “use language, form abstractions and concepts, solve kinds of problems now reserved for humans, and improve themselves.”

One of the things they realized during that workshop is that computers can actually achieve those tasks but it was not something that they could resolve in a few weeks. In fact, today, more than 60 years later, AI has become a massive field of study that branched into all the other academic disciplines. But it spent the major part of those years confined to university campuses and research labs around the world. It was only recently that it started seeping into the commercial world and influencing our daily lives. This occurred due to a number of factors:

Given the proliferation of technology in all sorts and means, the amount of data created daily is unprecedented; so much so that 90% of the information found on the internet was generated in the past two yearsWith the development of powerful processors, the invention of graphical processing units, and the rise of cloud technologies, computers can now process massive amounts of data in a very short timeNew algorithms were created that harness the power of novel architectures, thus allowing AI to achieve new heights

Notwithstanding this, we are still in the era of AI. By this, we are referring to that part of AI that is extremely good at dealing with a limited set of problems but fails miserably when given a simple problem that is slightly different. Just take the game of Go as an example. Go is a strategy board game invented in China around 2,500 years ago. The problem with Go is that it is so complex that the possible combinations in-game amount to around, which is more than all the atoms of the universe combined. Because of this complexity, computers weren’t capable of winning against a human Go Grandmaster until 2015, when AlphaGo managed to reach the professional level without limitations. Ironically, even though AlphaGo was capable of this feat, if someone asks it for the current time in Beijing, it will get a little confused because it wasn’t programmed for that function.

Note on AlphaGo

AlphaGo is a computer program developed by DeepMind Technologies, a subsidiary of Alphabet, designed to play the game of Go.

But these limitations are only temporary. Big corporations are already working on AI models capable of processing speech, images, and text simultaneously, such as the data2vec model recently released by Meta. This is all possible thanks to a subfield of AI normally referred to as machine learning (ML). It can be considered as the superstar of AI since it is practically used in all the other subfields. ML algorithms gather huge amounts of information, process it, and become smarter over time. Unlike humans, they do not suffer from memory loss, information overload, or other distractions. However, they’re far from perfect since learning is a very difficult task, even for trivial tasks. Just consider the distinction between a cat and a dog. Humans are capable of learning the differences pretty quickly, accurately, and from a very young age. For a machine, it is much more difficult. We have to keep in mind that algorithms mainly consider physical appearance; they have no background knowledge and they don’t even understand how the world works. So, just taking their appearance into account, we can say that dogs have floppy ears and cats have pointed ears, but this doesn’t hold in all cases. Maybe we can consider the texture, the color, the patterns, the length of their tail, or several other features. But first of all, it’s not a trivial task to program such a system because things get complicated rather quickly, and second, it will never be perfect. Thus, we need to find a way in which machines start learning from a handful of experiences – as any toddler does, after all. That is what ML systems do: they analyze hundreds of examples and train an algorithm. It is then tweaked over time and eventually, the algorithm becomes smarter. This is how we are achieving incredible results with self-driving cars, in pharmaceuticals when the COVID vaccine was created in record time, in Industry 4.0, and in thousands of other applications.

The way in which society is evolving is rather different than what was portrayed in Hollywood movies. AI will not be there to seek revenge on its human master but rather to help humans in their daily tasks. Because of this, our relationship with technology will change completely. Autonomous vehicles will not only operate a transport service but since people are not driving, they can use that time to have a meeting, take a nap, or even enjoy a television show. Eventually, AI will also affect some of the jobs we are used to today. In fact, the World Economic Forum estimates that around 85 million jobs will be displaced worldwide but AI will also create around 97 million new jobs. So, we must prepare ourselves for the world of tomorrow with up-skilling and re-skilling initiatives. While we cannot imagine the full ramifications of this technology, one thing that’s for sure is that there will be a lot of disruption. But the most logical future is one where humans and AI work together to solve a problem and, ultimately, create a better world. AI will help us accomplish more tasks in a shorter amount of time, it will save us from having to do tedious repetitive tasks, and allow us to do what we do best: be human! Let’s have a look now at how AI evolved, starting from humble beginnings up to becoming the most powerful technology ever invented by man.

The evolution of AI

In the previous section, we have seen that the term AI was coined back in 1956. But really and truly, as can be seen in Figure 1.1, AI is built on other areas whose development dates much earlier, almost to the dawn of mankind. We first meet records of automations in Homer’s Iliad, where automatic door openings were described. In Ancient Egypt, statues of deities could move their heads to send signals to the people, while in Greek mythology, we find records of Hephaestus’s automata, Talos the man of bronze, and the silver watchdogs of King Alkinous of the Phaiakians. Mankind has been dreaming of AI since the very beginning!

We have to keep in mind that AI is a multidisciplinary field of study made up of different bits and pieces brought forth from the intersection of different topics (see the following diagram):

Figure 1.1 – Origins of AI

The following are the most important areas that contribute to AI:

Computer science is the study of computers and computing systems. It essentially lays the foundation for AI.Mathematics is a science that deals with numbers and abstract concepts. Both CS and AI find their roots in mathematics. Whether we’re talking about processing data, writing complex algorithms, or even displaying fancy virtual reality interfaces, everything is based on mathematics.Philosophy is the study of both fundamental and generic questions dealing with all sorts of topics including reasoning, organization of knowledge, mind models, and so on. As AI deals with a lot of conceptual problems in the quest of modeling our world, philosophy helps us to deal with and tackle these issues.Psychology is the study of the human mind and behavior. It’s important to keep in mind that AI is an applied field and, in many circumstances, it has to deal with people. The most obvious example is the use of AI in social media, where the system has to identify the most interesting posts for the user.Cognitive science studies the thinking process of humans, which includes elements of learning, thought formulation, and information organization within the brain. AI scientists tend to borrow ideas from nature, so much so that the subfield referred to as Artificial Neural Networks is primarily devoted to simulating how the brain works.Sociology is a social science dealing with human behavior: patterns, relationships, interactions, and everyday life. With the rise of social networks, AI is extensively used to help people connect.

Of course, this was just a selection of the major topics and there are other disciplines that are important for AI. Finally, we should not forget that AI is really and truly a horizontal subject that can plug into almost all the other fields. Let’s now have a look at the most important milestones in human history that contributed to the evolution of AI.

Philosophy

Let’s start our journey from the very beginning, around 384 BC. We can imagine Socrates and Aristotle debating and coming up with the idea of formulating a precise set of laws. This is important for AI because, in our applications, we try to either recreate those laws (as in virtual worlds) or create agents that need to understand how the world works. However, this is not always possible because our world is based on fuzzy concepts that cannot be explicitly defined easily. Just to give you an example, imagine a chair; let’s write a definition for the most basic form of a chair. Most probably, we would say it has four legs, a back to rest against, and a surface to sit on. Even though we know that not all chairs follow this definition, the majority of them probably do. However, a pertinent question arises: can we categorize a car as a chair? It has four legs (wheels), a back (windscreen), and a surface (bonnet). The obvious answer is that it isn’t, even though it technically complies with our definition of a chair. The reason is not that it’s not possible, because we all know that we can sit on top of a car but we don’t usually do it. So, there are other unwritten rules that cannot be captured and that we learn through our interaction with society and the world. These rules are normally unknown to AI.

Moving on, around 1315, Ramon Lull came up with the idea of reasoning by mechanical artifacts. In those days, they even tried to create machines that were capable of reasoning. The idea was that if they were given a particular situation, they could reason upon the situation and come up with a plausible solution. This idea was also explored by Leonardo da Vinci when he designed the first mechanical calculator. By using such a device, one could perform simple calculations. Unfortunately, this device was ahead of its time and, in fact, was never created.

In 1588, Thomas Hobbes started toying with the idea of using mathematical thinking to model reasoning aspects. Another important person is without a doubt Blaise Pascal, a mathematician who created a calculator called the Pascaline. Around the same time, Gottfried Wilhelm Leibniz came up with something similar but it had a very subtle difference: rather than dealing with numbers, it dealt with concepts. This fact is important because we are moving up a level of abstraction. Those scientists were no longer dealing with numbers but with something tangible that we can visualize rather easily. Finally, we find Rene Descartes, who came up with the idea that the human mind is exempt from physical laws and pushed the idea of the soul. He used this to explain the element of free will. This was very important because we were now moving toward the idea of sentience. We started looking at machines that are independent of ourselves, machines that are capable of doing things beyond what the programmer actually instructs them to do, and that brings us to what AI is trying to pursue – the quest of creating autonomous machines capable of making their own decisions by going beyond their basic program.

Out of the various attempts at creating the first calculator, the most successful is probably by Charles Babbage, who came up with the idea of what he called the differential engine. Essentially, this was a machine capable of calculating some mathematics such as polynomial functions. Unfortunately, this engine wasn’t really that successful and, in fact, some years later, he came up with an even bigger idea, which he called the analytical engine, which was capable of solving any mathematical function. An important aspect to note was that these were not simply calculators but they were also programmable machines. In fact, the person who used to program them was Lady Ada Lovelace, the daughter of the British poet Lord Byron, and Annabelle Milbank. She actually wrote programs for the differential engine and the analytical engine but unfortunately, since the engines never really worked, these programs couldn’t be tried and tested. However, these machines laid the foundation for modern programming.

Logic

In logic, we try to develop precise statements about all things and their relationships. In fact, Aristotle uses the following example to illustrate this:

Logical Example:

Socrates is a man,

All men are mortal,

Therefore, Socrates is mortal.

In logic, given valid premises and sound logic, it will yield correct conclusions. However, the problem is that our world is not always so well defined. Just think about a very simple example: What is the population of the United States?

Possible answers include the following:

334,914,050 peopleAlmost 350 millionLess than India

Technically, they’re all correct answers; however, they are not precise statements because it is very hard to come out with an exact number. But they are all still correct, so unfortunately, in our world, we have to accept a high level of uncertainty where the elements of