Papers
Topics
Authors
Recent
Search
2000 character limit reached

PowerBin: Adaptive Binning for Astronomy

Updated 10 July 2026
  • PowerBin is an adaptive binning algorithm that uses power diagrams to aggregate spaxels until each bin meets a target capacity (e.g., S/N).
  • It replaces traditional Voronoi methods with a near-linear-time, convex binning approach based on optimal-transport principles.
  • The method’s three-stage process—including fast bin accretion, power-diagram regularization, and geometric lifting—provides robust pre-fit conditioning for integral-field spectroscopy.

PowerBin is an adaptive data-binning algorithm for astronomy that replaces the standard Voronoi-binning regularization with a fast, convex, power-diagram-based method, and also replaces the original slow bin-accretion stage with a new near-linear-time implementation. It is designed for integral-field spectroscopy and other large spatially resolved survey data, where individual spatial pixels or spaxels may have too little signal-to-noise ratio to support reliable model fitting. Its motivation is explicitly statistical rather than cosmetic: the target is to aggregate neighboring spaxels until each bin reaches a problem-dependent target capacity, usually S/N, before downstream fitting is attempted (Cappellari, 8 Sep 2025).

1. Statistical purpose and problem definition

Adaptive binning in the sense addressed by PowerBin is the problem of partitioning all pixels into non-overlapping bins that tessellate the field, keep bins compact to preserve spatial resolution, and make a scalar target quantity approximately uniform around a chosen target. In the intended astronomical setting, that scalar is often S/N, but the formulation allows a generic user-defined capacity. The paper stresses that this step is required because fitting non-linear models to low-S/N spectra can produce posteriors that are multimodal, strongly non-Gaussian, and biased away from the true parameters; averaging many such fitted parameters does not, in general, recover the correct answer (Cappellari, 8 Sep 2025).

Earlier adaptive-binning pipelines, especially the Cappellari & Copin method and its weighted variants, used a two-stage workflow: greedy bin accretion followed by iterative regularization through a Centroidal Voronoi Tessellation or weighted Voronoi tessellation. PowerBin is motivated by two practical limitations of that family. The first is speed: modern integral-field spectroscopy mosaics can contain millions of spaxels, and both the old accretion stage and multiplicatively weighted Voronoi regularization become computational bottlenecks, effectively scaling as O(N2)\mathcal{O}(N^2) in realistic usage. The second is geometry: multiplicatively weighted Voronoi regularization improves S/N uniformity, but it can produce non-convex or even disconnected bins. PowerBin is intended to remove both bottlenecks by enforcing target capacities robustly while returning convex bins by construction (Cappellari, 8 Sep 2025).

In practical terms, PowerBin grows an initial set of bins and then regularizes them into a centroidal power diagram whose cells are convex and whose measured capacities are close to the target. A plausible implication is that it should be understood less as a smoothing procedure than as a pre-fit statistical conditioning step for large spectroscopic surveys.

2. Optimal-transport formulation and power-diagram geometry

The theoretical core of PowerBin is a reformulation of adaptive binning as a capacity-constrained semi-discrete optimal-transport problem under squared Euclidean cost. The data are modeled as a continuous density ρ(x)\rho(\mathbf{x}), approximated in practice by discrete pixels, and one seeks a partition into bins {Vj}\{\mathcal{V}_j\} associated with generators {gj}\{\mathbf{g}_j\} that minimizes

E({gj},{Vj})=j=1nVjxgj2ρ(x)dx,\mathcal{E}(\{\mathbf{g}_j\}, \{\mathcal{V}_j\}) = \sum_{j=1}^n \int_{\mathcal{V}_j} {\mathbf{x}-\mathbf{g}_j}^2\,\rho(\mathbf{x})\,d\mathbf{x},

subject to

mj=Vjρ(x)dx=νj,j.m_j = \int_{\mathcal{V}_j} \rho(\mathbf{x})\,d\mathbf{x} = \nu_j,\quad \forall j.

Introducing power weights wjw_j as Lagrange multipliers yields the functional

F({gj},{wj})=E({gj},{Vj})j=1nwj(mjνj),\mathcal{F}(\{\mathbf{g}_j\}, \{w_j\}) = \mathcal{E}(\{\mathbf{g}_j\}, \{\mathcal{V}_j\}) - \sum_{j=1}^n w_j (m_j - \nu_j),

with derivatives

wjF=νjmj,gjF=2mj(gjbj).\nabla_{w_j} \mathcal{F} = \nu_j - m_j,\qquad \nabla_{\mathbf{g}_j} \mathcal{F} = 2 m_j (\mathbf{g}_j - \mathbf{b}_j).

A stationary point therefore satisfies both mj=νjm_j=\nu_j and ρ(x)\rho(\mathbf{x})0; that stationary configuration is the Centroidal Power Diagram, or CPD (Cappellari, 8 Sep 2025).

The corresponding tessellation class is the power diagram. For each generator ρ(x)\rho(\mathbf{x})1 with weight ρ(x)\rho(\mathbf{x})2, the power distance is

ρ(x)\rho(\mathbf{x})3

and the power cell is

ρ(x)\rho(\mathbf{x})4

The boundary condition

ρ(x)\rho(\mathbf{x})5

simplifies to a linear equation, so boundaries are hyperplanes and power-diagram cells are always convex polytopes. This convexity guarantee is the main geometric distinction from multiplicatively weighted Voronoi methods, whose boundaries are generally curved and may produce non-convex or disconnected regions. The paper also emphasizes the interpretation ρ(x)\rho(\mathbf{x})6, which permits a circle- or sphere-based view of the geometry (Cappellari, 8 Sep 2025).

PowerBin does not solve the exact CPD optimization. The paper gives two reasons. First, the formal theory is continuous whereas the data are pixelized. Second, and more importantly, the capacity to be equalized is often non-additive, especially for S/N under correlated noise. In that regime the convex dual structure disappears, the analytic gradients are no longer valid, and tested formal implementations based on Aurenhammer and De Goes were reported to “fail catastrophically” on the non-additive capacities typical of real data.

3. Algorithmic construction of PowerBin

The PowerBin pipeline has three principal stages: initialization by fast bin accretion, iterative regularization by repeated power-diagram assignment plus generator and weight updates, and final pixel-to-bin assignment through the converged power diagram. Coordinates may first be normalized by the pixel size. Initial generator locations are then obtained from a new BinAccretion algorithm, radii are initialized as ρ(x)\rho(\mathbf{x})7, equivalently ρ(x)\rho(\mathbf{x})8, and the regularization loop proceeds until generator motion becomes small or cycling is detected (Cappellari, 8 Sep 2025).

The regularization stage is built around the paper’s “packed soap bubbles” heuristic. Because ρ(x)\rho(\mathbf{x})9 and centroidal cells are compact and nearly round, the cell area is approximated by

{Vj}\{\mathcal{V}_j\}0

Assuming to first order that capacity is locally proportional to area, the update rule becomes

{Vj}\{\mathcal{V}_j\}1

Equivalently, in terms of power weights,

{Vj}\{\mathcal{V}_j\}2

If a bin’s measured capacity is too small, its radius grows; if too large, its radius shrinks. Because this occurs inside a power-diagram framework, convexity is retained (Cappellari, 8 Sep 2025).

The inner workhorse, UpdateBins, performs a current power-diagram assignment, extracts the pixel set {Vj}\{\mathcal{V}_j\}3 for each bin, estimates area as {Vj}\{\mathcal{V}_j\}4, updates the generator to the geometric mean of the assigned pixel coordinates, and evaluates capacity as {Vj}\{\mathcal{V}_j\}5. A major practical departure from exact CPD theory is that PowerBin uses geometric centroids rather than density-weighted barycentres. The paper justifies this as a robustness measure, especially for negative-valued data such as background-subtracted observations, where barycentres may become undefined or undesirable.

Power-diagram assignment is implemented by geometric lifting. If each bin has radius {Vj}\{\mathcal{V}_j\}6, define

{Vj}\{\mathcal{V}_j\}7

where {Vj}\{\mathcal{V}_j\}8. Each 2D generator is lifted to {Vj}\{\mathcal{V}_j\}9, each pixel to {gj}\{\mathbf{g}_j\}0, and assignment becomes nearest-neighbor search among lifted generators. This is computed with a KD-tree, giving the regularization stage its {gj}\{\mathbf{g}_j\}1 behavior (Cappellari, 8 Sep 2025).

The paper also describes practical stabilization. If oscillation is detected, under-relaxation is applied:

{gj}\{\mathbf{g}_j\}2

{gj}\{\mathbf{g}_j\}3

with {gj}\{\mathbf{g}_j\}4. To prevent empty cells, radii are clamped using nearest-neighbor generator spacing:

{gj}\{\mathbf{g}_j\}5

No formal convergence proof is provided; termination is governed by these practical stopping heuristics.

4. Capacity functions, correlated noise, and fast accretion

A major feature of PowerBin is that the capacity function is treated abstractly as {gj}\{\mathbf{g}_j\}6, with no requirement that it be additive. For ordinary uncorrelated-noise S/N, the paper uses

{gj}\{\mathbf{g}_j\}7

and under Poisson noise, {gj}\{\mathbf{g}_j\}8, so {gj}\{\mathbf{g}_j\}9 becomes additive. For correlated noise, however, the paper adopts the empirical correction

E({gj},{Vj})=j=1nVjxgj2ρ(x)dx,\mathcal{E}(\{\mathbf{g}_j\}, \{\mathcal{V}_j\}) = \sum_{j=1}^n \int_{\mathcal{V}_j} {\mathbf{x}-\mathbf{g}_j}^2\,\rho(\mathbf{x})\,d\mathbf{x},0

where E({gj},{Vj})=j=1nVjxgj2ρ(x)dx,\mathcal{E}(\{\mathbf{g}_j\}, \{\mathcal{V}_j\}) = \sum_{j=1}^n \int_{\mathcal{V}_j} {\mathbf{x}-\mathbf{g}_j}^2\,\rho(\mathbf{x})\,d\mathbf{x},1 is the number of spaxels in the bin. This makes the effective capacity non-linear and non-additive. PowerBin remains usable because it never needs analytic gradients of the capacity function; it only evaluates E({gj},{Vj})=j=1nVjxgj2ρ(x)dx,\mathcal{E}(\{\mathbf{g}_j\}, \{\mathcal{V}_j\}) = \sum_{j=1}^n \int_{\mathcal{V}_j} {\mathbf{x}-\mathbf{g}_j}^2\,\rho(\mathbf{x})\,d\mathbf{x},2 for the current bins (Cappellari, 8 Sep 2025).

This generality is presented as extending beyond correlated-noise S/N to negative-valued data and arbitrary user-defined capacity functions, including black-box scalar measures. A plausible implication is that PowerBin functions as a geometry-and-capacity equalization framework rather than as a solver tied to a specific observational statistic.

The new bin-accretion stage is the second major algorithmic contribution. It begins by computing per-pixel initial capacity E({gj},{Vj})=j=1nVjxgj2ρ(x)dx,\mathcal{E}(\{\mathbf{g}_j\}, \{\mathcal{V}_j\}) = \sum_{j=1}^n \int_{\mathcal{V}_j} {\mathbf{x}-\mathbf{g}_j}^2\,\rho(\mathbf{x})\,d\mathbf{x},3, marking all pixels unbinned, precomputing a Delaunay triangulation over all pixel coordinates, and building a max-heap keyed by E({gj},{Vj})=j=1nVjxgj2ρ(x)dx,\mathcal{E}(\{\mathbf{g}_j\}, \{\mathcal{V}_j\}) = \sum_{j=1}^n \int_{\mathcal{V}_j} {\mathbf{x}-\mathbf{g}_j}^2\,\rho(\mathbf{x})\,d\mathbf{x},4. While unbinned pixels remain, the algorithm pops the brightest unbinned pixel as a seed, starts a new bin, maintains its current capacity, centroid, and a roundness metric, and grows the bin through a frontier of unbinned Delaunay neighbors. The next pixel added is the frontier element closest to the current centroid. Centroid and mean squared radius are updated incrementally using Welford’s algorithm. A candidate pixel is rejected if it violates a roundness threshold or makes the capacity diverge from the target according to

E({gj},{Vj})=j=1nVjxgj2ρ(x)dx,\mathcal{E}(\{\mathbf{g}_j\}, \{\mathcal{V}_j\}) = \sum_{j=1}^n \int_{\mathcal{V}_j} {\mathbf{x}-\mathbf{g}_j}^2\,\rho(\mathbf{x})\,d\mathbf{x},5

After all bins are grown, bins that failed to reach a fraction of the target are dissolved and their pixels are reassigned to the nearest successful bin. Final generators are the centroids of these bins (Cappellari, 8 Sep 2025).

The paper’s section title refers to “A linear-time bin-accretion algorithm,” but the retained asymptotic description is E({gj},{Vj})=j=1nVjxgj2ρ(x)dx,\mathcal{E}(\{\mathbf{g}_j\}, \{\mathcal{V}_j\}) = \sum_{j=1}^n \int_{\mathcal{V}_j} {\mathbf{x}-\mathbf{g}_j}^2\,\rho(\mathbf{x})\,d\mathbf{x},6, dominated by Delaunay triangulation, heap operations, and local nearest-neighbor choices. The practical gains are attributed to static Delaunay adjacency, frontier-based local growth, incremental updates, and heap-managed seeding.

5. Complexity, benchmarks, and empirical behavior

Computationally, PowerBin replaces both the old accretion stage and weighted Voronoi regularization with E({gj},{Vj})=j=1nVjxgj2ρ(x)dx,\mathcal{E}(\{\mathbf{g}_j\}, \{\mathcal{V}_j\}) = \sum_{j=1}^n \int_{\mathcal{V}_j} {\mathbf{x}-\mathbf{g}_j}^2\,\rho(\mathbf{x})\,d\mathbf{x},7 methods. Ordinary Voronoi and power diagrams can both be computed in E({gj},{Vj})=j=1nVjxgj2ρ(x)dx,\mathcal{E}(\{\mathbf{g}_j\}, \{\mathcal{V}_j\}) = \sum_{j=1}^n \int_{\mathcal{V}_j} {\mathbf{x}-\mathbf{g}_j}^2\,\rho(\mathbf{x})\,d\mathbf{x},8 in 2D, whereas multiplicatively weighted Voronoi diagrams require E({gj},{Vj})=j=1nVjxgj2ρ(x)dx,\mathcal{E}(\{\mathbf{g}_j\}, \{\mathcal{V}_j\}) = \sum_{j=1}^n \int_{\mathcal{V}_j} {\mathbf{x}-\mathbf{g}_j}^2\,\rho(\mathbf{x})\,d\mathbf{x},9. The paper benchmarks the new accretion and regularization stages separately and reports the expected mj=Vjρ(x)dx=νj,j.m_j = \int_{\mathcal{V}_j} \rho(\mathbf{x})\,d\mathbf{x} = \nu_j,\quad \forall j.0 trend, while the classic method approaches mj=Vjρ(x)dx=νj,j.m_j = \int_{\mathcal{V}_j} \rho(\mathbf{x})\,d\mathbf{x} = \nu_j,\quad \forall j.1 (Cappellari, 8 Sep 2025).

The headline practical result is that, at one million pixels, PowerBin is about two orders of magnitude faster: a task that would take roughly 6 hours with the previous standard takes about 3 minutes. On a non-astronomical mj=Vjρ(x)dx=νj,j.m_j = \int_{\mathcal{V}_j} \rho(\mathbf{x})\,d\mathbf{x} = \nu_j,\quad \forall j.2 image partitioned into mj=Vjρ(x)dx=νj,j.m_j = \int_{\mathcal{V}_j} \rho(\mathbf{x})\,d\mathbf{x} = \nu_j,\quad \forall j.3 equal-flux bins, the full run took 20 seconds on a standard laptop, split into 12 seconds for accretion and 8 seconds for CPD regularization.

Empirical tests include simulated single galaxies, a mock galaxy group in a background-limited field, a real SAURON integral-field spectroscopy dataset, and a large image tessellation task. On mock Sérsic mj=Vjρ(x)dx=νj,j.m_j = \int_{\mathcal{V}_j} \rho(\mathbf{x})\,d\mathbf{x} = \nu_j,\quad \forall j.4 and mj=Vjρ(x)dx=νj,j.m_j = \int_{\mathcal{V}_j} \rho(\mathbf{x})\,d\mathbf{x} = \nu_j,\quad \forall j.5 galaxies with Poisson noise, PowerBin produces compact convex bins that grow larger toward lower-S/N outskirts and cluster tightly around the target S/N. The same remains true under a correlated-noise penalty, which is presented as a demonstration of robustness under non-additive capacity measures. On the mock galaxy group, where much of the image is nearly empty sky and effective capacity can even be negative after sky subtraction, PowerBin still grows sensible bins around multiple disconnected sources while sweeping noise-dominated areas into large background bins.

On the real SAURON NGC 2273 dataset, the paper reports a visually similar but cleaner convex tessellation than classic VorBin/WVT and a slight improvement in S/N uniformity: the public VorBin example with WVT has a fractional rms S/N scatter of 7.3%, while PowerBin achieves 6.5% on the same input. Across examples, convexity and connectedness are emphasized as reliable geometric properties of the final bins because they are power-diagram cells (Cappellari, 8 Sep 2025).

The reported caveats are limited but substantive. The paper does not provide a formal convergence proof, does not report detailed memory benchmarks, and does not discuss systematic failure cases in depth. It also notes that some outer pure-noise bins in background-limited tests can fall slightly below the S/N target.

6. Software, usage, and scope

A public Python implementation is available as the PowerBin package at https://pypi.org/project/powerbin/. The required inputs are the spaxel coordinates mj=Vjρ(x)dx=νj,j.m_j = \int_{\mathcal{V}_j} \rho(\mathbf{x})\,d\mathbf{x} = \nu_j,\quad \forall j.6, a capacity function mj=Vjρ(x)dx=νj,j.m_j = \int_{\mathcal{V}_j} \rho(\mathbf{x})\,d\mathbf{x} = \nu_j,\quad \forall j.7, and a target value mj=Vjρ(x)dx=νj,j.m_j = \int_{\mathcal{V}_j} \rho(\mathbf{x})\,d\mathbf{x} = \nu_j,\quad \forall j.8; optionally the algorithm may estimate or accept a pixel size to normalize coordinates. The outputs are a bin map mj=Vjρ(x)dx=νj,j.m_j = \int_{\mathcal{V}_j} \rho(\mathbf{x})\,d\mathbf{x} = \nu_j,\quad \forall j.9, generator positions wjw_j0, and radii wjw_j1, with wjw_j2 corresponding to power weights. User choices include the target capacity or target S/N, the capacity function itself, stopping tolerances or iteration limits, and the roundness threshold during accretion (Cappellari, 8 Sep 2025).

In astronomical workflows, PowerBin is intended as a preprocessing step prior to downstream model fitting, replacing VorBin in standard integral-field spectroscopy analysis pipelines. The paper recommends geometric-centroid updates for robustness and highlights that the capacity function can be fully user-defined, including non-additive measures derived from spectral fitting or multi-band combinations.

PowerBin should therefore be understood as a practical approximation to the capacity-constrained semi-discrete optimal-transport problem rather than as an exact CPD solver. Its main significance lies in the combination of three properties that earlier adaptive-binning approaches did not jointly provide: a theoretically motivated target geometry from optimal transport, guaranteed convex bins through power diagrams, and end-to-end wjw_j3 scalability on realistic survey-scale data. In this sense, the name refers to an astronomical adaptive-binning framework built around power diagrams, not to the distinct balls-into-bins, load-balancing, or bin-packing usages that occur elsewhere in the literature.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to PowerBin.