Japan’s graying society will require more investment in technologies such as artificial intelligence and robots to make up for a decline in the labor force and its effect on economic growth, according to a government report released late Friday.

The world’s third-largest economy is on a firm footing, the white paper said, having enjoyed a moderate recovery for the past five and a half years under Prime Minister Shinzo Abe’s policies, including aggressive monetary easing by the Bank of Japan, Kyodo reported.

“Corporate profits are at record highs, labor and income conditions are improving, and increased income is leading to an expansion in consumption and investment, showing that a ‘virtuous economic cycle’ is beginning to take hold,” said the annual white paper on economy and fiscal policy.

But the report warned that the country is also experiencing its worst labor shortage in a quarter century, and some industries such as transportation services and construction may already be seeing earnings suffer as a result.

“Amid an aging population, Japan needs to drastically strengthen the supply side of the economy in order to deal with the labor shortage and realize sustainable growth,” it said.

“It is crucial that we invest in human resource development and implement features of the fourth Industrial Revolution such as AI, IoT (internet of things), and robots.”

The report, which Toshimitsu Motegi, minister of economic and fiscal policy, submitted to the cabinet on Friday, paints a picture of the future where traffic accidents decline thanks to self-driving cars, automated translation removes language barriers and people can receive medical care remotely.

Japan is already a leader in industrial robotics, the report said, but falling behind elsewhere. Only about 20% of Japanese companies currently make use of the internet of things, compared with more than 40% in the United States, and the use of AI is likewise still largely limited to the financial sector and some manufacturers, it said.

The country will also need to make better use of its shrinking population by training more tech-savvy workers, the report said, pointing out such workers make up a much smaller portion of the workforce than in other advanced economies including Britain and France.