T-Norms
Fuzzy T-norm aggregation strategies for TSK antecedent computation.
This module defines learnable T-norm strategies used by highfis.layers
to aggregate per-input membership degrees into rule firing strengths.
Each strategy is implemented as a subclass of BaseTNorm.
Built-in T-norm classes
ProductTNorm— standard product conjunction.MinimumTNorm— Gödel / minimum conjunction.GMeanTNorm— geometric mean, the default for HTSK.DombiTNorm— Dombi parametric T-norm (lambda_ > 0).AdaptiveDombiTNorm— Dombi T-norm with adaptive lambda selection.YagerTNorm— Yager parametric T-norm (lambda_ > 0).YagerSimpleTNorm— simplified Yager without the outer minimum.ALESoftminYagerTNorm— ALE-softmin Yager variant.
Helper functions
resolve_t_norm(name)— map string names to T-norm instances. Supported names include"prod","min","gmean","dombi","yager","yager_simple", and"ale_softmin_yager".
ALESoftminYagerTNorm
Bases: BaseTNorm
ALE-softmin based Yager T-norm strategy.
Initialize the ALE-softmin Yager t-norm with a lambda parameter and optional epsilon.
Source code in highfis/t_norms.py
forward
Compute ALE-softmin Yager aggregation over the specified dimension.
Source code in highfis/t_norms.py
AdaptiveDombiTNorm
Bases: BaseTNorm
Adaptive Dombi T-norm strategy with automatically selected lambda.
Initialize the adaptive Dombi T-norm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dimension
|
int
|
Number of input features D. |
required |
lower_bound
|
float
|
Positive lower bound of the membership function. |
1.0 / math.e
|
K
|
float
|
Heuristic scaling constant used to compute lambda. |
10.0
|
eps
|
float | None
|
Small positive constant for clamping inputs. |
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If arguments are invalid or lambda cannot be computed. |
Source code in highfis/t_norms.py
BaseTNorm
Bases: nn.Module, ABC
Base class for T-norm strategies.
forward
abstractmethod
Apply the T-norm aggregation over the specified dimension.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
terms
|
Tensor
|
Tensor of shape |
required |
dim
|
int
|
Dimension over which to aggregate. Defaults to
|
-1
|
Returns:
| Type | Description |
|---|---|
Tensor
|
Tensor of shape |
Tensor
|
firing strengths. |
Source code in highfis/t_norms.py
DombiTNorm
Bases: BaseTNorm
Dombi T-norm strategy.
Initialize the Dombi T-norm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lambda_
|
float
|
Positive shape parameter \(\lambda > 0\). Higher values make the T-norm approach the minimum; lower values make it approach the product. |
1.0
|
eps
|
float | None
|
Small positive constant for clamping inputs.
|
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If lambda_ is not positive. |
Source code in highfis/t_norms.py
forward
Compute the Dombi aggregation over the specified dimension.
Source code in highfis/t_norms.py
GMeanTNorm
Bases: BaseTNorm
Geometric mean T-norm.
Initialize the geometric mean T-norm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eps
|
float | None
|
Small positive constant for clamping inputs before
computing the log. |
None
|
Source code in highfis/t_norms.py
forward
Compute the geometric mean over the specified dimension.
Source code in highfis/t_norms.py
MinimumTNorm
ProductTNorm
YagerSimpleTNorm
Bases: BaseTNorm
Simplified Yager T-norm strategy without an extra minimum operator.
Initialize the simplified Yager t-norm with a lambda parameter and optional epsilon.
Source code in highfis/t_norms.py
forward
Compute the simplified Yager aggregation over the specified dimension.
Source code in highfis/t_norms.py
YagerTNorm
Bases: BaseTNorm
Yager T-norm strategy.
Initialize the Yager T-norm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lambda_
|
float
|
Positive shape parameter \(\lambda > 0\). Higher values make the T-norm approach the minimum; lower values make it approach the product. |
1.0
|
eps
|
float | None
|
Small positive constant for clamping inputs.
|
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If lambda_ is not positive. |
Source code in highfis/t_norms.py
forward
Compute the Yager aggregation over the specified dimension.
Source code in highfis/t_norms.py
resolve_t_norm
Resolve a built-in t-norm by name.