PeytonT's picture
Update full Metadata Category Classifier v2 model card
65ee0a7 verified
|
Raw
History Blame Contribute Delete
4.74 kB
---
library_name: transformers
base_model: allenai/scibert_scivocab_uncased
tags:
- research-library
- repository-library
- metadata-category-classifier
- m2
- t1_metadata
- text-classification
- v2
---
# Metadata Category Classifier
Classifies paper metadata from title and abstract text into arXiv-style category labels.
## Model Details
- Artifact type: full fine-tuned Transformers model
- Base model: `allenai/scibert_scivocab_uncased`
- Backbone type: encoder
- Model ID: `M2`
- Tier: `T1_metadata`
- Role in stack: metadata and global science-graph component
- Version: `v2`
This model is part of the Repository Library stack, a research system for indexing, retrieving, aligning, and reasoning over scientific papers, structured paper content, repositories, and cross-domain links between them.
## Model Sources
- Hugging Face repo: https://huggingface.co/PeytonT/metadata-category-classifier
- Hugging Face collection: https://huggingface.co/collections/PeytonT/research-library-6a49c589ef4d763f7539b50d
- GitHub repository: https://github.com/peytontolbert/research_library
- Experiment config: https://github.com/peytontolbert/research_library/blob/main/models/experiments/m2_metadata_category_classifier.json
- Models directory: https://github.com/peytontolbert/research_library/tree/main/models
## Intended Use
- Primary use: Classifies paper title and abstract metadata into category labels for metadata indexing and filtering.
- Downstream use: retrieval, ranking, routing, clustering, paper understanding, and global science-graph construction inside the broader Repository Library system.
- Out of scope: production safety claims, benchmark claims beyond the tracked experiment config, or deployment without task-specific validation.
## Training Data
The training inputs for this package were assembled from the following Repository Library data sources:
- Source `arxiv_metadata`: arXiv metadata records containing titles, abstracts, authors, categories, and update metadata.
The v2 hardening pass restricts the classifier target space to a denser category set:
- `max_labels`: 32
- `min_per_label`: 16
- `max_per_label`: 128
## Training Procedure
- Sources: `arxiv_metadata`
- Input fields: `title`, `abstract`
- Target fields: `categories`
- Filters: years `[2000, 2025]`
- Train/val/test split: `[0.9, 0.1, 0.0]`
- Max samples: 4000
- Batch size: 8
- Precision: `bf16`
- Objective: `cross_entropy`
- Learning rate: `5e-05`
- Max source tokens: 512
- Max target tokens: 128
- Fine-tune strategy: `full_finetune`
- Number of labels: 32
- Max steps: 1000
## Compute
- Hardware: 2x RTX_3090 (24 GB)
- Distributed strategy: `ddp`
- Estimated GPU hours in config: 0
## Evaluation
Declared metrics: `accuracy`, `macro_f1`
Tracked v2 eval metrics on the current held-out split:
- `eval_loss`: `0.003253802889958024`
- `eval_accuracy`: `1.0`
- `eval_macro_f1`: `1.0`
- `eval_balanced_accuracy`: `1.0`
- `eval_label_count`: `31`
Status: this card reflects the current tracked experiment configuration and packaged weights in the Repository Library model stack. The v2 scores are very high and should receive a leakage audit before being treated as a final benchmark.
## Usage
```python
from transformers import AutoModelForSequenceClassification, AutoTokenizer
repo_id = "PeytonT/metadata-category-classifier"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForSequenceClassification.from_pretrained(repo_id)
text = "TITLE: Example paper title
ABSTRACT: This paper studies representation learning for scientific documents."
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
outputs = model(**inputs)
predicted_id = outputs.logits.argmax(dim=-1).item()
label = model.config.id2label.get(predicted_id, str(predicted_id))
print(label)
```
## Limitations
- These cards are generated from tracked experiment metadata and packaged artifacts, not from a separate benchmark report or external audit.
- Several training sources are pipeline outputs from the Repository Library codebase rather than standalone public datasets.
- The v2 classifier uses a hardened 32-label target space rather than the full arXiv category universe.
- The current v2 eval result is perfect on the tracked split, which is useful as a pipeline check but should be audited for label leakage, split leakage, and class-distribution artifacts.
- These models are components of a larger research system and should be validated in their target workflow before deployment.
## Project Context
- GitHub repository: https://github.com/peytontolbert/research_library
- Model collection: https://huggingface.co/collections/PeytonT/research-library-6a49c589ef4d763f7539b50d
- Publisher: PeytonT