Factor Graph-based Interpretable Neural Networks