Hi — Gnostic Relevance Activation¶
Gnostic relevance activation measuring feature agreement with concept center z0 via tanh(2θ) with learnable scale S. Value range: [-1, 1].
Overview¶
High values indicate strong alignment with the learned manifold; paired with Hj for relevance-irrelevance analysis.
The centered coordinate is θ = (x - z0) / S.
Key Features¶
- Learnable
z0,S - Relevance / agreement measure
- Custom autograd kernel
Parameters¶
| Parameter | Type | Default | Description |
|---|---|---|---|
learnable_S |
bool |
True |
Optimize scale |
learnable_z0 |
bool |
True |
Optimize center |
initial_S |
float |
1.0 |
Initial scale |
initial_z0 |
float \| None |
None |
Initial center |
name |
str \| None |
None |
Name |
verbose |
bool |
False |
Logging |
Attributes¶
S: Stored raw scale parameter tensorz0: Learnable center tensortheta: Most recent centered deviation (θ)last_output: Most recent relevance response
Methods¶
forward(x, training=True)¶
Return the activation applied to input.
- x:
Tensoror array-like — Input values of any shape - Returns:
Tensorwith same shape asx
Example Usage¶
import numpy as np
from machinegnostics.magnet import Hi
activation = Hi()
result = activation(np.array([[0.0]]))
print(result.data.tolist()) # [[0.0]]
Author: Nirmal Parmar