**5. Conclusions**

This paper proposes LDwA, a new deep neural network architecture for the NILM problem that features a tailored attention mechanism with the encoder–decoder framework to extract appliance specific power usage from the aggregated signal. The integration of convolutional layers and recurrent layers in the regression subnetwork facilitates feature extraction and allows to build better appliance models where the locations of relevant

features are successfully identified by the attention mechanism. The use of the proposed model for the regression subtask increases the network's ability to extract and exploit information dramatically. The proposed system is tested on two real-world datasets with different granularity, REDD and UK-DALE. The experimental results demonstrate that the proposed model significantly improves accuracy and generalization capability for load recognition of all the appliances for both datasets compared to the deep learning state-ofthe-art.

**Author Contributions:** Conceptualization, A.M.S.; Funding acquisition, V.P.; Methodology, A.M.S.; Software, A.M.S.; Supervision, V.P.; Validation, V.P.; Writing—original draft, V.P. and A.M.S.; Writing— review and editing, V.P. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by the gran<sup>t</sup> provided to Veronica Piccialli by ENEA in the collaboration agreemen<sup>t</sup> "Clustering di tipologie di abitazione per scegliere modelli di disaggregazione di consumi elettrici realizzati tramite reti deep" within the PAR2018 project. The APC was funded by the Department of Civil and Computer Engineering of the University of Rome Tor Vergata.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** The pre-processed data used in this study are available on request from the corresponding author.

**Conflicts of Interest:** The authors declare no conflict of interest.
