Encoder Fine-tuning with Stochastic Sampling Outperforms Open-weight GPT in Astronomy Knowledge Extraction

Shivam Rawat, Lucie Flek, Akbar Karimi

TL;DR

This paper introduces a domain-specific, lightweight model for extracting telescope and instrument information from astronomical literature. By fine-tuning the SciBERT model with a novel stochastic sampling approach, they achieve significantly better performance than a large, general-purpose GPT model, demonstrating the power of domain adaptation for efficient knowledge extraction.

What Problem Does This Paper Address?

The ever-increasing volume of scientific literature in astronomy makes it challenging to keep track of which instruments and telescopes are used in research. This information is crucial for bibliometric analysis, understanding scientific influence, and ensuring reproducibility. While large language models (LLMs) can extract information, they are often computationally expensive and not optimized for the specialized language of astronomy. This paper aims to bridge this gap by developing a more efficient, domain-adapted model for this specific knowledge extraction task.

Methods

The core of the proposed method is the fine-tuning of SciBERT, a BERT-based model pre-trained on scientific literature. The authors employ a multi-task learning approach to predict four boolean labels: "science," "instrumentation," "mention," and "not_telescope," along with the "telescope" itself.

The key innovation lies in their fine-tuning strategy. Instead of using the entire document or just the beginning, they randomly sample segments (chunks of 512 tokens) from the training data. This "stochastic sampling" is applied to the entire document, not just the initial parts, allowing the model to learn from all sections, including acknowledgments and grants, which often contain crucial instrument details. At inference time, they use majority voting across all sampled segments to determine the final prediction.

Datasets

The study utilizes the dataset provided for the TRACS@WASP task at IJCNLP-AACL 2025. This dataset comprises full papers or fragments from the SciX database, meticulously annotated by domain experts. It includes entries for three major telescopes: the Hubble Space Telescope (HST), the Chandra X-ray Observatory (CXO), and the James Webb Space Telescope (JWST). The dataset is structured with fields like "bibcode," "telescope," "title," "abstract," "body," and the four boolean labels for classification. The authors preprocess this data into JSON files, splitting concatenated text into 512-token chunks.

Key Insights and Ideas

  • Domain Adaptation Trumps Size: The most striking insight is that a smaller, domain-specific model (SciBERT) fine-tuned with a clever sampling strategy can significantly outperform a much larger, general-purpose LLM (20B-parameter GPT). This highlights the importance of tailoring models to specific scientific domains.
  • Stochastic Sampling for Comprehensive Learning: Randomly sampling segments from the entire document, rather than just the beginning, proves effective. This allows the model to capture information scattered throughout the text, which is crucial for nuanced tasks like identifying instrument mentions.
  • Context is King (and Tricky): The "science" and "mention" labels are harder to predict due to their high context dependency. This suggests that while explicit mentions are easier to detect, understanding the role of a telescope requires deeper semantic comprehension.
  • Naming Conventions Matter: The confusion matrix for telescope classification reveals that similar naming conventions (e.g., "Space Telescope" for HST and JWST) can lead to misclassifications, even for a well-tuned model.

Key Results

The paper reports impressive results:

  • SciBERT_v2 (stochastic sampling) achieved a Macro F1 score of 0.73, significantly outperforming the baseline SciBERT model without fine-tuning (0.18) and the OpenAI GPT-OSS-20B baseline (0.31).
  • SciBERT_v1 (using only the first 512 tokens) also performed well with a Macro F1 score of 0.72, demonstrating the effectiveness of SciBERT for this task even with simpler fine-tuning.
  • The model showed higher accuracy for the CHANDRA telescope compared to HST and JWST, likely due to more distinct naming.

Limitations and Future Work

The authors acknowledge several limitations:

  • Class Imbalance: The dataset exhibits significant skewness in the boolean labels, particularly for "FALSE" predictions, which can impact model performance.
  • Context Window Limitations: The current model's context window might be insufficient to fully grasp the subtle relationships required for predicting context-dependent labels like "science" and "mention."
  • Weak Supervision Noise: The reliance on weakly supervised labels could introduce noise, affecting the precision of attribute detection.

Future work includes exploring transformers with extended context windows, investigating data balancing strategies to address class skewness, and exploring contrastive learning methods to improve robustness across less frequent instruments. They also plan to investigate models pre-trained on astronomy-specific corpora to better capture nuanced contextual cues.

Summary updated

Abstract

Scientific literature in astronomy is rapidly expanding, making it increasingly important to automate the extraction of key entities and contextual information from research papers. In this paper, we present an encoder-based system for extracting knowledge from astronomy articles. Our objective is to develop models capable of classifying telescope references, detecting auxiliary semantic attributes, and recognizing instrument mentions from textual content. To this end, we implement a multi-task transformer-based system built upon the SciBERT model and fine-tuned for astronomy corpora classification. To carry out the fine-tuning, we stochastically sample segments from the training data and use majority voting over the test segments at inference time. Our system, despite its simplicity and low-cost implementation, significantly outperforms the open-weight GPT baseline.
BibTeX
@misc{rawat2025encoder,
  author = {Shivam Rawat and Lucie Flek and Akbar Karimi},
  title = {{Encoder Fine-tuning with Stochastic Sampling Outperforms Open-weight GPT in Astronomy Knowledge Extraction}},
  year = {2025},
  eprint = {2511.08204},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.08204},
}
Figure