- Complex Normalization Function
def normalize(self, z):
rho = th.abs(z)
theta = th.atan2(th.imag(z), th.real(z))
return th.tanh(rho) * (th.cos(theta) + 1.0j * th.sin(theta))This function maps complex values onto a curved manifold by:
- Converting to polar coordinates (magnitude
rhoand phasetheta) - Applying hyperbolic tangent (
tanh) to the magnitude - Preserving angular information while bounding magnitude
- Flow Transformation
def flow(self, dx, dy, data):
return data * (1 + dy) + dxThis seemingly simple operation actually defines a complex Möbius-like transformation that:
- Performs both scaling (
data * (1 + dy)) and translation (+ dx) - Preserves the hyperbolic structure of the complex plane
- Creates non-linear geometric mappings
- Complex Parameter Dynamics
dx = self.afactor * th.sum(v * th.tanh(w), dim=-1)
dy = self.mfactor * th.tanh(data)
data = self.flow(dx, dy, data)This creates the actual geometric transformations by:
- Computing position-dependent scaling and translation
- Creating curved decision boundaries in the complex plane
- Establishing hyperbolic paths for information encoding
Theorem (AEG Hyperbolic Encoding): For complex-valued data z, the AEG normalization N(z) = tanh(|z|)e^(iθ) maps values onto a hyperbolic manifold where:
- Values with equal phase lie on radial lines through the origin
- Values with equal magnitude lie on concentric circles
- The tanh function compresses infinite magnitudes to the unit disc
The key property is that this mapping creates a hyperbolic space where:
- Distance between points increases exponentially toward the boundary
- Parallel lines diverge exponentially (unlike Euclidean geometry)
- Information density increases toward the boundary of the unit disc
- The
tanhoperation maps the complex plane onto a bounded disc (hyperbolic geometry) - The flow operation
z ↦ z(1+dy) + dxcreates Möbius-like transformations - The combined operations allow the network to encode information along curved geodesics
- By learning optimal complex parameters, the network discovers the most efficient geometric encoding of data
This geometric approach differs fundamentally from traditional neural networks, which operate in Euclidean space with linear transformations followed by non-linear activations. AEG instead directly manipulates the geometric structure of the complex plane, enabling more efficient representations using hyperbolic rather than Euclidean geometry.