{'fraction_non_alphanumeric': 0.036395383115263386, 'fraction_numerical': 0.012426585636862515, 'mean_word_length': 4.615688271997962, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Improving Automated Visual Fault Detection by Combining a Biologically Plausible Model of Visual Attention with Deep Learning

It is a long-term goal to transfer biological processing principles as well as the power of human recognition into machine vision and engineering systems. One of such principles is visual attention, a smart human concept which focuses processing on a part of a scene. In this contribution, we utilize attention to improve the automatic detection of defect patterns for wafers within the domain of semiconductor manufacturing. Previous works in the domain have often utilized classical machine learning approaches such as KNNs, SVMs, or MLPs, while a few have already used modern approaches like deep neural networks (DNNs). However, one problem in the domain is that the faults are often very small and have to be detected within a larger size of the chip or even the wafer. Therefore, small structures in the size of pixels have to be detected in a vast amount of image data. One interesting principle of the human brain for solving this problem is visual attention. Hence, we employ here a biologically plausible model of visual attention for automatic visual inspection. We propose a hybrid system of visual attention and a deep neural network. As demonstrated, our system achieves among other decisive advantages an improvement in accuracy from 81% to 92%, and an increase in accuracy for detecting faults from 67% to 88%. Hence, the error rates are reduced from 19% to 8%, and notably from 33% to 12% for detecting a fault in a chip. These results show that attention can greatly improve the performance of visual inspection systems. Furthermore, we conduct a broad evaluation, identifying specific advantages of the biological attention model in this application, and benchmarks standard deep learning approaches as an alternative with and without attention. This work is an extended arXiv version of the original conference article published in"IECON 2020", which has been extended regarding visual attention.


I. INTRODUCTION
One long-term goal is to incorporate biological processing principles into machine vision systems. Visual attention, a smart human processing principle that focuses processing resources on an aspect of a scene relevant for the current task, is one of these biological processing principles [1,2]. We apply this principle here to the domain of wafer dicing to investigate its benefits and under which circumstances it improves automated visual inspection systems. The long-term goal of our research is therefore to better understand the power of human processing as well as to incorporate its benefits into machine vision systems and improve them accordingly.
A major aim in the domain of the semiconductor industry is to detect and recognize production errors and faults early on. As manual detection is a very labor-intensive and thus costly procedure, computer vision systems are often deployed as an automatic detection system [3,4]. This does not only results in reduced manufacturing costs and work load, but also helps increasing the yield of the production process itself. Hence, systems for automated visual inspection are widely deployed in the industry.
In this contribution, we address the topic of wafer dicing. Wafer dicing is the separation of silicon wafers into single components, e.g. chips, often using a dicing saw [5,6]. Dicing based on laser technology is a novel alternative method to separate brittle semiconductor materials via thermally induced mechanical forces (laser cut wafer dicing [5,6]). Thereby, a dicing street is the area where dicing is potentially allowed. The quality criterion of dicing is that the laser cut (kerf) must not leave the street (Fig. 1). A curve leaving a street entails faulty chips and decreases the wafer yield, i.e. the ratio of faultless to the total sum of chips.
The field of automated visual inspection for wafer dicing uses classically image processing approaches commonly differentiated due to their functionality in projection-, filterbased, and hybrid approaches [3,7]. Projection-based approaches include for example principal component analysis, whereas filter-based approaches encompass spectral estimation methods, yet, they often need manual adaption. Therefore, learning-based and hybrid approaches make utilization of support vector machines (SVMs) or multilayer perceptrons (MLPs) [8,9], while, in recent years, also a few more powerful deep learning (DL, [10]) approaches have been deployed [ [ 15], which we will address here. For instance, [14] tested synthetic wafer data using a convolutional neuronal network (CNN) in their application. Others recognize the production process over time for an on-the-fly control [12], or use recurrent neuronal networks [13]. However, one problem is that faults are typically very small in size and hard to detect in the large wafer disk (Fig.  1). Imaging systems capture the complete (often stitched) image of a wafer, which results in resolutions of up to 150 megapixels, where single chips often range in a size of 200 -2000 pixels as in our case. Faults are even smaller structures up to the size of only a few pixels (Fig. 1, 2). Therefore, the challenge is to detect these small structures in a vast amount of data. Classical deep neural networks have trouble to deal with this problem: Either the input image is down-scaled as normally for the network, but then the small structures would be lost. Or, the input could be chosen large enough, but then the network would run very slowly and had too many free parameters, leading to overfitting problems, as the network's size would increase unfeasible.
One interesting biological processing principle for this problem is visual attention, a smart human mechanism to select from the huge amount of input data the relevant one for the task at hand [16], or to focus neuronal processing resources on an aspect of a scene [1,2]. The principle is deployed here to "zoom in" into the wafer disk or into a chip (Fig. 1). Visual attention has, to the author's knowledge, not been used in the domain yet. Therefore, we like to propose the first model of visual attention, in combination with deep learning, for the domain of fault recognition in the semiconductor industry.
There exist several approaches of combining visual attention with deep neural networks (DNNs) in other domains already. The background behind this idea is often that attention focuses the processing on a part or an aspect or a scene, which is then passed for classification to a machine learning classifier, like a DNN. In such a way, the attention model zooms in on the content, which then the DNN classifies in higher resolution and with less irrelevant data. However, the way to combine this remains pretty unclear and under debate. We found several dominant approaches, which are listed in the following. 1) One approach is the saliency models [17]. The idea understands attention as a mechanism to define a spatial region (region of interest, ROI [17]), which is then later passed to a classifier. Newer work uses this idea for taking fast snapshots from the image via attention and feed them to a CNN (Glimpse approach [18]). 2) As saliency models struggle with objects that are not very obvious in the image, they find the wrong regions for the DNN. This has led to a combination of this approach with machine learning like reinforcement learning [19], e.g. [20]. 3) Similarly, a saliency model can be controlled by words to find the visual regions corresponding to text (attention for visual-textual alignment, e.g. Wang et al. [21]). 4) A different approach is from Jürgen Schmidthuber [22], which introduces top-down feature-based attention in his model and thus uses attention towards specific features, not regions. 5) Attention towards some basic features can also be used to select an irregularly shaped region, defined via visual features instead of a spatial region, and then feed this content to a DNN (e.g. [23]). 6) In the recent few years, works also utilize DNNs, or building blocks of them, as attention networks. So, one neuronal network serves as attention network, while the other is modulated by it and processes normally the image (e.g. [23]- [25]). Quite a few systems use this approach, but they are designed very diverse (5 examples: [23]- [27]). Therefore, many different approaches exist that allow the combination of visual attention with machine learning and deep learning based models, yet, selecting the approach with the best performance for a specific task remains difficult.
However, when we look at the attentional processing in the brain (e.g. Miller & Buschman [28] or Tsotsos et al. [29]) and the underlying connectivity (e.g. Ungerleider et al. [30] or Felleman & Van Essen [31]), we found that none of the above approaches resembles closely the attentional processing in the human brain. Also none of these approaches are underpinned with much neuroscientific data. For instance, there exist a lot of single-cell recordings in the attention literature [32,33] which are not replicated at all, and also many behavioral influences by attention [16]. The saliency models are inspired by the latter [17], but the approaches are nowadays also not so close more linked to psychology. Moreover, there exist also many other different ways in which visual attention alters human behavior, which are not reflected (e.g. texture segmentation [34,35]).
Therefore, we propose here to use a more biologically plausible model of visual attention, to avoid all of these problems, and the quarrels about which model is the right one. Biologically-plausible models of visual attention originate more from the discipline of computational neuroscience, which develops models of the human brain to replicate neuronal recording data and to simulate human behavior. In recent years, a few works have also shown that such models of visual attention are capable of real-world applications (see dissertation [2] for an overview), e.g. [1,2,29,36]- [38]. However, none of these models, at least to the authors' literature search, have been combined with deep learning yet.
We will employ the model of Beuth, 2019 [2] as it shows very promising real-world capability (see also [39]) while maintaining a deep biological plausibility. The model has a strong neurophysiological foundation as it can replicate a large range of neuronal recordings of attention [33]. Moreover, it has a satisfying operation as several applications show it can at least deal with virtual reality [40] and real-world [39]. And finally, it can replicate human behavior as it is based on previous models (visual search, [1,41]) and is able to also fit new experiments in other behavioral paradigms (OSM, Chap. 5 in [2]). Additionally, the work [2] shows advantages over saliency models: a) Top-down object-descriptors, b) biological foundation, c) the option to easily realize complex task sets in a natural way, as later shown in Sec. II-B. The current work is deeply rooted in neuroscience and focuses on the concept of visual attention, while extending an earlier workin-progress publication of us using opposingly a specialized pipeline [7]. The current biologically-grounded contribution also evaluates, in comparison to this shorter work, the concept of visual attention with deep learning more broader and indepth. This is more thoroughly possible as we utilize now a model based on the human brain. Therefore, we like to propose the combination of a biologically-plausible model of visual attention with deep learning as our second contribution.

II. PROPOSED SYSTEM
We design a multi-stage system (Fig. 3), which processes a whole wafer to detect faulty and faultless chips. Wafer images are recorded via different microscopes, either in the form of unstitched subimages or, alternatively, preprocessed via the microscope software by stitching all subimages into one image. In the system, the chips are at first classified into chips inside the wafer area and chips on the wafer border. The latter are also scanned by the microscope, but are typically incomplete or broken (Fig. 1, wafer border). The manufactures are not much interested in faults in the outer chips, thus we only process the inner chips further. Afterwards, the visual attention model is employed to find the region of interest (ROI) for the inside chips. Regions of interest are in our application the chip borders, streets, and their surroundings. The ROIs are then passed to the CNN for detecting faults in the regions. Finally, we calculate if a chip is faulty or not, depending on the classification of the four borders of each chip. To show the benefits of attention, we will compare our full system to approaches without attention and to approaches of the automated visual fault detection.

A. Classification of inside vs. wafer-border chips
This first stage distinguishes chips inside the wafer from chips on the wafer border. The border chips are typically broken so they have to be labeled for the user as "wafer border chip" and are excluded from evaluation. However, the recognition is pretty easy as the pattern is very obvious. The chip is crossed by a large black shape constituting the wafer border ( Fig. 1). We found, that a basic CNN is already able to achieve an accuracy of over 99 %, utilizing two convolution layers, one max pooling, one dense and one fully connected layer. This corresponds to a VGG network [42] with only one block.

B. Model of visual attention
Our attention model (Fig. 4) stems from a line of computational-neuroscience models of visual attention from the group of Fred Hamker [1,2,33,39,40,43]. The model is adapted and further developed from [2,Chap. 4].
In the attention model, at first, the input image is processed through an earlier visual brain area (V1), which filters the image for edges and colors (step (i) in Fig. 4). Edges are recognized by Gabor filters, and colors as a color contrast between red and green, and between blue and yellow [2]. Colors are not used much in this wafer application, but are included for the generality of the model. This stage models brain areas like the lateral geniculate nucleus (LGN) and the primary visual cortex (V1). The neuronal responses are then routed to a higher-level visual area (HVA), encoding objects (ii). This area simulates high-level visual areas in the brain such as the inferior temporal cortex, where these cells have been found [44]. The responses of the model's HVA neurons are computed by convolving the neurons of V1 with a pre-learned weight matrix. The weight matrix can be learned by any offline learning method, we use a simple one which was already employed in previous research, the one-shot learning [2,40]. The procedure learns an object directly from a single image, leading to its name. We apply it here to learn cells reacting to the chip borders. We learned 12 different cells to account for the variance in the data material: We combine 2 street orientations (vertical and horizontal), 3 street widths, and 2 color schemes (black streets/white chips and vice versa). Four cells are exemplarily shown in Fig. 4, no. 1, 3, 4 and 6.
The model has to search in this task for the borders of a chip (Fig. 4). This task is called visual search in psychology and it is known that top-down visual attention is applied to the search target [45], realized in the model by signals from the prefrontal cortex (PFC), encoding this task instruction, to the higher visual area (iii). These signals amplify neurons encoding the edges in HVA, leading to higher activity at potential edges in the image. This realizes the human task instruction "check the streets of the chip", which we know from human workers is carried out by looking at the chip border regions (streets).
Afterwards, the HVA activities are spatially processed by a brain area called frontal eye field (FEF [2], iv-vii). The FEF first takes the maximum over the HVA activity, the result shows activity on potential target object locations. Afterwards, a competition between places is applied and the activity is projected back to HVA, forming a reentrant loop (vii). This loop focuses neuronal activity to a single location over time (spatial attention). When a single location is selected in FEF movement (FEFm), it denotes an upcoming eye movement. In humans, the eye movement would select the target location, thus we simply read out it and define it as street center (viii).
Which of the four streets is selected is more or less random. After the first street is selected, the location is suppressed in the FEF by an inhibition-of-return standard approach (IOR, [1]) via the external attention signal, so another street will be selected. This task is repeated 4 times. Finally, 4 street regions are cut out based on the found center coordinates of each street.
The model was further extended from previous work for this application by: introducing the IOR concept from previous attention models [1], adding an external attention signal, and increasing the precision of the street center. The changes are listed in the Sec. II-D. In general, the model is described by a set of differential equations [2].

C. Advantages of the attention model
Besides the general advantage of visual attention, we have analyzed our work regarding the advantages of such a biological attention model in the current application. First, the model searches a street pattern based on highlevel object descriptors and not merely pixel-based. The object is encoded by a neuron in the higher visual area (Fig. 4). Multiple different streets can be encoded by multiple object templates, thus also a certain variance can be encoded. The model then searches for all templates in parallel. The highlevel object descriptors make the model more robust compared to classical computer vision approaches like edge following, e.g. against noisy areas or stitching errors, while keeping the model simpler than deep learning solutions.
Due to the nature of the employed learning, i.e. the oneshot learning, the method learns a template directly from a single image. Hence, it is very fast in its nature and the total runtime of the learning is only a few seconds on consumergrade hardware. The other advantage of the learning procedure is that the image can be defined in a rather conceptual manner, more of a sketch than an actual image (Fig. 4). We found that even defining the image via simple image editor software is enough. Hence, it can be easily and swiftly produced.
As a last advantage, the attention model can deal with the inner structures of the chips out of the box by an external spatial attention signal. This signal defines which chip areas are suppressed regarding processing. We use it to suppress the inner structure of a chip, as we know human inspectors would also not look at the middle of a chip image. To illustrate this, we use a chip with especially a lot of inner structures in Fig. 4. The suppression map can again simply be defined as an image. The model naturally realizes in this way task instructions. During the processing, the initially very noisy activity is filtered, illustrated by showing the input stages towards the FEF (iv,v,vi): the first stage is very noisy as it reacts to all inner structures of the chip (iv). Yet, the external spatial attention signal is then applied to this, which suppresses the "middle" by decreasing neuronal activity (v). Afterwards, the competition takes place, increases the signal contrast, and reduces the activity to a few locations (vi). During this processing, the model filters out inner chip structures, which might be very similar to the searched streets and thus would divert the recognition process.

D. Improvements of the visual attention model
The attention model has been modified in several ways for this work. Additionally, as the attention model stems from a line of older attention models, this section provides the changes as compared to the previous works [2].

1) Spatial external attention signal:
The model was extended with an external spatial attention signal. In the data set, some of the chips have line-like structures within the chip. We know from human workers that they were told to ignore the structures inside a chip, which translates roughly to the task instruction 'do not look in the middle of a chip'. Such task instructions can be naturally realized in the model by directing 'negative' attention to the middle of a chip.
Hence, this signal realizes spatial components of task instructions. We implemented this external attention signal as an incoming signal to the frontal eye field (FEF), as this structure is highly involved in spatial attention [41,46].
The equations in the FEF were changed in the FEF visual cells from the ones in [2] to the following ones by adding the term of [· (1 + 2 a FEF )]: with: whereby a FEF denotes the spatial attention signal, resulting in a neuronal activity matrix of the same size as the FEF. The entries are a FEF x ∈ [−0.25, 0.25] and thus can be negative to allow a 'negative' attention signal. The variable E HVA2 x denotes the incoming signal from the HVA. In the doctoral thesis [2], the FEF received also an incoming signal from V1 (E V1 x ), which is disabled here as it is not used and thus set to 0 (equations number Eq. 4.53 -4.55 in [2]). The helper functions C(x) and Q(x) denote a non-linearity (C) to increase the difference between low and high signals (Eq. 4.59 in [2], not listed here), and a signal enhancement operation (Q, Eq. 4.60 in [2]).
2) Inhibition of return (IOR): To detect multiple streets in the chip image, an inhibition-of-return approach (IOR [1,17]) was also added to the model. IOR describes the concept that the target region is inhibited after an eye movement, so the next eye movements do not visit this region again. This allows the search and localization of several streets in a row within a chip image. The IOR is implemented in our model by an IOR map, which stores locations of previous eye movements as activity blobs and suppresses then the FEF cells (standard approach, [1,17]).
The idea was realized as follows: We define an inhibition map (r IOR ), initialized initially with a small positive number uniformly (0.25), representing no inhibition. The image is then processed through the normal duration of the model. When an eye movement (saccade) is executed, inhibition at this position x s is set as a blob of negative values (Eq. 4, 5): whereby: • The parameter v IOR = 0.75 denotes a scaling of the IOR influence.
• The function g represents a two-dimensional Gaussian function centered at (0, 0), whereby a denotes the amplitude, and σ the standard deviation: Afterwards, the image is processed again, and the map r IOR inhibits the FEFv cells on the previous locations. This inhibition leads to the selection of a different target, i.e. a different street. The IOR influence is also realized as a modulatory influence into the FEF, like a 'negative' attention signal, and is bundled with the other attention signal, the external one, via a Fuzzy-Min operation [47]. With the IOR component, the Eq. 3 changes to the following Eq. 6: 3) Precision of the attention model's localization: First of all, we increased the spatial precision of the attention model by three improvements: A) Adapting V1. V1 consists of two layers, V1 simple and pool, whereby the V1 pooling layer has a lower spatial resolution (1 : 10). We improved the behavior of the model by aligning the two layers on top of each other, implying that V1 pool must have precisely 1 /10 of the size of V1 simple.
w HVA4-HVA2 C) The size of HVA layer 2/3 and the FEF was increased to have a finer resolution for selecting the target. Normally, HVA layer 2/3 has a lower resolution than HVA layer 4 to decrease the spatial information over the visual layer hierarchy. However, as also the FEF has the same resolution as HVA layer 2/3 (assumption in the original model), we increased the resolution in this area to have also a higher resolution in the FEF, hence resulting in more accurate eye movements.
4) Equations adapted to the task: Furthermore, several additional parameters were adapted. They were changed as the attention model was applied to a new application input, which causes different strong and broad activities in the neuronal layers.
• The signal HVA layer 4→HVA layer 2/3 was not only increased due to the changed non-linearity (see previous paragraph, 3-B), but also to account for a general lower HVA layer 4 activity: v HVA4 = 1 → 16.

E. CNN for street classification
The streets were then classified by a convolutional network, as outlined in Tab. I, in 3 classes. 'Good streets' (Class 0) represents chip regions without a fault, and 'bad streets' (2) with a fault. Additionally, we defined a class 'anomalies' (1), describing intact streets, but with an unknown visual event on them. The plan is to report back these chips in the later production system to a human worker for a further manual inspection. For the analyses in this paper, this class is not considered, and its samples are put into the 'good streets'.
The attention model returns the center where it has found a street. We define a region of interest (ROI, [17]) of 120 % the size of the chip and 6× the width of the street around this center. The goal of our application is to detect dicing faults, which occur in the space between the streets and the chips, and possibly continue inside the chip. To cover these areas at best, the ROI was centered in such a way that the main street is placed at 1 /3 of the image height such that 2 /3 of the image shows the associated chip. Hence, the input street image contains the street itself as well as parts of adjacent chips and street crossings (Fig. 1, right side).
Regarding the design of the CNN, we indicate for the CNN the relevant chip areas inside the provided image and thus what part of the image should contain no cuts, by employing a trick from deep reinforcement learning [48]. The street regions are rotated before being passed on to the CNN, whereas the chip area is always located in the same image position (chosen as top). Thus, the position of the chip region is stable over all images in the data set. The trick is now to reduce spatial pooling to allow the CNN to learn specific weights for specific regions in the provided street image. As the distinction lays predominantly in the y direction (chip is on top, street on bottom), we lower the pooling in the direction of y. Following this principle, the effect of the pooling in y is reduced within the deeper pooling layers as shown in Table I.

F. Chip classification
Finally, the results of the street classification are translated back to determine faulty and good chips. If a chip has at least one faulty side, it is defined as faulty, otherwise, it is defined as good. The chip classification is the final outcome of the system.

III. TEST RESULTS AND EVALUATION
In this evaluation, we analyze the performance of our whole system, and quantify the improvements which result from employing visual attention. Yet, beforehand, we will validate if and how well the attention model operates in this task.

A. Data overview and test configuration
The wafer data set originates from a real-world, laser-based dicing process of multiple types of semiconductor wafers. During the process, each wafer was first mounted on a tape and a frame. Subsequently, the dicing tape was expanded in order to broaden the cut, making it possible to visualize the dicing streets using a wide-field light microscope. The used microscopes have a scanning stage which scans the wafer linewise over n lines and m columns, allowing imaging of up to 150 mm / 6 inch wafers. The recorded subimages are stored separately or are stitched together, and then the images are saved offline.
Training of the CNNs was performed with the deep learning framework Keras and TensorFlow in Python. We split the data into a 50 % training, 25 % validation, and 25 % test set. All data were resized to 192 × 60 in advanced for the streets (and to 96 × 96 for the chips). We choose to have a rather small input size to keep the number of weights, i.e. free parameters, low, as our data set is rather small (Table II).
As we have a very low amount of data for a deep-learning problem, we chose also to design our network rather small (Tab. I). Additionally, the data were augmented on-the-fly using the methods: randomized rotation in a range of up to 4 • as well as scaling up to ±4 %, translation in x / y up to 10 / 1 %, and flip in x. As mentioned above, we would like to reduce the level of augmentation in the direction of y on the chip border regions, thus we decrease the amount of translation in y and omit the flip in y. Finally, the data were contrast-normalized before being processed by the framework.
The classes in the problem are very imbalanced (ratio is 92.2 % : 3.7 % : 4.1 %, Tab. II), hence they need to be balanced for the CNN. For this, we first try to weight the loss function higher when a class is less presented in the data set, but we found that this approach gives suboptimal accuracies for such a high imbalance. Hence, we tried a different approach and found that simply duplicating the samples for the underrepresented classes while applying data augmentation yields good results. The on-the-fly data augmentation ensures, despite several images are identical in the data set, that the images appear differently for the CNN after the augmentation. Therefore, such an approach produces a good amount of image variations on the fly from one source image [23].

B. Evaluation of the visual attention model
At first, we will verify if the attention model shows plausible human behavior. As we do not posses human eye tracking data for this task, and as there is, according to our literature search, literature about visual search [41,45,49]. For this, we first illustrated the model's behavior on a representative example, as already shown during the model's description. This serves as a qualitative analysis. Afterwards, we quantify the results, i.e. the correctness of eye movements, which connotes here how many streets the attention model finds and how precise are the selected coordinates. we conclude from this comparison that the model shows a very good performance to select the streets correctly via eye movements.
2) Precision of the region of interest extraction: To ensure a high-quality region of interest (ROI) extraction, we measured the centers' accuracies of the resulting street segments, whereas the street's center should be situated in the center of the image. These results were obtained by manually annotating the street centers of 200 randomly selected samples and measuring the pixel-based distance to the real image center. The attention model achieves in average a deviation in X and Y of 0.34 and 0.57 pixels respectively (Fig. 5), with corresponding standard deviations of 3.16 and 3.65 pixels. Humans typically make an eye movement within the vicinity of an object, and another eye movement(s) to fine-center the gaze. The second operation is not part of the model, but despite this, the model finds the ROIs quite accurately with mean deviations within the range of a few pixels. Hence, the model is probably more precise than as expected from human psychological findings.
In summary, the model shows reasonable behavior as expected during a visual search task like this, and achieves a high accuracy to localize the streets correctly.

C. Performance of the CNN for street classification
We compare here the performance of the full system with a system where visual attention was disabled.
1) Performance of the CNN with visual attention: The full system achieves an accuracy to classify streets correctly of 91.91 % (Tab. IV, mean accuracy over all classes). This and all other following values were measured over 5 runs. Additionally, we obtain a confusion matrix (Fig. 6a). We are especially interested in the precision to detect faults on the wafer, and this accuracy is observable from the confusion matrix, showing faults are detected correctly with 87.80 % (also listen in Tab. IV).  [14] 88.66 ± 0.88 80.40 Attention + CNN [11] 87.63 ± 1.20 76.80 Attention + CNN [15] 84.86 ± 1.82 70.60 Attention + Our CNN 91.91 ± 0.57 87.80 Table IV: Street and chip classification results. Mean accuracies and standard deviations for (i) baseline solutions, and (ii) attention approaches based on our model. The CNNs [14], [11], [15] denote the state-of-the-art in the wafer domain.
2) Performance without visual attention: To highlight the benefits of visual attention, we benchmark a system where the attention model was removed from the pipeline (Tab. IV), and add for comparision also other methods from the domain of wafer dicing as baseline. The CNN in this system uses directly whole chip images as input. This CNN reaches a mean accuracy of 80.83 % (Tab. IV). This accuracy does not look so bad, however, the accuracy to detect a fault correctly is only 67.40 %. (Fig. 6b). This value is much lower showing the effect of the visual attention model. In fact, the overall error rates increase without attention from 8 % to 19 %, and for the faulty chips from 12 % to even 33 %. These values show that especially the detection of faulty chips benefits from visual attention.
Next, we evaluated our system in the context of related as well as DL-based systems in the domain of automated visual inspection for semiconductor manufacturing and wafer dicing (Tab. IV). While as of the current state-of-the-art automated visual inspection systems often ML-based approaches are being deployed, i.e KNN-, SVM-, and MLP-based classifiers, we include those approaches in our evaluation to provide a more comprehensive comparison. Besides them, the newest DNNs are tested [11,14,15]. This does not include DNNs that focus on e.g. process monitoring over time due the required time component [12], and contributions which do not provide sufficient details for a reimplementation [12,13].
Our evaluation shows that the proposed visual attention incorporating system constitutes a notable improvement over existing solutions, in which single CNN based systems [11,14,15] constitute the current state-of-the-art. While the CNNs of [11,14] are the current state-of-the-art and reported in their publication accuracies of 98.2 % and 96.2 % on their problems respectively, they reach here merely 75.24 % and 78.89 %. This implies for us our problem could be more challenging. A look at their data material confirms this, their data is more homogeneous and with much larger and thus easier  to detect faults. In summary, we conclude that the proposed system is, at least from published approaches, currently the best system for this problem.

3) Standard deep networks and benefits of attention:
In the next investigation, we benchmarked different standard DL-based approaches to (i) evaluate how they perform in comparison and thus could be used as alternative, and (ii) how much visual attention benefits them. While conventional DNNs are broadly applied to different real-world tasks, yet, they were also mainly developed for the recognition of real-world objects (e.g., ImageNet). Thus, the question arises how they perform in our use case with very different test data. Table V illustrates the resulting accuracies for different DNN-based models and architectures, showing our solution surpasses them too.
We found that all networks show a performance boost by visual attention, hence all networks benefit from visual attention. This illustrates that attention is a crucial principle and promotes its idea of zooming in. Surprisingly, the standard networks do not cope with attention very well, seen as the accuracies for the streets are lower than with our customized network. That implies the standard deep networks profit less from attention. Furthermore, transfer learning [10] benefits even less from attention. We suppose that is because in the original data set (ImageNet), the objects are not shown in high resolution or large sizes like the faults in our street regions, hence the image material does not transfer well enough to our use case. Hence, our conclusion here is that visual attention is able to show its strengths much better if it is not mixed with transfer learning. This is reasonable since the data material is different.
Therefore, we conclude that our proposed system improves and outperforms, as evaluated in comparison, current state-ofthe-art solutions in the wafer dicing domain. Other standard deep neural network approaches show also lower accuracy percentages, and we evaluate generally the benefits of visual attention.

D. Performance of the whole system
Finally, the class of a chip is calculated from the classification of its four street regions. The full system reaches the following accuracy to classify the chips correctly: 91 %. This rate would be the important one for a final production system. The result of the classified streets and chip error classes can then be illustrated, here as ground truth, as in Fig. 7. It comprises the street and chip classification test results for good (•), anomaly (•) and faulty (•) streets and chips according to the used addressing scheme of the wafer. The shown error classes can then continue to differ in their respective defect pattern to be further assessed by an inspector.
IV. DISCUSSION ABOUT HOW TO COUPLE A VISUAL ATTENTION MODEL WITH A CNN Several options exist how to couple a visual attention model with a CNN as delineated in the introduction of this work, e.g. [18,20]- [24]. The classical approach is that attention selects a spatial region (region of interest, ROI [17]), which is subsequently passed to a classifier for later recognition. This idea came up at first with the saliency models in the late 1990s, which select a ROI for a later classifier [17]. The classifier can of course today also be a CNN. Variations of this approach are the glimpse approach from Google [18], where a more modern neural network selects regions very swiftly (glimpses), which are then fed into a CNN.
Alternatives to the ROI approach would be other developments like proto-objects, where regions are formed like an object [50]. They eliminate the drawback of the ROI approach that the region has always the shape of a rectangle, and hence may not fit a more naturally shaped object.
Another alternative would be that visual attention modulates the neuronal response (amplify or suppress), which is closer to the processing in the brain [32]. This approach starts to be utilized in the deep learning community to a small degree (e.g. [23]). The idea is to feed all area into the CNN, but enhance neuronal responses in the attended region, and suppress all neurons in other places. The approach has the advantage that it can shape the region more clearly. Additionally, the amplification and suppression is closer to the neuronal processing of the brain ( [32,33], original data e.g. [51]), because attention in the brain operates multiplicatively such as multiplicatively enhancing or suppressing neurons.
We consider also to utilize this novel modulation approach, but finally decided against it: i) The modulation approach requires to feed entire images and not only the ROIs into the CNN. As the images are relatively large in our application (up to 1 000 pixels across), this would result in a large CNN and hence in a reduced processing speed, as well as, in a lot of free parameters and overfitting (we have only a few data here). On the other hand, the street-showing ROIs in our case have a resolution of only 400 × 60 pixels, which is many times smaller than the entire chip image.
ii) The advantage of the newer approach is that the region can be shaped more clearly and flexibly. However, this big gain is in our wafer application of not much benefit, as the most structures in our image material are anyway rectangles.
iii) Despite the approach's closer similarity to the brain's functionality, the neuroscientific review literature also reveals that the effects of attention are much more complex than a simple 'enhance attended' or 'suppress all others' [32,33]. As we aim for a strong biological plausibility, we would not like to ignore these effects lighthearted, and rather aim for a separate research publication investigating how a deep neuronal network can be integrated into an attention model or vice versa in a biologically plausible way. iv) Finally, we have a complicated task-instruction here. The workers' instruction is to check the cuts for potential faults, which is of course realized by looking at the cuts (i.e. streets). Hence, we have applied attention to the streets here. However, not a street alone need to be checked for cracks, but rather also the close region next to it, ranging from the close surrounding of the street over the street-chip border towards the inside of the chip. Therefore, the workers' task requires to transfer from the attended structure (streets) to another spatial area. As it is not really known how such task instructions are realized in the brain, we do not know how to implement this in the attention model. The region of interest approach instead solves this problem out-of-the-box.
Therefore, we evaluate it is better to use the region of interest approach, which solves the problem nicely and has advantages in our case.

V. CONCLUSION AND OUTLOOK
In this contribution, we propose a novel system for automated visual fault detection by combining a biologicallyplausible model of visual attention with a deep neural network. The process of automated visual fault detection in the domain of semiconductor manufacturing and laser-based wafer dicing constitutes one particularly challenging application area, as defect patterns often range within a size of only a few pixels / µm. This problem is challenging for traditional convolutional neuronal networks, and it is getting more challenging due to the heterogeneity and imbalance of the image material. Visual attention is well suited for this problem, but not much used in the semiconductor industry yet, for which we created the first deep learning system with attention. Our benchmark shows that visual attention improves the mean accuracy from 81% to 92%, and the accuracy to detect faults correctly from 67% to 88%. Hence, the error rate especially for the faults drops from 33% to 12%. These rates outperform notable other state-of-the-art systems in the domain, as well as the power of standard deep learning systems.
This work utilizes a biologically-plausible model that is deeply rooted in neuroscience [1,2,33,43] for the combination of visual attention with deep learning approaches. As of the current state of the art, it is often unclear how both principles from visual attention and learning-based approaches should be combined in an application, furthermore they often lack biological plausibility and therefore tend to be unreliable or outperformed (Sec. I).
Future projects can be built on top of this system and can be enhanced with it, for example in other domains. The zoomingin approach is certainly not limited to the inspection of wafer faults, many other mechanical engineering problems may exist where small faults have to be recognized in a large amount of data as well as also surely in domains outside mechanical engineering. Moreover, future work can cover improvement for series production, or an application-specific optimization of the imagery system. The imagery system is currently standard and can be certainly enhanced and optimized for the current application. and faulty (•) streets. The notation of the figure is identically to Fig. 7. The wafer images were again scaled down to 500 × 500 pixels to protect the intellectual property.  Fig. 8. The wafer 10 is not available as a whole image, hence the wafer is not displayed here. We have only been provided single chip images.