# Can (trained) neural networks be combined with symbolic AI to perform operations like AND?

Does anyone work out ways of relating trained neural networks by symbolic AI?

For example, if I train a network on pictures of dogs, and I train a network on pictures of shirts. You could imagine that the simplest way (without going through the process from scratch) of identifying "dog AND shirt" would be to perform an AND operation on the last output of the individual cat & dog neural nets. So, "dog AND shirt" would amount to AND'ing the output of two nets.

But this operation AND could be replaced with a more complicated operation. And, in principle, I could "train" a neural network to act as one of these operations. For instance, maybe I could figure out the net that describes some changeable output "X" being "on the shirt." This would be sort of like a "functional" in mathematics (in which we are operating are considering the behavior of a network whos input could be any network). If I can figure out this "functional", then I would be able to use it symbolically and determine queries like "dog on the shirt"? - "cat on the shirt"?

It seems like to me there's a lot of sense to turn specific neural networks into more "abstract" objects - and that there would be a lot of power in doing so.

This network searches for satisfying solutions for the weighted conjunctive normal form (CNF):$$\text{(¬X ∨ ¬Y ∨ Z) ∧ (X ∨ Y )}$$.