in australia we have CSIRO which does some amazing research, and our military budget is basically non existent compared to the US military budget
[1] https://www.pyneonline.com.au/media-centre/media-releases/a-...
As a percentage of total government expenditure, Australia spends 6% on defence and the US spends 16%.
GDP is not what that defense budget is protecting. People and property are what that budget exists to protect.
China has the second highest defense budget. We have about 1/4 the population of China, yet we spend several times more on defense.
Australia's Defence Science and Technology Group, which does science and other research for the military, is funded at about $400 million AUD/year. It's Australia's 2nd largest research organization after CSIRO.