How can each site in the network have their own exclusive user groups?

In the network I am creating, every site will be run by a teacher. Each of those teachers needs to have all their students sign up as users and all of those users need to be arranged into user groups (classes).

Currently, every site can create groups, but these groups are then visible to every other site. As my network scales, this is going to become rather problematic.

Any ideas?