While a good NNUE network would most certainly "understand" pawn-king structure, I wonder if it would be possible to combine an NNUE with a pawn-king specific net. To combine both networks to get a single scalar evaluation, just concatenate the output of the pawn-king network to the output of one of the hidden layers in the NNUE. Then, use that as the input for the next layer. A pawn-king table can be reintroduced to cache the output of the pawn-king network.
I made a diagram of how such a network could potentially be structured. The regular NNUE input features are on the left and are incrementally updated like normal. In the diagram, I have the features as HalfKA (11x64x64=45056) but it could really be any feature set. The pawn-king network is on the right. The input is 4 planes of dimensions 8x8 for the pawns and kings of the side-to-move and the side-not-to-move. The diagram only shows one convolutional layer with 32 filters, but ideally, there could be many more layers and filters. Because the output of the pawn-king net is cached, I would imagine it could afford to be somewhat expensive.
Any thoughts on this concept? Does it hold any merit or is it completely impractical?
