KENN (Knowledge Enhanced Neural Networks) is a library for python built on top of TensorFlow that lets you modify neural networks models by providing logical knowledge in the form of a set of universally quantified FOL clauses. It does so by adding a new final layer, called Knowledge Enhancer (KE), to the existing neural network. The KE changes the orginal predictions of the standard neural network enforcing the satisfaction of the knowledge. Additionally, it contains clause weights, learnable parameters which represent the strength of each clause.

First version of KENN (python 2 TensorFlow 1):

Second version of KENN (python 3, TensorFlow 2):

Experiments on CiteSeer dataset: