Computer scientists at the University of Pennsylvania have developed an algorithmic framework for conducting targeted surveillance of individuals within social networks while protecting the privacy of “untargeted” digital bystanders. As they explain in this week’s Proceedings of the National Academy of Sciences (PNAS), the tools could facilitate counterterrorism efforts and infectious disease tracking while being “provably privacy-preserving”—having your anonymous cake and eating it too.