Contributing to JLNN¶
Thank you for your interest in contributing to the JLNN project! As a neuro-symbolic framework built on JAX, we emphasize mathematical correctness, performance, and code readability.
How can you help?¶
Implementation of new gates: Adding additional semantics (e.g. Gödel, Product logic) to the
jlnn.nn.functionalmodule.Temporal logic: Extending the
jlnn.reasoning.temporalmodule with operators such as Until or Since.Optimization: Improving the compiler’s tracer or adding support for distributed learning.
Documentation: Fixing errors in text or creating new tutorials (Jupyter Notebook).
Development Environment¶
For development, we recommend creating a clean virtual environment:
git clone https://github.com/RadimKozl/JLNN.git
cd jlnn
python -m venv venv
source venv/bin/activate
pip install -e ".[dev]"
Code standards¶
To make the project sustainable, we adhere to the following rules:
Typing: All functions must have type annotations (Type Hints) according to PEP 484.
Docstrings: We use the Google Style Python Docstrings format. Each logical operation must have a clear mathematical explanation.
JAX Compliance: Code must be purely functional where required (compatibility with
jax.jitandjax.vmap).NNX State: When working with parameters in modules, always use
nnx.Paramto ensure automatic weight tracking.
Process Pull Request¶
Create a new branch (branch) from
mainwith a name describing your change (e.g.feature/new-gate).Add tests to the
tests/folder (we usepytest).Ensure your change does not break existing logical axioms (run checks using
jlnn.nn.constraints).Submit a Pull Request and wait for review.
Error reporting¶
If you encounter numerical instability (e.g. NaN during gradient computation for XOR) or a parsing error in formulas, please open an Issue on GitHub with a minimal reproducible example.