Topological models of swarming