Guide-linked quiz · Hard Level

Contrastive Learning Quiz

Practice contrastive positive pairs, embedding collapse, and temperature-scaled similarity, including how MoCo queues differ from inference caches.

Related guide pathsContrastive Learning
Question 1 of 8

What is the core objective of contrastive learning?

Preview every question8 questions

Answers and explanations appear as you take the quiz.

  1. What is the core objective of contrastive learning?
    • Pull similar (positive) pairs together and push dissimilar (negative) pairs apart in embedding space
    • Predict the exact pixel values of an image
    • Classify every input into one of a fixed set of labels
    • Minimize the number of model parameters
  2. In a self-supervised image method like SimCLR, how is a positive pair typically created?
    • Two different images of the same labeled class
    • An image and a randomly chosen image from the dataset
    • Two random augmentations (e.g., crops, color jitter) of the same image
    • An image paired with its segmentation mask
  3. Which loss function is most associated with contrastive learning?
    • Mean squared error
    • InfoNCE
    • Cross-entropy over class labels
    • Hinge loss for SVMs
  4. Why do methods like MoCo use a memory bank or queue?
    • To store labels for supervised fine-tuning
    • To cache the final predictions for faster inference
    • To compress the model for mobile devices
    • To supply many negative examples without needing an enormous batch size
  5. What problem do BYOL and SimSiam specifically guard against without using explicit negatives?
    • Overfitting to the training labels
    • Exploding gradients in the optimizer
    • Representation collapse, where all embeddings become identical
    • Vanishing learning rate
  6. How does CLIP extend the contrastive idea?
    • It aligns images with their text captions in a shared embedding space
    • It contrasts two augmentations of the same audio clip
    • It removes the need for any neural network
    • It uses reinforcement learning instead of similarity
  7. A contrastive image encoder maps every photo to the same vector. Which failure does this illustrate?
    • A useful separation of image categories
    • An increase in the number of negative samples
    • A perfect nearest-neighbor representation
    • Representation collapse
  8. Why is MoCo’s training queue different from caching completed inference responses?
    • It serves final chatbot responses without model execution
    • It supplies encoded comparison examples for a contrastive training objective
    • It replaces every positive image with a label
    • It removes the need to update any encoder

Keep testing yourself

More quizzes picked for your level.

View all quizzes