CroVal: Community Question Answering Network
Dataset Description
The CroVal dataset is a heterogeneous network composed of a subset of Cross Validated, a question-and-answer website for people interested in statistics, machine learning, data analysis, data mining, and data visualization. We construct our HTAG based on the Cross Validated data dump released on April 6, 2024. After processing, it contains three types of entities—questions (34,153 nodes), users (8,898 nodes), and tags (1,335 nodes)—as well as three types of directed relations connecting three types of entities—a question "is related to" another question, a user "asks" a question, and a question "contains" a tag. Questions are associated with their titles and bodies, and all the other types of entities are textless. We concatenate the question title and body and pass it to a MiniLM sentence encoder, generating a 384-dimensional feature vector for each question node. Questions are categorized into six classes ("regression", "hypothesis-testing", "distributions", "neural-networks", "classification", and "clustering") based on their topic. On the question nodes, we attach the creation date as meta information.
Prediction task. Given the heterogeneous CroVal data, the task is to predict the primary topics of the given questions, which is cast as an ordinary multi-class classification problem. The metrics are the Micro-F1 and Macro-F1 scores.
Dataset splitting. We also split the data according to time. Specifically, we train on questions asked up to 2011, validate on those asked in 2012, and test on those asked since 2013.
Dataset Statistics.
# Nodes | # Edges | # Classes | # Splits |
---|---|---|---|
44386 | 164,981 | 6 | Train: 9,699 |
Question: 34153 | Question-Question: 46,269 | Valid: 9,889 | |
User: 8898 | Question-User: 34,153 | Test: 14,565 | |
Tag: 1335 | Question-Tag: 84,559 |
Dataset Construction
- Download
Posts.xml
andPostLinks.xml
(i.e.,stats.stackexchange.com.7z
) from the Cross Validated data dump released on April 6, 2024 - Run
extract_from_croval.py
to convert .xml to .csv - Run
graph_builder.ipynb