AI ML Explained
AI ML Explained
https://gordianknot.stanford.edu
Artificial Intelligence/Machine Learning– Explained
Hundreds of billions in public and private capital is being invested in AI and Machine Learning
companies. The number of patents filed in 2021 is more than 30 times higher than in 2015 as
companies and countries across the world have realized that AI and Machine Learning will be a
major disruptor and potentially change the balance of military power.
Until recently, the hype exceeded reality. Today, however, advances in AI in several important
areas (here, here, here, here and here) equal and even surpass human capabilities.
Some specific defense related AI applications are listed later in this document.
That’s where we are today with Artificial Intelligence and Machine Learning. These technologies
will transform businesses and government agencies. Today, 100s of billions of dollars in private
capital have been invested in 1,000s of AI startups. The U.S. Department of Defense has created
a dedicated organization to ensure its deployment.
Artificial Intelligence (AI) - a catchall term used to describe “Intelligent machines” which can
solve problems, make/suggest decisions and perform tasks that have traditionally required
humans to do. AI is not a single thing, but a constellation of different technologies.
Deep Learning/Neural Nets – a subfield of machine learning. Neural networks make up the
backbone of deep learning. (The “deep” in deep learning
refers to the depth of layers in a neural network.) Neural
nets are effective at a variety of tasks (e.g., image
classification, speech recognition). A deep learning neural
net algorithm is given massive volumes of data, and a task to
perform - such as classification. The resulting model is
capable of solving complex tasks such as recognizing objects
within an image and translating speech in real time. In
reality, the neural net is a logical concept that gets mapped
onto a physical set of specialized processors. See here.)
Data Science – a new field of computer science. Broadly it encompasses data systems and
processes aimed at maintaining data sets and deriving meaning out of them. In the context of
AI, it’s the practice of people who are doing machine learning.
Data Scientists - responsible for extracting insights that help businesses make decisions.
They explore and analyze data using machine learning platforms to create models about
customers, processes, risks, or whatever they’re trying to predict.
Classic Computers
For the last 75 years computers (we’ll call these classic computers) have both shrunk to pocket
size (iPhones) and grown to the size of warehouses (cloud data centers), yet they all continued
to operate essentially the same way.
Machine Learning
In contrast to programming on classic computing with fixed rules, machine learning is just like it
sounds – we can train/teach a computer to “learn by example” by feeding it lots and lots of
examples. (For images a rule of thumb is that a machine learning algorithm needs at least 5,000
labeled examples of each category in order to produce an AI model with decent performance.)
Once it is trained, the computer runs on its own and can make predictions and/or complex
decisions.
Just as traditional programming has three steps - first coding a program, next compiling it and
then running it - machine learning also has three steps: training (teaching), pruning and
inference (predicting by itself.)
Machine Learning - Training
Unlike programing classic computers with explicit rules, training is the process of “teaching” a
computer to perform a task e.g. recognize faces, signals, understand text, etc. (Now you know
why you're asked to click on images of traffic lights, cross walks, stop signs, and buses or type
the text of scanned image in ReCaptcha.) Humans provide massive volumes of “training data”
(the more data, the better the model’s performance) and select the appropriate algorithm to
find the best optimized outcome.
(See the detailed “machine learning pipeline” later in this section for the gory details.)
By running an algorithm selected by a data scientist on a set of training data, the Machine
Learning system generates the rules embedded in a trained model. The system learns from
examples (training data), rather than being explicitly programmed. (See the “Types of Machine
Learning” section for more detail.) This self-correction is pretty cool. An input to a neural net
results in a guess about what that input is. The neural net then takes its guess and compares it
to a ground-truth about the data, effectively asking an expert “Did I get this right?” The
difference between the network’s guess and the ground truth is its error. The network
measures that error, and walks the error back over its model, adjusting weights to the extent
that they contributed to the error.)
Just to make the point again: The algorithms combined with the training data - not external
human computer programmers - create the rules that the AI uses. The resulting model is
capable of solving complex tasks such as recognizing objects it’s never seen before, translating
text or speech, or controlling a drone swarm.
(Instead of building a model from scratch you can now buy, for common machine learning
tasks, pretrained models from others and here, much like chip designers buying IP Cores.)
Inference can even occur locally on edge devices where physical devices meet the digital world
(routers, sensors, IOT devices), close to the source of where the data is generated. This reduces
network bandwidth issues and eliminates latency issues.
Neural Networks and Deep Learning differ from other types of Machine Learning algorithms in
that they have low explainability. They can generate a prediction, but it is very difficult to
understand or explain how it arrived at its prediction. This “explainability problem” is often
described as a problem for all of AI, but it’s primarily a problem for Neural Networks and Deep
Learning. Other types of Machine Learning algorithms – for example decision trees – have very
high explainability. The results of the five-year DARPA Explainable AI Program (XAI) are worth
reading here.
1
https://databricks.com/discover/pages/the-democratization-of-artificial-intelligence-and-deep-learning
followed by understanding images and videos (through Computer Vision) and analytics and
anomaly detection. For example:
Sentiment Analysis
An AI leverages deep natural language processing, text analysis, and computational linguistics
to gain insight into customer opinion, understanding of consumer sentiment, and
measuring the impact of marketing strategies. Examples: Brand24, MonkeyLearn
Hang on to your seat. We’re just at the beginning of the revolution. The next phase of AI,
powered by ever increasing powerful AI hardware and cloud clusters, will combine some of
these basic algorithms into applications that do things no human can. It will transform business
and defense in ways that will create new applications and opportunities.
Human-Machine Teaming
Applications with embedded intelligence have already begun to appear thanks to massive
language models. For example - Copilot as a pair-programmer in Microsoft Visual Studio
VSCode. It’s not hard to imagine DALL-E 2 as an illustration assistant in a photo editing
application, or GPT-3 as a writing assistant in Google Docs.
AI in Medicine
AI applications are already appearing in radiology, dermatology, and oncology. Examples: IDx-
DR, OsteoDetect, Embrace2. AI Medical image identification can automatically detect lesions,
and tumors with diagnostics equal to or greater than humans. For Pharma, AI will power drug
discovery design for finding new drug candidates. The FDA has a plan for approving AI software
here has a list of AI-enabled medical devices here.
Autonomous Vehicles
Harder than it first seemed, but car companies like Tesla will eventually get better than human
autonomy for highway driving and eventually city streets.
Decision support
Advanced virtual assistants can listen to and observe behaviors, build and maintain data
models, and predict and recommend actions to assist people with and automate tasks that
were previously only possible for humans to accomplish.
Marketing
AI applications are already appearing in real-time personalization, content and media
optimization and campaign orchestration to augment, streamline and automate marketing
processes and tasks constrained by human costs and capability, and to uncover new customer
insights and accelerate deployment at scale.
AI in National Security2
Much like the dual-use/dual-nature of classical computers AI developed for commercial
applications can also be used for national security.
2
https://www.nscai.gov/2021-final-report/
AI/ML on the Battlefield
AI will enable new levels of performance and autonomy for weapon systems. Autonomously
collaborating assets (e.g., drone swarms, ground vehicles) that can coordinate attacks, ISR
missions, & more.
Fusing and making sense of sensor data (detecting threats in optical /SAR imagery, classifying
aircraft based on radar returns, searching for anomalies in radio frequency signatures, etc.)
Machine learning is better and faster than humans in finding targets hidden in a high-clutter
background. Automated target detection and fires from satellite/UAV.
For example, an Unmanned Aerial Vehicle (UAV) or Unmanned Ground Vehicles with on board
AI edge computers could use deep learning to detect and locate concealed chemical, biological
and explosives threats by fusing imaging sensors and chemical/biological sensors.
Other examples include:
Given sequences of observations of unknown radar waveforms from arbitrary emitters without
a priori knowledge, use machine learning to develop behavioral models to enable inference of
radar intent and threat level, and to enable prediction of future behaviors.
For objects in space, use machine learning to predict and characterize a spacecrafts possible
actions, its subsequent trajectory, and what threats it can pose from along that trajectory.
Predict the outcomes of finite burn, continuous thrust, and impulsive maneuvers.
AI/ML in Collection
The front end of intelligence collection platforms has created a firehose of data that have
overwhelmed human analysts. “Smart” sensors coupled with inference engines that can pre-
process raw intelligence and prioritize what data to transmit and store –helpful in degraded or
low-bandwidth environments.
AI can also be used to automate data conversion such as translations and decryptions,
accelerating the ability to derive actionable insights.
But because a large percentage of it is open-source AI is not limited to nation states, AI-
powered cyber-attacks, deepfakes and AI software paired with commercially available drones
can create “poor-man’s smart weapons” for use by rogue states, terrorists and criminals.
closer to home. Because of AI, adversaries will be able to act with
micro-precision, but at macro-scale and with greater speed. They will
and to target individuals in new ways. AI will also help create precisely
Graphic 1.1: How AI is Transforming the Threat Landscape
AI/ML Cyberwarfarebiological agents. And adversaries will manipulate the AI
engineered
AI-enabled malware can learn and adapt to a system’s defensive measures, or, conversely, AI-
systems we will rely upon.
enabled cyber-defensive tools can proactively locate and address network anomalies and
system vulnerabilities.
AI – Friend or Foe?
Current Threats New Threats Threats TO AI Stacks Future Threats
Advanced BY AI Systems FROM AI Systems Themselves VIA AI Systems
Transforming the
hreat L andscape AI transforms existing AI creates new AI itself is also a new Examples of potential
range and reach of threats threat phenomena attack surface threats to keep in view
AI-driven malware, where a malicious logic embeds machine learning methods and models to
automatically: (i) probe the target system for inferring
actionable intelligence (e.g. system configuration or
operational patterns) and (ii) customize the attack
• First, digital dependence in all walks of life increases vulnerabilities to cyber intrusion
payload accordingly
across (e.g. determine
every segment the most
of our society: opportuneuniversities, government, private
corporations,
time toorganizations,
execute the payload
and the homes of individual impact).
so to maximize the citizens. In parallel, new sensors have
flooded the modern world. The internet of things (IoT), cars, phones, homes, and social
Attacksmedia platforms
Against collect streams
AI - Adversarial AI of data, which can then be fed into AI systems that can
identify, target, and manipulate
As AI proliferates, defeating adversariesor coerce
will be our citizens.on
predicated
2
defeating their AI and vice versa.
As Neural Networks
• Second, takenon-state
state and over sensor processing
adversaries areand triage tasks,
challenging the aUnited
human maybelow
States only be alerted
if the AIthe
deems it suspicious.
threshold Therefore,
of direct military we only need
confrontation to defeat
by using cyberthe AI to espionage,
attacks, evade detection, not
necessarily a human.and political warfare, and financial instruments. Adversaries do not
psychological
need AI to conduct widespread cyber attacks, exfiltrate troves of sensitive data about
American
Adversarial citizens,
attacks interfere
against in our
AI fall into elections,
three types:or bombard us with malign information on
• Data misclassification- to generate false positive or negative results
• Synthetic data generation-to feed false information
• Data analysis – for AI-assisted classical attack generation
AI Attack Surfaces
Electronic Attack (EA), Electronic Protection (EP), Electronic Support (ES) all have analogues in
the AI algorithmic domain. In the future, we may play the same game about the “Algorithmic
Spectrum,” denying our adversaries their AI capabilities while defending ours. Other can steal
or poison our models or manipulate our training data.
What Makes AI Possible Now?3
Of course more data only helps if the data is relevant to your desired application. Training data
needs to match the real-world operational data very, very closely to train a high-performing AI
model.
3
https://www.ai.mil/docs/Understanding%20AI%20Technology.pdf
The downside is that, unlike past DoD technology development - where the DoD leads it, can
control it, and has the most advanced technology (like stealth and electronic warfare), in most
cases the DoD will not have the most advanced algorithms or models. The analogy for AI is
closer to microelectronics than it is EW. The path forward for the DoD should be supporting
open research, but optimizing on data set collection, harvesting research results, and fast
application.
Instead of investing in massive amounts of computers needed for training companies can use
the enormous on-demand, off-premises hardware in the cloud (e.g. Amazon AWS, Microsoft
Azure) for both training machine learning models and deploying inferences.
In addition, AI is easily fooled by out-of-domain data (things it hasn’t seen before). This can
happen by “overfitting” - when a model trains for too long on sample data or when the model is
too complex, it can start to learn the “noise,” or irrelevant information, within the dataset.4
When the model memorizes the noise and fits too closely to the training set, the model
becomes “overfitted,” and it is unable to generalize well to new data. If a model cannot
generalize well to new data, then it will not be able to perform the classification or prediction
tasks it was intended for. However, if you pause too early or exclude too many important
features, you may encounter the opposite problem, and instead, you may “underfit” your
model. Underfitting occurs when the model has not trained for enough time, or the input
variables are not significant enough to determine a meaningful relationship between the input
and output variables.
AI is not very good at creating a strategy (unless it can pull from previous examples and mimic
them, but then fails with the unexpected.) And it lacks generalized intelligence e.g. that can
generalize knowledge and translate learning across domains.
All of these are research topics actively being worked on. Solving these will take a combination
of high-performance computing, advanced AI/ML semiconductors, creative machine learning
implementations and decision science. Some may be solved in the next decade, at least to a
level where a human can’t tell the difference.
Just as classic computers were applied to a broad set of business, science and military
applications, AI is doing the same. AI is exploding not only in research and infrastructure (which
go wide) but also in the application of AI to vertical problems (which go deep and depend more
than ever on expertise). Some of the new applications on the horizon include Human
AI/Teaming (AI helping in programming and decision making), smarter robotics and
autonomous vehicles, AI-driven drug discovery and design, healthcare diagnostics, chip
electronic design automation, and basic science research.
4
https://www.ibm.com/cloud/learn/overfitting
Advances in language understanding are being pursued to create systems that can summarize
complex inputs and engage through human-like conversation, a critical component of next-
generation teaming.
An example of this is DARPA’s ACE (Air Combat Evolution) program that is developing a
warfighting concept for combined arms using a manned and unmanned systems. Humans will
fight in close collaboration with autonomous weapon systems in complex environments with
tactics informed by artificial intelligence.
A Once-in-a-Generation Event
Imagine it’s the 1980’s and you’re in charge of an intelligence agency. SIGINT and COMINT were
analog and RF. You had worldwide collection systems with bespoke systems in space, air,
underwater, etc. And you wake up to a world that shifts from copper to fiber. Most of your
people, and equipment and equipment are going to be obsolete, and you need to learn how to
capture those new bits. Almost every business processes needed to change, new organizations
needed to be created, new skills were needed, and old ones were obsoleted. That’s what AI/ML
is going to do to you and your agency.
The primary obstacle to innovation in national security is not technology, it is culture. The DoD
and IC must overcome a host of institutional, bureaucratic, and policy challenges to adopting
and integrating these new technologies. Many parts of our culture are resistant to change,
reliant on traditional tradecraft and means of collection, and averse to risk-taking, (particularly
acquiring and adopting new technologies and integrating outside information sources.)
History tells us that late adopters fall by the wayside as more agile and opportunistic
governments master new technologies.
Carpe Diem.
Some machine learning models can have trillions of parameters and require a massive number
of specialized AI chips to run. Edge computers are significantly less powerful than the massive
compute power that’s located at data centers and the cloud. They need low power and
specialized silicon.
Matrix multiplication plays a big part in neural network computations, especially if there are
many layers and nodes. Graphics Processing Units (GPUs) contain 100s or 1,000s of cores that
can do these multiplications simultaneously. And neural networks are inherently parallel which
means that it’s easy to run a program across the cores and clusters of these processors. That
makes AI chips 10s or even 1,000s of times faster and more efficient than classic CPUs for
training and inference of AI algorithms. State-of-the-art AI chips are dramatically more cost-
effective than state-of-the-art CPUs as a result of their greater efficiency for AI algorithms.
Cutting-edge AI systems require not only AI-specific chips, but state-of-the-art AI chips. Older AI
chips incur huge energy consumption costs that quickly balloon to unaffordable levels. Using
older AI chips today means overall costs and slowdowns at least an order of magnitude greater
than for state-of- the-art AI chips.
Cost and speed make it virtually impossible to develop and deploy cutting-edge AI algorithms
without state-of-the-art AI chips. Even with state-of-the-art AI chips, training a large AI
algorithm can cost tens of millions of dollars and take weeks to
complete. With general-purpose chips like CPUs or older AI chips,
this training would take much longer and cost orders of
magnitude more, making staying at the R&D frontier impossible.
Similarly, performing inference using less advanced or less
specialized chips could involve similar cost overruns and take
orders of magnitude longer.
In addition to off-the-shelf AI chips from Nvidia, Xlinix and Intel, large companies like Facebook,
Google, Amazon, have designed their own chips to accelerate AI. The opportunity is so large
that there are hundreds of AI accelerator startups designing their own chips, funded by 10’s of
billions of venture capital and private equity. None of these companies own a chip
manufacturing plant (a fab) so they all use a foundry (an independent company that makes
chips for others) like TSMC in Taiwan (or SMIC in China for Defense related silicon.)
A Sample of AI GPU, FPGA and ASIC AI Chips and Where They’re Made
Analog Machine Learning AI chips use analog circuits to do the matrix multiplication in memory.
The result is extremely low power AI for always-on sensors. Examples: Mythic (AMP,) Aspinity
(AML100,) Tetramem.
Optical (Photonics) AI Computation promise performance gains over standard digital silicon,
and some are nearing production. They use intersecting coherent light beams rather than
switching transistors to perform matrix multiplies. Computation happens in picoseconds and
requires only power for the laser. (Though off-chip digital transitions still limit power savings.)
Examples: Lightmatter, Lightelligence, Luminous, Lighton.
AI Chips in Cameras for facial recognition, surveillance. These inference chips require a balance
of processing power with low power. Putting an AI chip in each camera reduces latency and
bandwidth. Examples: Hailo-8, Ambarella CV5S, Quadric (Q16), (RealTek 3916N).
Ultralow-Power AI Chips Target IoT Sensors - IoT devices require very simple neural networks
and can run for years on a single battery. Example applications: Presence detection, wakeword
detection, gunshot detection... Examples: Syntiant (NDP,) Innatera, BrainChip,,
One Last Thing - Non-Nvidia AI Chips and the “Nvidia Software Moat”
New AI accelerator chips most deal with the software moat that Nvidia has built around their
GPU’s. As popular AI applications and frameworks are built on Nvidia CUDA software platform,
if new AI Accelerator vendors want to port these applications to their chips they have to build
their own drivers, compiler, debugger, and other tools.
Details of a machine learning pipeline
This is a sample of the workflow (a pipeline) data scientists use to develop, deploy and maintain
a machine learning model (see the detailed description here.)
The Types of Machine Learning5 – skip this section if you want to believe it’s
magic.
1. Supervised Learning
2. Unsupervised Learning
3. Semi-supervised Learning
4. Reinforcement Learning
5
https://www.ai.mil/docs/Understanding%20AI%20Technology.pdf
different ways. A basic understanding of these strengths, weaknesses, and failure
modes can help you understand whether or not your particular problems are a
good fit for a Machine Learning AI solution.
WHAT ARE THE DIFFERENT TYPES OF MACHINE LEARNING? HOW DO THEY DIFFER?
Like Artificial Intelligence, Machine Learning is also an umbrella term, and there
are four different broad families of Machine Learning algorithms. There are also
many different subcategories and combinations under these four major families,
but a good understanding of these four broad families will be sufficient for the
vast majority of DoD employees, including senior leaders in non-technical roles.
Supervised Learning The four categories – Figure 3. Labeled and Unlabeled Training Data
• A “supervisor” (a human or a software explained
system)more accurately
the following page –
on
labels each of the training data
inputs with its correct associated output
differ based on what
types of data their
• Note that pre-labeled data is only required forcan
algorithms thework
with. However, the
training data that
the algorithm uses to train the AI modeimportant distinction
is not whether the
• In operation in the inference phase thedataAI willis beaudio,
generating its own
images, text, or
labels, the accuracy of which will depend on the AI’s
numbers. Rather, the training
important distinction
• Supervised Learning can achieve extremely high
is whether or notperformance, but they
the training data is labeled require
or unlabeled very
and how the large,
system
receives its data inputs. Figure 3 provides a simple illustration of labeled and
labeled datasets unlabeled training data for a classifier of images of cats and dogs.
Unsupervised Learning
• These algorithms can analyze and cluster unlabeled data sets. They discover hidden
patterns in data without the need for human intervention (hence, they are “unsupervised”)
• They can extract features from the data without a label for the results
• For an image classifier, an unsupervised algorithm would not identify the image as a “cat”
or a “dog.” Instead, it would sort the training dataset into various groups based on their
similarity
• Unsupervised Learning systems are often less predictable, but as unlabeled data is usually
more available than labeled data, they are important
• Unsupervised algorithms are useful when developers want to understand their own
datasets and see what properties might be useful in either developing automation or
change operational practices and policies
• They still require some human intervention for validating the output
Unsupervised Machine Learning - Categories and Examples Understanding Artificial Intelligence Technology 13
• Clustering groups unlabeled data based on their similarities or differences. For example, K-
means clustering algorithms assign similar data pointsusing
into
Figure groups,
4 depicts where
the differences
an image analysis example.
betweenthe
SupervisedK value
and Unsupervised algorithms
represents the size of the grouping and granularity. This technique is helpful for market
Figure 4. Illustrated Example of Supervised and Unsupervised Algorithms
Semi-Supervised Learning
• “Semi- Supervised” algorithms combine techniques from Supervised and Unsupervised
algorithms for applications with a small set of labeled data and a large set of unlabeled data.
• In practice, using them leads to exactly what you would expect, a mix of some of both of the
strengths and weaknesses of Supervised and Unsupervised approaches
Understanding Artificial Intelligence Technology 14
• Typical algorithms are extensions to other flexible methods that make assumptions about
environment (which might be the real world or a simulated environment) and
performing goal-directed actions (trying to maximize receipt of “rewards”). Four
aspects of Reinforcement Learning are notably distinct from Supervised and
how to model the unlabeled data. An example is Unsupervised Learning:
Generative Adversarial Networks trained on 1) Data is gathered by the AI agent itself in the course of its interacting with
the environment and perceiving stated changes. For example, an AI agent
photographs can generate new photographs that look playing a digital game of chess makes moves and perceives changes in
the board based on its moves.
2) The rewards are input data received by the agent when certain criteria are
authentic to human observers (deep fakes) satisfied. For example, a Reinforcement Learning AI agent in chess will
make many moves before each win or loss. These criteria are typically
unknown to the agent at the outset of training.
3) Rewards often contain only partial information. A reward like a win in chess
Reinforcement Learning conveys that some inputs must have been good, but it doesn’t clearly
signal which inputs were good and which were not.
4) The system is learning an action policy for taking actions to maximize its
• Training data is collected by an autonomous, self-directed AI agent as it perceives its
receipt of cumulative rewards.
environment and performs goal-directed actions Figure 5: Simplified Reinforcement Learning Diagram
Sources:
• Understanding AI Technology: Greg Allen, Chief of Strategy and Communications Joint
Artificial Intelligence Center (JAIC), Department of Defense
https://www.ai.mil/docs/Understanding%20AI%20Technology.pdf
• AI, Machine Learning, Deep Learning Explained Simply: Jun Wu
https://towardsdatascience.com/ai-machine-learning-deep-learning-explained-simply-
7b553da5b960
• The Democratization of Artificial Intelligence and Deep Learning: Databricks
https://databricks.com/discover/pages/the-democratization-of-artificial-intelligence-and-
deep-learning
• Final Report: National Security Report on Artificial Intelligence https://www.nscai.gov/wp-
content/uploads/2021/03/Full-Report-Digital-1.pdf
• A Beginners Guide to Neural Nets and Deep Learning: Pathmind
https://wiki.pathmind.com/neural-network