NCA-GENM Question 14
Single answerYou are designing a multimodal AI model that processes both image and text data. During training, you notice that the model struggles to align features between the two modalities, leading to suboptimal performance. Which type of loss function can help improve the alignment between image and text features?
- A
Cross-entropy loss
- B
Contrastive loss
- C
Reconstruction loss
- D
Mean squared error (MSE)
Show answer and explanation
Correct answer: B
Explanation
Contrastive loss is effective in multimodal learning scenarios because it minimizes the distance between aligned features (e.g., image-text pairs) while maximizing the distance between unaligned features. This makes it ideal for tasks where feature alignment across different modalities, such as images and text, is critical.
- A. Incorrect.
Cross-entropy loss is commonly used for classification tasks but does not directly address the alignment of features across modalities like image and text.
- B. Correct.
Contrastive loss is specifically designed to encourage similar features from different modalities to be closer in the feature space, making it suitable for improving alignment between image and text features.
- C. Incorrect.
Reconstruction loss focuses on reconstructing input data from outputs (e.g., in autoencoders), but it does not explicitly align features across modalities.
- D. Incorrect.
Mean squared error (MSE) measures the average squared difference between predicted and actual values. While it is useful in regression tasks, it does not enforce alignment between features from different modalities.