← Back to blog

Research note /

What trustworthy mental-health AI requires

How to separate plausible explanations from useful evidence, with simple text probes and a runnable attention example.

Updated

Two transparent glass speech bubbles facing a clear prism on a dark studio tabletop.
concept artwork · AI-assisted

A model reads a paragraph, returns a mental-health label and highlights a few words. The explanation sounds reasonable. What have we actually learned?

We have a prediction and something presented as evidence for it. We still need to check whether the prediction is reliable, whether the highlighted evidence matters to the computation, and whether the task matches the use someone has in mind. Those checks become especially important when text refers to a person’s wellbeing.

This post is about inspecting research systems. A label inferred from a post is not a clinical diagnosis. Let’s keep that scope clear while making the technical questions easier to work with.

Start with three separate questions

Predictive performance: how well does the system match the evaluated labels on genuinely held-out data? The answer depends on the population, labeling procedure and split. Several posts from one author require particular care if the claim concerns unseen people.

Sensitivity to evidence: does the output react when relevant meaning changes? Does it remain reasonably stable under changes judged irrelevant to the specific task?

Faithfulness of explanation: does the explanation describe what actually influenced the model, or does it merely sound plausible after the prediction?

A useful analogy is checking a calculation. A correct answer, a convincing explanation and a faithful record of the calculation are related pieces of evidence. One does not automatically establish the others.

These questions motivate my work on AttentionDep and the causality-aware reliability analysis. The latter examines whether Qwen2.5-7B’s attention reflects clinical reasoning in text classification. That question should remain separate from claims about a validated clinical service.

Make small changes to meaning

Before designing a complicated interpretability experiment, write a few controlled text pairs. Here are fictional examples, not patient records or scored model outputs:

Probe First text Edited text
Superficial detail “On Monday, I felt low all day.” “On Tuesday, I felt low all day.”
Negation “I feel hopeless today.” “I do not feel hopeless today.”
Time reference “I feel low now.” “I felt low last year, but I feel well now.”
Speaker “I feel overwhelmed.” “My friend said, ‘I feel overwhelmed.’”

The weekday edit is a candidate invariance test under a task where the weekday itself has no relevance. The other edits change potentially meaningful context. They are reasons to inspect the response, not a universal mapping from these sentences to diagnostic labels.

Have a qualified reviewer define the expected behavior for the actual task. Some edits introduce ambiguity; a useful system may need to express uncertainty rather than force a different class.

Keep the prompt and generation settings fixed, save both inputs, and record the outputs and model revision. For stochastic generation, distinguish variation across repeats from variation caused by the edit. These probes are proposed checks here; I have not run an LLM on these pairs.

Why the darkest highlight may mislead

Attention weights are one part of a computation. A large weight does not, by itself, reveal the size or direction of the weighted value.

Take a deliberately tiny scalar example:

const weights = [0.7, 0.2, 0.1];
const values  = [0.1, 2.0, 1.0];
const output = weights.reduce(
  (sum, weight, i) => sum + weight * values[i], 0
);

The three contributions are 0.07, 0.40 and 0.10. They sum to 0.57. The first item has the largest weight, but the second contributes the most to this particular sum.

Download the complete attention example and run:

node attention-toy.mjs

I ran it with Node 24.21.0, without external packages. Its assertions passed for the sum and the different locations of the maximum weight and maximum contribution.

This is a fixed weighted sum. It is not a Transformer, a reproduction of AttentionDep or a clinical score. Real representations include vectors, multiple heads and later transformations, so the example establishes only the narrow arithmetic point.

Jain and Wallace’s NAACL 2019 study provides empirical reasons for caution: in their tested NLP models, attention did not reliably track other importance measures, and different attention distributions could yield similar predictions. That finding deserves its experimental scope; it is not a theorem that every use of attention is uninformative.

Where domain knowledge fits

AttentionDep combines contextual text representations with depression-related domain knowledge. Its preprint describes unigram and bigram processing, knowledge-guided cross-attention and an ordinal severity objective. Ordinal means the target levels have an order, rather than being unrelated category names. See Section IV of the preprint for the model.

The idea is to make domain information available to the representation and expose signals that can be inspected. It still leaves an empirical question: which signals are predictive for the intended reason, and which reflect correlations in the training data?

A knowledge graph can encode associations without establishing that changing a concept would cause a change in a person’s condition. Likewise, deleting a word from a sentence is an intervention on a model input; it is not automatically a valid intervention on a real-world mental-health process.

That distinction helps keep an interesting interpretability result from becoming a larger causal claim than the experiment supports.

What a useful evaluation would save

For a research prototype, I would start with a small evidence bundle: the target definition, the split by person or source, the model and prompt revision, paired-text results, and examples where the prediction and explanation disagree.

Then inspect external data and uncertainty, with appropriate expertise for the intended setting. Language, collection context and annotation conventions can change. A system that performs well on one benchmark still needs evidence for a different population or workflow.

The leakage checklist and external-validation walkthrough cover those evaluation boundaries in more detail.

The next useful step is modest: take a handful of reviewed examples, define which edits should matter, and inspect both the label and its explanation. Keep the surprising cases. They often give you a more useful research question than another confident paragraph from the model.

Source paper

Prepared with AI assistance. Sources and a worked example are provided so you can check the reasoning.

Contact

Elgün · AI Researcher

Let's talk

Good questions welcome. Citations optional.

Academic CV