---
title: Overfitting: When a Model Memorises Instead of Learning | Large Programs
description: A model that matches its training examples too closely can fail on new ones. A simple explanation of overfitting, with a study-for-the-test comparison.
canonical: https://www.largeprograms.com/overfitting-memorising-instead-of-learning/
---

[Home](/) / [How LLMs Work](/category/how-llms-work/)

How LLMs Work

# Overfitting: When a Model Memorises Instead of Learning

A model that matches its training examples too closely can fail on new ones. A simple explanation of overfitting, with a study-for-the-test comparison.

27 November 2026 · 2 min read

**Overfitting** happens when a model matches its training examples too closely or exactly, and so may fail on new examples or make unreliable predictions. In the words of the source, the model has picked up some of the random noise in the data as if it were the real pattern.

![Made-up example: a purple wiggly line through the training dots and a green straight line, with hollow new dots that sit closer to the straight line.](/img/overfitting.svg)

## A study-for-the-test comparison

Imagine a student who memorises the exact answers to last year's test and nothing else. On last year's test they score perfectly. On a new test with different questions, they do badly. They memorised instead of understanding. An overfitted model is like that student.

## What the picture shows

The source gives a figure of noisy data that looks roughly like a straight line. A wiggly polynomial curve can pass through every training point exactly, but a straight line is expected to make better predictions on data beyond the examples. A model that fits every dot is not automatically the better one.

## Why extra parameters can cause it

An overfitted model, the source says, is one that contains **more parameters than the data can justify**. Parameters are the adjustable numbers inside a model (see [what parameters are](/what-are-parameters-in-ai/)). Too many knobs can fit the noise.

## The opposite problem: underfitting

A model can also be too simple. The source's example is a straight line that can never fit a curved shape (a parabola). That is called underfitting.

## Why it matters for AI

The goal of [supervised learning](/what-is-supervised-learning/) is to give good answers on **new** data, not only on the examples it trained on. So people test a model on examples it did not see while training. A model that does well on training data and poorly on new data may be overfitted.

## Try it

Draw ten dots that roughly follow a line. Now draw a curve that goes through every dot, wiggling as needed. Draw a straight line near them. Pretend a new dot appears just beyond the last one. Which drawing predicts it better?

## Sources

- [https://en.wikipedia.org/wiki/Overfitting](https://en.wikipedia.org/wiki/Overfitting)

[Read this page as Markdown (.md)](/overfitting-memorising-instead-of-learning.md)

## Keep reading

[![](/img/hero/art-ai-art-and-music-basics.svg)](/ai-art-and-music-basics/)

How LLMs Work

### [How AI Makes Music: A Beginner's Look](/ai-art-and-music-basics/)

Models can generate melodies and songs by learning patterns in sound. What that means for musicians.

[![](/img/hero/art-backpropagation-how-neural-networks-learn-from-mistakes.svg)](/backpropagation-how-neural-networks-learn-from-mistakes/)

How LLMs Work

### [Backpropagation: How a Network Learns From Its Mistakes](/backpropagation-how-neural-networks-learn-from-mistakes/)

Backpropagation is the method that works out how to adjust each weight in a neural network after it makes an error. A simple explanation with a team analogy.

[![](/img/hero/art-chain-of-thought-prompting-showing-your-working.svg)](/chain-of-thought-prompting-showing-your-working/)

How LLMs Work

### [Chain-of-Thought Prompting: Showing the Steps](/chain-of-thought-prompting-showing-your-working/)

Asking a language model to show intermediate steps can improve its answers to hard problems. What the research found and how it is like showing your working in maths.
