TY - JOUR AU - Parra, Estefanía Alejandra Mora AU - Portero, Rubén Nogales AU - T., Moisés Toapanta AU - Martínez, Estefanía Monge AU - Castro, Santiago Vayas AU - Buenaño, Jeanette Elizabeth Jordán AU - Naranjo, Juan Escobar AU - Armas, Diego Gustavo Andrade AU - Durango, Rodrigo Del Pozo PY - 2026 TI - LSTM-Based AI Model for Sinkhole Attack Detection With Legal Basis in an Ecuadorian Public Institution JF - Journal of Computer Science VL - 22 IS - 3 DO - 10.3844/jcssp.2026.766.777 UR - https://thescipub.com/abstract/jcssp.2026.766.777 AB - Wireless Sensor Networks (WSN) are an essential component of the Internet of Things (IoT). However, their decentralized nature, data transmission over unencrypted channels, and the physical exposure of nodes make them especially vulnerable to attacks, among which the sinkhole attack stands out. This research aims to develop a machine learning–based model to detect sinkhole‐type attacks in wireless sensor networks, with the purpose of strengthening the security and resilience of a public institution. The deductive method was used to analyze the legal framework and technical background, and the experimental method was used for the design and evaluation of the detection model. The results obtained include an LSTM model trained on data from a network simulation conducted in Contiki with the Cooja simulator. The model achieved 98 accuracy, 96 precision, 97 recall, and a 96% F1‐score. It was concluded that this neural network based model offers a promising solution to enhance WSN security in IoT environments.