LukeFP/physh_topic_supervised_classifier
0
1 2---3language: ["en"]4library_name: "pytorch"5pipeline_tag: "text-classification"6base_model: "google/embeddinggemma-300m"7tags: ["multi-label-classification", "hierarchical-classification", "physics", "physh", "transfer-learning"]8metrics: ["f1"]9---10 11 12 13# PhySH Topic Supervised Classifier14 15A hierarchical multi-label classifier that assigns APS Physics Subject Headings (PhySH) to physics papers using their titles and abstracts.16 17## Model description18 19The model uses frozen [`google/embeddinggemma-300m`](https://huggingface.co/google/embeddinggemma-300m) representations with a two-stage conditioned classifier:20 211. **Discipline classifier:** Predicts 18 broad APS disciplines.222. **Concept classifier:** Predicts 186 research-area concepts, conditioned on the discipline probabilities produced by the first stage.23 24This classifier-chain design incorporates the hierarchy between broad disciplines and more specific research concepts.25 26## Architecture27 28The input is formatted as:29 30```text31{title} [SEP] {abstract}32```33 34EmbeddingGemma produces a 768-dimensional, L2-normalized representation. The encoder remains frozen during training.35 36### Frozen encoder37 38```text39google/embeddinggemma-300m → 768 dimensions40```41 42### Discipline head43 44```text45768 → 1024 → 512 → 1846```47 48### Concept head49 50```text51[768-dimensional embedding; 18 discipline probabilities]52786 → 1024 → 512 → 18653```54 55Both classification heads use ReLU activations and dropout with `p = 0.3`. Their outputs are independent sigmoid scores rather than a softmax distribution, allowing multiple labels to be assigned to each paper.56 57The two MLP heads contain approximately 2.75 million trainable parameters in total.58 59## Training60 61* **Objective:** Multi-label binary cross-entropy with logits62* **Optimizer:** Adam63* **Encoder:** Frozen64* **Hardware:** Apple Metal Performance Shaders (MPS)65* **Optional objective:** Focal loss66* **Training run:** `20260130_140842`67 68## Evaluation69 70| Prediction level | Micro-F1 | Macro-F1 |71| ----------------- | -------: | -------: |72| Disciplines | 0.799 | 0.683 |73| Research concepts | 0.641 | 0.423 |74 75The model predicts approximately 2.12 labels per paper, compared with approximately 2.15 labels per paper in the evaluation data.76 77> **Evaluation-data note:** Add the dataset source, number of examples, train/validation/test split sizes, and split methodology before treating these results as independently reproducible.78 79## Inference80 81Inference applies a configurable threshold to each sigmoid score. If no score passes the threshold, the highest-scoring label is returned as a top-1 fallback.82 83Thresholds should be selected according to the intended precision–recall tradeoff:84 85* **Interactive demo threshold:** `0.35`86* **Batch-labeling threshold:** `0.85`87 88Try the model in the interactive demo.89 90## Intended uses91 92This model is intended for:93 94* Organizing and exploring physics literature95* Suggesting PhySH labels for paper titles and abstracts96* Supporting search, recommendation, and bibliometric workflows97* Research on hierarchical multi-label classification98 99Predictions should be treated as label suggestions rather than authoritative APS classifications.100 101## Limitations102 103* Performance is lower on rare concepts, as reflected by the gap between micro-F1 and macro-F1.104* Predictions depend on the information available in the title and abstract.105* The model may not generalize to fields, terminology, or document types that differ substantially from its training data.106* Output quality and label frequency depend on the selected inference threshold.107* The frozen encoder limits task-specific representation learning.108 109## Citation110 111If you use this model, please cite the model repository:112 113```bibtex114@misc{physh_topic_supervised_classifier,115 author = {Luke F},116 title = {PhySH Topic Supervised Classifier},117 year = {2026},118 publisher = {Hugging Face},119 url = {https://huggingface.co/LukeFP/physh_topic_supervised_classifier}120}121```122 