Prevalence and factors contributing to severe undernutrition in children on antiretroviral therapy (ART) drugs in Ilala District, Tanzania Authors: Ashura Kassim Kiliza, Xiao Liang, Kassim Rashid Kiliza, Hui Lu Published: 2026 ABSTRACT AbstractUndernutrition remains a persistent challenge for children receiving antiretroviral therapy (ART) in low- and middle-income countries. This study determined the prevalence and determinants of severe undernutrition among HIV-positive children under five receiving ART in Ilala District, Tanzania. Clinical and demographic data were analyzed for 334 children enrolled at Care and Treatment Clinics (2020–2024). Nutritional status was evaluated according to WHO growth standards, and Generalized Additive Models explored non-linear associations between immunological and virological markers and nutritional indices. The prevalence of severe undernutrition was 8.1% for underweight, 17.7% for stunting, and 3.0% for wasting. Key determinants included ART adherence, CD4 count, age, household food insecurity, meal frequency and guardian occupation. Optimal ART adherence was associated with higher height-for-age (β = 1.22) but lower weight-for-age (β = −0.54) and lower weight-for-height (β = −1.81). Consumption of three daily meals was associated with higher weight-for-age (β = 0.26) and higher weight-for-height (β = 0.40). Non-linear immunological and virological thresholds accounted for up to 30.5% of deviance in wasting, offering actionable clinical targets for nutritional interventions. These findings provide novel insights for risk-stratification, indicating that nutritional interventions should be intensified when children’s immune markers fall below identified thresholds to improve clinical and nutritional outcomes.Supplementary InformationThe online version contains supplementary material available at 10.1038/s41598-026-55781-6.Keywords: Undernutrition, HIV, Children, Tanzania, Antiretroviral therapy (ART), Prevalence, Immunological and virological markersSubject terms: Diseases, Health care, Immunology, Medical research Introduction Human immunodeficiency virus (HIV) infection and undernutrition remain dual global public health burdens, with disproportionate impact on pediatric populations in resource-limited settings1,2. In 2022, the World Health Organization (WHO) estimated 149.2 million cases of stunting and 45.4 million cases of wasting among children under 5 years worldwide, underscoring the severe and ongoing global challenge of malnutrition3. Undernutrition accounts for nearly half of all deaths in children under 5, a burden that is most pronounced in low- and middle-income countries (LMICs), where limited access to healthcare, food insecurity, and inadequate sanitation heighten children’s vulnerability3. Globally, there were 1.38 million children aged 0–14 living with HIV. In that year, this age group accounted for 9 per cent of all new HIV infections and 12 per cent of all acquired immunodeficiency syndrome (AIDS) related deaths4. HIV and undernutrition form a mutually reinforcing vicious cycle in children, particularly in resource-limited settings. HIV exacerbates undernutrition through immune suppression, recurrent infections, elevated metabolic demands, diminished appetite, and impaired nutrient absorption1,5. Undernutrition further undermines immune function, accelerates disease progression, and increases the likelihood of antiretroviral treatment failure5,6, thereby intensifying the overall disease burden. Antiretroviral therapy (ART) can improve survival and immune recovery in HIV-positive children by suppressing viral replication, yet its efficacy is diminished in the presence of chronic undernutrition7. Deficiencies in key nutrients, including protein, zinc, and vitamin A, can alter pharmacokinetics of ART, reducing drug bioavailability and impeding immune recovery, thereby limiting the clinical benefits of treatment5. Modelling of climate driven, high food price and income shocks suggests that by 2030 the number of children who are stunted could be higher, especially in low‑income settings; this projected escalation in child malnutrition further shows risk for high‑vulnerability groups, such as immunocompromised children on ART8,9. Tanzania faces a substantial HIV burden, with an estimated adult prevalence of 4.2% and approximately 67,000 children aged 0–14 years living with HIV10, alongside persistent child malnutrition11, highlighting urgent gaps in pediatric HIV nutrition care. Studies have reported that ART-treated HIV positive children exhibit notably higher rates of malnutrition than their HIV unexposed peers, with 36–62% stunted, 22–39% underweight and 13–26% experiencing wasting12. The heightened malnutrition in this population stems from multiple factors, including HIV related pathology, recurrent infections, limited household food resources, and suboptimal feeding practices11–13.Urban districts like Ilala District in Dar es Salaam experience additional challenges, such as high proportion of low-income urban households and limited access to nutritious food sources, limited healthcare resources, funding shortages, inadequate infrastructure, and poor implementation of nutrition support programs, which prevent care and treatment clinics (CTCs) from providing consistent nutritional support and interventions for children on ART14,15, which leads to inconsistent nutritional assessments, limiting the effectiveness of pediatric HIV care. While earlier studies established a high baseline of undernutrition in HIV-positive children, there is a critical lack of contemporary evidence analyzing the persistent burden of severe undernutrition in the era of widespread ART access. Furthermore, previous methodologies have largely relied on linear models, potentially missing critical non-linear thresholds in the relationship between immune function and nutritional decline. This study addresses this gap by not only providing a current prevalence estimate but also by applying advanced statistical modeling to identify precise points for clinical and nutritional intervention11–13 To address these gaps, this study aimed to: (1) determine the prevalence of severe undernutrition (severe stunting, underweight, wasting) among HIV-positive children under 5 years receiving ART in Ilala District, Tanzania, (2) identify key determinants of severe undernutrition including clinical, nutritional, and socioeconomic factors, (3) to explore non-linear relationships between immunological and virological markers (CD4 count, viral load) and nutritional status. This study will provide empirical evidence to inform the Tanzanian Ministry of Health in optimizing integrated pediatric HIV nutrition care, improving long-term health outcomes among urban HIV positive children. Methods Study setting and duration We conducted a hospital-based, analytical cross-sectional study. The study population included children receiving ART in Ilala District, Tanzania, with data collection conducted from 2020 to 2024. Ten hospitals were randomly selected from the official list of all public and private hospitals in Ilala district. These facilities were chosen because they provide chronic HIV care and follow-up services, and operate integrated Reproductive and Child Health (RCH) clinics. Collectively, these hospitals serve a patient population of over one million people in the district. Study population and sampling methods The study population comprised children aged 0–5 years who were currently receiving ART. Children were considered currently receiving ART if they were prescribed and dispensed the first-line pediatric ART regimen per national guidelines (abacavir/lamivudine/dolutegravir - ABC/3TC/DTG) and had a documented clinic visit within the past 3 months. ART dispensing interval was calculated from the initiation date recorded in the CTC card. A complete list of potentially eligible children was compiled from ART registries, and this list was then screened for data completeness. Children were excluded if they were: (i) older than 5 years, (ii) HIV-negative, or (iii) had incomplete anthropometric or clinical records in CTC cards or databases. Incomplete records were identified before random selection to ensure data completeness. Sample size calculation The sample size was calculated using the formula for estimating a single population proportion16, with the following parameters: (1) Expected prevalence of severe undernutrition (P): 32% (based on prior Tanzanian studies12, (2) Margin of error (D): 5%; (3) Confidence level: 95% (corresponding to Z-score of 1.96); (4) Q = 1-P: 68%. The formula was: Substituting values into the formula: The final sample size was determined to be 334, derived from the standard statistical formula for a single population proportion. A simple random sample of ten hospitals was drawn from the official list of all public and private hospitals in Ilala district, sourced from the District Health Office, using a computer-based random number generator. Before participant selection, a complete list of all eligible participants was established by compiling registration numbers of patients recorded in the ART logbooks of each facility. A random sampling technique was then used to select participants from this list. Data management Data was acquired through digital CTC records extracted from hospital databases and physical CTC cards maintained for pediatric ART patients. These standardized cards, updated during monthly clinical visits, systematically track health and nutritional parameters, ensuring data reliability. Data collectors were assigned, and a one-day training session was conducted which covered the study’s objectives, data collection protocols, and quality control measures. Variables (exposure and outcome) Exposure (independent variables) Exposure variables were grouped into four domains: (1) socio-demographic and household factors, (2) nutritional and feeding practices, (3) clinical and HIV-related factors, and (4) birth and growth characteristics. Socio-demographic variables included child’s age (in months) and sex, guardian’s education category (uneducated, primary, secondary) and guardian’s occupation category (farmer, business, civil servant, or none), and household income category (low, middle, high), based on guardian self-report relative to district averages. Given the subjective nature of income reporting, guardian education and occupation were prioritized as primary socioeconomic indicators. Nutritional and feeding variables included breastfeeding history (ever breastfed, yes/no), exclusive breastfeeding (defined as receipt of only breast milk for the first six months of life), dietary intake was categorized as (categorized as optimal/suboptimal), meal frequency per day (categorized as two times vs. three times), and receipt of nutritional supplements (therapeutic or supplementary foods in the past month categorized as yes or no). Household food insecurity was assessed using a three-item adapted Household Food Insecurity Access Scale (HFIAS) categorized as secure, insecure, or hunger17. Clinical and HIV-related variables included ART adherence (optimal/suboptimal), WHO HIV clinical stages (1–3), immunological status (CD4 count, cells/mm³), virological status (viral load, copies/mL), ART dispensing interval (1-, 3-, or 6-month supply), used as a proxy for clinical stability, and recent morbidity (history of diarrhea, malaria, or co-infections such as pneumonia or tuberculosis in the past 6 months, and hospitalization in the past 6 months). Birth and growth variables included birth weight (kg), current weight (kg) and height (cm). Outcome (dependent variables) The primary outcome of this study was undernutrition which was then divided into three measures of undernutrition, defined according to the World Health Organization (WHO) child growth standards18: underweight: weight-for-age z-score (WAZ), stunting: height-for-age z-score (HAZ), wasting: weight-for-height z-score (WHZ). Moderate undernutrition was defined as z-scores between − 3 and − 2, severe undernutrition as z-scores < -3. For the analysis of non-linear relationships (Generalized Additive Models), the continuous z-scores (WAZ, HAZ, WHZ) were used as dependent variables to maximize statistical power and explore the full spectrum of nutritional status. Data management To ensure data quality, several measures were implemented. Excel-based tools were used for data validation and standardization. The proportion of missing values for any single variable was low (< 5%), justifying the use of multiple imputation. Multiple imputation was applied to handle missing values, and electronic CTC records were cross-checked with physical CTC cards to verify data accuracy. Statistical analysis Descriptive statistics were used to summarize participant characteristics overall and by age group category: infants (0–11 months), toddlers (12–35 months), and preschoolers (36–59 months). Nutritional indicators, including weight-for-age z-scores (WAZ), height-for-age z-scores (HAZ), and weight-for-height z-scores (WHZ), were calculated using the WHO Anthro software (version 3.2.2) and categorized according to WHO standards. A multivariable linear regression model was used to identify factors associated with each outcome. Variables for multivariable linear regression were selected a priori based on biological plausibility and prior evidence. We assessed multicollinearity using generalized variance inflation factors (GVIF). Dietary intake was highly correlated with meal frequency (r = 1.0), and WHO clinical stage was highly correlated with CD4 count. Dietary intake and WHO clinical stage were therefore retained for descriptive analysis (Table 1) but excluded from multivariable models (Table 2). All remaining variables had GVIF < 5, indicating no substantial multicollinearity. While the primary outcome was severe undernutrition (Z-score < -3), we used multivariable linear regression with continuous Z-scores as the dependent variable for two reasons: (1) the relatively low prevalence of severe forms (8.1% underweight, 17.7% stunting, 3.0% wasting) resulted in model instability and extreme parameter estimates in logistic regression; and (2) linear regression retains full statistical power and identifies factors associated with the full spectrum of nutritional status, including progression toward severe undernutrition. Factors associated with lower Z-scores in this analysis represent risk factors for poorer nutritional status and severe undernutrition. Table 1Baseline characteristics of HIV-positive children on ART in Ilala District, Tanzania (N = 334).CharacteristicOverall (n = 334)Infants (n = 150)Toddlers (n = 136)Preschoolers (n = 48)P-valueSociodemographic characteristics Age (months), median [IQR]18.00[11.00; 29.00]11.00[8.00; 12.00]23.00[20.00; 29.00]44.50[36.00; 56.00] < 0.001 Gender, n (%)0.400 Male132 (40%)63 (42%)54 (40%)15 (31%) Female202 (60%)87 (58%)82 (60%)33 (69%) Orphanhood, n (%)0.600 Yes60 (18%)26 (17%)23 (17%)11 (23%) No274 (82%)124 (83%)113 (83%)37 (77%) Guardian’s education, n (%) < 0.001 Uneducated101 (30%)43 (29%)43 (32%)15 (31%) Primary219 (66%)93 (62%)93 (68%)33 (69%) Secondary14 (4%)14 (9%)0 (0%)0 (0%) Guardian’s occupation, n (%) < 0.001 Farmer121 (36%)89 (59%)32 (24%)0 (0%) Business122 (37%)33 (22%)61 (45%)28 (58%) No occupation74 (22%)12 (8.0%)42 (31%)20 (42%) Civil servant17 (5%)16 (11%)1 (1%)0 (0%) Guardian’s Income, n (%) < 0.001 Low283 (85%)99 (66%)136 (100%)48 (100%) Middle47 (14%)47 (31%)0 (0%)0 (0%) High4 (1%)4 (3%)0 (0%)0 (0%)Anthropometric measures Birth weight (kg), median [IQR]3.20[2.90; 3.50]3.00[2.80; 3.20]3.50[3.10; 3.60]3.40[2.90; 3.40] < 0.001 Current weight (kg), median [IQR]8.20[6.90; 10.50]6.80[6.30; 7.20]9.40[8.65; 10.50]13.60[12.20; 15.40] < 0.001 Height/Length (cm), median [IQR]76.80[68.00; 84.80]67.60[64.40; 68.80]82.70[80.70; 84.90]89.60[88.80; 95.05] < 0.001 Feeding practices Breastfeeding, n (%)0.012 Yes321 (96.1%)139 (92.7%)134 (98.5%)48 (100.0%) No13 (3.9%)11 (7.3%)2 (1.5%)0 (0.0%) Exclusive breastfeeding, n (%)0.400 Yes305 (91.3%)140 (93.3%)123 (90.4%)42 (87.5%) No29 (8.7%)10 (6.7%)13 (9.6%)6 (12.5%) Meal frequency, n (%)0.002 Two times per day174 (52.1%)80 (53.3%)59 (43.4%)35 (72.9%) Three times per day160 (47.9%)70 (46.7%)77 (56.6%)13 (27.1%) Food security, n (%) < 0.001 Secure150 (44.9%)50 (33.3%)54 (39.7%)46 (95.8%) Insecure175 (52.4%)97 (64.7%)76 (55.9%)2 (4.2%) Hunger9 (2.7%)3 (2.0%)6 (4.4%)0 (0.0%) Supplement used, n (%) < 0.001 Yes224 (67.1%)150 (100.0%)43 (31.6%)31 (64.6%) No110 (32.9%)0 (0.0%)93 (68.4%)17 (35.4%) Dietary intake, n (%)0.002 Optimal160 (47.9%)70 (46.7%)77 (56.6%)13 (27.1%) Suboptimal174 (52.1%)80 (53.3%)59 (43.4%)35 (72.9%)Clinical & HIV-related characteristics Diarrhea (past 6 months), n (%)0.120 No266 (79.6%)126 (84.0%)101 (74.3%)39 (81.3%) Yes68 (20.4%)24 (16.0%)35 (25.7%)9 (18.8%) Malaria (past 6 months), n (%)0.044 No329 (98.5%)145 (96.7%)136 (100.0%)48 (100.0%) Yes5 (1.5%)5 (3.3%)0 (0.0%)0 (0.0%) Co-infections, n (%)0.063 No298 (89.2%)133 (88.7%)123 (90.4%)42 (87.5%) Tuberculosis11 (3.3%)9 (6.0%)2 (1.5%)0 (0.0%) Pneumonia25 (7.5%)8 (5.3%)11 (8.1%)6 (12.5%) Hospitalization (past 6 months), n (%) < 0.001 Yes252 (75.4%)131 (87.3%)89 (65.4%)32 (66.7%) No82 (24.6%)19 (12.7%)47 (34.6%)16 (33.3%) Adherence to ART, n (%) < 0.001 Optimal248 (74.3%)79 (52.7%)121 (89.0%)30 (62.5%) Suboptimal86 (25.7%)71 (47.3%)15 (11.0%)18 (37.5%) ART dispensing interval, n (%) < 0.001 One month314 (94.0%)150 (100.0%)116 (85.3%)10 (20.8%) Three months15 (4.5%)0 (0.0%)15 (11.0%)25 (52.1%) Six months5 (1.5%)0 (0.0%)5 (3.7%)13 (27.1%) WHO HIV clinical stage, n (%) < 0.001 Stage 197 (29.0%)97 (64.7%)0 (0.0%)0 (0.0%) Stage 2181 (54.2%)33 (22.0%)135 (99.3%)13 (27.1%) Stage 356 (16.8%)20 (13.3%)1 (0.7%)35 (72.9%) CD4 count (cells/mm3), median [IQR]900.0[750.0; 1500.0]1500.0[900.0; 1800.0]800.0[750.0; 925.0]700.0[400.0; 950.0] < 0.001 Viral load (copies/mL), median [IQR]300.0[35.0; 800.0]30.0[25.0; 200.0]500.0[200.0; 800.0]400.0[50.0; 3000.0] < 0.001 Nutritional status (Prevalence) Weight-for-age, n (%) < 0.001 Normal217 (65.0%)80 (53.3%)100 (73.5%)37 (77.1%) Moderately underweight90 (26.9%)43 (28.7%)36 (26.5%)11 (22.9%) Severely underweight27 (8.1%)27 (18.0%)0 (0.0%)0 (0.0%) Height-for-age, n (%) < 0.001 Normal155 (46.4%)52 (34.7%)92 (67.6%)11 (22.9%) Moderately stunted120 (35.9%)65 (43.3%)35 (25.7%)20 (41.7%) Severely stunted59 (17.7%)33 (22.0%)9 (6.6%)17 (35.4%) Weight-for-height, n (%) < 0.001 Normal231 (69.2%)111 (74.0%)72 (52.9%)48 (100.0%) Moderately wasted93 (27.8%)39 (26.0%)54 (39.7%)0 (0.0%) Severely wasted10 (3.0%)0 (0.0%)10 (7.4%)0 (0.0%)n (%) as categorical variable; median [IQR] as continous variables. P-values from Kruskal-Wallis test for continuous variables and Pearson’s chi-square test for categorical variables. ART dispensing interval refers to the amount of medication provided per clinic visit (1, 3, or 6 months’ supply). P-values in bold indicate statistical significance p < 0.05. Baseline characteristics of HIV-positive children on ART in Ilala District, Tanzania (N = 334). 18.00 [11.00; 29.00] 11.00 [8.00; 12.00] 23.00 [20.00; 29.00] 44.50 [36.00; 56.00] 3.20 [2.90; 3.50] 3.00 [2.80; 3.20] 3.50 [3.10; 3.60] 3.40 [2.90; 3.40] 8.20 [6.90; 10.50] 6.80 [6.30; 7.20] 9.40 [8.65; 10.50] 13.60 [12.20; 15.40] 76.80 [68.00; 84.80] 67.60 [64.40; 68.80] 82.70 [80.70; 84.90] 89.60 [88.80; 95.05] 900.0 [750.0; 1500.0] 1500.0 [900.0; 1800.0] 800.0 [750.0; 925.0] 700.0 [400.0; 950.0] 300.0 [35.0; 800.0] 30.0 [25.0; 200.0] 500.0 [200.0; 800.0] 400.0 [50.0; 3000.0] n (%) as categorical variable; median [IQR] as continous variables. P-values from Kruskal-Wallis test for continuous variables and Pearson’s chi-square test for categorical variables. ART dispensing interval refers to the amount of medication provided per clinic visit (1, 3, or 6 months’ supply). P-values in bold indicate statistical significance p < 0.05. Table 2Linear regression coefficients for anthropometric Z-scores (WAZ, HAZ, and WHZ) (N = 334).CharacteristicWAZHAZWHZβ (95% CI)P-valueβ (95% CI)P-valueβ (95% CI)P-valueSociodemographic characteristics Age (Months)0.02 (0.01, 0.03) < 0.001 -0.04 (-0.05, -0.02) < 0.001 0.05 (0.04, 0.07) < 0.001 Orphanhood (Ref:- No) Yes0.06 (-0.10, 0.22)0.5000.24 (-0.02, 0.51)0.070-0.11 (-0.39, 0.18)0.500 Guardian’s education (Ref:- Uneducated ) Primary0.03 (-0.09, 0.15)0.600-0.06 (-0.26, 0.14)0.6000.11 (-0.11, 0.33)0.300 Secondary0.08 (-0.25, 0.42)0.6000.00 (-0.56, 0.56)1.0000.14 (-0.47, 0.74)0.700 Guardian’s occupation (Ref:- Farmer) Civil servant0.09 (-0.20, 0.39)0.5290.08 (-0.41, 0.58)0.7470.03 (-0.50, 0.57)0.904 Business0.25 (0.08, 0.41)0.0040.16 (-0.12, 0.44)0.2550.26 (-0.04, 0.56)0.088 No occupation0.24 (0.06, 0.42)0.0110.26 (-0.04, 0.57)0.0890.13 (-0.20, 0.46)0.426Feeding practices Breastfeeding (Ref:- No ) Yes0.21 (-0.08, 0.50)0.200-0.02 (-0.50, 0.47)0.9000.26 (-0.26, 0.78)0.300 Meal frequency (Ref:-Two times per day) Three times per day0.26 (0.15, 0.38) < 0.001 0.06 (-0.15, 0.27)0.5690.40 (0.18, 0.61) < 0.001 Food security (Ref:- Insecure ) Hunger0.03 (-0.31, 0.37)0.8560.13 (-0.45, 0.70)0.664-0.06 (-0.67, 0.56)0.851 Secure0.11 (-0.02, 0.24)0.1090.68 (0.45, 0.90) < 0.001 -0.35 (-0.59, -0.11)0.005 Supplement used (Ref:- No) Yes0.13 (-0.08, 0.34)0.200-0.41 (-0.75, -0.06)0.0220.51 (0.14, 0.88)0.008Clinical & HIV-related characteristics Diarrhea in the past 6 months (Ref:- No ) Yes0.00 (-0.14, 0.14)0.900-0.04 (-0.27, 0.19)0.7000.00 (-0.25, 0.25)0.900 Malaria in the past 6 months (Ref:- No ) Yes-0.05 (-0.52, 0.43)0.8000.34 (-0.45, 1.12)0.400-0.27 (-1.11, 0.57)0.500 Hospitalization in the past 6 months (Ref:- No ) Yes-0.20 (-0.34, -0.05)0.007-0.11 (-0.35, 0.13)0.400-0.22 (-0.48, 0.03)0.089 Adherence to ART (Ref:- Suboptimal ) Optimal-0.54 (-0.70, -0.38) < 0.001 1.22 (0.96, 1.49) < 0.001 -1.81 (-2.10, -1.53) < 0.001 CD4 count (per 100 cells/mm3)0.03 (0.00, 0.06)0.0440.04 (-0.01, 0.10)0.0950.01 (-0.04, 0.07)0.633 Viral load (log10 copies/mL)0.18 (-0.02, 0.38)0.0810.27 (-0.08, 0.62)0.1370.11 (-0.27, 0.49)0.567CI = Confidence Interval, WAZ = Weight-for-age Z-score; HAZ = Height-for-age Z-score; WHZ = Weight-for-height Z-score. Positive β values indicate higher Z-scores (better nutritional status); negative β values indicate lower Z-scores (poorer nutritional status). Data are presented as β (95% CI). P-values in bold indicate statistical significance p> < 0.05. Linear regression coefficients for anthropometric Z-scores (WAZ, HAZ, and WHZ) (N = 334). CI = Confidence Interval, WAZ = Weight-for-age Z-score; HAZ = Height-for-age Z-score; WHZ = Weight-for-height Z-score. Positive β values indicate higher Z-scores (better nutritional status); negative β values indicate lower Z-scores (poorer nutritional status). Data are presented as β (95% CI). P-values in bold indicate statistical significance p> < 0.05. To address the third study objective, Generalized Additive Models (GAMs) were applied to explore non-linear relationships between immunological and virological markers (CD4 count and viral load) and nutritional outcomes. Smooth terms were used to identify potential threshold effects. Model diagnostics included effective degrees of freedom, F-statistics, deviance explained, and adjusted R². All analyses were conducted using R software (v4.5.1), and statistical significance was set at p < 0.05. Ethical consideration Ethical approval for this study was obtained from the Office of the Regional Commissioner, Dar es Salaam Region, Tanzania (Ref: EA.260/307/01B/155, 30th July 2024) and the Dar es Salaam City Council Medical Office (Ref: DCC/D.F.31/IX/99, 16th August 2024). The requirement for individual informed consent was waived by these ethics committees because the study involved secondary analysis of de-identified data from existing medical records. The study was performed in accordance with the ethical standards laid down in the 1964 Declaration of Helsinki and its later amendments. Results Participant flow From ART registries across ten facilities, children meeting initial eligibility criteria (age 0–5 years, HIV-positive, on ART) were identified. Those with incomplete anthropometric or clinical records were excluded, as these missing data precluded analysis. After applying exclusion criteria and screening for data completeness, 334 children with complete anthropometric and clinical data were included in the analysis. Baseline characteristics Sociodemographic, anthropometric measures, nutritional, feeding, clinical and HIV-related characteristics are presented in Table 1. Gender distribution was similar across age groups, though females predominated overall (60%). ART dispensing intervals varied, with most children (94%) receiving one-month supplies per visit seen in Table 1. Socioeconomic vulnerability increased with age: all toddlers and preschoolers were from low-income households versus 66% of infants (P < 0.001). Clinical markers showed expected progression: CD4 counts declined and viral load increased with advancing age (P < 0.001). Most infants (64.7%) were in WHO HIV clinical stage 1, while 72.9% of preschoolers had advanced to stage 3. Prevalence of severe undernutrition Overall, 8.1% of children were severely underweight, 17.7% were severely stunted, and 3.0% were severely wasted (Table 1). The distribution varied markedly by age: severe underweight occurred exclusively in infants (18.0%), while severe wasting was concentrated in toddlers (7.4%). Stunting affected all age groups but was most severe in preschoolers (35.4% severely stunted). Factors associated with anthropometric Z-scores Multivariable linear regression identified distinct determinants for each anthropometric indicator (Table 2). Consuming three daily meals (vs. two) was associated with higher weight-for-age (β = 0.26, P < 0.001) and higher weight-for-height (β = 0.40, P < 0.001). Optimal ART adherence showed divergent associations: higher height-for-age (β = 1.22, P < 0.001) but lower weight-for-age (β = -0.54, P < 0.001) and lower weight-for-height (β = -1.81, P < 0.001). This paradox was strongest in infants (WAZ: β = -0.75, WHZ: β = -1.99, both P < 0.001), likely reflecting earlier diagnosis and intensive management of sicker children (Supplementary Table 1). Recent hospitalization was associated with lower weight-for-age (β = -0.20, P = 0.007), consistent with acute illness related weight loss. Children of business owners and unemployed guardians had higher weight-for-age than children of farmers. Food security was associated with higher height-for-age but showed a reverse association with lower weight-for-height, likely reflecting targeted food support for acutely malnourished children. After transformation to interpretable units, viral load (log10 copies/mL) was not significantly associated with weight-for-age (β = 0.18, P = 0.081), height-for-age (β = 0.27, P = 0.137), or weight-for-height (β = 0.11, P = 0.567). CD4 count (per 100 cells/mm³) was positively associated with weight-for-age (β = 0.03, P = 0.044) but not with height-for-age (β = 0.04, P = 0.095) or weight-for-height (β = 0.01, P = 0.633). Non-linear relationships between nutritional status and immunological & virological markers Generalized Additive Models revealed significant non-linear relationships between immunological & virological markers and all anthropometric indicators (Fig. 1). The smoothed curves suggested potential inflection patterns. For CD4 count, Z-scores declined gradually at higher levels but showed a steeper decrease when CD4 count fell below approximately 750 cells/mm³, particularly for weight-for-height Z-score (WHZ). Similarly, for viral load, Z-scores decreased progressively with increasing levels, with a more pronounced decline observed beyond approximately 500 copies/mL. These values were visually identified from the spline curves and are presented as approximate inflection points rather than predefined thresholds. The 95% confidence intervals were narrower in the mid-range and wider at the extremes, indicating greater uncertainty in regions with fewer observations. Among the three indicators, WHZ showed the strongest non-linear associations, with CD4 count (EDF = 5.96, F = 19.39, P < 0.001) and viral load (EDF = 3.38, F = 32.72, P < 0.001) explaining 30.5% and 29.4% of deviance, respectively. For WAZ, CD4 count explained 21.9% of deviance (EDF = 5.95, F = 11.99, P < 0.001) and viral load explained 25.2% (EDF = 2.60, F = 34.35, P < 0.001). For HAZ, the associations were comparatively weaker, with CD4 count explained 17.8% (EDF = 5.07, F = 10.74, P < 0.001) and viral load explained 10.2% of deviance (EDF = 3.63, F = 7.90, P < 0.001). Non-linear relationships between CD4 count and viral load with nutritional status among HIV-positive children on ART in Ilala District, Tanzania. Smooth plots from Generalized Additive Models (GAM) show the association of (a) CD4 count with Weight-for-Age Z-score (WAZ), (b) CD4 count with Height-for-Age Z-score (HAZ), (c) CD4 count with Weight-for-Height Z-score (WHZ), (d) viral load with WAZ, (e) viral load with HAZ, and (f) viral load with WHZ. Key model statistics (EDF, F-value, p-value, adjusted R2, and deviance explained) are displayed within each panel. The solid lines represent the smoothed fit, and the shaded bands represent the 95% confidence intervals. Discussion Our study demonstrates a persistent burden of severe undernutrition among children on ART in Ilala District, while introducing a novel analytical contribution through the use of Generalized Additive Models (GAMs). Unlike conventional linear approaches, GAMs revealed non-linear threshold effects between immunological and virological markers and nutritional status, indicating that nutritional deterioration accelerates once CD4 count or viral load crosses critical levels. These findings provide clinically actionable markers for earlier nutritional intervention. The observed prevalence of severe stunting (17.7%), underweight (8.1%), and wasting (3.0%) is consistent with reports from other sub-Saharan African settings and highlights the continued vulnerability of children living with HIV despite ART availability. However, nutritional vulnerabilities differed by age group and indicator: infants showed the highest severe underweight prevalence (18.0%), toddlers had the highest severe wasting (7.4%), and preschoolers had the highest severe stunting (35.4%). This pattern suggests distinct etiologies: acute nutritional deficits (wasting) peak during the breastfeeding transition period in toddlers, while chronic undernutrition (stunting) accumulates over time, reaching highest severity in older preschoolers19–25. Optimal ART adherence showed divergent associations with nutritional outcomes: higher height-for-age but lower weight-for-age and lower weight-for-height. Age-stratified analyses revealed this paradox was strongest in infants likely reflecting survivorship bias where sicker infants receive earlier diagnosis and more intensive medical management. The uniqueness of our GAM analysis is that it moves beyond simply confirming this persistent burden to explaining the threshold dynamics that drive nutritional decline. Although the prevalence of severe wasting is relatively low (3%), acute malnutrition shows the strongest non-linear response to immunological changes, with wasting accelerating rapidly once CD4 count falls below 750 cells/mm³ or viral load exceeds 500 copies/mL. These thresholds identify actionable clinical targets for intensified nutritional intervention26. In contrast, linear regression models using transformed variables (log10 viral load and CD4 count per 100 cells/mm³) did not detect significant linear associations for viral load across all three nutritional indicators, highlighting that standard linear approaches would miss these critical threshold effects. Nonlinear associations identified by Generalized Additive Models suggest that nutritional decline accelerates once immune function and viral control fall below specific thresholds27,28.This discrepancy reflects the complementary nature of these analytical approaches: linear regression confirms the absence of simple straight-line relationships, while GAMs reveal the true non-linear patterns that are clinically actionable. Elevated viral load was particularly associated with rapid deterioration in wasting, supporting biological evidence that uncontrolled viremia increases catabolic demand while impairing nutrient absorption and utilization29.These findings highlight the importance of early nutritional intervention before critical immunological decline occurs30–32.The different patterns between stunting, wasting and underweight warrant explanation. Stunting showed weaker non-linear associations with immunological and virological markers compared to wasting and underweight, suggesting that stunting is driven more by collective, long-term factors such as chronic food insecurity and recurrent infections, rather than current immune status alone, while wasting and underweight reflect acute metabolism directly triggered by immune decline through processes such as elevated energy expenditure, reduced appetite, and malabsorption. Socioeconomic constraints further exacerbate these challenges, including widespread low household income and limited caregiver education. Three daily meals was associated with lower risk of underweight and wasting, highlighting that dietary frequency may be more modifiable than structural economic factors in the short term. Compared with children of farmers, those whose guardians were business owners or unemployed had higher weight-for-age. This apparently counterintuitive finding reflects distinct socioeconomic contexts in urban settings: unemployed guardians had better outcomes than farmers. Unemployed guardians may rely on spousal income, extended family support, or informal economic activities that provide stable food access. In contrast, farmers face agricultural vulnerability including drought, crop seasonality, and post-harvest losses, compounded by geographic isolation from food markets33–35.The study also revealed a high prevalence of orphanhood (18.0%), particularly among infants (23.4%), indicating disruptions in early caregiving crucial for nutrition and immunity36. Food insecurity (52.4%) and poor dietary intake (52.1%) were prevalent, consistent with previous evidence linking economic stress to suboptimal dietary patterns in urban households37. Food security showed differential effects across nutritional indicators. Secure food access was associated with less severe stunting status but worse wasting status, likely reflecting reverse causation, children with acute malnutrition receive targeted food support. This highlights the complex relationship between food access and nutritional outcomes in HIV-positive children. Multisectoral initiatives such as the National Multisectoral Nutrition Action Plan (NMNAP, 2021)38–40 are essential to address these structural barriers. The study highlights significant gaps between Tanzania’s progressive nutrition-HIV integration policies and their practical implementation, especially in supplement availability, staff training, and monitoring systems41,42. This study has several limitations. Its cross-sectional design limits causal inference, particularly for the ART adherence findings where sicker children receive earlier diagnosis and more intensive follow-up. Adherence was assessed through clinic attendance and refill records, which conflates retention in care with daily pill-taking behavior. The hospital-based sample may under represent children not engaged in care. Some socioeconomic variables were self-reported, and children with incomplete records could not be assessed for selection bias. Food security assessment may be subject to reverse causation, as acutely malnourished children receive targeted food support. The single-district setting limits generalizability, and residual confounding from unmeasured factors may persist. Finally, the gender imbalance (60% female) in our cohort, while not statistically different across age groups, may reflect broader patterns in pediatric HIV testing, care access, or survival differences that warrant further investigation. Despite these limitations, the study provides valuable insights into nutritional risk patterns among children on ART in urban Tanzania. The findings underscore the urgency of integrating nutritional rehabilitation as a core component of pediatric HIV care. Although the 2023 UNAIDS guidelines provide a strong framework, addressing structural issues like poverty and health system weaknesses is essential43.The persistent high malnutrition rates in Ilala District, despite ART access, represent a serious public health crisis. Coordinated efforts from governments, international bodies, and civil society are critical to translating policies into real improvements. Future work should prioritize exploring integrated, cost-effective service models and rigorously evaluate their effects on children’s survival and development in Tanzania and Sub-Saharan Africa44. Conclusion The persistence of severe undernutrition among children on ART reflects a systems failure rather than a failure of treatment efficacy. Our findings demonstrate that immunological and virological markers can be used to identify children at imminent risk of nutritional decline, providing an opportunity for targeted, pre-emptive intervention. Integrating guaranteed meal support and nutritional rehabilitation into routine pediatric HIV care is essential to fully realizing the benefits of ART. Strengthening this integration represents a cost-effective strategy to improve survival, development, and long-term humSan capital outcomes in Tanzania. Supplementary Information Below is the link to the electronic supplementary material. Supplementary Material 1 Acknowledgements The authors would like to acknowledge the administration and staffs of all the hospitals involved in Ilala District, Tanzania, for their cooperation and support during data acquisition. Author contributions A. K. K. :- Conceptualization, Data Curation, Formal Analysis, Investigation, Writing—Original Draft. H. L. :- Supervision, Validation, Review and Editing. K. R. K. :- Discussion formulation, Methodology, Reviewing and editing of manuscript. X.L. :- Reviewing and editing of manuscript. All authors read and approved the final manuscript. Data availability The datasets generated and analyzed during the current study are not publicly available due to patient confidentiality and the sensitive nature of the clinical data but are available from the corresponding author upon reasonable request and with permission from the relevant Tanzanian health authorities. Declarations Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Supplementary Materials Supplementary Material 1 Data Availability Statement The datasets generated and analyzed during the current study are not publicly available due to patient confidentiality and the sensitive nature of the clinical data but are available from the corresponding author upon reasonable request and with permission from the relevant Tanzanian health authorities.