Autoimmune Disease Prediction Using Deep Learning

Autoimmune Disease Prediction Using Deep Learning and TCR Repertoire Analysis

Autoimmune Diseases & Associated Challenges

Autoimmune diseases result from a failed recognition function of the immune system, where it recognizes the body’s own cells, tissues, or organs as harmful and attacks them.  

Some of the challenging autoimmune diseases are:

  • Rheumatoid Arthritis (RA)
  • Multiple Sclerosis (MS)
  • Type 1 Diabetes (T1D)
  • Psoriasis / Psoriatic Arthritis
  • Inflammatory Bowel Disease (IBD)
  • Autoimmune Thyroid Diseases
  • Systemic Lupus Erythematosus (SLE)
  • Systemic Sclerosis (Scleroderma)
  • Myasthenia Gravis (MG)

These diseases are among the most challenging conditions to diagnose because they involve complex interactions between genetics, immune-cell activity, environmental influences and abnormal immune responses. Till date, more than 80 autoimmune diseases have been identified, and many can begin with subtle inflammation, disease-specific immune markers or nonspecific symptoms. This complexity creates a need for technologies capable of identifying disease-associated biological patterns that may be difficult to detect using conventional approaches.

Diagnosis of Autoimmune diseases

Diagnosing autoimmune diseases is often complex because there is no single test that can reliably identify all autoimmune disorders. Diagnosis typically combines medical history, physical examination, blood tests, imaging, and, when necessary, tissue or organ-specific investigations. Clinicians first evaluate symptoms and patterns of organ involvement, followed by laboratory testing for evidence of abnormal immune activity.

Some of the known blood tests include:

Antinuclear antibody (ANA)

This test is frequently used when systemic autoimmune disease is suspected, and disease-specific autoantibodies such as anti-double-stranded DNA and anti-Smith antibodies for lupus, rheumatoid factor and anti-CCP antibodies for rheumatoid arthritis, and thyroid antibodies for autoimmune thyroid diseases.

Blood Tests

C-reactive protein (CRP) & Erythrocyte Sedimentation Rate (ESR) test along with complete blood counts, complement levels, and tests assessing organ function are performed to identify the autoimmune disease.

Imaging Techniques

MRI, ultrasound, CT and X-ray—can provide additional evidence of inflammation or tissue damage. In some conditions, biopsies are required to establish or confirm a diagnosis.

Despite the development of these diagnostics methods, early and accurate diagnosis remains a major challenge. Many autoimmune diseases produce nonspecific symptoms such as fatigue, joint pain, fever, weakness, rashes, or neurological problems, which can overlap with infections and other disorders.

Another challenge is disease heterogeneity. Patients with the same autoimmune disorder can have different symptoms, biomarkers, disease trajectories, and treatment responses. Some diseases also fluctuate between periods of activity and remission, making diagnosis particularly difficult when patients are evaluated during less active phases.

Consequently, researchers are increasingly exploring molecular biomarkers, T- and B-cell receptor profiling, single-cell technologies, genomics, proteomics, and artificial intelligence to develop more sensitive, specific, and personalized approaches for early autoimmune disease detection.

Scientists from School of Information Engineering, Jingdezhen Ceramic University, Jingdezhen, explored how artificial intelligence can analyze T-cell receptor (TCR) sequences to distinguish people with autoimmune diseases from healthy individuals. Two deep-learning models were developed, namely; AutoY, based on a convolutional neural network (CNN), and LSTMY, based on a bidirectional long short-term memory (BiLSTM) network combined with an attention mechanism. The models were evaluated for four diseases: type 1 diabetes (T1D), rheumatoid arthritis (RA), multiple sclerosis (MS), and idiopathic aplastic anemia (IAA).

Autoimmune diseases

Why T-Cell Receptors Matter in Autoimmune Disease Prediction?

T cells recognize specific antigens with the help of T-cell receptors that determines the downstream effector function of the adaptive immune responses.

In autoimmune diseases, abnormal T-cell activity can contribute to attacks against the body’s own tissues. In type 1 Diabetes, autoreactive T cells destroy pancreatic beta while in multiple sclerosis aberrantly activated T cells target the myelin components. This suggests that TCR repertoires patterns can provide useful signals for distinguishing autoimmune disease from healthy states.

So, instead of asking only whether an individual TCR sequence is associated with disease, it is intriguing to use the collections of TCR sequences as a representation of an individual’s immune repertoire and establishing the intersection between immunology, genomics and artificial intelligence.

How TCR Sequences can be combined with Deep Learning?

Publicly available TCR-sequencing data from the Adaptive Biotechnologies immune ACCESS database were extracted and used together with healthy-control data from previously published research. The dataset included 86 RA samples, 104 T1D samples, 174 MS samples, 65 IAA samples and 214 healthy samples.

  1. Data preprocessing

Before training the models, the TCR data was cleaned and standardized. This preprocessing stage is important for practical AI development.

At this stage, sequences shorter than 10 amino acids or longer than 24 were removed. Sequences containing special characters such as X, + or * were excluded. IMGT nomenclature requirements were applied while sequences with unresolved variable loci were removed and samples containing fewer than 10 TCR sequences were excluded. Top 100 high-frequency TCR clones were used that could recognize the highly represented TCR sequences that may contain biologically meaningful information.

The high-quality input data can reduce technical noise and help a model learn disease-associated patterns rather than artifacts arising from sequencing or inconsistent data formatting.

  1. Turning Amino Acid Sequences into Machine-Readable Data

Deep-learning algorithms can’t directly interpret biological sequences in their raw form. So,  it is important to converted amino acid sequences into numerical representations.

For this, a 20 × 15 biochemical feature matrix was used that was derived from 531 amino-acid indices using principal component analysis. This representation captures more than 95% of the variation in the underlying biochemical information. Each TCR sequence was converted into a numerical tensor suitable for deep-learning analysis.

This is a key methodological decision because it allows the algorithms to incorporate biochemical properties rather than treating amino acids simply as arbitrary letters.

  1. AutoY: A CNN Designed for TCR Pattern Recognition

The first proposed model, AutoY, uses a CNN architecture.

Rather than examining the entire sequence in exactly the same way, AutoY uses multiple convolutional filters to identify patterns in different regions of the CDR3 sequence. The model uses convolutional kernel sizes of 2, 3, 4 and 5, with different numbers of filters for each configuration.

Global maximum pooling then selection of the strongest features from each feature map is followed while dropout and batch normalization are incorporated to reduce overfitting and improve training stability.

The practical advantage of this architecture is that it can automatically identify sequence patterns associated with disease without requiring researchers to manually define every potentially relevant feature.

  1. LSTMY: Combining BiLSTM with Attention

The second model, LSTMY, uses bidirectional LSTM.

It allows the model to process sequence information in both forward and reverse directions. Three BiLSTM layers are stacked to capture relationships across the sequence. An attention mechanism then helps the model focus on important sequence features rather than treating every position equally.

A multi-instance learning framework was also used where individual TCR sequences are treated as instances within a larger TCR repertoire, or “bag.” The model learns from relationships among sequences instead of relying only on isolated TCR predictions.

That distinction is valuable because an individual’s immune response is represented by a repertoire of many TCRs and not a single receptor.

Evaluation of Model Performance

For each autoimmune disease, 100 rounds of five-fold cross-validation was performed. In each round, data were randomly shuffled and divided into five parts. Four parts were used for training and the remaining part for testing. The training portion further divided into training and validation subsets at an 80:20 ratio.

The models were assessed using:

  • Accuracy
  • Sensitivity
  • Specificity
  • Area under the ROC curve (AUC)

AUC is particularly useful because it evaluates how well a model distinguishes positive and negative cases across different classification thresholds.

The models were implemented using Python, PyTorch and CUDA, with GPU acceleration used during experimentation.

Prediction of Autoimmune Disease

AutoY Delivers Strong Prediction

AutoY outperformed LSTMY in accuracy, sensitivity, specificity and AUC.

The strongest results occurred for type 1 diabetes and multiple sclerosis.

For T1D, AutoY achieved:

  • Accuracy:50%
  • Sensitivity:09%
  • Specificity:68%
  • AUC:9991

For MS, the model achieved:

  • Accuracy:63%
  • Sensitivity:13%
  • Specificity:03%
  • AUC:9961

These results indicate a strong ability to distinguish T1D and MS samples from healthy controls within the study datasets.

AutoY also performed well for IAA, with an AUC of 0.9750, although sensitivity was lower at 76.37%. For RA, the AUC was 0.9375, with sensitivity of 71.15%.

LSTMY shows Strong Predictive Capability

LSTMY produced similarly impressive results for T1D and MS.

Its average AUC values were 0.9932 for T1D and 0.9963 for MS, while IAA achieved an AUC of 0.9533. However, RA remained substantially more difficult, with an AUC of 0.8780 and sensitivity of only 55.40%.

Interestingly, although AutoY generally produced better performance, LSTMY demonstrated greater robustness in some situations. For MS, for example, LSTMY showed a narrower confidence interval than AutoY, indicating lower prediction variability across validation rounds.

This suggests that model selection shouldn’t rely on a single performance metric. Accuracy, sensitivity, specificity, AUC and stability all matter when developing biomedical AI.

Why Did RA and IAA Perform Less Well?

One of the most valuable findings from the study is that deep learning doesn’t automatically overcome limitations in biological data.

RA and IAA had considerably smaller positive sample sizes—86 RA samples and 65 IAA samples—compared with 104 T1D and 174 MS samples.

This imbalance can cause a model to favour the majority class, making it harder to recognize positive cases.

This may be because, RA TCR distributions were relatively similar to healthy samples, making disease-specific patterns harder to learn. IAA had sparse feature distributions and a smaller dataset. Therefore, it is recommended to collect more samples, improve disease-specific feature engineering and explore more advanced or ensemble architectures.

Application of Deep Learning platforms for Disease Prediction

Application of Deep Learning platforms for Disease Prediction

  1. AI-assisted autoimmune disease screening

TCR repertoire analysis combined with deep learning could eventually support screening workflows by identifying immune-repertoire patterns associated with particular autoimmune diseases.

  1. Non-invasive detection research

The concept of TCR banks and peripheral blood sequencing can be implicated as a route toward non-invasive autoimmune disease detection.

  1. Precision medicine

Disease-specific TCR signatures could potentially help researchers characterize patients more precisely and investigate differences in immune responses.

  1. Biomarker discovery

The models may help identify sequence patterns worth investigating as candidate biomarkers or biological signals.

  1. Research and drug development

Better understanding of disease-associated TCR patterns could support studies of autoimmune mechanisms, therapeutic targets and potentially vaccine design, accelerating diagnosis, treatment research and vaccine development.

Future Insights: AI Meets Immunology

The research promisingly demonstrates how deep learning can extract meaningful patterns from complex TCR repertoires. The platform learn representations directly from sequence data, and AutoY focuses on local sequence patterns, while LSTMY captures longer-range relationships and uses attention to prioritize informative features. Together, these approaches show how AI-driven immune profiling could become an important component of future precision medicine.

Deploying AI for disease prediction could provide technical feasibility and strong predictive potential, but we should be highly cautious on relying on the prediction completely.

The models are tested on only four autoimmune diseases, and the available datasets have limitations. In particular, RA and IAA require larger datasets and some differences between patient and healthy groups could arise from factors other than autoimmune disease itself. In future, larger, more diverse, multicenter datasets should be critically involved along with independent external validation and more representative sequencing data. In addition, improvements can be done in the areas of feature engineering, addressing class imbalance, optimizing model parameters and investigating more advanced or integrated architectures.

Thus, combining TCR sequencing, deep learning and immune-repertoire analysis could eventually support biomarker discovery, research-oriented screening and precision-medicine applications. These platforms developed as a component of AI technology points toward a future where the immune system’s molecular “fingerprints” can be analyzed by AI to uncover disease signals that may otherwise remain difficult to detect.

st 2

Welcome to Sci-Tech Bulletin

Discover mind-bending science breakthroughs in your inbox every week

This field is required.

We don’t spam! Read our privacy policy for more info.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top