• Unified API
  • Mobile SDK
  • Connection Widget
  • Streaming
  • Lab Reports API
  • Graph API
  • Health Scores
  • Health Rewards
  • Planned Workouts
  • Lab Testing
  • AI Interface
  • Enterprise
  • Insurance
  • Integrations
  • Research
  • Podcast
  • Blog
  • Reports
  • Events
  • Documentation
  • Community
  • Example apps
  • Wearable Data
  • About
  • Customers
  • Partners
  • Careers
  • Support
  • Pricing
Terra
Pricing
Become an integrationGet started

Cookie Preferences

Essential CookiesAlways On
Advertisement Cookies
Analytics Cookies

Crunch Time: Embrace the Cookie Monster Within!

We use cookies to enhance your browsing experience and analyse our traffic. By clicking “Accept All”, you consent to our use of cookies according to our Cookie Policy. You can change your mind any time by visiting out cookie policy.

Cookies Policy
All papers
All papers

In this research paper:

  • 01The Problem
  • 02The Scale of Data
  • 03Modeling
  • 04Final Results
  • 05Something To Play Around With
  • 06Summary questions

Nutrition

Most of What People Eat Isn't in Any Food Database

What 3.7 million meal logs reveal about predicting a food's nutrients from its name, and why public databases barely help.


Faraaz Akhtar
Faraaz AkhtarAI and Health Researcher
·
Kyriakos Eleftheriou
Kyriakos EleftheriouCEO

29 September 2026

Key takeaways

  • We analyzed 3.7 million meal logs containing 1.15 million distinct food names. Only 31,081 of those names, under 3%, appear in USDA FoodData Central or Open Food Facts.
  • A food's name plus its calories predicts its nutrients with a median R² of 0.78 across 15 nutrients, on foods the model had never seen.
  • Training on Terra data rescued the nutrients people rarely log. For nutrients present in under 35% of meals, R² rose from 0.13 to 0.68 after fine-tuning; vitamin A alone gained 0.68.

The Problem

Yes, I know you’ve heard it before, “Use AI and track your calories!”, but that’s not really what I wanted to talk about in this blog. We are a research division after all.

I was recently looking into our nutrition and meal data; it’s not a table I’ve looked at very carefully before. While I was there, I found out, unsurprisingly, that most of it was empty. Often, people would just type down what they were eating in phrases. Sometimes I’d have some information about carbs or protein content.

But we had a lot more columns in our table—the following table gives how populated each column was;

Nutrient% Filled
Calories98.6
Protein89.1
Carbs86.2
Fats83.2
Sodium74.6
Sugar66.0
Saturated fat65.8
Calcium52.7
Fibre51.3
Potassium50.8
Iron47.9
Cholesterol29.1
PUFA27.3
MUFA26.2
Vitamin C19.4
Vitamin A16.9
Vitamin D8.6
Trans fat4.1

I wanted to see how much of this table I could fill up despite it not being logged. The problem with most AI nutrition apps at the moment is that they try to predict calories. This is inherently a difficult problem and often the information required to calculate this number simply does not exist. In our own tests, on item-level names our calorie predictions had an MAE of 57.8 kcal and for free-text meal descriptions that number rose to 161.7 kcal. 

These errors cannot be modeled away, it is impossible to tell exactly how a dish was prepared simply from a text description or image.

However, what we found was possible, was estimating nutrition density, i.e., given a text description of a dish and the number of calories in the dish, can we figure out its nutritional information? 

We tested the full relational hypothesis too, given certain information such as name, carbs, protein, would we get better at predicting fats? This is a much more statistically motivated question, as these quantities may not be as orthogonal as they seem.

Get the latest Terra Research reports and insights every week as soon as they're published.

By continuing, I agree to the Privacy Policy and Terms of Service.

The Scale of Data

We had a couple sources of data for this project, our own internal database and public USDA FoodData Central, and Open Food Facts databases. Although these datasets contained similar information and were similarly sized, we found extreme disjointness in the way the food names were present in public databases and the way they were typed into food-tracking apps by people.

food-name-overlap-public-database-vs-meal-logs.png

Modeling

This scale and disjointness finding informed how we were modeling our predictor. As the public databases are a lot more complete, we decided to do a pre-train on them, after which we fine-tuned our model on Terra data. The name was encoded using a text-transformer, which gave us substantial gains against a method like token matching.

We found that this pre-train and fine-tune pipeline gave us an increase precisely where the public databases were struggling. We looked at $R^2$ values across heads that had high coverage in public databases and how values increased after the fine-tune. 

Heads under 35% public coverage averaged at 0.126 after the pre-train and gain +0.552 after fine-tuning. Heads with over 90% coverage averaged 0.503 after the pre-train and gained only +0.242.

public-food-data-pretraining-vs-finetuning (1).png

We excluded vitamin A from the public corpus as we found very different nutrition densities in our own dataset and the public dataset. We reasoned this to be some sort of unit technicality, but were unable to resolve it. Vitamin A was also the head that had the largest increase after out fine-tune at +0.681.

Final Results

Our final median $R^2$ across 15 nutrients was 0.781, where the model was given name and calorie count. It scored this median across food names it had never seen. However, we still can’t escape the fact that food name tells us nothing about how that food was prepared. Any preparation information only comes from calories in the food, and we see this in the way our error scales.

nutrient-estimation-error-macros-vs-micronutrients.png

There was also a very clear rise of prediction accuracy as more information became available, however, most information seemed retrievable from name alone.

predicting-nutrition-from-food-name-accuracy.png

Correlation among nutrients was also calculated, which explains the rise seen in the previous plot.

nutrient-correlation-matrix-meal-logs.png

My conclusion from all of this was that we often leave a lot on the table with nutritional information, and when calories are present and more detail is wanted, this is a greatly achievable task. Furthermore, algorithms behind calorie estimation are often hidden and my hope is that this blog gives some idea as to what the errors in any nutritional estimation task look like.

Something To Play Around With

We’ve distilled this model to serve a lightweight version below. Performance is worse by an R² of around 0.166, but play around and maybe you’ll find something of interest!

Summary questions

How complete is the nutrition data people actually log in tracking apps?
Extremely patchy beyond the basics. Calories were filled in 98.6% of entries and macros hovered around 83-89%, but micronutrients dropped off a cliff: Vitamin C at 19.4%, Vitamin A at 16.9%, Vitamin D at 8.6%, and trans fat at just 4.1%. Most people log a meal name and calories, then leave the rest of the nutritional picture blank.
Can AI actually predict calories accurately from what I type into a food tracker?
Not really — and this is a fundamental limit, not a modeling failure. On clean item-level names the MAE was 57.8 kcal, but on free-text meal descriptions like what people actually type, error rose to 161.7 kcal. You can't tell from text or an image how much oil went into the pan, so calorie prediction has an irreducible error floor.
If calorie prediction is so noisy, what can wearable and app data actually estimate well?
Nutrient density, given a name and a calorie count. Across 15 nutrients, the model hit a median R² of 0.781 on food names it had never seen before. The reframing matters: don't ask AI to guess how many calories are in your meal — ask it to fill in the protein, fiber, sodium, and micronutrients once calories are known.
Why do public food databases like USDA fall short for real-world meal logging?
Because there's extreme disjointness between how foods are named in USDA FoodData Central or Open Food Facts and how people actually type meals into apps. That's why pre-training on public data alone left large gaps — heads with under 35% public coverage sat at an R² of just 0.126 after pre-training. Fine-tuning on real user-logged data added +0.552 to those weak heads.
Does knowing the meal name alone tell you much about its nutrition?
Surprisingly, yes — most nutritional information is retrievable from name alone, because nutrient values are highly correlated with each other. Adding more inputs raised accuracy further, but the biggest jump comes from just having the dish name plus calories. What name cannot tell you is preparation method, and that's why calories remain the key signal for anything cooking-related.
Why was Vitamin A handled differently in the modeling?
Vitamin A had to be excluded from the public data corpus because nutrient densities differed drastically between Terra's internal data and public databases — likely a unit convention issue that couldn't be resolved. Notably, Vitamin A also saw the largest gain from fine-tuning, at +0.681 R². It's a good example of why domain-specific fine-tuning matters when public datasets have hidden inconsistencies.
Does adding more logged nutrients actually help predict the missing ones?
Yes, measurably. Giving the model additional inputs like carbs and protein improved fat prediction, because these quantities aren't statistically orthogonal. Nutrient correlations do real work here — which is why filling in even a couple of macros dramatically improves the model's ability to reconstruct the rest of the nutrition profile.
How much accuracy do you lose with a lightweight, distilled version of the model?
About 0.166 in R² compared to the full model, which drops median performance from 0.781 to roughly 0.615 across the 15 nutrients. That's a meaningful hit but still usable for filling in reasonable estimates of micronutrients that would otherwise be blank in 50-95% of logged meals.
Faraaz Akhtar
Faraaz Akhtar

Faraaz Akhtar is an AI & Health Researcher at Terra API, where he develops statistical and machine-learning methods to extract insights from large-scale wearable health data.

Kyriakos Eleftheriou
Kyriakos Eleftheriou

Kyriakos Eleftheriou is the Founder and CEO of Terra API.

next ventures
pioneer fund
samsung next
y combinator
general catalyst

The world's best health apps run on Terra data

Get started
ProductsIntegrationsAI InterfaceAuthenticationMobile DevelopmentDocumentationGraphAPI
DocumentationAPISDKQuickstartExample Apps
CommunityBlogResearchCommunityPodcastAuthorsGithub
CompanyAboutCareersCustomersBecome an IntegrationCookies PolicyGDPRPrivacy PolicyTerms of Purchase
© Terra API. 2026 — All rights reserved.
Previous
Next

Continue reading

How Accurate is Your Wearable VO₂max?
VO2 Max

How Accurate is Your Wearable VO₂max?

What lab VO₂max tests reveal about where wearable estimates go wrong, and the single input that drove most of the error.

2 October 2026

Why VO2 Max Predicts How Long You'll Live
VO2 Max

Why VO2 Max Predicts How Long You'll Live

What VO2 Max actually measures, why each extra MET is linked to a 13% lower risk of death, and what 18 years of testing my own has taught me about raising it.

24 September 2026

Your Daily Calorie Burn Depends on Which Watch You're Wearing
Calories Tracking

Your Daily Calorie Burn Depends on Which Watch You're Wearing

What 846,312 workouts and 1.5 million days across wearable devices reveal about which calorie numbers you can compare, and which you can't.

22 September 2026

How Your Watch Actually Comes Up With Your Vo2 max
VO2 Max

How Your Watch Actually Comes Up With Your Vo2 max

A sports watch turns power, pace and heart rate into a Vo2 Max through a chain of estimates. Here's each step, and where it can go wrong.

17 September 2026