Module 7 Assignment: Discriminative vs generative comparison#
Theme#
Generative models and applications
Scenario#
A team is considering generated text, images, or synthetic records and needs to distinguish useful generation from unsupported claims.
Exercises#
Choose one task and describe discriminative and generative approaches.
Use the starter code to sample from a simple latent-variable generator.
Explain how evaluation differs across classifiers, autoencoders, diffusion models, and language models.
Identify one misuse risk and one documentation safeguard.
Evidence Requirements#
A short explanation of the data, tensors, objective, and evaluation signal used in the starter experiment.
At least one meaningful modification to the starter code, with the changed variable named explicitly.
A comparison against the unmodified starter result or another defensible baseline.
A limitation statement that separates what the toy experiment demonstrates from what a production model would require.
Submission#
Submit a 600-900 word technical memo plus code, plots, tables, or shape traces needed to support your claims. The memo should read like a review artifact for another AI practitioner: concise, reproducible, and honest about uncertainty.
Rubric Focus#
Technical correctness and appropriate neural-network vocabulary.
Evidence from the starter experiment or a documented extension.
Connection between design choices and data/problem structure.
Clear treatment of limitations, failure modes, or next experimental gates.
import torch
from torch import nn
torch.manual_seed(7)
generator = nn.Sequential(nn.Linear(2, 8), nn.Tanh(), nn.Linear(8, 2))
z = torch.randn(6, 2)
samples = generator(z).detach()
print(samples.round(decimals=3))
print("These are untrained synthetic samples; describe what training objective would make them useful.")
tensor([[ 0.2320, -0.5090],
[ 0.5230, -0.0620],
[ 0.5890, -0.3290],
[ 0.4260, -0.4030],
[ 0.1220, -0.5300],
[ 0.0290, -0.5160]])
These are untrained synthetic samples; describe what training objective would make them useful.
Reflection Prompts#
What changed when you modified the starter experiment, and why should that change matter?
Which result surprised you, and what diagnostic would you run next?
What assumption would you document before handing this model to another practitioner?
Which failure mode from the module reading is most relevant to your result?