Guide-linked quiz · Medium Level

Siamese Networks and Triplet Loss Quiz

Checks shared encoders, embedding distances, triplet margins and how hard-negative examples affect the learning signal. carefully.

Question 1 of 8

What is the defining architectural feature of a Siamese network?

Preview every question8 questions

Answers and explanations appear as you take the quiz.

  1. What is the defining architectural feature of a Siamese network?
    • Two or more identical branches that share the same weights
    • A single branch with no hidden layers
    • Separate networks with completely independent weights
    • A recurrent loop over time steps
  2. In triplet loss, what are the three inputs?
    • Input, hidden, output
    • Anchor, positive, and negative
    • Train, validation, test
    • Encoder, decoder, classifier
  3. What does the triplet loss objective enforce?
    • Anchor and negative should be identical
    • All embeddings should collapse to a single point
    • Anchor-positive distance should be smaller than anchor-negative distance by a margin
    • Positive and negative should have equal distance to the anchor
  4. Why is 'hard-negative mining' important for triplet loss training?
    • It removes all positives from training
    • It makes the network shallower
    • It replaces the distance metric with a label
    • Easy negatives already satisfy the margin and produce zero useful gradient
  5. What capability makes Siamese networks valuable for 'one-shot learning'?
    • They can compare a new input to a single reference and judge similarity, even for unseen classes
    • They need thousands of labeled examples per class
    • They only classify into fixed, predefined categories
    • They cannot generalize beyond training identities
  6. How does a Siamese network typically decide if two inputs match?
    • By summing their raw pixel values
    • By comparing the distance between their embedding vectors against a threshold
    • By counting the number of layers used
    • By assigning each a random class label
  7. For triplet loss max(0, d(a,p) − d(a,n) + m), let d(a,p)=0.2, d(a,n)=0.8 and m=0.3. What is the loss?
    • 0.3
    • 0.5
    • 0
    • 1.1
  8. What happens when a negative example is already farther from the anchor than the required margin?
    • The anchor and positive embeddings are discarded
    • The loss forces the negative closer to the anchor
    • The network switches to classification mode
    • The triplet loss becomes zero and that example gives no useful gradient

Keep testing yourself

More quizzes picked for your level.

View all quizzes