CoolFace
Modelpublic

margretmeng1020/regulatory-capacity-classifier

sourceHugging Facemitupdated 8mo agoView on Hugging Face
0likes8downloads
Model Card

Regulatory Capacity Classifier

A BERT-based multi-label classifier for analyzing regulatory capacities in collaborative learning dialogues.

Model Description

AttributeValue
Base Modelbert-base-uncased
TaskMulti-label Text Classification
Number of Labels12
Training StrategyWeighted BCEWithLogitsLoss for class imbalance
LanguageEnglish
FrameworkPyTorch + HuggingFace Transformers

Model Performance

Overall Metrics (Validation Set, Threshold=0.5)

MetricScore
F1-Micro0.6554
F1-Macro0.4675
Precision (Micro)0.5600
Recall (Micro)0.7800
Weighted Avg F10.6800

Per-Class Performance

LabelPrecisionRecallF1-ScoreSupport
Cog-Evaluate0.780.770.77104
Cog-Explain0.250.270.2622
Cog-Reason0.510.850.6447
Meta-Monitor0.640.830.72127
Meta-Orient0.260.830.4012
Meta-Plan0.390.730.5115
Meta-Reflect0.080.500.132
SE-Express0.550.690.6135
SE-Regulate0.250.620.368
TE-Act0.271.000.433
TE-Report0.690.890.7872

Cross-Validation Results (5-Fold)

FoldF1-MicroF1-MacroPrecisionRecall
Fold 10.64180.45010.37810.5717
Fold 20.63100.50320.46770.5914
Fold 30.49040.35690.25930.7470
Fold 40.67690.51340.44600.6331
Fold 50.66600.52110.44200.6584
Mean0.62120.46890.39860.6403
Std±0.0754±0.0685±0.0848±0.0687

Intended Use

This model is designed for analyzing collaborative learning dialogues to identify regulatory capacity categories:

Label Taxonomy

CategoryLabelsDescription
Cognitive (Cog-)Evaluate, Explain, Generate, ReasonCognitive processing and reasoning
Metacognitive (Meta-)Monitor, Orient, Plan, ReflectSelf-regulation and monitoring
Socio-emotional (SE-)Express, RegulateSocial and emotional expressions
Task Execution (TE-)Act, ReportTask-related actions and reporting

Training Data

AttributeSession 1Session 2Total
Total Samples1,6201,0822,702
AI-assisted Groups8655641,429
Teams Groups7555181,273
Unique Groups122436
Avg Text Length78.25 chars65.36 chars-
Avg Labels/Sample1.371.83-

Label Distribution (Session 1)

LabelCountPercentage
Meta-Monitor64139.57%
Cog-Evaluate44827.65%
TE-Report34521.30%
Cog-Reason24915.37%
SE-Express1489.14%
Meta-Orient1086.67%
Meta-Plan1086.67%
Cog-Explain935.74%
SE-Regulate332.04%
TE-Act261.60%
Meta-Reflect221.36%

Usage

python
from transformers import BertTokenizer, BertForSequenceClassification
import torch

# Load model and tokenizer
model_name = "your-username/regulatory-capacity-classifier"
tokenizer = BertTokenizer.from_pretrained(model_name)
model = BertForSequenceClassification.from_pretrained(model_name)

# Define labels
labels = [
    'Cog-Evaluate', 'Cog-Explain', 'Cog-Reason',
    'Meta-Monitor', 'Meta-Orient', 'Meta-Plan', 'Meta-Reflect',
    'SE-Express', 'SE-Regulate',
    'TE-Act', 'TE-Report'
]

# Inference function
def predict(text, threshold=0.5):
    inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=128)
    
    with torch.no_grad():
        outputs = model(**inputs)
        probs = torch.sigmoid(outputs.logits)
        predictions = (probs > threshold).int()
    
    predicted_labels = [labels[i] for i in range(len(labels)) if predictions[0][i] == 1]
    confidence = {labels[i]: float(probs[0][i]) for i in range(len(labels))}
    
    return predicted_labels, confidence

# Example usage
text = "I think we should evaluate our approach before moving forward."
predicted, confidence = predict(text)
print(f"Predicted labels: {predicted}")
print(f"Confidence scores: {confidence}")

Training Procedure

Hyperparameters

ParameterValue
Epochs8
Batch Size16
Learning Rate3e-5
Warmup Steps100
Max Sequence Length128
Loss FunctionWeighted BCEWithLogitsLoss
OptimizerAdamW
Train/Val Split80/20
Random Seed42

Class Weights (Computed)

Weights computed using formula: pos_weight = (total_samples - positive_samples) / positive_samples

LabelWeight
Meta-Reflect72.64
TE-Act61.31
SE-Regulate48.09
Cog-Explain16.42
Meta-Plan14.00
Meta-Orient14.00
SE-Express9.95
Cog-Reason5.51
TE-Report3.70
Cog-Evaluate2.62
Meta-Monitor1.53

Hardware

  • Device: Apple Silicon (MPS) / CUDA GPU
  • Training Time: ~10-15 minutes per epoch
  • Total FLOPs: 6.82 × 10^14

Limitations

  1. 1.Domain Specificity: Trained on collaborative learning dialogues; may not generalize to other dialogue types
  2. 2.Class Imbalance: Rare labels (Meta-Reflect, TE-Act) have lower prediction accuracy
  3. 3.Language: English only
  4. 4.Context Length: Maximum 128 tokens; longer texts are truncated
  5. 5.Session Shift: Performance may vary across different learning sessions due to distribution shift

Known Confusion Patterns

True LabelOften Confused WithCount
Cog-EvaluateCog-Reason33
Cog-EvaluateMeta-Monitor18
Meta-MonitorTE-Report17
Meta-MonitorMeta-Orient16
Cog-ReasonCog-Evaluate14

Ethical Considerations

  • This model is intended for educational research purposes
  • Should not be used as the sole basis for evaluating student performance
  • Human review is recommended for high-stakes applications

Citation

bibtex
@misc{regulatory-classifier-2026,
  title={Regulatory Capacity Classifier for Collaborative Learning Dialogues},
  author={Anonymous},
  year={2026},
  publisher={Hugging Face},
  url={https://huggingface.co/your-username/regulatory-capacity-classifier},
  note={Multi-label BERT classifier trained on 2,702 annotated utterances}
}

Model Card Authors

Generated on 2026-01-24


Files Included

FileDescription
model.safetensorsModel weights (SafeTensors format)
config.jsonModel configuration
vocab.txtBERT vocabulary
tokenizer_config.jsonTokenizer configuration
special_tokens_map.jsonSpecial tokens mapping
example_usage.pyUsage example script