---
title: "Losses that Cook — paper by Ottoborgo et al. (2026)"
description: "A Topo+Dice mix offers the best overall balance and is clearly favoured by human judges. 16 references."
authors: ["Mattia Ottoborgo", "Daniele Rege Cambrin", "Paolo Garza"]
year: 2026
venue: "Findings of the Association for Computational Linguistics: ACL 2026"
source: "https://aclanthology.org/2026.findings-acl.1318/"
doi: "10.18653/v1/2026.findings-acl.1318"
licence: "CC BY 4.0 (ACL Anthology)"
licence_url: "https://creativecommons.org/licenses/by/4.0/"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/en/papers/ottoborgo-2026-losses-that-cook-topological-optimal/"
---
[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/ottoborgo-2026-losses-that-cook-topological-optimal/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2026](https://md.research.elamur.ai/free/en/papers/2026/page/35/) / Losses that Cook: Topological Optimal Transport for Structured Recipe Generation

# Losses that Cook: Topological Optimal Transport for Structured Recipe Generation

**Authors:** Mattia Ottoborgo, Daniele Rege Cambrin and Paolo Garza · **Year:** 2026 · **Venue:** [Findings of the Association for Computational Linguistics: ACL 2026](https://md.research.elamur.ai/free/en/venues/findings/) ([Findings of the Association for Computational Linguistics 2026](https://md.research.elamur.ai/free/en/venues/findings/2026/)) · **Publisher:** [Association for Computational Linguistics](https://md.research.elamur.ai/free/en/publishers/association-for-computational-linguistics/) · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

**Links:** [Publisher's page](https://aclanthology.org/2026.findings-acl.1318/) · [PDF](https://aclanthology.org/2026.findings-acl.1318.pdf) · [DOI 10.18653/v1/2026.findings-acl.1318](https://doi.org/10.18653/v1/2026.findings-acl.1318) · [OpenAlex](https://openalex.org/W7166872813)

**Citations:** 0 citations (OpenAlex, 2026-10-14)

## Summary
The paper argues that plain cross-entropy fine-tuning is a poor fit for recipe generation. It weights every token equally, yet a single wrong ingredient, quantity, time or temperature can make a recipe useless. The authors fine-tune Qwen3-4B with LoRA on 5,000 pasta, rice and sandwich recipes from RECIPE-NLG, plus 235 hand-written cooking questions on substitution, scaling, timing and similar skills. The output is a structured JSON with ingredients and steps. Their main contribution is a topological loss. It treats the ingredient section as a cloud of points in embedding space, using soft, probability-weighted embeddings for the prediction, and minimizes the Sinkhorn divergence to the reference cloud. This loss, along with Focal and Dice, is added to cross-entropy and evaluated with a new set of recipe-specific metrics. The topological term gives the most consistent gains on ingredient and action accuracy. Dice is strongest on temperature precision. A Topo+Dice mix offers the best overall balance and is clearly favoured by human judges. These improvements come purely from the training objective, with no larger model and no extra inference cost.

## Key points
- **Loss setup:** each custom loss is combined as 0.6·CE + 0.4·custom, and the mixed variant uses 0.6·CE + 0.2·Dice + 0.2·Topo.
- **Metrics:** the authors introduce Ingredient Recall, Quantity Precision, Action Precision, action and step edit distances, and Time and Temperature Precision, reported alongside ROUGE-1 and BERTScore.
- **Topological vs. CE:** on Qwen3-4B, the topological loss raises AP from 45.09 to 59.68, QP from 50.94 to 63.93 and IR from 35.98 to 48.59. Topo+Dice achieves the best R1 (31.90), BERTScore (90.99), QP (65.09) and TiP (61.95).
- **Baselines:** fine-tuned models beat non-fine-tuned Gemini 2.0 Flash, Qwen3-14B and Qwen3-4B on nearly all metrics, the exception being TeP, where Qwen3-14B scores best. The trends also hold for SmolLM3-3B and Qwen2.5-1.5B.
- **Human evaluation:** 3 experts compared outputs on 64 recipes, with Fleiss' κ = 0.69. Topo+Dice was preferred over CE overall in 62% of cases versus 11%, and its error rate was 7.8% against 24.0%. Code is published at github.com/DarthReca/losses-cook.

*Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.*

## Institutions

- [Politecnico di Torino](https://md.research.elamur.ai/free/en/universities/politecnico-di-torino/) — University, Turin, Italy · 11 works · 18 citations

📚 Shelves (5): [🖥️ Computer Science](https://md.research.elamur.ai/free/en/shelves/computer-science/) · 16,667 works · [🤖 Artificial Intelligence](https://md.research.elamur.ai/free/en/shelves/computer-science/artificial-intelligence/) · 16,194 works · [🎭 Arts and Humanities](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/) · 16,039 works · [🗣️ Language and Linguistics](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/language-and-linguistics/) · 15,891 works · [👁️ Computer Vision and Pattern Recognition](https://md.research.elamur.ai/free/en/shelves/computer-science/computer-vision-and-pattern-recognition/) · 2,869 works

## Cite

Cite as: Mattia Ottoborgo, Daniele Rege Cambrin and Paolo Garza. 2026. Losses that Cook: Topological Optimal Transport for Structured Recipe Generation. Findings of the Association for Computational Linguistics: ACL 2026.

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{ottoborgo2026losses,
  title = {{Losses that Cook: Topological Optimal Transport for Structured Recipe Generation}},
  author = {Mattia Ottoborgo, Daniele Rege Cambrin and Paolo Garza},
  booktitle = {Findings of the Association for Computational Linguistics: ACL 2026},
  year = {2026},
  doi = {10.18653/v1/2026.findings-acl.1318},
  url = {https://doi.org/10.18653/v1/2026.findings-acl.1318}
}
```

- [← previous Losing our Tail, Again: (Un)Natural Selection & Multilingual LLMs](https://md.research.elamur.ai/free/en/papers/vanmassenhove-2026-losing-our-tail-again-un/)
- [next → Lost in Activations: A Neuron-level Analysis of Encoders for Cross-Lingual Emotion Detection](https://md.research.elamur.ai/free/en/papers/singh-2026-lost-activations-neuron-level-analysis/)
- [↑ back to papers of 2026](https://md.research.elamur.ai/free/en/papers/2026/page/35/)

## References

16 references, 4 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

1. Elie Bakouch, Loubna Ben Allal, Anton Lozhkov, Nouamane Tazi, Lewis Tunstall, Carlos Miguel Patiño, Edward Beeching, Aymeric Roucher, Aksel Joonas Reedi, Quentin Gallouédec, Kashif Rasul, Nathan Habib, Clémentine Fourrier, Hynek Kydlicek, Guilherme Penedo, Hugo Larcher, Mathieu Morlon, Vaibhav Sriva… [find](https://scholar.google.com/scholar?q=Elie+Bakouch%2C+Loubna+Ben+Allal%2C+Anton+Lozhkov%2C+Nouamane+Tazi%2C+Lewis+Tunstall%2C+Carlos+Miguel+Pati%C3%B1o%2C+Edward+Beeching%2C+Aymeric+Roucher%2C+Aksel+Joonas+Reedi%2C+Quentin+Gallou%C3%A9dec%2C+Kashif+Rasul%2C+Nathan+Habib)
2. Michał Bień, Michał Gilski, Martyna Maciejewska, Wojciech Taisner, Dawid Wisniewski, and Agnieszka Lawrynowicz. 2020. RecipeNLG: A cooking recipes dataset for semi-structured text generation. In Proceedings of the 13th International Conference on Natural Language Generation, pages 22–28, Dublin, Ir… [find](https://scholar.google.com/scholar?q=Micha%C5%82+Bien%CC%81%2C+Micha%C5%82+Gilski%2C+Martyna+Maciejewska%2C+Wojciech+Taisner%2C+Dawid+Wisniewski%2C+and+Agnieszka+Lawrynowicz%2E+2020%2E+RecipeNLG%3A+A+cooking+recipes+dataset+for+semi%2Dstructured+text+generation%2E+In+Proc)
3. Weizhu Chen, Nan Duan, Yeyun Gong, Zhibin Gou, Jian Jiao, Chen Lin, Zhenghao Lin, Xiao Liu, Yelong Shen, Ruochen Xu, and Yujiu Yang. 2024. Not all tokens are what you need for pretraining. In Advances in Neural Information Processing Systems 37, NeurIPS 2024, page 29029–29063. Neural Information Pro… [find](https://scholar.google.com/scholar?q=Weizhu+Chen%2C+Nan+Duan%2C+Yeyun+Gong%2C+Zhibin+Gou%2C+Jian+Jiao%2C+Chen+Lin%2C+Zhenghao+Lin%2C+Xiao+Liu%2C+Yelong+Shen%2C+Ruochen+Xu%2C+and+Yujiu+Yang%2E+2024%2E+Not+all+tokens+are+what+you+need+for+pretraining%2E+In+Advances)
4. Marco Cuturi. 2013. Sinkhorn distances: lightspeed computation of optimal transport. In Proceedings of the 27th International Conference on Neural Information Processing Systems - Volume 2, NIPS’13, page 2292–2300, Red Hook, NY, USA. Curran Associates Inc. [find](https://scholar.google.com/scholar?q=Marco+Cuturi%2E+2013%2E+Sinkhorn+distances%3A+lightspeed+computation+of+optimal+transport%2E+In+Proceedings+of+the+27th+International+Conference+on+Neural+Information+Processing+Systems+%2D+Volume+2%2C+NIPS%E2%80%9913%2C+p)
5. Marco Cuturi and Gabriel Peyré. 2016. A smoothed dual approach for variational wasserstein problems. SIAM Journal on Imaging Sciences, 9(1):320–343. [find](https://scholar.google.com/scholar?q=Marco+Cuturi+and+Gabriel+Peyr%C3%A9%2E+2016%2E+A+smoothed+dual+approach+for+variational+wasserstein+problems%2E+SIAM+Journal+on+Imaging+Sciences%2C+9%281%29%3A320%E2%80%93343%2E)
6. Demis Hassabis and Koray Kavukcuoglu. 2024. Introducing gemini 2.0: our new ai model for the agentic era. The Keyword (Google Blog). Accessed: 2025-10-31. [find](https://scholar.google.com/scholar?q=Demis+Hassabis+and+Koray+Kavukcuoglu%2E+2024%2E+Introducing+gemini+2%2E0%3A+our+new+ai+model+for+the+agentic+era%2E+The+Keyword+%28Google+Blog%29%2E+Accessed%3A+2025%2D10%2D31%2E)
7. Edward J Hu, yelong shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2022. [LoRA: Low-rank adaptation of large language models](https://md.research.elamur.ai/free/en/papers/hu-2021-lora-low-rank-adaptation-large/). In International Conference on Learning Representations.
8. Khang Nhut Lam, My-Khanh Thi Nguyen, Huu Trong Nguyen, Vi Trieu Huynh, Van Lam Le, and Jugal Kalita. 2024. Enhancing transformer-based cooking recipe generation models from text ingredients. Journal of information and communication convergence engineering, 22(4):288–295. [find](https://scholar.google.com/scholar?q=Khang+Nhut+Lam%2C+My%2DKhanh+Thi+Nguyen%2C+Huu+Trong+Nguyen%2C+Vi+Trieu+Huynh%2C+Van+Lam+Le%2C+and+Jugal+Kalita%2E+2024%2E+Enhancing+transformer%2Dbased+cooking+recipe+generation+models+from+text+ingredients%2E+Journal+o)
9. J. Richard Landis and Gary G. Koch. 1977. The measurement of observer agreement for categorical data. Biometrics, 33(1):159. [find](https://scholar.google.com/scholar?q=J%2E+Richard+Landis+and+Gary+G%2E+Koch%2E+1977%2E+The+measurement+of+observer+agreement+for+categorical+data%2E+Biometrics%2C+33%281%29%3A159%2E)
10. Chin-Yew Lin. 2004. [ROUGE: A package for automatic evaluation of summaries](https://md.research.elamur.ai/free/en/papers/lin-2004-rouge-package-automatic-evaluation-summaries/). In Text Summarization Branches Out, pages 74–81, Barcelona, Spain. Association for Computational Linguistics.
11. Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár. 2017. [Focal loss for dense object detection](https://md.research.elamur.ai/free/en/papers/lin-2017-focal-loss-dense-object-detection/). In 2017 IEEE International Conference on Computer Vision (ICCV), pages 2999–3007.
12. Guoshan Liu, Hailong Yin, Bin Zhu, Jingjing Chen, Chong-Wah Ngo, and Yu-Gang Jiang. 2025. Retrieval augmented recipe generation. In 2025 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), pages 2453–2463. [find](https://scholar.google.com/scholar?q=Guoshan+Liu%2C+Hailong+Yin%2C+Bin+Zhu%2C+Jingjing+Chen%2C+Chong%2DWah+Ngo%2C+and+Yu%2DGang+Jiang%2E+2025%2E+Retrieval+augmented+recipe+generation%2E+In+2025+IEEE%2FCVF+Winter+Conference+on+Applications+of+Computer+Vision+%28)
13. Carole H. Sudre, Wenqi Li, Tom Vercauteren, Sebastien Ourselin, and M. Jorge Cardoso. 2017. Generalised Dice Overlap as a Deep Learning Loss Function for Highly Unbalanced Segmentations, page 240–248. Springer International Publishing. [find](https://scholar.google.com/scholar?q=Carole+H%2E+Sudre%2C+Wenqi+Li%2C+Tom+Vercauteren%2C+Sebastien+Ourselin%2C+and+M%2E+Jorge+Cardoso%2E+2017%2E+Generalised+Dice+Overlap+as+a+Deep+Learning+Loss+Function+for+Highly+Unbalanced+Segmentations%2C+page+240%E2%80%93248%2E)
14. Brandon T Willard and Rémi Louf. 2023. Efficient guided generation for llms. arXiv preprint arXiv:2307.09702. [find](https://scholar.google.com/scholar?q=Brandon+T+Willard+and+R%C3%A9mi+Louf%2E+2023%2E+Efficient+guided+generation+for+llms%2E+arXiv+preprint+arXiv%3A2307%2E09702%2E)
15. An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, Chujie Zheng, Dayiheng Liu, Fan Zhou, Fei Huang, Feng Hu, Hao Ge, Haoran Wei, Huan Lin, Jialong Tang, and 41 others. 2025. [Qwen3 technical report](https://md.research.elamur.ai/free/en/papers/yang-2025-qwen3-technical-report/). Preprint, arXiv:2505.09388.
16. Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger, and Yoav Artzi. 2020. Bertscore: Evaluating text generation with bert. In International Conference on Learning Representations. [find](https://scholar.google.com/scholar?q=Tianyi+Zhang%2C+Varsha+Kishore%2C+Felix+Wu%2C+Kilian+Q%2E+Weinberger%2C+and+Yoav+Artzi%2E+2020%2E+Bertscore%3A+Evaluating+text+generation+with+bert%2E+In+International+Conference+on+Learning+Representations%2E)

*Updated 1 November 2026*
