# Leveraging IoT and LLM for depression and anxiety disorders: a privacy preserving perspective

Mohammed Riyadh Abdmeziem, Amina Ahmed Nacer

<figure><img src="image_1.png" /></figure>

## To cite this version:

Mohammed Riyadh Abdmeziem, Amina Ahmed Nacer. Leveraging IoT and LLM for depression and anxiety disorders: a privacy preserving perspective. 2025. hal-05038835

HAL Id: hal-05038835

https://hal.science/hal-05038835v1

Preprint submitted on 18 Apr 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Leveraging IoT and LLM for depression and anxiety disorders: a privacy preserving perspective

Mohammed Riyadh ABDMEZIEM

Computer Science Department

Ecole Nationale Supérieure d'Informatique (ESI)

Algiers, Algeria

m_abdmeziem@esi.dz

Amina AHMED NACER

Computer Science Department

University of Boumerdes

Boumerdes, Algeria

amina.nacer@univ-boumerdes.dz

**Abstract**—Depression and anxiety disorders are among the most widespread and severely impairing mental health conditions worldwide, causing heavy personal and social consequences. Even if Large Language Models (LLMs) proved to be highly effective in supporting mental health, their current applications still lack contextual awareness and real time adaptability. The integration of Internet of Things (IoT) systems, which enable continuous monitoring of behavioral and physiological signals, can address these limitations and open the door to more dynamic and personalized assistance. In this paper, we present a comprehensive survey of existing research at the intersection of LLMs, IoT, and mental health, with a particular focus on depression and anxiety. We identify a gap in current state of the are where LLM-IoT integration remains underexplored for mental health use cases. To address this, we propose a three-layer architecture that supports context aware and privacy preserving support. We introduce a taxonomy of system functionalities categorized into prevention, detection, alert, and action. Furthermore, we analyze the security and privacy challenges introduced by this integration and discuss mitigation strategies based on, among others, differential privacy, blockchain and lightweight cryptography. Our findings clearly indicate the significant potential of IoT-LLM synergy in managing depression and anxiety disorders, provided that strong security and privacy safeguards are ensured prior to large-scale deployment.

**Index Terms**—Large Language Model (LLM), Depression, Anxiety, Internet of Things (IoT), Security, Blockchain, E-health

## I. INTRODUCTION

Mental health disorders, particularly depression and anxiety, are increasingly recognized as leading causes of global disability and disease burden. Depression is a complex psychological condition characterized by persistent sadness, cognitive impairments, and diminished interest in daily activities, whilst anxiety is characterized by excessive worry, heightened arousal, and an acute sense of unease, without an actual clear external threat. These disorders generally co-occur and affect individuals' personal and professional lives, contributing to social isolation, relationship breakdowns, poor academic performance, and reduced work productivity [29]. From an economic standpoint, the consequences are also severe, with depression alone costing the global economy hundreds of billions of dollars annually in lost productivity and healthcare expenditures [6]. Despite the availability of effective therapeutic interventions, a large proportion of affected individuals receive

inadequate or no treatment, primarily due to barriers such as stigma, lack of accessibility, or the high cost of care [42]. These issues drive the research community to seek for original, scalable, and personalized mental health support approaches that can operate beyond the constraints of traditional clinical settings.

Large Language Models (LLMs) has revolutionized natural language processing and shown promising results in various mental health applications. LLMs such as GPT, BERT, and LLaMA have been applied to assess psychological symptoms, provide conversational support, and establish diagnostics. For instance, Lai et al. [31] proposed Psy-LLM, a scalable system supporting multilingual psychological services, and Ignashina et al. [21] proposed LLM-based assessments for pediatric depression. Such approaches clearly highlight a strong potential of LLMs in mental health. Nevertheless, they are very limited in terms of contextual awareness. In fact, most existing systems remain static, relying on user input text or structured clinical data, without accounting for the user's physical environment, physiological state, or real-time behavior elements which are highly relevant for effective and responsive mental health interventions.

To address these limitations, the *Internet of Things* (IoT) constitutes a natural choice of technology for augmenting LLMs with real-world, context-aware data. IoT systems are based on connected sensors embedded in wearables, smartphones, and smart environments which can continuously collect data on a user's physiological and behavioral patterns. Such data ranging from heart rate variability, sleep quality, and physical activity to smartphone usage and environmental conditions can provide a detailed, real-time view of an individual's mental and emotional state. Integrating this type of data with LLMs augment them from static dialog agents into dynamic, personalized mental health assistants capable of delivering real time interventions, context-aware feedback, and proactive monitoring [28]. As an illustration, a sudden decline in sleep quality detected by a wearable sensor could prompt the LLM to suggest relaxation exercises or initiate a dialogue to assess mood and stress levels. Such synergy between IoT and LLM technologies establishes the basis for ubiquitous, ambient, and adaptive mental health care.
In spite of these promises, our comprehensive literature review reveals that the integration of LLMs and IoT in the context of mental health remains largely unaddressed. It is true that several approaches have been proposed in LLM applications for depression and anxiety, and others have been proposed on LLM enhanced IoT systems for general purpose applications such as smart homes [27] and industrial monitoring [36], but very few efforts have been made to bring these two paradigms together to address mental health challenges. In this paper, we state that this integration is not only feasible but also highly promising, particularly for mental disorders like depression and anxiety where real time context is highly relevant. Nonetheless, such integration brings its own new challenges, especially in terms of security, and privacy. The very sensitive nature of mental health data, in addition to continuous sensing and real time interaction, triggers serious issues related data leakage, user profiling, and unauthorized access. Addressing these issues is necessary to enforce the required ethical and security guarantess prior to large scale deployment.

This paper addresses the above research gap through the following contributions:

* We provide a structured and comprehensive review of existing work on LLMs and IoT in the context of depression and anxiety disorders.

* We highlight the lack of integrated architectures that combine the contextual sensing capabilities of IoT with the conversational intelligence of LLMs for personalized mental health care.

* We propose a novel three-layer architecture that incorporates perception, edge, and LLM layers, enabling real time, and context aware support.

* We define a taxonomy of functionalities including prevention, detection, alert, and action that classifies the eventual use cases applications.

* We explore the major security and privacy challenges that arise in these systems. Furthermore, we set future research directions based on recent advances in lightweight encryption, federated learning, differential privacy, and blockchain.

The remainder of this paper is organized as follows. Section II presents the definitions and impact of depression and anxiety disorders. Section III provides an overview of IoT, LLMs, and their integration. Section IV details the state-of-the art approaches, introduces our proposed system architecture, and presents a functional taxonomy for IoT-LLM systems in mental health. Section V discusses the main security and privacy issues along with potential solutions. Finally, Section VI concludes the paper.

## II. DEPRESSION AND ANXIETY DISORDERS

Depression and anxiety are two of the most prevalent mental disorders. They are different but present a high comorbidity. In the following, we provide a clear definition as well as an insight on their individual and societal repercussions.

### A. Definitions

Have you ever felt overwhelmed by the sense of immediate danger without any apparent reason? You may have experienced temporary anxiety. Trait anxiety is a general tendency to experience anxiety across different situations. It is defined as a physiological and emotional disturbance characterized by an acute increase in perception and anticipation of threats. The consequences of this state of mind can be severely negative on physical behavior and thoughts, leading to symptoms such as shivering, sleep issues, compulsiveness, indecisiveness, and memory problems. It is important to distinguish between anxiety and fear. The latter is a reaction to a perceived danger, while anxiety seems to originate from uncertainties about the future, self-esteem concerns, or difficulties in interpreting experiences [11].

Depression, on the other hand, is a psychological state characterized by persistent emotional, cognitive, and physical distress, often caused by deep sadness, loss of interest in usually enjoyable activities, and a sense of hopelessness. It is not merely temporary sadness. It can hinder the normal course of daily activities due to a wide range of symptoms, such as withdrawal, fatigue, and lack of concentration. Depression is considered a multifaceted psychological state that arises from the perception of a significant loss or the threat of such a loss. Indeed, it encompasses emotional, cognitive, behavioral, and physiological components. [13].

### B. Impact

Depression has significant personal and societal costs, affecting individuals' well-being and productivity. It is often linked with difficulties in education, employment, and personal relationships. [25] Patients with major depressive disorder are more likely to experience marital disruption, lower work performance, and reduced earnings [16]. Additionally, depression increases the risk of chronic physical illnesses and early mortality due to conditions such as cardiovascular diseases and suicide. Despite the availability of effective treatments, access to proper care remains unsatisfactory, with many individuals either not receiving treatment or receiving inadequate care [46].

Regarding its economic impact, depression creates a heavy burden on both individuals and society. It is a leading cause of disability worldwide and contributes to significant losses in workplace productivity due to absenteeism and reduced performance. Studies have estimated that the economic cost of depression in terms of lost productivity and healthcare expenses reaches billions of dollars annually. Furthermore, patients with premature depression are more likely to struggle with educational progress, which in turn limits their career prospects and financial stability. [22].

## III. IoT-LLM

### A. IoT

The Internet of Things (IoT) is a rapidly growing technological paradigm that connects physical devices to the internet,
enabling them to collect, process, and exchange data au-
tonomously. These devices, commonly known as smart devices
or IoT nodes, range from simple sensors and wearable gadgets
to complex industrial machinery, smart home appliances, and
autonomous vehicles. IoT devices rely on various networking
technologies such as Wi-Fi, Bluetooth, Zigbee, LoRa, and 5G
to facilitate communication.

An IoT system operates across multiple layers, including
the sensing layer, where devices gather data from their envi-
ronment; the network layer, responsible for transmitting this
data to cloud or edge servers; the processing layer, which
analyzes and interprets the information; and the application
layer, where insights and automation drive user-facing ser-
vices. These interconnected systems offer vast benefits across
industries, enabling automation, optimizing decision-making,
and improving operational efficiency.

For example, in healthcare, wearable IoT devices continu-
ously monitor vital signs and detect anomalies in real time,
while in smart cities, IoT-powered traffic monitoring systems
analyze congestion patterns and adjust traffic signals accord-
ingly. In industrial automation, IoT sensors assist in predictive
maintenance, identifying potential failures in machinery before
they occur. However, the sheer volume of data generated by
IoT systems presents challenges related to real-time process-
ing, security, and interoperability, necessitating the integration
of advanced artificial intelligence (AI) techniques such as
Large Language Models (LLMs) to enhance efficiency and
scalability [3].

B. LLM

Large Language Models (LLMs) are AI-driven neural net-
works designed to process, understand, and generate human-
like text. Built on deep learning architectures such as trans-
formers, these models are trained on extensive datasets, al-
lowing them to analyze complex queries, generate meaningful
responses, and even engage in reasoning and decision-making.
Their ability to comprehend and produce language makes them
highly effective in applications requiring natural language
understanding, contextual awareness, and predictive analysis.
[55]

LLMs have evolved significantly, with models like GPT
(Generative Pre-trained Transformer), BERT (Bidirectional
Encoder Representations from Transformers), LLaMA, and
Claude leading advancements in natural language processing.
These models are widely used in domains such as chatbots,
automated content generation, intelligent search systems, and
AI-driven assistants. Their capabilities extend beyond mere
text generation; they can summarize reports, extract insights
from large datasets, and even engage in interactive conversa-
tions. [49]

However, despite their strengths, deploying LLMs within
IoT environments presents unique challenges. IoT systems
often operate under computational constraints, network latency
issues, and stringent security requirements, making it difficult
to integrate resource-intensive AI models. To address these
limitations, researchers are exploring optimized LLM variants,

edge computing strategies, and lightweight AI models that can
function effectively in IoT ecosystems.

C. IoT-LLM integration

The integration of LLMs with IoT has the potential to enhance automation, decision-making, and user interaction, making IoT systems more intelligent and adaptive. By leveraging LLMs, IoT devices can process and interpret vast amounts of real-time data, facilitating seamless communication between humans and machines. This integration enables voice-controlled IoT interfaces, where users can interact with smart home assistants, industrial control systems, and healthcare monitoring devices using natural language commands [38].

Beyond user interaction, LLMs enhance IoT data processing by extracting meaningful insights from sensor-generated information. Traditional IoT systems struggle with unstructured data, but LLMs help categorize, summarize, and interpret sensor readings, anomaly reports, and event logs, making real-time decision-making more efficient. In industrial settings, for example, LLMs can analyze sensor data from factory equipment to predict potential failures, allowing for proactive maintenance and minimizing downtime [50].

Personalization is another key benefit of LLM-enhanced
IoT. By analyzing historical user behavior, LLMs enable
IoT systems to dynamically adapt to individual preferences,
adjusting environmental conditions in smart homes, optimizing
energy consumption, and automating repetitive tasks. Security
is another critical area where LLMs contribute by detecting
anomalies in network traffic, identifying potential cybersecu-
rity threats, and ensuring robust access control mechanisms.

Despite these advantages, integrating LLMs into IoT sys-
tems is not without challenges. Computational resource lim-
itations, real-time latency concerns, data privacy risks, and
power consumption constraints pose significant hurdles. Most
IoT devices operate on limited battery power, making it im-
practical to run large-scale AI models locally. Researchers are
addressing these issues through edge AI techniques, federated
learning approaches, and model compression strategies that
enable efficient, on-device AI inference [28].

D. Applications

The integration of LLMs and IoT is offering innovative
applications that push towards more automation, security,
and efficiency. In the following, some of the most impactful
applications:

* **Healthcare:** LLM-powered assistants analyze real-time patient data from IoT sensors to provide diagnostic insights, medication reminders, and emergency alerts. These AI-driven systems can improve chronic disease management and even assist doctors in clinical decision-making. In elder care, LLMs enhance fall detection and emergency response systems, ensuring timely interventions for at-risk individuals de2024assessing. In the following sections of the paper, we will focus on mental disorders, in particular, depression and anxiety.
* **Smart homes and cities:** In this context, LLMs facilitate advanced automation and resource management. Smart assistants can control home appliances, adjust lighting and temperature based on user behavior, and optimize energy consumption. In urban environments, LLM-enhanced IoT traffic systems analyze vehicle and pedestrian dynamics to improve traffic flow, reduce congestion, and improve public safety. Similarly, IoT-based surveillance systems integrated with LLMs can detect suspicious activity and trigger alerts [43].

* **Industry:** Predictive maintenance, process automation, and quality control can be envisioned in industry. In fact, IoT sensors in factories constantly track the status of equipment, and LLMs analyze the data to predict failures before they occur. This approach reduces downtime, and saves costs. LLMs also help automate supply chain operations, logistics optimization, and warehouse management [15].

* **Environmental monitoring:** in environmental monitoring, IoT sensors track air quality, water pollution, and climatic conditions. LLMs process this data to generate real-time environmental reports, weather trends, and assist disaster preparedness. For example, AI climate models can use IoT data to forecast wildfires, hurricanes, and extreme weather, allowing authorities to avert such occurrences [36].

* **Education:** In education, LLMs combined with IoT devices enable personalized learning. IoT sensor-based smart classrooms can monitor student engagement, and AI-powered chatbots provide online tutoring and assistance in real time. Similarly, learning platforms supported by LLMs can modify learning content for a student according to individual needs, improving comprehension and assimilation. In addition, students with disabilities (e.g. autistic patients) can also be assisted by the capability of LLM integrated to IoT such as customized training and interactive design [48].

In the following, we will focus on the utilization of IoT-LLM for depression and anxiety disorders.

## IV. IOT-LLM FOR DEPRESSION AND ANXIETY

IoT-LLM integration opens the door for a multitude of applications, including depression and anxiety assistance. Various studies have investigated the use of LLMs. However, relatively few have looked into the potential of IoT as a data source reflecting daily routines and physiological states via a range of sensors in, on, or around the human body. In fact, this synergy has the potential to interact with a patient for several purposes including prevention and detections of symptoms related to depression and anxiety disorders. In the following, we present an overview of existing approaches as well as a general architecture listing the main elements and their relationships, followed by a taxonomy categorizing the

different ways IoT-LLM integration can ease depression and anxiety disorders.

### A. State of the art

Recent advances in large language models (LLMs) pushed towards many possibilities in terms of mental health support and IoT integration. In fact, LLMs have been increasingly used to detect, assess, and even alleviate depression and anxiety symptoms. Besides, LLM integration with IoT infrastructures has shown promise for context-aware, personalized, and intelligent digital health applications. However, the current literature remains splited (see figure 1). Most research efforts focus either on using LLMs for mental health or on integrating LLMs with IoT for general purpose applications.

1) **LLM for depression and anxiety approaches:** Lai et al. [31] proposed an approach known as Psy-LLM, which leverages large language models (LLMs) to provide access to psychological support on a global scale. It introduces a multilingual pipeline that is based on LLMs for both triage (i.e. screening) and counseling purposes, aiming to address disparities in mental health care access. While the approach shows promise in terms of scalability, it does not incorporate continuous or contextual monitoring capabilities, which could be enhanced through the integration of IoT data. Moreover, Ignashina et al. [21] explored the application of LLMs in pediatric mental health assessments. Their work focuses on delivering supportive feedback and preliminary diagnostics for children experiencing depression. Similarly to the previous approach it lacks adaptability to dynamic or real-time contextual changes, even-though the age related focus is of an interest. A more data-centric approach has been proposed by Xu et al. [52]. Their approach aims for psychiatric symptom identification by applying LLMs to clinical notes. It provides valuable insights into patterns of depression and anxiety. However, its dependence on structured clinical documentation limits its effectiveness in non-clinical or informal settings.

Lan et al. [32] investigate the use of LLMs for detecting depressive symptoms based on social media activity. It showed high potential for early detection of mental health issues, though it raises significant concerns regarding user privacy and does not integrate with broader health data or sensor-based inputs. Going further, Ben et al. [8] took a different direction by analyzing the presence of anxiety markers within the outputs of LLMs themselves, essentially modeling anxiety from the perspective of the models. While this reverse approach is promising, its direct applicability to supporting human mental health remains uncertain.

2) **LLM-IoT approaches:** Xiao et al. [50] optimize prompt efficiency for generative IoT systems by reducing prompt lengths and enhancing LLM performance in resource-constrained environments. The proposed approach is highly relevant for efficient deployments, but
<figure><img src="image_3.png" /><figcaption>Fig. 1. State of the art</figcaption></figure>

it lacks a direct connection to mental health applications or user-specific personalization. Furthermore, King et al. [27] propose Sasha, an LLM-driven system for smart home automation that is based on contextual reasoning to achieve goal-oriented tasks. The system proved to be promising for supporting mental health via environmental control, even if this possible application has not been studied explicitly. On a different topic, Shen et al. [39] introduced IoTCoder Copilot, a development assistant that leverages LLMs to streamline code generation and system design for IoT developers. Despite its utility for technical workflows, the tool has limited applications for end-user interactions in mental health contexts.

Ferrag et al. [14] developed a lightweight, privacy-preserving BERT-based model aimed at securing deployments in Industrial IoT (IIoT) environments. The proposed approach optimizes resource usage while maintaining data privacy. Nevertheless, it does not address applications related to psychological support or mental well-being. A different insight on LLM-IoT integration can be found within Zong et al. [57] work. Indeed, their research provides a broad overview of both opportunities, and challenges of the integration of LLMs with IoT technologies, spanning various domains such as smart homes and autonomous vehicles. Albeit being comprehensive, their research does not address mental health scenarios specifically.

Our analysis point out the strong capabilities of LLMs in both mental health and IoT contexts. It is clear that LLMs have great potential in detecting and mitigating mental health disorders such as depression and anxiety. However, these systems generally lack contextual awareness and real-time adaptability. In contrast, IoT-LLM research has focused on optimizing efficiency, privacy, or automation without targeting mental health applications in particular. As shown in Table I, very few approaches propose a joint LLM-IoT architecture aimed at addressing mental health disorders. This gap stresses out the need for exploring integrated solutions. In the following sections, we propose an integrated architecture and a taxonomy that leverages both LLM and IoT capabilities to create a responsive, secure, and context-aware framework for depression and anxiety disorders.

## B. General architecture

The proposed architecture integrates Large Language Models (LLMs) with Internet of Things (IoT) devices to enable real-time monitoring and assessment of individuals suffering from depression and anxiety disorders. The architecture consists of three main layers (see figure 2):

1) Perception layer: This layer is responsible for collecting physiological and behavioral data from users through various IoT-enabled sensors. Physiological sensors monitor vital health metrics such as blood glucose levels, heart rate, sleep patterns, and skin conductance, providing insights into the user's physical well-being. These sensors can be embedded in wearable devices such as smartwatches, fitness bands, and health monitors. Moreover, environmental and activity sensors track movement through motion detection, GPS location for social interactions, and smartphone usage patterns, including screen time, communication frequency, and application engagement. These metrics are important to get an understanding of the user's daily habits and social behaviors, which are relevant indicators of mental health and emotional well-being. Gathering such data allows this layer to detect behavioral changes associated with depression and anxiety disorders.

2) Edge layer: This layer might take the form of a smartphone or any edge device which acts as an intermediary between IoT sensors and the LLM. This layer is involved in pre-processing the raw sensor data via filtering noise, extracting key features, and performing initial data analysis to detect potential signs of distress or irregular patterns in user behavior. In addition, it allows real-time interaction between the user and the LLM, offering conversational AI-driven assistance, mental health checks, and personalized recommendations. Relying on local processing, this layer enhances data privacy, reducing the amount of sensitive information sent to remote servers. Furthermore, it provides an intuitive interface where users can visualize their health data, track progress, and engage with personalized interventions such as guided breathing
<table><caption>TABLE I
COMPARISON OF LLM APPROACHES IN MENTAL HEALTH AND IOT DOMAINS</caption><thead><tr><td>Approach</td><td>Application</td><td>Category</td><td>Security/Privacy</td><td>Interaction Modality</td><td>LLM Usage</td></tr></thead><tbody><tr><td>Lai et al. (2023) [31]</td><td>Psychological service delivery at scale</td><td>LLM-Depression</td><td>Limited discussion on patient privacy</td><td>Conversational AI</td><td>Diagnostic and therapeutic assistance</td></tr><tr><td>Ignashina et al. (2025) [21]</td><td>Pediatric depression support</td><td>LLM-Depression</td><td>Not explicitly discussed</td><td>Medical interaction context</td><td>Assistive decision-making</td></tr><tr><td>Xu et al. (2025) [52]</td><td>Psychiatric symptom identification</td><td>LLM-Depression</td><td>Privacy-aware data processing</td><td>Clinical records</td><td>Symptom classification</td></tr><tr><td>Lan et al. (2024) [32]</td><td>Depression detection via social media</td><td>LLM-Depression</td><td>No focus on privacy</td><td>Social media data mining</td><td>Automated detection via LLMs</td></tr><tr><td>Ben-Zion et al. (2025) [8]</td><td>Model self-assessment of anxiety</td><td>LLM-Depression</td><td>Theoretical implications for model safety</td><td>Prompt-response based testing</td><td>Introspective and generative assessment</td></tr><tr><td>Xiao et al. (2024) [50]</td><td>Prompting IoT systems</td><td>LLM-IoT</td><td>No privacy mechanisms specified</td><td>Device-level prompt orchestration</td><td>Task generation and adaptation</td></tr><tr><td>Zong et al. (2025) [57]</td><td>General LLM-IoT integration</td><td>LLM-IoT</td><td>Limited focus on privacy</td><td>General-purpose IoT services</td><td>Embedded LLMs for automation</td></tr><tr><td>Shen and Zheng (2024) [39]</td><td>Copilot for IoT coding</td><td>LLM-IoT</td><td>Developer-centric design, minimal user data</td><td>IDE integration</td><td>Code generation</td></tr><tr><td>King et al. (2024) [27]</td><td>Smart home reasoning assistant</td><td>LLM-IoT</td><td>Context-aware but no deep security evaluation</td><td>Home automation agents</td><td>Reasoning and goal planning</td></tr><tr><td>Ferrag et al. (2024) [14]</td><td>Security of IIoT</td><td>LLM-IoT</td><td>Strong focus on privacy with BERT model</td><td>Security logs</td><td>Lightweight cyberthreat modeling</td></tr></tbody></table>

exercises, cognitive behavioral therapy techniques, or reminders for healthy routines. This layer thus bridges the gap between raw data collection and data processing through users interaction and engagement.

3) **LLM layer:** This layer represents the Large Language Model, which is trained on mental health data and advanced natural language processing techniques to assess and respond to user needs effectively. The LLM performs deep analysis on aggregated sensor data to identify patterns related to stress, anxiety, and depression, allowing for early detection of mental health risks. Depending on the application, the system can be based either on a general-purpose LLM adapted for health applications or on a specialized model fine-tuned on mental health datasets. This backend integrates multiple predictive models, including reinforcement learning and probabilistic inference, to generate highly personalized insights and recommendations based on the user's behavioral patterns and physiological responses. Moreover, this layer in conjunction with edge layer serves as a connection point for healthcare professionals, allowing them to access anonymized or user-consented data for clinical evaluation. If necessary, alerts can be triggered for professional intervention when severe signs of distress or potential mental health crises are detected.

## C. Taxonomy

LLM-IoT integration offers a wide range of possible applications against depression/anxiety disorders. We propose four different categories through which these applications might span (see figure 3 and table II).

<figure><img src="image_4.png" /><figcaption>Fig. 2. General architecture of IoT-LLM integration for mental healthcare</figcaption></figure>

**Prevention:** Prevention approaches focus on supporting the user's mental health and avoiding the emergence or escalation of anxiety and depression in a proactive manner. Within the proposed architecture, the LLM layer and edge layer collaborate to personalize and deliver preventive interventions. These may include wellness plans based on behavioral and physiological trends, reminders for healthy habits such as consistent sleep and
physical activity, or digital delivery of evidence-based practices like cognitive behavioral therapy techniques. The edge device ensures timely engagement by integrating these features seamlessly into the user's daily routine. Furthermore, mindfulness sessions or guided breathing exercises can be proposed during periods of mild stress, contributing to emotional resilience and long-term well-being.

**Detection:** Detection approaches rely on the synergy between IoT sensors, edge devices, and the LLM to monitor and analyze indicators of mental distress. The perception layer continuously collects a range of physiological and behavioral data including heart rate, sleep patterns, screen time, and social interaction frequency. The edge layer performs local processing to detect anomalies in real-time, such as disrupted sleep or sudden social withdrawal. The LLM layer performs deeper analysis by combining historical data with natural language inputs from user interactions, identifying emotional tone, sentiment, or cognitive distortions. Through this multi-layered detection process, early warning signs of depression and anxiety can be captured.

**Alert:** Once the system detects significant patterns that indicate a possible psychological distress, the alert mechanisms are activated. The edge and LLM layers work together to deliver contextualized notifications directly to the user's device, encouraging them to engage with recommended resources or adjust their behavior. As an illustration, if a user's physiological signals suggest acute stress, the system may suggest an immediate calming activity. In more serious cases, such as repeated expressions of hopelessness or strong behavioral variations, the LLM layer can escalate the alert to healthcare professionals, either anonymously or based on user consent. These alerts can be managed via thresholding mechanisms and probabilistic models to minimize false positives.

**Action:** Following an alert, a multitude of intervention actions adapted to the user's condition and preferences can be envisioned. These include engaging the user in real-time conversations with the LLM to provide emotional support or guidance, recommending self-care content such as relaxation techniques or journaling exercises, and proposing lifestyle adjustments derived from previous successful interventions. In more severe cases, the system can facilitate contact with healthcare providers through remote medical consultation or scheduling tools. Reinforcement learning models integrated into the LLM layer personalize these actions based on past user responses, continuously optimizing the support strategy. Finally, it is worth mentioning that actions can also be triggered through IoT devices such as temperature or lighting automatic adjustments.

<table><caption>TABLE II
TAXONOMY OF APPROACHES BASED ON SYSTEM FUNCTIONALITY</caption><thead><tr><td>Category</td><td>Goal</td><td>Involved layer (s)</td><td>Illustrative applications</td></tr></thead><tbody><tr><td>Prevention</td><td>Promote mental well-being and prevent onset of symptoms</td><td>Edge, LLM</td><td>Personalized wellness plans; guided breathing exercises; CBT techniques; behavioral nudges</td></tr><tr><td>Detection</td><td>Identify signs of depression or anxiety through data analysis</td><td>Perception, Edge, LLM</td><td>Vital signs monitoring; behavioral anomaly detection; language sentiment analysis</td></tr><tr><td>Alert</td><td>Notify user or health professionals about potential mental health issues</td><td>Edge, LLM</td><td>In-app alerts; risk-threshold-based notifications; escalation to clinicians</td></tr><tr><td>Action</td><td>Provide appropriate intervention to support the patient</td><td>Edge, LLM, Perception</td><td>LLM-based support chat; delivery of self-help resources; referral to human experts</td></tr></tbody></table>

<figure><img src="image_5.png" /><figcaption>Fig. 3. Proposed taxonomy</figcaption></figure>

## V. SECURITY AND PRIVACY RELATED CHALLENGES AND PERSPECTIVES

The integration of Internet of Things (IoT) devices with Large Language Models (LLMs) creates a strong synergy to support mental disorders healthcare. In particular, LLMs can process rich contextual and environmental data including voice, behavior patterns, and physiological signals, to detect early signs of depression or anxiety and provide adapted feedback, self-care recommendations, or escalate alerts to caregivers.

These systems rely heavily on continuous data flow from IoT devices such as smartwatches, mobile phones, sleep trackers, and different types of sensors. However, the very private nature of the gathered data makes security and privacy issues extremely relevant. Based on the architecture proposed in section IV, we identify two parts from which security issues might originate, namely IoT part and LLM part. In the following, we provide more details and table III summarizes our findings.
### A. *Originating from IoT part*

IoT systems are known to operate in heterogeneous, and resource-constrained environments. Devices usually are unable to ensure robust security properties due to cost and performance tradeoffs. When deployed in mental health applications, IoT devices collect data that is not only sensitive but also highly context-specific which make it an easy target to extract valuable information including mood patterns, physical inactivity, voice sentiment, or social withdrawal signals [3].

Attacks that compromise these data sources can affect diagnosis accuracy, trigger false alarms, or even lead to harmful interventions. Below, we explore the main IoT originated security issues and how they affect systems that integrate LLMs for supporting individuals with depression and anxiety.

### Data Confidentiality

In the proposed architecture (Figure 2), IoT devices transmit raw or semi-processed data to edge nodes or the cloud. Often, this transmission is implemented without appropriate encryption or access control mechanisms. In fact, these devices usually rely on outdated protocols or hardcoded credentials, exposing communication to eavesdropping or replay attacks. Attackers may intercept sensitive data such as heart rate trends, voice or daily activity logs [2].

Such breaches can allow unauthorized parties to reconstruct emotional states or private routines. This is especially dangerous in mental health contexts. Indeed, if private emotional data is exposed, patients may suffer from stigmatization.

Reducing the need for complex Public Key Infrastructure (PKI) in mental health IoT-based applications might be relevant. As an illustration, Identity-Based Encryption (IBE) simplifies key management by enabling encryption using unique device identifiers, and lightweight encryption algorithms like Elliptic Curve Cryptography (ECC) are now able to attain acceptable levels of confidentiality with reasonable computation overhead [41].

### Data Integrity

Attackers may aim to modify the collected data by IoT sensors during transmission or through firmware breach. Tampered data can generate false signals of improvement, decline, or crisis, confusing the LLM-based analytics. [26]

A user experiencing anxiety may receive false reassurance or no intervention at all if IoT data appear normal due to tampering. Likewise, false indicators may lead to unnecessary escalation or psychological stress due to misdiagnosis.

As a solution, blockchain technology appears to be an appropriate candidate to ensure data integrity by recording hashes of each sensor's readings on a distributed ledger. Secure boot mechanisms and code integrity ver-

ifications can ensure that firmware remains unaltered on deployment. Periodic synchronization with the distributed ledger can be considered as a balance between security and performance [47].

### Authentication

Relying heavily on the use of static keys or password-based authentication systems can make the IoT system susceptible to brute-force or spoofing attacks. Malicious devices can impersonate legitimate nodes and inject false data or act as eavesdropper nodes. [1]

A malicious node that is authorized to be part of the system and contribute to the construction of the aggregate emotional state of the patient will tend to contribute with misleading inputs. For instance, tempered data of a patient might indicate a state of calmness which does not reflect reality leading to underestimation of mental distress or incorrect feedback.

The implemented device authentication methods must be robust and lightweight at the same time. A promising approach resides in the use of certificate-less public key schemes and Physical Unclonable Functions (PUFs) to identify devices uniquely without relying on stored keys [9]. Furthermore, behavior-based trust models can also help detect malicious nodes and revoke their access dynamically [5].

### Privacy inference

Even when payload data is encrypted, metadata like transmission timestamps, packet sizes, or MAC addresses can still be used to retrieve private patterns through side-channel analysis. An attacker eavesdropping on an IoT device usage habits could infer sleep cycles, emotional irregularities, or patterns of social withdrawal [18].

This types of attacks could lead to situations where an attacker can infer information that might be used to harm the patient. As an illustration, a smart speaker's activity can be used by the attaker to detect that a patient engages more in therapeutic dialogues during depressive episodes, and exploit this behavioral data for blackmail or profiling. Differential Privacy (DP) can be considered into the data workflow of the IoT-LLM system to ensure that individual patient contributions cannot be traced back. In case gathered data is used within a machine learning collaborative application, Federated Learning (FL) can also be considered as it keeps raw data on the IoT device. [20].

### Denial of Service (DoS)

IoT systems are vulnerable to DoS and battery-drain attacks, where malicious attackers overwhelm devices with fake requests or commands, depleting their resources or causing crashes [24].

As a result of DoS attacks, during a depressive or anxiety crisis, system downtime could delay interventions. For instance, if a user's wearable sensor becomes unresponsive during a panic attack, the LLM might miss critical signals
and fail to trigger help mechanisms.

Lightweight Intrusion Detection Systems (IDS) adapted to IoT constraints, in addition to energy-aware firewalls and rate-limiting mechanisms, can identify unusual traffic behavior. Besides, edge computing can help offload tasks from the cloud, reducing dependency on network availability [19].

## B. Originating from LLM part

The integration of Large Language Models (LLMs) into mental health applications provides dynamic interactions through sentiment analysis, empathetic dialog generation, therapeutic suggestion, and real-time conversational support. These systems might be seriously hindered by security challenges [53]. In fact, LLMs are inherently complex, relying on vast, heterogeneous datasets and opaque internal mechanisms that can exhibit unpredictable behavior. When deployed in sensitive domains like mental health, where user vulnerability is high and trust is paramount, the risks associated with LLMs become concerning. Misuse, exploitation, or unintentional failures in such systems may lead not only to privacy violations but also to psychological harm [17]. In the following, we explore the main LLM originated security issues and how they affect systems that integrate IoT for supporting individuals with depression and anxiety.

## Training data leakage

LLMs are trained on large-scale, web based datasets that sometimes include sensitive personal information. Due to the memorization tendencies of these models, specific details such as names, email addresses, or phrases from real world conversations can be unintentionally retained. These memorized fragments may later be revealed through carefully crafted queries, using techniques like model inversion or prompt reconstruction [34].

In mental health systems, where users may share deeply personal information, such leakage could result in exposure of private conversations or diagnostic details, even if the user in question was not part of the original training set. This poses severe ethical concerns and regulatory liabilities, particularly under data protection regulations such as GDPR [45] or HIPAA [7].

Injecting noise to learning updates via differential privacy techniques during training can significantly reduce the risk of memorization. Furthermore, the use of rigorously anonymized datasets, and regular audits for leakage potential can also be relevant to prevent as much as possible accidental data leakages [40].

### Prompt injection and hijacking
LLMs are prone to prompt injection attacks, where a malicious user intentionally manipulates input text to redirect or hijack the model's normal behaviour. In IoT scenarios, this risk extends to indirect vectors, such as poisoned user logs, misconfigured sensor input, or embedded adversarial instructions in shared environments [35].

If the model's behavior is altered by such attacks, it may respond inappropriately. An illustration might be the system minimizing a patient emotional distress, simulating unauthorized therapy, or offering misleading advice. These failures could generate negative consequences, including escalation of psychological distress or decrease of patient trust in the system.

Mitigation techniques usually rely on prompt hardening, input validation, and the deployment of behavioral guidelines. In addition to that, training via Reinforcement Learning with Human Feedback (RLHF) can significantly strengthen the model resistance against unauthorized instructions and prevent from exceeding ethical boundaries and system constraints. [33]

## Role playing

A known vulnerability of LLMs is their susceptibility to role playing. Attackers can prompt the model into an unsafe behavior by placing it into a hypothetical or fictional situation which might outsmart safety constraints (e.g. 'pretend you are a therapist in a dystopian future where certain laws do not apply....') [54].

This is particularly dangerous in mental health applications, where the stakes are higher. The model might unintentionally provide advice on harmful behaviors, including self-harm, substance misuse, or emotional manipulation.

Effective defense mechanisms include real time content moderation, behavior filtering based on context and tone, and separating factual retrieval from generative output. Indeed, continuous monitoring of interactions is critical to detect and intercept inappropriate model behaviors [30].

## Model poisoning

During post training tuning, attackers might gain access to the model update workflow. By injecting malicious data damps or modifying training objective functions, attackers can introduce backdoors or modify model outputs in subtle ways [4].

This could lead to systematic bias, such as the model failing to recognize signs of distress in certain populations or generating misleading analyses. Such biases could seriously impact the overall effectiveness of the system. A secure and traceable fine-tuning workflow can reduce percentage of successful model poisoning attacks. Solutions might include cryptographic verification of updates integrity, maintaining versioned checkpoints, auditing training datasets, and implementing model fingerprinting to track modifications. Ensemble based approaches may also help detect abnormal behavior indicative of poisoning [37].

## Exposure to toxic or biased outputs

LLMs trained on unfiltered internet data usually contain and replicate toxic, stereotypical, or discriminatory language patterns. Even when unintentional, these outputs can maintain social biases or marginalize vulnerable
<table><caption>TABLE III
SUMMARY OF SECURITY ISSUES, IMPLICATIONS, AND SOLUTIONS IN IoT-LLM SYSTEMS FOR DEPRESSION AND ANXIETY DISORDERS</caption><thead><tr><td>Origin</td><td>Security Issue</td><td>Implications</td><td>Solutions</td></tr></thead><tbody><tr><td>IoT</td><td>Data Confidentiality &amp; Unauthorized Access</td><td>Leaks of emotional/behavioral data may lead to stigmatization or coercion</td><td>Lightweight encryption (e.g., ECC); Identity-Based Encryption (IBE) for simplified key management</td></tr><tr><td>IoT</td><td>Data Integrity &amp; Tampering</td><td>Misleading health assessments due to altered or forged sensor data</td><td>Blockchain for data integrity; secure boot; firmware attestation; periodic ledger synchronization</td></tr><tr><td>IoT</td><td>Weak Authentication &amp; Rogue Devices</td><td>Impersonated devices may inject misleading behavioral input</td><td>Certificate-less PKI; Physical Unclonable Functions (PUFs); behavior-based trust and access revocation</td></tr><tr><td>IoT</td><td>Metadata Leakage &amp; Privacy Inference</td><td>Inferred patterns (e.g., sleep, mood cycles) from network metadata</td><td>Differential Privacy; Federated Learning to retain raw data on-device</td></tr><tr><td>IoT</td><td>Denial-of-Service (DoS) Attacks</td><td>Loss of monitoring capability during user crises due to service unavailability</td><td>Lightweight IDS; energy-aware firewalls; rate-limiting; edge computing for resilience</td></tr><tr><td>LLM</td><td>Training Data Leakage &amp; Memorization</td><td>Exposure of sensitive dialogue fragments or diagnostic content</td><td>Differentially private training; rigorous dataset anonymization; auditing</td></tr><tr><td>LLM</td><td>Prompt Injection &amp; Instruction Hijacking</td><td>Model redirected to give unsafe or misleading responses</td><td>Prompt hardening; input validation; RLHF; behavioral guidelines</td></tr><tr><td>LLM</td><td>Jailbreaks &amp; Role-Playing Attacks</td><td>Unsafe responses (e.g., self-harm advice) triggered by fictional prompts</td><td>Real-time content moderation; contextual filtering; separating factual retrieval from generative output</td></tr><tr><td>LLM</td><td>Model Poisoning via Fine-Tuning</td><td>Subtle bias or misbehavior inserted during update phase</td><td>Secure fine-tuning pipelines; cryptographic update verification; dataset audits; model fingerprinting</td></tr><tr><td>LLM</td><td>Toxic or Biased Outputs</td><td>Stereotypical or invalidating responses may harm vulnerable users</td><td>Bias detection; adversarial testing; explainable AI; human review for critical responses</td></tr><tr><td>LLM</td><td>Inference-Time Privacy Leakage</td><td>Exposure of sensitive queries or outputs via API/cloud processing</td><td>On-device inference; encrypted channels; runtime differential privacy; federated inference</td></tr></tbody></table>

groups [12].

In a mental health context, biased responses can lead to misdiagnosis, emotional invalidation, or feelings of alienation. For example, if the model responds differently to expressions of sadness based on perceived gender or ethnicity, it negatively impacts fairness.

Several techniques can be used to mitigate this, including proactive filtering using bias detection tools, adversarial testing frameworks, and meta-toxic knowledge graphs [56]. In addition, we consider that integrating explainable AI methods can help developers understand and control model behavior [44]. Human review for critical outputs especially in triage or crisis scenarios (e.g. during COVID-19 [10]) can also be envisioned.

## Inference time privacy leakage

Even if the training process is secured, inference-time privacy remains an issue. In fact, model queries and responses are often processed via external APIs or cloud-based infrastructures, which may be vulnerable to interception, unauthorized logging, or third-party access [23]. As a result, conversations involving sensitive content such as suicidal ideas, abuse, or trauma, if exposed, can cause serious harm to patients as well as legal consequences for service providers. Furthermore, patients may self-censor or disengage from the system if they feel that confidentiality is not fully guaranteed.

Secure deployments that include on device inference,

encrypted communication channels, and anonymized data handling policies might hinder inference time leakages. Techniques like federated inference, differential privacy at runtime, and local context caching should also be considered [51].

## VI. CONCLUSION

The heavy individual and social impact of mental health disorders, particularly depression and anxiety, require original approaches that go beyond conventional therapeutic paradigms. In this context, both Large Language Models (LLMs) and Internet of Things (IoT) technologies are considered as promising directions. Indeed, LLMs, with their natural language understanding capabilities, proved to be highly relevant in supporting mental health through various applications including symptom screening, conversational support, and triage. However, their static nature and limited context awareness limit their effectiveness. Besides, IoT systems enable the continuous sensing of real time physiological and behavioral data, providing rich context that can significantly strengthen the dynamic aspect of mental health support. In this paper, we explored the convergence and synergy of these two technologies to build dynamic, responsive, and privacy aware digital support health systems. Based on a detailed state of the art analysis, we have highlighted a clear research gap. Even if both LLMs and IoT have individually been applied to mental health and broader application domains,
very few approaches consider their combined potential for depression and anxiety support. So, we proposed a layered IoT-LLM architecture composed of perception, edge, and LLM layers. In addition, we introduced a functional taxonomy that includes prevention, detection, alert, and action, and showed how such a system could provide proactive and personalized mental health assistance. Furthermore, we identified significant privacy and security concerns that must be addressed prior to large scale deployment, as we detailed both vulnerabilities and mitigation strategies at both the IoT and LLM levels. A concluding remark would stress out the feasibility and necessity of integrating LLM and IoT for mental health care providing security and privacy guarantees are enforced.

## REFERENCES

[1] M. R. Abdmeziem, A. A. Nacer, and N. M. Deroues. Group key management in the internet of things: Handling asynchronicity. *Future Generation Computer Systems*, 152:273-287, 2024.

[2] M. R. Abdmeziem, D. Tandjaoui, and I. Romdhani. A new distributed mikey mode to secure e-health applications. In *International Conference on Internet of Things and Big Data*, volume 2, pages 88-95. SCITEPRESS, 2016.

[3] A. Ahmed Nacer and M. R. Abdmeziem. *Emerging Technologies for Securing the Cloud and IoT*. IGI Global, 2024.

[4] D. A. Alber, Z. Yang, A. Alyakin, E. Yang, S. Rai, A. A. Valliani, J. Zhang, G. R. Rosenbaum, A. K. Amend-Thomas, D. B. Kurland, et al. Medical large language models are vulnerable to data-poisoning attacks. *Nature Medicine*, pages 1-9, 2025.

[5] S. Alshomrani and S. Li. Pufdca: A zero-trust-based iot device continuous authentication protocol. *Wireless Communications and Mobile Computing*, 2022(1):6367579, 2022.

[6] S. Amiri. Unemployment associated with major depression disorder and depressive symptoms: a systematic review and meta-analysis. *International journal of occupational safety and ergonomics*, 28(4):2080-2092, 2022.

[7] G. J. Annas. Hipaa regulations: a new era of medical-record privacy? *New England Journal of Medicine*, 348:1486, 2003.

[8] Z. Ben-Zion, K. Witte, A. K. Jagadish, O. Duek, I. Harpaz-Rotem, M.-C. Khorsandian, A. Burrer, E. Seifritz, P. Homan, E. Schulz, et al. Assessing and alleviating state anxiety in large language models. *npj Digital Medicine*, 8(1):132, 2025.

[9] E. Cho, J. Kim, M. Park, H. Lee, C. Hamm, S. Park, S. Sohn, M. Kang, and T. T. Kwon. Twinpeaks: An approach for certifiable public key distribution for the internet and internet of things. *Computer Networks*, 175:107268, 2020.

[10] M. Ciotti, M. Ciccozzi, A. Terrinoni, W.-C. Jiang, C.-B. Wang, and S. Bernardini. The covid-19 pandemic. *Critical reviews in clinical laboratory sciences*, 57(6):365-388, 2020.

[11] K. S. Dobson. The relationship between anxiety and depression. *Clinical Psychology Review*, 5(4):307-324, 1985.

[12] R. Dutta. Benchmarking stereotype bias and toxicity in large language models. PhD thesis, University of Illinois at Urbana-Champaign, 2024.

[13] L. N. Dyrbye, M. R. Thomas, and T. D. Shanafelt. Systematic review of depression, anxiety, and other indicators of psychological distress among us and german medical students. *Academic medicine*, 81(4):354-373, 2006.

[14] M. A. Ferrag, M. Ndhlovu, N. Tihanyi, L. C. Cordeiro, M. Debbah, T. Lestable, and N. S. Thandi. Revolutionizing cyber threat detection with large language models: A privacy-preserving bert-based lightweight model for iot/iot devices. *IEEe Access*, 12:23733-23750, 2024.

[15] R. Figliè, T. Turchi, G. Baldi, and D. Mazzei. Towards an llm-based intelligent assistant for industry 5.0. In *Proceedings of the 1st International Workshop on Designing and Building Hybrid Human-AI Systems (SYNERGY 2024)*, volume 3701, 2024.

[16] E. Ford, C. Clark, S. McManus, J. Harris, R. Jenkins, P. Bebbington, T. Brugha, H. Meltzer, and S. Stansfeld. Common mental disorders, unemployment and welfare benefits in england. *Public health*, 124(12):675-681, 2010.

[17] F. He, T. Zhu, D. Ye, B. Liu, W. Zhou, and P. S. Yu. The emerged security and privacy of llm agent: A survey with case studies. *arXiv preprint arXiv:2407.19354*, 2024.

[18] Z. He, T. Zhang, and R. B. Lee. Attacking and protecting data privacy in edge-cloud collaborative inference systems. *IEEE Internet of Things Journal*, 8(12):9706-9716, 2020.

[19] A. Heidari and M. A. Jabraeil Jamali. Internet of things intrusion detection systems: a comprehensive review and future directions. *Cluster Computing*, 26(6):3753-3780, 2023.

[20] M. A. Husnoo, A. Anwar, R. K. Chakraborty, R. Doss, and M. J. Ryan. Differential privacy for iot-enabled critical infrastructure: A comprehensive survey. *IEEE access*, 9:153276-153304, 2021.

[21] M. Ignashina, P. Bondaronek, D. Santel, J. Pestian, and J. Ive. Llm assistance for pediatric depression. *arXiv preprint arXiv:2501.17510*, 2025.

[22] T. R. Insel. Assessing the economic costs of serious mental illness, 2008.

[23] M. Jegorova, C. Kaul, C. Mayor, A. Q. O'Neil, A. Weir, R. Murray-Smith, and S. A. Tsaftaris. Survey: Leakage and privacy at inference time. *IEEE Transactions on Pattern Analysis and Machine Intelligence*, 45(7):9090-9108, 2022.

[24] P. Kasinathan, C. Pastrone, M. A. Spirito, and M. Vinkovits. Denial-of-service detection in 6lowpan based internet of things. In *2013 IEEE 9th international conference on wireless and mobile computing, networking and communications (WiMob)*, pages 600-607. IEEE, 2013.

[25] R. C. Kessler. The costs of depression. *The psychiatric Clinics of north America*, 35(1):1, 2011.

[26] R. Khan, J. Teo, M. A. Jan, S. Verma, R. Alturki, and A. Ghani. A trustworthy, reliable, and lightweight privacy and data integrity approach for the internet of things. *IEEE Transactions on Industrial Informatics*, 19(1):511-518, 2022.

[27] E. King, H. Yu, S. Lee, and C. Julien. Sasha: creative goal-oriented reasoning in smart homes with large language models. *Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies*, 8(1):1-38, 2024.

[28] İ. Kök, O. Demirci, and S. Özdemir. When iot meet llms: Applications and challenges. In *2024 IEEE International Conference on Big Data (BigData)*, pages 7075-7084. IEEE, 2024.

[29] H. König, H.-H. König, and A. Konnopka. The excess costs of depression: a systematic review and meta-analysis. *Epidemiology and psychiatric sciences*, 29:e30, 2020.

[30] D. Kumar, Y. A. AbuHashem, and Z. Durumeric. Watch your language: Investigating content moderation with large language models. In *Proceedings of the International AAAI Conference on Web and Social Media*, volume 18, pages 865-878, 2024.

[31] T. Lai, Y. Shi, Z. Du, J. Wu, K. Fu, Y. Dou, and Z. Wang. Psy-llm: Scaling up global mental health psychological services with ai-based large language models. *arXiv preprint arXiv:2307.11991*, 2023.

[32] X. Lan, Y. Cheng, L. Sheng, C. Gao, and Y. Li. Depression detection on social media with large language models. *arXiv preprint arXiv:2403.10750*, 2024.

[33] D. Li, M. Yan, Y. Zhang, Z. Liu, C. Liu, X. Zhang, T. Chen, and D. Lo. Cosec: On-the-fly security hardening of code llms via supervised co-decoding. In *Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis*, pages 1428-1439, 2024.

[34] Q. Li, J. Wen, and H. Jin. Governing open vocabulary data leaks using an edge llm through programming by example. *Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies*, 8(4):1-31, 2024.

[35] Y. Liu, G. Deng, Y. Li, K. Wang, Z. Wang, X. Wang, T. Zhang, Y. Liu, H. Wang, Y. Zheng, et al. Prompt injection attack against llm-integrated applications. *arXiv preprint arXiv:2306.05499*, 2023.

[36] S. Oh, S. Kum, and J. Moon. Real-time environment monitoring and response through iot and retrieval-augmented generation. In *2024 15th International Conference on Information and Com-
munication Technology Convergence (ICTC), pages 1658–1659.
IEEE, 2024.

[37] V. B. Parthasarathy, A. Zafar, A. Khan, and A. Shahid. The ultimate guide to fine-tuning llms from basics to breakthroughs: An exhaustive review of technologies, research, best practices, applied research challenges and opportunities. arXiv preprint arXiv:2408.13296, 2024.

[38] F. Sarhaddi, N. T. Nguyen, A. Zuniga, P. Hui, S. Tarkoma, H. Flores, and P. Nurmi. Llms and iot: A comprehensive survey on large language models and the internet of things. TechRxiv, 2025.

[39] L. Shen and Y. Zheng. Iotcoder: A copilot for iot application development. In Proceedings of the 30th Annual International Conference on Mobile Computing and Networking, pages 1647–1649, 2024.

[40] T. Singh, H. Aditya, V. K. Madisetti, and A. Bahga. Whispered tuning: Data privacy preservation in fine-tuning llms through differential privacy. Journal of Software Engineering and Applications, 17(1):1–22, 2024.

[41] Y. Sun, P. Chatterjee, Y. Chen, and Y. Zhang. Efficient identity-based encryption with revocation for data privacy in internet of things. IEEE internet of things journal, 9(4):2734–2743, 2021.

[42] X. W. Tan, E. S. Lee, M. P. H. S. Toh, A. W. M. Lum, D. E. J. Seah, K. P. Leong, C. Y. W. Chan, D. S. S. Fung, and P. C. Tor. Comparison of mental-physical comorbidity, risk of death and mortality among patients with mental disorders—a retrospective cohort study. Journal of psychiatric research, 142:48–53, 2021.

[43] A. Ullah, G. Qi, S. Hussain, I. Ullah, and Z. Ali. The role of llms in sustainable smart cities: Applications, challenges, and future directions. arXiv preprint arXiv:2402.14596, 2024.

[44] B. Van Stein, D. Vermetten, F. Caraffini, and A. V. Kononova. Deep bias: Detecting structural bias using explainable ai. In Proceedings of the companion conference on genetic and evolutionary computation, pages 455–458, 2023.

[45] P. Voigt and A. Von dem Bussche. The eu general data protection regulation (gdpr). A practical guide, 1st ed., Cham: Springer International Publishing, 10(3152676):10–5555, 2017.

[46] M. Von Korff, K. M. Scott, and O. Gureje. Global perspectives on mental-physical comorbidity in the who world mental health surveys. (No Title), 2009.

[47] H. Wang and J. Zhang. Blockchain based data integrity verification for large-scale iot data. IEEE Access, 7:164996–165006, 2019.

[48] Y. Wang, M. Tang, Y. He, and T. Y. Tang. Interactive design with autistic children using llm and iot for personalized training: The good, the bad and the challenging. In Companion of the 2024 on ACM International Joint Conference on Pervasive and Ubiquitous Computing, pages 1000–1003, 2024.

[49] Y. Wang, W. Zhong, L. Li, F. Mi, X. Zeng, W. Huang, L. Shang, X. Jiang, and Q. Liu. Aligning large language models with human: A survey. arXiv preprint arXiv:2307.12966, 2023.

[50] B. Xiao, B. Kantarci, J. Kang, D. Niyato, and M. Guizani. Efficient prompting for llm-based generative internet of things. IEEE Internet of Things Journal, 2024.

[51] D. Xu, H. Zhang, L. Yang, R. Liu, G. Huang, M. Xu, and X. Liu. Fast on-device llm inference with npus. In Proceedings of the 30th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 1, pages 445–462, 2025.

[52] S. Xu, Y. Yan, Y. Ding, F. Li, S. Zhang, H. Tang, C. Luo, Y. Li, H. Liu, Y. Mei, et al. Identifying psychiatric manifestations in outpatients with depression and anxiety: A large language model-based approach. medRxiv, pages 2025–01, 2025.

[53] Y. Yao, J. Duan, K. Xu, Y. Cai, Z. Sun, and Y. Zhang. A survey on large language model (llm) security and privacy: The good, the bad, and the ugly. High-Confidence Computing, page 100211, 2024.

[54] J. Yu, X. Lin, Z. Yu, and X. Xing. {LLM-Fuzzer}: Scaling assessment of large language model jailbreaks. In 33rd USENIX Security Symposium (USENIX Security 24), pages 4657–4674, 2024.

[55] W. X. Zhao, K. Zhou, J. Li, T. Tang, X. Wang, Y. Hou, Y. Min, B. Zhang, J. Zhang, Z. Dong, et al. A survey of large language models. arXiv preprint arXiv:2303.18223, 1(2), 2023.

[56] Y. Zhao, J. Zhu, C. Xu, and X. Li. Enhancing llm-based hatred and toxicity detection with meta-toxic knowledge graph. arXiv preprint arXiv:2412.15268, 2024.

[57] M. Zong, A. Hekmati, M. Guastalla, Y. Li, and B. Krishnamachari. Integrating large language models with internet of things: applications. Discover Internet of Things, 5(1):2, 2025.