Is there a limit on how much a country can spend on R&D according to the WTO? I know there are rules against state subsidies, but I don't know if it allows a state-funded institution like an university to gift companies certain patents to private companies. Is this allowed according to the WTO? Is there a way to circumvent this rule?
Actually, the answer is not as straightforward as Erwan's answer makes it to be:
The rules of the World Trade Organization (WTO) on permissible subsidization of research and development (R&D) costs traditionally have been permissive. In the first years of the Agreement on Subsidies and Countervailing Measures (SCM), R&D subsidies were included in the “green light” category, meaning they were presumed not to distort trade and therefore were not actionable. Other green-light subsidy areas included regional development assistance and support to comply with environmental laws. These provisions were controversial, however, and the green-light category was allowed to lapse in 2000. Since then, R&D subsidies have been in the amber-light grouping, meaning that they are actionable, either by dispute settlement or unilateral countervailing duties, subject to the demonstration that the subsidies met certain criteria and had injurious effects on another WTO Member.
So, yes a WTO member can (since 2000) bring action against another member based on R&D subsidies. That's not the same as having some prescribed maximum though.
On the other hand there has been little WTO litigation with respect to R&D subsidies, except in the aircraft sector:
Despite this change to a more vulnerable legal status, R&D subsidies have been the subject of relatively little WTO enforcement. The few cases, discussed further below, that pay attention to the issue are disputes involving subsidies to aircraft development. However, these cases do not seem to settle whether R&D subsidies per se are a source of injury or prejudice to economic interests. Neither do there seem to be cases in which R&D subsidies specifically were the subject of countervailing duties by a WTO Member. The entire area of disciplines on R&D subsidization, therefore, seems rather unsettled within the WTO. This situation is similar to legal practice in the United States (US), where Congress rarely intervenes in state-level subsidization of enterprises in general, much less in R&D costs (Sykes 2010). The European Union (EU) takes a more aggressive stance toward disciplining state aids, but there is little record in this regard concerning R&D subsidies.
And on to the specific cases:
The Canada-Aircraft case arose from the competitive rivalry between Canada’s Bombardier and Brazil’s Embraer, both manufacturers of smaller civilian passenger aircraft for regional transport. Brazil filed a WTO complaint in 1997 alleging that Canada was offering R&D subsidies to its aircraft industry that amounted to illegal export subsidies. Specifically, the Technology Partnerships Canada (TPC) program offered loans for investments in projects resulting in high-technology products for export, with repayment required only in the event of successful development. Brazil argued that this amounted to an R&D subsidy that effectively subsidized exports, given its targeted nature. Canada countered that the TPC was offered to all potential high-technology sectors and was therefore not specifically targeted, meaning it did not violate the specificity requirement of the SCM. The WTO Panel found that the program was an impermissible export subsidy because it entailed a financial contribution, conferred an economic benefit, and was effectively contingent on exports. This ruling was largely upheld by the WTO Appellate Body and Canada was instructed to change the terms of its support programs.
The EC-Aircraft and US-Aircraft cases arose from a decadeslong dispute between the rivals and their governments, at one point culminating in the 1992 Agreement on Trade in Civil Aircraft. That agreement set out certain benchmarks for maximum R&D support but failed to avoid an accelerating bilateral dispute in subsequent years. In its 2004 WTO complaint the US claimed that the EU (and particular member countries) had violated the General Agreement on Tariffs and Trade (GATT) 1994 and the SCM through a panoply of subsidies to Airbus, including launch aid, support for facilities development, debt forgiveness, preferential loan terms, equity infusions, and loans and grants for R&D costs. At the same time, the EU countersued, claiming that Boeing’s research costs were effectively subsidized through contractual arrangements as a supplier of aeronautics and related technologies to the National Aeronautics and Space Administration (NASA), the US Department of Commerce, and the Department of Defense (DoD).
The WTO Panel in EU-Aircraft found that many of the alleged R&D subsidies from national and sub-national European governments were specific as defined by the SCM. These were financial grants and loans targeted directly at Airbus and its suppliers. These were found also to have conferred a benefit to their recipients because the terms were more favorable than those available in the market. However, the Panel’s determination of whether the US-based “like products” (Boeing aircraft) suffered material injury or US interests suffered serious prejudice through such elements as trade diversion and price suppression focused on the totality of the specific subsidies, rather than the R&D components. The Panel in US-Aircraft found that Boeing had received actionable R&D subsidies through its procurement contracts with NASA and DoD and that these had caused serious prejudice to EU interests. Among other things, these arrangements offered contracts and grants and access to public research facilities to Boeing in return for performing research related to civil aircraft. In effect, Boeing was both the recipient of the support and the beneficiary of the research results. Similarly, Boeing benefited from a DoD procurement contract supporting research into technologies of use for both military aircraft and civil aircraft. The Appellate Body largely upheld the Panel report, agreeing that EU interests had suffered serious prejudice in the form of lost sales and price suppression and here tied these effects in part to the R&D subsidies.
In summary, one can ascertain some principles from these cases. First, R&D support that is specific and contingent on export performance is presumably an illegal export subsidy, though perhaps not subject to unilateral countervailing responses. Similarly, from Canada-Aircraft, it appears that R&D subsidies to projects that are near-market ready with high export potential are problematic. Second, in EC-Aircraft the determination suggests that direct financial supports to R&D in a specific industry, both at the national and sub-national levels, are held illegal. Third, also illegal are indirect supports in the forms of highly specific procurement contracts and project assistance in R&D, in which the contract recipient is likely also to be the main beneficiary, as in US-Aircraft. These principles are useful in understanding how the WTO views R&D subsidies under the existing SCM Agreement. The essential findings in Canada-Aircraft, that exports cannot be effectively linked to R&D subsidies, and in US-Aircraft, that R&D procurement arrangements and contracts cannot exist primarily to benefit the contract recipient, seem reasonable and appropriate. They discipline policies that may cause direct trade damage or offer an undue competitive advantage.
But the WTO has not ruled on broader measures, like supporting research that would benefit an entire sector rather than specific companies. The paper I've quoted the above from goes on to argue that in some cases such subsidies can also be problematic (competition-wise), but insofar this is not the WTO view because no such cases have been litigated by any its of members.
I'm not an expert but we can confidently answer that no, the WTO doesn't put any maximum on the amount a country can spend on R&D, for the simple reason that this would amount to having some control in the budget of sovereign countries. If this was the case, why not also limit what countries can spend on healthcare, education, or their defense budget? Most countries would not accept that. The EU doesn't even have any such rule, even though it has much more say than the WTO on the budget of its members countries.
It's also worth mentioning that R&D is by far not the only budget by which countries subsidize some parts of their economy: agriculture is massively subsidized, especially in the US and the EU. Many countries also subsidize their weapons industry through their defense budget. Unless the WTO becomes one day some kind of federation of countries with much more decisional power, it cannot do anything about this kind of indirect subsidies.