Astronomers estimate how strong the magnetic field is inside a star-forming cloud by combining three maps: how much gas lies along each line of sight (the column density), how scattered the field directions look in polarized dust light, and how fast the gas is churning (the spread of velocities in a molecular spectral line). Turning these into a field strength requires the gas's volume density, and volume density is column density divided by an unknown quantity: the depth of the cloud along the line of sight. Classical formulas fill that gap with a guessed geometry, such as a sphere or a cylinder. Newer machine-learning estimators trained on magnetohydrodynamic (MHD) simulations, which are computer models of magnetized turbulent gas, appear to remove the guess. We argue they do not. They inherit the depth distribution of the simulation boxes they were trained on. Because the field strength scales as the square root of density, a cloud that is $k$ times deeper than the training boxes at the same column density will have its field mis-estimated by about $\sqrt{k}$, and nothing in the network's output will flag the error.
This note proposes to make line-of-sight depth an explicit, inferred quantity rather than a silent prior. The idea is borrowed from rare-event detector physics. There, an unmeasured coordinate is recovered from how a signal is smeared: in a gas time-projection chamber, the broadening of a pulse reveals how far the charge drifted. We ask whether the analogous smearing in a spectral-line cube can do the same job for clouds. Turbulent velocity dispersion grows with path length, so the velocity structure of the line should carry information about depth. If it does, we can produce field-strength posteriors whose width honestly reflects depth uncertainty and simulator choice. We also borrow the detector field's evaluation habits: efficiency-versus-leakage curves and stress tests on the tails of the distribution. These apply naturally to separating a dense core from the diffuse foreground and background gas that shares its line of sight.
Core Claim
The claim is that current simulation-trained estimators of field strength, of which the diffusion-model estimator of Exploring Magnetic Fields in Molecular Clouds through Denoising Diffusion Probabilistic Models is the strongest, are accurate partly because the test clouds share the training clouds' depth-to-width statistics. That paper trains a diffusion model, a generator that learns by gradually denoising random noise into samples, on Enzo clouds and conditions it on column density, polarization angle and velocity dispersion. It reports that the three-input version beats every DCF variant and transfers to ORION2 clouds. That transfer test changes virial parameter, mass-to-flux ratio and feedback, but not line-of-sight geometry.
We make two predictions. The first is that systematically varying depth at fixed column density will expose a bias in that estimator scaling close to $\sqrt{k}$. The form follows directly from the DCF relation $B \approx f\sqrt{4\pi\rho}\,\sigma_v/\sigma_\theta$ with $\rho \propto N/L$, where $N$ is column density and $L$ is depth. The second is that a model which jointly infers depth $L$ from the position-position-velocity (PPV) cube, together with the field strength $B$, removes most of this bias. Here PPV means a data cube with two sky coordinates and one velocity coordinate.
The inferred quantity is the posterior
$$p(B, L \mid N, \theta, \mathcal{V}),$$
where $\theta$ is the polarization-angle map and $\mathcal{V}$ is the full line cube rather than a single dispersion value. We report $B$ after marginalizing over $L$, and over simulator identity when several training codes are pooled. What is new is not a better network. It is identifying depth as the dominant hidden assumption in these estimators, testing whether depth can be identified from line data at all, and evaluating the results with calibration and leakage metrics.
Research Program
The work has three parts.
The first part builds a depth-stressed synthetic benchmark. We start from the simulation families already used in this literature: Enzo clouds with initial fields of 10, 30 and 50 μG, the ORION2 suites behind Application of Convolutional Neural Networks to Predict Magnetic Fields Directions in Turbulent Clouds, and the Athena++ collision-induced reconnection runs of CMR Exploration. I. Filament Structure with Synthetic Observations. Those reconnection runs show a transient $B \propto \rho$ relation and serve as a deliberately different physical regime. From these we produce synthetic observations with RADMC-3D: dust column density, polarization angle, and $^{13}$CO and C$^{18}$O cubes. We vary depth in two controlled ways.
- Changing the path length through one cloud. We tile periodic boxes or truncate them, which changes $L$ while the true field is known.
- Adding a diffuse foreground or background envelope. We embed a dense cloud in a lower-density sheath of controllable column fraction, drawn from a separate simulation.
The second method is the signal-to-background problem in astrophysical form. The dust polarization integrates over the envelope, whereas the dense-gas tracer mostly does not, so the inputs disagree in a way a careful method should detect. The POLIMAP authors flag exactly this kind of line-of-sight averaging in Polarized Light from Massive Protoclusters (POLIMAP). I. Dissecting the role of magnetic fields in the massive infrared dark cloud G28.37+0.07.
The second part builds the depth-explicit estimator. We keep the U-Net diffusion backbone of the diffusion-model paper so that architecture is held fixed. We make two changes. The velocity input becomes the full cube processed by a 3D encoder of the CASI-3D type (a 3D U-Net with residual blocks), instead of a single dispersion map. The model also outputs a depth map alongside the field-strength map. It is trained with depth randomized across a range wider than any single simulation's box.
The key ingredient is a velocity-structure input that can, in principle, encode path length. CASI-3D already showed that PPV morphology carries field-orientation information well enough to beat velocity-gradient methods. We test whether the same cube carries depth information. A second branch performs core-versus-envelope discrimination: it estimates, per sky pixel, the fraction of dust column associated with the dense velocity component. This is the analogue of the multi-site versus single-site topology cuts in Topological background discrimination in the PandaX-III neutrinoless double beta decay experiment.
The third part quantifies model dependence. We train on one simulator, test on the others, and also train on the pooled set with simulator identity as a nuisance variable. This follows the logic of Joint Power Spectrum and Voxel Intensity Distribution Forecast on the CO Luminosity Function with COMAP, which combines complementary observables to break degeneracies (here, column versus velocity structure). It also follows Enhancing the significance of astrophysical events with multimessenger coincidences, which turns dependence on the assumed emission model into a reported and testable quantity rather than hiding it. The output is a statement about each target cloud: how much its inferred field shifts between simulator-trained models, and whether that shift exceeds the depth-marginalized uncertainty.
Baselines
The naive reference point is classical DCF with a geometry assumption: depth set equal to the projected filament or core width. On synthetic clouds, the diffusion-model paper reports that it overestimates field strength by about an order of magnitude, with relative error dispersion $\delta B \approx 18$. We run it on exactly the same synthetic maps, with the same beam and noise. Beating it is expected and is not by itself a result.
The analytic competitor is the refined or modified DCF used in POLIMAP. On the same simulations it is reported to overestimate by 48% on average, with $\delta B \approx 2.5$ (Exploring Magnetic Fields in Molecular Clouds through Denoising Diffusion Probabilistic Models). We apply it with the same geometric depth assumption and the same angle-dispersion estimator.
The strongest existing method is the three-input diffusion model from that paper. The paper states that it achieves the lowest $\delta B$ across its scenarios, but we found no reported numerical $\delta B$ for this model on Lacuna. We therefore retrain it ourselves on the identical training set, with identical compute, identical sampling steps, and an identical hyperparameter search budget. We check our reproduction against the paper's qualitative ordering of methods.
The proposal counts as beating this baseline only if three things hold together:
- Lower error under depth stress. On the depth-stressed test set it lowers median absolute log-error in $B$, and the improvement grows with the depth mismatch factor $k$.
- No loss on matched depths. It does not lose accuracy on clouds whose depth matches training.
- Calibrated uncertainty. Its 68% credible intervals contain the truth in roughly 68% of held-out pixels, including across simulators.
Two ablations isolate the key ingredient. The first gives the baseline diffusion model the same depth-randomized training data but no cube input and no depth output. This tests whether augmentation alone does the work. The second gives our model the full cube but scrambles the velocity axis within each pixel. This removes depth-relevant velocity structure while keeping the line-integrated intensity.
Why not just…?
Why not just use refined DCF with a better geometric depth assumption? Refined DCF already cuts the error dispersion from about 18 to about 2.5 and requires no training. Its remaining 48% bias, however, was measured on simulation boxes whose geometry is benign. POLIMAP itself treats its estimates as limited by unresolved line-of-sight structure. Our depth-stress test reports refined DCF's bias as a function of $k$. If its error stays within the diffusion model's error at every $k$, the learned approach is not worth its cost, and we will say so.
Why not just train the existing diffusion model with randomized depths? This is the most serious alternative, and it may be enough. If depth is not identifiable from the inputs, augmentation simply widens the predictions, which is honest. The proposal adds value only if the velocity cube carries depth information that the single dispersion map lacks. The first ablation tests exactly this. If augmentation alone matches our model's accuracy and calibration, the conclusion becomes "always randomize depth", and the cube-encoding branch is dropped.
Why not just get volume density from multi-line excitation (line ratios of tracers with different critical densities)? This measures density without any depth assumption, so it is a real competitor wherever several tracers are observed. It is not available in the existing synthetic pipelines, and on real targets it carries its own model dependence through abundances and the non-thermal excitation model. We will synthesize a second tracer where the radiative transfer allows and add the line ratio as an input channel. If it alone recovers density as well as the velocity-structure route, that is the cheaper answer.
Proposed Experiments
Decisive synthetic check. We plot error in $B$ against the depth mismatch $k$, from 0.25 to 4, for all four methods on held-out ORION2 and Athena++ clouds after training on Enzo. The hypothesis is confirmed if the baseline diffusion model's log-bias tracks $\tfrac{1}{2}\log k$ and ours stays flat. It is refuted if the baseline is already flat, which would mean the existing model implicitly infers depth.
Depth identifiability. We report how well depth itself is recovered, as the fraction of pixels with depth within a factor of 1.5. We report this separately for sub-Alfvénic and trans-Alfvénic clouds, where CASI-3D's orientation errors were below 10° and below 30° respectively. We expect depth information to degrade the same way.
Envelope discrimination. Using the embedded-sheath sets, we draw curves of dense-core field recovery against envelope column fraction. In the style of the rare-event papers, we report the envelope fraction at which bias exceeds 20% while still retaining 80% of core pixels.
Real data. No ground truth exists, so the checks are consistency tests. On G28.37+0.07 we apply all methods to the SOFIA-HAWC+ and GBT-Argus C$^{18}$O data. We test whether depth-marginalized estimates still yield the reported $B$–$n$ index of $0.51 \pm 0.02$, or whether that index shifts once depth varies across the cloud. On Serpens Main from BISTRO, we test whether the DCF strengths of 60–300 μG (B-fields in Star-forming Region Observations (BISTRO): Magnetic Fields in the Filamentary Structures of Serpens Main) remain stable once inferred depths replace assumed filament widths. In Taurus, the FCRAO cubes compared against Planck give an orientation sanity check that CASI-3D already passed with a 13° offset.
A useful negative outcome would be that the posterior widths on real clouds are dominated by the spread between simulators rather than by depth. That would redirect the field toward broader training-simulation coverage instead of better estimators.
References
- Exploring Magnetic Fields in Molecular Clouds through Denoising Diffusion Probabilistic Models
- Application of Convolutional Neural Networks to Predict Magnetic Fields’ Directions in Turbulent Clouds
- CMR Exploration. I. Filament Structure with Synthetic Observations
- Polarized Light from Massive Protoclusters (POLIMAP). I. Dissecting the Role of Magnetic Fields in the Massive Infrared Dark Cloud G28.37+0.07
- Topological background discrimination in the PandaX-III neutrinoless double beta decay experiment
- Joint Power Spectrum and Voxel Intensity Distribution Forecast on the CO Luminosity Function with COMAP
- Enhancing the significance of astrophysical events with multimessenger coincidences
- B-fields in Star-forming Region Observations (BISTRO): Magnetic Fields in the Filamentary Structures of Serpens Main