NN options to train for sort order?

I’ve been looking into options for different sort methods and am wondering what type of NN architecture would be best suited for training to find a sort order for a list of samples. I’ve had success, with my data set when training for an A/B comparison to predict whether A > B, however each list I am attempting to sort is several thousand samples, with hundreds of thousands of samples in the training/validation data.

For example:
if I have features f1…f25 for each sample and a batch size of roughly 5000, I would like to train to predict the sort location within the batch for each sample.

f1, f2, f3, ..., f25, target
.1, .3, .5, ..., .2, 0.3
.1, .1, .5, ..., .1, 0.5
.3, .4, .2, ..., .4, 0.2
.2, .2, .1, ..., .1, 0.8
.5, .2, .6, ..., .9, 0.1
.7, .9, .5, ..., .7, 0.9
.7, .7, .2, ..., .7, 0.7
.9, .6, .0, ..., .2, 0.6
.8, .1, .1, ..., .1, 0.4
.3, .1, .3, ..., .6, 1.0
...

Is there recommended architecture for this type of training? I would like to compare each sample to the entire batch in order to determine where it belongs within that population. I am able to train a standard fully connected linear layer to predict whether sample_A_f1…Af25 > sample_B_f1…f25 however the process of generating a final sort order is very time consuming due to the need to compare each sample to every other sample.

Would there be a way to use a GRU network to speed this up? thinking that the sorted batch could also be thought of as a kind of time-series.

Or perhaps there is a way to compare the single 1D vector to a 2D (image type) vector of the entire batch through convolutions?

I’d appreciate any thoughts you might have on where to explore.