A binary classifier based on a reconfigurable dense network of metallic nanojunctions

Major efforts to reproduce the brain performances in terms of classification and pattern recognition have been focussed on the development of artificial neuromorphic systems based on top-down lithographic technologies typical of highly integrated components of digital computers. Unconventional computing has been proposed as an alternative exploiting the complexity and collective phenomena originating from various classes of physical substrates. Materials composed of a large number of non-linear nanoscale junctions are of particular interest: these systems, obtained by the self-assembling of nano-objects like nanoparticles and nanowires, results in non-linear conduction properties characterized by spatiotemporal correlation in their electrical activity. This appears particularly useful for classification of complex features: nonlinear projection into a high-dimensional space can make data linearly separable, providing classification solutions that are computationally very expensive with digital computers. Recently we reported that nanostructured Au films fabricated from the assembling of gold clusters by supersonic cluster beam deposition show a complex resistive switching behaviour. Their non-linear electric behaviour is remarkably stable and reproducible allowing the facile training of the devices on precise resistive states. Here we report about the fabrication and characterization of a device that allows the binary classification of Boolean functions by exploiting the properties of cluster-assembled Au films interconnecting a generic pattern of electrodes. This device, that constitutes a generalization of the perceptron, can receive inputs from different electrode configurations and generate a complete set of Boolean functions of n variables for classification tasks. We also show that the non-linear and non-local electrical conduction of cluster-assembled gold films, working at room temperature, allows the classification of non-linearly separable functions without previous training of the device.


Introduction
Human brain can efficiently retrieve information from limited or noisy inputs with extremely low power consumption and significantly outperform digital computers in tasks such as image recognition, linguistic comprehension, abstract reasoning, classification [1][2][3]. The performances of digital computers are affected by the time and energy spent moving data between the memory and the processor units (von Neumann bottleneck) [4][5][6], whereas brain architecture is based on massive parallelism, combination in the same hardware of data processing and memory storage functions, self-learning, and adaptive capabilities [2].
Multi-scale connectivity is recognized as one of the fundamental aspects defining the brain performances [1,2], however the structure and the mechanism underlying the spatio-temporal connectivity are far from being completely understood [3,7,8]. Major efforts to reproduce the brain performances in terms of classification and pattern recognition have been focussed on the development of the so-called 'neuromorphic systems' in order to overcome the limitations of von Neumann architecture and to match the efficiency of biological systems [9][10][11][12][13][14]. Among a wide variety of approaches, a predominant position is occupied by artificial neural networks (ANNs) for their capability of performing tasks such as pattern recognition with high efficiency and low energetic costs [15][16][17][18]. They consist of large arrays of non-linear devices, like memristors, that emulate the functioning of neuronal synapses [14,15,17]. In biological systems, a neuron fires only if the total weight of the synapses that receive pulses in a short period (period of latent summation) exceeds a threshold [2]. One of the most explored hardware solutions to obtain a neuron-like behaviour is the perceptron [19]: a single node ANN with adjustable synaptic weights, designed specifically to implement a logic operation [15,19,20]. The perceptron produces a binary output by thresholding the weighted sum of the inputs using a well-defined association between the weights and the corresponding inputs due to the discreteness of the elements determining the weights [19]. The system can associate to inputs a binary value, acting as a binary classifier [13,15,19]. If the classification task is carried out on sets of only two elements, the perceptron behaves as a Boolean function generator [19]. In other words, the perceptron is an abstract model that can be employed to build devices to implement different Boolean functions (or truth tables) [19].
A single layer perceptron can be used only for the generation of linearly separable Boolean functions (see the XOR problem for the single layer perceptron in [13,19]) and this limits drastically the range of its use [19]; a neural network composed by two or more layers (multilayer perceptron) can process non linearly separable functions and thus perform very complex computations [13]. The use of a multilayer perceptron configuration requires the development of complex and often time-consuming training algorithms together with the identification of a suitable physical implementation offering simple integration process, energy saving, and high precision [21,22].
Major efforts have been concentrated on the development of suitable hardware to emulate synapses, which are the most numerous processing elements in ANNs [22]. Memristors have been proposed for the physical realization of the perceptron as synaptic weights [15,20,23]. In general the use of memristors represents an interesting possibility for the fabrication of systems able to encode synaptic weights directly in their conductance and thus achieve substantial speedup and power reduction compared to standard digital hardware [15,24]. Complex ANN based on perceptrons organized in crossbar array configurations [25] or with a single-memristor-layer input, using back-propagation algorithms, have been reported [15,24].
In the last decade, networks consisting of a large number of non-linear nanoscale junctions have been considered [9][10][11][12]40]: in these systems, obtained by the self-assembling of nano-objects like nanoparticles and nanowires [12,40], the 'deterministic' structure of microelectronic circuits is replaced by the complex connectivity of nano-objects with non-linear conduction properties characterized by spatiotemporal correlation in the electrical activity, in analogy with the brain structure [10,11,41]. This behaviour emerges from the presence of high density of non-linear and recurrent junctions formed at the nano-scale during the fabrication process [11,40,41]. Examples of such networks are those based on atomic switches, nanoparticles, or nanowires [9,12]; in particular nanowire networks have shown long-term connectivity retention [40], hierarchical collective dynamics [10], and heterosynaptic plasticity [21,42].
Recently we have shown that nanostructured Au films fabricated by the assembling of gold clusters produced in the gas phase have a complex resistive switching behaviour [43][44][45]. They recurrently and discretely explore resistance states which depend on their structural features (average thickness, resistance value reached on the percolation curve) [45,46]. In general their electric conduction properties are deeply affected by the extremely high density of grain boundaries resulting in a complex network of nanojunctions [45][46][47][48]. The observed non-linear electric behaviour is remarkably stable and reproducible allowing the exploration of well-defined resistive states [45,47].
Here we investigate the possibility of generating Boolean functions with a multielectrode device exploiting the properties of cluster-assembled Au films interconnecting a generic pattern of electrodes. This device, which can be viewed as a generalization of the perceptron, receives inputs from different electrode configurations and Figure 1. (a) Schematic representation (not to scale) of a multi-electrode device and of its fabrication process. From left to right: a scheme of a multi-electrode device consisting of one vertical cluster-assembled film stripe connected to six electrodes through three horizontal cluster-assembled film stripes is shown. The PMCS, where clusters are produced and extracted through a supersonic beam, the stencil mask used to obtain the desired pattern and the geometry of the electrodes pre-deposited on the substrate. (b) SEM image of a cluster-assembled film deposited on an oxidized silicon substrate (scale bar 50 nm). Note that the film is continuous. act like a binary classifier without a previous training process. We will also show that the non-linear and nonuniform electrical conduction of cluster-assembled gold films allow the generation of non-linearly separable Boolean functions.

Materials and methods
Multi-electrode devices based on nanostructured Au films were fabricated by a supersonic cluster beam deposition apparatus [49] equipped with a pulsed microplasma cluster source (PMCS) that allows the production of neutral clusters in gas phase as described in details in reference [49][50][51] (figure 1). Briefly, the PMCS principle of operation consists of the ablation of a gold target by a plasma ignited during the injection of a high-pressure pulse of argon. The species resulting from the target ablation condense through collision with the argon gas forming Au clusters, then the cluster-gas mixture is expanded through a nozzle resulting in a supersonic seeded beam [51]. The cluster beam is focussed by an aerodynamic lenses system [51] and directed on silicon substrates where a silicon oxide layer has been previously formed by thermal annealing (figure 1). The substrates are equipped with gold electrodes deposited by thermal evaporation.
Gold clusters are deposited on the surface using a stencil mask as shown in figure 1(a). A digital multimeter connected to the substrate electrodes allows the in-situ characterization of the evolution of the electrical resistance of the cluster-assembled film during the deposition. This, together with a quartz microbalance, that periodically monitors the amount and the rate of deposited material and makes an estimation of the film thickness, allows the precise recording of the evolution of the film resistance with thickness [44]. In figure 1 a scheme of the fabricated device is shown, consisting of six electrodes connected by a cluster-assembled film shaped as a vertical stripe and three horizontal one. The films used in this work are continuous and have a thickness of about 20 nm. In figure 1(b) a SEM image of a cluster assembled film 23 nm thick is reported. The image shows a fully connected morphology with a granular structure resulting from cluster assembling.
The characterization of the electrical conduction properties of multielectrode devices has been performed by taking current-voltage curves from different couples of electrodes with a voltage ramp from 1 V to 20 V. Each ramp step is increased by 1 V applied for 100 ms, the voltage is ramped up and down of the entire interval for 10 times.

Electrical and structural characterization
The current-voltage curves obtained for three different electrode couples are reported in figure 2. We observe non-linear I-V curves with slopes that strongly increase for voltages higher than 10 V. The resistance undergoes discrete and reversible jumps resulting in a hysteretic behaviour. We identified a threshold voltage, usually higher than 5 V, beyond which the resistance switching activity of the film can be triggered [45].
This behaviour corresponds to what we observed for two-terminal devices based on continuous clusterassembled Au films that show complex and reproducible resistive switching, potentiation, and a general memristive-like character [44,45]. In the case of a multielectrode device, one can inject current from a particular electrode couple and check the modification of the resistive switching behaviour induced for all the other electrode couples connected to the film [10,42].
The non-linear I-V features reported in figure 2 suggest that non-local effects may be present as reported in similar systems based on nanowires networks [42]. In order to confirm this, we applied to the different couples of electrodes an over-threshold voltage train pulse (25 pulses, 500 ms width) to trigger the film modification, then a subthreshold signal of 1 V is employed to check non-local effects by testing all the different electrode couples. The sub-threshold train is composed of 15 pulses with width 50 ms, following a protocol schematically shown in figure 3(a). The resistances of four different electrode couples as function of the measurement points, after the application of an over-threshold signal to electrode couple 1-C, are shown in figure 3(b). The applications of over-threshold signals are indicated by green dashed lines.
The onset of resistive switching is visible in the resistance patterns measured at different electrode couples 1-A, 1-C, 2-A. Note that the electrode configurations having in common at least one electrode with the electrode couple 1-C show switching events (see electrode couples 1-A and 1-C in figure 3(b)). A non-local reorganization of the nanostructured film causing a reshaping of the flowing current through a nanojunction network is evident. In fact, the over-threshold signal applied on electrode couple 1-C causes also resistance changes elsewhere, in electrode couples that do not share an electrode with 1-C, like couple 2-A as shown in figure 3. The modification of the non-local electrical properties between any given pair of electrodes is related to the overall response of the network to external stimuli resulting in the analogue of heterosynaptic plasticity [42]. For the sake of completeness, in appendix A the resistance changes measured for all electrode couples are reported ( figure 11).
Film geometry and thickness can be varied in a wide range without affecting the overall behaviour. We fabricated six different cluster-assembled films with thickness ranging from 15 nm to 25 nm, all sharing the same complex behaviour. Moreover, electrical characterization performed after several months of storage in ambient conditions did not show significant departure from the as-deposited behaviour, confirming the reliability of these systems.
The non-linear electric behaviour and, in particular, the non-local effects in cluster-assembled Au films are related to nanoscale structural change of the network characterized by the presence of an extremely high density of defects, dislocation, and grain boundaries typical of cluster-assembled films [45][46][47]52], as shown in figure 4(a). Structural inhomogeneities correspond in variation of the local resistance at the nanoscale: numerical simulations [48] suggest that scattering phenomena through grain boundaries under a flowing electron current can cause the formation of 'hot' spots with a high local temperature compared to regions at low resistance where the temperature is lower.  Schematic representation of a granular film resulting from the self-assembling of clusters on the substrates. Randomly oriented crystalline domains are represented by different colours, with thick grain interfaces (red boundaries) and interstitial voids between grain. (c) Schematic view of a single grain boundary, in three different stages of atomic rearrangement induced by current flowing through it. Green and orange atoms represent two different crystalline structures, violet ones represent atoms near grain boundary. Snapshot 1 represent a hypothetical starting atomic configuration. In snapshot 2, a transition to a higher conductivity state due to rearrangement to a more ordered configuration of the atoms at the interface is shown. Snapshot 3 shows a transition to a lower-conducting state; this could be ascribed to phenomena like local melting (adapted from [14]). (d) In situ HRTEM imaging of the evolution of the film during thermal annealing from 50 • C to 90 • C.
This causes defect migration, grain boundaries modification and annealing, nanoparticle internal reorganization that take place at different temperatures due to the different nanoparticle dimensions and structure [53][54][55] (figures 4(b) and (c)).
The variation in local temperature distribution makes the system to explore different configurations where higher and lower conductivity regions dynamically evolve with annealing and re-establishing of defects (figure 4(c)) [14]. An active spot is identified with the interface between two nanoparticles (figure 4(c) left). A transition to a higher-conductivity state via defect migration (top right); from that, a lower-conducting state is reached because of local melting (bottom); finally, the original interface is rebuilt (top left) due to the interaction with the surrounding nanodomains that do not participate in the transition (inactive spots, which The central units perform the weighted sum of the inputs (θ is an external constant bias) and the thresholding process to obtain a binary value as output. (b) Schematic model of an input-dependent and distributed weight device. The rectangular region implements the distributed weights w = (w 1 , . . . , w N ) through a non-local and correlated weighting process on the signals coming from the inputs. The sum of the weighted signals is performed by the adder Σ and the result is given as input to function F to implement the thresholding process and obtain a binary output.
surround the active ones). These effects cause a continuous redistribution of the flowing current through the complex network of nanojunctions resulting in the observed resistive switching phenomena [48]. Figure 4(d) shows the in situ HRTEM imaging of the effect of heating on a cluster-assembled Au film. In the image taken at 50 • C the white arrows indicate grain boundaries, at 70 • C the crystalline structure rearrange locally: the structural changes with respect to what observed at 50 • C are then indicated by blue arrows (transformation towards a more ordered structure, i.e. enlargement of crystal domains, decrease and/or disappearing and/or rearranging of grain boundaries, disappearing of defects, etc). Conversely, the red arrows indicate the points where the local structure underwent a change that made it more disordered. The same comparison is done on the image taken at 90 • C. These data suggest that the film rearrange on the nanoscale, upon heating, by the creation and destruction of ordered and disordered regions corresponding to different local electrical resistances [47]. It should be noted that we induce these modifications by heating uniformly the whole film. This means that the most evident local rearrangements/modifications depend on local barriers of energy. This effect is predominant for the heating induced by current flow, which is inherently local. The presence of defects such as grain boundaries in low-dimensional metallic structures has been recognized as a major cause of the substantial increase (up to several orders of magnitude) of the electrical resistance compared to the corresponding bulk value [56][57][58]. Local temperature increase up to several hundreds of degrees has been reported in gold nanostructure under the circulation of currents typical for the operation of electronic circuits [59][60][61], the local rearrangements induced by grain boundary motion and atom displacement causes switching in the electric resistance [59,62]. The correlation between the different junctions between nanocrystalline domains causes the observed electrical behaviour [10,45].

Exploiting non-local effects: from the perceptron to the receptron
In this section we elaborate about the possibility of exploiting the non-local response to external input signals and the non-linear conduction properties of a network of electrical junctions to fabricate a device performing classification of the inputs as in the case of a perceptron, implementing a weighting process of the input signals. Figure 5(a) reports a scheme of the perceptron architecture [19]: the weights associated with each input are independent and can be individually adjusted to give the desired output. The hardware of the weight units can consist of independent memristors [15]. The thresholding of the obtained value results in a binary output that allows the implementation of a classification task [19].
A scheme of a possible generalization of the perceptron model is proposed in figure 5(b): the weights are not univocally related to a single input. In such scenario, the hardware can consist in a network of highly interconnected memristive units such as nanowire or nanoparticle non-linear junctions regulating their connectivity and the topology of conducting pathways depending on the input stimuli [10,42].
As a consequence the weights are not localized and uniquely determined: if one considers a multielectrode configuration ( figure 5(b)), the weights w 1 , . . . , w n between any given couple of input and output electrodes are regulated by the global response of the network to inputs x 1 , . . . , x n . The weights are functions of a convolution of the spatial location of the input electrodes (input topology) with the conducting path topology of the network so that the device maps the weighted inputs output value F Σ . From this point of view, the perceptron constitutes a particular case where the weights are independent w 1 ( The generalization of the perceptron described above and based on a system where the modification of the weight between a couple of electrodes determine also the rearrangement of the weights between other electrode couples, can be translated in a device made of a generic pattern of electrodes interconnected by cluster-assembled Au film. As the perceptron, this device can be used as a binary classification tool that can map the inputs from different electrodes in two possible sets labelled by two symbols, 0 and 1. If the inputs are also binary, the device can be employed as a Boolean function generator [63]. We call this device a 'receptron'.

Fabrication and test of the receptron
As we experimentally demonstrated, cluster-assembled Au films consist of a complex network of nanojunctions formed during cluster deposition with a non-linear, plastic response to external electrical stimuli. Hence, the electrical resistance depends on the topology of the electrical pathways resulting from the formation and ruptures of nanojunctions due to nanoscale structural rearrangements occurring under current flowing [45,48]. The multi-electrode films show a correlated activity for different electrode couples that can be modified by applying an over-threshold voltage to alter the resistance of different film regions. Figure 6 shows the scheme of a three input (3-bit) receptron fabricated by connecting with a nanostructured Au film three couple of electrodes. On the left, three relays connected to electrodes 1-2-3 can be switched between the voltage source or open circuit. On the right two relays connected to electrodes A and C can be switched between ground and, respectively, inverting and no-inverting input of an Op-Amp. A standard operational amplifier, TL081, is used in the present work. The Op-Amp is used in the difference amplifier configuration, with the feed resistance R f between output and inverting input that has the same value of the resistance connected to inverting input and ground.
The voltage output is proportional to the difference of the output currents I 1 and I 2 flowing through electrodes A and C [64]. Electrode B is not used. The voltage output V out of the device is related to the difference of the input currents I 1 and I 2 following the relation: R f is the feedback resistance as shown in figure 6.
In order to use a receptron (and also a perceptron) as a binary classifier, it is necessary to read an input signal, to change the weights for every set of inputs, and to use a thresholding procedure of the obtained readings to generate a binary output that allows the implementation of a classification task [19]. To exploit the receptron as a Boolean function generator, we used a protocol consisting of two main steps: the input reading step and the weight change step (writing step). In the reading step, the electrodes 1, 2 and 3 are the input electrodes ( figure 6), whereas the electrodes A and C are connected to the op-amp and the voltage source is maintained to 1 V. The input logic 0 is a high impedance state (open relay in figure 6), while the input logic 1 is a low impedance state (closed relay in figure 6), the device output is the voltage V out of the op-amp; by imposing a threshold, we obtain a digital output. V out can be read for each input configuration, hence the Boolean device is completely defined associating a binary value, obtained after a thresholding process, to each input configuration (for example 0-0-0, 1-0-0, ...). The threshold process consists in a binarization of the voltage outputs through a suitable band threshold. Output values inside this interval band are associated with logic value 1; otherwise, it results the logic value 0. The output function can be read several times, since the reading procedure does not modify the weight distribution of the device.
We remark that the non-linear electrical properties of the cluster-assembled film prevent the linear superposition of the outputs: for example, the output voltage value for the configuration 110 is not simply the sum between the voltage outputs for 100 and 010 inputs. This gives the possibility to explore different output values in one writing process. It is thus possible to perform a random search for the desired output through iterative writing steps which will eventually lead to the realization of the desired solution.
The modification of the weight distribution is obtained through the writing step: in this case electrodes 1, 2 and 3 as input while A and C are grounded. We then apply a series of voltage pulses above the threshold voltage to induce modification in the conduction path of the film (see figure 3). We remark that non-local effects observed in electrical behaviour of cluster assembled films allow to modify simultaneously the resistance among different electrode couples and so to implement different sets of weights for the same writing process. Since the cluster-assembled film has a non-local response to the application of an over-threshold voltage, the output currents I 1 and I 2 depend on the number of the applied writing steps: where V 1 , V 2 , V 3 state for the voltage applied to electrode 1, 2 and 3 (input electrodes in figure 6) and n states for the nth applied over-threshold signal. After each writing step, a reading step can be carried out for each input configuration to check the voltage output obtained after the weights re-organization. Figure 7 schematically shows an example of two reading steps for the input configuration 1-0-1 separated by a writing step. At the beginning the device has a certain weight distribution and this determine the output current I 1 and I 2 . The output V out1 can be digitalized and, by defining a threshold, one obtains a Boolean function. The result can be compared to a target function in order to achieve the desired result. If the target is not achieved, a writing process is performed in order to change the weight distribution and then a new reading step is executed providing a different voltage output V out2 that can be again compared with that of the target functions.
We tested devices fabricated with nanostructured films with an average resistance between different electrode couples higher than 100 kΩ using over-threshold pulses with amplitude between −35 V and 35 V and width between 0.1 and 0.5 s. The number of pulses for one single train varied between 20 to 100. During the pulse application, the relay on electrodes A and B are connected to ground (see figure 6) and the selected input electrodes are connected to the pulse generator. Different combinations of the input electrodes were tested during the writing step to evaluate the possible ways of implementing the sets of weights: the pulses were applied to all the combinations of electrode input (1, 2, 3, 1-2, 2-3, 1-3, 1-2-3, refer to figure 6) with electrode A and C connected to ground. Figure 8 shows the typical outputs of the device obtained following the protocol shown in figure 7. One writing step was applied to electrodes '1-2-3' using a train of 10 V pulses (0.5 s width): the differences in the output voltages for the different inputs are clearly visible. Each output is obtained from three consecutive reading measurements, to check the stability of the voltage outputs.
Since the thresholding process imposed on the voltage output, together with the non-local effects of a writing process, limits the output explored by the device, a random search protocol could be advantageous to efficiently generate the desired Boolean functions. A random search strategy has been proposed for neural network models based on the analogy with the immune system [65] and for hyperparameter optimization [66]. In general, as suggested by A. Turing [67], random search is advantageous compared to a systematic approach since the latter may explore an enormous block without any solutions in the region which has to be investigated first. In the case where there is a very large number of configurations (current pathways, in our case) that can generate a favourable weight distribution, the random method seems to be better than the systematic one [67]. We remark that resistive switching activity of cluster-assembled Au films have an intrinsic extremely large number of explorable conductivity levels [45]. Typical receptron read-write-read protocol. During the reading step 1, output currents at the electrodes A and C of the cluster-assembled film are the result of the local resistance of each film region that act like a weighting process on the current distribution flowing though the film (coloured lines). The different colours represent different implemented weights. The device in the reading step for input configuration 1-0-1 gives as output the voltage V out1 . After reading a writing step is executed: an over-threshold signal is applied to electrode 1, A and C are grounded. The red crosses indicate the regions that can alter their local resistance and cause the current redistribution in the cluster-assembled film. The reading step 2 is affected by a new set of distributed weights and the flowing currents reorganize in new paths and intensities. The output currents at the electrodes A and B are different from reading step 1 and this gives a different device output V out2 .

Boolean function generation with a random search protocol
We apply a random search protocol, consisting of several writing processes, alternated with reading processes, to evaluate the device performances as Boolean function generator.
During this phase of characterization of the device, the voltage outputs, obtained after several writing steps, are stored in a computer. A thresholding process is then performed at a software level. A MATLAB routine identifies the threshold value that generates the maximum number of Boolean functions after all writing steps were applied. This gives the possibility to gain a deeper understanding about the working principles of the devices and the effects of the thresholding process on the generated functions.  Figure 9 shows different examples of obtained Boolean functions following the thresholding process imposed to different reading steps. Panels (a) and (b) in figure 9 show two particular logic gates, respectively NOR and NAND, among those obtained by one receptron for the same threshold value after the application of 100 writing processes, following the random search protocol. Panel (c) shows the XOR function obtained by a single receptron with a different thresholding process. We highlight that the function shown in figure 9(c) is equivalent to XOR for a two-input device (input electrodes '1' and '3') (see inset figure 9). This is of particular interest since it demonstrates that a non-linear separable function can be generated by a single device. Moreover, the chosen threshold values are noise tolerant since they are well far from the error bars of the reported example.
In view of the use of the receptron as a common Boolean operation device, methods for the auto-tuning of the thresholding process are currently being explored. A possible strategy is to use processes similar to those for grayscale thresholding of rgb images [68]: threshold values can be selected analyzing the statistical properties of the distribution of a set of outputs preliminary recorded for this purpose in order to maximize a specific class of functions.
These results suggest that a receptron can be simply reconfigured to obtain new Boolean functions without a-priori knowledge of the correct weights to be implemented. Non-localities and spatial correlations typical of the re-organization of the nanojunctions of the cluster-assembled film [42], allow to implement different weight sets distributed on the cluster-assembled film in a single writing process. This means that, after few writing steps, in principle, an extremely large number of weights configurations can be explored to obtain a subset of all the Boolean function of an N-bit device.
We experimentally observed for 3 different devices (built with 3 different multi-electrode cluster-assembled films) that, after the application of 30-40 writing steps, the recorded voltage output can be used to generate up to 10 different 3-input Boolean functions (threshold selected in the phase of data analysis and fixed for all the output voltage). Among the implemented logic gates, NOR and NAND give the possibility to implement all the Boolean function by simple combination respectively of only NOR or only NAND gates.

Random search efficiency
In order to test the efficiency of Boolean function generation based on a random search protocol, we experimentally investigated the number of writing processes necessary to generate a complete set of Boolean functions. This is defined as a set of different functions that, linearly combined through simple operations (OR, AND, and XOR), can generate all functions of an N-bit device. As an example, we note that the set of the N-input functions with multiplicity m = 1 (the multiplicity m of Boolean function f is defined here as the number of ones assumed by the function output in the truth table) is a complete set, since a general function can be obtained through OR combinations. For a deeper discussion the reader can refer to appendix B.
We define the efficiency as the ratio between the total number of functions and the total number of receptrons needed to generate all the N-input functions: where C(i) is the number of receptrons needed to obtain the ith function through simple Boolean operations, and the numerator stands for the total number of N-input Boolean functions. This provides very interesting information about the completeness of a system since it corresponds to the number of receptrons necessary to realize a complete single-output Boolean system. In the case where a single receptron can generate all the functions, the expression in (3.4) gives the maximum efficiency ε = 1. If a single receptron generates only a partial subset of the total number of N-input Boolean functions then ε < 1.
As an example, we consider a receptron that can solve a complete set of functions with multiplicity m = 1. From equation (3.4) the efficiency is given by (3.5) The result expressed in (3.5) can be obtained considering that the number of functions with multiplicity m = 1 needed to obtain an N-input Boolean target function is equal to the multiplicity of the target function. In the case of 3-bit device, N = 3, the efficiency is equal to 0.25: this means that four receptrons are necessary to generate all the 256 3-bit functions.
We used a random writing protocol applying voltage pulses with a time width in the range of 0.1 to 0.5 s, voltages from −35 V up to 35 V, for 100 different writing processes, with the pulse train features described above, on different electrode couples. The duration of a single writing step is determined by the time period of the voltage pulses (max. 1 s) and the number of applied pulses (max 40).
We remark that, by fixing the threshold, we force the voltage output to fall inside or outside the intervals defined by the chosen threshold values, so to obtain a logic 0 or a logic 1. A Boolean function is completely defined by the number of ones and zeros in the output of its truth table (or rather, by its multiplicity). The probability of obtaining a Boolean function with a given multiplicity follows a binomial distribution as function of the multiplicity if the generated voltage outputs are random and statistically independent [69]. The protocol that we use for the generation of the outputs consists in random writing processes applied to the clusterassembled film. However, the non-local effects in the conduction mechanism in a multi-electrode film results in a correlated behaviour, characterized by the simultaneous changes in the resistance of different regions of the film (see figure 3). Therefore, the generated voltage outputs are not statistically independent and the device explores only a subset of the whole set of Boolean functions.
Since it is difficult to predict which functions are spontaneously favoured by the device, we evaluate the efficiency obtained by the experimentally generated set of outputs and we discuss aposteriori the effects of the non-localities and the thresholding process on the generated functions. Figure 10 shows how the efficiency evolves as a function of the number of writing steps. The efficiency reaches a value different from 0 after 80 writing processes and it stabilizes around 0.4. This means that few writing processes are needed to obtain a complete set of functions.
On the other hand, the thresholding process gives the possibility of changing the properties of the output functions in a rather intuitive way: if this value is close to the smallest output voltage recorded, the analog output values will typically lie above the threshold, thus the output multiplicity will be high. Vice versa, a high threshold value will boost the number of low-multiplicity functions as outputs since most values will stay below the threshold. This shows that a control over threshold value enables to tune the statistics of the random search protocol [66].
In order to further characterize the effect of the thresholding process and of the non-localities in electrical conduction of cluster assembled films, we evaluated the efficiency of the device for different threshold values. The efficiency was evaluated for sets of Boolean functions for different thresholds obtained maximizing the number of functions with a given multiplicity. In figure 10(b) we report the efficiency as function of the maximized multiplicity; the threshold values are shown in the figure labels. The results show that the efficiency varies in the range between 0.32 and 0.4. This suggests on one hand that device is robust against the choice of different threshold and a complete set is always generated. On the other hand, we note that the efficiency shows a dependence from the multiplicity of the generated function. The device cannot generate randomly all the possible functions, but explores a particular region of the whole set of Boolean functions.
We also evaluated the maximum power consumption involved in the use of the device as the maximum power delivered by a single pulse applied during the writing. Considering that the maximum amplitude V of the applied voltage pulses is 35 V and the value of the resistance R is about 100 kΩ, the maximum dissipated power P = V 2 R is of the order of magnitude of 10 mW. We are currently working to transfer the described hardware on microfabricated multielectrode silicon platforms where the area of the cluster-assembled gold films is reduced of a factor of 100. This corresponds to a maximum dissipated power in the range of 0.1 to 1 mW. Note that our devices are working at room temperature and do not need cooling at low temperatures as in the case of classifiers based on a disordered dopant-atom network in silicon [67].
We remark that the use of nanostructured gold films allows to produce devices unaffected by oxidation upon exposure to ambient conditions, with a very high stability and reproducibility compared to systems based metallic nanoparticles prone to oxidation [70].

Conclusions
We demonstrated the fabrication of a device, named receptron, obtained by interconnecting a generic pattern of electrodes with a cluster-assembled Au film. The receptron can perform the binary classification of input signals, following a thresholding process, to generate a set of Boolean functions. We exploited the nanogranular structure of cluster-assembled Au films consisting of an extremely high density of nanojunctions. Correlations emerge among the electrical activity of different regions of the film under the application of an external electrical stimulus higher than a suitable threshold. The degree of correlation can be varied controlling the film geometry and the electrode configuration used as input and output. Figure 11. Electrical resistance evolution, plotted on semilog-y scale, for a multi-electrode device, for all electrode couples consisting of a left electrode (labelled by a number) and one right electrode (labelled by a letter) after the application of several over-threshold signals to the electrode 1-C. The dashed green lines indicate for the over-threshold voltage application, to the electrodes 1-C, whose value is indicated by the green label of each line. Green lines aim to aid the comparing the resistance levels explored before and after each voltage application on one electrode couple. The inset for each panel shows the multi-electrode device scheme; the red labelled electrodes are those related to the measured resistance.
The model of the receptron is a generalization of the perceptron: we demonstrated that the receptron is a reconfigurable Boolean function generator able to implement also non-linearly separable functions using a single device. A random search protocol is effective to obtain a binary classification of the input thanks to the exploitation of the extremely large number of conduction states typical of a complex network of nanojunctions. We also gave a quantitative estimation of the efficiency in using the same device as Boolean function generator. The structural properties of cluster-assembled films make the device reliable and fault tolerant against possible fabrication drifts.
Our results open new perspectives for the use of cluster-assembled metallic films for the fabrication of reconfigurable classification devices and for the use of the intrinsic properties of complex nanojunction networks to implement information processing systems. x 1 The graphs show different responses of each electrode couple resistance following the application of writing pulses to electrodes 1-C. The resistances of the couples that have electrode A in common show a strongly correlated behaviour. Although different resistance values are explored, the trend acquired after the writing pulses application is similar. Resistance measured at couples with one end in electrode C show a similar trend but with a slightly different trend (note different occurrences of switching in couples 1-C, 2-C, 3-C in figure 11). Resistance measured at couples with electrode B in common show a higher resistance, different from the other measured ones. This is attributed to strong alteration of the conductive path followed by the current flowing through electrode B.

Appendix B. Solution of singular functions in a receptron
In order to get a deeper insight into the peculiar features of the receptron we will consider and discuss in more detail the similarities and differences with the perceptron employed as a Boolean function generator.
The output of a perceptron is obtained by summing the weighted inputs as = w 1 x 1 + · · · + w N x N , where x 1 , . . . , x n are the inputs and w 1 , . . . , w n the weights, and by mapping Σ to the output value F(Σ), where F is the perceptron output function. At any input x 1 , . . . , x N , the corresponding weight is associated through training algorithms to update the weights until they produce the target output values [21,71].
Let f : B N → B = {0, 1} be Boolean functions of an N-dimensional input system and x the N dimensional vector of the binary inputs. A Boolean function f ( x) for an N-dimensional input system can be completely described by the truth table, that gives the binary output value associated to each of the 2 N input vectors x. The example given in table 1 is the function f(x 1 , x 2 ) that implements the XOR function for two-dimensional input system.
The multiplicity m of Boolean function f is defined here as the number of '1' values assumed by the function output in the truth table; for example, the function in table 1 has multiplicity m = 2. It is thus possible to classify the functions implemented by a perceptron by their multiplicity. We focus on a particular class, the singular functions. A singular function f s is defined formally as: where x 0 is one particular combination of the 2 N possible N-dimensional binary inputs x = (x 1 , . . . , x N ). The singular functions have multiplicity m = 1 (hence the name). Since the number of combinations of an Ninputs system is 2 N the maximum number of distinct singular functions will also be 2 N .
Singular functions are a limited subset of the whole Boolean functions set and they have interesting properties. They represent the minimum set of functions necessary to produce any Boolean function through simple binary linear combinations (OR operations): where k i are binary coefficients and f s i are distinct singular functions. Note that the multiplicity m of the function f corresponds to the number of the coefficients k i = 1 of the linear combination in equation (B.1). In addition, singular functions are useful in tasks like pattern recognition since they activate the perceptron only for a particular combination of the binary inputs [31]. The logic gate NOR shown in figure 9(a) is a particular example of singular function implemented by a receptron.
The existence of a set of weights that implement the singular functions for a generic number of input bits in a perceptron is provided by a theorem, that we name singular theorem and we report below.

Singular theorem: statement
Let P be a perceptron with N binary inputs (x 1 , . . . , x N ), s the threshold value of the output function and (w 1 , . . . , w N ) the synaptic weights, the perceptron activation occurs and it is singular (the multiplicity of the implemented function is equal to 1) when the following statements hold: Proof. Let (a 1 , . . . , a N  Equation (B.12) shows that the sum of any weighted inputs is less or equal to the threshold obtained with the sum of the weighted inputs (a 1 , . . . , a N ) that follow the hypothesis. This means that inputs different from (a 1 , . . . , a N ) will not active the perceptron. Furthermore, as    (a 1 , . . . , a N ). The activation is unique and occurs only for a particular combination (a 1 , . . . , a N ) of the inputs.
End of the proof.
As an example, we apply the singular theorem to a 2-bit input system. The singular function is solved by setting the perceptron weights in a deterministic way without the needs of iterative algorithms. One can assume that the perceptron weights should be determined to solve the singular function shown in table 2.
Note that the function in table 2 is singular since the activation occurs only for the particular combination (x 1 , x 2 ) = (1, 0). Following the hypothesis of the theorem in equations (B.3)-(B.5), we immediately write (w 1 , w 2 ) = (−ε, s) where ε > 0 is a constant and s > 0 is the perceptron threshold. Note that the singular theorem offers the possibility to know the correct weights deterministically, without the use of iterative algorithms.
In the receptron, the distributed weights make the system input dependent. This means that the weights w ST = (w 1 , . . . , w N ), whose existence is proved by the singular theorem, for a given singular function are not constants while changing the inputs as instead happens for a perceptron. In this condition the singular functions are again solved when the variation of the weights occurs in a particular region around w ST . Let us consider for example a 2-bit inputs system as reported in table 2. The singular theorem applied to the input (0, 1) defines the point W st in the weight-space as shown in figure 12. For a perceptron this point is a constant by changing the inputs. On the contrary, since in a receptron the weights varying by changing the inputs, the singular function is solved (for a receptron) if the weights remain in the dashed space regions D (0, 0), D (1, 0), D (1, 1) shown in figure 12 and corresponding to the inputs (0, 0), (1, 0), (1, 1), respectively.
More generally one can write that the singular function is solved in an input-dependent system when