I have a problem with translating from one unordered set to another. My input unordered set consists of a list of drugs prescribed for a patient, and the output is the list of adverse effects the patient has experienced. This is similar to the classical seq2seq model, with the only difference being that the order of adverse effects does not matter. I can use a Transformer without positional encodings for the input. However, my question is, what type of loss function can I use for unordered sets?