Large language models for ingredient substitution in food recipes using supervised fine-tuning and direct preference optimization

dc.citation.volume12
dc.contributor.authorSenath T
dc.contributor.authorAthukorala K
dc.contributor.authorCosta R
dc.contributor.authorRanathunga S
dc.contributor.authorKaur R
dc.date.accessioned2025-12-03T01:48:12Z
dc.date.issued2025-09
dc.description.abstractIn this paper, we address the challenge of recipe personalization through ingredient substitution. We make use of Large Language Models (LLMs) to build an ingredient substitution system designed to predict plausible substitute ingredients within a given recipe context. Given that the use of LLMs for this task has been barely done, we carry out an extensive set of experiments to determine the best LLM, prompt, and the fine-tuning setups. We further experiment with methods such as multi-task learning, two-stage fine-tuning, and Direct Preference Optimization (DPO). The experiments are conducted using the publicly available Recipe1MSub corpus. The best results are produced by the Mistral7-Base LLM after fine-tuning and DPO. This result outperforms the strong baseline available for the same corpus with a Hit@1 score of 22.04. Although LLM results lag behind the baseline with respect to other metrics such as Hit@3 and Hit@10, we believe that this research represents a promising step towards enabling personalized and creative culinary experiences by utilizing LLM-based ingredient substitution.
dc.description.confidentialfalse
dc.edition.editionSeptember 2025
dc.identifier.citationSenath T, Athukorala K, Costa R, Ranathunga S, Kaur R. (2025). Large language models for ingredient substitution in food recipes using supervised fine-tuning and direct preference optimization. Natural Language Processing Journal. 12.
dc.identifier.doi10.1016/j.nlp.2025.100177
dc.identifier.eissn2949-7191
dc.identifier.elements-typejournal-article
dc.identifier.number100177
dc.identifier.piiS2949719125000536
dc.identifier.urihttps://mro.massey.ac.nz/handle/10179/73894
dc.languageEnglish
dc.publisherElsevier B.V.
dc.publisher.urihttps://www.sciencedirect.com/science/article/pii/S2949719125000536
dc.relation.isPartOfNatural Language Processing Journal
dc.rightsCC BY 4.0
dc.rights(c) 2025 The Author/s
dc.rights.urihttps://creativecommons.org/licenses/by/4.0/
dc.subjectNatural language processing
dc.subjectParameter-efficient fine-tuning
dc.subjectMulti-task learning
dc.subjectTwo-stage fine-tuning
dc.subjectDirect preference optimization
dc.subjectRecipe personalization
dc.subjectMistral
dc.titleLarge language models for ingredient substitution in food recipes using supervised fine-tuning and direct preference optimization
dc.typeJournal article
pubs.elements-id608342
pubs.organisational-groupOther

Files

Original bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
608342 PDF.pdf
Size:
878.18 KB
Format:
Adobe Portable Document Format
Description:
Evidence

License bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
license.txt
Size:
9.22 KB
Format:
Plain Text
Description:

Collections