CNet: A Complex-Valued Deep Learning Framework with Wirtinger Autodifferentiation and FFT--Hadamard Convolution

arXiv:2610.08592 · cs.LG, cs.MS, math.OC · Submitted 2026-10-06 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: Today's paper: "CNet: A Complex-Valued Deep Learning Framework with Wirtinger Autodifferentiation and FFT--Hadamard Convolution".

Jane: The gist The CNet framework is a C++/CUDA framework for building deep complex-valued neural networks (CVNNs) and optimizing complex functions by gradient descent with Wirtinger derivatives,

Tom: First, who's behind it and why it matters.

Title and authors: Tom: So we're diving into how they structured this CNet framework and what that means for building these complex models. The title itself points to several key parts: the complex-valued part, the Wirtinger autograd, and the FFT--Hadamard convolution.

Jane: That FFT--Hadamard convolution sounds like a real piece of signal processing they are integrating directly into the network layers. It suggests that spectral operations are baked in from the start, which is pretty cool for physics-based data.

Lu: They build their spectral structure using things like DFT and Hadamard products as first-class layers, so any problem naturally happening in the frequency plane can be mapped directly onto this framework without extra hacks.

Meng: But I have to ask about the implementation detail—how do they make sure this whole system is actually auditable? Since they’re dealing with complex math, verifying that it works correctly against a standard CPU reference is something I'll be looking at closely for production deployment.

Lalam: The paper says each layer ships both a CPU reference and a GPU kernel that gets checked against each other and against finite differences, which means the complex gradient is auditable, not just trusted blindly.

The paper's summary: Tom: Moving on to what they actually achieved in terms of the framework’s capabilities. The summary highlights that CNet isn't just a new way to do math; it’s a whole system built around physics-native ideas, specifically the Born rule for classification.

Jane: That Born rule is really interesting because it defines classification not as some soft probability over real numbers, but as a quantum measurement on an amplitude vector z, calculated like p k = z k squared / z squared <ref:2610.08592#pg1>. It’s a sharp departure from the standard softmax approach.

Lu: They define the loss function based on this measurement rule, which is L(z, y) = - sum k x k y k z k k z squared, and they handle non-holomorphic operations like z squared explicitly through a layer called CModulus2 <ref:2610.08592#pg1>.

Meng: So they are treating the entire network as a cascade of complex, often unitary operations on an amplitude vector, and classification is just measuring that final amplitude. That’s a different way to frame the learning problem entirely compared to standard real-valued networks.

Lalam: They also mention using GPU true-Adam for the optimizer and have built layers like CModulus2 with explicit Wirtinger derivatives, ensuring that those complex gradients are handled correctly through rules like d L / d z = d L / d w times d w / d z +...

The paper's improvements: Tom: Now let's look at what they actually improved over existing methods. They focus on the explicit handling of complex layers and the way they manage gradients when things aren't purely holomorphic.

Jane: One major improvement is that they handle non-holomorphic cases, like z squared, in an open way instead of hiding them behind some conjugation convention, which makes those terms concrete in the math <ref:2610.08592#pg1>. They have a worked example with the CModulus2 layer where w = z squared is treated as being composed of z and its conjugate <ref:2610.08592#pg1>.

Lu: They also ensure every layer has that CPU reference and GPU kernel checked against each other, which means for any custom complex function, like a CFunc, they have defined forward and backward passes that are verifiable.

Meng: It’s interesting because they are doing this layer by layer verification—checking the complex gradient accumulation against finite differences—which makes the entire process auditable rather than just relying on something being "correct" by convention.

Lalam: They also mentioned that they have a computation graph ordered by depth, and on an NVIDIA GPU, they clone the CPU network batch size times and execute forward and backward in parallel across those clones in depth order.

Conclusion: Tom: So to wrap up, CNet is presenting this C++ CUDA framework for complex-valued neural networks that are fundamentally physics-native through the Born rule classification. It’s a whole system focused on making complex learning transparent and auditable by using Wirtinger derivatives.

Jane: The main implication is that it provides a concrete substrate for research in areas where data is intrinsically complex, like RF communications or radar, because phase information carries something real that standard real networks throw away.

Lu: They’ve made moves like the causal Fourier mixing via Bluestein factorization to make decoder-style sequence modeling computationally viable with an O(N N) algorithm, which addresses a limitation in those types of models.

Meng: The paper flags a limitation because they are focusing on the framework itself rather than just achieving state-of-the-art performance on the hardest tasks; the bottleneck is often in feature construction, not capacity.

Lalam: They also point out that their specific benchmark, RML2016 point 10a, is quite specific to analog and digital modulations in IQ over SNRs from negative twenty to positive eighteen decibels <ref:2610.08592#pg1>.

Tom: So CNet gives us a new way to build these networks where the underlying math matches the physical reality of the data, moving away from just trying to force real models into complex arithmetic.

Jane: That’s exactly what it is—treating "complex and physics-native" as a design space in itself. It opens up new avenues for modeling things that are naturally complex.

cs.LG, cs.MS, math.OC

Submitted: 2026-10-06

Updated: 2026-10-15

Code: https://github.com/crasmarum/CNet

License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/

Importance score: 82/100

The gist: The gist The CNet framework is a C++/CUDA framework for building deep complex-valued neural networks (CVNNs) and optimizing complex functions by gradient descent with Wirtinger derivatives, which is

Key concepts

Wirtinger Derivatives
These are specific types of derivatives used in CNet to calculate gradients for complex functions. They allow the framework to treat the complex and its conjugate separately, providing a clear, first-class way to perform gradient descent on complex-valued neural networks.
Born Rule Classification
Instead of using a standard softmax function on real numbers, CNet classifies data using the Born rule: $p_k = |z_k|^2/||z||^2$. This treats classification as a physical measurement of an amplitude, which is more natural for complex systems and avoids discarding phase information.
Causal Fourier Mixer
This is a specialized convolution operation built using the Discrete Fourier Transform (DFT) to create causal (time-masked) mixing. CNet uses an $O(N ext{ log } N)$ algorithm via Bluestein factorization to efficiently implement this, allowing complex models to handle sequential data effectively.
Born-rule Attention
This is a novel attention mechanism where the score between two tokens is defined by the squared magnitude of their complex inner product: $| ext{query} imes ext{key} |^2$. This replaces standard dot-product attention with a quantum measurement probability, matching softmax performance in sequence modeling.

Summary

The gist The CNet framework is a C++/CUDA framework for building deep complex-valued neural networks (CVNNs) and optimizing complex functions by gradient descent with Wirtinger derivatives, which is important because it provides a complex-first, transparent substrate for research on complex-valued networks where data is intrinsically complex and phase carries information real networks discard.

Motivation and Design Philosophy

CNet exists because for research on complex-valued networks specifically, a complex-first, transparent substrate has concrete advantages Complex is the default, not a bolted-on dtype PyTorch and JAX both support complex tensors and complex-aware autodiff, but CNet does not compete on that axis Wirtinger gradients are explicit, first-class objects Spectral structure is built in A physics-native model and loss—the Born rule Classification is a measurement on an amplitude produced by a cascade of complex—often unitary—operations, rather than real logits passed through a softmax A small, auditable substrate.

Complex Layers and Autodifferentiation

Each layer manipulates the pair (∂L/∂z, ∂L/∂z¯) directly, and the non-holomorphic case (e.g. z2) is handled in the open rather than hidden behind a conjugation convention Worked example: the CModulus2 layer (w = z2). This is the canonical non-holomorphic case and makes the z¯ term concrete Higher moments z4, z8,... follow by chaining. Each layer is verified by a CPU reference against its GPU kernel, and the newer layers additionally by a finite-difference gradient check The general accumulation above collapses to ∂L/∂z = ∂L/∂z¯, as required for a real loss.

Computation Graph and Parallelism

The functional graph is ordered by depth On an NVIDIA GPU, CNet clones the CPU network batch size times and executes forward and backward in parallel across the clones in depth order. Multi-GPU data parallelism extends across GPUs by adding one more reduction level The clone model is single-GPU data parallelism, and it extends across GPUs by adding one more reduction level. Because CNet’s spectral nets are compute-heavy but parameter-light (the DFT mixers are parameter-free), the allreduce is cheap and scaling is near-linear.

Fast Causal Fourier Mixing

The causal (triangular-masked) DFT defines the mixer Mix(h)k = 1/√N Σj≤k hj ωjk, ω = e−i2π/N This is what lets Fourier mixing run in a decoder, the setting FNet (a non-causal encoder) does not address. An O(N log N) algorithm via Bluestein factorization removes that penalty with a Bluestein / chirp-z factorization of the masked transform The lower-triangular convolution is computed in the usual Bluestein way—zero-pad the two sequences to a power of two and evaluate the convolution with three ordinary (butterfly) FFTs.

Applications and Results

The framework’s primary benchmark is RML2016.10a [4], a standard set of 11 analog and digital modulations in native complex IQ over SNRs from −20 to +18 dB. A single complex network consumes the length-128 IQ window directly (no real/imag split) and combines, in one Born-rule classifier. Training uses true Adam on the high-SNR (≥ 6 dB) split. The ceiling is the feature construction, not capacity The isolated bottleneck is the hand-chosen pooled-power read-out (·2, ·4 with mean pooling plus the zM phase-order branches).

Born-rule Attention and Sequence Modeling

We propose Born-rule attention: a causal mixer whose scores are quantum-measurement probabilities (Figure 2) The score of query k against key j is the squared magnitude of their complex inner product, skj = ⟨Qk, Kj ⟩2. Born-rule attention matches standard softmax attention to within ≈ 0.02–0.03 nats/char (single-head: 1.56 vs. 1.54; multi-head, deeper: 1.55 vs. 1.52). A fully complex Born-rule attention language model—Born attention with rotary position embeddings (RotaryEmbed) on the queries and keys, per-token complex RMS normalization (TokenNorm) as a pre-norm, and the probability-floored Born loss of Section 9, trained data-parallel across four GPUs (E=160, 8 blocks, N=64, ∼2.1M complex parameters)—reaches 1.52 nats/char on tiny-shakespeare.

Phase Retrieval Problem

A third, exploratory study targets the problem the framework is in principle ideal for: recover a real, non-negative object ρ from the magnitude of its Fourier transform ρb—the phase problem of X-ray crystallography and coherent diffractive imaging. The large oracle–blind gap localizes the real obstacle: HIO does find the true basin often, but selecting the right solution blindly is what fails.

Outlook and Future Work

The central methodological bet is that the productive direction is not to port existing real-valued architectures into complex arithmetic and hope the inductive bias pays off The leverage is in treating “complex and physics-native” as a design space in its own right and searching it along both axes at once. Concrete follow-on experiments include Born-rule attention at scale, structure-keeping RML features, phase retrieval as a stochastic unrolled solver with a jointly-trained differentiable selector, and faster/deeper spectral stacks building on the Bluestein causal mixer and block norm. The contribution of this report is a working complex-valued substrate, a new O(N log N) causal Fourier mixer, and—just as deliberately—three honestly characterized gaps that define the next round of experiments.

Qualitative Samples

The complex Born-rule model produces real character names (Romeo, Coriolanus, Benvolio, Gloucester, King Henry VI, King Richard III), the NAME: / dialogue script format with line breaks, mostly well-formed words. The complex Born-rule model reaches 1.52 nats/char on tiny-shakespeare. The complex Born-rule model produces real character names (Romeo, Coriolanus, Benvolio, Gloucester, King Henry VI, King Richard III), the NAME: / dialogue script format with line breaks, mostly well-formed words and locally plausible Shakespearean syntax and punctuation. The complex Born-rule model produces real character names (Romeo, Coriolanus, Benvolio, Gloucester, King Henry VI, King Richard III), the NAME: / dialogue script format with line breaks; mostly well-formed words and locally plausible Shakespearean syntax and punctuation. The complex Born-rule model produces real character names (Romeo, Coriolanus, Benvolio, Gloucester, King Henry VI, King Richard III), the NAME: / dialogue script format with line breaks; mostly well-formed words and locally plausible Shakespearean syntax and punctuation<ref:2610.

Improvements for AI systems

  1. Improve sequence modeling by implementing Born-rule attention, which is the first attention mechanism built on the Born rule, allowing for content-based routing that is physics-native rather than a softmaxed dot product. This enables models to route information across an IQ sequence, matching phase-aligned symbols to separate physically similar modulations.

  2. Enhance classification accuracy in radio modulation tasks by replacing the bottleneck read-out with a learnable multi-tap complex convolution bank feeding a complex sequence head, which is designed to capture temporal structure that current pooled features discard, aiming to close the gap against SOTA real-valued CNNs.

  3. Enable phase retrieval in coherent imaging and crystallography by developing a jointly trained stochastic solver and differentiable, data-consistency-defined selector, addressing the non-uniqueness problem where blind selection fails to recover real objects from Fourier magnitudes.

  4. Increase efficiency in decoder-style sequence modeling by deploying an O(N log N) causal Fourier mixer via the Bluestein factorization, which runs level with the non-causal cuFFT path, making autoregressive models computationally viable without sacrificing performance.

  5. Develop a new operator for complex data analysis by implementing CModulus2, a non-holomorphic layer where the gradient accumulation is explicit, ensuring that gradients are handled via Wirtinger derivatives, which is critical for studying complex-valued learning itself.

Sources

Related papers