## 3 Methodology  
To obtain the \(F_{a}\) we will use a convolutional neural network, which has as input a time interval of the consumption of a house and provides an estimate of the state of activation of the equipment for each instant considered. The network architecture used, which we will call Temporal Pooling NILM (TP-NILM), is an adaptation and simplification of the network called PSPNet (Pyramid Scene Parsing Network) proposed by [PERSON] et al. in [51] for the semantic segmentation of images. The general scheme follows the classic approach to the semantic segmentation of images, in which we have an encoder, characterised by alternating convolution and pooling modules and which allows to increase the space of the features of the signal at the cost of its temporal resolution, and a decoder module which, starting from the obtained features, reconstructs an estimate of the activation status of the equipment at the same resolution as the original signal. To these is added a module called Temporal Pooling that realizes an aggregation of the features at different resolutions, generating a form of temporal context, that embraces long periods without losing completely the resolution in the description of the signal, for the purpose of an accurate reconstruction of the activation status. The network layout is shown in the Figure 1.  
Figure 1: Outline of the network architecture used. See text in Section 3 for details. The encoder is made of three convolutional filters alternated by max pooling layers, using a ReLU activation function, batch normalization downstream of the activations, and a dropout layer for regularization. The encoder reduces the time resolution of the signal by a factor of 8 and increases the signal components from a single aggregate power consumption value to 256 output features. The temporal pooling block is used to give context information to the decoding block, creating additional features for decoding through aggregations with different resolutions of the encoder output. The encoder output passes through four average pooling modules with different filter sizes, which reduce the time resolution and keep the number of features unchanged, followed by a convolution with unit filter size, which reduces the number of features to a quarter of the input ones. The result of the convolutions constitutes the input of a ReLU activation function, followed again by batch normalization. Finally, a linear upsampling is performed to obtain a temporal resolution at the output of the temporal pooling block equal to that at the output of the encoder. A dropout is also applied to the output to regularize the network. The context features obtained from this block are linked to the detail features obtained from the encoder, doubling the overall number of features in input to the decoder. The decoder consists of a transposed convolution layer with kernel size and stride equal to 8 that brings the temporal resolution of the signal to 1 min, while reducing the number of features. The activation function is still the ReLU. This is followed by an additional convolution layer with a unitary kernel size that maintains the time resolution and brings the number of output channels to the number of appliances being examined. A sigmoid function is used in the output and not a softmax layer as in the segmentation of the images, since while in the semantic segmentation of the images, each pixel is associated to a single class, in this case, for each time, several appliances can be simultaneously in operation. Operating in this way, the network performs a decomposition of all appliances at the same time. This should allow, in our idea, to obtain an encoder with more general convolutive filters and not specific for a particular type of appliance and therefore to improve the ability to generalize the neural network. The weights of the net are obtained via gradient descent optimization.