Data science Meets Intermittent Fasting

Back in the early 1990’s I attended Cal Poly San Luis Obispo and majored in Nutritional Science. I picked this degree because I was obsessed with being a professional athlete. I felt like studying Nutritional Science could give me an extra edge. I was first exposed to research about calorie restriction and aging.

I was also involved in self-experimentation in my Nutritional Biochemistry class. We centrifuged our own blood and calculated LDL, HDL, and total cholesterol levels. In the same class, we supplemented with megadoses of vitamin C and then captured our own urine to see what was absorbed. It turned out that nothing was absorbed in a healthy population of college students because the body intelligently responds to the absorption of nutrients by increasing absorption sensitivity when levels are low. Vitamin supplements are often a waste of money.

I took a year of anatomy and physiology and learned how to dissect the human body. In biochemistry, I learned about the Kreb cycle and how glycogen storage works 1. The body produces insulin in response to an increase in blood sugar and stores it in the liver and muscle tissues. If those areas are “full”, then it puts that glycogen into adipose tissue, “fat”. Likewise, when the body is out of glycogen or when aerobic activity is underway, fat tissue because the main fuel. This is our “extra” gas tank.

I also spent a year at Cal Poly as a failed Division I Decathlete walk on. One of the things I learned the hard way was that doing too much weight lifting was actively detrimental for performance in sports like running. I was 6’2” 215 lbs and could bench press 225 around 25 times (similar to an NFL linebacker’s bench press performance). I also ran the 1,500m (about a mile) in 4 minutes and 30 seconds and regularly was leading the pack in three-mile training runs with Division I long-distance runners. I could also dunk a basketball from near the free-throw line and ran the 100m in 10.9.

I was a good athlete, and well rounded, but actively worked for years too hard in doing the wrong types of exercises (bodybuilding). My work ethic was off the charts, but also ineffective and counterproductive for the sport I chose. I also overestimated my ability to simply walk on to a Division I sport where I hadn’t even done many of the activities, like Pole Vault. I almost made the team too. There was one person in front of me. In this part of my life though, almost didn’t count. This was the first thing I had tried my hardest at and completely failed.

As a former silicon valley software engineer I later discovered a word for this behavior: YAGNI. YAGNI stands for “You Ain’t Gonna Need It”. Just like the years I spent putting on 40 pounds of extra muscle that ultimately decreased my sports performance, you can work on the wrong things in software projects. Examples of this include building functionality that isn’t exposed in an application or using overly complex abstractions like advanced object-oriented programming. These techniques are literally “dead weight”. They are actively harmful because they took time to develop, which is time that could have been spent working on useful things and because they permanently slow down the project. Just like track and field example, some of the most motivated and talented people can be the worst abusers of adding unneeded complexity to a project.

The field of Nutritional Science has a YAGNI problem as well. Intermittent Fasting is a great example of a simplification technique. It works a lot like the way deleting half of a 2,000-word essay often makes it better. It turns out the decades of added “complexity” can be ignored and deleted: frequent snacks, breakfast, and ultra-processed foods 2.

You don’t need to eat breakfast or snacks. To further simplify, you don’t need to eat many times a day. It is a waste of time and money. You also don’t need ultra-processed foods: breakfast cereal, protein bars, or any other “man-made” food. It turns out YAGNI strikes again with our diet. You also don’t need to buy anything for it to work: books, supplements or meal plans.

In operational research and computer science, there is a well-known problem called the Traveling salesman problem 3. The problem is widely researched because there does not exist a perfect solution that finds the optimal route to travel among many cities. In common language, this means a solution is too complex to implement in the real world. It would take an increasingly long time to run a solution in relation to the data. Instead, computer science solves these problems using heuristics. A heuristic solution I wrote in graduate school isn’t particularly innovative, but it comes up with a reasonable solution 4. The way it works is to randomly pick a city, then when presented with possible routes, you always pick the shortest route. At the end solution, the total distance is calculated. You then rerun this simulation with however much time you have, and then pick the shortest distance.

Why is Intermittent Fasting so effective? It also skips past the unsolvable complexity of counting calories to lose weight. Intermittent Fasting is an effective heuristic. Instead of counting calories, you don’t eat during blocks of the day 5, 7. These blocks could be as follows:

Daily fasts:

  • 8 Hour Feeding Window or 16:8

    • 12pm-8pm
    • 7AM-3pm
  • 4 Hour Feeding Window or 20:4

    • 6pm-10pm
    • 7AM-11AM

Longer fasts with more complex patterns:

  • 5:2
    • five days of normal eating and two days of calorie restriction, typically 500 calories.
    • Alternate-day fasting
    • Eat normally one day and restrict calories another, typically 500 calories.

I have experimented mainly with Daily fasts of 16 hours or 20 hours. As a data scientist, nutritionist and serious athlete, I also come with data. I have data from 2011-2019 of my body weight 6. From the period of August 2019 to December 2019 I have mostly been on a 12:8 IF routine.

Body Weight

One thing I learned in analyzing body weight and experimenting with data is that a few small things, make a big difference:

  • Avoiding “man-made food”
  • Getting 8 hours of sleep (MBA and startups caused weight gain through sleep loss)
  • Daily exercise
  • Intermittent fasting
  • You cannot exercise your way out of a bad diet (Heart Rate was in low 40’s).

What is an example of a meal that is YAGNI?

Healthy Food

  • Mushroom Omelet with Avocado
    • Eggs
    • Shitake Mushrooms
    • Cheese
    • Avocado
    • Salsa

It only takes a few minutes to make, the fats and whole foods make you feel satiated and it is inexpensive.

When was I “fat”, it was in periods when I didn’t do the above: working crazy hours at startups, eating food that “man” made. Working out in a fasted state takes a bit of getting used to, but I found that it increases performance in many sports I do: bouldering, weight lifting, HIIT training, and Brazilian Jiu-Jitsu. Likewise, I am very productive in writing software, writing books and doing intellectual work. The main “hack” I add is the regular consumption of plain cold brew coffee and water.

My conclusion is that intermittent fasting is one of the best ways to dramatically enhance a person’s life. It costs nothing, is simple to do, especially if you practice it daily and it is backed by science. Why not try it?

This is from the essay chapter in the book Cloud Computing for Data Analysis.

References:

  1. https://en.wikipedia.org/wiki/Citric_acid_cycle
  2. https://www.health.harvard.edu/staying-healthy/eating-more-ultra-processed-foods-may-shorten-life-span
  3. https://en.wikipedia.org/wiki/Travelling_salesman_problem
  4. https://github.com/noahgift/or
  5. https://www.dietdoctor.com/intermittent-fasting
  6. https://github.com/noahgift/intermittent-fasting/blob/master/intermittent_fasting.ipynb
  7. https://www.nejm.org/doi/10.1056/NEJMra1905136
  8. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3151731/

Notes:

To cite this research: DOI

From NEJM, “Evidence is accumulating that eating in a 6-hour period and fasting for 18 hours can trigger a metabolic switch from glucose-based to ketone-based energy, with increased stress resistance, increased longevity, and a decreased incidence of diseases, including cancer and obesity.”

From NHS (Nurse’s Health Study), “Several lifestyle behaviors may influence whether or not a person can maintain energy balance over the long term. For instance, the consumption of sugar-sweetened beverages, sweets, and processed foods may make it harder to do so, whereas the consumption of whole grains, fruits, and vegetables might make it easier.”

Healthy Quantities

This also shows a data mining approach to solving obesity. Increase the quantity of Nuts, Fruits and Yogurt. Decrease or eliminate Potato Chips, Potatoes and Sugar-sweetend beverages (Note the ultra-processed and insulin spike link…). There are the top foods that contributed to weight gain:

  • Potato chips
  • Potatoes
  • Sugar-sweetened beverages

These are the top foods that are inversely associated with weight gain (weight loss):

  • Nuts
  • Fruits
  • Yogurt

Related