Two infections can attack the human spine, produce nearly identical fevers, back pain and destructive bone lesions on MRI scans, and yet demand completely opposite treatments. One is brucellar spondylitis, a bacterial infection usually picked up from unpasteurized dairy products; the other is spinal tuberculosis, the stealthy skeletal manifestation of the world’s deadliest infectious disease. Getting the diagnosis wrong is not a minor error — it can mean months of the wrong antibiotics, unnecessary surgery, or progressive spinal destruction. Now a team of researchers in China reports that an artificial intelligence framework built around a Transformer architecture can tell the two conditions apart with striking accuracy, and their results were published in BMC Medical Imaging.
The study, led by Abudusalamu Alimujiang, Hao Zheng and Jie Lin with senior authors Songsong Xie, Qiyu Jia and Chuang Ma, was conducted across multiple hospitals in Xinjiang and other Chinese provinces, a region where both infections remain serious public health burdens. The researchers assembled a retrospective dataset of 238 patients, comprising 169 cases of brucellar spondylitis and 69 cases of spinal tuberculosis, each confirmed through clinical, microbiological and pathological standards. Because tuberculosis cases were far outnumbered by brucellosis cases, the team explicitly addressed this class imbalance during model development, a technical step that prevents a machine learning system from simply defaulting to the more common diagnosis.
The framework the researchers built is deliberately multi-layered. First, patients’ clinical information — the laboratory and demographic signals that physicians weigh in daily practice — was collected and encoded. Second, the team turned to radiomics, a technique that extracts hundreds of quantitative features from medical images: texture statistics such as gray-level co-occurrence matrix and gray-level run length matrix descriptors, which capture patterns of tissue heterogeneity invisible to the naked eye. Lesions were first segmented using the open-source 3D Slicer software to define the volume of interest on MRI scans, and the extracted radiomic features were then screened and reduced using methods including LASSO regularization and minimum redundancy maximum relevance selection, keeping only the most informative and reproducible variables.
The third pillar is the deep learning component, and here the team made a pragmatic choice. Full three-dimensional convolutional networks are powerful but data-hungry, and with a few hundred patients they risk overfitting. Instead, the researchers adopted a 2.5D approach: rather than treating an MRI volume as a single massive 3D object or as completely unrelated individual slices, the model processes adjacent slices together, preserving some spatial context across the spine while keeping the learning problem tractable. Several convolutional architectures were compared at the slice level, and ResNet18 — a compact, well-established network — proved the strongest performer, achieving an area under the curve of 0.863 during training, 0.766 in internal validation and 0.791 in external testing.
The genuinely novel step came next. Instead of crudely pasting the clinical, radiomic and deep learning outputs together, the team employed a Transformer — the same attention-based architecture that underlies modern language models — to perform deep fusion of the three feature streams. Attention mechanisms allow the model to learn which features from which modality matter most for each individual patient, weighting, for example, a subtle texture pattern in the vertebral body against an elevated inflammatory marker when the combination is most diagnostic. The Transformer fusion model reached an AUC of 0.901 in the validation cohort, decisively outperforming two alternative fusion strategies: multi-instance learning, which scored 0.812, and ensemble fusion, which scored 0.807.
When all components were combined into the final model, the performance figures were remarkable. The integrated framework achieved an AUC of 0.957 (95% confidence interval 0.928–0.986) in the training set, 0.916 (95% CI 0.834–0.998) in internal validation, and — critically — 0.896 (95% CI 0.797–0.994) on the completely independent external test set from a second hospital. The drop from training to external testing is modest by the standards of medical AI, where models frequently collapse when moved to new institutions with different scanners and patient populations. The authors describe the final model as showing the most balanced performance across all three cohorts.
Accuracy alone does not make a model clinically useful, so the team ran two further layers of analysis. Calibration curves assessed whether the model’s predicted probabilities actually corresponded to real-world likelihoods — a model that says “80% likely tuberculosis” should be right about four times out of five. Hosmer-Lemeshow testing was applied for this purpose, and the results supported the model’s reliability. Decision curve analysis, meanwhile, quantified net benefit across a range of clinical decision thresholds, demonstrating that acting on the model’s predictions would yield more benefit than treating every patient as having one disease or the other. The team also used gradient-weighted class activation mapping, or Grad-CAM, to visualize which regions of the MRI the network attended to, offering a measure of interpretability in a field often criticized for black-box decision-making.
The clinical stakes of this work are considerable. Brucellar spondylitis and spinal tuberculosis overlap in symptoms, in inflammatory blood markers, and even in many radiological signs, and definitive diagnosis typically requires cultures, serological tests such as the standard tube agglutination test, or molecular assays like the MTB/RIF test — tools that are slow, sometimes unavailable, or insensitive in regions where both diseases are endemic. A delay in distinguishing the two means delayed anti-tubercular therapy or delayed targeted antibiotics against Brucella, and in advanced cases, decisions about surgical decompression and stabilization hinge on knowing which pathogen is destroying the vertebrae. A non-invasive adjunct that works directly on routinely acquired MRI scans, requiring no additional procedures, could be deployed where specialized microbiology cannot.
The multicenter design strengthens the findings considerably. Data from Center A, totaling 198 patients, were split into a training set of 138 and an internal validation set of 60, while Center B contributed a fully independent external test set of 40 patients. This structure directly tests whether the model learned disease biology rather than the quirks of a single scanner or patient population. The study received ethics approval from the First Affiliated Hospital of Xinjiang Medical University with a waiver of informed consent, appropriate for retrospective analysis of de-identified clinical records, and was supported by funding including the National Natural Science Foundation of China and the Tianshan Talent program of Xinjiang.
The authors are appropriately measured about what comes next. Because the study is retrospective, prospective validation — testing the model on patients diagnosed going forward, in real time — is needed to establish generalizability, and further external cohorts from other endemic regions would test whether the model transfers across different genetic backgrounds of Brucella and Mycobacterium tuberculosis, different MRI protocols, and different prevalence levels. Still, the work represents a compelling demonstration of what careful, multi-modal AI can do with a genuinely hard diagnostic problem: not replacing the clinician, but handing them a second opinion computed from every quantitative shred of evidence the MRI and the laboratory can provide. For patients in brucellosis and tuberculosis hotspots, that second opinion could arrive in seconds rather than weeks — and could mean the difference between the right drug and the wrong one.
Subject of Research: A multimodal deep learning framework for differentiating brucellar spondylitis from spinal tuberculosis on MRI
Article Title: A 2.5D Transformer-based multi-modal fusion framework for differentiating between brucellar spondylitis and spinal tuberculosis: a multicenter study
Article References: Alimujiang, A., Zheng, H., Lin, J., Jienbai, W., Guo, J., Wang, X., Zhao, M., Jin, D., Ma, J., Xie, S., Jia, Q., & Ma, C. (2026). A 2.5D Transformer-based multi-modal fusion framework for differentiating between brucellar spondylitis and spinal tuberculosis: a multicenter study. BMC Medical Imaging. https://doi.org/10.1186/s12880-026-02762-w
Image Credits: AI Generated
DOI: 10.1186/s12880-026-02762-w
Keywords: brucellar spondylitis, spinal tuberculosis, Transformer, deep learning, MRI radiomics, multimodal fusion, artificial intelligence, medical imaging, differential diagnosis, multicenter study, ResNet18, machine learning
Cite Scienmag News
Ophelia Keating. (October 18, 2026). AI Transformer Spots the Difference Between Two Spine Infections Doctors Keep Mixing Up. Scienmag. https://scienmag.com/ai-transformer-spots-the-difference-between-two-spine-infections-doctors-keep-mixing-up/
Ophelia Keating. "AI Transformer Spots the Difference Between Two Spine Infections Doctors Keep Mixing Up." Scienmag, 18 October 2026, https://scienmag.com/ai-transformer-spots-the-difference-between-two-spine-infections-doctors-keep-mixing-up/. Accessed 18 October 2026.
Ophelia Keating. "AI Transformer Spots the Difference Between Two Spine Infections Doctors Keep Mixing Up." Scienmag. October 18, 2026. https://scienmag.com/ai-transformer-spots-the-difference-between-two-spine-infections-doctors-keep-mixing-up/

