Clear Sky Science · en

Anomaly detection of hyperspectral images based on improved isolation forest algorithm

· Back to index

Seeing the Invisible in Satellite Images

Modern satellites don’t just take pretty pictures of Earth; they record hundreds of colors of light our eyes can’t see. Hidden in this rainbow of information are early warning signs of mine collapses, oil spills, or military camouflage. The paper summarized here shows a new way to automatically spot tiny, unusual patterns in these hyperspectral images—making it easier to find small, risky changes on the ground without needing armies of human analysts.

Figure 1
Figure 1.

Why Extra Colors Reveal Hidden Targets

Ordinary satellite photos store three basic colors: red, green, and blue. Hyperspectral images, by contrast, record dozens or even hundreds of narrow color bands. Each pixel carries a detailed “light fingerprint” that reflects what it is made of—soil, rock, vegetation, metal, water, or pollutants. The challenge is that these data cubes are huge, noisy, and cluttered with redundant information from the atmosphere, sensors, and complex terrain. Anomaly detection in this setting means picking out a few pixels that differ sharply from their surroundings, without being told in advance what they represent. These rare pixels may signal ground subsidence in mines, contamination plumes, or camouflaged equipment, so detecting them reliably and quickly is crucial for environmental monitoring and security.

From Simple Trees to Smarter Forests

The study builds on the isolation forest, a machine learning method designed to spot outliers. In a basic isolation forest, the data are repeatedly split at random, forming a collection of decision trees. Unusual points tend to get isolated in just a few splits, while normal background pixels require many. This idea works well in moderate-sized data, but hyperspectral scenes include hundreds of bands, substantial noise, and very subtle anomalies. Randomly choosing features can waste computation on redundant bands, blur the contrast between targets and background, and raise false alarms. The authors therefore redesign the forest so that it sees cleaner data and evaluates pixels not only globally across the whole image, but also locally within their neighborhoods.

Sharpening the Image with Multi-Scale Vision

To clean and compress the data before detection, the method first applies a low-rank and sparse decomposition known as Godec. In simple terms, this splits the image into a smooth background layer and a sparse layer containing sharp, unusual signals. On top of this, the authors exploit the fact that interesting targets often stand out not just spectrally, but also in how they are arranged in space. They use 3D Gabor filters, which act like texture-sensitive lenses sliding through the hyperspectral cube, to highlight patterns at different sizes and directions. An entropy-rate superpixel algorithm then groups neighboring pixels into small, coherent regions. By tuning how fine these regions are, the method can suppress random noise while preserving real structures such as pits, cracks, or man‑made objects.

Figure 2
Figure 2.

Combining Global and Local Clues

Once the cleaned spectral and spatial features are extracted, an improved isolation forest assigns each pixel an anomaly score. Instead of relying only on how quickly a pixel is isolated in the full dataset, the method also checks how consistent it is with its immediate surroundings. Pixels that look normal globally but odd within their local neighborhood, or vice versa, are re-evaluated using a joint scoring rule. This two-level view reduces both missed detections and spurious outliers caused by complex backgrounds. Tests on two widely used hyperspectral datasets, San Diego and HYDICE, show that the new approach achieves high accuracy scores (AUC around 0.97 and F1 near 0.94) while keeping false alarms very low and maintaining reasonable memory use and processing speed.

From Lab Tests to Real-World Monitoring

The authors further test their method on real mining subsidence and ecological monitoring tasks using satellite and airborne data. In mine areas, the system correctly flags over 95% of collapse-related anomalies while missing only about 4%. In environmental surveillance, it detects nearly 94% of suspicious regions such as disturbed vegetation or possible camouflage, again with only a few percent missed. Compared with several established techniques, the improved forest proves both more sensitive and more stable across scenarios. For non-specialists, the takeaway is that by carefully cleaning the data, looking at patterns across multiple scales, and blending global and local judgments, we can turn hyperspectral images into a powerful, automated “early warning” tool for changes that matter on the ground.

Citation: Li, A. Anomaly detection of hyperspectral images based on improved isolation forest algorithm. Sci Rep 16, 6171 (2026). https://doi.org/10.1038/s41598-026-36548-5

Keywords: hyperspectral imaging, anomaly detection, remote sensing, isolation forest, environmental monitoring