Mentora School
HomeASSEB AI HubUnit 3: Generative AI
Class XIIASSEB-527Unit 3: Generative AI

Unit 3: Generative AI

Master ASSEB Class XII AI Unit 3: Generative vs Discriminative AI, Autoencoders, VAEs, GANs, and Large Language Models (LLMs).

Theory: 9 Marks
Practical: 5 Marks
11 min read
Subscription Gate Active
AHSEC / ASSEB Higher Secondary Syllabus

Unlock Unit 3: Generative AI

Access verified code errata manual, 50 external viva questions, period lesson scripts, and practical examination rubrics.

256-Bit Encrypted Payment • Supports UPI, Cards & NetBanking
Prefer annual board pass?View All Passes & Billing
Official Textbook Exercises & Master Solutions

Class XII • Unit 3 Exercise Solutions

Human-crafted academic answers for all exercise questions (Pages 26–29) formulated to secure full marks in the ASSEB Board Examinations. Includes step-by-step calculations, diagrams, and examiner scoring tips.

Q1Section A: Fill in the Blanks (1 Mark Each)1 Mark

Generative AI focuses on creating new data such as text, images, music, and ____.

Q2Section A: Fill in the Blanks (1 Mark Each)1 Mark

Earlier AI systems mainly performed tasks such as prediction, classification, and ____.

Q3Section A: Fill in the Blanks (1 Mark Each)1 Mark

Generative AI learns patterns in data rather than ____ examples.

Q4Section A: Fill in the Blanks (1 Mark Each)1 Mark

A discriminative model focuses on predicting the correct ____ for a given input.

Q5Section A: Fill in the Blanks (1 Mark Each)1 Mark

Generative models attempt to understand how data is ____.

Q6Section A: Fill in the Blanks (1 Mark Each)1 Mark

Variational Autoencoders use a hidden variable usually drawn from a ____ distribution.

Q7Section A: Fill in the Blanks (1 Mark Each)1 Mark

In a Generative Adversarial Network, the model that detects fake data is called the ____.

Q8Section A: Fill in the Blanks (1 Mark Each)1 Mark

Autoregressive models generate data one step at a ____.

Q9Section A: Fill in the Blanks (1 Mark Each)1 Mark

Diffusion models generate data by gradually adding and then removing ____.

Q10Section A: Fill in the Blanks (1 Mark Each)1 Mark

Large Language Models generate text by predicting the next ____ in a sequence.

Q1Section B: Multiple Choice Questions (1 Mark Each)1 Mark

Which of the following best describes Generative AI?

AI that follows fixed rules
AI that only classifies data
AI that learns patterns and generates new data
AI that stores all outputs in memory
Q2Section B: Multiple Choice Questions (1 Mark Each)1 Mark

Which task is an example of a discriminative model?

Generating a new image
Writing a paragraph
Classifying an email as spam or not spamCorrect Key
Creating musicCorrect Key
Q3Section B: Multiple Choice Questions (1 Mark Each)1 Mark

Which model uses an encoder–decoder structure?

GAN
VAE
Decision Tree
Transformer
Q4Section B: Multiple Choice Questions (1 Mark Each)1 Mark

In a GAN, the generator tries to:

Detect fake data
Classify data labelsCorrect Key
Produce realistic-looking data
Remove noise from data
Q5Section B: Multiple Choice Questions (1 Mark Each)1 Mark

Which type of model generates data step by step?

Diffusion model
Autoregressive model
Discriminative model
Decision Tree
Q6Section B: Multiple Choice Questions (1 Mark Each)1 Mark

Diffusion models are based on the idea of:

Feature selection
Data compression
Gradual noise addition and removal
Rule-based learning
Q7Section B: Multiple Choice Questions (1 Mark Each)1 Mark

Large Language Models are trained mainly using which objective?

Image reconstruction
Next-token prediction
Classification loss
Clustering
Q8Section B: Multiple Choice Questions (1 Mark Each)1 Mark

Which architecture is commonly used in Large Language Models?

CNNCorrect Key
RNN
Transformer
K-means
Q9Section B: Multiple Choice Questions (1 Mark Each)1 Mark

Which of the following is mentioned as a limitation of Generative AI?

Inability to learn patterns
Hallucination of incorrect information
Lack of applications
No need for data
Q10Section B: Multiple Choice Questions (1 Mark Each)1 Mark

A model trained using text and images together is called a ____ model.

Discriminative
Multimodal
Linear
Shallow
Q1Section C: Short Answer Questions (2–3 Marks Each)2 Marks

What is meant by Generative AI?

Generative Artificial Intelligence (GenAI) refers to a class of artificial intelligence systems designed to generate new, original content—such as coherent text, realistic images, synthetic audio, and video—by learning the underlying probability distributions and patterns from training data.

Unlike traditional AI that analyzes or labels existing data, Generative AI creates novel samples that resemble the training distribution without replicating any single sample verbatim.

Q2Section C: Short Answer Questions (2–3 Marks Each)2 Marks

How is Generative AI different from traditional predictive models?

Dimension

Traditional Predictive (Discriminative) AI

Generative AI

Mathematical Objective

Models conditional probability P(Y | X); learns decision boundaries to classify or predict labels.

Models data distribution P(X) or joint distribution P(X, Y) to understand how data is formed.

Typical Output

A single label, category, or real number (e.g. Spam / Not Spam, House Price).

Novel, high-dimensional media (paragraphs of text, photorealistic images, audio tracks).

Q3Section C: Short Answer Questions (2–3 Marks Each)2 Marks

Give two examples of content that Generative AI can create.

Two prominent examples of Generative AI content highlighted in the curriculum are:

Synthetic Photorealistic Images: Generated by diffusion models (such as Stable Diffusion or DALL-E) from descriptive natural language text prompts.

Natural Language Text & Code: Coherent multi-paragraph essays, conversational dialogue, and computer programming source code generated by Large Language Models (such as GPT-4).

Q4Section C: Short Answer Questions (2–3 Marks Each)2 Marks

What is the main goal of a discriminative model?

The primary objective of a discriminative model is to distinguish between different classes of data:

It models the conditional probability distribution P(Y | X), focusing on discovering the optimal decision boundary that separates classes in feature space.

It ignores the internal structure of how inputs X were generated, focusing entirely on mapping features to correct output labels (e.g., Cat vs. Dog).

Q5Section C: Short Answer Questions (2–3 Marks Each)2 Marks

What role does the encoder play in a Variational Autoencoder?

In a Variational Autoencoder (VAE), the Encoder network compresses high-dimensional input data (x) into a lower-dimensional continuous latent space:

Instead of outputting a single fixed vector, it outputs the parameters of a probability distribution: a mean vector (μ) and a log-variance vector (σ²).

This ensures that the latent space forms a continuous, smooth distribution from which new latent points z can be sampled.

Q6Section C: Short Answer Questions (2–3 Marks Each)2 Marks

Why are GANs known for producing realistic images?

Generative Adversarial Networks (GANs) generate exceptionally sharp, photorealistic images because of their adversarial minimax training game:

Instead of optimizing a static pixel-averaging loss (like MSE, which causes blurriness), the Generator is trained against a dynamic, learnable adversary: the Discriminator.

To fool the Discriminator, the Generator is forced to learn fine-grained textures, sharp edges, and subtle realistic details, eliminating blurry artifacts.

Q7Section C: Short Answer Questions (2–3 Marks Each)2 Marks

What does “step-by-step generation” mean in autoregressive models?

Step-by-step generation means that data is synthesized sequentially one element at a time:

When generating text or audio, the model predicts the first token, appends it to the input context, and feeds the updated sequence back into the model to predict the second token.

Mathematically, the probability of the entire sequence factorizes via the chain rule: P(x₁, ..., xT) = ∏ P(xt | x_{<t}).

Q8Section C: Short Answer Questions (2–3 Marks Each)2 Marks

Explain the basic idea behind diffusion models.

Diffusion models are inspired by non-equilibrium thermodynamics and operate in two distinct stages:

Forward Process: Systematically adds small increments of Gaussian noise to an image over hundreds of steps until it becomes pure, uncorrelated Gaussian noise.

Reverse Process: A deep neural network (typically a U-Net) learns to reverse this corruption by predicting and subtracting noise step-by-step, transforming random noise into a crisp, realistic image.

Q9Section C: Short Answer Questions (2–3 Marks Each)2 Marks

What is tokenization in Large Language Models?

Tokenization is the foundational preprocessing step that converts raw natural language text into discrete numerical chunks (tokens) that a neural network can process:

It splits strings into words, subwords, or characters using algorithms like Byte-Pair Encoding (BPE).

Each unique subword is mapped to a corresponding integer ID within the model's vocabulary table before being transformed into dense continuous vector embeddings.

Q10Section C: Short Answer Questions (2–3 Marks Each)2 Marks

Name one limitation or risk of Generative AI discussed in the chapter.

Major Limitation / Risk: Hallucination and Misinformation.

Large language models generate statistically plausible sentences that can contain completely fabricated facts, erroneous citations, or false medical advice stated with high confidence.

Additional risks include the unauthorized creation of hyper-realistic Deepfakes and copyright infringement on artists' creative works.

Q1Section D: Long Answer Questions (5 Marks Each)5 Marks

Explain Generative AI and describe how it differs from discriminative models.

  1. 1.
    Definition of Generative AI

Generative Artificial Intelligence represents a transformative paradigm in modern AI. While traditional systems analyze existing data to make decisions, Generative AI models learn the statistical structure and underlying probability distribution of human-created content, enabling them to generate novel, coherent, and realistic samples—including text, images, speech, and synthetic data.

  1. 1.
    Discriminative vs. Generative Paradigms

DISCRIMINATIVE MODEL: Focuses on the Boundary [Class A: Cats] <--- [ DECISION BOUNDARY: P(Y|X) ] ---> [Class B: Dogs] GENERATIVE MODEL: Focuses on the Distribution Learns how to DRAW a Cat: P(X|Y=Cat) AND how to DRAW a Dog: P(X|Y=Dog)

  1. 1.
    Side-by-Side Architectural Comparison

Criterion

Discriminative Modeling

Generative Modeling

Mathematical Goal

Models conditional probability P(Y | X).

Models data distribution P(X) or joint distribution P(X, Y).

What It Learns

The boundary or hyperplane separating different classes.

How features are generated and distributed within each class.

Input / Output

Input: High-dimensional data X → Output: Discrete label Y.

Input: Latent noise vector z or prompt → Output: New high-dimensional sample X.

Computational Complexity

Lower; only needs to separate classes, ignoring background noise.

Higher; must model all subtle correlations, textures, and features.

Representative Architectures

Logistic Regression, SVMs, CNN Classifiers, Random Forests.

VAEs, GANs, Autoregressive Models (GPT), Diffusion Models.

Primary Applications

Spam filtering, tumor classification, fraud detection.

Image synthesis, story writing, conversational agents, code generation.

Q2Section D: Long Answer Questions (5 Marks Each)5 Marks

Describe the working of a Variational Autoencoder, including the role of latent variables.

  1. 1.
    Architecture of a Variational Autoencoder (VAE)

Introduced by Kingma and Welling in 2013, a VAE is a directed probabilistic latent variable model that modifies traditional autoencoders to enable smooth, generative sampling.

[Input: x] ---> [ENCODER] ---> [Parameters: μ, σ²] ---> [Reparameterization: z = μ + σ⊙ε] ---> [DECODER] ---> [Output: x̂] ^ [ε ~ N(0, I)]

  1. 1.
    Operational Working Mechanism

Encoding to Distribution Parameters: The encoder neural network compresses input x into the statistical parameters of a Gaussian distribution: mean vector μ and variance vector σ².

The Reparameterization Trick: Direct random sampling is stochastic and non-differentiable, preventing backpropagation. VAEs solve this by sampling an auxiliary noise vector ε ~ N(0, I) and setting:z = μ + σ ⊙ εThis isolates randomness into ε, allowing error gradients to flow freely through μ and σ.

Decoding and Reconstruction: The decoder neural network takes latent sample z and reconstructs synthetic output x̂.

  1. 1.
    The VAE Loss Function

The total loss function consists of two competing terms:

LossVAE = ReconstructionLoss(x, x̂) + KL_Divergence(q(z|x) || p(z))

Reconstruction Loss (MSE or Binary Cross-Entropy): Measures how accurately the decoded output matches the input.

Kullback-Leibler (KL) Divergence: Acts as a regularizer, penalizing the latent distribution for deviating from a standard normal prior N(0, I). This ensures the latent space remains smooth and continuous, allowing random points to decode into realistic images.

Q3Section D: Long Answer Questions (5 Marks Each)5 Marks

Explain the architecture and training process of Generative Adversarial Networks.

  1. 1.
    GAN Architecture: The Two-Player Game

Introduced by Ian Goodfellow in 2014, a Generative Adversarial Network pits two deep neural networks against each other in a zero-sum game:

The Generator (G): Takes a random noise vector z ~ P_z from a simple distribution and maps it into synthetic data space G(z), acting like an art counterfeiter trying to produce undetectable fakes.

The Discriminator (D): Ingests both authentic training images x ~ P_data and synthetic fakes G(z), acting like an art detective outputting probability D(x) ∈ [0, 1] indicating authenticity.

[Noise: z] ---> [GENERATOR: G(z)] --- +---> [DISCRIMINATOR: D] ---> [Output: Real (1) / Fake (0)] [Real Data: x] --------/

  1. 1.
    The Minimax Objective Function

minG maxD V(D, G) = E{x~pdata}[log D(x)] + E{z~pz}[log(1 - D(G(z)))]

Discriminator Objective: Maximize V(D, G) by assigning high scores (near 1) to real data and low scores (near 0) to generated fakes.

Generator Objective: Minimize V(D, G) (or maximize log D(G(z))) to fool the discriminator into classifying fakes as real.

  1. 1.
    Training Process & Nash Equilibrium

Alternating Optimization: In each training step, the Discriminator's weights are updated while keeping the Generator fixed, and then the Generator's weights are updated while keeping the Discriminator fixed.

Nash Equilibrium: Training reaches an ideal state where the Generator replicates the true distribution perfectly (Pg = Pdata), leaving the Discriminator unable to distinguish real from fake, guessing with probability D(x) = 0.5 everywhere.

Training Challenge (Mode Collapse): Occurs when the Generator discovers a single mode that fools the Discriminator and outputs that single image repeatedly, failing to represent data diversity.

Q4Section D: Long Answer Questions (5 Marks Each)5 Marks

Discuss the advantages and limitations of autoregressive models.

  1. 1.
    Working Principle of Autoregressive Models

Autoregressive models factorize the joint probability of a sequence using the probability chain rule, predicting each token conditioned strictly on previous context: P(x) = ∏ P(xt | x{<t}). Prominent examples include WaveNet for audio, PixelCNN for images, and the GPT family for text.

  1. 1.
    Key Advantages

Exact Likelihood Optimization: Unlike VAEs (which optimize lower bounds) or GANs (which lack explicit likelihoods), autoregressive models compute exact likelihoods, making training stable without mode collapse.

Exceptional Coherence: Step-by-step conditioning ensures that outputs maintain strong local and grammatical coherence across sequences.

Parallelized Training: During training, because ground-truth previous tokens are already known (Teacher Forcing), all sequence positions can be evaluated in parallel across GPU threads.

  1. 1.
    Key Limitations

Slow Sequential Inference: At test time, generating token t strictly requires the model to have already computed token t-1. Generation cannot be parallelized, creating an O(N) runtime bottleneck.

Error Accumulation (Exposure Bias): If the model emits a minor error early in a long sequence, that erroneous token becomes part of the conditioning context for all subsequent steps, causing generation to drift off-topic.

High Computational Footprint: Caching Key-Value states (KV cache) across multi-thousand token contexts requires massive GPU memory bandwidth.

Q5Section D: Long Answer Questions (5 Marks Each)5 Marks

Explain how diffusion models generate high-quality data samples.

  1. 1.
    Overview of Diffusion Models

Diffusion models (such as Denoising Diffusion Probabilistic Models - DDPM and Stable Diffusion) represent the state of the art in high-fidelity image and video synthesis. They conceptualize generative modeling as an iterative denoising process.

[Clean Image: x0] ---> [Add Noise Step 1] ---> ... ---> [Add Noise Step T: Pure Noise xT] (Forward: Fixed) <----------------- [Neural Network (U-Net) Denoising Steps] <-------------------- (Reverse: Learned)

  1. 1.
    Two-Stage Operational Process

The Forward (Diffusion) Process:

Governed by a fixed variance schedule (β₁ … β_T), Gaussian noise is incrementally added to image x₀ over T steps (typically 1,000 steps).

At step T, all original spatial structures are erased, transforming the image into pure isotropic Gaussian noise: x_T ~ N(0, I).

The Reverse (Denoising) Process:

Starting from random Gaussian noise x_T, the model iteratively removes noise step by step back to x₀.

A deep neural network (U-Net equipped with cross-attention) is trained to predict the exact noise vector added at time step t, subtracting it to yield a cleaner image.

  1. 1.
    Latent Diffusion Models (Stable Diffusion)

Standard diffusion on high-resolution pixels is computationally slow. Latent Diffusion solves this by executing the forward and reverse processes in a compressed latent space generated by a pre-trained VAE encoder, reducing computational cost by orders of magnitude while preserving photorealistic detail.

Q6Section D: Long Answer Questions (5 Marks Each)5 Marks

Describe how Large Language Models generate text and why scale is important for their performance.

  1. 1.
    Text Generation in Large Language Models (LLMs)

Modern LLMs (such as GPT-4, LLaMA, and Claude) are built on autoregressive Transformer decoder stacks. Text generation follows an iterative sampling loop:

Tokenization & Embedding: The input prompt is tokenized into integer IDs and mapped into continuous vector embeddings with positional encodings.

Self-Attention Layers: Masked multi-head attention computes context-aware representations across all tokens.

Next-Token Probability Distribution: The final linear head computes raw logits over the entire vocabulary, converted into probabilities using Softmax.

Sampling Parameters:

Temperature (T): Scales logits before softmax; low T produces deterministic responses, while high T increases creativity.

Top-p (Nucleus) Sampling: Restricts sampling to the smallest pool of tokens whose cumulative probability exceeds threshold p.

  1. 1.
    The Importance of Scale (Scaling Laws & Emergent Abilities)

Empirical Scaling Laws (Kaplan et al., 2020): Language model cross-entropy loss decreases predictably following a power-law relationship as compute, parameter count, and training dataset volume increase.

Emergent Capabilities: At large scales (tens of billions of parameters), models spontaneously develop qualitative abilities not present in smaller models—such as multi-step mathematical reasoning, in-context few-shot learning, metaphor interpretation, and code synthesis.

Q7Section D: Long Answer Questions (5 Marks Each)5 Marks

What are foundation models? Explain their importance in modern Generative AI systems.

  1. 1.
    Definition of Foundation Models

Coined by researchers at the Stanford Institute for Human-Centered AI (HAI), a Foundation Model is an AI model trained on broad, massive, uncurated data at scale (often via self-supervised learning) that can be adapted and fine-tuned to a wide range of downstream applications.

  1. 1.
    Paradigm Shift from Narrow AI to Foundation Models

TRADITIONAL NARROW AI: [Custom Dataset 1] ---> [Train Model 1] ---> Translation [Custom Dataset 2] ---> [Train Model 2] ---> Sentiment [Custom Dataset 3] ---> [Train Model 3] ---> Summarization FOUNDATION MODEL PARADIGM: [Massive Uncurated Web-Scale Data] ---> [Single Pre-trained Foundation Model] | +-------------------+---------------+-------------------+ v v v v Translation Sentiment Summarization Coding

  1. 1.
    Importance in Modern AI Systems

Cross-Task Generalization: A single model can perform hundreds of tasks out of the box via zero-shot prompting without retraining.

Cost-Effective Adaptation: Developers adapt foundation models using lightweight parameter-efficient fine-tuning (LoRA) or prompt engineering, lowering development barriers for startups and researchers.

Multimodal Unification: Modern foundation models natively integrate text, vision, and audio into unified representations.

Q8Section D: Long Answer Questions (5 Marks Each)5 Marks

Discuss the applications of Generative AI in education, science, and creative industries.

  1. 1.
    Applications in Education

Personalized Intelligent Tutoring: Generative models act as patient, on-demand tutors, explaining complex concepts at varying reading levels and generating customized practice problem sets.

Multilingual Translation: In culturally diverse regions like Assam, GenAI translates educational textbooks and lessons into vernacular languages (Assamese, Bodo, Bengali), democratizing access to quality learning.

  1. 1.
    Applications in Scientific Discovery

Drug Discovery & Protein Design: Generative diffusion models (such as AlphaFold) design novel 3D molecular structures and therapeutic proteins, compressing drug discovery timelines from years to weeks.

Climate & Materials Modeling: Synthesizes new material structures for efficient solar cells and generates high-resolution local weather simulations.

  1. 1.
    Applications in Creative Industries

Digital Art & Concept Design: Tools like Midjourney and Stable Diffusion assist game designers, filmmakers, and illustrators with rapid storyboarding and asset prototyping.

Synthetic Music & Audio: Synthesizes original backing tracks and Foley sound effects for multimedia production.

Q9Section D: Long Answer Questions (5 Marks Each)5 Marks

Explain the limitations and risks associated with Generative AI as discussed in the chapter.

  1. 1.
    Core Technical Limitations

Hallucinations: Generative language models predict statistically plausible text without a grounded world model, often generating false facts or fabricated academic citations with high confidence.

Reasoning Fragility: Models can solve advanced coding problems yet fail on simple spatial or arithmetic edge cases, reflecting shallow statistical pattern matching rather than genuine causal reasoning.

  1. 1.
    Societal & Ethical Risks

Deepfakes and Disinformation: Hyper-realistic voice clones and video deepfakes can be weaponized for identity theft, financial fraud, and political election interference.

Copyright & Intellectual Property: Pre-training on scraped internet content without creator consent or licensing has generated widespread copyright lawsuits over artistic intellectual property.

Bias Amplification: Generative systems trained on historical web data can reproduce and amplify societal prejudices, gender stereotypes, and demographic biases.

Environmental Footprint: Training frontier models requires millions of kilowatt-hours of electrical energy and immense cooling water in hyperscale data centers.

Q10Section D: Long Answer Questions (5 Marks Each)5 Marks

Write a detailed note on the future outlook of Generative AI, including ethical and societal considerations.

  1. 1.
    Future Technological Outlook

The frontier of Generative AI is moving toward unified Omni-modal Foundation Models capable of processing text, vision, audio, and physical action simultaneously. Key emerging trajectories include:

World Models & Embodied AI: Generative video models (like Sora) that understand intuitive physics, forming the foundation for autonomous robotics and spatial agents.

Reasoning & Multi-Agent Planning: Models using chain-of-thought verification to self-correct reasoning before responding.

Efficiency & Edge Deployment: Model compression through quantization and knowledge distillation, enabling powerful generative models to run locally on mobile phones.

  1. 1.
    Ethical & Societal Governance Pillars

Watermarking & Provenance: Cryptographic provenance tracking (e.g. C2PA standards) to label AI-generated images and audio, restoring trust in digital media.

Human-in-the-Loop Safeguards: Mandating certified human review in high-stakes domains (healthcare, law, judicial systems) so automated outputs do not make unchecked decisions.

Inclusive Data Representation: Developing intentional, equitable training datasets for low-resource languages (such as Northeast Indian languages) to prevent digital language extinction.

© ASSEB Class XII Artificial Intelligence (Subject Code: 985) • Master Facilitator Answer Series • Bamunimaidam, Guwahati