Beginner

Module 2: How AI Learns and Makes Decisions

Introduction

In Module 1, you learned what AI is and how it differs from traditional computing. Now you’ll discover the mechanics behind AI: how it learns from data and makes decisions.

Understanding the learning process helps you evaluate AI systems, recognise their limitations, and use them effectively. You’ll see it’s not magic; it’s systematic pattern recognition through practice.

What you’ll learn:

  • What AI needs to learn and why
  • How the training process works
  • How AI makes predictions and decisions
  • Why AI makes mistakes

Every AI system needs three essential ingredients to learn effectively. Missing any one means the AI won’t work properly.

Data: The Examples AI Learns From

AI learns by studying examples, so it needs data. The quality and quantity of this data largely determines performance.

What makes good training data:

  • Quantity: Enough examples to capture variation (thousands for simple tasks, millions for complex ones)
  • Diversity: Represents real-world scenarios, including edge cases and unusual situations
  • Accuracy: Correct labels – if training data has errors, AI learns incorrectly
  • Relevance: Matches actual use case (UK fraud detection needs UK data, not US patterns)
  • Reality check: Data preparation typically takes 60-80% of project time. It involves labelling examples, cleaning errors, and ensuring quality. Unglamorous but critical work.

Reality check: Data preparation typically takes 60-80% of project time. It involves labelling examples, cleaning errors, and ensuring quality. Unglamorous but critical work.

Algorithms: The Learning Strategy

If data provides the examples, algorithms provide the mathematical instructions for learning from them.

Think of algorithms as teaching methods:

  • Supervised learning: Teacher provides correct answers, student learns by comparison
  • Unsupervised learning: Student finds patterns independently without answer key
  • Reinforcement learning: Learning through trial and error with rewards and penalties

Different tasks need different algorithms, just as different subjects need different teaching approaches.

Computing Power: The Processing Engine

Training AI requires substantial computing resources for processing millions of calculations.

The GPU revolution: Graphics processors (GPUs), designed for video games, proved perfect for AI training. This hardware breakthrough enabled modern AI.

Cloud computing impact: Before cloud services, only organisations with expensive hardware could develop AI. Now anyone can rent computing power as needed.

Good news: Once trained, AI runs much faster. Training is expensive; using trained AI requires far less power.

How does AI actually learn? Let’s walk through the training process using supervised learning (the most common approach).

The Learning Loop: Four Steps

Starting point – random guessing: Before training, AI knows nothing. Its settings are random. Asked to identify a cat, it guesses randomly.

Step 1: Make a prediction: AI processes a training example and generates a prediction based on its current settings. Example: Shown a cat image, untrained AI might guess “dog”

Step 2: Calculate the error: Algorithm compares prediction to correct answer and measures how wrong it was. Example: Predicted “dog” but answer is “cat” = large error

Step 3: Adjust internal parameters: AI adjusts its millions of internal settings slightly to reduce that error. Changes are small and incremental.

Step 4: Repeat thousands of times: AI processes example after example. Each cycle makes tiny improvements. After thousands or millions of examples, these add up to accurate pattern recognition.

When Training is Complete

Training stops when accuracy plateaus on validation data (examples the AI hasn’t seen). This prevents two problems:

Undertraining: Stopping too early when AI hasn’t learned patterns fully

Overtraining (overfitting): Training too long, which means that AI memorises examples rather than learning patterns. Works on training data but fails on new data.

The goal: AI that performs well on both training data and new, unseen examples.

Once trained, how does AI make decisions about new data?

The Decision Journey

  • Processing input: AI converts data (image, text, numbers) into numerical format it can analyse
  • Pattern matching: AI compares input to patterns learned during training. “Does this look like the cats I’ve seen?” Uses mathematical model to calculate similarity scores
  • Calculating confidence: AI generates probability scores for each possible answer Example: “85% confident cat, 10% dog, 5% rabbit” Important: High confidence doesn’t guarantee correctness
  • Generating output: Selects answer with highest confidence Some systems provide multiple options with probabilities

Understanding Neural Networks (Simplified)

Many AI systems use neural networks – layers of processing that extract increasingly complex patterns.

How layers work (image recognition example):

  • Layer 1: Detects edges and lines
  • Layer 2: Combines edges into shapes
  • Layer 3: Combines shapes into object parts (ears, eyes)
  • Layer 4: Recognises complete objects (cat)

Each layer makes patterns more obvious until final layer can make clear decisions.

AI isn’t perfect. Understanding common failure modes helps you use it effectively.

Training Data Problems

Insufficient data: Not enough examples to learn full range of scenarios Example: Medical AI trained mostly on common conditions performs poorly on rare diseases

Biased data: Training data doesn’t represent reality fairly Example: Hiring AI trained on male-dominated field learns to favour male candidates

Outdated data: World changes but training data doesn’t Example: Fraud detection missing new scam techniques

Algorithm Limitations

Overfitting: AI memorises training examples rather than learning general patterns Like a student memorising exam questions without understanding the subject Works on training data, fails on new data

Edge cases: Scenarios unlike anything in training Example: Self-driving car encounters kangaroo after training only in cities

Lack of True Understanding

No common sense: AI lacks real-world experience and intuitive understanding Example: Might suggest ice cream for burned hand because “cold” appeared with “burn” in data

Missing context: Cannot infer unstated information humans automatically understand Example: “Get me the report” – AI doesn’t know which report or how to access it

Ambiguity struggles: Difficulty with multiple interpretations Example: “I saw her duck” – verb (bending) or noun (bird)?

Specific AI Failures

Hallucinations: Creating plausible-sounding but false information Example: Citing non-existent research papers Particularly concerning in language models

Confidence miscalibration: High confidence doesn’t equal accuracy AI can be 95% confident in completely wrong answer Confidence reflects pattern similarity, not correctness

Well-managed AI systems improve continuously.

Continuous Learning Methods

  • Periodic retraining: AI retrained regularly on fresh data Example: Fraud detection retrained monthly with latest scam techniques
  • Active learning: AI identifies uncertain cases and requests human input Efficient use of human expertise
  • Feedback loops: User corrections feed back into training Example: Spell checker learns your vocabulary

Human-AI Collaboration

Most reliable AI systems combine artificial and human intelligence:

  • Human review: Experts check AI outputs before implementation
  • Hybrid decisions: AI provides recommendations, humans make final calls
  • Active supervision: Humans monitor AI in real-time and intervene when needed

Example: Radiologist uses AI to highlight potential issues but makes final diagnosis. Combines AI speed with human judgment.

You’ve completed your exploration of how AI learns and decides. Here’s what you now understand:

What AI Needs

Three essential ingredients: quality data, appropriate algorithms, sufficient computing power Data preparation takes 60-80% of project time Different learning approaches (supervised, unsupervised, reinforcement) suit different tasks

The Training Process

AI starts with random guessing and improves through iterative error correction Four-step loop: predict → calculate error → adjust → repeat Training stops when accuracy plateaus to prevent overfitting

How Decisions are Made

AI processes input → matches patterns → calculates confidence → generates output Neural networks use layered processing to recognise increasingly complex patterns High confidence doesn’t guarantee correctness

Why Mistakes Happen

Training data problems (insufficient, biased, outdated) Algorithm limitations (overfitting, edge cases) Lack of true understanding (no common sense, missing context) Specific failures (hallucinations, confidence miscalibration)

Continuous Improvement

AI improves through retraining, active learning, and feedback loops Most reliable systems combine AI efficiency with human oversight Human-in-the-loop approaches catch errors and provide judgment

What’s Next

Module 3: AI in the Real World: Applications and Impact will show you AI in action. You’ll explore:

  • How AI is transforming different industries
  • Real-world benefits and risks of AI deployment
  • Where you already encounter AI in daily life
  • Ethical considerations when using AI

You now understand not just what AI is, but how it learns, decides, fails, and improves. This prepares you to evaluate AI applications critically.

Aveni AI Logo