What predicts a developer's attitude toward AI tools?

How developers judge AI's quality predicts their sentiment far better than who they are; the 62% favorable share survives a non-response check. An end-to-end, seeded and tested study of the Stack Overflow Developer Survey 2026.

View the code on GitHub → github.com/poluru155/developer-ai-sentiment-ml

Download: Paper (PDF) · Slide deck (PDF) · One-slide summary (PDF)

AUC 0.842sealed test split, n = 2,852; CI 0.828 to 0.857
62.1%favorable after weighting for non-response (naive 62.8%)
8 of 10algorithms within 0.01 AUC of the best
+17.5 ptsheavy daily use, adjusted association

1. Who answered?

Only 46.1% of the 30,903 respondents gave a usable answer to the sentiment question. Cleaning keeps "never shown the question" apart from "skipped it", because they mean different things.

How respondents drop out of the survey, from entry to the sentiment question.
How respondents drop out of the survey, from entry to the sentiment question.

2. Can the headline be trusted?

Reweighting for observed differences moves the favorable share from 62.8% to 62.1% (95% CI 61.1% to 62.9%). Answering is hard to predict from the observed covariates (AUC 0.61), which is why weighting changes little. With no assumptions at all the share could be anywhere from 29% to 83%; among respondents who reached the AI section it is 51% to 70%, a majority even in the worst case.

Worst-case (Manski) bounds on the favorable share, against the weighted estimate.
Worst-case (Manski) bounds on the favorable share, against the weighted estimate.

3. Which algorithm?

8 of 10 algorithms, from elastic-net logistic regression to XGBoost, are within one AUC point of the best under 5x2 repeated cross-validation with identical folds and a corrected resampled t-test. The data, not the algorithm, sets the ceiling.

Cross-validated AUC for each algorithm, with corrected confidence intervals.
Cross-validated AUC for each algorithm, with corrected confidence intervals.

4. What drives it?

Removing the attitude questions costs 0.069 AUC (0.826 to 0.757). Attitudes are measured in the same survey as sentiment and partly restate it, so 0.757 is the fairer figure for predicting from context, usage and policy alone.

AUC lost when each family of questions is removed from the full model.
AUC lost when each family of questions is removed from the full model.
Mean absolute SHAP value per feature on 3,000 training respondents.
Mean absolute SHAP value per feature on 3,000 training respondents.

5. The final model, tested once

The tuned, calibrated LightGBM scores AUC 0.842 with calibration error 0.016. It ties a tuned logistic regression, so LightGBM was kept for its exact explanations rather than for winning. Tuning improved log loss, and nested cross-validation shows the tuning-fold score was optimistic by 0.002.

Test-split AUC and log loss against baselines, with bootstrap intervals.
Test-split AUC and log loss against baselines, with bootstrap intervals.
Discrimination and calibration gap by subgroup; wide intervals mean flags, not findings.
Discrimination and calibration gap by subgroup; wide intervals mean flags, not findings.

6. Association, not causation

After adjustment, heavy daily use goes with +17.5 points of favorable sentiment (95% CI 15.6 to 19.5), and an employer expecting AI use goes with -4.3 points. E-values, negative controls and overlap checks are in the repository. Sentiment and use are measured together, so reverse causation cannot be excluded.

Adjusted effects with credibility checks.
Adjusted effects with credibility checks.

7. Kinds of developer

5 segments, stable under resampling, with favorable rates from 41% to 76%. The cluster structure itself is weak, so the segments are descriptive groupings, not natural species.

Favorable share by segment with Wilson intervals.
Favorable share by segment with Wilson intervals.

Limits. One cross-section, so this describes differences between people, not change over time. Weighting corrects for observed covariates only. The extract has 29 of the survey's 212 questions.