Nonresident aliens are exempt from U.S. social security payroll taxes, also known as Federal Insurance Contributions Act (FICA) taxes, but resident aliens are subjected to these taxes.
Note: FICA and Medicare taxes apply to wages and self-employment income, not fellowships.