| --- |
| language: en |
| license: apache-2.0 |
| tags: |
| - pytorch |
| - text-classification |
| - relation-extraction |
| - dei |
| - equibert |
| metrics: |
| - f1 |
| - accuracy |
| --- |
| |
| # EquiBERT β DEI Relation Extraction |
|
|
| **Model ID:** `SallySims/equibert-relation-extraction` |
|
|
| Extracts typed relations between DEI entities using entity markers. |
| Input format: `[E1] subject [/E1] ... [E2] object [/E2]` |
|
|
| ## Relation Types (12) |
|
|
| | Relation | Description | Example | |
| |----------|-------------|---------| |
| | `NO_RELATION` | No meaningful relation | β | |
| | `EXCLUDES` | Entity excludes another | Manager EXCLUDES BIPOC employees | |
| | `DISCRIMINATES` | Discriminatory act | Policy DISCRIMINATES AGAINST disabled staff | |
| | `ADVANTAGES` | Provides advantage | Programme ADVANTAGES white candidates | |
| | `DISADVANTAGES` | Creates disadvantage | Process DISADVANTAGES women | |
| | `ACCOUNTABLE_FOR` | Holds accountability | CHRO ACCOUNTABLE_FOR pay equity | |
| | `ADDRESSES` | Addresses an issue | Training ADDRESSES unconscious bias | |
| | `VIOLATES` | Policy violation | Screening VIOLATES anti-discrimination policy | |
| | `BENEFITS` | Provides benefit | ERG BENEFITS LGBTQ+ employees | |
| | `HARMS` | Causes harm | Language HARMS neurodiverse candidates | |
| | `REPRESENTS` | Representation claim | Board REPRESENTS diverse community | |
| | `REPORTS_ON` | Reporting relation | Annual report REPORTS_ON pay gap | |
| |
| ## Usage |
| |
| ```python |
| text = "[E1] manager [/E1] excluded [E2] BIPOC employees [/E2] from the workshop." |
| inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256) |
| # relation = id2label[model(**inputs).logits.argmax(-1).item()] |
| ``` |
| |
| ## Model Description |
| |
| EquiBERT is a multi-task DEI (Diversity, Equity and Inclusion) transformer |
| built on a dual-encoder backbone that fuses **RoBERTa-base** and |
| **DeBERTa-v3-base** via a learned weighted sum (Ξ± parameter). |
| The fused representation is fed into task-specific heads covering |
| 17 distinct DEI analysis tasks. |
| |
| **Organisation:** [SallySims](https://huggingface.co/SallySims) |
| **Framework:** PyTorch + HuggingFace Transformers |
| **Backbone:** RoBERTa-base + DeBERTa-v3-base (dual encoder, fused) |
| **Language:** English |
| **Domain:** Organisational DEI text β HR communications, policies, |
| job descriptions, performance reviews, leadership statements, reports |
| |
| ## Architecture |
| |
| ``` |
| Input Text |
| β |
| ββββΆ RoBERTa-base encoder βββΆ Linear projection |
| β β |
| ββββΆ DeBERTa-v3-base encoder βββΆ Linear projection |
| β |
| Weighted fusion (learned Ξ±) |
| β |
| Layer Norm + Dropout |
| β |
| Task-specific head (see below) |
| ``` |
| |
| ## Training Data |
| |
| Trained on synthetic DEI organisational text generated by the |
| EquiBERT synthetic data pipeline, covering 20 DEI categories |
| across HR, policy, leadership, and workforce analytics domains. |
| For production use, fine-tune on real labelled DEI data. |
| |
| ## Limitations |
| |
| - Trained on synthetic data β predictions should be validated |
| before use in real HR or policy decisions. |
| - English-only. |
| - Not a substitute for qualified DEI practitioners or legal advice. |
| - May reflect biases present in the training corpus. |
| |
| ## Citation |
| |
| If you use EquiBERT in your research, please cite: |
| |
| ```bibtex |
| @misc{equibert2024, |
| author = {SallySims}, |
| title = {EquiBERT: A Multi-Task DEI Transformer}, |
| year = {2024}, |
| publisher = {HuggingFace}, |
| url = {https://huggingface.co/SallySims} |
| } |
| ``` |
| |
| ## All EquiBERT Models |
| |
| | Model | Task | Primary Metric | |
| |-------|------|---------------| |
| | [equibert-bias-classifier](https://huggingface.co/SallySims/equibert-bias-classifier) | Bias Detection | Macro F1 | |
| | [equibert-microaggression](https://huggingface.co/SallySims/equibert-microaggression) | Microaggression Detection | Macro F1 | |
| | [equibert-category-tagger](https://huggingface.co/SallySims/equibert-category-tagger) | DEI Category Tagging | Macro F1 | |
| | [equibert-event-exclusion](https://huggingface.co/SallySims/equibert-event-exclusion) | Event Exclusion Classification | Macro F1 | |
| | [equibert-inclusive-language](https://huggingface.co/SallySims/equibert-inclusive-language) | Inclusive Language Scoring | Span F1 | |
| | [equibert-review-auditor](https://huggingface.co/SallySims/equibert-review-auditor) | Performance Review Auditing | Span F1 | |
| | [equibert-washing-detector](https://huggingface.co/SallySims/equibert-washing-detector) | DEI Washing Detection | MAE | |
| | [equibert-framing-scorer](https://huggingface.co/SallySims/equibert-framing-scorer) | Report Framing Scoring | MAE | |
| | [equibert-awareness-scorer](https://huggingface.co/SallySims/equibert-awareness-scorer) | DEI Awareness Scoring | MAE | |
| | [equibert-similarity](https://huggingface.co/SallySims/equibert-similarity) | Semantic Similarity | Accuracy | |
| | [equibert-ner](https://huggingface.co/SallySims/equibert-ner) | DEI Entity Recognition | Span F1 | |
| | [equibert-relation-extraction](https://huggingface.co/SallySims/equibert-relation-extraction) | Relation Extraction | Macro F1 | |
| | [equibert-qa](https://huggingface.co/SallySims/equibert-qa) | Extractive QA | Span EM | |
| | [equibert-search](https://huggingface.co/SallySims/equibert-search) | Semantic Search | MRR@10 | |
| | [equibert-nli](https://huggingface.co/SallySims/equibert-nli) | NLI / Textual Entailment | Macro F1 | |
| | [equibert-generator](https://huggingface.co/SallySims/equibert-generator) | DEI Text Generation | ROUGE-L | |
| |