Recently, 1/2 of US patents was granted to foreign residents, whose numbers are at below 1/10 of the US population. This trend has been growing almost monotonically since 1947 and reflects the ever-increasing majority of graduate students in science and engineering, who are foreigners. Foreign graduate students are currently at 80% or so in math and petroleum engineering. The US Patent Office does not count naturalized American patent holders. Given that roughly 50% of engineering and science professors are foreign-born, patents given to foreigners in the US dominate.
Fraction of all US patents granted to foreign residents. Note that the total foreign-born fraction of US population has hovered between 5 and 15% of the total population. Also note that since 1947 foreigners have received an almost monotonically growing share of US patents that is now at least 5 times their share of the US population. (I say at least, because I am adding naturalized citizens to the foreign fraction, and the patent fraction does not). A steep decrease of patents granted to foreign residents between 1939 and 1946 reflects the WWII effort in which foreign scientists and engineers were quite involved.