pihnn.nn.PIHKAN#

class pihnn.nn.PIHKAN(PDE, units, degree, material={'lambda': 1, 'mu': 1}, has_bias=True, rhs_solution=None)#

Bases: PIHNN

Physics-informed holomorphic Kolmogorov-Arnold network (PIHKAN).

In Calafà et al. [2026], we introduce PIHKANs as the physics-informed and holomorphic variant of KANs (Liu et al. [2024]). In contrast with the original KANs, the trainable activation functions are defined as the complex-valued monomials \(1,z,z^2,\dots\) PIHKAN is defined as a sequence of pihnn.nn.PIHKANLayer.

Parameters:
  • PDE (str) – Problem to solve, either ‘laplace’, ‘biharmonic’, ‘km’ or ‘km-so’.

  • units (list of int) – List containing number of units at each layer, e.g., [1,10,10,1].

  • degree (int) – KAN polynomial degree \(D\).

  • material (dict) – Properties of the material, dictionary with ‘lambda’ (first Lamé coefficient), ‘mu’ (second Lamé coefficient).

  • has_bias (bool) – Whether to include the bias vector.

  • rhs_solution (callable) – Particular solution to the non-homogeneous problem. E.g., \(x^2+y^2\) for \(\nabla^2u=4\).

forward(z, real_output=False)#

Perform the forward pass as a concatenation of PIHKAN layers:

\[\mathcal{L}_{L,t} \circ \dots \circ \mathcal{L}_{1,t} (z),\]

where \(\mathcal{L}_{l,t}\) is the \(l\)-th PIHKANLayer for the \(t\)-th complex potential.

Parameters:
  • z (torch.tensor(dtype=torch.complex128)) – Input of the network, typically a batch of coordinates from the domain boundary.

  • real_output (bool) – Whether to provide the output in the real-valued representation.

Returns:

phi (torch.tensor(dtype=torch.complex128)) - Output of the network.