Table of Contents
Fetching ...

Learning Nonlinearity of Boolean Functions: An Experimentation with Neural Networks

Sriram Ranga, Nandish Chattopadhyay, Anupam Chattopadhyay

TL;DR

Empirical results are reported to show that deep neural networks are able to learn to predict the nonlinearity property of Boolean functions for functions in 4 and 5 variables with an accuracy above 95%.

Abstract

This paper investigates the learnability of the nonlinearity property of Boolean functions using neural networks. We train encoder style deep neural networks to learn to predict the nonlinearity of Boolean functions from examples of functions in the form of a truth table and their corresponding nonlinearity values. We report empirical results to show that deep neural networks are able to learn to predict the property for functions in 4 and 5 variables with an accuracy above 95%. While these results are positive and a disciplined analysis is being presented for the first time in this regard, we should also underline the statutory warning that it seems quite challenging to extend the idea to higher number of variables, and it is also not clear whether one can get advantage in terms of time and space complexity over the existing combinatorial algorithms.

Learning Nonlinearity of Boolean Functions: An Experimentation with Neural Networks

TL;DR

Empirical results are reported to show that deep neural networks are able to learn to predict the nonlinearity property of Boolean functions for functions in 4 and 5 variables with an accuracy above 95%.

Abstract

This paper investigates the learnability of the nonlinearity property of Boolean functions using neural networks. We train encoder style deep neural networks to learn to predict the nonlinearity of Boolean functions from examples of functions in the form of a truth table and their corresponding nonlinearity values. We report empirical results to show that deep neural networks are able to learn to predict the property for functions in 4 and 5 variables with an accuracy above 95%. While these results are positive and a disciplined analysis is being presented for the first time in this regard, we should also underline the statutory warning that it seems quite challenging to extend the idea to higher number of variables, and it is also not clear whether one can get advantage in terms of time and space complexity over the existing combinatorial algorithms.

Paper Structure

This paper contains 12 sections, 1 theorem, 15 equations, 4 figures, 1 table.

Key Result

Proposition 1

There exist $2^{N}$$n$-variable Boolean functions.

Figures (4)

  • Figure 1: Network used for learning the Walsh spectrum of $n$-variable Boolean functions. Processed Boolean functions (after replacing 0/1 in their truth tables with 1/-1) and corresponding Walsh spectra are used as examples to train the network. The weight matrix after convergence resembles the Walsh Hadamard matrix.
  • Figure 2: Accuracy of the model drops significantly when less than $N$ linearly independent functions are given as inputs to the linear network. The drop gets sharper as $n$ increases.
  • Figure 3: Networks used for learning the nonlinearity of Boolean functions in an end to end fashion. Only Boolean functions and corresponding nonlinearity values are used as examples to train the network. On the left is a network that can model nonlinearity calculation, but does not respond well to training. As an example, expected weights for 2-variable functions are given. On the right is the deep encoder style network using which we could learn to predict nonlinearity. The design used for 4-variable functions is shown in the figure.
  • Figure 4: Confusion matrices of the predictions made by the model trained on 4-variable Boolean functions in an end to end fashion. Predictions for train and test data are given.

Theorems & Definitions (10)

  • definition thmcounterdefinition: Boolean Function
  • Proposition 1
  • definition thmcounterdefinition: Weight of a Boolean Function
  • definition thmcounterdefinition: Hamming Distance
  • definition thmcounterdefinition: Algebraic Normal Form
  • definition thmcounterdefinition: Algebraic Degree of a Boolean Function
  • definition thmcounterdefinition: Affine Function
  • definition thmcounterdefinition: Nonlinearity of a Boolean Function
  • definition thmcounterdefinition: Walsh Transform
  • definition thmcounterdefinition: Hadamard Matrix