Loss to minimize the overlap of two collections/sets
I wonder if there is a loss function can measure the overlap of two collections/sets (order doesn't matter). 
E.g. the groud truth is a set [a, b, c] and my model prediction is a set [b, e, f], the overlap is [b]. My goal is to maximize the overlap of my prediction. 
Do we have a loss function that can measure the size of overlap that I can minimize (negative of) the metric as a result I can maximize the overlap. 
(I know one solution may follow the REIFORCE learning that treat the overlap as a reward for each data sample and use the reward to weight the loss, but do we have another solution) 
Thank you.

As noted by P-Gn, the problem with such coefficients is their differentiability. 
However, it is possible to define similar measures to these coefficients that are differentiable. IOU (intersection over union), as proposed by Prune is a good measure. For deep learning tasks more popular is the similar Dice coefficient:

2 * len(A intersect B)/(len(A)+ len(B))


which ranges between 0 if no overlap and 1 for identical sets.
For binary vectors this can be formulated as

2 * abs(a.b)/(a**2 + b**2)


where the vectors are a one-hot encoded representation of the set. 

Now, if your last layer in your neural network has a softmax activation (like when you use cross entropy) you can interpret the output as the probabilities of that particular element belonging to your predicted set. The previous formula still is a good measure for the intersection between your sets but stays differentiable. The so called Dice loss (1 - dice coefficient) was introduced first in this paper where you can read more about it.
