Transformer‐Based Contextual Modeling for Predicting Calories From Recipes

ABSTRACT Accurate estimation of calorie content from text‐based recipes is a challenging and non‐trivial problem in automated dietary analysis and nutrition‐aware computing. Existing methodstypically rely on shallow lexical features, sentence‐level embeddings, or modular regression pipelines that struggle to capture fine‐grained contextual and compositional information present in culinary text. In this paper, we propose an enhanced transformer‐based regression framework that leverages contextual token representations and token‐level attention pooling to directly predict calorie values from unstructured recipe descriptions. Unlike stacking‐based or embedding‐only approaches, the proposed model is fine‐tuned end‐to‐end, enabling task‐specific adaptation of representations and explicit weighting of calorie‐relevant tokens. Extensive experiments conducted using five‐fold cross‐validation demonstrate that the proposed model significantly outperforms traditional lexical baselines, pretrained sentence embedding methods, and the previously introduced stacking‐based transformer regression framework across all evaluation metrics. The proposed model achieves lower prediction error and higher explained variance, indicating superior calibration and generalization. These findings highlight the importance of token‐level modeling and attention‐based aggregation for text‐based nutritional prediction. The proposed framework establishes a new state of the art in text‐based caloric estimation and provides a strong foundation for future research in automated nutritional analysis and intelligent dietary support systems.

Authors

Institutions

Publication Details

Journal
Applied AI Letters
Published
2026-07-01
DOI
https://doi.org/10.1002/ail2.70036
Primary Topic
Nutritional Studies and Diet
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Transformer‐Based Contextual Modeling for Predicting Calories From Recipes

Md. Siam Ansary, Amina Brinto
Applied AI Letters
Nutritional Studies and Diet
article

Transformer‐Based Contextual Modeling for Predicting Calories From Recipes

Md. Siam Ansary, Amina Brinto
article en

Abstract

ABSTRACT Accurate estimation of calorie content from text‐based recipes is a challenging and non‐trivial problem in automated dietary analysis and nutrition‐aware computing. Existing methodstypically rely on shallow lexical features, sentence‐level embeddings, or modular regression pipelines that struggle to capture fine‐grained contextual and compositional information present in culinary text. In this paper, we propose an enhanced transformer‐based regression framework that leverages contextual token representations and token‐level attention pooling to directly predict calorie values from unstructured recipe descriptions. Unlike stacking‐based or embedding‐only approaches, the proposed model is fine‐tuned end‐to‐end, enabling task‐specific adaptation of representations and explicit weighting of calorie‐relevant tokens. Extensive experiments conducted using five‐fold cross‐validation demonstrate that the proposed model significantly outperforms traditional lexical baselines, pretrained sentence embedding methods, and the previously introduced stacking‐based transformer regression framework across all evaluation metrics. The proposed model achieves lower prediction error and higher explained variance, indicating superior calibration and generalization. These findings highlight the importance of token‐level modeling and attention‐based aggregation for text‐based nutritional prediction. The proposed framework establishes a new state of the art in text‐based caloric estimation and provides a strong foundation for future research in automated nutritional analysis and intelligent dietary support systems.

Applied AI LettersVol. 7(3)
Ahsanullah University of Science and Technology (BD), Dhaka Community Hospital Trust (BD)
Zero hunger
Openalex Percentile: Top 6%
Nutritional Studies and Diet
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Transformer‐Based Contextual Modeling for Predicting Calories From Recipes — Md. Siam Ansary, Amina Brinto · Applied AI Letters (2026) | TGRS Research Map | TGRS