Efficient anomaly detection using bipartite k-NN graphs