This is the material used in the ICSE 2024 tutorial on Neurosymbolic Programming. The goal of the notebooks is to provide a hands-on component (30 min each) to complement the tutorials. We provide code as an initial walk-through of baseline methods grounded in behavior analysis applications, with optional exercises for open-ended exploration. The dataset consists of thousands of frames of trajectory data annotated with behavior labels by domain experts. The notebooks demonstrate neurosymbolic programming for behavior quantification, where the task is to learn the relationship between pose and behavior.
This tutorial is divided into three Jupyter notebooks that we will run on Google Colab. If you do not wish to save progress, no setup is required. Head over to Notebook 1 to get started!
If you wish to save your work, we recommend manually copying the provided code to your google drive as shown here:
Specifically:
- Visit the code repository.
- Click on
Code (Green Button)
>Download ZIP
. A fileNeurosymbolic_Tutorial-icse24.zip
should be downloaded. - Extract the zip file and rename the folder to from
Neurosymbolic_Tutorial-icse24
toNeurosymbolic_Tutorial
. - Upload the folder to the root folder in your Google Drive.
- Navigate to
Neurosymbolic_Tutorial/neurosymbolic_notebook{1/2/3}.ipynb
. - Set
WITHIN_GDRIVE
toTrue
in the notebook.
Feel free to reach out to Atharva Sehgal for coding help! I'm available via:
- Email: Reach out at
[email protected]
. - Github Issues: Open a GitHub Issue here briefly describing the issue and we can try to debug the problem together!
The goal of this notebook is to provide a walk-through of the data with example code for training neural networks and programs.
- Data Visualization
- Plot trajectory samples
- Neural Network
- Train a 1D Conv Net
- Program
- Train program given structure
- Visualize Model Weights
- Open-Ended Exploration
This notebook walks through top-down type-guided enumeration, one approach for learning neurosymbolic programs.
- Running Enumeration
- Base DSL
- Morlet Filter DSL
- Neurosymbolic DSL
- Visualize Runtime vs. Classification Performance
- Implement Temporal Filter
- Open-Ended Exploration
This notebook walks through informed search via admissible neural heuristics (NEAR), another approach for learning neurosymbolic programs.
- Running NEAR
- Base DSL
- Morlet Filter DSL
- Visualize Runtime vs. Classification Performance
- Choose your path:
- Open-ended Exploration
- Modifying Architecture of Neural Heuristic
- IDDFS Search
- Test on Other Behaviors