  Graph neural networks (GNNs) have been shown promising in optimizing power
allocation and link scheduling with good size generalizability and low training
complexity. These merits are important for learning wireless policies under
dynamic environments, which partially come from the matched permutation
equivariance (PE) properties of the GNNs to the policies to be learned.
Nonetheless, it has been noticed in literature that only satisfying the PE
property of a precoding policy in multi-antenna systems cannot ensure a GNN for
learning precoding to be generalizable to the unseen number of users.
Incorporating models with GNNs helps improve size generalizability, which
however is only applicable to specific problems, settings, and algorithms. In
this paper, we propose a framework of size generalizable GNNs for learning
precoding policies that are purely data-driven and can learn wireless policies
including but not limited to baseband and hybrid precoding in multi-user
multi-antenna systems. To this end, we first find a special structure of each
iteration of two numerical algorithms for optimizing precoding, from which we
identify the key characteristics of a GNN that affect its size
generalizability. Then, we design size-generalizable GNNs that are with these
key characteristics and satisfy the PE properties of precoding policies in a
recursive manner. Simulation results show that the proposed GNNs can be
well-generalized to the number of users for learning baseband and hybrid
precoding policies and require much fewer samples than existing counterparts to
achieve the same performance.
