Consider throwing $m$ balls into $n$ bins uniformly at random, and let $X_i$ denote the number of balls that fall in bin $i$.
Denote by $S=\sum_{i=1}^n X_i^2$ the sum of square loads on the bins.
I am looking for a high-probability upper bound on $S$, i.e., a quantity $B_{m,n}$ such that $$ \Pr\left[S \ge B_{m,n}\right]\le 1/n.$$
This question is motivated by an algorithm that uses fingerprints instead of ids for the balls and wishes to guarantee that with high probability there is no fingerprint collision between balls in the same bin (but there can be across bins). Since the probability of collision in bin $i$ is proportional to $X_i^2$, setting a fingerprint length proportional to $\log S$ will guarantee the correctness with high probability.
How can we derive a high probability upper bound for $S$?
One naive approach would be to use known high probability bounds on the maximum load. For example, if $m=n$ we have that the maximum load is bounded by $(2+o(1))\cdot \log n / \log\log n$ with high probability. This implies that we can set $B_{m,n} = (4+o(1))\cdot n\cdot\left(\log n / \log\log n\right)^2$. However, this seems like a very loose bound. How can we improve it (hopefully, for arbitrary $m$)?