  Two-sample hypothesis testing for network comparison presents many
significant challenges, including: leveraging repeated network observations and
known node registration, but without requiring them to operate; relaxing strong
structural assumptions; achieving finite-sample higher-order accuracy; handling
different network sizes and sparsity levels; fast computation and memory
parsimony; controlling false discovery rate (FDR) in multiple testing; and
theoretical understandings, particularly regarding finite-sample accuracy and
minimax optimality. In this paper, we develop a comprehensive toolbox,
featuring a novel main method and its variants, all accompanied by strong
theoretical guarantees, to address these challenges. Our method outperforms
existing tools in speed and accuracy, and it is proved power-optimal. Our
algorithms are user-friendly and versatile in handling various data structures
(single or repeated network observations; known or unknown node registration).
We also develop an innovative framework for offline hashing and fast querying
as a very useful tool for large network databases. We showcase the
effectiveness of our method through comprehensive simulations and applications
to two real-world datasets, which revealed intriguing new structures.
