Deep Learning MCQ Questions And Answers

41. What is a Generative Adversarial Network (GAN) in deep learning?

  1. A GAN is a network where multiple AI models compete for computational resources on a shared GPU
  2. A GAN consists of two neural networks — a Generator (creates synthetic data to fool the discriminator) and a Discriminator (distinguishes real from fake data) — trained adversarially until the generator produces indistinguishably realistic data
  3. GANs are a type of supervised learning where adversarial (noisy) labels are used for training
  4. A GAN is a network that generates adversarial examples to test the robustness of other models

Answer : B
Explanation: GANs, introduced by Ian Goodfellow et al. (2014), are one of the most creative and impactful deep learning innovations. Architecture: Generator (G): takes random noise z as input → produces synthetic images/data that mimic real data. Tries to fool the discriminator. Discriminator (D): binary classifier → distinguishes real samples (from training data) from fake samples (from G). Training objective: minimax game — G minimizes log(1-D(G(z))), D maximizes log(D(x)) + log(1-D(G(z))). At convergence: G produces samples indistinguishable from real data. Applications: Photorealistic image synthesis (StyleGAN — human faces that don’t exist). Image-to-Image translation (Pix2Pix — sketches to photos, CycleGAN — horses to zebras). Super-resolution, Image inpainting, Data augmentation. Video synthesis, Deepfakes. Drug discovery (generate molecules). Training challenges: Mode collapse — generator produces limited variety. Training instability — discriminator wins too fast. Modern variants: DCGAN (deep convolutional), StyleGAN2/3 (photorealistic faces), Wasserstein GAN (more stable training), Conditional GAN (control output class).

42. What is an autoencoder in deep learning?

  1. An autoencoder is a supervised model that automatically encodes labels for training data
  2. An autoencoder is an unsupervised neural network that learns to compress (encode) input data into a lower-dimensional latent representation and then reconstruct (decode) the original input — learning efficient representations without labeled data
  3. An autoencoder is a self-supervised model that automatically generates new training examples from existing ones
  4. An autoencoder is a type of encoder-decoder that converts audio to text and text back to audio

Answer : B
Explanation: Autoencoders learn compressed representations of data in an unsupervised manner. Architecture: Encoder: compresses input x into latent code z (bottleneck layer — smaller than input). Decoder: reconstructs x̂ from z. Training: minimize reconstruction loss ||x – x̂||². The bottleneck forces the network to learn the most important features. Types: Undercomplete (standard): bottleneck smaller than input — forces compression. Denoising autoencoder: input is corrupted, target is clean — learns robust features. Sparse autoencoder: penalizes non-sparse latent representations. Variational autoencoder (VAE): learns a probabilistic latent space — enables generation of new samples. Contractive autoencoder: encourages smooth, robust representations. Applications: Dimensionality reduction (alternative to PCA, but non-linear). Anomaly detection (high reconstruction error = anomaly). Image denoising, inpainting. Feature learning for downstream tasks (pre-training). VAEs for image generation. Recommendation systems. Autoencoders are foundational to many modern generative AI techniques.

43. What is dropout regularization in deep learning?

  1. Dropout is a technique that removes underperforming layers from the network during training
  2. Dropout is a regularization technique that randomly deactivates (sets to zero) a fraction of neurons during each training step — preventing co-adaptation, reducing overfitting, and effectively training an ensemble of many different network architectures simultaneously
  3. Dropout reduces the learning rate by dropping a percentage of gradient updates during optimization
  4. Dropout is a data augmentation method that randomly removes features from the input training data

Answer : B
Explanation: Dropout (Srivastava et al., 2014) is one of the most effective regularization techniques. How it works: During training, each neuron is randomly set to zero with probability p (dropout rate, typically 0.2-0.5). Remaining neurons scaled by 1/(1-p) to maintain expected values. During inference: all neurons active, but outputs scaled appropriately. Why it works: Prevents co-adaptation: neurons can’t rely on specific other neurons being present — must learn more robust features. Ensemble effect: with n neurons and dropout probability p, approximately 2^(n×p) different network architectures are sampled — inference uses an implicit ensemble. Prevents overfitting by adding noise to the training process. Placement: typically applied to fully connected layers. Sometimes applied to CNN layers (SpatialDropout). Not usually applied to batch normalization layers (conflicting effects). Modern practice: with batch normalization, dropout is less necessary — BN provides implicit regularization. Dropout important for: large, over-parameterized models without BN.

44. What is overfitting and underfitting in deep learning models?

  1. Overfitting means the model trains too quickly; underfitting means the model trains too slowly
  2. Overfitting occurs when a model learns training data too well including noise — performing poorly on new data (high variance); underfitting occurs when a model is too simple to capture the underlying patterns — performing poorly on both training and test data (high bias)
  3. Overfitting and underfitting are hardware problems caused by insufficient GPU memory
  4. Underfitting only occurs in deep networks; overfitting only occurs in shallow networks

Answer : B
Explanation: Bias-Variance tradeoff is fundamental to understanding model performance. Overfitting (High Variance): training loss very low, validation loss much higher. Model memorizes training data including noise instead of learning general patterns. Symptoms: great on training set, poor on test set. Solutions: More data (most effective), Dropout, L1/L2 regularization, Early stopping, Data augmentation, Reduce model complexity, Cross-validation. Underfitting (High Bias): both training and validation loss are high. Model too simple to capture the complexity of the data. Symptoms: poor on both training and test sets. Solutions: More complex model (more layers, more neurons), Train longer (more epochs), Reduce regularization, Better feature engineering, More relevant features. The sweet spot: model complex enough to learn patterns, but not so complex that it memorizes noise. Diagnosis: learning curves show the gap between training and validation loss. Large gap = overfitting. Both high = underfitting.

45. What is the difference between PyTorch and TensorFlow for deep learning?

  1. PyTorch is only for research; TensorFlow is only for production deployment of models
  2. PyTorch (Meta/Facebook) uses dynamic computation graphs (define-by-run), is more Pythonic and preferred in research; TensorFlow (Google) uses static graphs by default but added eager execution in TF2, has stronger production deployment tools
  3. TensorFlow is always faster than PyTorch for training the same deep learning model
  4. PyTorch and TensorFlow are identical frameworks that differ only in API naming conventions

Answer : B
Explanation: PyTorch and TensorFlow are the two dominant deep learning frameworks. PyTorch (released 2016, Facebook/Meta): Dynamic computation graphs — the graph is built as code runs (define-by-run). More Pythonic, intuitive debugging (standard Python debuggers work). Dominant in research (majority of ML papers). Growing in production (TorchServe, ONNX export). Key tools: torchvision, torchaudio, torchtext, Hugging Face (built on PyTorch). TensorFlow (released 2015, Google): Originally static graphs (define-then-run) — great for production but harder to debug. TF2 added Keras API and eager execution by default. Strong production ecosystem: TensorFlow Serving, TF Lite (mobile), TF.js (browser). TensorBoard — visualization tool. Used widely in Google products. JAX (Google): emerging alternative — functional transformations, JIT compilation, increasingly popular for research. Keras: high-level API that now supports both TF and PyTorch backends. Industry trend: PyTorch dominates research and is increasingly competitive in production. For learning deep learning: start with PyTorch — more intuitive for understanding concepts.

46. What is the ResNet (Residual Network) architecture?

  1. ResNet is a residual memory network used to store previously computed neural network states
  2. ResNet is a deep CNN architecture that uses skip (residual) connections — allowing layers to learn residual functions F(x) instead of the complete mapping H(x), enabling training of extremely deep networks (50-152+ layers) by preventing the degradation problem
  3. ResNet is a network that resets all weights to initial values when training plateaus
  4. ResNet uses residual data (leftover training samples) to train auxiliary networks for better accuracy

Answer : B
Explanation: ResNet (Residual Network), introduced by He et al. (Microsoft Research, 2015), won the ImageNet competition with a 152-layer network — far deeper than any previous architecture. The problem solved: as networks get deeper, training error paradoxically increases (degradation problem) — NOT just overfitting. Skip connections: output = F(x) + x (residual connection adds the input directly to the layer output). Instead of learning H(x) directly, layers learn the residual F(x) = H(x) – x. If a layer is unnecessary, it can learn F(x) = 0 → output = x (identity mapping). Key benefits: Gradients can flow directly through skip connections → no vanishing gradient. Easier to optimize (can always revert to identity mapping). Enables training of 50, 101, 152 layer networks effectively. Architecture: Conv-BN-ReLU-Conv-BN + skip connection + ReLU. ResNet-50 uses bottleneck blocks: 1×1-3×3-1×1 convolutions. Impact: ResNet influenced almost all subsequent deep learning architectures: DenseNet, EfficientNet, Vision Transformers all use residual-like connections. The concept of skip connections spread beyond CV to NLP (Transformer residuals), audio, and reinforcement learning.

47. What is object detection in deep learning and what are the key architectures?

  1. Object detection is identifying what type of objects exist in a database of images
  2. Object detection is a computer vision task that identifies and localizes multiple objects within an image — outputting both class labels and bounding box coordinates for each detected object; key architectures include YOLO, SSD, Faster R-CNN, and DETR
  3. Object detection is the same as image classification — both output a single label per image
  4. Object detection only works on videos and cannot be applied to static image files

Answer : B
Explanation: Object Detection = Classification (what) + Localization (where), for multiple objects per image. Key architectures: Two-stage detectors: R-CNN family (R-CNN → Fast R-CNN → Faster R-CNN). Region Proposal Network (RPN) generates candidate regions, then classifier refines each region. High accuracy but slower. Faster R-CNN remains a strong baseline. One-stage detectors: YOLO (You Only Look Once) — single pass over the image, extremely fast. YOLOv8/YOLOv9/YOLO11 are state-of-the-art real-time detectors. SSD (Single Shot Detector) — multi-scale feature maps. Anchor-free: FCOS (Fully Convolutional One-Stage), CenterNet. Transformer-based: DETR (Detection Transformer, Facebook 2020) — uses Transformers and set prediction. Deformable DETR — faster convergence. Metrics: mAP (mean Average Precision) — standard evaluation metric. IoU (Intersection over Union) — measures overlap between predicted and ground truth boxes. Applications: Autonomous driving (detecting cars, pedestrians), surveillance, retail (shelf analysis), medical imaging (tumor detection), augmented reality.

48. What is semantic segmentation in deep learning?

  1. Semantic segmentation extracts the semantic (meaningful) keywords from text documents
  2. Semantic segmentation is a computer vision task that assigns a class label to every pixel in an image — understanding not just what objects are in an image but which pixels belong to each object class
  3. Semantic segmentation divides a dataset into semantically similar training and test groups
  4. Semantic segmentation is the process of splitting an image into grid segments for faster CNN processing

Answer : B
Explanation: Semantic Segmentation produces a pixel-wise classification map of the entire image. Difference from other tasks: Image classification: one label per image (“this is a cat”). Object detection: bounding boxes around multiple objects. Semantic segmentation: label for every pixel (all road pixels = road, all car pixels = car, etc.). Instance segmentation (Mask R-CNN): like semantic segmentation but distinguishes individual instances of the same class. Panoptic segmentation: combines semantic + instance. Key architectures: FCN (Fully Convolutional Network, 2015): first end-to-end trainable segmentation network. U-Net (2015): encoder-decoder with skip connections — state-of-the-art for medical image segmentation. DeepLab series: uses dilated convolutions for larger receptive field. SegFormer: Transformer-based segmentation. SAM (Segment Anything Model, Meta, 2023): foundation model for segmentation. Applications: Autonomous driving (road, lanes, pedestrians, vehicles), Medical imaging (tumor/organ segmentation), Satellite imagery analysis, Augmented reality, Robotics.

49. What is natural language processing (NLP) and how does deep learning improve it?

  1. NLP is the process of processing natural (spoken) language using microphones and audio hardware
  2. NLP is a branch of AI that enables computers to understand, interpret, and generate human language — deep learning dramatically improved NLP by replacing hand-crafted features with learned representations, enabling transformers to achieve human-level performance on many language tasks
  3. NLP using deep learning can only work with English and cannot be applied to other languages
  4. NLP is a subset of computer vision that processes text overlaid on images

Answer : B
Explanation: NLP Evolution: Pre-deep learning: rule-based systems, statistical methods (n-gram models, TF-IDF, SVMs), required manual feature engineering. Deep Learning NLP: Word2Vec/GloVe (2013-2014): learned word embeddings from large corpora — captured semantic relationships (king – man + woman ≈ queen). ELMo (2018): contextual word embeddings using BiLSTM — same word has different embeddings in different contexts. BERT (Google, 2018): bidirectional transformer pre-trained on masked language modeling — revolutionized NLP. GPT-2/3/4 (OpenAI): autoregressive transformers for text generation — led to ChatGPT. T5, LLaMA, Gemini, Claude: modern large language models. Key NLP tasks deep learning excels at: Sentiment analysis, Named Entity Recognition (NER), Machine translation, Question answering, Text summarization, Language generation, Conversational AI, Code generation. Pre-training + fine-tuning paradigm: pre-train on massive text corpus → fine-tune on specific task with small labeled dataset. Dramatically reduces labeled data requirements.

50. What is word embedding in deep learning?

  1. Word embedding is a compression technique that stores words in compressed binary format
  2. Word embedding is a technique that represents words as dense numerical vectors in a continuous vector space — where semantically similar words are positioned close together — enabling neural networks to process text mathematically while capturing meaning relationships
  3. Word embedding is the process of embedding HTML word formatting tags into plain text
  4. Word embeddings are only used in the output layer to convert neural network outputs to words

Answer : B
Explanation: Word Embeddings solve the problem of representing discrete words for neural networks. One-hot encoding (naive): each word is a sparse vector of size V (vocabulary) with a single 1. Problems: no semantic relationships, very high-dimensional and sparse. Word Embeddings: dense, low-dimensional vectors (50-1000 dimensions). Capture semantic relationships: king – man + woman ≈ queen. Similar words cluster together in embedding space. Word2Vec (Mikolov, 2013): learns embeddings from context. CBOW: predict a word from its context. Skip-gram: predict context from a word. GloVe (Pennington, 2014): learns from word co-occurrence statistics. FastText: handles out-of-vocabulary words using character n-grams. Contextual embeddings (modern): ELMo, BERT, GPT — different embedding for the same word in different contexts. “bank” near “river” vs. “bank” near “money” get different vectors. Applications: All NLP tasks use word embeddings as input. Semantic search, recommendation systems, document clustering. How to use: download pre-trained embeddings (GloVe, Word2Vec) or use model’s embedding layer.