We have implementedThe python implementation of dNL-ILP
is available at https://github.com/apayani/ILP the dNL-ILP solver model using Tensorflow ([1]}). In the previous sections, we have outlined the process in a sequential manner. However, in the actual implementations we first create index matrices using all the background facts before starting the optimization task. Further, all the substitution operations for each predicate (at each time-stamp) are carried using a single gather function. Finally, at each time-stamp and for each intensional predicate, all instances of applying (executing) the neural function \({F}^i_p\)  are carried in a batch operation and in parallel.
The proposed algorithm allows for a very efficient learning of arbitrary complex formulas and significantly reduces the complexity that arises in the typical ILP systems when increasing the number of possible atoms in each rule. Indeed, in our approach, usually there is no need for any tuning and parameter specification other than the size of the DNF network (total number of rules for a predicate) and specifying the number of existentially quantified variables for each rule.
On the other hand, since we use a propositionalization step (typical to almost all neural ILP solvers), special care is required when the number of constants in the program is very large. While for the extensional and target predicates we can usually define the vectors \(X_p\)  corresponding only to the provided atoms in the sets \(\mathcal {B}\) , \(\mathcal {P}\)  and \(\mathcal {N}\) , for the auxiliary predicates we may need to consider many intermediate ground atoms not included in the program. In such cases, when the space of possible atoms is very large, we may need to restrict the set of possible ground atoms.
