In November 2018, I travelled to Guangzhou, a city of about 14 million people in southern China. Late autumn is the time for making lap yuk, a type of preserved pork that is a local speciality, and across town I would often spot slabs of meat hanging from high-rise apartment balconies, tied up with string and swaying next to shirts and sheets left out to dry. To make lap yuk, a piece of raw pork belly is soaked in a blend of rice wine, salt, soy sauce and spices, then hung out to cure in the damp, cold autumn air. The fat becomes translucent and imparts a savoury-sweet taste to any stir-fried vegetable dish. A relative of mine claims that only southern China can make preserved pork like this. The secret is the native spores and bacteria that are carried on the wind there.
Guangzhou was the first stop on a journey I was taking in order to try to understand how artificial intelligence is transforming China’s pork industry. The country is the world’s largest producer of pork, and the story of how it has ramped up production in recent years to feed its growing middle class is sometimes described as “China’s pork miracle”. While overall meat consumption still trails behind countries such as the US, China’s annual pork consumption of 54m tonnes – the highest total worldwide, though some countries still consume more per capita – is only expected to grow in the coming years. Now, in a bid to satisfy this growing demand, farmers are turning to AI.
While in Guangzhou, I woke up every day at 5am and read Pig Progress, a popular pork industry news source. At the time, there was a pig lockdown in China, owing to an outbreak of African swine fever (ASF), a disease that causes haemorrhaging in pigs. The fatality rate is close to 100%, as it causes the animals to bleed to death. Headlines declared a world on edge, as scientists raced to develop a vaccine.
While ASF had already affected other countries such as Russia and Belgium, this was the first time ASF had been reported in China. For Chinese economists and politicians, this was deeply worrying. Less pork would mean higher food prices, and higher food prices would mean public discontent.
Pork dishes are a large part of Han Chinese cuisine. Pigs have been domesticated in China since as far back as 7000 BC, and a 1929 anthropological survey showed that 70% of animal calorie intake in China came from pork. In traditional Chinese medicine, food itself is medicine and crucial to the prevention of disease. Pork nourishes the blood and strengthens qi, the vital life force that flows through all living beings.
While pork used to be an occasional luxury, its consumption is rising across China along with incomes. This increased appetite is shifting geopolitical alliances and global trade. In 2013, when the Chinese company WH Group bought the American pork producer Smithfield, it became the largest pork company in the world. The WH Group’s operations now extend across a vast network of family farms and industrial operations outside of China. (These industrial pig farms are an environmental headache for the communities that live around them. In US states like North Carolina, exposure to hog farming contaminants has disproportionately affected Black, Hispanic and Native American citizens, which has prompted a broad coalition to launch legal and legislative campaigns against Smithfield.)
Countries such as the US have wheat reserves as insurance against famine, and to control food prices. China is the only country in the world to have a pork reserve, consisting of millions of live pigs and uncountable tonnes of frozen pork, hoarded from domestic and foreign sources. In 2008, when the country experienced a surge in food prices, the government drew upon these pork reserves, which is how Smithfield pork ended up being imported to China en masse.
A few weeks into my trip, I travelled to Xiangyang, a few hours outside of Guangzhou, to see what traditional, small-scale pig farming is like in rural China. I ate preserved pork for breakfast, lunch and dinner, but finding actual living pigs proved difficult. Fear of ASF had led the local government to order the preventative mass slaughter of pigs owned by small-scale family operations. The rationale was that small farmers were unable to keep biosecurity as tight as industrial operations.
In Xiangyang, I annoyed my host with a slew of questions. “Do you raise pigs in the village? Where does this preserved pork come from? How much do you pay for pork? How do you raise pigs?”
“Why would we raise pigs here?” he responded, incredulous at my simpleminded queries. “Pigs are so hard to raise well,” he said. “They’re smart animals and have a lot of needs. When you feed them, you have to buy grain, and then cook the grain since they won’t eat it raw. They’re like humans. Even then, when you sell the pork, you’d never make back the money you invested in feed. Pork sells for cheap at markets these days. You can’t just go selling expensive pork and expect people to buy it.”
He paused. “We used to raise pigs in the village. They help our farming. You can use their waste for fertiliser. But then we finally got this paved road that connects the village to the rest of the county. People come around twice a week in cars, selling us pork, including the preserved pork you’re eating. It’s so much cheaper to buy pork than to raise your own. You’d be an idiot to raise your own.”
Eventually, I managed to track down one of these “idiots”, a man named Li Jianhu, who runs an ecological pork-farming operation in Fujian, a few hundred miles north-east of Guangzhou. Through Li, I hoped to find an industrial pig farm to visit, so I could see first-hand how hog farming scales up. He said he would try to help, but security was tight because of the threat of ASF.
Li explained that the virus is typically spread from snout-to-snout contact in wild boars, but had started to infect domesticated pigs, and was now spreading rapidly. It is a resilient, contagious virus, and can even be spread through processed meat products such as sausages, surviving UV light and extreme temperatures. Customs officials at borders were all on high alert, after one Chinese tourist arriving in Thailand was found to have a single ASF-contaminated sausage in their carry-on luggage.
The next time I spoke to Li, he had no good news. The situation was dire. He had had to shut down his own operation, because of new restrictions on transporting pigs from farm to slaughterhouse. Even the Shanghai Meishan heritage pork farm, a tourist farm that relies on throngs of visitors to survive, was now closed.
The threat wasn’t just to China’s pork supply, but to the whole world’s, Li said. China exports many different kinds of pork products – from blood-thinning heparin to the protein powders in smoothies – all of which were potential vehicles for ASF. According to Li, the first case of ASF in China occurred in in a backyard pork operation, one of the many mid-sized pork farms with fewer than 100 pigs. In China, 98% of pork farms have fewer than 50 animals, and account for about a third of the country’s pork production. These highly decentralised farms make government oversight difficult. There is also enormous pressure on them to keep to the market price for pork, and to maintain steady production. The government was using ASF as a convenient excuse to eradicate these small farms, making way for centralised, industrial-scale operations.
Industrial scale is where things were headed anyway, said Li, reflecting a broader trend – globally, more than 90% of farmed animals live on industrial farms. Two-thirds of China’s pork production is now carried out by large corporations, which are determined to do their patriotic duty by supporting China’s “pork miracle” through cost-cutting and technological magic.
The quest for cheap pork is what led to the ASF epidemic, Li told me. One way to keep prices down is to lower the cost of feeding pigs. Xiangyang village’s pigs were once fed cooked grains and beans fit for human consumption, but ASF had been transmitted through industrial pig swill. This kind of swill is a finely tuned version of animal soylent – a combination of genetically modified soya beans, grains, protein powders and sometimes treated food waste. Treated food waste often contains pork, and the added protein powders are often derived from pigs. We are feeding pigs to pigs.
It is very difficult to see what goes on in industrial farms – in the US, there are “ag-gag” laws that make it illegal to even photograph industrial feeding operations. Amid this kind of opacity, industrial swill proliferates, keeping prices low. This swill is fully optimised, containing just the right set of nutrients for a pig to grow to an appropriate size and get to market at the optimal time. And so pigs unknowingly cannibalise each other, infecting and reinfecting their own kind.
“Even if you do get to an industrial pig farming operation, what would you do there?” Li asked. It’s not like I’d get to see any of the pigs close up. In industrial pig farming, there is little contact between humans and pigs – the animals remain behind closed doors, monitored via CCTV.
An industrial pig farm is more like a smartphone factory than a bucolic countryside haven. Each herd is watched closely for any signs of sickness or disease. Pigs have a fragile constitution. One pig farmer told me that pigs can get stressed and sick just from a minor change in their water supply. When human intervention is required, people enter wearing disinfected hazmat suits and face masks, looking less like a traditional farmer and more like a worker inside a silicon chip factory.
Some of the most delicious pork in China is currently being produced by one of the world’s largest, most profitable internet gaming companies. Since 2009, NetEase has been perfecting the art of raising pigs. The story began when Ding Lei, the company’s founder, was eating hotpot with friends and began to worry that the blood tofu, a traditional ingredient made of coagulated pigs blood, was synthetic. At that moment, Ding’s business plans turned from gaming into pig farming.
Ding set up a new agricultural products division, known as Weiyang. A decade on, its pork is now available online and at special Weiyang retail stores scattered across China’s software capital, Hangzhou.
The company’s farm in Lushan has the precision of an electronics factory and the feeling of a totally sterile, meticulously managed resort. The pigs on the farm live an optimised life, with a precisely calibrated amount of exercise and a carefully composed swill mix. They even listen to a soothing soundtrack for stress relief. This music helps improve the meat. Stress before slaughter can alter a pig’s metabolism, increasing levels of cortisol and resulting in what is known in the industry as “DFD” (dark, firm, dry) meat.
More than just its founder’s quest for pork purity or sheer novelty, NetEase’s foray into food is a clever business move. Industrialised farming is an information business, and Weiyang declares itself to be combining “internet thinking and modern agriculture”. That means farming with the kind of detail and precision involved in developing software – a level of control over every microscopic variable along the way, such as pig stress levels.
Across the world, an entire industry of scientists, swine technicians, genetic testing companies, educational institutions and industrial farm managers exists in order to optimise porcine life. Companies such as the Pig Improvement Corporation harness computational genetics and cutting-edge biotechnology to design pigs specifically for industrial farming. Increased agricultural automation has led to pigs becoming physically standardised, much like our fruit and vegetables.
Before the advent of industrial agriculture in China, farmers raised hundreds of pig breeds of different sizes and attributes. These pigs were adapted to local climates and diseases, could be fed leftovers, and generated rich fertiliser for fields. Industrial pig farming instead uses a single type: the highly popular hybrid DLY, a cross between the Duroc, Landrace and Yorkshire breeds. Even the unwanted attributes of these pigs are slowly being edited out – for instance, physical traits such as tails, which are a nuisance in transport because in crowded conditions stressed piglets will bite each other’s tails off. Combined with genetic control, automatic feeding and water dispensing systems, and strict exercise times, pigs are farmed to a precise size.
To fully and effectively optimise any process, you need to be able to quantify all the variables. But in an uncertain, irrational world, nothing is guaranteed. The systems of industrial agriculture constantly seek to eliminate uncertainty. But as ASF spread, it was clear that the attempted optimisation of industrial pork farming had created a complex system with unanticipated consequences. Total control had turned out to be a delusion.
Our own lives are being threatened by this hubristic optimisation process. The appearance of new human diseases such as Covid-19 – so-called “zoonotic” diseases that cross from animal to human – coincide with our modern era of optimisation, industrialised agriculture and subsequent wildlife habitat loss. One 2014 paper on zoonotic diseases states that 60% of all emerging diseases are now zoonotic with animal origins, and 80% of new pathogens come from the top pork-producing countries – places such as China. With meat consumption growing worldwide, we might just eat enough to snuff ourselves out.
In an optimised world, human farmers are a source of inefficiency. Being human, they are subject to information and time constraints, which affect their decision-making. So, the logic goes, why not replace them with AI models that have access to endless data and computation time?
The giant Chinese firm Alibaba is proposing just that. Its new hulking new product, ET Agricultural Brain, aims to use AI to transform agriculture and help boost China’s pork miracle. On a grey, chilly day in Hangzhou, I visited Alibaba Cloud, the firm’s cloud computing arm, to find out more about its plan to use artificial intelligence to help raise pigs in partnership with the Sichuan-based Tequ Group, a sprawling food company focusing on industrial agriculture. At the time, Tequ had a target of 10m pigs annually by 2020, though they were stymied by the failure to contain ASF and labour disruptions resulting from Covid-19.
Alibaba Cloud’s campus is half an hour’s drive outside the city centre, in a place called Cloud Town. The lush, green setting, the rainy weather and the bland furnishings reminded me of the Amazon Web Services (AWS) campus in Seattle. Both Amazon and Alibaba started off as e-commerce companies, and it is no coincidence that both now offer cloud-computing services. Both Amazon and Alibaba leverage lulls in activity on their own platforms to rent out idle computers or servers, making money off their unused computing power.
In a brightly lit area of the office, next to a half-dead orchid, I sat with Jintong, a stoic Alibaba Cloud expert. Jintong told me that raising pigs using AI was a natural opportunity for the company. The farming structure was already in place; Alibaba Cloud just helped optimise it.
Large pork farms already have CCTV and sensors monitored by humans. For a few hundred pigs, it might be possible for a human to oversee operations. But for hundreds of thousands of pigs, where do you even begin? And for China to achieve its pork miracle, millions of pigs must be farmed.
Alibaba Cloud offers farms a way to help sort through data using AI. In these large-scale farms, pigs are stamped with a unique identity mark on their bodies, similar to a QR code. That data is fed into a model made by Alibaba, which can monitor pigs in real time, using video, temperature and sound sensors. It’s through these channels that the model detects any sudden signs of fever or disease, or if pigs are crushing each other in their pens.
Certain machine-learning models, like the one used by ET Agricultural Brain, require massive amounts of training data in order to work. It’s only after collecting three months’ worth of training data (where cameras sit and record data, without analysis), that the AI model is actually useful, and can be effective in diagnosis.
As Jintong explained, ET Agricultural Brain makes decisions based on data, and offers a precision beyond human capacity. It is also versatile, adapting to whatever data the client chooses to feed it. That means it can help big industrial farms that raise pigs and grow melons, or even agricultural drone companies, which it helps crunch through sensor data to finesse autopilot capabilities. It can determine the best time to plant crops, based on the weather, or when to pick fruit for optimal sweetness.
And where are all the human farmers in this scheme? Are they relaxing and eating peanuts while the machines do all the work? It turns out that humans are still needed. For ET Agricultural Brain, a great deal of labour goes into making the models: not just from the engineers at Alibaba, but also in creating the training data – farmers examining footage and labelling the pigs in the images as sick or healthy, and so on. In one city, Guiyang in Guizhou province, there are areas designated as “digital towns”, where young rural migrants are employed to generate training data for AI, clicking on images, tagging animals and other objects. Despite stories of AI replacing humans, AI still desperately needs us.
It’s only after the domain knowledge and the training data is incorporated that the AI model is of any use. After three months, ET Agricultural Brain can “see” – but that is still a generous term, given how much effort had to be put into it being taught, and since it can still only see a very limited set of objects.
Nevertheless, the payoff is enormous – the production of millions of pigs at a low price. Given the cost of the hardware, data and computation time required, it currently only makes sense to use AI if you are raising millions of pigs, not just one or two. But Jintong was optimistic that “dragon-head” agricultural companies – large national conglomerates that rely on a network of smaller farmers – will share innovations with their small farmers. Other companies are also trying to cash in on the AI pork-farming business, using technologies such as facial recognition for pigs.
The logic behind all this innovation is striking. The demand for pork drives the industrialised farming of pigs, which increases disease transmission. The constant emergence of diseases drives the implementation of new technologies such as AI pork farming. These technologies go on to make pork cheap, driving even more availability and demand, as people start to believe pork is a necessary part of their diet. And so the cycle continues. As AI solves certain problems, others emerge.
This is an edited extract from Blockchain Chicken Farm: And Other Stories of Tech in China’s Countryside, which will be published by FSG Originals x Logic on 13 October
• Follow the Long Read on Twitter at @gdnlongread, and sign up to the long read weekly email here.
• This article was amended on 8 October 2020. Heparin is used for blood thinning, not blood clotting.