# Book: Book Publication Network The Book dataset is a heterogeneous literature network composed of a subset of [GoodReads](https://www.goodreads.com), the world's largest social cataloging website for book tracking, book recommendations, book reviews, and book discussions. We construct our HTAG based on the source data provided by [the Goodreads Book Graph dataset](https://mengtingwan.github.io/data/goodreads) [1]. After processing, it contains three types of entities-books (594,484 nodes), authors (147,863 nodes), and publishers (43,910 nodes)—as well as three types of directed relations connecting three types of entities—a book "is similar to" another book, an author "writes" a book, and a book "is published by" a publisher. Books are associated with their titles and descriptions, and all the other types of entities are textless. We concatenate the book title and description and pass it to a [MiniLM](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) sentence encoder, generating a 384-dimensional feature vector for each book node. Each book is categorized into one or more of the following eight genres: "children", "poetry", "young-adult", "history, historical fiction, biography", "fantasy, paranormal", "mystery, thriller, crime", "comics, graphic", and "romance". Additionally, each book is associated with its year of publication. **Prediction task.** The task is to predict the genres of given books, which is formulated as a multi-label classification problem. We also use Micro-F1 and Macro-F1 scores to evaluate the performance. **Dataset splitting.** The dataset is split based on publication year. Specifically, we train on books published up to 2011, validate on books published in 2012, and test on books published since 2013. **Dataset statistics.** | # Nodes | # Edges | # Classes | # Splits | | ----------- | ----------------------- | --------- | -------------- | | **786,257** | **9,035,291** | 8 | Train: 330,201 | | Book | Book-Book: 7,614,902 | | Valid: 57,220 | | Author | Book-Author: 825,905 | | Test: 207,063 | | Publisher | Book-Publisher: 594,484 | | | [1] Wan, M., & McAuley, J. (2018, September). Item recommendation on monotonic behavior chains. In *Proceedings of the 12th ACM conference on recommender systems* (pp. 86-94). # Dataset Construction 1. Download `goodreads_books.json.gz` and `goodreads_book_genres_initial.json.gz` from [Goodreads Book Graph Datasets](https://mengtingwan.github.io/data/goodreads.html) 2. Run `extract_from_gbgd.py` 3. Run `graph_builder.ipynb`