Text Classification
Transformers
Safetensors
English
roberta
scientific-text
abstract-sections
text-embeddings-inference
Instructions to use hongccccccc/roberta-abstract-section-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hongccccccc/roberta-abstract-section-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="hongccccccc/roberta-abstract-section-classifier")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("hongccccccc/roberta-abstract-section-classifier") model = AutoModelForSequenceClassification.from_pretrained("hongccccccc/roberta-abstract-section-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,988 Bytes
f2afa04 a66c99c f2afa04 a66c99c f2afa04 2b50b70 a66c99c 2b50b70 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | ---
language: en
license: apache-2.0
base_model: roberta-base
pipeline_tag: text-classification
library_name: transformers
tags:
- scientific-text
- abstract-sections
widget:
- text: "We conclude that early intervention significantly improves patient outcomes."
example_title: "Conclusion sentence"
- text: "Participants were randomly assigned to treatment and control groups."
example_title: "Methods sentence"
- text: "The aim of this study was to evaluate the efficacy of the new vaccine."
example_title: "Objective sentence"
---
# RoBERTa Abstract-Section Classifier
[`roberta-base`](https://huggingface.co/roberta-base) fine-tuned to classify sentences from scientific abstracts into five rhetorical sections: `BACKGROUND`, `CONCLUSIONS`, `METHODS`, `OBJECTIVE`, `RESULTS`.
## Labels
| id | label | example |
|----|-------------|--------------------------------------------------|
| 0 | BACKGROUND | "Diabetes is a growing public health concern…" |
| 1 | CONCLUSIONS | "We conclude that early intervention improves outcomes." |
| 2 | METHODS | "Participants were randomly assigned to two groups…" |
| 3 | OBJECTIVE | "The aim of this study was to evaluate…" |
| 4 | RESULTS | "The treatment group showed a 40% reduction (p < 0.001)." |
## How to use
```python
from transformers import pipeline
clf = pipeline("text-classification", model="hongccccccc/roberta-abstract-section-classifier")
clf("The treatment group showed a 40% reduction in mortality compared with placebo.")
# [{'label': 'RESULTS', 'score': 0.99}]
```
## Training
- **Base model:** RoBERTa (Liu et al., 2019; `RobertaForSequenceClassification`, single-label, 5 classes)
- **Data:** 200,000 paper abstracts from PubMed (Canese and Weis, 2013), self-labeled with the five section categories
- **Fine-tuned:** January 2023, `transformers` 4.12.5 (original `training_args.bin` included)
## Evaluation
F1 score of **0.92** on a held-out 10% sample (details in Wright et al., 2022).
|