Over the past few months, I’ve been trying to think of reasons the economy might blossom over the coming decade or two -- and failing to come up with any good ideas. I saw a future where robotics and software with enhanced intelligence put enormous pressure on the middle class, deepening harmful trends we’ve seen in recent decades. I saw little political will to make the types of investments that could help brighten the outlook. And I saw a high probability that more and more Americans would be without a decent job, relying on the safety net, helping fuel a national debt already under intense pressure because of the retirement of the baby boomer generation. (Robert Gordon, a top economist at Northwestern, in his latest paper worries that the future of the economy is bleak precisely because technology is not advancing.)

Still, I wanted to build a positive case. I called some of the top economists in the country who study these trends – and asked them whether they had any optimistic ideas. Many were pretty pessimistic, but here are three reasons to think we might not be doomed. (Adapted from Sunday's Outlook.)

1. Slowing health-care costs: The key explanation for stagnant wages in recent decades is that companies haven’t felt pressure to pay their workers more. But another important reason is that companies have been paying a higher share of employees’ compensation in health-care premiums. But over the past several years, health-care costs have been growing at the slowest pace in half a century, as you can see in the red line in the chart below. And that means that the percentage of compensation being paid as health-care benefits has declined a bit, as the green line shows. While this partly reflects the lingering effects of the recession, there's also hope that the Affordable Care Act and other changes in the industry will have a more lasting impact.

2. Rising educational attainment: For much of the past century, society’s greatest tool in helping Americans prosper has been education. We may not be able to replicate the impact of the launch of compulsory education or the GI bill, but there remains about 30 million Americans over 18 who lack a high school diploma and 142 million people over 25 who don’t have a four-year college degree, according to the Census Bureau. If these people were able to add to their skills and take advantage of new technologies, they’d become more productive workers. We’re already making progress on this front. From 1999 to 2012, the share of students graduating high school increased from 71 percent to 81 percent. College graduation rates have also jumped significantly, and in 2012, 31 percent of Americans held a bachelor’s degree, up from 25 percent in 1999.

3. Declining deficit:  While most of the job-creating innovation would have to happen in the private sector, it is impossible to ignore the government’s role. Some worry that Washington’s ability to direct resources toward high-return parts of the economy — such as research and development or education — will be stifled by growing debt, fueled by waves of retiring baby boomers. The national debt today stands at 74 percent of the size of the economy. It is expected to grow to about 100 percent within 25 years. These numbers aren’t encouraging -- and the Congressional Budget Office just warned the next 10 years may not be quite as pretty as we thought -- but they’re a dramatic improvement from where we were just a few years ago, when forecasters expected the ratio to be closer to 200 percent.