This is a special time for technology. Five of the world’s seven most valuable companies are U.S. tech firms. But the core innovations underlying Apple Inc., Alphabet Inc., Microsoft Corp. , Amazon.com Inc. and Facebook Inc. are decades old.

The transistor was born in the 1940s at AT&T’s Bell Labs. The internet was nurtured by the U.S. Defense Department in the 1960s. Many important, but less foundational inventions, such as GPS, were products of the Cold War.

Since then, the funding of research and development has shifted dramatically. Support from the federal government has waned, from nearly 2% of gross domestic product during the 1960s to about 0.6% today. Over the same time, corporate R&D has grown to nearly 2% of GDP, from less than 0.6% of GDP in the age of the Apollo program.

For U.S. taxpayers, that carries a benefit; the costs of innovation are being borne by the shareholders who will reap the benefits. But such broad statistics mask a more-complicated reality: Not all R&D is created equal.

Think of innovation as a pipeline that starts with basic discoveries of things like microwaves or nuclear fission. Those sometimes lead to inventions, such as radar and nuclear power, respectively.