Objective: The primary objective of this project is to design and implement machine learning models capable of accurately classifying research abstracts from the arXiv API into their respective categories or fields of research based on content. These models will leverage the power of natural language processing and artificial intelligence to automate a task that would be impractical to perform manually.
Challenge: arXiv is a repository of preprints for papers in the fields of physics, mathematics, computer science, quantitative biology, quantitative finance, and statistics. With the ever-increasing volume of research papers, there’s a compelling need for automated tools that can categorize these papers effectively to aid in better organization and search capabilities. This challenge is made harder because research often spans multiple fields, making manual categorization difficult.
Benefits: Automated arXiv abstract classification helps researchers find what they need faster, discover related research easily, and saves time by sorting content automatically.By streamlining the categorization process, it empowers researchers to focus on their core work, driving innovation and accelerating the pace of scientific discovery.
Comment: What kind of data does the arXiv API offer for building the classification model? Response: The arXiv API provides us with metadata for scientific papers, crucial for our model. This includes primary_category, categories, and abstracts, which are instrumental in training our algorithms for accurate classification based on abstract content.
Comment: Can you explain how the arXiv API provides access to research abstracts and what specific information you extract for text classification? Response: The arXiv API enables querying of their database to retrieve research abstracts and related metadata. For our text classification project, we’re focusing on extracting primary_category, categories, and the abstracts themselves. These elements are pivotal in training our model to predict the paper’s primary and secondary categories.
Comment: Have you considered using different models for Data Modeling, like Naive Bayes or Logistic Regression? Response: We acknowledge the suitability of Naive Bayes for our problem and have included it in our approach. However, per our professor’s guidance, we’re not using Logistic Regression. Our focus is on leveraging H2O’s AutoML for model selection, which provides a systematic and broad approach to identifying the most effective models for our task.
We have compiled a dataset from the arXiv API, consisting of metadata from scientific papers to train our classification model. The dataset includes the following columns:
primary_category: The main category under which the
paper is classified.categories: Additional categories that the paper falls
under.abstract: The abstract of the paper providing a summary
of the content.The dataset comprises a diverse range of topics from condensed matter
physics (cond-mat) to astrophysics (astro-ph)
and beyond. The abstracts vary in length and complexity, containing
detailed discussions of concepts such as electron-electron interactions,
quantum entanglement, and many others.
cond-mat, are more frequent than others, which may require
balancing techniques during model training.To build our classification model, we gathered metadata for scientific papers from the arXiv API. Below are the key points about our data collection process:
Automated Requests: We used the
httr and XML packages in R to automate the
process of sending queries to the arXiv API. This allowed us to fetch
records in chunks, handling up to 8000 records per request to stay
within the API’s limits.
Structured Querying: Our search was focused on
entries related to “electron” by setting the search_query
parameter to "all:electron". We iteratively adjusted the
start parameter to retrieve subsequent chunks of
data.
Data Parsing: After each successful API request,
we parsed the returned XML content to extract relevant fields:
primary_category, categories, and
abstract. These were then combined into a single data
frame.
Error Handling: We included error handling to stop the data fetching process if the API request failed, ensuring that we would be alerted to any issues immediately.
Resulting Dataset: The final dataset was trimmed
to exactly 20,000 records to match our target. This dataset was then
saved as a CSV file, arxiv_datafinal.csv, ready for
analysis.
Category Distribution: We used
ggplot2 to visualize the distribution of the paper
categories, gaining insights into the most prevalent topics within our
dataset.
Word Frequency: We utilized
tidytext and wordcloud to analyze the
frequency of words in abstracts, helping us identify the most common
terms and potential keywords relevant to the categories.
Abstract Length Analysis: We assessed the length of abstracts to understand the verbosity of each category and its potential impact on model performance.
Performance Metrics: We evaluated our models using confusion matrices, accuracy, precision, recall, and F1 scores to comprehensively understand their predictive capabilities.
Visualizing Results: Confusion matrices were
visualized using ggplot2 to present an intuitive view of
model performance across different categories.