# TRAIL-UKB: A sparse-autoencoder atlas of disease-trajectory transformer representations

DevFeed: [TRAIL-UKB: A sparse-autoencoder atlas of disease-trajectory transformer representations](<https://devfeed.tech/articles/trail-ukb-a-sparse-autoencoder-atlas-of-disease-trajectory-transformer-representations-160641.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.34984>)

Author: M\\'aty\\'as Antal, Nara Csutora, M\\'ark Marosi, Tam\\'as Nagy, Gabriella Juh\\'asz, P\\'eter Antal, Andr\\'as G\\'ezsi

Published: 2026-11-30T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [Representation learning](<https://devfeed.tech/topics/representation-learning.md>), [Inference](<https://devfeed.tech/topics/inference.md>)

Tags: [activation](<https://devfeed.tech/tags/activation.md>), [analysis](<https://devfeed.tech/tags/analysis.md>), [artifacts](<https://devfeed.tech/tags/artifacts.md>), [associations](<https://devfeed.tech/tags/associations.md>), [atlas](<https://devfeed.tech/tags/atlas.md>), [automated](<https://devfeed.tech/tags/automated.md>), [classification](<https://devfeed.tech/tags/classification.md>), [comparisons](<https://devfeed.tech/tags/comparisons.md>), [context](<https://devfeed.tech/tags/context.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [decoder](<https://devfeed.tech/tags/decoder.md>), [delphi](<https://devfeed.tech/tags/delphi.md>), [depression](<https://devfeed.tech/tags/depression.md>), [diagnosis](<https://devfeed.tech/tags/diagnosis.md>), [direction](<https://devfeed.tech/tags/direction.md>), [disease](<https://devfeed.tech/tags/disease.md>), [effects](<https://devfeed.tech/tags/effects.md>), [event](<https://devfeed.tech/tags/event.md>), [explain](<https://devfeed.tech/tags/explain.md>), [sparse-autoencoder](<https://devfeed.tech/tags/sparse-autoencoder.md>), [transformer](<https://devfeed.tech/tags/transformer.md>)

## AI overview

TRAIL-UKB decomposes a masked-event transformer trained on UK Biobank ICD-10 histories into 7,712 sparse features, including diagnosis indicators, temporal and comorbidity contexts, patient strata, genotype-linked enrichments, and recording artifacts. Its feature cards combine clinical and temporal context, genotype associations, prediction effects, activation rules, and descriptions. Because a feature may reflect a diagnosis or its surrounding context, the authors compare observed context with diagnosis-conditioned expectations weighted by each diagnosis's share of feature activation. Reconstructions explain over 99.7% of hidden-state variance and preserve top-ranked predictions at over 98% of evaluated positions; 53% of supported feature instances recur across at least two of three SAE fits. Counterfactuals probe activation sensitivity, and decoder-direction steering tests prediction effects. A retrospective prescription-derived treatment-resistant depression classification illustrates linking downstream scores to features. The account is abstract-level evidence and does not provide detailed results for that classification.

## Source excerpt

arXiv:2611.34984v1 Announce Type: new Abstract: We present TRAIL-UKB, a sparse-autoencoder (SAE) feature atlas of a Delphi-2M-inspired masked-event transformer trained on 5.1 million first-occurrence ICD-10 events from 502,383 UK Biobank participants. SAEs decompose the model's internal representations into sparse, individually interpretable features. An automated pipeline produces feature cards combining clinical context, temporal patterns, genotype associations, model-output effects, logical activation rules and natural-language descriptions. A feature's activation may reflect a diagnosis, its surrounding context, or both. To distinguish additional contextual selectivity from patterns inherited from the diagnoses themselves, we compare observed feature context with diagnosis-conditioned expectations, weighting each diagnosis's usual context by its share of feature activation mass. The atlas contains 7,712 features representing diagnosis indicators, comorbidity and temporal contexts, patient strata, genotype-linked enrichments and recording artifacts. SAE reconstructions explain over 99.7\% of hidden-state variance and preserve the model's top-ranked predictions at over 98\% of evaluated positions. Across three independently trained SAE fits, 53\% of supported feature instances recur in at least two. Counterfactuals test feature activation sensitivity, while decoder-direction steering evaluates effects on model predictions. Comparisons with alternative sparse decompositions assess representation quality. Finally, retrospective, prescription-derived treatment-resistant depression classification demonstrates how downstream model scores can be connected to interpretable SAE features through decoder folding and dependence-aware analysis. We release the analysis pipeline and privacy-screened feature cards for selected TRD-associated features.