  We consider the problem of forming collectives of agents for real-world
applications aligned with Sustainable Development Goals (e.g., shared mobility,
cooperative learning). We propose a general approach for the formation of
collectives based on a novel combination of an attention model and an integer
linear program (ILP). In more detail, we propose an attention encoder-decoder
model that transforms a collective formation instance to a weighted set packing
problem, which is then solved by an ILP. Results on two real-world domains
(i.e., ridesharing and team formation for cooperative learning) show that our
approach provides solutions that are comparable (in terms of quality) to the
ones produced by state-of-the-art approaches specific to each domain. Moreover,
our solution outperforms the most recent general approach for forming
collectives based on Monte Carlo tree search.
