Cross-lingual Adaptation for Recipe Retrieval with Mixup

Bin Zhu, Chong-Wah Ngo, Jingjing Chen, Wing Kwong Chan

Abstract

Cross-modal retrieval between images and recipes is a challenging task, particularly when labeled data is unavailable for a target language. This paper presents a novel approach to Unsupervised Domain Adaptation (UDA) for recipe retrieval using "Recipe Mixup" (RM). By performing discrete section-swapping between source-language (English) and target-language (Chinese) recipes, the method constructs an intermediate domain that bridges the linguistic and culinary gap. Combined with a loss function based on Grassmann manifold geodesics, this approach achieves significant improvements in retrieval performance on the Vireo-FoodTransfer dataset without requiring paired target-domain data.

1. Introduction

The proliferation of food-related social media has increased the demand for image-to-recipe retrieval systems. While performance is high for data-rich languages like English, many other languages lack the large-scale paired datasets (images with corresponding recipes) necessary to train robust models. This work addresses the problem of cross-lingual, cross-modal retrieval in an unsupervised setting, where a model is trained on a source domain with paired data (English) and adapted to a target domain (Chinese) where only recipe text is available.

2. The Challenge of Cross-Lingual Retrieval

Adapting a model from English recipes to Chinese recipes involves overcoming two primary obstacles:

  1. The Modality Gap: The fundamental difficulty of mapping high-dimensional visual features (pixels) to semantic textual descriptions.
  2. The Domain Gap: This includes both the linguistic difference between English and Chinese and the cultural difference in ingredients, cooking techniques, and recipe structures.

Traditional UDA methods often fail in this context because they do not account for the structured nature of recipes, which typically consist of distinct sections: titles, ingredients, and instructions.

3. Proposed Method: Recipe Mixup

The core innovation of this research is Recipe Mixup (RM), a discrete adaptation of the "mixup" augmentation strategy commonly used in computer vision.

3.1 Discrete Section Swapping

Unlike images, which can be linearly interpolated, recipes are discrete text sequences. The authors propose creating "mixed" recipes by swapping specific components—Title, Ingredients, or Instructions—between source and target recipes. For instance, a "source-mixed" recipe might combine the structure of an English recipe with the ingredient list of a Chinese recipe.

3.2 Architecture and Manifold Optimization

The system utilizes a dual-encoder architecture:

  • Text Encoder: A pre-trained multilingual BERT model to extract features from recipe text.
  • Image Encoder: A ResNet-50 backbone for visual feature extraction.
  • Domain Discriminator: An adversarial component that encourages the model to learn language-invariant representations.

To refine the adaptation, the authors introduce a specialized loss function derived from the theory of Grassmann manifolds. This loss constrains the embeddings of the mixed recipes to lie on the shortest geodesic path between the source and target domains. This geometric constraint ensures that the intermediate "mixed" domain serves as an effective bridge, preventing "negative transfer" where the model might otherwise learn irrelevant or conflicting features.

4. Experimental Evaluation

4.1 Datasets and Preprocessing

The models were evaluated using two major benchmarks:

  • Source Domain: Recipe 1M (341,421 English recipe-image pairs).
  • Target Domain: Vireo-FoodTransfer (70,985 Chinese recipes). During training, the images for the Chinese recipes were withheld to simulate the unsupervised setting.

To bridge the vocabulary gap, the authors employed K-Means clustering to map thousands of unique ingredients into a unified set of 1,000 semantic labels (e.g., grouping "tomato puree" and "tomato paste").

4.2 Key Results

The performance was measured using Median Rank (MedR)—where lower is better—and Recall at K (R@K). The proposed Recipe Mixup (specifically the RM4 variant, which swaps Title and Ingredients) demonstrated a clear advantage over the previous state-of-the-art (CCFT):

  • MedR: Improved from 128.0 (CCFT) to 114.6 (RM4).
  • R@50: Increased from 30.33% to 34.16%.

While these results represent a significant step forward for unsupervised methods, they still trail the "Oracle" model (trained with full supervision on Chinese pairs), which achieves a MedR of 2.1.

5. Discussion and Insights

The study revealed several critical insights into cross-lingual adaptation:

  • The Primacy of Ingredients: Swapping the ingredient section yielded the highest performance gains. Ingredients serve as the most informative and universal anchor between different cuisines compared to instructions, which are often noisier.
  • Directionality of Mixup: The authors found that creating mixed recipes starting from the source domain (English recipes with Chinese components) was more effective than using a bidirectional approach. Attempting to satisfy two different geodesic paths simultaneously appeared to create optimization conflicts.
  • The Role of Translation: Despite the use of multilingual BERT, explicit machine translation of target recipes into the source language still provided a significant performance boost, suggesting that current multilingual models still struggle with domain-specific nuances in cooking.

6. Conclusion

Recipe Mixup provides a novel framework for bridging the gap between languages and modalities in the culinary domain. By leveraging the structured nature of recipes and geometric constraints on the embedding space, the method significantly improves retrieval in unsupervised scenarios. Future work will focus on reducing the dependency on machine translation and addressing the "cuisine gap" for culturally unique dishes that lack direct counterparts in the source domain.

Summary updated

BibTeX
@inproceedings{zhu2022cross,
  author = {Bin Zhu and Chong-Wah Ngo and Jingjing Chen and Wing Kwong Chan},
  title = {{Cross-lingual Adaptation for Recipe Retrieval with Mixup}},
  booktitle = {ICMR},
  year = {2022},
  doi = {10.1145/3512527.3531375},
}
Figure