Contrasting quadratic assignments for set-based representation learning