What does the -1 mean? What’s the significance of the ordinal of each target int (which I assume is a class designation)? What’s preventing you from using a more “traditional” approach, e.g. a standard multi-label classifier? You’d definitely have more than 5 labels given your problem description, but it’d be much more straightforward to implement and would still let you rank your labels according to the strength of the match. Are you familiar with expressing labels using multi-hot encoding? If not, I can give you a rundown. If so, I probably misunderstood your question and don’t know enough to help…