The dataset viewer is not available for this dataset.
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
π± Green Patent Classification using PatentSBERTa
Silver Supervision + Active Learning + Human-in-the-Loop Fine-Tuning
This repository contains a fine-tuned version of PatentSBERTa for binary classification of patent claims into:
- 0 β Non-Green
- 1 β Green Technology
We created a balanced dataset of 50,000 claims:
- 25,000 Green (silver)
- 25,000 Non-Green (silver)
Stratified split:
- 70% Train
- 15% Pool (for active learning)
- 15% Evaluation
π§ Baseline Model (Frozen Embeddings)
We computed claim embeddings using:
A Logistic Regression classifier was trained on frozen embeddings.
Silver Evaluation Performance
- Accuracy β 77.5%
- Balanced precision and recall across classes
This confirms that domain-specific embeddings capture sustainability semantics effectively even without fine-tuning.
π Active Learning Strategy
To improve labeling efficiency, we selected high-risk examples from the unlabeled pool using uncertainty sampling:
Where:
p_greenis the modelβs predicted probability for class 1.- Higher
uindicates higher classification uncertainty.
The top 100 most uncertain examples were selected for expert review.
π€ LLM β Human HITL Workflow
LLM Used
qwen2.5:7b-instruct (via Ollama)
The LLM provided:
- Suggested label (0/1)
- Confidence level (low / medium / high)
- Short rationale quoting the claim
Human reviewers assigned the final gold label.
π Human Overrides (Required Reporting)
Override defined as:
This measures disagreement between the LLM and human expert.
Example Overrides
LLM 0 β Human 1
Claim: Conversion of biological material into energy.
Reason: Biomass-based energy conversion qualifies as renewable energy under green technology criteria.LLM 0 β Human 1
Claim: Light concentrating optic for photovoltaic device.
Reason: The invention directly improves solar energy generation, which is renewable and climate-mitigating.
Observed Pattern
The LLM tends to under-classify cases where renewable energy impact is implied but not explicitly framed as βclimate mitigation.β
This highlights the importance of human-in-the-loop review for borderline sustainability cases.
π Final Fine-Tuning
We fine-tuned:
Training data:
- Silver training split
- 100 human-labeled gold examples
Training configuration:
- Optimizer: AdamW
- Learning rate: 2e-5
- Epochs: 1
- Max sequence length: 256
- Batch size: 4
π Evaluation
The fine-tuned model was evaluated on:
- Silver evaluation set
- Gold HITL set
Fine-tuning improves performance especially on previously uncertain claims.
π» Usage Example
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_path = "your-model-path"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForSequenceClassification.from_pretrained(model_path)
text = "A system for converting biomass into renewable energy."
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=256)
with torch.no_grad():
outputs = model(**inputs)
prediction = torch.argmax(outputs.logits, dim=-1).item()
print("Green" if prediction == 1 else "Non-Green")
- Downloads last month
- 8