Paper · Deep Fragment Embeddings for Bidirectional Image Sentence Mapping
Open the sourceThis paper, co-authored by Karpathy with Joulin and Fei-Fei, teaches that image-sentence retrieval improves when both images and sentences are broken into fragments (detected objects and dependency-tree relations) embedded in a common space. The authors combine a new Fragment Alignment Objective, extended with Multiple Instance Learning to infer latent alignments, with a Global Ranking Objective, and show through ablations that the two are complementary and that the explicit alignments make predictions interpretable.
- Images and sentences are decomposed into fragments: RCNN object detections plus the full frame, and typed dependency tree relations. - Image-sentence similarity is computed as a fixed function (thresholded average) of pairwise fragment inner products. - A Fragment Alignment Objective uses a Multiple Instance Learning extension, since not every fragment in a pair actually corresponds. - Fragment and global ranking objectives provide complementary information, and combining them beats either alone. - Ablations show that object representations beat a fullframe-only CNN and that dependency relations beat bag-of-words or bigram fragments. - The paper openly lists limitations: no counting, no spatial reasoning, and sentences treated as bags of relations.
Based on Andrej Karpathy's public content. Not affiliated with or endorsed by Andrej Karpathy.
Supports these rules
Quotes from this video
“Our core insight is that images are complex structures that are made up of multiple interacting entities that the sentences make explicit references to.”
“reasoning on both the global level of images and sentences and the finer level of their respective fragments significantly improves performance on image-sentence retrieval tasks.”
“both objectives perform well but there is a noticeable improvement when the two are combined, suggesting that the objectives bring complementary information to the cost function.”
“We discard the tree structure in favor of a simpler model”
“We did not explicitly filter, spellcheck or normalize any of the sentences for simplicity.”
“Since both Multiple Instance Learning and CNN finetuning benefit from a good initialization, we run the first 10 epochs with the fragment alignment objective C0 and CNN weights θc fixed.”
“the CNN. The word embedding matrix We is kept fixed due to overfitting concerns.”
“we remove all relation types that occur less than 1% of the time in each dataset.”
“The alignment in our model is explicitly inferred on the fragment level, which allows us to interpret the scores between images and sentences.”