Gating networks are lightweight neural-network modules, typically a single linear layer followed by a softmax or sigmoid activation, that compute specific routing weights determining exactly how much each individual expert sub-network, in a mixture-of-experts architecture, should actually contribute to processing a given specific input token. This routing-weight-computation role is the specific defining function of a gating network, distinguishing it from the several individual expert sub-networks it routes between, which instead each actually perform the real underlying computational processing work on whatever specific input the gating network has actually routed to them.