In the general two-sample testing problem, $X_1, \cdots, X_m$ i.i.d. with continuous c.d.f. $F, Y_1, \cdots, Y_n$ i.i.d. with continuous c.d.f. $G$, and null hypothesis $H_0: F = G$ versus alternative $H_1: F \leq G, F \neq G$, we construct uniformly consistent and tractable rank estimators of the underlying optimal nonparametric score-function for a large subclass of (fixed) alternatives. Moreover, we prove asymptotic normality of the corresponding adaptive rank statistics under any fixed alternative $(F, G)$ from the same subclass, and compare the results with the corresponding results for the (local) asymptotically optimum linear rank statistic for $H_0$ versus $(F, G)$. In addition we prove some results on the estimation of a density and its derivative in the i.i.d. case if the support is [0,1], which are needed for a comparison argument in the case of rank estimators, but which may be of interest in other situations, too.
"Two Sample Rank Estimators of Optimal Nonparametric Score-Functions and Corresponding Adaptive Rank Statistics." Ann. Statist. 11 (4) 1175 - 1189, December, 1983. https://doi.org/10.1214/aos/1176346330