Stanford University has agreed to pay the U.S. government nearly $2 million to resolve allegations that it failed to report financial support from foreign sources in applications for federal research grants, the U.S. Department of Justice announced Tuesday.