i'm confused. can you define what spaces A, B and f(A) live in? what space does f(a) live in, for a in A?
edit:
> two equal sized sets of numbers, A and B. B is actually a discrete uniform distribution - [0, n]
> The net I am writing needs to take A as input and generate B as its output.
> The specific pointwise mapping a -> b is irrelevant, any injective function is sufficient.
> I don't think the Kullback–Leibler divergence will work because it enforces an ordering / specific mapping.
I don't see how KL divergence enforces an ordering / specific mapping.
I'm going to assume that you want to learn a function f[Theta] that accepts sets as inputs and maps them to output sets, where Theta are some parameters you're going to fit. Further, to make things more plausibly continuous, i'm going to assume that f[Theta] accepts distributions as inputs and maps them to output distributions.
Let X be some reasonable space. Let A and B be distributions over X, i.e. A, B in D(X).
Let's say we want to learn some function f[Theta] : D(X) -> D(X) such that f(A) = B .
Aside: it seems a bit weird to be doing ML with a single training example (A, B) -- I'm assuming you have some very heavy structural constraints on `f[Theta]`, and/or a bunch of other training data {(A, B)_i}_{i=1...M} ....
If we tried to define loss using KL divergence, it might look something like
loss(f(A), B) = sum_{y in X} f[Theta](A)(y) log( B(y) / f[Theta](A)(y) )
as long as f[Theta](A)(y) is sufficiently smooth in your parameters theta, the expression for the loss might be reasonably differentiable.
So, how to interpret f[Theta](A)(y) ?
Assuming X is discrete, the dumbest representation of `f` I can think of would be to let theta be a matrix of weights addressed by pairs of indices from X*X . So the input distribution A could be interpreted as a vector of weights indexed by X (say with some constraints about non-negativity and summing to 1), and y itself is just another index from the space X, so
f[Theta](A)(y) := matvec(Theta, A)_y = sum_{x in X} theta_{y, x} A_x
Then the loss function would look something like
sum_{y in X} (sum_{x in X} Theta_{y, x} A_x) log( B(y) / (sum_{x in X} Theta_{y, x} A_x) )
So it's (1) definitely something you could evaluate (in principle) and differentiate, and (2) doesn't force some pre-defined mapping between points -- you can still set the weights Theta_{y, x} to whatever you want.