Learned Predicates¶
- class jlnn.nn.predicates.FixedPredicate(*args: Any, **kwargs: Any)[source]¶
Bases:
ModuleNon-trainable predicate that returns the input interval unchanged.
This module serves as an identity transformation for truth intervals, preserving the original lower and upper bounds. It is primarily utilized for crisp boolean logic scenarios where fixed truth values are required without neural weight updates.
- None¶
- class jlnn.nn.predicates.LearnedPredicate(*args: Any, **kwargs: Any)[source]¶
Bases:
ModuleGrounding layer that transforms real-valued input data into truth intervals [L, U].
In Logical Neural Networks (LNN), predicates act as the interface between numeric data and logical formulas. This class learns the semantic mapping (grounding) by adjusting slopes and offsets of activation functions to produce fuzzy truth values.
- slope_l¶
Steepness of the lower bound activation.
- Type:
nnx.Param
- offset_l¶
Horizontal shift for the lower bound activation.
- Type:
nnx.Param
- slope_u¶
Steepness of the upper bound activation.
- Type:
nnx.Param
- offset_u¶
Horizontal shift for the upper bound activation.
- Type:
nnx.Param