Better Beer Through GPUs: How GPUs and Deep Learning Help Brewers Improve Their Suds

by Brian Caulfield

Jason Cohen isnʼt the first man to look for the solution to his problems at the bottom of a beer glass. But the 24-year-old entrepreneur might be the first to have found it.

Cohenʼs tale would make a great episode of HBOʼs Silicon Valleyif only his epiphany had taken place in sun-dappled Palo Alto, Calif., rather than blustery State College, Pa. That Cohen has involved GPUs in this sudsy story should surprise no one. 

This is the tale of a man who didnʼt master marketing to sell his product quality control software for beer makers. He had to master it to make his product. The answer, of course, turned out to be free beer. And thatʼs put Cohen right in the middle of the fizzy business of craft brewing, a business that moves so fast heʼs enlisted GPUs to help his software keep up. 

Jason Cohen, CEO of Analytical Flavor Systems.

Cohenʼs no stranger to fine food. His parents, both attorneys, were connoisseurs of fine olive oil. Cohen inherited their eclectic tastes. He became a professional tea taster before moving north, from Florida, to take an undergraduate political science scholarship at Penn State. There while bouncing around from one discipline to another he founded Penn States Tea Institute, now one of the worldʼs leading authorities on tea and tea culture.

Four years ago, Cohen was grappling with a problem that will be familiar to any data scientist. To get meaningful insights for the institute he needed more data. And to get it, he had to beg the college students around him to slurp tea and record their impressions. Not easy. 

A Business Built on Free Beer

Thatʼs when it hit Cohen: forget tea. Heʼd build his data set by offering free beer. Volunteers packed into his tastings, scribbling down their impressions of whatever suds Cohen served them. Bitter India pale ales. Crisp pilsners. Malty, chocolatey doppelbocks. They inhaled the two- to three-ounce portions.

Within weeks, Cohen had a trove of data that started yielding insights. He could use the data to identify flaws in beers. Beer that tastes like fresh-cut grass, for example, reveals too much of a compound called cis-3-hexenol. Thatʼs caused when hops used in a beer are stale. Itʼs something any brewer will want to know right away. 

With every chug, Jason Cohen's data set grows larger.
With every chug, Jason Cohen’s data set grows larger.

Better still, Cohen could tease out insights that might escape the taster. A novice drinker, for example, may not know the difference between a good beer and one that has been skunked” — giving the beer a manure-like flavor because of exposure to too much light. But, by analyzing a drinkerʼs impressions of a beer, Cohen can. Better yet, he could predict what demographic groups would like a beer. 

Thatʼs when Cohen realized he didnʼt have a research project. He had a business. Turns out 11 percent of all U.S. beer sales by volume last year came from small brewers. Better still, these fast-growing brewers are guzzling more than their share of sales, grabbing 19 percent of the beer industryʼs $101.5 billion in retail sales. 

An Ale of an Opportunity

Itʼs the culmination of a brewing renaissance that shows no signs of slowing. In 1983, there were just 51 U.S. brewers. The top six owned 92% of the market. Access to better technology is changing that. Small brewers equipped with affordable new technologies like automated, high-quality canning systems — have been surging over the past two decades. There are now more than 3,000 of them.  Thatʼs what saved beer, new technologies,Cohen says. 

To swallow even more of the market, these small brewers need to be consistent. Brewers particularly small, craft brewers live or die by quality and consistency. But no one is immune. During the 1970s, bad-tasting beer due to  experimentation with new brewing methods all but destroyed Schlitz, once the top-selling beer in the United States. Thatʼs a story we tell to our clients,Cohen says.  

Key to consistency: speed. While Cohenʼs trove of data lets him tease out 20 common flaws in a beer with just a handful of tastings as drinkers record impressions on 25 factors on their smart phones results werenʼt coming in quickly. That can be trouble as brewers scramble to get beer to loading docks. Once that beer gets on the truck, Cohen explains, they donʼt own it any more. 

A smartphone app makes it easy for drinkers to record data about their beverage.

Chugging Data Faster

So Cohenʼs 11-employee team began experimenting with GPUs, which allowed them to speed up the analysis of data gathered from tasters  by threefold. And because Amazon hosts GPU-accelerated servers, the team can just rent access to the GPUs they need.

Thanks to GPUs, his companyʼs Gastrograph software can now identify dozens of obscure beer styles Vienna lagers, Irish dry stouts or Berliner Weissbiers in seconds, rather than minutes.

Thatʼs crucial to detecting bad beer. Buttery diacetyl, for example, improves the thick, creamy body of dark porters and stouts. But itʼs a fatal flaw in a crisp lager marketed to millions.

Cohens using GPUs for more than just classifying beers. Hes using them to create models that help analyze profiles generated by tasters against the more than 100,000 beer reviews his company has collected.

Without the parallel architecture of GPUs, for example,  it took Cohens team a long time to train deep neural networks with many layers, or random forest models with many trees. Cohens team now uses NVIDIAs CUDA toolkit in R — such as gputools and gmatrix — to boost performance. Now model tuning only takes minutes to complete.

Regular beer tastings mean Cohen finds recruiting easy.
Regular beer tastings mean Cohen finds recruiting easy.

Next up: growing his business. Cohen now CEO of Analytical Flavor Systems has one customer whose name he can drop, Ottoʼs Pub and Brewery. Dozens more are either working with him under non-disclosure agreements, or are in the pipeline. Heʼs raising his first venture capital round. And heʼs planning to move into new offices. Itʼs an old frat house, appropriately enough.

Itʼs a familiar tale for any entrepreneur, with one exception: Cohen says recruiting new employees is really easy.After all, this is a business built on daily beer tastings. And with every chug, Cohenʼs data set grows larger. 

Photo credit (top):Kate Borkowski, some rights reserved