Many sensing problems ask a network to read an ordered physical quantity out of a wave: the angle a radio source arrives from, the distance to a radar target, the depth of a person seen through WiFi. In all of these, the quantity enters the raw signal as a phase rotation. A source at angle θ rotates the phase across an antenna array by an amount proportional to sin θ. Range and delay rotate phase across frequency. Meanwhile, the best tools for learning ordered representations work only in real-valued spaces and know nothing about phase. These tools are ordinal contrastive losses: training objectives that force embedding distances to follow label distances. Complex-valued neural networks (networks whose weights and activations are complex numbers, so amplitude and phase stay coupled) have the opposite gap. They handle phase natively, but they are trained with plain regression, binned classification, or contrastive losses that only cluster categories. We propose to learn embeddings that are banks of phasors (unit complex numbers) whose angles rotate at several fixed rates as the target changes. Training uses a rank-based contrastive loss defined on those phases, plus a consistency loss driven by synthetic phase-ramp augmentations whose effect on the label is known exactly.
The opportunity is that, for these tasks, the ideal embedding is not arbitrary. It is close to the signal's own multi-scale phase structure. For a uniform linear array, the steering vector already looks like this: coarse unwrapped phase on adjacent elements and fine, wrapped phase on distant elements. Ordinal contrast gives a way to impose that structure robustly under noise. Using several rotation rates resolves the conflict between monotone order and the 2π wrap-around of a single phase, which the research file flags as unresolved.
Core Claim
A naive "complex Rank-N-Contrast" adds nothing. Rank-N-Contrast (Supervised Contrastive Regression) ranks batch samples by label distance and requires embedding distances to follow that ranking. If one swaps its Euclidean distance for the Hermitian distance $\|z_i - z_j\|$ in $\mathbb{C}^d$, the loss is literally identical to real RNC on concatenated real and imaginary parts. That variant is a trivial reparameterisation, and we do not propose it.
Our claim is narrower and testable. For targets that act on the input as a phase ramp, the embedding should be constrained to a specific multi-frequency phasor code. Write $u(y)$ for the target mapped to its phase-linear coordinate, for example $\sin\theta$ for direction of arrival. The target code is
$$c_k(y) = e^{i\,\omega_k u(y)}, \qquad \omega_k = 2^k \omega_0,\quad k = 0,\dots,K-1,$$
where $\omega_0$ is chosen so that $\omega_0 u$ spans less than $2\pi$ over the label range. The coarsest phasor therefore never wraps, and finer phasors add resolution. The distance between two codes, $\sum_k (1-\cos(\omega_k \Delta u))$, is a strictly increasing function of the label gap $|\Delta u|$ on the label range because of the unwrapped $k=0$ term. Ranking by this code distance is therefore a valid ordinal target in the sense of Rank-N-Contrast's δ-ordering.
The loss we add on top is an equivariance (consistency) term. Let $R_\Delta$ be the operation that multiplies the input by a known phase ramp, which shifts the label by $\Delta$ (an exact identity for array and frequency-domain data). Let $D(\Delta)=\mathrm{diag}(e^{i\omega_k\Delta})$ be the matching rotation of each phasor. The term asks
$$z(R_\Delta x) \approx D(\Delta)\, z(x).$$
This gives an unlimited supply of ordered pairs with exactly known label offsets, including from unlabeled data. Prediction unwraps the phasors coarse-to-fine, as in multi-frequency interferometric unwrapping. It needs no reference anchors, which removes the initialization sensitivity reported for Geometric Order Learning for Rank Estimation.
The complex network is a hypothesis about where this structure comes cheaply, not an article of faith. Complex-linear layers tie rotation and scaling together. A complex linear head $\mathbf{w}^H\mathbf{z}$ acts like two coupled real heads, which is reminiscent of the multiple-target fix in Improving Deep Regression with Tightness. We test whether that coupling buys data efficiency and noise robustness over a real network trained with the same code and losses. If it does not, the contribution reduces to the loss and target geometry, and we will report it that way.
Relation to Prior Work
Prior work plays three roles here.
The ordinal-contrastive line supplies the method. Rank-N-Contrast gives the batch-ranking loss. RankSim aligns neighbour rankings of label and feature similarity matrices. Geometric order learning decouples direction (order) from distance (metric) on a hypersphere. Tightness and Ordinal Entropy explain why plain regression leaves features loose. All of these operate in real space with label-agnostic geometry. We replace the free hypersphere with a target geometry dictated by how the label acts on the signal.
The complex-contrastive line motivates the gap and shows what has not been done. Contrastive Training of Complex-Valued Autoencoders pushes object phases apart on the circle for unsupervised segmentation, which is categorical repulsion with no order. TrustworthyQENN clusters complex amplitude-and-phase features by class for out-of-distribution detection. PHALAR uses the Fourier shift theorem to turn time offsets into phase rotations, but only for match/no-match retrieval. PHALAR is the closest in mechanism, and it also constrains us: it reports degradation on non-periodic content. That is exactly the wrap-around failure the multi-rate code must avoid.
The sensing line supplies the regimes and the strongest competitors. A GAN-CNN Fusion Framework for DOA Estimation runs complex CNNs on covariance matrices with angle classification. WiFi-Mamba couples amplitude and phase streams and finds that phase resolves depth, but it trains by direct coordinate regression. Neither structures its latent space by order.
Research Program
We will build a complex encoder from complex convolutions in the style of DCCRN, with modReLU and complex RMSNorm as in PHALAR. Gradients are Wirtinger gradients, following the argument of Real-Valued Backpropagation is Unsuitable for Complex-Valued Neural Networks. The encoder ends in $K$ phasor units normalised to unit magnitude, with a separate magnitude channel kept for confidence.
Training combines three losses. The first is a rank-contrastive loss in which positive/negative sets for each anchor are ordered by code distance. The second is the phase-ramp consistency loss. The third is a light per-unit phase regression to $c_k(y)$. We will analyse three things:
- Whether the learned phasors match the steering-vector structure.
- How the gross-error rate (wrong unwrapping branch) depends on $K$ and SNR.
- Whether conditional spread of features given label, the "tightness" quantity, is lower for complex than for matched real encoders under the same loss.
Baselines
The naive reference is classical MUSIC on the synthetic direction-of-arrival benchmark. The GAN-CNN paper reports 12.8° RMSE and 15.2% accuracy for MUSIC at −10 dB SNR with 500 snapshots. Any learned method must clear it easily.
The strongest existing method is the GAN-CNN complex network itself. It reports 3.9° RMSE and 72.2% accuracy at −10 dB with 500 snapshots, and 1.1° RMSE and 93.8% accuracy at 20 dB with 50 snapshots. Its ResNet baseline reports 4.7° RMSE and 65.7% accuracy at −10 dB. We will reimplement the GAN-CNN with its denoiser under the same simulator settings: SNR −10 to 20 dB, 50–500 snapshots, and Gaussian, Laplacian, uniform and Gaussian-mixture noise. Because the paper's accuracy threshold is not stated in the file, RMSE is the primary comparison. Beating it means lower RMSE at −10 dB and a lower gross-error rate across the non-Gaussian noise types, at equal real-parameter count. We should also beat it without the GAN denoiser, since our method has no denoiser.
Two further baselines isolate the complex network itself. One is a real two-channel (I/Q) encoder trained with plain Rank-N-Contrast. The other is the same real encoder trained with our exact phasor code and phase-ramp consistency, its output read as cos/sin pairs. The second is the key ablation: it isolates whether complex arithmetic matters once the geometry is fixed.
Further ablations isolate the remaining ingredients:
- removing the consistency loss;
- using a single phasor ($K=1$), which should expose wrap failures when made fine;
- substituting RankSim for the rank loss;
- a complex encoder with L1 regression;
- a complex encoder with binned cross-entropy.
All arms share data, epochs, and a fixed hyperparameter search of equal trials. Network width is matched by real-parameter count.
Why not just…?
Why not just split into I/Q channels and run Rank-N-Contrast? This is a reasonable baseline and we run it. The evidence that it falls short is indirect. The GAN-CNN study reports its real ResNet at 4.7° versus 3.9° for the complex model at −10 dB. Enhancing RF Sensing with Deep Learning argues that I/Q splitting discards phase coupling. Neither tests an ordinal loss, so our matched comparison is the actual evidence.
Why not just use a real network with sinusoidal (cos/sin) target encodings? This is the real threat. A real network can represent the same multi-rate code, and nothing in the file shows it cannot learn the phase-ramp consistency. The matched real-geometry ablation settles it. If that ablation ties the complex model on RMSE, gross errors, and low-data curves, we conclude that the gain comes from the phasor geometry and the augmentation, not from complex arithmetic. We will report it as such.
Why not just train a complex network with direct regression or binning? The complex architecture already preserves phase, so a skeptic may see the loss as decoration. Tightness results show regression leaves features loose: the tightness regulariser cut AgeDB-DIR MAE from 7.80 to 7.28 and NYUD2-DIR RMSE from 1.477 to 1.321. RankSim shows binning collapses tail labels. Those results are on real networks, so the complex-L1 and complex-cross-entropy ablations test whether they carry over.
Proposed Experiments
The primary testbed is the synthetic direction-of-arrival setup described above. The phase-ramp identity is exact there, and reported baselines exist. Beyond RMSE, we will measure:
- the gross-error rate;
- Spearman correlation between latent distance and label distance;
- RMSE versus number of training samples, echoing RNC's claim that 2,000 samples can beat 16,000;
- extrapolation to angles held out of training.
The second testbed is depth in Person-in-WiFi 3D. There, time of flight acts as a phase slope across subcarriers, but hardware phase offsets break the exact ramp identity. Applying our model to the depth axis of WiFi-Mamba features tests robustness. The comparison point is WiFi-Mamba's reported 16–27% MPJPE reduction and its more than 30% depth improvement; no absolute MPJPE value was found on Lacuna.
The third testbed is target range from raw radar tensors in CRUW3D. That paper reports detection AP (32.72% for RODNet) but no range-error number was found on Lacuna, so we will establish the regression baselines ourselves.
As a negative control, we will apply the phasor code with a real network to AgeDB-DIR, where no phase ramp exists. We expect no gain over RankSim's reported 7.13 MAE. A gain would mean the code acts as a generic regulariser rather than a physics-matched one.
The decisive checks are three:
- The complex model must beat the matched real-geometry ablation at low SNR and small data, or the complex-valued half of the claim fails.
- Removing the consistency loss must hurt most when labels are scarce.
- The gross-error rate must fall as $K$ grows, with the coarsest phasor kept unwrapped.
References
- Supervised Contrastive Regression
- Geometric Order Learning for Rank Estimation
- Improving Deep Regression with Tightness
- RankSim: Ranking Similarity Regularization for Deep Imbalanced Regression
- Improving Deep Regression with Ordinal Entropy
- Contrastive Training of Complex-Valued Autoencoders for Object Discovery
- TrustworthyQENN: A Quantum Evidential Neural Network Based on Complex-Valued Contrastive Learning for Uncertainty Pattern Classification
- PHALAR: Phasors for Learned Musical Audio Representations
- A GAN-CNN Fusion Framework for Deep Learning-Based DOA Estimation in Low-SNR Environments
- Interleaved Selective State Space Models for Efficient WiFi-Based 3D Multi-Person Pose Estimation
- DCCRN: Deep Complex Convolution Recurrent Network for Phase-Aware Speech Enhancement
- Real-Valued Backpropagation is Unsuitable for Complex-Valued Neural Networks
- Enhancing RF Sensing with Deep Learning: A Layered Approach
- Vision meets mmWave Radar: 3D Object Perception Benchmark for Autonomous Driving