The benefits of continuing to improve AI are seemingly endless. Machines with the ability to self-diagnose and self-correct could vastly improve cyber security.

Artificially intelligent robots could care for our elderly, perform checkups on the chronically ill, and administer vaccines in war-torn countries. AI is already being used to collate massive datasets related to cancer research in order to find patterns researchers often miss.

There is a darker side to the rise of automation, however. Over the past few decades, automation claimed six million US manufacturing jobs. As machines are able to complete more complex tasks, more jobs performed by humans are at risk. “The American middle class was built on the back of routine work, McAfee, associate director of the MIT Center for Digital Business at the Sloan School of Management, asserts. “Lots of those jobs have already been automated.”

Automation has been eroding away at jobs since the 1960s, but the pace of replacement is quickening. Self-driving AI is already poised to displace 15% of the world’s working population. In the decades to come, automation could claim many more jobs, and displace up to 47% of the workforce, according to one Oxford study. “The pace of technological innovation is still increasing, with more sophisticated software technologies disrupting labour markets by making workers redundant,” explain the authors of the Oxford study.

“While computerisation has been historically confined to routine tasks involving explicit rule-based activities, algorithms for big data are now rapidly entering domains reliant upon pattern recognition and can readily substitute for a wide range of non-routine cognitive tasks.”

Advancement in artificial intelligence has led to smarter software and smarter robots. Robots are able to complete more complex physical tasks, recognize subtler patterns, and have experienced a marked increase in their sensory abilities. Therefore, manual labor, manufacturing, transportation and logistics jobs are all at very high risk for computerization.

Interestingly, according to the same study, service jobs, one with the highest rate of growth over the past twenty years or so, is also at very high risk of automation. Jobs that require social intelligence and creative ability are the only ones that have a very low risk of computerization, according to their findings.

What is the plan to address the massive underemployment issue the world will be facing? Currently there seems to be little in terms of preparation. Job training programs in the US are dangerously underfunded. Simply pushing the lower and middle classes to attain higher education could lead to further stagnation. Even if job training and higher rates of secondary education were supported as solutions and given proper funding, there is no guarantee that workers would win the race against automation. Poverty in an age of automation could very possibly be widespread. If we unprepared for the massive shifts AI will bring, it could even be devastating.

A universal basic income (UBI) could be the answer. UBI promises all citizens the money they need for food and shelter — unconditionally. It may sound like an idea on the bleeding edge, but, in actuality, it was proposed by Thomas Paine as “a dividend for all citizens” some 200 years ago.

Some maintain that a basic income would simply be too expensive to manage. “Setting up a basic income would be no easy matter,” writes R.A. for The Economist. “[A] country as rich as America would need to raise the share of GDP collected in tax by nearly 10 percentage points.”

Others, such as tech luminary Elon Musk, founder of Tesla and SpaceX, have emerged as strong proponents of UBI, arguing that basic income would be much cheaper to implement than current welfare systems. “I think we’ll end up going with universal basic income,” Musk said at the World Government Summit in Dubai. “It’s going to be necessary.”

Y Combinator, a company that helps startups with seed funding is currently conducting a five-year study to observe the effects of implementing UBI on a relatively large scale. “In a world where technology eliminates jobs, it will mean that the cost of having a great life goes down a lot,” Altman, President of Y Combinator, wrote on Twitter. “And I think we need something like basic income to have a cushion and a smooth transition to the jobs of the future.”

Addressing the ever-expanding issue of computerization will certainly be a major challenge. Retraining and re-educating workers may help, but, at the same time, it could prove to be only a short-term solution. Universal basic income could be the answer to massive rates of unemployment by providing every citizen with the money for clothes, rent, and food. While it may seem exorbitantly expensive to implement at the present moment, automation could increase production and decrease costs enough to make a universal basic income manageable.