arXiv(opens in a new tab)physics.opticsNov 2026

Manuscript Offprint

arXiv:2611.04780

LIPS-PC: Learning Illumination Patterns for Single-Pixel Classification

Tomer Porat, Talya Eden, Eliahu Cohen

Tomer Porat, Talya Eden, and Eliahu Cohen

Abstract—In single-pixel (ghost) imaging, the object is probed by a sequence of known illumination patterns and a detector with no spatial resolution returns one number per pattern. Each pattern is a separate physical measurement, costing acquisition time, photon budget and, for ionizing probes, delivered dose, so the number of patterns MM is the quantity to minimize. A motivating instance is automated radiographic defect screening on a production line, where throughput and delivered dose are both set by the number of exposures taken per item, and the decision needed is a class label rather than a reconstructed image. We study whether the pattern set should be learned end-to-end for a downstream classification task instead of fixed to a generic transform, subjected to a constraint that keeps the setting physically realizable: the learned operator must be one fixed linear matrix, identical for every input. We call this approach Learning Illumination Patterns for Single-Pixel Classification (LIPS-PC). We parameterize it as a residual correction to a 2D-DCT anchor, D=Dbase+ΔD = D_{\text{base}} + \Delta, and train Δ\Delta jointly with a compact classifier under a cross-entropy classification objective, with no image reconstructed at any point. This is a task-driven linear embedding, obtained by optimization rather than in closed form. We validate the approach first on two well-understood digit/garment benchmarks (MNIST, Fashion-MNIST) under a controlled protocol, then on the target application, a real industrial X-ray weld-radiograph dataset for automated defect screening (RIAWELC). Across all three, over five budgets M∈{8,16,32,64,128}M \in \{8, 16, 32, 64, 128\} (sampling ratios from under 1% to 12.5%), the learned operator beats the best fixed transform by 9 to 15 percentage points at M=8M=8 on every dataset. Equivalently, at M=8M=8 it reaches an accuracy that the best fixed transform does not attain until roughly M=16M=16 to M=32M=32, a 2×2\times to 4×4\times saving in measurements at matched accuracy. The advantage generally shrinks as MM grows, and on RIAWELC it reverses by a small margin at intermediate budgets. One of the main conclusions is that learning what to measure pays off especially when measurements are very scarce.

Index Terms—Computational ghost imaging, single-pixel imaging, compressed sensing, compressed learning, learned measurement operator, task-driven dimensionality reduction, end-to-end optimization, image classification, non-destructive testing, low-dose imaging.

I. INTRODUCTION

A CONVENTIONAL camera records millions of pixels in parallel. A single-pixel camera [1], and its ghost-imaging (GI) and computational ghost-imaging (CGI) relatives [2], [3], [4], instead use one detector with no spatial resolution, a so-called bucket detector. Spatial information is recovered by illuminating the object with a sequence of known patterns and correlating the single intensity readings with the patterns that produced them. This paradigm is attractive, for instance,

Learning what to measure: the gain is concentrated at low MM 9-15 points over the best fixed transform at M=8M=8; parity by M=64M=64

Figure

Fig. 1: Main result. Accuracy of the learned linear measurement operator minus that of the best fixed transform, versus the number of measurements MM (out of D=1024D=1024). On a real industrial X-ray dataset and two standard benchmarks the learned operator wins by 9 to 15 percentage points at M=8M=8. The advantage shrinks to zero, or presents a small reversal, as MM grows. Learning what to measure helps most when there is very little budget to spend.

when a dense sensor array is unavailable, unsafe, or expensive: imaging through scattering media, imaging at wavelengths with no readily available focal-plane array, and imaging with ionizing probes such as X-rays, where every photon delivered to the object carries a dose cost. Here, single-pixel imaging motivates a numerical sensing-design problem: which linear measurements best support classification?

Beyond this physical motivation, the setting targets a concrete industrial need, and it is the one this paper is ultimately built to serve. Radiographic defect screening on a production line is currently limited by how many exposures can be taken and processed per item; a measurement operator that reaches high classification accuracy from very few readings offers a direct path to screening more items per unit time, or at a lower delivered dose, using the same acquisition hardware and without a human in the decision loop. The RIAWELC weld-defect case studied below (Section IV) is a concrete instance of this need: automatic, fast defect identification rather than image reconstruction for its own sake. We reach that case by first developing and validating the approach under tight experimental control on MNIST and Fashion-MNIST, two digit/garment benchmarks whose class structure and image statistics are well understood, where any failure of the method is unambiguous; RIAWELC then tests whether the same,

The authors are with Bar-Ilan University, Ramat-Gan 5290002, Israel. Submitted manuscript, November 4, 2026.

unmodified approach transfers to noisier, lower-contrast real radiographs and a genuine downstream use case. The digit benchmarks are a controlled stepping stone, not a second headline result alongside it.

In CGI the optical reference arm is removed and the patterns become pre-defined, computer-generated masks applied directly to the illumination path [3], [5]. The spatial resolution of the result is then a property of the pattern set rather than of any sensor, so the pattern set becomes a design variable. Compressed sensing [6], [7] explains why a small pattern set can suffice: if the signal is sparse in some known basis and suitable recovery conditions hold, far fewer than D linear measurements can recover it.

Two observations motivate this work. First, most of the works that learn single-pixel patterns optimize them for reconstruction fidelity, using a mean-squared-error or total-variation objective and a decoder that returns a full image [8], [9], [10], [11]. Second, for many end uses, such as sorting, inspection, and triage, the image is only a means to a decision, and the decision may be reachable with far fewer measurements than a faithful image would need. This has been shown for biological cells [12] and for coarse object recognition [13], [14]. When the target is a class label, the natural training objective is classification accuracy rather than pixel fidelity, and the natural question is whether a task-optimized pattern set beats a generic fixed transform at a fixed, small measurement budget.

Seen from the learning side, the object is this: train the linear measurement operator jointly with the classifier that reads its output, end-to-end, so that the few measurements taken are the ones most useful for the decision. This is the reconstruction-free, task-driven end of compressed learning [15], [16], [17], and the learned operator is a supervised, task-driven linear embedding, a relative of supervised principal component analysis and linear discriminant analysis, but reached by gradient-based optimization under a hardware constraint rather than in closed form.

We refer to this approach as Learning Illumination Patterns for Single-Pixel Classification (LIPS-PC). We study this under one constraint that keeps the setting physically realizable: the learned operator must be a single fixed linear matrix D∈RM×D\mathbf{D} \in \mathbb{R}^{M \times D}, identical for every object, applied as y=Dx\mathbf{y} = \mathbf{D}x before any nonlinear processing. A real bucket detector cannot choose its illumination from the content of an object it has not yet sensed, so per-image nonlinear “encoders” are excluded: such models reach high accuracy but correspond to no realizable mask set. Within this constraint we make three contributions.

  1. A residual parameterization of the learned pattern set, D=Dbase+Δ\mathbf{D} = \mathbf{D}_{\text{base}} + \Delta, anchored to a 2D discrete-cosine basis and trained jointly with the classifier under a cross-entropy classification objective (Section III). The result is a task-aware linear embedding, close in spirit to supervised principal component analysis, but obtained by end-to-end optimization rather than in closed form.

  2. An evaluation aimed at a real industrial X-ray nondestructive testing (NDT) target, the weld-radiograph dataset RIAWELC [18], reached via a controlled preliminary step on MNIST [19] and Fashion-MNIST [20], over five budgets spanning sub-one-percent sampling

Figure

Fig. 2: Ghost-imaging architectures. Panel (a) shows a bucket detector in the object arm and a spatially resolved detector in the reference arm. Panel (b) shows computational ghost imaging, where known illumination patterns replace the measured reference arm. The present numerical study uses the ideal linear measurement model y=Dx\mathbf{y} = \mathbf{D}\mathbf{x}.

ratios (Section IV). To our knowledge this is the first time task-learned single-pixel patterns are reported on a real industrial radiographic dataset at this compression.

  1. A consistent empirical finding (Fig. 1): the learned advantage is largest at the smallest budget, between 9 and 15 percentage points at M = 8 on every dataset, and it generally decreases as M grows larger towards D, with a small reversal on RIAWELC for M≥32M \geq 32 (Section V). We report this as an observed pattern across three datasets, consistent with compressed-sensing intuition, not as a theorem.

References (27)