teaislife/predrel-nli-deberta-v3
huggingface.co/teaislife/predrel-nli-deberta-v3
Model card
Predicate Alignment DeBERTa-v3
Fine-tuned DeBERTa-v3-base for aligning logical predicates in a neuro-symbolic first-order logic (FOL) pipeline. This model classifies the logical relation between two predicate definitions.
Labels
| ID | Label | Meaning |
|---|---|---|
| 0 | ENTAILMENT | Logical implication |
| 1 | UNRELATED | No logical relation between the predicates |
| 2 | COMPLEMENTARY | Strict negation (A and not-A) |
Training data
The model was fine-tuned on a combination of:
- HANS — entailment and unrelated examples for binary predicates, with swapped variables or constants.
- Negation templates — complementary pairs (A / non-A)
- ScoNe-NLI — scoped negation distractors
Usage
```python from transformers import AutoModelForSequenceClassification, AutoTokenizer import torch
model_id = "teaislife/predrel-nli-deberta-v3"
tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForSequenceClassification.from_pretrained(model_id) model.eval()
premise = "The first entity owns the second entity" hypothesis = "The first entity does not own the second entity"
inputs = tokenizer(premise, hypothesis, return_tensors="pt", truncation=True) with torch.inference_mode(): logits = model(**inputs).logits
pred_id = logits.argmax(-1).item() print(model.config.id2label[pred_id]) ```
Part of
This model is part of a neuro-symbolic pipeline that translates natural-language DAGs into first-order logic and builds bridge axioms between predicates.