Synthesizing neural network and symbolic knowledge processing