  The widespread integration of IoT devices has greatly improved connectivity
and computational capabilities, facilitating seamless communication across
networks. Despite their global deployment, IoT devices are frequently targeted
for security breaches due to inherent vulnerabilities. Among these threats,
malware poses a significant risk to IoT devices. The lack of built-in security
features and limited resources present challenges for implementing effective
malware detection techniques on IoT devices. Moreover, existing methods assume
access to all device resources for malware detection, which is often not
feasible for IoT devices deployed in critical real-world scenarios. To overcome
this challenge, this study introduces a novel approach to malware detection
tailored for IoT devices, leveraging resource and workload awareness inspired
by model parallelism. Initially, the device assesses available resources for
malware detection using a lightweight regression model. Based on resource
availability, ongoing workload, and communication costs, the malware detection
task is dynamically allocated either on-device or offloaded to neighboring IoT
nodes with sufficient resources. To uphold data integrity and user privacy,
instead of transferring the entire malware detection task, the classifier is
divided and distributed across multiple nodes, then integrated at the parent
node for detection. Experimental results demonstrate that this proposed
technique achieves a significant speedup of 9.8 x compared to on-device
inference, while maintaining a high malware detection accuracy of 96.7%.
