reggaeshark888 / NeuralogicCompiler

0 stars 0 forks source link

MLP Interpretability

This repository contains various files and notebooks related to the development, training, and evaluation of MLP models with ternary weights, including an ILP algorithm for determining an integer set of weights, hyperparameter optimization, and logic expression weight generation.

Repository Structure

File Descriptions

minimum_integer_set_algorithm.ipynb

This notebook implements an ILP algorithm to determine an optimal set of integer weights. It explores different approaches and methodologies to solve the problem efficiently.

hyperparameter_experiments.ipynb

This notebook conducts a comprehensive grid search to find the best hyperparameters for the MLP models. It includes detailed experiments and results analysis to identify the optimal settings for model training.

ternary_weight_mlp.py

This script defines the architecture for MLP models with ternary weights. It includes the following components:

experiments.ipynb

This notebook focuses on the interpretability experiments of the MLP models. It includes various experiments to analyze and interpret the model behavior and decision-making processes.

Logic*.py and MyVisitor.py

These scripts are responsible for generating the corresponding MLP weights for logic expressions. They include:

Usage

  1. Clone the repository to your local machine.
  2. Ensure you have the required dependencies installed (listed in requirements.txt).
  3. Explore the notebooks and scripts to understand and run the experiments and algorithms.

Installation


git clone <repository_url>
cd <repository_directory>
pip install -r requirements.txt