IB COMPUTER SCIENCE | 2027 CASE STUDY | SL & HL

03.1 Pixels, random noise and noise injection

Explain images as numerical grids, describe random noise and forward noise injection, and distinguish training corruption from generation starting points.

Understand the technology

See the numbers behind the noise.

For May and November 2027. This introductory lesson is shared SL and HL content.

01 | AN IMAGE IS ALSO A GRID OF NUMBERS

A photograph looks like a continuous scene, but a raster image is represented as a grid of pixels. A pixel is one picture element at a particular position.

Each pixel has numerical values describing its brightness or colour. A model can therefore process an image as numerical data rather than as a physical photograph.

This is the starting point for understanding noise injection in the 2027 case study: changing image values can make visible structure harder to recognise.

02 | GREYSCALE: ONE VALUE PER PIXEL

In a simple 8-bit greyscale representation, each pixel has a brightness value from 0 to 255. Zero represents black, 255 represents white and intermediate values represent shades of grey.

A row containing 0, 64, 128, 192 and 255 would move from dark to light. The values are not object labels: 128 does not mean “mountain”. Meaning emerges from arrangements of values across the image.

Machine learning software often rescales values, for example to 0–1 or −1–1, before processing. Display values and internal model values need not use the same numerical range.

03 | COLOUR USES CHANNELS

A common colour representation uses red, green and blue channels. Each pixel has a value for each channel. For example, an RGB pixel with values (255, 0, 0) displays red in the usual 8-bit representation.

A 64 by 64 RGB image therefore contains 64 × 64 × 3 = 12,288 channel values, before considering other information or encodings.

Noise can affect the channel values. To keep the next examples easy to follow, our demonstration uses a single greyscale value per pixel.

04 | STRUCTURE COMES FROM RELATIONSHIPS

Neighbouring pixels often have related values. A dark silhouette against a bright background creates a boundary. A gradual change in brightness can suggest shading.

These relationships help an observer recognise shapes. If values are disturbed, the boundary becomes less clear and fine details can become difficult to distinguish.

Noise does not have to delete a whole object at once. It can weaken the numerical patterns that make the object recognisable.

05 | WHAT IS RANDOM NOISE?

Random noise is a collection of values sampled using a random process. When displayed as an image, it can look like a speckled pattern without a coherent scene.

The distribution used to sample the values matters. Uniform noise samples evenly across a specified interval; Gaussian noise is sampled from a normal distribution. The standard DDPM formulation uses Gaussian noise.

A noise sample is not necessarily a photograph with a hidden object. Its values can be generated independently of any particular source image.

06 | PSEUDORANDOM VALUES AND SEEDS

Computers commonly use a pseudorandom generator , an algorithm that produces a sequence of values with useful randomness properties. Its initial state can be set using a seed.

Keeping the same seed and compatible computation can reproduce a noise pattern. Changing it can provide a different starting pattern.

A seed does not specify a semantic subject such as “cat”. It also does not guarantee identical finished images across different models, software or settings.

07 | WHAT IS NOISE INJECTION?

Noise injection means introducing sampled noise into data or a computation. In the forward diffusion process, image information is progressively weakened as noise is introduced according to a schedule.

At a low noise level, the scene can remain easy to recognise. At a high level, the result becomes dominated by noise.

The purpose is not to damage images for its own sake. Creating controlled noisy examples supplies learning tasks for a denoising model.

08 | TRY A SIMPLE PIXEL BLEND

Use the slider below to blend a small greyscale silhouette with a fixed random pattern. At 0%, you see the clean pattern. At 100%, you see only the sampled noise. “New noise” changes the random pattern while keeping the silhouette and slider position.

A numerical silhouette is progressively blended with a random pattern. Use the status text to follow the selected blend.

This is a teaching blend, not a diffusion model. It uses a linear mixture of display values sampled uniformly from 0 to 255. Real DDPM noise uses a different, variance-controlled Gaussian formulation. There is no neural network or image generation running here.

09 | FOLLOW ONE PIXEL NUMERICALLY

For our display blend, let the clean value be 200 and the noise value be 40. With noise fraction 0.25, the displayed value is (0.75 × 200) + (0.25 × 40) = 160.

At fraction 0, the value is 200. At fraction 1, it is 40. The clean contribution decreases while the sampled-noise contribution increases.

This weighted average is useful for visual intuition. Do not memorise it as the DDPM forward equation: ordinary averaging does not preserve the same variance properties.

10 | THE DIFFUSION FORMULATION IS DIFFERENT

A common DDPM expression for a noisy sample is xₜ = √ᾱₜ x₀ + √(1 − ᾱₜ) ε . Here, x₀ is clean data, ε is standard Gaussian noise, and ᾱₜ controls how much signal remains at noise level t.

The square-root coefficients combine clean signal and noise using a variance-based schedule. As ᾱₜ becomes small, the noise dominates. This equation can be used to sample a selected noise level directly.

You do not need to derive the equation for this introductory lesson. Understand the changing contributions and keep this real formulation separate from the simple slider blend.

11 | A NOISE LEVEL IS NOT A NEW TRAINING RUN

A timestep identifies a stage or noise level in the process. During training, an example can be paired with a sampled timestep and corresponding noise to create a learning task.

The model needs information about the noise level because the appropriate prediction depends on how much corruption has occurred. Later lessons examine the learning process more closely.

Forward noising steps, optimizer updates and generation denoising steps are different operations. Avoid using “step” without explaining which process you mean.

12 | ADDING NOISE IS DIFFERENT FROM BLURRING

Blurring typically combines information from neighbouring pixels, smoothing detail and boundaries. Noise injection introduces sampled variation into values.

Both can make an image harder to recognise, but their numerical operations differ. A smooth blurred edge and a speckled noisy edge are not the same kind of change.

The distinction matters because diffusion training is defined around a particular noise process. General image degradation is not automatically forward diffusion.

13 | CAN THE ORIGINAL ALWAYS BE RECOVERED?

A heavily noisy sample can be compatible with many possible clean images. Without enough information, there is no guaranteed unique original that can be recovered from that sample alone.

A learned denoiser uses patterns from training to estimate useful directions towards cleaner data. That is different from a universal exact undo operation.

In our teaching blend, we know the source and the sampled noise because we created them. A real denoiser is not normally handed the exact added-noise answer as part of its prediction input.

14 | TRAINING CORRUPTION AND GENERATION STARTS

For training, a clean example is deliberately noised so that the learning process can form a task with known information about the corruption.

For generation from scratch, a diffusion sampler commonly starts with random noise, then repeatedly uses a trained model and a sampling procedure to produce a coherent result.

Forward training construction

Clean example → controlled noisy example.

Generation overview

Sampled noise → repeated model-guided refinement → candidate image.

The generated image is not a particular photograph concealed beneath the starting noise. The model’s learned patterns and any conditioning shape the result.

15 | PIXELS ARE NOT THE ONLY SPACE

Some diffusion systems operate directly on pixel values. Others operate on a learned compressed representation, commonly called a latent representation.

In a latent diffusion workflow, an encoder maps an image into that representation, diffusion operates there, and a decoder maps a generated representation back into an image.

Our pixel grid makes the idea visible, but it should not lead you to claim that every diffusion system directly changes RGB pixels at every internal step.

16 | APPLY IT TO VISIONARY STUDIOS

The booklet identifies noise injection and iterative denoising as central to diffusion. Understanding the numerical starting point helps explain why producing an image requires more than simply removing a visible overlay.

Visionary Studios should consider the computation involved in repeated model use and evaluate whether the finished outputs meet its needs. A random starting pattern alone does not determine an acceptable brand character or style.

Explain: Increasing forward noise weakens the recognisable image signal because sampled variation contributes more strongly. A denoiser must use learned relationships to estimate cleaner structure, rather than assume the noisy sample uniquely identifies its source.

17 | CHECK YOUR MENTAL MODEL

In your book, explain what changes when you move the demonstration slider and what changes when you select “New noise”. Then distinguish the demonstration from actual DDPM noising.

Finish by explaining why a random starting sample is not a hidden photograph and why a generation timestep is not an optimizer update.

Reveal a possible response

The slider changes the linear mixture of the same clean and noise values. “New noise” samples a different display pattern. The demonstration uses uniform noise and a simple display average; standard DDPM uses Gaussian noise and a variance-based schedule.

Generation uses learned patterns to guide a sampling process from noise. Ordinary denoising inference can keep learned parameters fixed, whereas optimizer updates change those parameters during training.

Read alongside the diffusion section of the official 2027 case study. The grid, arithmetic and formula explanation are independent teaching material.

CHECK YOUR UNDERSTANDING | NOISING, BLURRING OR DENOISING?

Identify the process described. Distinguish adding sampled variation, smoothing neighbours and model-guided generation.