Korkut Kaynardag

Impulsive Noise Detection with Semi-organizing Map Neural Networks

In this blog, I am demonstrating a method that I was trying to modify to detect impulsive noise in moving laser Doppler vibrometer (LDV) measurements. I am not publishing this method in the journal paper that I prepared for the impulsive noise filtering of rail measurements performed by an LDV placed on a moving rail car. Below, you can read the details of this method. The signal used is a simulated rail vibration signal recorded by an LDV placed on a moving rail car.

Modified Self-organizing map (MSOM) method: A SOM algorithm was used in [1] to filter the IN corrupted pixels in images. In general, the goal of a SOM is to approximate the topological structure of inputs’ patterns [2]. This is achieved by using neurons arranged usually two-dimensional lattice patterns. Therefore, SOM’s are a class of ANN’s. The weights of the neurons (i.e., wj, where j is the index of the neuron) are considered to be the coordinates of the neurons approximating the topological structure of the input. For example, Figure 1 (a) demonstrates a schema of a SOM where the input space may have any dimension while the output space has two dimensions, and the input is approximated using 9 neurons. As a result, the input vector is projected to a 2-D space and the wj’s can be considered to be located in an output domain with x and y coordinates. Then, the SOM algorithm changes wj’s to approximate the topological structure of the input. The final values of wj’s are called feature maps. In Figure 1 (b), an example, where the 2-D feature map of a 2-D input is created using 9 neurons, is displayed.

Figure 1: (a) an input vector feeding a SOM of nine neurons w1 to w9 on a 3 by 3 lattice; (b) a 2-D feature map where the nine neurons sit among clusters of input points.
Figure 1. SOM: (a) a structure of an ANN in SOM having 9 neurons (b) the 2-D feature map of a 2-D input (example).

The steps of the SOM algorithm for input and output spaces having the same dimensions are as following:

1. Initialization: Determine the number of neurons (i.e., Nw) and choose random values for wi’s.

2. Sampling: Draw one sample (i.e., us(n)) from the 2-D input (i.e., u)) with a certain probability at each iteration (i.e., k).

3. Similarity matching: Find the best-matching neuron (i.e., wy(n), where y is the index of the best-matching neuron) through the minimum distance criterion at the iteration k.

wy(k)=argminy‖us−wy‖,y=1,2,…,Nw(1)

4.Updating: Update wj’s:

wj(k+1)=wj(k)+η(k)hj,y(k)(us(k)−wy(k)),j=1,2,…,Nw(2)
η(k)=η0exp(−kτ1)(3)
hj,y(k)=exp(−dj,y22ε2(k))(4)
ε(k)=σ0exp(−kτ2)(5)

In Eq.2, η(k) is the iteration (time) dependent learning-rate parameter and hj,y(k) is the iteration-dependent neighborhood function. The purpose of η(k) is to control the amount of the change in wj’s and it is defined in Eq.3 where τ1 is a time constant. The purpose of hj,y(k) is to restrict the updating procedure to the neurons that are located inside the topological neighborhood of the winning neuron (i.e., wy(k)). Consequently, not only the winning neuron is updated, but the neurons around the winning neuron are updated as well. This function is defined in Eq.4, where dj,y2 is the distance between and wj(k)’s and wy(k) and ε2(k) is the iteration (time) dependent width of the neighborhood function. Eq. 5 shows the formulation of ε(k) where τ2 is another time constant. Higher values of ε2(k) indicates larger coverage of hj,y(k). Initially, almost all wj’s should be included in hj,y(k=1). Values of η(k) and hj,y(k) decrease over time as it is expected that wj’s approach to the topological structure of the input space.

5. Continuation: Continue with step 2 until no change in wj’s is observed.

In the IN detection method used in [1], a two-dimensional input space was created where one dimension was the value of a pixel and the second dimension was the difference of the pixel value with the median of the surrounding pixels. Then, the SOM algorithm was used to classify the corrupted and uncorrupted pixels. In this study, this approach is modified to be applicable for one-dimensional dynamic LDV signals that have similar noise characteristics as n (e.g., l). The modified method is called Modified SOM (i.e., MSOM) method. Its steps are:

First, a two-dimensional input space (i.e., ul=<uxl,uyl>) of a moving LDV signal (e.g., l) is generated:

uxl=l−m‾2K+1l(6)
uyl=[00Δ4l00]−m‾2K+1Δ4l(7)

In Eq. 6, m‾2K+1l is the moving median of l. In Eq. 7, Δ4l is the 4th order difference of values of l, m‾2K+1Δ4l is the moving median of Δ4l. Two zeros are added at the beginning and the end of Δ4l since the fourth-order difference of a signal decrease the length of the signal by 4 points. Selection of K for m‾2K+1l and m‾2K+1Δ4l are based on the length of IN observed in l and Δ4l. This is because the moving median is robust against artificial peaks with a length of K+1 [3]. To obtain u for s (i.e., us), K of m‾2K+1s and m‾2K+1Δ4s were chosen as 8 and 62 since the maximum lengths of artificial peaks in s and Δ4s were 9 and 63, respectively. The reason of selecting a larger window size for m‾2K+1Δ4s is because sif appear as artificial peaks in Δ4s due to 4th order differentiation. Figure 2 (a) shows a segment of s and m‾17s while Figure 2 (b) shows a segment of Δ4s and m‾125Δ4s.

Figure 2: (a) a segment of the velocity signal s and its moving median, with artificial peaks standing out of the median; (b) the fourth-order difference of s and its moving median, where the peaks appear as bursts.
Figure 2. Signals required for us: (a) a segment of s and m‾Ks (b) a segment of Δ4s and m‾KΔ4s.

Next, create a SOM for l. Then, the points in ul were assigned to the closest neuron through their minimum Euclidian distance to the neuron:

Cjl(x)=argminxx∈[0,Nl]‖l(x)−wj‖,j=1,…,Nw(22)

where Cjl(x) represents a signal point l(x) assigned to a neuron (e.g., wj). A 70 by 70 two-dimensional ANN was chosen to be used in the SOM algorithm to capture the topological structure of us as shown in Figure 3 (c).

Afterward, find the main trends in ul. To achieve this, calculate the mean of the distances between a neuron and the closest six neurons (i.e., MDjl). Next, sort MDjl’s in ascending order. Then, use the L-shape method to find the knee point [4]. Discard the points beyond this knee point. This is because some extreme points corrupt the L-shape of the curve. Then, again apply the L-shape method to the remaining points and find the second knee point. Figure 3 (d) shows the MDjs’s computed for s and the second knee point.

Then, find the neurons whose MDjs values are lower than the second knee point and consider them as the neurons representing the points in ul that are not corrupted by IN. Figure 3 (e) shows the points in us that are not corrupted by IN. The remaining points are considered to be corrupted by IN. Find their corresponding points of in l and consider them as points that are corrupted by IN.

Figure 3: scatter plots of the input space u^s (a, and zoomed in b), the neurons of the SOM spread over it (c), the sorted mean neighbour distances with the knee point where two fitted lines meet (d), and the compact cloud of points classified as uncorrupted (e).
Figure 3. The SOM classification of s: (a) us (b) zoomed view of us (c) the neurons of the SOM applied to us (d) average of the distances between a neuron and its neighbors (e) the points classified as uncorrupted in us.
  1. H. Kong and L. Guan, “A neural network adaptive filter for the removal of impulse noise in digital images,” Neural Networks, vol. 9, no. 3, pp. 373–378, 1996, doi: 10.1016/0893-6080(95)00128-X.
  2. S. Haykin, Neural Networks and Learning Machines. New Jersey: Pearson, 2009.
  3. R. K. Pearson, Y. Neuvo, J. Astola, and M. Gabbouj, “Generalized Hampel Filters,” EURASIP J. Adv. Signal Process., vol. 2016, no. 1, 2016, doi: 10.1186/s13634-016-0383-6.
  4. S. Salvador and P. Chan, “Determining the Number of Clusters / Segments in Hierarchical Clustering / Segmentation Algorithms,” in 16th IEEE International Conference on Tools with Artificial Intelligence, 2004, pp. 576–584.