Thi
7BFF
s repository is the official implementation of Data-efficient learning with Neural Programs
.
Run the following:
-
Install the dependencies inside a new virtual environment:
bash setup.sh
-
Activate the virtual environment:
conda activate ISED
-
(Optional) Install package for Neural-GPT experiments:
pip install openai
-
Leaf Identification: download the leaf dataset and place it under
data/leaf_11
. -
Scene Recognization: download the scene dataset and place it under
data/scene
. -
Hand-written Formula: download the hwf dataset and place it under
data/hwf
. -
Visual Sudoku: download the SatNet dataset, unzip the data, and place
features.pt
,features_img.pt
,labels.pt
, andperm.pt
underdata/original_data
.
To reproduce custom ISED experiments in the paper, run
cd custom/<TASK>
python PATH_TO_PROGRAM.py
To reproduce ISED MNIST-R experiments, run
cd generation-pipeline
python run.py --task <TASK>
where possible task names are sum_2_mnist, sum_3_mnist, sum_4_mnist, less_than_mnist, eq_2_mnist, mod_2_mnist, add_mod_3_mnist, add_sub_mnist, mult_2_mnist, not_3_or_4_mnist, how_many_3_or_4_mnist.
We used 10 random seeds [1357, 2468, 3177, 5848, 9175, 1234, 8725, 548, 6787, 8371] for all experiments, except for custom/sample_count
where we used the first 5.
To reproduce experiements for the baselines, we provide additional instructions for A-NeSI, DeepProbLog, NASR, REINFORCE, IndeCateR, and Scallop.
- Leaf dataset comes from A Data Repository of Leaf Images: Practice towards Plant Conversarion with Plant Pathology
- Scene dataset comes from Multi-Illumination Dataset