[Paper Review] Dividing and Conquering Cross-Modal Recipe Retrieval: from Nearest Neighbours Baselines to SoTA
This paper proposes Cross-Modal k-Nearest-Neighbours (CkNN), a simple yet powerful non-parametric method for cross-modal recipe retrieval that uses precomputed image and text embeddings. By applying CkNN on self-supervised image and text encoders, the approach achieves state-of-the-art performance on Recipe1M (64.8% Recall@1) and generalizes effectively to Politics and GoodNews datasets, outperforming prior methods with minimal complexity and no end-to-end training.
We propose a novel non-parametric method for cross-modal recipe retrieval which is applied on top of precomputed image and text embeddings. By combining our method with standard approaches for building image and text encoders, trained independently with a self-supervised classification objective, we create a baseline model which outperforms most existing methods on a challenging image-to-recipe task. We also use our method for comparing image and text encoders trained using different modern approaches, thus addressing the issues hindering the development of novel methods for cross-modal recipe retrieval. We demonstrate how to use the insights from model comparison and extend our baseline model with standard triplet loss that improves state-of-the-art on the Recipe1M dataset by a large margin, while using only precomputed features and with much less complexity than existing methods. Further, our approach readily generalizes beyond recipe retrieval to other challenging domains, achieving state-of-the-art performance on Politics and GoodNews cross-modal retrieval tasks.
Motivation & Objective
- To address the lack of strong, simple baselines in cross-modal recipe retrieval, particularly for image-to-text matching.
- To enable fair comparison of individual model components—especially image and text encoders—across different methods.
- To establish a systematic framework for identifying strengths and weaknesses of encoders without relying on complex, end-to-end architectures.
- To improve state-of-the-art performance on Recipe1M using only precomputed features and minimal architectural modifications.
- To demonstrate generalization of the method beyond recipe retrieval to other challenging cross-modal retrieval tasks.
Proposed method
- CkNN uses k-nearest neighbours to retrieve matching text for a given image by measuring inter-modal distances in the embedding space.
- The method operates on independently trained image and text encoders that are optimized via a self-supervised contrastive objective, not end-to-end.
- Distance-based retrieval is performed using cosine similarity between precomputed image and text embeddings.
- Model comparison is enabled by evaluating different encoders (e.g., ResNet, AWE-Encoder) under the same CkNN framework to isolate component-level performance.
- The baseline is improved by applying standard triplet loss to the precomputed embeddings, enhancing alignment without retraining the encoders.
- The approach generalizes to other datasets like Politics and GoodNews by reusing the same hyperparameters and CkNN inference pipeline.
Experimental results
Research questions
- RQ1Can a simple kNN-based retrieval method on precomputed embeddings serve as a strong, competitive baseline for cross-modal recipe retrieval?
- RQ2To what extent can CkNN enable fair and systematic comparison of image and text encoder components across different models?
- RQ3Can insights from encoder comparison lead to significant performance gains on Recipe1M without end-to-end training or complex architectures?
- RQ4Does the proposed method generalize effectively to other cross-modal retrieval benchmarks beyond recipe retrieval?
- RQ5How does the performance of CkNN compare to state-of-the-art methods on diverse datasets like Politics and GoodNews?
Key findings
- CkNN achieves a Recall@1 of 64.8% on the image-to-text task for the Politics dataset, matching the best published results.
- On the GoodNews dataset, CkNN achieves a Recall@1 of 88.6%, matching the state-of-the-art performance.
- The method improves the state-of-the-art on Recipe1M to 64.8% Recall@1 by applying triplet loss to precomputed features, significantly outperforming prior SoTA.
- The baseline CkNN model alone achieves competitive performance on all three datasets without any end-to-end training or model-specific tuning.
- The framework enables clear attribution of performance gains to specific encoder components, simplifying ablation and model analysis.
- The approach generalizes well across domains, demonstrating strong performance on both recipe and non-recipe cross-modal retrieval tasks with identical hyperparameters.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.