BGRem: Diffusion Background Noise Remover
- BGRem is a diffusion-inspired background noise remover that separates source signals from structured and stochastic noise in astronomical images.
- It employs a supervised denoising strategy using an attention U-Net architecture trained on paired simulated data for both optical and γ-ray imaging.
- Evaluation shows BGRem improves true source detections by about 7% in optical data and more than doubles correct detections in γ-ray maps compared to traditional methods.
BGRem is a supervised, diffusion-inspired background-noise removal model for astronomical images designed as a preprocessing module for source detection and catalog construction. It is not presented as a generic image-enhancement system; its stated purpose is to remove structured and stochastic background contamination before downstream source-finding, whether with traditional tools such as SExtractor or with more modern machine-learning catalog pipelines. The model is trained on paired simulated data and learns to separate source-only signal from background in both optical and -ray imaging, with the central practical claim that improved background removal improves the detectability of faint sources and makes downstream localization and characterization more reliable (Nicolaas et al., 6 Oct 2025).
1. Scope, definition, and nomenclature
Within the astronomical-imaging literature, BGRem denotes the method introduced in "BGRem: A background noise remover for astronomical images based on a diffusion model" (Nicolaas et al., 6 Oct 2025). In that work, BGRem is defined as a supervised denoiser for removing astronomical background noise prior to source detection. The underlying scientific motivation is that astronomical images contain not only source photons but also sky background, Poisson fluctuations, readout noise, dark current, and, depending on wavelength, complex diffuse foreground or background structures. Because source catalogs are built from thresholded detections on pixel data, imperfect background subtraction directly affects the balance of true positives, false positives, and false negatives.
The acronym is not unique across arXiv. In collider-instrumentation work, "BGRem" is also used in the BEAST II context for a BGO background monitor that measures beam-induced radiation dose near the SuperKEKB interaction region, which is a hardware monitoring system rather than an astronomical image-denoising model (Chen et al., 2017). A plausible implication is that references to BGRem should be interpreted contextually: in astronomical imaging it refers to a diffusion-based background remover, whereas in detector-background instrumentation it can denote a scintillator-based monitor.
The astronomical BGRem paper frames the method as a front-end denoiser rather than a replacement for specialized photometric or source-characterization models. Its output is a denoised, nonnegative image intended to improve source finding and later catalog construction. The method is therefore best understood as a learned background-removal layer within a survey pipeline rather than as an end-to-end cataloger.
2. Imaging problem and operational objective
The operational problem addressed by BGRem is background contamination in astronomical imaging. In optical data, faint stars and galaxies can be buried in varying backgrounds; in -ray imaging, diffuse interstellar emission can hide real point sources or produce spurious detections. The paper’s problem formulation is explicitly downstream-oriented: better background removal should improve the detectability of faint sources for catalog-building tasks.
This emphasis differentiates BGRem from purely perceptual denoising. The model is trained to recover source-only images from noisy observations, where the relevant failure modes are missed faint sources, spurious detections, and degraded flux or localization estimates. The evaluation therefore centers on source detection with SExtractor rather than on generic image-quality scores. The paper compares “the number of true positives (number of sources correctly found)” against “the number of false positives (the number of bogus sources found)” as the SExtractor significance threshold varies, and uses that tradeoff as the main source-detection diagnostic for both optical and -ray experiments (Nicolaas et al., 6 Oct 2025).
The work positions BGRem as useful in two observational regimes with different noise morphologies. For optical images, the relevant contaminants include relatively smooth but spatially variable backgrounds plus detector noise terms. For simulated Fermi-LAT GeV sky maps, the hard case is diffuse interstellar emission, especially near the Galactic plane . This cross-domain framing is central to the paper’s claim that BGRem can serve as a general-purpose background removal framework for multi-wavelength astronomical surveys.
3. Diffusion-inspired supervised denoising formulation
Methodologically, BGRem adopts the conceptual structure of diffusion models but adapts it to supervised denoising. The noisy image at diffusion step is defined as
where is the noisy image at diffusion step , is the clean source-only image, 0 is a time-dependent noise scale, and 1 is the background noise image. The diffusion time is sampled continuously, with 2, and mapped to a cosine schedule through
3
followed by
4
with
5
The paper notes that 6 does not directly affect the images in this formulation, but that the trigonometric parameterization keeps total variance constant and stabilizes training (Nicolaas et al., 6 Oct 2025).
The network is conditioned on the current corruption level. Specifically, the squared noise scale 7 is passed through a sinusoidal positional embedding, following standard diffusion practice, then upsampled and concatenated with image features. BGRem is trained to predict the background/noise component 8, not the clean image directly. The denoised estimate is formed as
9
The training loss is mean absolute error on the noise,
0
which makes BGRem a supervised diffusion denoiser rather than an unsupervised generative diffusion model.
At inference time, the model takes a noisy astronomical image as input after preprocessing and iteratively removes background over several diffusion steps. The paper emphasizes the asymmetry between training and inference: during training, known background is added to simulated clean images; during prediction, the model starts from the observed noisy image 1 and repeatedly removes predicted noise to produce 2. The denoising therefore proceeds stepwise from higher to lower effective noise levels. The appendix reports that more diffusion steps improve quality and reduce artifacts but increase runtime linearly; validation MAE showed that even one step works well, but 15 diffusion steps gave the best performance, with 3, 6, and 11 as local optima.
4. Network architecture, implementation, and data pipeline
The denoiser backbone is a modified attention U-Net based on Oktay et al. It combines an encoder-decoder with skip connections and attention gates. The high-level role assigned to this architecture is explicit: the encoder captures multiscale context, skip connections preserve spatial detail important for faint and compact astronomical sources, and attention gates suppress irrelevant background-like activations while focusing the decoder on source-preserving reconstruction. The implementation uses LeakyReLU activations. The model was implemented in Python using TensorFlow and Keras; training used Adam with an initial learning rate of 3, exponentially decayed by a factor of 4 each epoch, for up to 100 epochs with early stopping if validation loss failed to improve for 10 epochs (Nicolaas et al., 6 Oct 2025).
Because BGRem is supervised, paired training data are essential. For optical data, the authors used simulated full-field MeerLICHT images generated with GalSim, since the simulator provides exact source-only ground truth images that cannot be obtained from real observations. They simulated 5 full MeerLICHT images for training and 3 more for testing. Each full image has size 5 pixels and was tiled into 6 cutouts, yielding 8405 sub-images; 10% were used as test data, leaving about 7500 for training. Images whose maximum pixel value was below 500 were excluded, a threshold chosen to remove cutouts lacking bright sources and to reduce unnecessary training cost. For 7-ray retraining, they generated 12,000 random 8 sky patches from simulated Fermi-LAT data and used 600 patches for testing.
The preprocessing pipeline has two stated optical steps. First, BGRem subtracts the median pixel value, using the fact that most pixels are background-dominated, so the median gives an approximate background level and centers the noise around zero. The paper notes that this works best for relatively flat backgrounds and may need to be applied on smaller local patches if strong gradients exist. Second, the image is normalized so its pixel scale matches the training distribution. The appendix states that ideally the input noise should have standard deviation around 1. BGRem includes an automatic normalization estimate by computing the pixel-value standard deviation after ignoring the brightest 10% of pixels and any zero-valued pixels; the normalization factor is then 9. For full-size optical inference, the 0 image is split into 1 cutouts, but only the central 2 pixels of each prediction are used in reconstruction, reducing edge artifacts and seam discontinuities.
Postprocessing is also task-specific. After the final diffusion step, all negative pixel values are clipped to zero, then the image is denormalized using the same factor as in preprocessing. The clipping is motivated by the downstream cataloging use case, since source fluxes should be non-negative in catalog pipelines. The appendix notes a caveat: this can bias very faint, low-SNR sources, because BGRem can underestimate flux at low SNR by occasionally removing very faint source signal as if it were background.
5. Experimental evaluation across optical and 3-ray data
The principal baseline is SExtractor’s built-in background subtraction. SExtractor estimates local background on grids, computes a mode-like summary of each cell, interpolates across the field, and subtracts the resulting background model. The authors note that alternatives such as ProFound and NoiseChisel exist, but focus on SExtractor because it is a strong and widely used baseline (Nicolaas et al., 6 Oct 2025).
On simulated MeerLICHT optical test data, the paper reports qualitative and downstream improvements. Histograms of pixel values show that BGRem outputs more closely match the sparse, nonnegative source-only distribution, especially near low pixel values where background modeling matters most. The main downstream result is that using SExtractor on BGRem-processed images increased the number of true positive optical detections by about 4 for MeerLICHT data relative to using SExtractor’s own background subtraction. In one example cutout, BGRem preprocessing allowed SExtractor to recover eight additional real sources without introducing false positives at that selected operating point. More broadly, when varying SExtractor’s detection threshold, the true-positive versus false-positive curves favor BGRem across thresholds.
The paper also evaluates zero-shot generalization in optical imaging. Although trained only on simulated MeerLICHT data, BGRem was applied directly to real optical images from other telescopes. A CFHT/MegaCam 5-band image containing part of M31 showed that BGRem can remove much of the background even out of domain, though the paper reports small artifacts and a failure mode in which some brighter parts of the galaxy were mistaken for sources and retained. A plausible implication is that extended structured emission can challenge the learned source-background separation when such morphology is absent from training. On real Legacy Survey data from DECam/DECaLS, BGRem again improved the true-positive/false-positive tradeoff of SExtractor across thresholds compared with SExtractor background subtraction alone. The paper specifically notes that source detection became worse without clipping negative BGRem outputs to zero.
For 6-ray astronomy, BGRem is retrained rather than zero-shot transferred. The target background is diffuse interstellar emission in Fermi-LAT 7 GeV sky maps. Qualitatively, BGRem removes diffuse IEM both away from and close to the Galactic plane, producing denoised maps on which source-only and BGRem-processed images yield similar SExtractor detections. Quantitatively, mean pixel values of BGRem outputs track those of the source-only images along a diagonal, indicating good reconstruction of source counts, with better reconstruction for brighter patches with larger average source contributions. The paper states that, in these simulations and using SExtractor as downstream detector, “more than double the number of correct sources can be identified” when BGRem is used as preprocessing compared with SExtractor’s default background removal. It also notes a caveat: at very high thresholds the model can generate artifacts that lead SExtractor to some false positives.
6. Generalization, limitations, and position within survey pipelines
The paper identifies several limitations tied to BGRem’s simulation-trained nature. First, training realism matters: simulated data may not capture all observational artifacts, which can affect generalization. The optical zero-shot experiments are described as encouraging, but the M31 example demonstrates a failure mode on unusual structured backgrounds. Second, preprocessing assumes that the noise statistics of the target image can be aligned with the training distribution through median subtraction and normalization. Strong background gradients or substantially different noise distributions may therefore require local preprocessing or manual tuning. Third, the clipping of negative outputs helps source detection but may bias flux estimates for faint sources. The flux appendix reports that BGRem preserves source fluxes better than SExtractor across source types and SNRs, with lower scatter around the ideal line and no negative outputs, but low-SNR sources still show a downward bias (Nicolaas et al., 6 Oct 2025).
The compute discussion is limited. The paper does not state GPU type, wall-clock training time, or batch size, but does claim that inference computation time does not depend on image content, such as the number of stars or galaxies. Runtime scales mainly with image size and the chosen number of diffusion steps. This suggests a relatively predictable deployment cost for tiled survey processing.
The stated contributions are threefold. First, the authors describe BGRem as the first diffusion-based background remover shown to work for both optical and 8-ray astronomical images. Second, they report practical downstream gains, including about a 7% increase in true positive detections for MeerLICHT optical data and more than a twofold increase in correct detections in the simulated Fermi-LAT setting relative to SExtractor background subtraction. Third, they demonstrate two forms of transfer: zero-shot generalization across optical instruments and retraining across wavelengths.
In practical survey terms, BGRem is a simulation-trained background-removal module that centers and scales noisy input images, tiles them if necessary, iteratively predicts and subtracts background through a diffusion-style schedule with an attention U-Net conditioned on noise level, and returns a denoised nonnegative image for source finding and catalog construction. The evidence presented in the paper suggests that this strategy can outperform a standard hand-engineered background model in both ordinary optical fields and more difficult diffuse-background regimes. The principal caveat, explicitly acknowledged by the authors, is that its reliability depends on how well the training simulations represent the target data and how robustly preprocessing aligns real-image noise with the learned distribution.