IB COMPUTER SCIENCE | 2027 CASE STUDY | HL ONLY

05.4 Comparing GANs and diffusion models (HL only)

Compare GAN and diffusion mechanisms, evaluate quality and resource trade-offs, and justify a task-specific recommendation for Visionary Studios.

Understand the technology

Choose using evidence rather than a universal winner.

For May and November 2027. This lesson is higher level only. SL students are not required to study GANs.

01 | COMPARE SYSTEMS AGAINST A PURPOSE

Visionary Studios is evaluating image generation for advertising, concept art and digital media. “Which model is best?” is incomplete until the company defines what a useful result must achieve.

GANs and diffusion models can both produce convincing images, but they learn and generate differently. Those mechanisms help explain potential advantages and limitations.

This lesson compares conventional GAN and diffusion approaches. Exact performance depends on the trained systems, hardware and settings; a family name is not a benchmark.

02 | WHAT THEY HAVE IN COMMON

Both approaches learn patterns from data and use trained parameters to produce candidates. Both can involve randomness and can be extended with conditioning.

Neither automatically guarantees correctness, originality, fair representation or compliance with a brand brief. Both require suitable data practices and output review.

Do not compare an uncontrolled GAN with a sophisticated text-guided diffusion application and attribute every difference solely to the model family. The supporting components matter too.

03 | GAN TRAINING: AN ADVERSARIAL INTERACTION

A GAN trains a generator and discriminator using opposing objectives. The discriminator learns source distinctions; the generator uses feedback through that discriminator to improve its candidates.

The changing interaction can encourage sharp outputs but can also be difficult to balance. Instability and mode collapse are important concerns identified in the case study.

The discriminator is a training component, not a complete client-brief checker. Its score cannot replace independent quality and diversity evaluation.

04 | DIFFUSION TRAINING: LEARN FROM CONTROLLED CORRUPTION

A diffusion setup constructs noisy examples from clean data using a specified process. A denoiser learns to predict noise or a related quantity, with noise-level information and any conditioning.

This provides a defined prediction objective rather than the basic GAN’s two-network adversarial game. That can make the learning arrangement more straightforward to manage.

Diffusion is not immune to instability, overfitting, numerical failures or data problems. A simpler objective structure does not guarantee an inexpensive or successful training run.

05 | GAN GENERATION: A LEARNED MAPPING

A conventional feed-forward GAN generator maps a sampled vector, with any supported conditions, into an image in one generator forward pass.

The discriminator need not run to produce every output after training. This can support low generation latency in a suitable system.

One forward pass still contains many operations. Model size, output dimensions and application overhead affect real time, so the pass count alone does not specify seconds per image.

06 | DIFFUSION GENERATION: REPEATED REFINEMENT

A conventional diffusion sampler begins from noise and repeatedly uses a trained predictor and update rules to move towards an image or latent representation.

Repeated model evaluations can make generation computationally demanding. A latent result also needs decoding to image data.

Sampling methods and acceleration techniques vary. Avoid claiming that every diffusion implementation always uses the same number of steps or is slower than every possible GAN.

07 | PUT THE MECHANISMS SIDE BY SIDE

Typical mechanisms in the approaches studied here
Aspect GAN Diffusion
Learning arrangement Interacting generator and discriminator objectives Prediction from controlled noisy examples
Common generation path Sampled vector through a trained generator Noise through repeated model-guided updates
Key concern Adversarial balance and useful diversity Iterative computation and suitable sampling
Output review Quality, coverage and requirements Quality, coverage and requirements

These mechanisms explain likely trade-offs, not universal performance rankings.

08 | QUALITY AND SHARPNESS

The booklet highlights sharp, high-quality GAN outputs and strong photorealistic diffusion outputs. Both descriptions indicate capabilities rather than guarantees for every candidate.

Inspect defects, correct objects and layout, style adherence and delivery suitability. A sharp image can contain a distorted object; a photorealistic image can fail an illustration brief.

Use the same acceptance criteria when comparing systems. Otherwise, an apparent quality difference may reflect different standards rather than different outputs.

09 | DIVERSITY AND COVERAGE

A GAN may produce a narrow set of convincing outputs if mode collapse occurs. Review many samples from varied inputs to check useful coverage.

Diffusion models can support substantial variation, but their outputs are still limited by data, model behaviour and guidance. Repetition and representation gaps remain possible.

Neither randomness nor a large sample count proves meaningful diversity. For the fictional explorer campaign, check varied requested poses and scenes while preserving the intended identity.

10 | CONTROL IS AN APPLICATION CAPABILITY

Text prompts, labels, sketches, maps and reference information can provide different kinds of control in compatible systems. Conditional variants exist in both families.

Evaluate the exact supported workflow. A model may generate realistic scenes but lack the controls needed for a fixed layout or a recurring character.

Character consistency is not automatically solved by choosing diffusion or GAN. Test approved references and varied contexts using the intended production tools.

11 | COMPARE TRAINING COST SEPARATELY

GAN training involves two interacting networks and potentially repeated failed or unstable runs. Diffusion training can involve extensive data and repeated predictions across noise levels.

No universal training-cost ranking follows from those descriptions. Compare data preparation, resources, time to a validated target and reliability for the actual setups.

Using pretrained systems is also different from training from scratch. The studio’s adoption decision should reflect the work it will actually undertake.

12 | COMPARE GENERATION COST FAIRLY

A suitable GAN may offer rapid candidate generation through its feed-forward mapping. A conventional diffusion system may spend more time on repeated evaluations.

Measure comparable outputs on recorded hardware or service conditions. Include preparation, queues, decoding, review and editing where relevant to the decision.

A faster rejected candidate is not necessarily more efficient than a slower usable one. Record acceptance rate and time per accepted output.

13 | A WORKED PRODUCTION COMPARISON

In an invented classroom trial , system G takes 1 second per candidate and produces 20 candidates, of which 4 meet the brief. Its sequential generation time is 20 seconds, or 5 seconds per accepted output .

System D takes 4 seconds per candidate and produces 20 candidates, of which 10 meet the same brief. Its generation time is 80 seconds, or 8 seconds per accepted output .

G has the lower generation-only figure in this trial. That does not settle the decision: the accepted images may differ in editing needs, consistency or final quality. The labels G and D describe these hypothetical systems, not family-wide results.

14 | ADD THE EDITING WORK

Suppose accepted G outputs each need 30 seconds of correction, while accepted D outputs need 5 seconds. Allocating generation time across accepted outputs gives G: 5 + 30 = 35 seconds , and D: 8 + 5 = 13 seconds per corrected accepted output.

Under these extra assumptions, D now has the lower figure. Preparation, review and other overheads are still excluded.

The example shows why the scope of a metric matters. It does not prove one family wins or that acceptance rates remain fixed across future tasks.

15 | RELATE THE CHOICE TO THE CREATIVE STAGE

Rapid candidate generation can help interactive exploration when the results have sufficient variety and quality. Tight final-asset requirements may place greater value on control, consistency and reduced correction.

The studio might test different tools at different stages rather than force one model to serve every task. It must also consider integration and staff effort.

Give a conditional recommendation: identify the use, evidence and limitations. Do not substitute a generic list of advantages for a decision tied to the scenario.

16 | ETHICAL CONCERNS APPLY TO BOTH

Both families learn from data. Dataset curation, representation bias and appropriate disclosure remain relevant whichever approach is selected.

A generated output can resemble training material, and an attractive result does not establish suitable rights or trustworthy representation.

Evaluate the actual system’s data information and workflow. A technical architecture name does not certify legal or ethical acceptability.

17 | DESIGN A FAIR COMPARISON

Choose representative briefs and fixed acceptance criteria. Record the exact model versions, supported guidance, settings and execution conditions.

Use repeated candidate sets, assess quality and diversity, track failures and editing effort, and test realistic demand. Compare training evidence separately when the studio plans to adapt or build models.

Evaluate: A fast GAN could support low-latency exploration, while a particular diffusion workflow might offer useful control or lower editing effort. Therefore Visionary Studios should compare complete task outcomes rather than declare a winner from one architectural feature.

18 | WRITE A BALANCED RECOMMENDATION

Recommend a trial for one studio use. Include a mechanism-based advantage, a limitation and evidence that could change your judgement.

Use the production example to distinguish generation-only efficiency from the combined generation-and-editing estimate.

Reveal a possible response

For interactive concept exploration, test the feed-forward GAN workflow for response time and useful variety, checking for repetition. Compare it with a suitable diffusion system using the same briefs and acceptance criteria.

G is faster per accepted candidate in the invented generation-only trial, but D has lower combined time after the stated editing assumptions. A final recommendation needs repeated evidence about quality, control, review and deployment costs.

HL only. Read alongside the diffusion, GAN and evaluation sections of the official 2027 booklet. Numerical results here are independent teaching illustrations.

CHECK YOUR UNDERSTANDING | COMPARE THE MECHANISMS AND RESPONSIBILITIES

Match each statement to its most direct role in the conventional approaches described here.