Abstract
The existing search tools for exploring the NASA Astrophysics Data System (ADS) can be quite rich and empowering (e.g., similar and trending operators), but researchers are not yet allowed to fully leverage semantic search. For example, a query for "results from the Planck mission" should be able to distinguish between all the various meanings of Planck (person, mission, constant, institutions and more) without further clarification from the user. At ADS, we are applying modern machine learning and natural language processing techniques to our dataset of recent astronomy publications to train astroBERT, a deeply contextual language model based on research at Google. Using astroBERT, we aim to enrich the ADS dataset and improve its discoverability, and in particular we are developing our own named entity recognition tool. We present here our preliminary results and lessons learned.
Introduction
The NASA Astrophysics Data System (ADS) is a cornerstone of astronomical research, housing over 15 million records. However, traditional search mechanisms relying on keywords and Boolean logic often fail to capture the semantic nuances of the field. A primary challenge is disambiguation; terms like "Planck" can refer to an individual, a satellite mission, or a physical constant depending on the context. To address this, we developed astroBERT, a domain-specific language model designed to enable semantic search by understanding the intent and context inherent in astrophysical literature.
Methodology
Model Architecture and Training
AstroBERT is built upon the Bidirectional Encoder Representations from Transformers (BERT) architecture. Unlike general-purpose models, astroBERT is case-sensitive. This design choice is critical for astronomy, where acronyms such as WISE (Wide-field Infrared Survey Explorer) must be distinguished from the adjective "wise."
The model underwent pre-training using two primary objectives:
- Masked Language Modeling (MLM): Predicting hidden tokens within a sentence.
- Next Sentence Prediction (NSP): Determining the logical sequence of sentence pairs.
Training was conducted on a high-performance system featuring two NVIDIA V100 GPUs and 768GB of RAM.
Data Acquisition
The pre-training corpus consisted of 395,499 documents curated from the ADS database, totaling approximately 16GB of text (3.8 billion tokens). For evaluation, a specialized Named Entity Recognition (NER) benchmark was developed by extracting and annotating 6,279 organizations from the acknowledgment sections of 44,000 manuscripts.
Results and Discussion
Domain Adaptation and Perplexity
A key finding was the significant "dialect" gap between general English and astronomical literature; the vocabulary overlap between the original BERT and astroBERT is only 24.5%. Perplexity scores, which measure how well a model predicts a sample, demonstrate astroBERT's superior adaptation to the domain.
As shown in Table 2, astroBERT (MLM) achieved a perplexity of 4.16 on the ADS dataset, vastly outperforming the base BERT model's score of 38.4. This confirms that astronomical literature is essentially a distinct dialect that general-purpose models cannot fully grasp.
Named Entity Recognition Performance
The primary downstream application tested was NER for identifying organizations. AstroBERT demonstrated a clear advantage over general-purpose models in this task.
The inclusion of the NSP task, while slightly increasing perplexity, significantly improved NER performance. AstroBERT (NSP+MLM) reached an F1-score of 0.902, compared to 0.859 for the base BERT model (Table 1). This suggests that understanding inter-sentence relationships is vital for entity extraction in technical texts.
Conclusion and Future Work
AstroBERT represents a significant step toward semantic search in astrophysics. While current results are promising, future work will focus on refining data cleaning processes to remove "noise" like raw data tables and complex formulas. We also plan to expand the NER capabilities to include astronomical facilities and celestial objects. To support the community, astroBERT will be released via the Huggingface Model Hub.
Summary updated