Source-linked AI summary

LUMIN: Lightweight Universal Manufacturing Inspection Network for Anomaly Detection

Pengfei Yang

arXiv:2609.04775v1cs.CV

TL;DR

Industrial anomaly detection is constrained by slow memory-bank construction and inefficient inference under production latency and resource requirements. The paper introduces PSP, inference optimizations, and the lightweight LUMIN architecture to address these bottlenecks. Across five benchmarks, PSP preserves sampling accuracy at near-random construction cost, while stratified sampling reduces evaluation time 20× with stable metrics.

  • Problem

    Industrial anomaly detection must meet strict real-time and resource constraints, but memory-bank construction remains slow and inference pipelines contain substantial redundancy.

    Source: §I · p. 1
  • Method

    The paper combines PSP’s metadata-driven four-stage sampling pipeline with parallel similarity computation, stratified pixel sampling, and progressive segmentation-head lightweighting in LUMIN.

    Source: §I · p. 1
  • Results

    PSP achieves P-AUPR 57.92, matching KM MF and GSS MF, while sampling in 14.98 s at k=20 and N=3,629 with zero backbone forward passes.

    Source: B. Main Results · p. 7
  • Takeaways & Limitations

    The results support PSP as an efficient memory-bank sampling approach and LUMIN as a lightweight architecture for resource-constrained industrial anomaly detection.

    Source: B. Main Results · pp. 6–7, §VII · p. 9

Abstract

from arXiv · show

Industrial anomaly detection faces two engineering bottlenecks: memory bank construction latency and inference efficiency. Traditional sampling algorithms (Farthest Point Sampling, K-Means, etc.) rely on numerous backbone forward passes and iterative distance computations, with construction times ranging from minutes to hours; heavy computation components such as multi-scale feature extraction struggle to meet the millisecond-level real-time requirements of production lines. This paper focuses on sampling efficiency and inference optimization for industrial deployment with two core contributions: (1) PSP (Plugin Sampler Pipeline)---a four-stage adaptive memory bank sampling pipeline based on 18-dimensional pixel metadata and five complementary visual plugins. PSP completes all sampling with zero backbone forward passes; coarse filtering is sub-second numerical sorting, and metadata extraction is a one-time offline cost. PSP supports progressive deployment and incremental updates. (2) Two engineering optimization strategies---parallel memory bank similarity computation (reducing inference memory and latency by over 95\%) and stratified pixel sampling for large-scale evaluation (reducing computation time by 20$\times$ while keeping metrics stable). As a vehicle for validation, we introduce LUMIN (Lightweight Universal Manufacturing Inspection Network) with extreme segmentation-head compression, systematically exploring the accuracy-efficiency frontier against strong baselines. Experiments on five benchmarks demonstrate that PSP matches state-of-the-art sampling accuracy at near-random construction cost (341$\times$ faster than FPS), while inference optimizations reduce evaluation time by 20$\times$ with negligible accuracy loss.

I. INTRODUCTION

Industrial anomaly detection must localize defects under strict real-time and resource constraints, but existing systems remain bottlenecked by slow memory-bank construction and redundant inference. LUMIN addresses these constraints through PSP sampling, inference optimizations, and progressive lightweight architecture design.

  • Industrial deployment targets less than 100 ms per image and low resource use, while scarce defect samples increase overfitting risk.Source: §I · p. 1
  • Existing memory-bank samplers require repeated backbone passes and iterative distance computations, taking minutes to hours and hindering rapid product switching.Source: §I · p. 1
  • Inference pipelines using multi-scale features, cross-attention, or serial similarity computation suffer low GPU utilization, high memory consumption, and poor batch scalability.Source: §I · p. 1
  • PSP combines 18-dimensional pixel metadata with five visual plugins in a four-stage pipeline that samples without backbone forward passes.Metadata extraction is performed once offline, while coarse filtering uses sub-second numerical sorting and plugins activate on demand.Source: §I · p. 1
  • Parallel similarity computation and stratified pixel sampling reduce inference memory and accelerate large-scale evaluation while preserving stable metrics.Stratified sampling reduces evaluation time from 20.1 s to 1.0 s, a 20× speedup.Source: §I · p. 1
  • LUMIN progressively lightweightens UniADet architectures, exploring accuracy-efficiency trade-offs through segmentation-head compression across five benchmark datasets.The study compares three architectures and 11 sampling algorithms on MVTec-AD, VisA, BTAD, KSDD, and Real-IAD.Source: §I · p. 1

B. Memory Bank Sampling and Building Strategies

The paper develops lightweight architecture variants and engineering methods for efficient anomaly detection. It combines branch removal, cross-layer feature fusion, and shared segmentation-head parameters to reduce computational and parameter overhead.

C. Adaptive Memory Bank Sampling Pipeline Based on Metadata and Multiple Plugins (PSP)

PSP replaces iterative deep-feature sampling with a four-stage adaptive pipeline built on cached 18-dimensional pixel metadata and lightweight visual plugins. It performs coarse numerical filtering, dynamically adapts plugin scoring, and selects memory-bank samples using typicality, diversity, and feature richness.

Motivation and design

  • PSP uses lightweight pixel-level metadata and adaptive plugin fusion instead of iterative high-dimensional feature-distance comparisons for memory-bank sampling.The design targets joint accuracy, computation, and storage constraints in industrial deployment.Source: 1) Research Motivation and Analysis of… · p. 3

Four-stage pipeline

  • Sampling proceeds through offline metadata extraction, coarse filtering, adaptive decision, and multi-plugin fusion with fine-grained filtering.The pipeline completes filtering through lightweight CPU/GPU numerical operations without real-time backbone inference.Source: 2) Four-Stage Adaptive Sampling Pipeline · pp. 3–4

Offline metadata extraction

  • 18-dimensional metadata captures global attributes and distributional properties, is extracted once per dataset, and is cached for subsequent sampling iterations.For 512px inputs, extraction takes approximately 48 ms per image; MVTec’s 3,629-image cache is approximately 200 KB.Source: 2) Four-Stage Adaptive Sampling Pipeline · pp. 3–4

Coarse filtering

  • Coarse filtering retains K_coarse = keep_ratio × K candidates through numerical sorting, with default keep_ratio=5 and execution under 1 s.At keep_ratio=1.0, this stage can independently complete sampling as a minimal deployment scheme.Source: 2) Four-Stage Adaptive Sampling Pipeline · p. 4

Adaptive decision

  • Adaptive rules determine five-plugin fusion weights and fine-grained thresholds from candidate distributions, calibrating typicality and diversity across scenes.The resulting scoring strategy supports scene-specific filtering rather than fixed plugin weights.Source: 2) Four-Stage Adaptive Sampling Pipeline · p. 4, Table III · p. 4

Plugin fusion and selection

  • Five plugins analyze color, texture, frequency, contrast, and spatial layout before normalized fusion and re-ranking by typicality, diversity, and feature richness.Top-K candidates are selected to build a lightweight memory bank, with default hyperparameters documented for reproduction and tuning.Source: 2) Four-Stage Adaptive Sampling Pipeline · p. 4

D. Optimization Strategies for Model Inference and Evaluation

The paper introduces two engineering optimizations that target memory-bank matching and pixel-level evaluation without changing core training or prediction logic. They are designed to reduce deployment overhead while preserving detection accuracy.

Optimization overview

  • Two optimizations target model matching inference and pixel-level metric evaluation while preserving the model’s core training and prediction logic.The stated goals are lower GPU memory overhead and faster experiment iteration without detection-accuracy loss.Source: D. Optimization Strategies for Model… · p. 5

1) Parallel Computation Optimization for Memory Bank Retrieval:

Parallel memory-bank retrieval replaces serial cosine-similarity computation with normalized matrix multiplication. This removes the large intermediate tensor, reduces memory complexity, and preserves similarity values and P-AUPR.

Bottleneck

  • The naive per-image cosine-similarity implementation materializes a [C, M, D] tensor, causing high memory use and frequent OOM errors during large-scale inference.The bottleneck becomes especially severe for high-resolution inputs and serial per-image computation.Source: 1) Parallel Computation Optimization… · p. 5

Parallel retrieval

  • Pre-normalized memory prototypes and normalized query features enable full similarity computation through matrix multiplication.The equivalence between cosine similarity and normalized dot products supports the implementation change.Source: 1) Parallel Computation Optimization… · p. 5

Memory reduction

  • Memory complexity decreases from O(C · M · D) to O(C · M) by eliminating the 3D intermediate tensor.The optimization is applied during inference after offline prototype normalization and caching.Source: 1) Parallel Computation Optimization… · p. 5

Validation

  • Experiments report numerically identical similarity values and unchanged P-AUPR after parallelization.GPU parallelism keeps latency nearly flat as batch size increases without additional overhead.Source: 1) Parallel Computation Optimization… · p. 5

2) Stratified Sampling for Pixel-Level Evaluation:

Stratified pixel sampling reduces the cost of pixel-level evaluation by sampling anomaly and normal pixels separately while preserving their original distribution. The method operates only during evaluation and is intended to accelerate large-scale iteration without changing predictions.

Evaluation bottleneck

  • Full-pixel evaluation on large datasets such as Real-IAD creates heavy floating-point workloads that slow iteration and increase hardware cost.The affected metrics are P-AUROC, P-AUPR, and P-F1max.Source: 2) Stratified Sampling for Pixel-Level… · p. 5

Evaluation-only design

  • Stratified sampling is applied exclusively during evaluation and does not alter forward propagation, predictions, or feature distributions.Its sole stated effect is reducing computational overhead.Source: 2) Stratified Sampling for Pixel-Level… · p. 5

Sample-size rule

Stratified allocation

  • Anomaly and normal pixels are sampled separately and merged for metric computation, preserving the original positive/negative distribution.This design suppresses statistical error from random sampling while reducing evaluation cost.Source: 2) Stratified Sampling for Pixel-Level… · p. 5

Reported effect

B. Main Results

Across five-benchmark evaluations, LUMIN combines lightweight segmentation with strong pixel-level performance and efficient inference. Its DINOv3 variant matches UniADet pixel-level metrics while reducing memory and maintaining low, batch-stable latency.

  • LUMIN exhibits the most compelling performance across combined zero-shot and few-shot evaluations.Source: B. Main Results · p. 5
  • 1/8 trainable parameters enables LUMIN (DINOv3) to match UniADet in pixel-level metrics, including 97.5 P-AUROC on VisA.Source: B. Main Results · p. 6
  • P-AUPR reaches 44.0 at k=4 on KSDD for LUMIN (CLIP), outperforming all competitors by over 2× after zero-shot collapse.Source: B. Main Results · p. 6
  • LUMIN (DINOv3) achieves the best segmentation visualization, eliminating spurious predictions on defect-free regions across four categories.Source: C. Visualization · p. 6
  • 75 ms latency at batch size 1 and flat 75→75 ms latency through batch size 8 demonstrate efficient, batch-stable inference for LUMIN (DINOv3).DINOv3 uses 1.14 GB versus CLIP’s 1.60 GB, a 29% memory reduction.Source: D. Inference Efficiency Analysis · p. 7

E. Pixel-Level Metric Sampling Acceleration

The paper accelerates pixel-level evaluation and PSP sampling through stratified pixel selection, metadata-based filtering, and controlled plugin use. These strategies substantially reduce computation while preserving stable metrics and competitive sampling accuracy.

D. Effect of Coarse-Filter Granularity on Each Category (k=20)

At k=20, increasing the coarse-filter ratio generally helps modestly, but plugin benefits depend on candidate-pool size and category. The broader lightweighting comparison also shows that LUMIN preserves DINOv3 performance better than CLIP, whose inter-layer heterogeneity limits single-head fusion.

Coarse-filter granularity

  • Mean ∆ rises by +0.109 from ratio=1 to 5, with 13/15 categories improving, although screw declines by −0.73.The decline is attributed to ContrastPlugin misjudging metallic reflections.Source: D. Effect of Coarse-Filter Granularity… · p. 8
  • Metadata ranking already nears convergence at ratio=1, while plugins help weakly at k=20 but hurt at k=4 by adding noise.The reported mean plugin effect is +0.11 at k=20 and −0.155 at k=4.Source: D. Effect of Coarse-Filter Granularity… · p. 8

Lightweighting paths

  • Removing UniADet’s classification branch halves trainable parameters and reduces inference latency by 10% while preserving pixel-level performance on three benchmarks.Source: A. Revisiting the Exploration Paths:… · p. 8
  • LUMIN’s single-head fusion works better with DINOv3 than CLIP because DINOv3 has more consistent inter-layer features.Increasing sampled layers improves DINOv3 P-F1max from 38.5 to 39.0, but CLIP P-AUPR changes from 4.4 to 4.0.Source: A. Revisiting the Exploration Paths:… · p. 9
  • Local feature enhancement is proposed as future work to preserve independent layer processing, but its storage overhead grows linearly with layer count.Source: A. Revisiting the Exploration Paths:… · p. 9

B. Analysis of PSP’s Mechanism Advantages, Synergistic Characteristics and Applicability Boundaries

PSP combines lightweight metadata ranking with optional plugin refinement to reduce memory-bank construction cost and support progressive deployment. Its coarse mode is effective for standardized settings, while richer plugins target more complex or shifted scenarios within stated applicability boundaries.

Mechanism advantages

Synergistic characteristics

Mechanism advantages

Applicability boundaries

Mechanism advantages

Applicability boundaries

  • Progressive deployment begins with broad cold-start coverage and later tightens filtering; unchanged Top-K rankings avoid memory-bank rebuilds.Source: B. Analysis of PSP’s Mechanism… · p. 9
  • PSP is best adapted to standardized scenes, while uncontrolled noise, clutter, and natural backgrounds can degrade metadata-based accuracy.The full pipeline is recommended for chaotic scenes.Source: B. Analysis of PSP’s Mechanism… · p. 9

Overall findings

  • Across five benchmarks, PSP matches K-Means/GSS sampling accuracy at a cost close to random sampling, while LUMIN compresses DINOv3 segmentation with minimal degradation.Source: §VII · p. 9

APPENDIX A HORIZONTAL COMPARISON OF SAMPLING ALGORITHMS

The sampling comparison identifies backbone forward passes as the dominant efficiency bottleneck. PSP addresses this by filtering with precomputed lightweight metadata, avoiding the storage-computation redundancies of non-streaming methods and the inference overhead of streaming variants.

Experimental setup

  • Table XIV reports P-AUPR and memory-bank build time across k=0, 1, 4, 10, and 20, with metadata extracted once across experiments.Source: Table XIV · p. 10
  • The comparison includes theoretical complexity and characteristic properties for the evaluated sampling algorithms.Source: Table XV · p. 10

Efficiency comparison

  • Backbone forward passes are the key efficiency bottleneck in conventional sampling methods.Source: Appendix A · p. 10
  • Non-streaming samplers incur full-set feature-extraction storage and computation, whereas streaming samplers reduce memory but multiply inference overhead.Source: Appendix A · p. 10

PSP comparison

  • PSP uses precomputed lightweight metadata for filtering and completes sampling without backbone passes.Source: Appendix A · p. 10
Loading 2609.04775v1…