You are on page 1of 53

The AI Revolution in Networking

Cybersecurity and Emerging


Technologies Omar Santos
Visit to download the full and correct content document:
https://textbookfull.com/product/the-ai-revolution-in-networking-cybersecurity-and-em
erging-technologies-omar-santos/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Emerging Nanotechnologies in Rechargeable Energy


Storage Systems. A volume in Micro and Nano
Technologies Lide M. Rodriguez-Martinez And Noshin Omar
(Eds.)
https://textbookfull.com/product/emerging-nanotechnologies-in-
rechargeable-energy-storage-systems-a-volume-in-micro-and-nano-
technologies-lide-m-rodriguez-martinez-and-noshin-omar-eds/

Beyond the Algorithm AI Security Privacy and Ethics 1st


Edition Santos

https://textbookfull.com/product/beyond-the-algorithm-ai-
security-privacy-and-ethics-1st-edition-santos/

The Culture Of AI Everyday Life And The Digital


Revolution Anthony Elliott

https://textbookfull.com/product/the-culture-of-ai-everyday-life-
and-the-digital-revolution-anthony-elliott/

Emerging technologies in brachytherapy 1st Edition


Pieters

https://textbookfull.com/product/emerging-technologies-in-
brachytherapy-1st-edition-pieters/
Advancement in Emerging Technologies and Engineering
Applications Chun Lin Saw

https://textbookfull.com/product/advancement-in-emerging-
technologies-and-engineering-applications-chun-lin-saw/

Current and Emerging mHealth Technologies Emre Sezgin

https://textbookfull.com/product/current-and-emerging-mhealth-
technologies-emre-sezgin/

Computer Vision and AI-Integrated IoT Technologies in


the Medical Ecosystem 1st Edition Alex Khang

https://textbookfull.com/product/computer-vision-and-ai-
integrated-iot-technologies-in-the-medical-ecosystem-1st-edition-
alex-khang/

HCNA Networking Study Guide 1st Edition Huawei


Technologies Co.

https://textbookfull.com/product/hcna-networking-study-guide-1st-
edition-huawei-technologies-co/

Emerging Technologies in Food Science Focus on the


Developing World Monika Thakur

https://textbookfull.com/product/emerging-technologies-in-food-
science-focus-on-the-developing-world-monika-thakur/
THE AI REVOLUTION IN
NETWORKING, CYBERSECURITY,
AND EMERGING TECHNOLOGIES
This page intentionally left blank
THE AI REVOLUTION IN
NETWORKING, CYBERSECURITY,
AND EMERGING TECHNOLOGIES

Omar Santos, Samer Salam, Hazim Dahir


Cover: Javier Pardina/Shutterstock
Figure 5-4: GreenOak/Shutterstock
Figure 5-5: U.S. Bureau Transportation Statistics
Figure 5-6: malinikart/Alamy Images

Many of the designations used by manufacturers and sellers to distinguish their products are Editor-in-Chief
claimed as trademarks. Where those designations appear in this book, and the publisher was Mark Taub
aware of a trademark claim, the designations have been printed with initial capital letters or in
all capitals. Director ITP Product
Management
The authors and publisher have taken care in the preparation of this book, but make no Brett Bartow
expressed or implied warranty of any kind and assume no responsibility for errors or omissions.
No liability is assumed for incidental or consequential damages in connection with or arising Executive Editor
out of the use of the information or programs contained herein. James Manly

For information about buying this title in bulk quantities, or for special sales opportunities Managing Editor
(which may include electronic versions; custom cover designs; and content particular to your Sandra Schroeder
business, training goals, marketing focus, or branding interests), please contact our corporate Development Editor
sales department at corpsales@pearsoned.com or (800) 382-3419. Christopher A. Cleveland
For government sales inquiries, please contact governmentsales@pearsoned.com. Production Editor
For questions about sales outside the U.S., please contact intlcs@pearson.com. Mary Roth

Visit us on the Web: informit.com/aw Copy Editor


Jill Hobbs
Library of Congress Control Number: 2024930069
Technical Editor
Copyright © 2024 Pearson Education, Inc. Petar Radanliev

Hoboken, NJ Editorial Assistant


Cindy Teeters
Please contact us with concerns about any potential bias at https://www.pearson.com/
report-bias.html. Cover Designer
Chuti Prasertsith
All rights reserved. This publication is protected by copyright, and permission must be
obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, Composition
or transmission in any form or by any means, electronic, mechanical, photocopying, recording, codeMantra
or likewise. For information regarding permissions, request forms and the appropriate
contacts within the Pearson Education Global Rights & Permissions Department, please visit Indexer
www.pearsoned.com/permissions/. Erika Millen

ISBN-13: 978-0-13-829369-7 Proofreader


ISBN-10: 0-13-829369-4 Jennifer Hinchliffe

$PrintCode
I would like to dedicate this book to my lovely wife, Jeannette, and my
two beautiful children, Hannah and Derek, who have inspired and supported me
throughout the development of this book.
—Omar Santos

To Zeina, Kynda, Malek, Ziyad, Mom, Dad, and Samir.


—Samer Salam

To Angela, Hala, Leila, and Zayd, the “real” Intelligence behind


everything good in my life.
—Hazim Dahir
This page intentionally left blank
Contents
Preface.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv

1 Introducing the Age of AI: Emergence, Growth, and Impact on


Technology.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
The End of Human Civilization.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Significant Milestones in AI Development (This Book Is Already Obsolete).. . . . . . 2
The AI Black Box Problem and Explainable AI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
What’s the Difference Between Today’s Large Language Models and
Traditional Machine Learning?.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Hugging Face Hub: A Game-Changer in Collaborative Machine Learning. . . . . . 12
AI’s Expansion Across Different Industries: Networking, Cloud
Computing, Security, Collaboration, and IoT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
AI’s Impacts on the Job Market. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
AI’s Impacts on Security, Ethics, and Privacy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Prompt Injection Attacks.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Insecure Output Handling.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Training Data Poisoning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Model Denial of Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Supply Chain Vulnerabilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Sensitive Information Disclosure.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Insecure Plugin Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Excessive Agency. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Overreliance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Model Theft.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Model Inversion and Extraction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Backdoor Attacks.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
MITRE ATLAS Framework.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
AI and Ethics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
AI and Privacy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

vii
viii Co ntent s

Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

2 Connected Intelligence: AI in Computer Networking.. . . . . . . . . . . . . . . . . . 33


The Role of AI in Computer Networking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
AI for Network Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Automating Network Planning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Automating Network Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Automating Network Assurance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
AI for Network Optimization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Routing Optimization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Radio Resource Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Energy Optimization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
AI for Network Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Access Control.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Anti-malware Systems.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Firewalls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Behavioral Analytics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Software and Application Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
AI for Network Traffic Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
AI in Network Digital Twins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

3 Securing the Digital Frontier: AI’s Role in Cybersecurity.. . . . . . . . . . . . . . . 59


AI in Incident Response: Analyzing Potential Indicators to
Determine the Type of Attack. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Predictive Analytics.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Sentiment Analysis and Potential Threat Intelligence.. . . . . . . . . . . . . . . . . . . 65
Text-Based Anomaly Detection.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Enhancing Human Expertise in the Security Operations
Center Through AI.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Integration with Other Models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
AI in Vulnerability Management and Vulnerability Prioritization. . . . . . . . . . . . . . 71
Co nte nts ix

AI in Security Governance, Policies, Processes, and Procedures.. . . . . . . . . . . . . . 73


Using AI to Create Secure Network Designs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Role of AI in Secure Network Design.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
AI and Security Implications of IoT, OT, Embedded, and
Specialized Systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
AI and Physical Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
How AI Is Transforming Physical Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Security Co-pilots. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Enhanced Access Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
AI in Security Assessments, Red Teaming, and Penetration Testing.. . . . . . . . . . . 77
AI in Identity and Account Management.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Intelligent Authentication.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Automated Account Provisioning and Deprovisioning.. . . . . . . . . . . . . . . . . . 83
Dynamic Access Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Using AI for Fraud Detection and Prevention. . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
AI and Cryptography. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
AI-Driven Cryptanalysis.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Dynamic Cryptographic Implementations. . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Integration with Quantum Cryptography.. . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
AI in Secure Application Development, Deployment, and Automation. . . . . . . . 90
Dynamic Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Intelligent Threat Modeling.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Secure Configuration Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Intelligent Patch Management While Creating Code. . . . . . . . . . . . . . . . . . . . 92
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

4 AI and Collaboration: Building Bridges, Not Walls.. . . . . . . . . . . . . . . . . . . . . 95


Collaboration Tools and the Future of Work.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Innovations in Multimedia and Collaboration.. . . . . . . . . . . . . . . . . . . . . . . . . 97
What Is Hybrid Work and Why Do We Need It?. . . . . . . . . . . . . . . . . . . . . . . . . 99
AI for Collaboration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
x Co ntent s

Authentication, Verification, or Authorization Through


Voice or Speech Recognition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Reducing Language Barriers with Real-Time Translation. . . . . . . . . . . . . . . . 101
Virtual Assistants.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Task Management.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Context and Intent Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Workflow Automation.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Prescriptive Analytics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Learning and Development. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Physical Collaboration Spaces.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Virtual Collaboration Spaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Team Dynamics.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Document Management.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
The Contact Center: A Bridge to Customers.. . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Virtual Agents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Call Routing Optimization.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
24 × 7 × 365 Support.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Multilanguage Support.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Customer Sentiment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Quality Assurance and Agent Coaching. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Large Case Volume Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Predictive Analytics.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Upgrading and Upselling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
AR/VR: A Closer Look. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Interactive Learning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
AI-Assisted Real-Time Rendering.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Content Generation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Personalization of Interaction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Virtual Assistant/Selling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
NLP and NLU. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Sentiments and Emotions.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Co nte nts xi

Affective Computing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116


Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

5 AI in the Internet of Things (AIoT).. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119


Understanding the IoT Landscape. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
AI for Data Analytics and Decision-Making. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Data Processing.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Anomaly Detection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Predictive Maintenance.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Advanced Data Analytics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
AI for IoT Resource Optimization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
AI for IoT in Supply Chains. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
AI for IoT Security.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
AI and Threat Detection in IoT.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
AI and Vulnerability Detection in IoT Environments. . . . . . . . . . . . . . . . . . . . 132
AI and Authentication in IoT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
AI and Physical Safety and Security.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
AI for IoT in Sustainability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Water Management and Preservation.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Energy Management.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Sustainable Waste Management and Recycling. . . . . . . . . . . . . . . . . . . . . . . 134
Wildlife Conservation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Circular Economy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

6 Revolutionizing Cloud Computing with AI.. . . . . . . . . . . . . . . . . . . . . . . . . . . 139


Understanding the Cloud Computing Environment. . . . . . . . . . . . . . . . . . . . . . 139
Virtualization.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Application Mobility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Cloud Services.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Deployment Models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
xii Co ntent s

Cloud Orchestration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144


AI in Cloud Infrastructure Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Workload and VM Placement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Demand Prediction and Load-Balancing. . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Anomaly Detection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
AI for Cloud Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Vulnerabilities and Attacks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
How Can AI Help?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Challenges for AI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
AI for Cloud Optimization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Cloud Service Optimization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Cloud Infrastructure Optimization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
AI and Machine Learning as a Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
AI Infrastructure Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
AI Developer Services: AutoML and Low-Code/No-Code AI. . . . . . . . . . . . . . 154
AI Software Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Advantages of AIaaS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Challenges of AI and Machine Learning in the Cloud. . . . . . . . . . . . . . . . . . . . . 158
What Lies Ahead. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

7 Impact of AI in Other Emerging Technologies.. . . . . . . . . . . . . . . . . . . . . . . . 161


Executive Order on the Safe, Secure, and Trustworthy
Development and Use of Artificial Intelligence. . . . . . . . . . . . . . . . . . . . . . . . . . 162
AI in Quantum Computing.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Quantum Algorithm Development.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Algorithmic Tuning and Automated Circuit Synthesis. . . . . . . . . . . . . . . . . . 166
Hyperparameter Optimization, Real-Time Adaptation, and
Benchmarking for Performance Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
How AI Can Revolutionize Quantum Hardware Optimization. . . . . . . . . . . . . . . 167
Control Operation and Resource Optimization.. . . . . . . . . . . . . . . . . . . . . . . 168
Co nte nts xiii

Data Analysis and Interpretation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168


Quantum Machine Learning: Leveraging AI Research to
Uncover Quantum Advantages in ML Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . 168
AI in Blockchain Technologies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Automating the Execution of Smart Contracts with AI. . . . . . . . . . . . . . . . . . 169
Could We Optimize Blockchain Mining Through AI Algorithms?. . . . . . . . . . 170
Additional Use Cases in Healthcare, Supply Chain Management,
Financial Services, and Cybersecurity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
AI in Autonomous Vehicles and Drones.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
AI in Edge Computing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Extending the Cloud: Edge and Fog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Taking AI to the Edge. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Lightweight AI and Tiny ML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Applications and Use Cases.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Web 3.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

Index.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
This page intentionally left blank
Preface
The AI Revolution in Networking, Cybersecurity, and Emerging Technologies offers an immersive journey
into the world of artificial intelligence and its profound impact on key domains of technology. This
manuscript demystifies AI’s emergence, growth, and current impact, shedding light on its revolu-
tionary applications in computer networking, cybersecurity, collaboration technologies, IoT, cloud
computing, and other emerging technologies.
From explaining AI’s role in managing and optimizing networks to its integral part in securing the
digital frontier, the book offers a wealth of insights. It explores how AI is building robust bridges in
collaboration tools and turning IoT into a super-intelligent network of devices. The reader will also
discover how AI is transforming the cloud into a self-managing, secure, and ultra-efficient environ-
ment and propelling other technologies towards unprecedented advancements.
Our motivation is for this book to serve as a comprehensive guide that bridges the gap between
the complex world of artificial intelligence and its practical implications in the field of IT. We aim to
make the profound impacts and potential of AI in various technology sectors not only understand-
able but also tangible for a wide spectrum of readers. Additionally, part of our vision is to create an
essential resource that empowers readers to understand, navigate, and address the opportunities,
complex challenges, and responsibilities associated with AI technologies. This book will empower
readers, whether they are IT professionals, tech enthusiasts, business leaders, or students, with the
necessary knowledge and insights into how AI is reshaping the IT landscape. By providing a clear,
in-depth exploration of AI’s role in computer networking, cybersecurity, IoT, cloud computing, and
more, we aim to equip readers to harness the power of AI in their respective fields. Ultimately, our
motive is for this book to not only educate but also inspire—serving as a catalyst that propels
individuals and organizations into the future of AI-integrated technology.
This book is highly relevant for a range of audiences, given its exploration of various aspects of
artificial intelligence and technology.
• IT Professionals: Those who work in fields related to information technology, network
management, cybersecurity, cloud computing, IoT, and autonomous systems could benefit
from understanding how AI is revolutionizing their respective fields.
• Tech Enthusiasts: Individuals with an interest in emerging technologies and future trends
might find this book interesting due to its examination of AI’s influence on various domains.
• Business Leaders & Managers: This book would be useful for executives, managers, and
decision-makers who need to understand the implications of AI on business processes and
strategies, particularly those related to IT.
• Academics and Students: Professors, researchers, and students in fields related to
computer science, information technology, and AI would find the book useful for research
and educational purposes.

xv
xvi Prefa ce

• Policy Makers: Given the increasing impact of AI on society and the economy, policymakers
could also gain valuable insights from this book.
• AI Professionals: People working in the field of AI might use this book to understand the
broader context and applications of their work.

Register your copy of The AI Revolution in Networking, Cybersecurity, and Emerging Technologies
on the InformIT site for convenient access to updates and/or corrections as they become
available. To start the registration process, go to informit.com/register and log in or create an
account. Enter the product ISBN (9780138293697) and click Submit.
Acknowledgments
We would like to thank the technical editor, Petar Radanliev, for his time and technical expertise.
Additionally, our appreciation goes to the dedicated Pearson team, with special mentions to James
Manly and Christopher Cleveland, for their amazing support.

x v ii
This page intentionally left blank
About the Authors
Omar Santos is a cybersecurity thought leader with a passion for driving industry-wide initiatives
to enhance the security of critical infrastructures. Omar is the lead of the DEF CON Red Team Village,
the chair of the Common Security Advisory Framework (CSAF) technical committee, the founder
of OpenEoX, and board member of the OASIS Open standards organization. Omar’s collaborative
efforts extend to numerous organizations, including the Forum of Incident Response and Security
Teams (FIRST) and the Industry Consortium for Advancement of Security on the Internet (ICASI).
Omar is a renowned person in ethical hacking, vulnerability research, incident response, and AI
security. He employs his deep understanding of these disciplines to help organizations stay ahead
of emerging threats. His dedication to cybersecurity has made a significant impact on businesses,
academic institutions, law enforcement agencies, and other entities striving to bolster their security
measures.
With over 20 books, video courses, white papers, and technical articles under his belt, Omar’s exper-
tise is widely recognized and respected. Omar is a Distinguished Engineer at Cisco, focusing on AI
security research, incident response, and vulnerability disclosure. Omar is a frequent speaker at
many conferences, including RSA, Blackhat, DEF CON, and more, where he shares his cybersecurity
and AI security insights with the global community. You can follow Omar on Twitter @santosomar.
Samer Salam is a technology architect and engineering leader in the computer networking indus-
try with over two decades of experience. In his role as Distinguished Engineer at Cisco Systems,
he focuses on identifying, incubating, and mainstreaming disruptive technologies, in addition to
defining and driving the system and software architecture for networking products. His work spans
the areas of Intent Based Networking, Artificial Intelligence, Natural Language Processing, Machine
Reasoning, Semantic Technologies and Immersive Visualization. Previously at Cisco, he held mul-
tiple technical leadership and software development positions working on IoT, Layer 2 VPN, Metro
Ethernet, OAM protocols, network resiliency, system scalability, software quality, multi-service edge,
broadband, MPLS, and dial solutions.
Samer was awarded the International Society of Service Innovation Professionals (ISSIP) 2022
Excellence in Service Innovation Award for the “Impact to Innovation” category. He holds over 99
US and international patents, and is coauthor of The Internet of Things From Hype to Reality: The Road
to Digitization, He has authored fourteen IETF RFCs, and multiple articles in academic and industry
journals. He is also a speaker at Cisco Live, and blogs on networking technology. Samer holds an
M.S. degree in Computer Engineering from the University of Southern California in Los Angeles
and a B.Eng. in Computer and Communications Engineering, with Distinction, from the American
University of Beirut.
Hazim Dahir is a Distinguished Engineer at the Cisco Technology Enablement and Acceleration
Office. He is working to define and influence next-generation digital transformation architectures
across multiple technologies and industry verticals. Hazim started his Cisco tenure in 1996 as a soft-
ware engineer and subsequently moved into the services organization, focusing on large-scale and

x ix
xx Ab o u t t h e Au t h o rs

emerging technology network architectures. He is currently focusing on developing architectures


utilizing security, collaboration, Edge computing, and AIIoT technologies addressing the future of
work and hybrid cloud requirements for large enterprises. Through his passion for engineering and
sustainability, Hazim is currently working on advanced software solutions for electric and autono-
mous vehicles with global automotive manufacturers. Hazim is a frequent presenter at multiple
US & global conferences and standards bodies. He is the vice-chair for the IEEE Edge Computing
workgroup. He has more than 22 issued and pending US and International patents, several R&D
publications, and is the co-author of four technical books.
1
Introducing the Age of AI: Emergence,
Growth, and Impact on Technology
Welcome to the age of artificial intelligence (AI) and the AI revolution! It’s more than an era of
technological advancements; it is a testament to human curiosity, to our ceaseless quest for knowl-
edge, our undying ambition to shape humanity. It is an era that will transform core technologies
such as computer networking, cybersecurity, collaboration, cloud computing, the Internet of Things
(IoT), quantum computing, and many emerging technologies. This book will cover the transformative
journey that is redefining core IT technologies. In Chapter 2, “Connected Intelligence: AI in Computer
Networking,” we explore how AI will transform computer networking. From managing complex
network infrastructures and reducing downtime to optimizing bandwidth usage and supporting
predictive maintenance, AI is revolutionizing how we share, transmit, and receive information.
In Chapter 3, “Securing the Digital Frontier: AI’s Role in Cybersecurity,” we shift our focus to one of
the fiercest battlegrounds of technology: cybersecurity. The need to protect our digital landscape
has never been more urgent. AI, with its predictive capabilities, automation, and adaptability, is
redefining how we protect our data, our systems, and people.
We pivot from the realm of networks and security to the domain of collaboration technologies in
Chapter 4, “AI and Collaboration: Building Bridges, Not Walls.” The journey continues in Chapter 5, “AI
in the Internet of Things (IoT) or AIoT: The Intelligence Behind Billions of Devices,” where we delve
into the junction of AI and IoT. AIoT is the intelligence that’s bridging the physical and digital world,
from our homes to our cities and critical infrastructure, making them smarter, efficient, and more
responsive.
In Chapter 6, “Revolutionizing Cloud Computing with AI,” we examine how AI will continue to trans-
form cloud computing into a more powerful, scalable, and efficient technology. Meanwhile, cloud
computing has become the de facto platform for AI’s growth, providing the computational power

1
2 C h a p ter 1 I nt ro d u cin g th e Ag e o f A I

and vast storage it needs. Finally, in Chapter 7, “Impact of AI in Other Emerging Technologies,” we
expand our view to encompass the broader technological horizon. We’ll see how AI is breathing
life into other cutting-edge technologies, from autonomous vehicles and personalized medicine to
quantum computing and beyond.
Together, these chapters weave the narrative of the ongoing AI revolution. The journey won’t
be easy; it’s complex, uncertain, even daunting. But it is also exhilarating, rich with potential and
opportunities. Join me, along with my co-authors Hazim and Samer, as we embark on this journey.

The End of Human Civilization


The great debate: Will AI ultimately transform or terminate human civilization? AI is a groundbreak-
ing technology that has sparked intense debates about its implications for humanity’s future.
Although some individuals have concerns that AI might bring about the downfall of human
civilization, it is arrogant not to acknowledge the immense benefits and opportunities it presents.
Several notable figures, including prominent scientists and technology pioneers, have expressed
concerns about the AI-enabled future. Their concerns center on potential dangers, including the rise
of superintelligent machines that could surpass human capabilities and gain control over critical
systems. These dystopian thoughts envision scenarios where AI-powered systems become
uncontrollable, leading to catastrophic consequences for humanity.
Don’t get me wrong—numerous risks lie ahead. But it is essential to recognize that AI, in its current
form, is a tool that requires human guidance and oversight. Responsible development and regula-
tion can mitigate the potential risks and ensure that AI systems align with human values and ethical
principles. Researchers, policymakers, and industry leaders are actively working on designing frame-
works that prioritize safety, transparency, and accountability. Their work responds to the fears about
autonomous weapons, job displacement, erosion of privacy, and the loss of human touch in various
domains that fuel these concerns.
However, a vast majority of experts and enthusiasts believe that AI offers immense potential for
positive transformation in almost every aspect of human life. The extraordinary benefits of AI are
already evident in numerous fields, including IT, healthcare, education, and transportation.

Significant Milestones in AI Development (This Book Is


Already Obsolete)
It is crucial to be humble and recognize a unique paradox inherent to this field: The accelerating pace
of AI development might render any effort to encapsulate its current state obsolete almost as soon
as it is documented. In this regard, you could argue that this book—or, really, any book about
technology—captures a snapshot of a moment already surpassed by the exponential rate of progress.
Each day, AI research generates new insights and unveils improved algorithms, models, and
implementations. These developments are not only related to the breakthroughs that make news
S ign ifica nt M ilesto n es i n A I D e ve l o pme nt ( Th i s B o o k I s Al re a d y O bs o l e te ) 3

headlines, or what you hear in podcasts and YouTube videos, but also thrive in the form of myriad
incremental advancements that might seem small on their own but collectively represent a significant
transformation. The landscape of AI we explore today might differ from the one that exists tomorrow.
However, instead of viewing this inability to keep up as a shortcoming, consider it a testament to
the true potential and pace of the AI field. Don’t think about this book as just a static record of AI’s
current state, but rather view it as a compass, pointing toward the broader impact. It’s designed to
provide a framework, a lens through which to make sense of this ongoing revolution, and to help
navigate the future developments that, at this moment, we can only begin to imagine.
The AI field has already seen an incredible number of important milestones, many of which have led
to the advacements we’re seeing today. Figure 1-1 provides a timeline of the most popular historical
milestones of AI.
These milestones, among many others, represent key moments in the development of AI, each
marking a significant stride forward in the technology’s capabilities. Let’s explore the milestones
illustrated in Figure 1-1.
In 1950, Alan Turing proposed a test to measure a machine’s ability to exhibit intelligent behav-
ior equivalent to or indistinguishable from that of a human. This test, known as the Turing Test,
remains an important concept in the field of AI. The first organized gathering to discuss AI was
the Dartmouth Conference, held in 1956. This is where the term “artificial intelligence” was coined.
The Dartmouth Conference initiated active research in the field. Three years later, John McCarthy
and Marvin Minsky established the Artificial Intelligence Laboratory at the Massachusetts Institute
of Technology (MIT), signifying the formalization of AI as an academic field of study. Joseph
Weizenbaum at MIT later created ELIZA, one of the first AI programs that could simulate conversa-
tion with a human being. In 1972, MYCIN was developed at Stanford University; it was one of the
first expert systems designed to help doctors diagnose bacterial infections and recommend treat-
ments. IBM’s supercomputer, Deep Blue, defeated world chess champion Garry Kasparov in 1997.
This event showcased the potential for AI to outperform humans in complex tasks. Watson, another
IBM creation, won the game show Jeopardy in 2011, demonstrating a significant leap in AI’s natural
language processing and understanding capabilities.
Developed by Alex Krizhevsky, Ilya Sutskever, and Geoffrey Hinton, AlexNet won the ImageNet
Large Scale Visual Recognition Challenge in 2012, highlighting the effectiveness of deep learning
and convolutional neural networks in image recognition tasks. Two years later, Microsoft launched
Xiaoice, a social chatbot that could carry on conversations, paving the way for the development of
advanced conversational AI systems.
In 2015, Google’s AlphaGo, developed by DeepMind, defeated world Go champion Lee Sedol,
showcasing the power of AI in mastering a game far more complex than chess. Elon Musk co-
founded OpenAI, a research organization committed to ensuring artificial general intelligence
(AGI) can be aligned with human values and widely distributed. OpenAI’s GPT models have
marked significant progress in generative AI. DeepMind’s AI, AlphaFold, made a breakthrough in
biology by solving the protein folding problem, demonstrating the potential for AI to accelerate
scientific discovery.
4

2012: AlexNet and the


C h a p ter 1

1965: ELIZA 2020: GPT-3


Rise of Deep Learning

1956: The Dartmouth 1997: Deep Blue Defeats 2015: AlphaGo Defeats
Garry Kasparov 2022–2023: GPT-4
Conference Test Go Champion
I nt ro d u cin g th e Ag e o f A I

1950: Alan Turing and 2022: AlphaFold Solves


the Turing Test 1972: MYCIN 2014: Chatbots Protein Folding Problem

2024 and Beyond:


Numerous New Al
1959: The First Al 2011: IBM's Watson Wins Models, Libraries, and
2016: OpenAl
Laboratory Jeopardy Applications

Figure 1-1
Historical AI Development Milestones
Th e A I B l a c k B ox Pro bl e m a n d E x pl a i n a bl e A I 5

Nowadays, dozens of AI models and applications are being released at a very rapid pace. But what’s
next? We can extrapolate, based on trends and projected advancements, that AGI is very near. Such
AI systems will possess the ability to understand, learn, and apply knowledge across a wide array of
tasks at a human level.
Meanwhile, quantum computing is in an emerging stage. Its integration with AI will open up new
possibilities for data processing and machine learning. How quantum computers are programmed
and networked will be vastly different than the case for traditional computers.
As AI systems grow more complex, the demand for transparency also increases. In particular, we
will need to see significant advancements in “explainable AI” (XAI). We must design these systems to
provide clear, understandable explanations for their decisions and actions.

The AI Black Box Problem and Explainable AI


The opaque and mysterious nature of complex machine learning and AI models has been a recur-
ring challenge in the industry. The growing demand for what is known as explainable AI (XAI) is obvi-
ous. Machine learning models, particularly deep learning ones, are often referred to as “black boxes.”
While incredibly powerful, these models’ inner workings are largely inexplicable. Even the engineers
who create them can struggle to explain precisely why a given model made a specific decision. This
lack of transparency poses serious issues for such models’ wider application.
When AI impacts critical areas such as medical diagnosis, networking, cybersecurity, or autonomous
vehicle control, it’s crucial for users to understand the reasoning behind its decisions. The risks of
mistakes caused by biased or incorrect decisions could lead to horrible consequences and damage
trust in AI technologies.
Explainable AI seeks to bridge this gap, by promoting the development of AI models that are not
only performant but also interpretable. The goal is to create systems that can provide understand-
able explanations for their decisions in a way that humans can comprehend. These explanations
can take different forms, such as feature importance, surrogate models, and visual explanations. For
instance, they might highlight which features or inputs were most influential in a model’s decision.
They might also involve training simpler, interpretable models to understand the decisions made
by a more complex one. Another option is visual explanations such as heat maps that show which
parts of an image were most important for a model’s classification.
Achieving a balance between model interpretability and performance is one of the main challenges
in making AI more widely applicable. Simplifying models for the sake of interpretability can some-
times reduce their accuracy. Also, the concept of “explanation” can be subjective and varies based
on the person’s expertise and the context.
6 C h a p ter 1 I nt ro d u cin g th e Ag e o f A I

What’s the Difference Between Today’s Large Language Models


and Traditional Machine Learning?
Today’s AI systems have achieved a more nuanced understanding of human language, enabling
more effective, natural interactions and a deeper comprehension of context, sentiment, and intent.
But what’s the difference between today’s large language models and traditional machine learn-
ing? Large language models (LLMs), such as OpenAI’s GPT, Falcon, LLaMA2, DALL-E, Stable Diffusion,
MidJourney, and others, are transforming our understanding of what machines can achieve. Their
ability to generate human-like text has implications for numerous fields, from content generation
and translation to customer service and tutoring. These models represent a shift away from tradi-
tional machine learning approaches.
Traditional machine learning models, including algorithms like decision trees, linear regression, and
support vector machines, typically work by learning patterns from a set of input–output examples.
They are often relatively simple, interpretable, and require explicit feature engineering.

NOTE Feature engineering is the process in which the data scientist specifies which aspects of the data the
model should pay attention to.

Traditional models tend to be task-specific. This implies that a new model must be trained from
scratch for each unique problem, with little to no transfer of knowledge occurring from one task to
another.
LLMs introduce a different approach, known as Transformer-based models. These models leverage
deep learning and natural language processing (NLP) to understand and generate human-like text.
They are pretrained on a massive corpus of text data, learning patterns, structures, and even some
facts about the world from billions of sentences. Unlike traditional models, these LLMs are general-
ists. Once trained, they can be fine-tuned for a wide range of tasks, such as translation, question-
answering, summarization, and more, all within the same model architecture. The ability to transfer
knowledge across tasks is one of their key strengths.

TIP In the context of AI, parameters are the internal variables that the model learns through training. They
are the part of the model that is learned from historical training data and enable the model to make predic-
tions or decisions. In a simple linear regression model, the parameters are the slope and the y-intercept. In
a deep learning model such as a neural network, the parameters are the weights and biases in the network.
These parameters are initially set to random values and then iteratively adjusted based on the feedback
signal (loss or error) that the model gets as it trains on the data.

In the case of LLMs like GPT, the parameters are the weights in the numerous layers of the Transformer
architecture that the model uses. As an example, the legacy GPT-3 has 175 billion parameters, which means
the model has an equal number of weights that it can adjust to learn from the data it’s trained on. GPT-4 is
speculated to have 1.76 trillion parameters, though some sources suggest it is a combination of different
models (the exact details have not been disclosed by OpenAI).

Their total number of parameters allows these models to capture and represent very complex patterns and
relationships in the data. In turn, that is part of what enables them to generate such remarkably human-like
text.
To d ay ’s L L M s vs. Tra d i ti o n a l M a c h i n e Le a r n i n g 7

Unlike traditional machine learning, large language models do not rely on explicit feature
engineering. They learn to represent and understand the data automatically through their training
process, which involves adjusting millions, billions, or even trillions of parameters to minimize the
difference between their predictions and the actual outcomes.
Table 1-1 compares the traditional machine learning models with the newer, more advanced
models such as LLMs, Transformer-based models, and generative AI models.

Table 1-1 Traditional Machine Learning Models Versus Newer AI Models


Traditional Machine Learning Models Newer AI Models (LLMs, Transformer-Based,
Generative AI)
Basic architecture Generally, based on a mathematical/statistical model. Generally based on neural networks, with the
Examples include linear regression, decision trees, “transformer” being a specific type of network
support vector machine (SVM), etc. architecture.
Data requirement Requires less data compared to the new AI models. Requires massive amounts of data to perform optimally.
Comprehensibility Easier to interpret and understand. Some models More of a “black box” approach; these models are often
(e.g., decision trees) provide clear, intuitive rules. more difficult to interpret.
Training time Usually quicker to train because of their simplicity and Require significant computational resources and time due
lower computational complexity. to their complexity.
Model performance Generally, may have lower performance on complex Outperform traditional machine learning models on
tasks compared to the newer AI models. complex tasks such as natural language processing and
image recognition.
Generalization Usually better at generalizing from less data. May struggle with generalization due to their reliance on
large amounts of training data.
Versatility Specific models are usually required for specific tasks. More versatile. A single architecture (e.g., Transformer)
can be used for a variety of tasks.
Transfer learning Limited capability. These models excel in transfer learning, where a model
trained on one task can be fine-tuned to perform
another task.
Feature engineering Requires careful manual feature engineering. Feature extraction is typically performed automatically
by the model itself.

Transfer learning is a machine learning technique in which a model developed for a given task is
reused as the starting point for a model on a second task. Basically, you take a pretrained model
(a model trained on a large dataset) and adapt it for a different (but related) problem. Transfer
learning is useful when you have a small dataset for the problem you are interested in solving but
also have access to a much larger, related dataset.
For example, suppose you have a convolutional neural network (CNN) model that has been trained
to recognize 1000 types of objects. This model has already learned useful features from the images
it has seen, such as edges, corners, and textures. Now, you have a new task where the system needs
to recognize only a few types of network topology devices (e.g., routers, switches, firewalls, serv-
ers, desktops). Instead of training a new model from scratch, you can use the pretrained model and
8 C h a p ter 1 I nt ro d u cin g th e Ag e o f A I

slightly modify its architecture to suit your specific task. In this way, you can leverage the learned
features without having to start the training process from scratch.
Several different types of transfer learning are possible:
• Feature extraction: The pretrained model acts as a feature extractor. You remove the output
layer and add new layers that are specific to your task. The pretrained layers are usually
“frozen” during training (i.e., their weights are not updated).
• Fine-tuning: You not only replace the output layer but also continue to train the entire
network, sometimes at a lower learning rate, to allow the pretrained model to adapt to the
new task.
• Task-specific models: Sometimes, certain layers of the pretrained model may be replaced or
adapted to make the model better suited to the new task.

TIP Training a model from scratch can be computationally expensive and time-consuming. Transfer learn-
ing can significantly speed up this training process. When you have a small dataset, training a model from
scratch may result in overfitting. Transfer learning helps in such cases by leveraging a pretrained model. A
pretrained model has generalized features that can enhance its performance on the new task, even if the
new task is significantly different from the original task. Transfer learning has seen successful applications in
multiple domains, including NLP, computer vision, and reinforcement learning.

Feature engineering is the process of selecting, transforming, or creating new input variables
(features) to improve the performance of a machine learning model. The quality and relevance of
the features used can significantly impact the model’s ability to learn the underlying patterns in the
data, and consequently its performance on unseen data.
The feature engineering process typically involves a combination of domain expertise, data analysis,
and experimentation, and can include steps such as variable transformation, feature extraction, and
feature construction. Variable transformation is explained in Figure 1-2.

Scaling the features so that they have


NORMALIZATION
similar ranges, typically between 0 and 1.

VARIABLE Transforming the features to have a


STANDARDIZATION
TRANSFORMATION mean of 0 and standard deviation of 1.

Useful for dealing with skewed data


LOG TRANSFORMATION
distributions.

Figure 1-2
Mechanics of Variable Transformation
Another random document with
no related content on Scribd:
THE FREEBOOTER OF LOCHABER.

By Sir Thomas Dick Lauder.

Towards the end of the seventeenth century, there lived a certain


notorious freebooter, in the county of Moray, a native of Lochaber, of
the name of Cameron, but who was better known by his cognomen of
Padrig Mac-an-Ts’agairt, which signifies, “Peter, the Priest’s Son.”
Numerous were the “creachs,” or robberies of cattle on a great scale,
driven by him from Strathspey. But he did not confine his
depredations to that country; for, some time between the years 1690
and 1695, he made a clean sweep of the cattle from the rich pastures
of the Aird, the territory of the Frasers. That he might put his
pursuers on a wrong scent, he did not go directly towards Lochaber,
but, crossing the river Ness at Lochend, he struck over the mountains
of Strathnairn and Strathdearn, and ultimately encamped behind a
hill above Duthel, called, from a copious spring on its summit, Cairn-
an-Sh’uaran, or the Well Hill. But, notwithstanding all his
precautions, the celebrated Simon Lord Lovat, then chief of the
Frasers, discovered his track, and despatched a special messenger to
his father-in-law, Sir Ludovick Grant of Grant, begging his aid in
apprehending Mac-an-Ts’agairt, and recovering the cattle.
It so happened that there lived at this time, on the laird of Grant’s
ground, a man also called Cameron, surnamed Mugach More, of
great strength and undaunted courage; he had six sons and a
stepson, whom his wife, formerly a woman of light character, had
before her marriage with Mugach, and, as they were all brave, Sir
Ludovick applied to them to undertake the recapture of the cattle. Sir
Ludovic was not mistaken in the man. The Mugach no sooner
received his orders, than he armed himself and his little band, and
went in quest of the freebooter, whom he found in the act of cooking
a dinner from part of the spoil. The Mugach called on Padrig and his
men to surrender, and they, though numerous, dreading the well-
known prowess of their adversary, fled to the opposite hills, their
chief threatening bloody vengeance as he went. The Mugach drove
the cattle to a place of safety, and watched them till their owners
came to recover them.
Padrig did not utter his threats without the fullest intention of
carrying them into effect. In the latter end of the following spring, he
visited Strathspey with a strong party, and waylaid the Mugach, as he
and his sons were returning from working at a small patch of land he
had on the brow of a hill, about half-a-mile above his house. Padrig
and his party concealed themselves in a thick covert of underwood,
through which they knew that the Mugach and his sons must pass;
but seeing their intended victims well-armed, the cowardly assassins
lay still in their hiding-place, and allowed them to pass, with the
intention of taking a more favourable opportunity for their purpose.
That very night they surprised and murdered two of the sons, who,
being married, lived in separate houses, at some distance from their
father’s; and, having thus executed so much of their diabolical
purpose, they surrounded the Mugach’s cottage.
No sooner was his dwelling attacked, than the brave Mugach,
immediately guessing who the assailants were, made the best
arrangements for defence that time and circumstances permitted.
The door was the first point attempted; but it was strong, and he and
his four sons placed themselves behind it, determined to do bloody
execution the moment it should be forced. Whilst thus engaged, the
Mugach was startled by a noise above the rafters, and, looking up, he
perceived, in the obscurity, the figure of a man half through a hole in
the wattled roof. Eager to despatch his foe as he entered, he sprang
upon a table, plunged his sword into his body, and down fell—his
stepson, whom he had ever loved and cherished as one of his own
children! The youth had been cutting his way through the roof, with
the intention of attacking Padrig from above, and so creating a
diversion in favour of those who were defending the door. The brave
young man lived no longer than to say, “Dear father, I fear you have
killed me!”
For a moment the Mugach stood petrified with horror and grief,
but rage soon usurped the place of both. “Let me open the door!” he
cried, “and revenge his death, by drenching my sword in the blood of
the villain!” His sons clung around him, to prevent what they
conceived to be madness, and a strong struggle ensued between
desperate bravery and filial duty; whilst the Mugach’s wife stood
gazing on the corpse of her first-born son, in an agony of contending
passions, being ignorant from all she had witnessed but that the
young man’s death had been wilfully wrought by her husband. “Hast
thou forgotten our former days?” cried the wily Padrig, who saw the
whole scene through a crevice in the door. “How often hast thou
undone thy door to me, and wilt thou not open it now, to give me
way to punish him who has, but this moment, so foully slain thy
beloved son?” Ancient recollections, and present affliction, conspired
to twist her to his purpose. The struggle and altercation between the
Mugach and his sons still continued. A frenzy seized on the unhappy
woman; she flew to the door, undid the bolt, and Padrig and his
assassins rushed in.
The infuriated Mugach no sooner beheld his enemy enter, than he
sprang at him like a tiger, grasped him by the throat, and dashed him
to the ground. Already was his vigorous sword-arm drawn back, and
his broad claymore was about to find a passage to the traitor’s heart,
when his faithless wife, coming behind him, threw over it a large
canvas winnowing-sheet, and, before he could extricate the blade
from the numerous folds, Padrig’s weapon was reeking in the best
heart’s-blood of the bravest Highlander that Strathspey could boast
of. His four sons, who had witnessed their mother’s treachery, were
paralyzed. The unfortunate woman herself, too, stood stupified and
appalled. But she was quickly recalled to her senses by the active
clash of the swords of Padrig and his men. “Oh, my sons, my sons!”
she cried; “spare my boys!” But the tempter needed her services no
longer,—she had done his work. She was spurned to the ground and
trampled under foot by those who soon strewed the bloody floor
around her with the lifeless corpses of her brave sons.
Exulting in the full success of this expedition of vengeance, Mac-
an-Ts’agairt beheaded the bodies, and piled the heads in a heap on
an oblong hill that runs parallel to the road on the east side of Carr
Bridge, from which it is called Tom-nan-Cean, the Hill of the Heads.
Scarcely was he beyond the reach of danger, than his butchery was
known at the Castle Grant, and Sir Ludovick immediately offered a
great reward for his apprehension; but Padrig, who had anticipated
some such thing, fled to Ireland, where he remained for seven years.
But the restlessness of the murderer is well known, and Padrig felt it
in all its horrors. Leaving his Irish retreat, he returned to Lochaber.
By a strange accident, a certain Mungo Grant, of Muckrach, having
had his cattle and horses carried away by some thieves from that
quarter, pursued them hot foot, recovered them, and was on his way
returning with them, when, to his astonishment, he met Padrig Mac-
an-Ts’agairt, quite alone in a narrow pass, on the borders of his
native country. Mungo instantly seized and made a prisoner of him.
But his progress with his beasts was tedious; and as he was entering
Strathspey at Lag-na-caillich, about a mile to the westward of
Aviemore, he espied twelve desperate men, who, taking advantage of
his slow march, had crossed the hills to gain the pass before him, for
the purpose of rescuing Padrig. But Mungo was not to be daunted.
Seeing them occupying the road in his front, he grasped his prisoner
with one hand, and brandishing his dirk with the other, he advanced
in the midst of his people and animals, swearing potently that the
first motion at an attempt at rescue by any one of them should be the
signal for his dirk to drink the life’s-blood of Padrig Mac-an-
Ts’agairt. They were so intimidated by his boldness that they allowed
him to pass without assault, and left their friend to his fate. Padrig
was forthwith carried to Castle Grant. But the remembrance of the
Mugach’s murder had been by this time much obliterated by many
events little less strange, and the laird, unwilling to be troubled with
the matter, ordered Mungo and his prisoner away.
Disappointed and mortified, Mungo and his party were returning
with their captive, discussing, as they went, what they had best do
with him. “A fine reward we have had for all our trouble!” said one.
“The laird may catch the next thief her nainsel, for Donald!” said
another. “Let’s turn him loose!” said a third. “Ay, ay,” said a fourth;
“what for wud we be plaguing oursels more wi’ him?” “Yes, yes!
brave, generous men!” said Padrig, roused by a sudden hope of life
from the moody dream of the gallows-tree in which he had been
plunged, whilst he was courting his mournful muse to compose his
own lament, that he might die with an effect striking, as all the
events of his life had been. “Yes, brave men, free me from these
bonds! It is unworthy of Strathspey men,—it is unworthy of Grants to
triumph over a fallen foe! Those whom I killed were no clansmen of
yours, but recreant Camerons, who betrayed a Cameron! Let me go
free, and that reward of which you have been disappointed shall be
quadrupled for sparing my life.” Such words as these, operating on
minds so much prepared to receive them favourably, had well-nigh
worked their purpose. But “No!” said Muckrach sternly, “it shall
never be said that a murderer escaped from my hands. Besides, it
was just so that he fairly spake the Mugach’s false wife. But did he
spare her sons on that account? If ye let him go, my men, the fate of
the Mugach may be ours; for what bravery can stand against
treachery and assassination?” This opened an entirely new view of
the question to Padrig’s rude guards, and the result of the conference
was that they resolved to take him to Inverness, and to deliver him
up to the sheriff.
As they were pursuing their way up the south side of the river
Dulnan, the hill of Tom-nan-Cean appeared on that opposite to
them. At sight of it the whole circumstances of Padrig’s atrocious
deed came fresh in to their minds. It seemed to cry on them for
justice, and with one impulse they shouted out, “Let him die on the
spot where he did the bloody act!” Without a moment’s farther delay,
they determined to execute their new resolution. But on their way
across the plain, they happened to observe a large fir tree, with a
thick horizontal branch growing at right angles from the trunk, and
of a sufficient height from the ground to suit their purpose; and
doubting if they might find so convenient a gallows where they were
going, they at once determined that here Padrig should finish his
mortal career. The neighbouring birch thicket supplied them with
materials for making a withe; and whilst they were twisting it, Padrig
burst forth in a flood of Gaelic verse, which his mind had been
accumulating by the way. His song and the twig rope that was to
terminate his existence were spun out and finished at the same
moment, and he was instantly elevated to a height equally beyond his
ambition and his hopes.
AN HOUR IN THE MANSE.

By Professor Wilson.

In a few weeks the annual sacrament of the Lord’s Supper was to


be administered in the parish of Deanside; and the minister,
venerable in old age, of authority by the power of his talents and
learning, almost feared for his sanctity, yet withal beloved for
gentleness and compassion that had never been found wanting,
when required either by the misfortunes or errors of any of his flock,
had delivered for several successive Sabbaths, to full congregations,
sermons on the proper preparation of communicants in that awful
ordinance. The old man was a follower of Calvin; and many, who had
listened to him with a resolution in their hearts to approach the table
of the Redeemer, felt so awe-stricken and awakened at the
conclusion of his exhortations, that they gave their souls another
year to meditate on what they had heard, and by a pure and humble
course of life, to render themselves less unworthy to partake the
mysterious and holy bread and wine.
The good old man received in the manse, for a couple of hours
every evening, such of his parishioners as came to signify their wish
to partake of the sacrament; and it was then noted, that, though he in
nowise departed, in his conversation with them at such times, from
the spirit of those doctrines which he had delivered from the pulpit,
yet his manner was milder, and more soothing, and full of
encouragement; so that many who went to him almost with quaking
hearts, departed in tranquillity and peace, and looked forward to that
most impressive and solemn act of the Christian faith with calm and
glad anticipation. The old man thought, truly and justly, that few, if
any, would come to the manse, after having heard him in the kirk,
without due and deep reflection; and therefore, though he allowed
none to pass through his hands without strict examination, he spoke
to them all benignly, and with that sort of paternal pity which a
religious man, about to leave this life, feels towards all his brethren
of mankind, who are entering upon, or engaged in, its scenes of
agitation, trouble, and danger.
On one of those evenings, the servant showed into the minister’s
study a tall, bold-looking, dark-visaged man, in the prime of life,
who, with little of the usual courtesy, advanced into the middle of the
room, and somewhat abruptly declared the sacred purpose of his
visit. But before he could receive a reply, he looked around and
before him; and there was something so solemn in the old minister’s
appearance, as he sat like a spirit, with his unclouded eyes fixed upon
the intruder, that that person’s countenance fell, and his heart was
involuntarily knocking against his side. An old large Bible, the same
that he read from in the pulpit, was lying open before him. One
glimmering candle showed his beautiful and silvery locks falling over
his temples, as his head half stooped over the sacred page; a dead
silence was in the room dedicated to meditation and prayer; the old
man, it was known, had for some time felt himself to be dying, and
had spoken of the sacrament of this summer as the last he could ever
hope to administer; so that altogether, in the silence, the dimness,
the sanctity, the unworldliness of the time, the place, and the being
before him, the visitor stood like one abashed and appalled; and
bowing more reverently, or at least respectfully, he said, with a
quivering voice, “Sir, I come for your sanction to be admitted to the
table of our Lord.”
The minister motioned to him with his hand to sit down; and it
was a relief to the trembling man to do so, for he was in the presence
of one who, he felt, saw into his heart. A sudden change from
hardihood to terror took place within his dark nature; he wished
himself out of the insupportable sanctity of that breathless room;
and a remorse, that had hitherto slept, or been drowned within him,
now clutched his heartstrings, as if with an alternate grasp of frost
and fire, and made his knees knock against each other where he sat,
and his face pale as ashes.
“Norman Adams, saidst thou that thou wilt take into that hand,
and put into those lips, the symbol of the blood that was shed for
sinners, and of the body that bowed on the cross, and then gave up
the ghost? If so, let us speak together, even as if thou wert
communing with thine own heart. Never again may I join in that
sacrament, for the hour of my departure is at hand. Say, wilt thou eat
and drink death to thine immortal soul?”
The terrified man found strength to rise from his seat, and,
staggering towards the door, said, “Pardon, forgive me!—I am not
worthy.”
“It is not I who can pardon, Norman. That power lies not with
man; but sit down—you are deadly pale—and though, I fear, an ill-
living and a dissolute man, greater sinners have repented and been
saved. Approach not now the table of the Lord, but confess all your
sins before Him in the silence of your own house, and upon your
naked knees on the stone-floor every morning and every night; and if
this you do faithfully, humbly, and with a contrite heart, come to me
again when the sacrament is over, and I will speak words of comfort
to you (if then I am able to speak)—if, Norman, it should be on my
deathbed. This will I do for the sake of thy soul, and for the sake of
thy father, Norman, whom my soul loved, and who was a support to
me in my ministry for many long, long years, even for two score and
ten, for we were at school together; and had your father been living
now, he would, like myself, have this very day finished his eighty-
fifth year. I send you not from me in anger, but in pity and love. Go,
my son, and this very night begin your repentance, for if that face
speak the truth, your heart must be sorely charged.”
Just as the old man ceased speaking, and before the humble, or at
least affrighted culprit had risen to go, another visitor of a very
different kind was shown into the room—a young, beautiful girl,
almost shrouded in her cloak, with a sweet pale face, on which
sadness seemed in vain to strive with the natural expression of the
happiness of youth.
“Mary Simpson,” said the kind old man, as she stood with a timid
courtesy near the door, “Mary Simpson, approach, and receive from
my hands the token for which thou comest. Well dost thou know the
history of thy Saviour’s life, and rejoicest in the life and immortality
brought to light by the gospel. Young and guileless, Mary, art thou;
and dim as my memory now is of many things, yet do I well
remember the evening, when first beside my knee, thou heardst read
how the Divine Infant was laid in a manger, how the wise men from
the East came to the place of His nativity, and how the angels were
heard singing in the fields of Bethlehem all the night long.”
Alas! every word that had thus been uttered sent a pang into the
poor creature’s heart, and, without lifting her eyes from the floor,
and in a voice more faint and hollow than belonged to one so young,
she said, “O sir! I come not as an intending communicant; yet the
Lord my God knows that I am rather miserable than guilty, and He
will not suffer my soul to perish, though a baby is now within me, the
child of guilt, and sin, and horror. This, my shame, come I to tell you;
but for the father of my babe unborn, cruel though he has been to
me,—oh! cruel, cruel, indeed,—yet shall his name go down with me
in silence to the grave. I must not, must not breathe his name in
mortal ears; but I have looked round me in the wide moor, and when
nothing that could understand was by, nothing living but birds, and
bees, and the sheep I was herding, often have I whispered his name
in my prayers, and beseeched God and Jesus to forgive him all his
sins.”
At these words, of which the passionate utterance seemed to
relieve her heart, and before the pitying and bewildered old man
could reply, Mary Simpson raised her eyes from the floor, and
fearing to meet the face of the minister, which had heretofore never
shone upon her but with smiles, and of which the expected frown
was to her altogether insupportable, she turned them wildly round
the room, as if for a dark resting-place, and beheld Norman Adams
rooted to his seat, leaning towards her with his white, ghastly
countenance, and his eyes starting from their sockets, seemingly in
wrath, agony, fear, and remorse. That terrible face struck poor Mary
to the heart, and she sank against the wall, and slipped down,
shuddering, upon a chair.
“Norman Adams, I am old and weak, but do you put your arm
round that poor lost creature, and keep her from falling down on the
hard floor. I hear it is a stormy night, and she has walked some miles
hither; no wonder she is overcome. You have heard her confession,
but it was not meant for your ear; so, till I see you again, say nothing
of what you have now heard.”
“O sir! a cup of water, for my blood is either leaving my heart
altogether, or it is drowning it. Your voice, sir, is going far, far away
from me, and I am sinking down. Oh, hold me!—hold me up! Is it a
pit into which I am falling?—Saw I not Norman Adams?—Where is
he now?”
The poor maiden did not fall off the chair, although Norman
Adams supported her not; but her head lay back against the wall, and
a sigh, long and dismal, burst from her bosom, that deeply affected
the old man’s heart, but struck that of the speechless and motionless
sinner, like the first toll of the prison bell that warns the felon to
leave his cell and come forth to execution.
The minister fixed a stern eye upon Norman, for, from the poor
girl’s unconscious words, it was plain that he was the guilty wretch
who had wrought all this misery. “You knew, did you not, that she
had neither father nor mother, sister nor brother, scarcely one
relation on earth to care for or watch over her; and yet you have used
her so? If her beauty was a temptation unto you, did not the sweet
child’s innocence touch your hard and selfish heart with pity? or her
guilt and grief must surely now wring it with remorse. Look on her—
white, cold, breathless, still as a corpse; and yet, thou bold bad man,
thy footsteps would have approached the table of thy Lord!”
The child now partly awoke from her swoon, and her dim opening
eyes met those of Norman Adams. She shut them with a shudder,
and said, sickly and with a quivering voice, “Oh spare, spare me,
Norman! Are we again in that dark, fearful wood? Tremble not for
your life on earth, Norman, for never, never will I tell to mortal ears
that terrible secret; but spare me, spare me, else our Saviour, with all
His mercy, will never pardon your unrelenting soul. These are cruel-
looking eyes; you will not surely murder poor Mary Simpson,
unhappy as she is, and must for ever be—yet life is sweet! She
beseeches you on her knees to spare her life!”—and, in the intense
fear of phantasy, the poor creature struggled off the chair, and fell
down indeed in a heap at his feet.
“Canst thou indeed be the son of old Norman Adams, the
industrious, the temperate, the mild, and the pious—who so often sat
in this very room which thy presence has now polluted, and spake
with me on the mysteries of life and of death? Foul ravisher, what
stayed thy hand from the murder of that child, when there were none
near to hear her shrieks in the dark solitude of the great pine-wood?”
Norman Adams smote his heart and fell down too on his knees
beside the poor ruined orphan. He put his arm round her, and,
raising her from the floor, said, “No, no, my sin is great, too great for
Heaven’s forgiveness; but, oh sir! say not—say not that I would have
murdered her; for, savage as my crime was, yet may God judge me
less terribly than if I had taken her life.”
In a little while they were both seated with some composure, and
silence was in the room. No one spoke, and the old grayhaired man
sat with his eyes fixed, without reading, on the open Bible. At last he
broke silence with these words out of Isaiah, that seemed to have
forced themselves on his heedless eyes:—“Though your sins be as
scarlet, they shall be as white as snow: though they be red like
crimson, they shall be as wool.”
Mary Simpson wept aloud at these words, and seemed to forget
her own wrongs and grief in commiseration of the agonies of
remorse and fear that were now plainly preying on the soul of the
guilty man. “I forgive you, Norman, and will soon be out of the way,
no longer to anger you with the sight of me.” Then, fixing her
streaming eyes on the minister, she besought him not to be the
means of bringing him to punishment and a shameful death, for that
he might repent, and live to be a good man and respected in the
parish; but that she was a poor orphan for whom few cared, and who,
when dead, would have but a small funeral.
“I will deliver myself up into the hands of justice,” said the
offender, “for I do not deserve to live. Mine was an inhuman crime,
and let a violent and shameful death be my doom.”
The orphan girl now stood up as if her strength had been restored,
and stretching out her hands passionately, with a flow of most
affecting and beautiful language, inspired by a meek, single, and
sinless heart that could not bear the thought of utter degradation and
wretchedness befalling any one of the rational children of God,
implored and beseeched the old man to comfort the sinner before
them, and promise that the dark transaction of guilt should never
leave the concealment of their own three hearts. “Did he not save the
lives of two brothers once who were drowning in that black mossy
loch, when their own kindred, at work among the hay, feared the
deep sullen water, and all stood aloof shuddering and shaking, till
Norman Adams leapt in to their rescue, and drew them by the
dripping hair to the shore, and then lay down beside them on the
heather as like to death as themselves? I myself saw it done; I myself
heard their mother call down the blessing of God on Norman’s head,
and then all the haymakers knelt down and prayed. When you, on
the Sabbath, returned thanks to God for that they were saved, oh!
kind sir, did you not name, in the full kirk, him who, under
Providence, did deliver them from death, and who, you said, had
thus showed himself to be a Christian indeed? May his sin against
me be forgotten, for the sake of those two drowning boys, and their
mother, who blesses his name unto this day.”
From a few questions solemnly asked, and solemnly answered, the
minister found that Norman Adams had been won by the beauty and
loveliness of this poor orphan shepherdess, as he had sometimes
spoken to her when sitting on the hill-side with her flock, but that
pride had prevented him from ever thinking of her in marriage. It
appeared that he had also been falsely informed, by a youth whom
Mary disliked for his brutal and gross manners, that she was not the
innocent girl that her seeming simplicity denoted. On returning from
a festive meeting, where this abject person had made many mean
insinuations against her virtue, Norman Adams met her returning to
her master’s house, in the dusk of the evening, on the footpath
leading through a lonely wood; and, though his crime was of the
deepest dye, it seemed to the minister of the religion of mercy, that
by repentance, and belief in the atonement that had once been made
for sinners, he, too, might perhaps hope for forgiveness at the throne
of God.
“I warned you, miserable man, of the fatal nature of sin, when first
it brought a trouble over your countenance, and broke in upon the
peaceful integrity of your life. Was not the silence of the night often
terrible to you, when you were alone in the moors, and the whisper of
your own conscience told you, that every wicked thought was
sacrilege to your father’s dust? Step by step, and almost
imperceptibly, perhaps, did you advance upon the road that leadeth
to destruction; but look back now, and what a long dark journey have
you taken, standing, as you are, on the brink of everlasting death!
Once you were kind, gentle, generous, manly, and free; but you
trusted to the deceitfulness of your own heart; you estranged yourself
from the house of the God of your fathers; and what has your nature
done for you at last, but sunk you into a wretch—savage, selfish,
cruel, cowardly, and in good truth a slave? A felon are you, and
forfeited to the hangman’s hands. Look on that poor innocent child,
and think what is man without God. What would you give now, if the
last three years of your reckless life had been passed in a dungeon
dug deep into the earth, with hunger and thirst gnawing at your
heart, and bent down under a cartload of chains? Yet look not so
ghastly, for I condemn you not utterly; nor, though I know your guilt,
can I know what good may yet be left uncorrupted and
unextinguished in your soul. Kneel not to me, Norman; fasten not so
your eyes upon me; lift them upwards, and then turn them in upon
your own heart, for the dreadful reckoning is between it and God.”
Mary Simpson had now recovered all her strength, and she knelt
down by the side of the groaner. Deep was the pity she now felt for
him, who to her had shown no pity; she did not refuse to lay her light
arm tenderly upon his neck. Often had she prayed to God to save his
soul, even among her rueful sobs of shame in the solitary glens; and
now that she beheld his sin punished with a remorse more than he
could bear, the orphan would have willingly died to avert from his
prostrate head the wrath of the Almighty.
The old man wept at the sight of so much innocence, and so much
guilt, kneeling together before God, in strange union and fellowship
of a common being. With his own fatherly arms he lifted up the
orphan from her knees, and said, “Mary Simpson, my sweet and
innocent Mary Simpson, for innocent thou art, the elders will give
thee a token, that will, on Sabbath-day, admit thee (not for the first
time, though so young) to the communion-table. Fear not to
approach it; look at me, and on my face, when I bless the elements,
and be thou strong in the strength of the Lord. Norman Adams,
return to your home. Go into the chamber where your father died.
Let your knees wear out the part of the floor on which he kneeled. It
is somewhat worn already; you have seen the mark of your father’s
knees. Who knows, but that pardon and peace may descend from
Heaven upon such a sinner as thou? On none such as thou have mine
eyes ever looked, in knowledge, among all those who have lived and
died under my care, for three generations. But great is the unknown
guilt that may be hidden even in the churchyard of a small quiet
parish like this. Dost thou feel as if God-forsaken? Or, oh! say it unto
me, canst thou, my poor son, dare to hope for repentance?”
The pitiful tone of the old man’s trembling voice, and the motion
of his shaking and withered hands, as he lifted them up almost in an
attitude of benediction, completed the prostration of that sinner’s
spirit. All his better nature, which had too long been oppressed under
scorn of holy ordinances, and the coldness of infidelity, and the
selfishness of lawless desires that insensibly harden the heart they do
not dissolve, now struggled to rise up and respect its rights. “When I
remember what I once was, I can hope—when I think what I now am,
I only, only fear.”
A storm of rain and wind had come on, and Mary Simpson slept in
the manse that night. On the ensuing Sabbath she partook of the
sacrament. A woeful illness fell upon Norman Adams; and then for a
long time no one saw him, or knew where he had gone. It was said
that he was in a distant city, and that he was a miserable creature,
that never again could look upon the sun. But it was otherwise
ordered. He returned to his farm, greatly changed in face and person,
but even yet more changed in spirit.
The old minister had more days allotted to him than he had
thought, and was not taken away for some summers. Before he died,
he had reason to know that Norman Adams had repented in tears of
blood, in thoughts of faith, and in deeds of charity; and he did not
fear to admit him, too, in good time, to the holy ordinance, along
with Mary Simpson, then his wife, and the mother of his children.
THE WARDEN OF THE MARCHES:
A TRADITIONARY STORY OF ANNANDALE.

The predatory incursions of the Scots and English borderers, on


each other’s territories, are known to every one in the least
acquainted with either the written or traditional history of his
country. These were sometimes made by armed and numerous
bodies, and it was not uncommon for a band of marauders to take
advantage of a thick fog or a dark night for plundering or driving
away the cattle, with which they soon escaped over the border, where
they were generally secure. Such incursions were so frequent and
distressing to the peaceable and well-disposed inhabitants that they
complained loudly to their respective governments; in consequence
of which some one of the powerful nobles residing on the borders
was invested with authority to suppress these depredations, under
the title of Warden of the Marches. His duty was to protect the
frontier, and alarm the country by firing the beacons which were
placed on the heights, where they could be seen at a great distance,
as a warning to the people to drive away their cattle, and, collecting
in a body, either to repel or pursue the invaders, as circumstances
might require. The wardens also possessed a discretionary power in
such matters as came under their jurisdiction. The proper discharge
of this important trust required vigilance, courage, and fidelity, but it
was sometimes committed to improper hands, and consequently the
duty was very improperly performed.
In the reign of James V. one of these wardens was Sir John
Charteris of Amisfield, near Dumfries, a brave but haughty man, who
sometimes forgot his important trust so far as to sacrifice his public
duties to his private interests.
George Maxwell was a young and respectable farmer in
Annandale, who had frequently been active in repressing the petty
incursions to which that quarter of the country was exposed. Having
thereby rendered himself particularly obnoxious to the English
borderers, a strong party was formed, which succeeded in despoiling
him, by plundering his house and driving away his whole live stock.
At the head of a large party he pursued and overtook the “spoil-
encumbered foe;” a fierce and bloody contest ensued, in which
George fell the victim of a former feud, leaving his widow, Marion, in
poverty, with her son Wallace, an only child in the tenth year of his
age. By the liberality of her neighbours, the widow was replaced in a
small farm; but by subsequent incursions she was reduced to such
poverty that she occupied a small cottage, with a cow, which the
kindness of a neighbouring farmer permitted to pasture on his fields.
This, with the industry and filial affection of her son, now in his
twentieth year, enabled her to live with a degree of comfort and
contented resignation.
With a manly and athletic form, Wallace Maxwell inherited the
courage of his father, and the patriotic ardour of the chieftain after
whom he had been named; and Wallace had been heard to declare,
that although he could not expect to free his country from the
incursions of the English borderers, he trusted he should yet be able
to take ample vengeance for the untimely death of his father.
But although his own private wrongs and those of his country had
a powerful influence on the mind of Wallace Maxwell, yet his heart
was susceptible of a far loftier passion.
His fine manly form and graceful bearing had attractions for many
a rural fair; and he would have found no difficulty in matching with
youthful beauty considerably above his own humble station. But his
affections were fixed on Mary Morrison, a maiden as poor in worldly
wealth as himself; but nature had been more than usually indulgent
to her in a handsome person and fine features; and, what was of
infinitely more value, her heart was imbued with virtuous principles,
and her mind better cultivated than could have been expected from
her station in life. To these accomplishments were superadded a
native dignity, tempered with modesty, and a most winning
sweetness of manner. Mary was the daughter of a man who had seen
better days; but he was ruined by the incursions of the English
borderers; and both he and her mother dying soon after, Mary was
left a helpless orphan in the twentieth year of her age. Her beauty
procured her many admirers; and her unprotected state (for she had
no relations in Annandale) left her exposed to the insidious
temptations of unprincipled villainy; but they soon discovered that
neither flattery, bribes, nor the fairest promises, had the slightest
influence on her spotless mind. There were many, however, who
sincerely loved her, and made most honourable proposals; among
whom was Wallace Maxwell, perhaps the poorest of her admirers,
but who succeeded in gaining her esteem and affection. Mary and he
were fellow-servants to the farmer from whom his mother had her
cottage; and, on account of the troublesome state of the country,
Wallace slept every night in his mother’s house as her guardian and
protector. Mary and he were about the same age, both in the bloom
of youthful beauty; but both had discrimination to look beyond
external attractions; and, although they might be said to live in the
light of each other’s eyes, reason convinced them that the time was
yet distant when it would be prudent to consummate that union
which was the dearest object of their wishes.
A foray had been made by the English, in which their leader, the
son of a rich borderer, had been made prisoner, and a heavy ransom
paid to Sir John, the warden, for his release. This the avaricious
warden considered a perquisite of his office; and it accordingly went
into his private pocket. Soon after this, the party who had resolved
on ruining Wallace Maxwell for his threats of vengeance, took
advantage of a thick fog during the day, succeeded by a dark night, in
making an incursion on Annandale, principally for the purpose of
capturing the young man. By stratagem they effected their purpose;
and the widow’s cow, and Wallace her son, were both carried off as
part of the spoil. The youth’s life might have been in considerable
danger, had his capture not been discovered by the man who had
recently paid a high ransom for his own son, and he now took instant
possession of Wallace, resolving that he should be kept a close
prisoner till ransomed by a sum equal to that paid to the warden.
It would be difficult, if not impossible, to say whether the grief of
Widow Maxwell for her son, or that of Mary Morrison for her lover,
was greatest. But early in the ensuing morning the widow repaired to
Amisfield, related the circumstance to Sir John, with tears
beseeching him, as the plunderers were not yet far distant, to
despatch his forces after them, and rescue her son, with the property
of which she had been despoiled, for they had carried off everything,
even to her bed-clothes.
Wallace Maxwell had some time before incurred the warden’s
displeasure, whose mind was not generous enough either to forget or
forgive. He treated Marion with an indifference approaching almost
to contempt, by telling her that it would be exceedingly improper to
alarm the country about such a trivial incident, to which every
person in that quarter was exposed; and although she kneeled to
him, he refused to comply with her request, and proudly turned
away.
With a heavy and an aching heart, the widow called on Mary
Morrison on her way home to her desolate dwelling, relating the
failure of her application, and uttering direful lamentations for the
loss of her son; all of which were echoed by the no less desponding
maiden.
In the anguish of her distress, Mary formed the resolution of
waiting on the warden, and again urging the petition which had
already been so rudely rejected. Almost frantic, she hastened to the
castle, demanding to see Sir John. Her person was known to the
porter, and he was also now acquainted with the cause of her present
distress; she therefore found a ready admission. Always beautiful,
the wildness of her air, the liquid fire which beamed in her eyes, from
which tears streamed over her glowing cheeks, and the perturbation
which heaved her swelling bosom, rendered her an object of more
than ordinary interest in the sight of the warden. She fell at his feet
and attempted to tell her melancholy tale; but convulsive sobs stifled
her utterance. He then took her unresisting hand, raised her up, led
her to a seat, and bade her compose herself before she attempted to
speak.
With a faltering tongue, and eyes which, like the lightning of
heaven, seemed capable of penetrating a heart of adamant, and in all
the energy and pathos of impassioned grief, she told her tale,—
imploring the warden, if he ever regarded his mother, or if capable of
feeling for the anguish of a woman, to have pity on them, and
instantly exert himself to restore the most dutiful of sons, and the
most faithful of lovers, to his humble petitioners, whose gratitude
should cease only with their lives.
“You are probably not aware,” said he, in a kindly tone, “of the
difficulty of gratifying your wishes. Wallace Maxwell has rendered
himself the object of vengeance to the English borderers; and, before
now, he must be in captivity so secure, that any measure to rescue
him by force of arms would be unavailing. But, for your sake, I will
adopt the only means which can restore him, namely, to purchase his
ransom by gold. But you are aware that it must be high, and I trust
your gratitude will be in proportion.”
“Everything in our power shall be done to evince our gratitude,”
replied the delighted Mary, a more animated glow suffusing her
cheek, and her eyes beaming with a brighter lustre,—“Heaven reward
you.”
“To wait for my reward from heaven, would be to give credit to one
who can make ready payment,” replied the warden. “You, lovely
Mary, have it in your power to make me a return, which will render
me your debtor, without in any degree impoverishing yourself;”—and
he paused, afraid or ashamed to speak the purpose of his heart. Such
is the power which virgin beauty and innocence can exert on the
most depraved inclinations.
Although alarmed, and suspecting his base design, such was the
rectitude of Mary’s guileless heart, that she could not believe the
warden in earnest; and starting from his proffered embrace, she with
crimson blushes replied, “I am sure, sir, your heart could never
permit you so far to insult a hapless maiden. You have spoken to try
my affection for Wallace Maxwell; let me therefore again implore you
to take such measures as you may think best for obtaining his
release;” and a fresh flood of tears flowed in torrents from her eyes,
while she gazed wistfully in his face, with a look so imploringly
tender, that it might have moved the heart of a demon.
With many flattering blandishments, and much artful sophistry,
he endeavoured to win her to his purpose; but perceiving that his
attempts were unavailing, he concluded thus:—“All that I have
promised I am ready to perform; but I swear by Heaven, that unless
you grant me the favour which I have so humbly solicited, Wallace
Maxwell may perish in a dungeon, or by the hand of his enemies; for
he shall never be rescued by me. Think, then, in time, before you
leave me, and for his sake, and your own future happiness, do not
foolishly destroy it for ever.”
With her eyes flashing indignant fire, and her bosom throbbing
with the anguish of insulted virtue, she flung herself from his hateful
embrace, and, rushing from his presence, with a sorrowful and
almost bursting heart, left the castle.
Widow Maxwell had a mind not easily depressed, and although in
great affliction for her son, did not despair of his release. She was
ignorant of Mary’s application to the warden, and had been revolving
in her mind the propriety of seeking an audience of the king, and
detailing her wrongs, both at the hands of the English marauders and
Sir John. She was brooding on this when Mary entered her cottage,
and, in the agony of despairing love and insulted honour, related the
reception she had met from the warden. The relation confirmed the
widow’s half formed resolution, and steeled her heart to its purpose.
After they had responded each other’s sighs, and mingled tears
together, the old woman proposed waiting on her friend the farmer,
declaring her intentions, and, if he approved of them, soliciting his
permission for Mary to accompany her.
The warden’s indolent neglect of duty was a subject of general
complaint; the farmer, therefore, highly approved of the widow’s
proposal, believing that it would not only procure her redress, but
might be of advantage to the country. He urged their speedy and
secret departure, requesting that whatever answer they received
might not be divulged till the final result was seen; and next
morning, at early dawn, the widow and Mary took their departure for
Stirling. King James was easy of access to the humblest of his
subjects; and the two had little difficulty in obtaining admission to
the royal presence. Widow Maxwell had in youth been a beautiful
woman, and, although her early bloom had passed, might still have
been termed a comely and attractive matron, albeit in the autumn of
life. In a word, her face was still such as would have recommended
her suit to the king, whose heart was at all times feelingly alive to the
attraction of female beauty. But, on the present occasion, although
she was the petitioner, the auxiliary whom she had brought, though
silent, was infinitely the more powerful pleader; for Mary might be
said to resemble the half-blown rose in the early summer, when its
glowing leaves are wet with the dews of morning. James was so
struck with their appearance, that, before they had spoken, he
secretly wished that their petitions might be such as he could with

You might also like