Skip to main content
QUICK REVIEW

[Paper Review] SciDFM: A Large Language Model with Mixture-of-Experts for Science

Liangtai Sun, Dee Luo|arXiv (Cornell University)|Sep 27, 2024
Topic ModelingComputer Science3 citations
TL;DR

SciDFM is a mixture-of-experts (MoE) large language model trained from scratch with 18.2B total parameters and 5.6B active parameters, designed for college-level scientific reasoning and understanding of molecules and amino acid sequences. It achieves state-of-the-art performance on domain-specific benchmarks like Mol-Instructions among similarly sized models, while maintaining strong general science performance on SciEval and SciQ, enabled by a curated corpus of 1.1T tokens and instruction tuning on 9.3M samples.

ABSTRACT

Recently, there has been a significant upsurge of interest in leveraging large language models (LLMs) to assist scientific discovery. However, most LLMs only focus on general science, while they lack domain-specific knowledge, such as chemical molecules and amino acid sequences. To bridge these gaps, we introduce SciDFM, a mixture-of-experts LLM, which is trained from scratch and is able to conduct college-level scientific reasoning and understand molecules and amino acid sequences. We collect a large-scale training corpus containing numerous scientific papers and books from different disciplines as well as data from domain-specific databases. We further fine-tune the pre-trained model on lots of instruction data to improve performances on downstream benchmarks. From experiment results, we show that SciDFM achieves strong performance on general scientific benchmarks such as SciEval and SciQ, and it reaches a SOTA performance on domain-specific benchmarks among models of similar size. We further analyze the expert layers and show that the results of expert selection vary with data from different disciplines. To benefit the broader research community, we open-source SciDFM at https://huggingface.co/OpenDFM/SciDFM-MoE-A5.6B-v1.0.

Motivation & Objective

  • To address the limitation of general-purpose LLMs in handling domain-specific scientific content such as chemical molecules and amino acid sequences.
  • To enhance scientific reasoning and cross-disciplinary understanding in LLMs through a mixture-of-experts (MoE) architecture.
  • To build a large-scale, multi-domain scientific pretraining corpus integrating scientific literature and domain-specific databases.
  • To improve zero-shot and few-shot performance on scientific benchmarks through instruction tuning on 9.3M instruction-following samples.
  • To open-source a high-performing, specialized LLM for the broader AI4Science community.

Proposed method

  • SciDFM employs a transformer-based architecture with MoE layers replacing standard feed-forward networks, using 8 experts and routing top-2 experts per token.
  • The model uses a custom tokenizer that treats each atom and amino acid residue as a single token, with special identifiers for molecular and protein sequences.
  • Pretraining is conducted on a 1.1T-token corpus combining scientific literature (e.g., PubMed, arXiv), domain databases (e.g., PubChem, UniProt), and general language data.
  • The model is fine-tuned on 9.3 million instruction-following samples covering molecular structure interpretation, protein sequence reasoning, and scientific question-answering.
  • The MoE mechanism enables dynamic expert specialization, with routing decisions adapting to input modality and scientific discipline.
  • Hyperparameters are aligned with OpenLLaMa-3B, including 32 attention heads, 26 layers, and a context length of 8192 tokens.
Figure 1: Visualization of t-SNE results using data from different domains.
Figure 1: Visualization of t-SNE results using data from different domains.

Experimental results

Research questions

  • RQ1Can a MoE-based LLM trained from scratch achieve state-of-the-art performance on both general and domain-specific scientific reasoning benchmarks?
  • RQ2How does expert selection in the MoE layer vary across different scientific disciplines such as chemistry, biology, and mathematics?
  • RQ3To what extent does incorporating domain-specific tokenization for molecules and proteins improve scientific reasoning capabilities?
  • RQ4Does instruction tuning on 9.3M scientific instruction samples significantly improve zero-shot generalization on downstream tasks?
  • RQ5Can a single unified model effectively balance reasoning across diverse scientific modalities (text, molecules, proteins) without task-specific adaptation?

Key findings

  • SciDFM achieves state-of-the-art performance on the Mol-Instructions benchmark among models of similar size, outperforming existing specialized models.
  • On general scientific benchmarks, SciDFM achieves strong results on SciEval and SciQ, demonstrating robust college-level scientific reasoning.
  • Expert selection in the MoE layers shows distinct clustering patterns based on scientific discipline, indicating task-specific specialization.
  • The model’s performance is significantly enhanced by instruction tuning, with measurable gains on both general and domain-specific downstream tasks.
  • The integration of molecular and amino acid tokenization improves the model’s ability to understand and generate chemically accurate sequences.
  • The model demonstrates effective transfer learning across modalities, with MoE routing adapting dynamically to input content from different scientific domains.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.