  We consider representation learning for proteins with 3D structures. We build
3D graphs based on protein structures and develop graph networks to learn their
representations. Depending on the levels of details that we wish to capture,
protein representations can be computed at different levels, \emph{e.g.}, the
amino acid, backbone, or all-atom levels. Importantly, there exist hierarchical
relations among different levels. In this work, we propose to develop a novel
hierarchical graph network, known as ProNet, to capture the relations. Our
ProNet is very flexible and can be used to compute protein representations at
different levels of granularity. By treating each amino acid as a node in graph
modeling as well as harnessing the inherent hierarchies, our ProNet is more
effective and efficient than existing methods. We also show that, given a base
3D graph network that is complete, our ProNet representations are also complete
at all levels. Experimental results show that ProNet outperforms recent methods
on most datasets. In addition, results indicate that different downstream tasks
may require representations at different levels. Our code is publicly available
as part of the DIG library (\url{https://github.com/divelab/DIG}).
