Monthly Archives: February 2013

Two simple ways to improve sleep and wakefulness

Summary: We produce our own sleepiness hormone, but only in darkness
Action needed: Avoid bright lights in the evening; try to see natural light in the morning

It was a rainy morning here in Singapore, which makes me glad to have a source of 480 nm light. Let’s see why..

Slaves to the clock

The existence of daily (“circadian”) rhythms is well-known. There are documented downsides to running out of sync with the environment for some species: later flowering and reduced viability for plants, and small (< 20%) lifespan reductions for hamsters [1]. Amazingly, this clock system mechanism is present in individual cells, but they must be synchronized via input from a master clock in the brain [2]. It is therefore important to keep the master clock in sync with the environment.

Reprogramming

Besides interference from chronic alcohol intake [3], the main external influence is the light-dark cycle. A hormone called melatonin is heavily involved; it attenuates the wake-promoting signal of the circadian pacemaker [11], thus leading to sleepiness. Its synthesis is dramatically affected by light exposure to the eyes; levels are very low during the day [4]. They peak around 0400 [11], when wakefulness and alertness are minimal (useful for raids, hence the term “KGB hour”). Light exposure causes a phase shift in the rhythm whose direction depends on the current perceived time [6].

Evening

Unfortunately, we are constantly delaying our internal clock by exposure to bright light in the evenings [12]. This is the source of the mistaken belief that our preferred day length is 25 hours – test subjects were allowed to use electric lighting before sleep [5]. In fact, our timer periods are remarkably close to 24 hours, with an error of only 0.7%. [5]

More exposure to light causes corresponding melatonin inhibition; ordinary fluorescent lamps are sufficient, and the maximum is reached after an hour of bright light [7] (easily exceeded by computer monitors). To avoid desyncing our clocks and affecting sleep, we should dim lights in the late evening, avoid computer and TV screens, and possibly even wear sunglasses.

This reminds me of Edison’s poster with bold claims of being “in no way harmful to health”. Something to reflect upon: how many of our current practices will viewed as ignorant/hubristic/naïve by future generations?

Morning

Conversely, bright light in the morning is helpful for increasing wakefulness, for example by simply gazing into the dawn sky [9]. If natural sunlight is lacking, how can it be emulated? Maximum responsiveness for the relevant photoreceptors (which interestingly are separate from the well-known rods and cones) is reported at 480 nm [8,10], which corresponds to blue light. In fact, there is a broad peak between 450 and 500 nm [9]. However, other photopigments with absorption maxima closer to 420 nm also play a part [10]. Lights with a bluish tinge will therefore be more effective than green.

Melatonin

We have seen that light affects melatonin in both undesirable and potentially helpful ways. There is also the option of melatonin supplements. When taken close to the target bedtime after long flights, it does indeed decrease symptoms of jet lag [11], but probably only because it increases sleepiness [12]. However, beware: “Oral doses (1 to 5 mg) [..] result in serum melatonin concentrations that are 10 to 100 times higher than the usual night time peak”. To maintain concentrations within the normal range, the dose must be much lower – 0.1 to 0.3 mg [7].

Other clocks

Rounding out the discussion, there exist other clocks, for example in the liver [2], that are not directly synchronized to the master clock [14]. A hormone called leptin acts as a feedback signal from adipose tissue (fat deposits) to the brain that too much energy has been consumed [13]. The leptin rhythm can be shifted independently of the circadian rhythm by simply altering meal times [13]. To ensure the feedback works as desired, we should maintain regular meal times and avoid midnight snacks.

References

[1] http://www.plantphysiol.org/content/129/2/576.full
[2] http://166.111.93.130/~jzlei/teaching/sysbio2009/Reppert_Nature_2002.pdf
[3] http://integrativehealthconnection.com/wp-content/uploads/2011/11/Alcohol-Consumption-and-the-Bodys-Biological-Clock.pdf
[4] http://www.vivo.colostate.edu/hbooks/pathphys/endocrine/otherendo/pineal.html
[5] http://news.harvard.edu/gazette/1999/07.15/bioclock24.html
[6] http://www.cdb.riken.jp/lsb/jpn/publications/20071111.pdf
[7] http://www.scoliosisjournal.com/content/2/1/6
[8] http://bioweb.usu.edu/neuro/pdfs/melanopsin%20-%20panda%20et%20al.pdf
[9] http://www.neurosci.umn.edu/courses/4151/4151-papers/Clark_discussion.pdf
[10] http://www.jneurosci.org/content/22/1/RC191.full.pdf
[11] http://www.chronobiology.ch/publications/2003_09.pdf
[12] http://ajpregu.physiology.org/content/282/2/R454.long
[13] http://www.ncbi.nlm.nih.gov/pmc/articles/PMC508375/pdf/1001882.pdf
[14] http://njc.rockefeller.edu/pdf2/StokkanScience01.pdf

What exactly is that flour doing to you?

Summary: commercial flour has numerous health/nutritional issues
Action needed: do our own milling, or at least use unbleached whole flour.

The book Nourishing Traditions emphasizes the importance of soaked and fermented whole grains. Today I did some reading in order to corroborate or reject this claim. Indeed we can find four problems with flour as available today:

Mold toxins

Contamination of grains by mold is a major problem, as evidenced by a multitude of papers on the topic. “Aflatoxin is a naturally occurring toxin produced by the fungus Aspergillus flavus. This toxin is the most potent carcinogen found in nature.” [1] “The aflatoxins, particularly aflatoxin B1 should be regarded as a quadruple threat, i.e., as a potent toxin, carcinogen, teratogen and mutagen. AFB1 induces liver cancer in several animal species, and has also been linked to liver cancer in human beings.” [2] Metabolites of aflatoxin make their way into the milk of animals fed with contaminated feed, and survive pasteurization intact [2].

Unfortunately, small and medium farms might lack the equipment and knowledge for proper storage, leading to 3.2 and 1.75 times higher mold concentrations as compared to large enterprises [3]. Lest this study be dismissed as specific to Lithuania, US corn production also has a massive problem: “All of the commercial hybrids had high levels of aflatoxin accumulation […]. Aflatoxin levels for all hybrids greatly exceeded the FDA threshold level [by factors of 5 to 400].” [1]

What can we do?

  1. Storage conditions have a large influence; specialized granaries may offer better conditions than small family farms [3].
  2. Alternative types of grains may be less prone to contamination. The same study found that wheat was 3 to 8 times higher in toxin levels than barley [3].
  3. Toxin production also depends on agricultural practice. Stress such as insect damage predisposes plants to infection. Competition with other (beneficial) soil microbes also inhibits toxin biosynthesis [15].

The third point seems at odds with the first – industrial agriculture would tend towards unhealthy monocultures, but may offer better storage conditions. One thing is for certain: my previous assumption – that flour of a given type does not differ between brands – is incorrect. Unfortunately, it is unclear how we can differentiate between contaminated and safe flour.

Bleaching

Apparently driven by an irrational desire for ‘purity’ (at least in terms of color), most commercial flour is bleached white. Enter the law of unintended consequences: “increased levels of neurodegenerative disorders in humans may have arisen due to inclusion in the diet of methionine sulfoximine (MSO), a byproduct of the bleaching of flour by nitrogen trichloride. MSO acts directly to inhibit the production of two crucial molecules, glutathione (GSH) and glutamine. Decreases in GSH, a key antioxidant and free radical scavenger, diminish the body’s antioxidant defenses and may lead to increased oxidative stress.” [8]

The introduced chlorine is almost completely (99.3%) incorporated into the flour [9]. Although no concrete evidence of damage from chlorination was found, “the toxicological significance of chlorine-modified carbohydrates is not known. The potential formation of halocarbons from carbohydrates raises some concern about their production in treated flour.” [9] Indeed, “exposure to [higher levels of] chlorinated flour lipids in the diet for 2 weeks reduced the growth rate and increased relative liver weights in rats”. [9]

Sounds like we are better off avoiding bleached flour.

Rancidity

Flour rancidity (oxidation of unsaturated fatty acids) occurs within 10 days [5]; storage of flour for 30 days markedly reduces the protein quality [4]. Finally, rancidity results in mutagen and carcinogen aldehydes [4]. There is a simple solution: storage in whole-grain form slows rancidity development [5]; milling the grain immediately before use ensures freshness. Refrigeration would also slow enzyme activity [16].

Nutrients

The term “empty calories” is well-known. How does this come about?

  • Discarding the bran and germ to obtain “white” flour loses nutrients and antioxidants (even in the resulting bread) [18].
  • Storing flour over a period of weeks reduces levels of beneficial vitamins [6].
  • Heating grains inactivates enzymes [16].

The third point is industry’s “solution” to rancidity. A recent patent application by Kraft sheds more light on the motivation [13]. To the credit of its inventors, the text is remarkably clear and helpful (compared to my experience with software patents). However, its focus is entirely on industrial convenience and anything that might “deleteriously affect dough machinability”. There is not a single mention of nutritional value, the harm posed by rancid lipids, or that the enzymes destroyed in this process would be helpful if ingested.

How we can do better

We can solve all of these problems by sourcing high-quality grains and milling them to flour immediately before using them. As usual, more effort leads to higher quality. But is the proposed undertaking feasible?

Apparently, home flour mills are small, self-contained and quite convenient: grains in, flour out [17]. Let’s estimate the heat transfer: an 85 mm diameter ceramic millstone of roughly 3 cm thickness weighs around 340 g. A 360 W motor grinds 100 g flour in 1 minute. Assuming moderate load factor and varying torque, we have about 100 W of energy being converted to heat. With a specific heat of 1.09 kJ / (kg*degC), the millstone will end up 16 degC warmer. However, most of that heat remains inside the mill; an impromptu measurement found the flour is about 6 degC warmer than ambient temperature [17]. This is well within the safety margin; enzymes will remain intact. Note that continuously operated commercial mills run hotter, and depending on the millstone material, may cause temperature differentials of 36 degC (granite) or even 87 degC (marble) [19], thus destroying any nutrients.

The above research has convinced me that a flour mill is a useful investment.

Flour processing

We return briefly to the initial question: does soaking and fermenting flour help? Grains contain phytic acid, an “antinutrient” that reduces bioavailability of minerals such as calcium and potassium [10]. Fermentation reduces phytic acid by 12%, sprouting by 18%, and a traditional process combining both removes 68% [11]. “The synergistic effect of cooking and fermentation improved the nutrient quality. The antinutrients were reduced to safe levels to a greater extent than did any of the other processing techniques or their combinations employed.” [12] Finally, “protein digestibility was significantly improved when the processed grains were fermented for 12 h”; this “could be attributed to the partial degradation of complex storage proteins to more simple and soluble products” or “to the degradation of tannins, polyphenols and phytic acid by microbial enzymes [14].

We can consider the Nourishing Traditions book to be corroborated on this point. In summary: it pays to grind grains ourselves, and soak/ferment them overnight.

References

[1] http://msucares.com/pubs/researchreports/rr22-8.htm
[2] http://oar.icrisat.org/1185/1/RA_00407.pdf#page=72
[3] http://www.aaem.pl/pdf/10223.pdf
[4] http://link.springer.com/article/10.1007%2FBF01104140?LI=true
[5] http://www.sciencedirect.com/science/article/pii/S0002822395006753
[6] http://onlinelibrary.wiley.com/doi/10.1002/jsfa.2740351113/abstract
[7] http://onlinelibrary.wiley.com/doi/10.1111/j.1745-459X.2009.00254.x/abstract
[8] http://www.sciencedirect.com/science/article/pii/S0306987798900676
[9] http://www.ncbi.nlm.nih.gov/pmc/articles/PMC1474307/pdf/envhper00440-0256.pdf
[10] http://staffcv.uofk.edu/agriculture/Food/Prof.Babiker/downloads/63.pdf
[11] http://www.aensiweb.com/rjabs/rjabs/2010/176-180.pdf
[12] http://link.springer.com/article/10.1007%2FBF01091226?LI=true
[13] US patent 6,616,957
[14] http://www.pjbs.org/pjnonline/fin390.pdf
[15] http://ag.arizona.edu/research/cottylab/apdfs/Agriculture,Aflatoxins,Asp.pdf
[16] http://etd.uasd.edu/ft/th9821.pdf
[17] http://cooking.glassbrian.com/2007/02/03/komo-fidibus-21/
[18] http://www.aseanfood.info/Articles/11017174.pdf
[19] http://www.frischmahlen.de/en/docman/task,doc_download/gid,11/Itemid,57/

Can we undo the effects of eating too much?

Summary: brief exercise before eating shunts the resulting energy to your muscles, not fat
Action needed: 3-5 minutes of high-intensity, whole-body exercise soon before eating.

Why should we care?

Food is digested to glucose, a simple carbohydrate. The sugar either ends up in fat cells (bad) or muscle (potentially good). Because skeletal muscles account for 80% of glucose uptake [3], that is the obvious place to start.

Mechanism

Glucose uptake is rate-limited by GLUT-4 (GLUcose Transporter) [3], which carries it across cell membranes. There are two separate pools of GLUT-4 in cells [3]; transporters can only have an effect if translocated to the surface. One signaling pathway is via insulin (us laymen understand it regulates blood sugar – it is interesting to know exactly how this works) and “PKB” [10]. The other involves muscle contractions and “APMK” [10].

The good news is that exercise has an immediate effect on GLUT-4 gene expression [2]. Surface GLUT-4 roughly doubles [7, 11], with the exception of the calf muscle [8] and possibly others. These effects only last a few hours [1], but are similar to the maximum effective dose of insulin [7]. As a bonus, the action of the insulin pathway is also increased for many hours [6]. That is helpful because diabetes (an increasingly common problem due to our high sugar intake) is characterized by insulin resistance [1].

It was previously believed that GLUT-4 was maximized through several hours of low-intensity exercise. Happily, only a few minutes of fairly intense exercise – for example, 30x 3 second contractions of the quadriceps – are similarly effective [3].

This is the appealing picture painted by an excerpt from Tim Ferriss’ 4 Hour Body;
others have also taken up the message:
http://fitnessblackbook.com/diet-tips/gone-in-60-seconds-one-minute-of-activity-to-avoid-storing-calories-of-a-meal-as-body-fat/
http://jarmankinesiology.com/2011/04/09/exercise-might-be-able-to-make-it-ok-to-eat-a-bad-meal/

Reality Check

Unfortunately, it is an oversimplification. Serious exercise requires more energy than the normal glucose supply can provide. Oxidizing glycogen (a concentrated form of glucose similar to starch) is essential for endurance [4]. Unfortunately there are two interactions with GLUT-4 and eating.

First, muscle glycogen content, by a not yet fully understood mechanism, inhibits glucose uptake and reverses the increase in insulin sensitivity [9]. A full glycogen store inhibits GLUT-4 translocation [11] – both the PKB and AMPL signaling pathways are affected [10]. It is reasonable for the muscle to reject additional glucose when it is not required. The consequence is that anyone except maybe couch potatoes (with their untrained muscles) cannot rely on this trick to completely save them from over-indulgence.

Second, carbohydrate intake after exercise can lead to glycogen supercompensation [10] – a probably undesirable overshoot in glycogen synthesis. This has been reported for rat chow; one such formulation (though not necessarily the same) consists of only 4.7% sugar and a modest 58% of calories from carbohydrates [13]. It is probably good to avoid excessive carbs in general, and especially after light exercise – UNLESS glycogen reserves have been seriously depleted. A 90 minute soccer game uses up 70-90%, which are not fully re-generated even after 2 days [12] – hence the necessity of rest days when engaging in competitive sports.

Conclusions

Exercise is helpful for diverting calories from fat to muscle, and decreasing insulin resistance (a hallmark of diabetes). Reported increases of glucose uptake by factors of 2..3 assume fasting after exercise. Muscles with glycogen reserves will provide a more modest but still beneficial increase. It would probably be good to reduce carbs after mild exercise (and possibly in general, but that is a separate topic) to avoid glycogen supercompensation.

References

[1] http://diabetes.diabetesjournals.org/content/61/5/1090.full
[2] http://jap.physiology.org/content/88/2/794.full
[3] http://jap.physiology.org/content/90/6/2019.full
[4] http://jeb.biologists.org/content/212/2/238.full
[5] http://brage.bibsys.no/nih/bitstream/URN:NBN:no-bibsys_brage_14288/1/Dahl%20MedSciSportExcer%202009.pdf
[6] http://jap.physiology.org/content/94/4/1373.full
[7] http://www.jappl.org/content/85/4/1218.full
[8] http://ajpendo.physiology.org/content/272/5/E864.abstract
[9] http://jap.physiology.org/content/85/1/133.full
[10] http://ajpendo.physiology.org/content/279/6/E1311.full
[11] http://ajpendo.physiology.org/content/277/6/E1103.long
[12] https://www.uni-ulm.de/fileadmin/externe_websites/ext.dzsm/content/Archiv2013/Heft_1/45_%C3%9Cbersicht_Niess.pdf
[13] http://www.bio-services.nl/en/docs/03_catalogue_rat_mouse_new.pdf

Lightning-fast lossless (image) compression

This post presumes some knowledge of (image) compression, but offers intriguing performance numbers: lossless (de)compression at data rates exceeding 1 GB/s.

There seems to be considerable interest in fast compression, as evidenced by the amount of comments on a new algorithm: http://kdepepo.wordpress.com/2012/01/30/fast-lossless-color-image-compression/

Certainly data sizes and sensor resolutions have ballooned. I am aware of two operational Gigapixel-scale sensors:

The amount of data they produce is just phenomenal, but compression is useful for more mainstream applications as well. Some of the final software I developed at Fraunhofer (together with Dominik Perpeet) was an image viewer that could smoothly zoom within terapixel images: http://www.amostech.com/TechnicalPapers/2011/Poster/PERPEET.pdf That made for a nice platform for the thesis defense – rendering slides into a 1 million by 1 million pixel image, showing them individually, and then zooming out at the end.

That image had to fit on the demo laptop, so there was some fairly simple but effective compression (“LASC”) for four-channel, 16-bit data: http://booksc.org/dl/11938833/073a63
It basically did a brute-force search for similar 1-D runs (instead of the usual 2D blocks) followed by 2x or 4x packing of the residuals. Surprisingly, this came within about 50% of JPEG-2000 while exceeding its speed by a factor of 100.

Unfortunately it was not effective for 8-bit data.  Over the past few months, I’ve been following up on several crazy ideas for SIMD entropy coding, with the result that luminance images from http://www.imagecompression.info/test_images can be compressed by 2.9x at a throughput of 1.3 GPixel/s on my W3550 CPU.

Let’s first look at the predictor. LASC’s brute-force search is too slow – applications such as real-time video compression require symmetric algorithms that compress roughly as fast as they decompress. As pioneered by History Based Blending (http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.34.5981), three sub-predictors on the one-ring of causal neighbors are actually sufficient.

Another shortcoming of LASC was that large residuals require disproportionately more space (possibly even affecting other residuals) due to the simplistic packing. However, only a few bits may be set, especially if represented as sign-magnitude. As with wavelet coders, we will therefore encode the bit planes separately.

The most interesting part is fixed-to-variable coding for entire vector registers of bits. For the image residuals above, it compresses to within 5-20% of the entropy at speeds comparable to or exceeding state of the art integer coders (http://arxiv.org/abs/1209.2137). A single core can compress/decompress between 4600 MB/s (sparse bit arrays with 0.05% ones) and 1000 MB/s (relatively dense, 12% ones). Of course this scales to multiple cores, as there is no shared dictionary to update.

Although the instruction set improved with SSE4, writing vector code is still an exercise in improvisation. Finding 1-bits is accomplished by a hash function based on de Bruijn sequences (http://supertech.csail.mit.edu/papers/debruijn.pdf) and using the FPU normalization hardware. Vectorized shifts are emulated with the PSHUFB universal shuffle instruction.

I will begin writing up the details during the Lunar New Year weekend for later publication.

Intro, Spam and Eggs

Jan loves to eat! Working puts bread on the table, but home-cooking makes it so much more delicious – and nutritional. In this space, we’ll talk about development of efficient software (with an emphasis on SIMD-augmented C++) and appropriate fuel along the way. It has become increasingly clear to me that good food really has noticeable effects on mood, productivity and overall well-being.

This post coincides with some recent reading on the effects of dietary fat intake. I have long felt that low-fat (or worse, fat-free) food does not compare favorably with “the real thing”. Now, the question is, can we find some hard facts on whether a reduction in fat is helpful or desirable?

We have public access to a helpful article: http://www.jacn.org/content/20/1/5.long
Here’s the first surprise: short/medium chain saturated fatty acids (FA) are not “associated” with coronary heart disease (CHD), but trans FA are. That is bad news, because previously used animal fats with saturated FA have often been replaced by partially hydrogenated vegetable oil containing trans FA. Fortunately there has been a backlash and this is decreasing: http://www.bantransfats.com/

Second, eggs are also not linked to increased risk for CHD, provided the baseline cholesterol intake was not “very low”. Welcome news.

Finally, the total fat intake is less important than the type of fat. This contradicts prior guidelines, but rests on more solid footing (a larger set of studies). I feel it is therefore reasonable to outright reject simplistic measures of total “fat”. How many things in life are worth having and completely effortless? Quick fixes such as low-fat milk (resulting in reductions of only a few grams of fat, which as we now know are even less important than they might appear) are clearly inadequate. Given the lack of health benefits, and unknown downsides due to artificial additives, I will even more than before avoid unnatural low-fat junk.

There is plenty more to read. In the meantime, I will continue to enjoy eggs – but later I hope to understand the reasons behind the misguided advice to avoid them.

PS: one of the catalysts for finally starting to write was
http://cbloomrants.blogspot.sg/2013/01/01-17-13-what-happened-to-tech-blogs.html

I hope to increase the signal:noise ratio and disseminate some quality information. Although this post is yet another written by a non-specialist – after all, I am a doctor of engineering (or rather informatics), not nutritional medicine – it is a good way to accompany the learning of something new, and I hope this and future articles prove useful.