AI and Machine Learning Overview
Artificial Intelligence and Machine Learning: Comprehensive Study Notes
1. Artificial Intelligence: Meaning and Scope
Artificial intelligence (AI) is a broad field concerned with developing computer systems that perform tasks associated with human intelligence. These tasks can include:
Perception: Detecting and interpreting signals, images, sounds, or other inputs.
Classification: Assigning an input to a category or label.
Learning: Improving performance through experience or data.
Abstraction: Identifying general concepts that apply across different situations.
Reasoning: Drawing conclusions, explaining decisions, or applying logical rules.
Action: Selecting and carrying out responses in an environment.
AI combines algorithms, data, computing systems, human expertise, and methods for deploying systems safely and effectively.
Narrow AI and General AI
Two concepts must be distinguished:
Narrow AI: The theory and development of computer systems that perform specific tasks augmenting human intelligence. A narrow AI system may perceive, classify, learn, abstract, reason, or act within a limited domain.
General AI: A much broader concept involving full autonomy—the ability of a system to operate independently across a wide range of tasks and contexts.
Most current AI applications are examples of narrow AI. They are designed for particular functions rather than general-purpose human-level autonomy.
Key distinction: Narrow AI performs selected intelligent tasks, while general AI refers to broad, fully autonomous intelligence.
2. Why AI Has Advanced Rapidly
AI has existed as a research field for several decades, but its recent resurgence is largely the result of the convergence of three major technical developments:
Big Data
Modern systems generate and store enormous quantities of data. This includes:
Sensor measurements
Network logs
Images, audio, and video
Social media and internet content
Scientific and engineering measurements
Metadata describing how and when data was collected
Large data sets give learning algorithms more examples from which to identify patterns.
Computing Power
Modern computing hardware makes it possible to process large data sets and train complex models. Important developments include:
More powerful central processing units
Graphics processing units optimized for parallel computation
Specialized AI processors
Cloud and high-performance computing systems
Improved storage and data-access technologies
Machine Learning Algorithms
Research in statistics, computer science, and machine learning has produced algorithms capable of learning patterns from data rather than relying entirely on manually written rules.
Economic Incentives
A further factor is the ability to generate economic value from AI. Applications such as advertising, image labeling, recommendation systems, automation, and data analysis have created strong incentives for investment and deployment.
AI’s recent growth is best understood as the interaction of data, computing, algorithms, and economic value.
3. The Canonical AI Architecture
An AI system is more than its learning algorithm. It is an end-to-end pipeline that connects data sources to users, decisions, and missions.
A generalized AI architecture can be represented as:
Sensors and data sources → Data conditioning → Information → Algorithms → Knowledge → Human-machine teaming → Insight and mission execution
Sensors and Data Sources
Data can enter the system through:
Physical sensors
Network logs
Databases
Speech and other signals
Internet sources
Reports and documents
Social media
Metadata associated with sensors or observations
Sources may be structured, unstructured, or somewhere between the two.
Data Conditioning
Raw data is processed and organized so that algorithms can use it effectively. This stage may include:
Storing data in an appropriate infrastructure
Indexing and organizing data
Converting unstructured data into structured or semi-structured representations
Cleaning errors and inconsistencies
Identifying missing values
Reducing dimensionality
Clustering or recognizing patterns
Detecting outliers
Labeling examples
Identifying biases and collection problems
Data conditioning is often one of the most time-consuming parts of an AI project.
Information
Conditioned data is transformed into information: an organized and usable representation of observations, measurements, or features.
Algorithms
One or more algorithms analyze the information. Although neural networks receive considerable attention, many other algorithmic approaches are useful, including:
Expert systems
Bayesian methods
Support vector machines
Statistical models
Clustering methods
Evolutionary algorithms
Graph-processing methods
Neural networks
Knowledge
Algorithmic results are interpreted as knowledge about the problem. Knowledge may consist of detected patterns, classifications, predictions, relationships, or inferred system states.
Human-Machine Teaming
The knowledge produced by the AI system is combined with human judgment, oversight, or decision-making. The machine may:
Make a recommendation
Filter information
Present a prediction
Identify relevant evidence
Act automatically
Operate under human supervision
Insight and Mission Execution
When machine-generated knowledge is combined with human understanding and context, it can become insight. This insight supports the mission or practical objective for which the AI system was developed.
Computing as the Foundation
All components of the architecture depend on modern computing infrastructure, including processors, memory, storage, networking, software, and data-access systems.
Robust AI as an Additional Layer
AI systems, especially those used in important or high-consequence settings, must also include a layer of robust AI. This layer addresses:
Explainability
Performance metrics
Bias assessment
Verification and validation
Security
Policy
Ethics
Safety
Training
4. The Historical Evolution of AI
AI has developed through several broad waves. These waves should not be viewed as strict replacements for one another. Each remains useful depending on the available data, computing power, expert knowledge, and requirements for explanation.
Wave 1: Reasoning-Based Systems
The earliest major wave emphasized handcrafted knowledge and explicit reasoning.
Main Characteristics
Human experts encoded rules into a computer system.
The system applied those rules to new situations.
Performance depended heavily on the quality and completeness of the encoded knowledge.
These systems were generally strong at reasoning but limited in perception, learning, and abstraction.
Expert Systems
An expert system is an AI system that represents human expertise through rules, logic, or a knowledge base.
Examples include:
Tax software that applies rules created by tax experts
Early autonomous vehicles using handcrafted finite-state-machine states
Systems that diagnose conditions using explicit decision rules
A finite-state-machine-based vehicle might contain manually designed states such as “stopped,” “turning,” or “moving,” along with rules specifying when transitions between states should occur.
Strengths
Expert systems remain useful when:
Data is scarce
Computing resources are limited
Expert knowledge is available
Explainability is especially important
Decisions must be traced to understandable rules
A major advantage is interpretability: the system can often explain its conclusion by identifying the rules it applied.
Limitations
Rules are expensive to create and maintain.
The system may fail when situations differ from those anticipated by the experts.
It is difficult to encode every relevant detail of a complex environment.
The system does not automatically learn all of the underlying patterns from data.
Wave 2: Statistical or Learning-Based Systems
The second wave became possible as data collection increased and statistical learning methods improved.
Main Characteristics
Less detailed expert knowledge is manually encoded.
Data is used to learn rules, parameters, or relationships.
Systems generally improve in perception and learning.
Abstraction and explainable reasoning remain limited.
These systems are sometimes described as data-enabled non-expert systems. A certain amount of high-level expert knowledge may still be included, but the details are learned from examples.
Examples
In speech processing, a system might assume that speech follows a particular statistical structure, such as a Gaussian mixture model, while learning the specific parameters from data.
In autonomous vehicles, designers might define the possible vehicle states but allow the machine-learning system to learn:
When a state transition should occur
What observations indicate a transition
How the vehicle’s behavior varies across situations
Wave 3: Contextual Learning and Adaptation
A later wave focuses on systems that can use context to interpret information and adapt their behavior.
For example, a system may identify an object as a chair even when its position, surroundings, or appearance change. Context can include:
Nearby objects
Spatial relationships
The environment
Prior observations
The current task
The sequence of events
The defining goal is for the system to automatically abstract and reason using context. Much current AI research may be viewed as approaching this stage, although many deployed systems still primarily belong to the later part of the learning wave.
Wave 4: Abstraction
The most advanced proposed wave involves genuine abstraction.
An abstracting system would learn the functional or conceptual meaning of an object rather than merely memorizing its physical features.
For example:
A system that memorizes that a table has legs and a flat surface has learned physical characteristics.
A system that understands that a table is an object used to place things on has learned a more abstract function.
That functional concept could then be transferred to unfamiliar objects or domains.
There is comparatively less mature work in this area, but abstraction is important for systems that must generalize knowledge across domains.
5. Choosing an AI Approach: The Three Important Dials
The choice of AI technique depends heavily on three resources:
Computing power: How much processing, memory, and storage are available?
Data: How much data is available, and how much of it is labeled and reliable?
Embedded knowledge: How much expert knowledge can be encoded into the system?
High Expert Knowledge, Limited Data and Computing
An expert system may be appropriate when:
Data is limited
Labels are unavailable
Computing resources are constrained
Experts can describe the relevant rules
Transparent explanations are required
High Data and Computing, Limited Embedded Knowledge
Neural networks and many statistical learning methods are useful when:
Large quantities of data are available
Significant computing resources are available
Designers prefer the system to learn detailed relationships
It is difficult to manually specify all relevant rules
Intermediate Approaches
Many systems combine:
High-level expert rules
Statistical assumptions
Machine-learned parameters
Domain-specific features
Multiple algorithmic techniques
For example, a designer may tell an algorithm the general form of a probability distribution while allowing it to learn the exact parameters from data.
The “best” algorithm is not universal. It depends on the balance of data, computation, domain knowledge, and mission requirements.
6. Data as a Critical Driver of AI
AI discussions often emphasize algorithms, but high-quality data can be equally or more important to major breakthroughs.
Importance of Canonical Data Sets
A canonical data set is a well-structured, well-documented, and often well-labeled collection of data that can be used consistently by researchers and developers.
Such data sets are valuable because they:
Provide common benchmarks
Allow researchers to compare algorithms
Reduce repeated data-collection effort
Make patterns easier to study
Enable reproducible experiments
Help the wider AI community build on previous work
The availability of an important data set may lead to breakthroughs more quickly than the initial publication of an algorithm. Therefore, creating and sharing high-quality data can have broad benefits.
7. Data Conditioning and Data Preparation
Structured and Unstructured Data
Structured Data
Structured data follows a known organization or format. Examples include:
Sensor measurements with defined fields
Network logs
Metadata
Regularly sampled signals
Database tables
Unstructured Data
Unstructured data does not naturally conform to a fixed schema. Examples include:
Internet content
Reports
Social media posts
Documents
Some sensor outputs
Audio, images, and other complex signals
The distinction is not always absolute. Speech, for example, may be treated as structured when it is collected through a known acquisition process with consistent sampling and metadata. The same speech data may be considered unstructured when collected in an uncontrolled environment.
Data Infrastructure
Infrastructure and databases may provide:
Indexing: Rapidly locating relevant data
Organization: Arranging data into usable structures
Schema or structure: Defining how information is represented
Domain-specific access languages: Allowing users to query data using familiar concepts
High-performance access: Retrieving large quantities of data efficiently
Declarative interfaces: Specifying what data is wanted without specifying every detail of how it should be retrieved
Converting unstructured data into structured or semi-structured form can unlock significant value.
Data Volume and Data Value
In some data environments, unstructured data may represent approximately 90% of the total volume, with structured metadata representing approximately 10%. However, the structured portion may provide most of the currently extracted value because it is easier to analyze.
The large unstructured portion often remains underused because:
It is difficult to search
It lacks consistent organization
It is not readily compatible with existing tools
Its relevant features have not been extracted
Data Curation
Data curation is the process of preparing data for analysis and learning. It may involve:
Exploring the data
Identifying missing or incomplete values
Detecting errors
Finding unusual observations
Removing irrelevant data
Reducing dimensionality
Clustering observations
Recognizing important patterns
Correcting inconsistent formats
Assessing the collection process
Identifying bias
Data curation requires knowledge of:
What the data represents
How it was collected
What the intended application is
Which errors or omissions are plausible
Which features are relevant to the task
Initial Data Exploration
Before applying complex algorithms, the data should be inspected. Initial exploration may be as simple as viewing rows and columns in a spreadsheet or as advanced as examining distributions, correlations, and sensor behavior.
Exploration can reveal:
Constant or suspicious values
Missing fields
Incomplete records
Incorrect units
Unexpected ranges
Duplicate observations
Collection artifacts
If a sensor reports exactly the same value for every measurement, it may be functioning correctly—or it may be broken. Data exploration helps determine which interpretation is appropriate.
Data Labeling
Data labeling assigns the correct output, class, or interpretation to an observation. Labels are especially important in supervised learning.
The labeling process should also examine:
Errors in the source data
Biases in collection
Ambiguous examples
Incomplete labels
Inconsistent judgments
Whether the labels represent the actual phenomenon of interest
Labeling should be guided by an understanding of the domain and the intended machine-learning task.
Multiple Modalities
AI systems may use either a single data modality or multiple modalities.
Examples of modalities include:
Audio
Text
Images
Video
Sensor measurements
Network traffic
Metadata
Combining modalities can provide more information than using one alone. For example, audio and text may be used together as input features. However, multimodal systems must address difficulties such as:
Different data formats
Different sampling rates
Inconsistent timestamps
Missing observations
Data collected by separate systems
Methods for aligning and fusing information
8. Machine-Learning Algorithm Taxonomies
Machine learning includes many different types of algorithms. Neural networks represent only one part of the field.
Five Tribes of Machine Learning
One taxonomy divides machine-learning approaches into five broad groups:
Symbolists: Use symbols, logic, and explicit rules. Expert systems are an example.
Bayesians: Use probability and statistical inference. Naive Bayes is an example.
Analogizers: Learn relationships based on similarity or geometric separation. Support vector machines are an example.
Connectionists: Use networks of interconnected computational units. Deep neural networks are an example.
Evolutionaries: Use processes inspired by biological evolution. Genetic programming is an example.
Each group has strengths and weaknesses. Selection should be based on the application, data, computing resources, and amount of domain knowledge available.
Relationship Between AI, Machine Learning, and Neural Networks
These terms represent nested categories:
Artificial intelligence: The broadest field, including systems that perform intelligent tasks.
Machine learning: A subfield of AI in which systems improve from experience or data.
Neural networks: One family of machine-learning methods.
Deep neural networks: Neural networks with substantial depth, often involving many hidden layers or complex architectures.
Not all AI systems use machine learning. Expert systems and manually designed knowledge-based systems are AI systems, but they may not learn from data.
Not all machine-learning systems are neural networks. Bayesian methods, clustering, support vector machines, and evolutionary methods are also machine-learning approaches.
9. Modern Computing Technologies for AI
The resurgence of AI depends partly on improvements in computing hardware.
CPUs and GPUs
Central processing units (CPUs): General-purpose processors suitable for a wide range of tasks.
Graphics processing units (GPUs): Highly parallel processors that are particularly effective for many machine-learning operations.
Both are widely available, and extensive software supports them.
Custom Architectures
As traditional improvements associated with Moore’s law slow down, researchers and engineers increasingly design hardware specifically for particular computational workloads.
Examples include:
Tensor Processing Units (TPUs): Specialized processors designed for tensor operations common in neural networks.
Graph processors: Processors designed to efficiently represent and manipulate graph-structured data.
Neuromorphic processors: Hardware inspired by the architecture and operation of biological brains.
Custom architectures may optimize:
Data movement
Memory access
Energy consumption
Parallel computation
The layout of algorithmic operations
Neuromorphic Computing
Neuromorphic computing attempts to imitate aspects of biological neural systems.
Commonly associated characteristics include:
Brain-inspired organization
Event-driven or clockless computation
Specialized memory architectures
Computation closely integrated with data storage
Efficient responses to sparse or changing signals
Neuromorphic systems are an active research area rather than a single standardized technology.
Quantum Computing
Quantum computing has shown early results in areas such as solving certain linear systems of equations. However, its practical role in AI remains uncertain and unproven. Its potential application to AI is still being investigated.
Comparing Computing Systems
Computing systems should not be ranked simply as “better” or “worse.” Their usefulness depends on the application.
Important comparison factors include:
Power consumption
Peak performance
Energy efficiency
Numerical precision
Physical form factor
Memory capacity
Data movement requirements
Application workload
Performance may be expressed in operations per second, while efficiency may be expressed in operations per watt.
A data-center application may tolerate high power use in exchange for high performance. An embedded system, such as a drone processor, may require low power consumption and compact hardware even if its peak performance is lower.
10. Robust Artificial Intelligence
Robust AI addresses whether an AI system can be trusted, understood, secured, and safely used.
The need for robust AI depends heavily on two factors:
Consequence of action: How harmful is an incorrect decision?
Confidence in the machine: How reliable is the system’s decision-making?
Low Consequence and High Machine Confidence
These applications are strong candidates for automation.
Examples include:
Spam filtering
Routine assembly-line operations
Some forms of image labeling
High-volume tasks where mistakes have limited consequences
High Consequence and Low Machine Confidence
These applications require substantial human involvement.
Examples may include:
Decisions involving life or death
Certain medical decisions
National security applications
Kinetic operations
Legal or ethically sensitive decisions
Intermediate Region: Human Augmentation
Many practical AI systems fall between full automation and full human control. In these systems, AI augments human decision-making by:
Filtering large volumes of information
Prioritizing documents
Highlighting suspicious events
Providing recommendations
Reducing a thousand items to ten for human review
Presenting evidence for a human decision
As system confidence increases, some tasks may shift toward greater automation, with humans retaining a supervisory role.
Explainable AI
Explainable AI concerns a system’s ability to describe its decisions or behavior in an interpretable way.
Explanations are especially important when:
Decisions affect people
Operators must trust the result
Errors must be investigated
Regulations require justification
Experts need to validate the reasoning
Metrics
Accuracy alone may not adequately describe system performance. Appropriate metrics depend on the application and may evaluate:
Precision
Recall
False positives
False negatives
Calibration
Robustness
Fairness
Resource use
Latency
Safety-related outcomes
Verification and Validation
Verification: Determines whether the system was built correctly according to its specifications.
Validation: Determines whether the system solves the intended real-world problem and produces acceptable results.
Some systems may not need highly interpretable decisions if they can be rigorously shown to produce reliable outputs for relevant inputs.
Security
Security must protect the:
Confidentiality of data and models
Integrity of data, weights, biases, and outputs
Availability of the system and its services
Security concerns can involve attacks that manipulate inputs, corrupt training data, steal models, alter model parameters, or interfere with system operation. Counter-AI methods are examples of threats that robust AI security must address.
Policy, Ethics, Safety, and Training
AI deployment is also governed by nontechnical considerations:
Policy may determine which decisions require human involvement.
Ethics may limit acceptable uses of data or automation.
Safety procedures may define how systems operate under uncertainty.
Training ensures that human operators understand system capabilities and limitations.
11. Human-Machine Teaming
Human-machine teaming describes how humans and AI systems work together. The appropriate relationship depends on the application.
Automation Spectrum
At one end:
The machine performs most of the task.
The human supervises or intervenes only when necessary.
At the other end:
The human performs most of the reasoning.
The machine performs targeted functions, such as retrieving data or checking calculations.
Many systems fall between these extremes.
Consequence and Confidence
Human involvement should increase when:
The consequences of failure are high
Machine confidence is low
The environment changes unpredictably
Decisions require judgment, ethics, or contextual understanding
Automation becomes more appropriate when:
The consequences of failure are low
Machine confidence is high
The task is repetitive
The task occurs at very large scale
Scale and Application Complexity
Another useful framework compares the scale of a task with its application complexity.
Low Complexity, High Scale
Machines are often highly effective when a task is relatively manageable but must be repeated extremely often.
Spam filtering is an example:
The task may involve complex patterns.
It occurs at massive scale.
Human review of every message is impractical.
Automation provides efficient filtering.
High Complexity, Low Scale
Humans are often more effective when the task is complex but occurs only occasionally.
A major business acquisition is an example:
It may require reviewing diverse information.
The situation is unique and changes over time.
It does not occur frequently enough to justify complete automation.
AI may help locate specific evidence, but humans typically make the final judgment.
12. Machine Learning
Machine learning is the study of algorithms that improve their performance on a task through experience.
In machine learning:
Experience usually means data.
The algorithm optimizes according to a performance criterion.
The system learns a model or set of parameters.
The trained model is later applied to new data.
Machine learning draws on:
Statistics
Computer science
Optimization
Applied mathematics
Domain-specific knowledge
The central idea is that computers can partially program themselves by inferring useful rules or relationships from examples.
Common Machine-Learning Tasks
Classification: Predicting a discrete class or label
Regression: Predicting a continuous quantity
Prediction: Estimating future or unknown outcomes
Clustering: Grouping similar examples
Dimensionality reduction: Representing data with fewer variables
Traditional Programming Versus Machine Learning
Traditional Programming
Traditional programming provides:
Data
A manually written program
The program applies explicit instructions to the data and produces an output.
Conceptually:
Data + rules → output
Machine Learning
Machine learning provides:
Input data
Desired outputs or other learning signals
The system infers a program, model, or set of rules that connects inputs to outputs.
Conceptually:
Data + outputs or feedback → learned model
The learned model can then be applied to new data.
13. The Three Major Learning Paradigms
Supervised Learning
Supervised learning uses labeled examples. Each input is associated with a correct output, commonly called a label or ground truth.
The system learns a model that predicts labels for new inputs.
Examples include:
Classifying images
Predicting a numerical measurement
Identifying whether a message is spam
Recognizing speech categories
Unsupervised Learning
Unsupervised learning uses data without labels. The system searches for hidden structure, patterns, groups, or useful representations.
Examples include:
Clustering
Dimensionality reduction
Pattern discovery
Anomaly detection
Data exploration
Reinforcement Learning
Reinforcement learning does not provide a correct label for each individual input. Instead, an agent receives rewards or penalties as it acts in an environment.
The agent attempts to learn a strategy that maximizes cumulative reward.
Supervised learning receives labels, unsupervised learning receives unlabeled data, and reinforcement learning receives reward feedback.
There is overlap among these categories, and some algorithms can be adapted for more than one learning paradigm.
14. Common Machine-Learning Pitfalls
Overfitting
Overfitting occurs when a model performs extremely well on its training data but poorly on new or test data.
The model has memorized details of the training examples rather than learning general relationships.
Consequences include:
High training performance
Poor generalization
Unreliable deployment results
Underfitting
Underfitting occurs when a model is too simple to represent the patterns in the data.
Consequences include:
Poor performance on the training data
Poor performance on test data
Failure to capture important relationships
Poor-Quality Data
Performance can be damaged by:
Noise
Missing values
Incorrect labels
Incomplete records
Measurement errors
Biased sampling
Missing features
Sometimes a poor model result is caused not by the algorithm but by the data.
Incorrect Model Choice
A model must be appropriate for the structure of the problem. For example, a linear model may perform poorly when the underlying relationship is nonlinear.
Poor Training-Test Separation
Training and test data must be separated properly. If information from the test data influences training, the reported performance may be misleading.
The test set should represent unseen data and should be used to evaluate generalization rather than to repeatedly guide model construction.
15. Supervised Learning in Detail
Supervised learning begins with labeled data:
The trained model is then applied to new data:
Classification
Classification predicts a discrete category.
Examples:
Spam or not spam
Cat, dog, or bird
Safe or unsafe
Disease category
Vehicle state
Regression
Regression predicts a continuous variable.
Examples:
Temperature
Speed
Financial value
Sensor measurement
Probability or score
Training and Inference
Supervised systems usually have two stages:
Training: The model learns relationships between inputs and known labels.
Inference: The trained model processes unseen data and produces predictions.
A portion of labeled data is often held out as test data. The model trains on the remaining examples and is evaluated on the held-out set.
A typical workflow is:
Collect labeled data.
Explore and clean the data.
Separate training and test examples.
Train the model.
Evaluate its predictions on unseen data.
Adjust the model or data preparation if necessary.
Deploy the trained model.
Use the model for inference on new inputs.
16. Neural Networks
A neural network is a computing system inspired by biological neural networks. It learns to perform tasks through repeated training on examples.
Neural networks may be used for:
Supervised learning
Unsupervised learning
Classification
Regression
Representation learning
Pattern recognition
Dimensionality reduction
Basic Components
A neural network contains:
Inputs: Features provided to the network
Layers: Groups of computational units
Weights: Parameters controlling the strength of connections
Biases: Parameters that shift the activation of units
Activation functions: Nonlinear functions applied within units
Outputs: Predictions or representations produced by the network
A deep neural network contains substantial depth, typically through many hidden layers or a complex architecture such as recurrence. There is no single universally accepted numerical threshold for how many layers make a network “deep.”
Input Features
Input features depend on the application.
For an image, features might include:
Red, green, and blue pixel values
Pixel intensities
Pixel positions
Spatial distances
Local image structures
For a time-series signal, features might include:
Amplitude
Magnitude at a particular frequency
Measurements at specific time steps
Temporal relationships
Features can also come from multiple modalities, such as combining audio and text.
Feature Engineering
Feature engineering is the process of designing or selecting useful input features.
It may involve:
Creating new variables
Combining existing variables
Selecting the most informative features
Incorporating domain knowledge
Fusing information from multiple sources
Removing irrelevant or redundant features
Feature engineering can substantially affect model performance.
Layer Computation
The output of layer i+1 can be represented generally as:
where:
yi is the output from the previous layer
Wi+1 is the layer’s weight matrix
bi+1 is the bias vector
f is a nonlinear activation function
yi+1 is the output of the next layer
Training primarily consists of learning appropriate values for the weights and biases.
Individual Neuron Calculation
A single computational unit may first calculate a weighted sum:
It then applies an activation function:
For example, if the weights are 2.7, 8.6, and 0.002, and the inputs are −0.06, 2.5, and 1.4, then the weighted contribution is approximately:
Using the sigmoid activation function,
produces an output close to 1 for z=21.34.
Activation Functions
Activation functions introduce nonlinearity. Without nonlinear activations, stacking many layers would still produce an overall linear transformation.
Common activation functions include:
Sigmoid: Produces values between 0 and 1.
ReLU: The rectified linear unit, commonly defined as f(x)=max(0,x).
Other functions selected according to the application and architecture.
ReLU avoids restricting outputs to a narrow range and can reduce problems associated with vanishing gradients compared with some sigmoid-based networks.
Major Neural-Network Architectures
Examples include:
Convolutional neural networks: Often used for spatial data such as images.
Recurrent or recursive neural networks: Incorporate sequential or repeated processing.
Deep belief networks: Use layered probabilistic representations.
Autoencoders: Learn compressed representations and reconstruct inputs.
Neural-Network Training
Training adjusts weights so that the network’s output becomes closer to the desired result.
A general process is:
Initialize the network’s weights and biases.
Pass input data through the network.
Compare the output with the desired result.
Measure the error.
Adjust the weights and biases to reduce the error.
Repeat many times over many examples.
A network may contain:
Thousands of input features
Hundreds of layers
Millions or billions of parameter changes during training
Model and Architecture Choices
Designers may need to choose:
Number of layers
Number of units per layer
Input features
Network type
Layer types
Activation functions
Training method
Performance metrics
Memory and computational requirements
Because training can be expensive, practitioners often begin with an architecture that worked well on a similar problem and adapt it rather than designing everything from the beginning.
Automated model-selection research attempts to select architectures and parameters based on data and resource constraints. For example, an automated system might search for a model that fits within a processor with only a limited amount of memory.
Parallel Neural-Network Training
Neural-network training can be parallelized.
Data Parallelism
The training data is divided among multiple processing nodes. Each node computes updates using its portion of the data, and the results are synchronized.
Model Parallelism
The model itself is divided across multiple nodes because it is too large for one processor or because different parts can be computed simultaneously.
Modern GPUs also provide parallelism within a single processing node.
Inference
Inference is the process of applying a trained model to new data. Training creates the model; inference uses that model in deployment or in the field.
Nonlinearity and Decision Boundaries
The power of neural networks comes largely from repeated nonlinear transformations.
A linear classifier works well when classes can be separated by a simple linear boundary. However, many real data sets contain complex patterns that cannot be separated by a single straight boundary.
Nonlinear models can create complex decision boundaries and may therefore distinguish classes that overlap in the original feature space.
Feature transformations can also make classification easier by moving data into a representation where the classes are more separable.
17. Unsupervised Learning
Unsupervised learning attempts to discover hidden structure in unlabeled data.
The system is given observations but not the correct answers. It may search for:
Groups
Patterns
Relationships
Relevant dimensions
Anomalies
Compressed representations
Challenges
Supervised learning can directly compare predictions with known labels. Unsupervised learning does not have an equally simple performance criterion.
Possible evaluation criteria include:
Distance within clusters
Separation between clusters
Reconstruction error
Stability of discovered patterns
Usefulness of the resulting representation
Number and quality of clusters
The appropriate criterion depends on the purpose of the analysis.
Applications
Unsupervised learning is useful when labeling is expensive or impossible. For example, cybersecurity systems may collect billions of network packets. It is impractical for a person to label every packet as safe or malicious.
An unsupervised system can first:
Identify unusual behavior
Extract representative examples
Group similar traffic
Highlight potentially relevant events
Experts can then label a smaller, more informative subset for supervised learning.
Clustering
Clustering groups objects or feature vectors so that members of the same cluster are more similar to one another than to members of other clusters.
A typical clustering process is:
Represent data points in a feature space.
Select or estimate a number of clusters.
Assign observations to initial clusters.
Measure within-cluster similarity or error.
Adjust memberships iteratively.
Stop when the clustering objective is sufficiently optimized.
One objective may minimize squared distance between points and their cluster representatives while encouraging separation among clusters.
Dimensionality Reduction
Dimensionality reduction reduces the number of variables used to represent data.
It is useful when data contains hundreds or thousands of features, some of which may be:
Irrelevant
Redundant
Nearly constant
Too noisy
Difficult to interpret
Applications include:
Feature selection
Feature extraction
Data compression
Visualization
Preprocessing for later algorithms
For example, a high-dimensional data set may be projected into two or three dimensions for visualization.
Neural Networks for Unsupervised Learning
Neural networks can learn useful representations without labels, particularly because of their ability to model nonlinear relationships.
They can be used for:
Clustering
Dimensionality reduction
Representation learning
Anomaly detection
Reconstruction
Autoencoders
An autoencoder learns a compressed representation of its input and then reconstructs the original input.
Its architecture typically contains:
An input layer
An encoder that compresses the input
A narrow internal representation, sometimes called a bottleneck
A decoder that reconstructs the input
An output compared with the original input
The training objective is to make the reconstructed output similar to the original input. If x is the input and x^ is the reconstruction, the reconstruction error may be expressed conceptually as:
The bottleneck representation provides a lower-dimensional representation of the original data.
18. Reinforcement Learning
Reinforcement learning trains an agent through interactions with an environment using rewards and penalties rather than labels for each input.
Main Characteristics
There is no correct label for every data point.
The agent takes actions.
Actions affect the environment and future observations.
Feedback may be delayed.
Time and sequence matter.
The agent attempts to maximize cumulative reward.
A reward can be positive for useful behavior and negative for harmful or unsuccessful behavior.
Example: Helicopter Maneuvering
In a helicopter-control task:
Actions that keep the helicopter stable may receive positive feedback.
Actions that cause the helicopter to tip may receive negative feedback.
The agent gradually learns which control actions lead to desirable outcomes.
A supervised approach would require collecting and labeling many configurations as “upright,” “tipping,” or “fallen.” This could be expensive and difficult, especially for dangerous states.
Reinforcement learning avoids requiring a complete label for every possible configuration. Instead, the agent learns through consequences.
Why Reinforcement Learning Is Useful
Reinforcement learning is particularly appropriate when:
The system is sequential
Actions affect future inputs
Feedback is delayed
The environment is complex
It is difficult to label every situation
The desired behavior can be expressed through rewards
The approach resembles learning through trial and error, similar to how a person may learn a video game by repeating actions that produce points and avoiding actions that reduce points.
19. Core Principles for Successful AI Systems
Successful AI systems generally require the combination of several ingredients:
Available and usable data
High-quality data preparation
Suitable computing infrastructure
Appropriate algorithms
Domain expertise
Well-defined performance criteria
Careful evaluation
Human-machine integration
Robustness, security, and safety
The field includes many different methods, and no single algorithm is appropriate for every problem. The right approach depends on the balance between data, computing resources, expert knowledge, task complexity, scale, and the consequences of errors.
A strong AI system therefore consists not merely of a sophisticated model, but of an end-to-end design in which data, infrastructure, algorithms, humans, and mission requirements work together.

Ask anything
We've read this whole study set, so questions about it get the best answers.