Okay, I’m not sure if this exact approach will work.
The way I’m understanding the network as you laid out, is that you want the network to map your input to a real value in the range [0, 1.0]. It doesn’t make sense to me that you decide the labels based off the model output.
Currently, if input1 was mapped to a larger value, then we are encouraging the network to map these both to larger values. Otherwise if input2 was larger, then we’re encouraging the network to map these both to a smaller value?
I’m not greatly familiar in this specific task, however, if I was to go about doing this, I would have an encoder network that will take in an input and return an embedding x. Then I will have another network which will take in two embeddings and output a value where, after a sigmoid, gets mapped to [0, 1.0]. If this value is closer to 1.0, then this suggests that the first embedding should be ranked higher. Otherwise the second embedding should be ranked higher.