Update README.md
Browse files123---license: mit---123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263---license: mitbase_model:- FacebookAI/xlm-roberta-largelanguage:- rutags:- Reasoning- Logical-Analysis- Text-Classification- AI-Safety- Evaluation- Judge-model---[](https://huggingface.co/skatzR/RQA-X1)# π§ RQA β Reasoning Quality Analyzer (v1)**RQA** is a **judge model** designed to evaluate the *quality of reasoning in text*.It does **not** generate, rewrite, or explain content β instead, it **assesses whether a text contains logical problems**, and if so, **what kind**.> **RQA is a judge, not a teacher and not a generator.**---## π What Problem Does RQA Solve?Modern LLM-generated and human-written texts often:- sound coherent,- use correct vocabulary,- follow a plausible narrative,β¦but still contain **logical problems** that are:- subtle,- hidden in structure,- difficult to detect with standard classifiers.**RQA focuses specifically on reasoning quality**, not style or factual correctness.---## π§© Model Overview| Property | Value ||--------|------|| **Model Type** | Judge / Evaluator || **Base Encoder** | XLM-RoBERTa Large || **Pooling** | Mean pooling || **Heads** | 2 (binary + multi-label) || **Language** | Russian π·πΊ || **License** | Mit |---## π§ What the Model PredictsRQA produces **two independent outputs**:### 1οΈβ£ Logical Issue Detection- **Binary decision**`has_logical_issue β {0, 1}`- Calibrated probability is provided### 2οΈβ£ Error Type Classification (Multi-label)If a logical issue exists, the model can identify one or more of the following error types:- `false_causality`- `unsupported_claim`- `overgeneralization`- `missing_premise`- `contradiction`- `circular_reasoning`> Error classification is applied **only if a logical issue is detected**.---## π§ Hidden Logical Problems (Key Concept)RQA explicitly distinguishes between:- **Explicit logical errors**(clearly identifiable fallacies)- **Hidden logical problems**(structural issues such as:- implicit assumptions,- shifts of criteria,- persuasive but unsupported reasoning)Hidden problems are **not labeling mistakes** β they are a **separate, intentional difficulty class**.---## ποΈ Architecture Details- **Encoder**: XLM-RoBERTa Large (pretrained weights preserved)- **Pooling**: Mean pooling (more stable than CLS for long texts)- **Two independent heads**:- Binary head: `has_logical_issue`- Multi-label head: `error_types`- **Separate projections and dropout** to reduce negative transfer---## π Training Philosophy### π Strict Data Contract- Logical texts **cannot** contain errors- Hidden problems **cannot** contain explicit error labels- Invalid samples are **removed**, never auto-fixed### βοΈ Balanced Difficulty- Hidden problems β€ **30%** of all problematic texts(`hidden / (explicit + hidden) β€ 0.3`)### π― Loss Design- Binary cross-entropy for issue detection- Masked multi-label loss for error types- **Uncertainty-weighted loss** for stable multi-task training---## π‘οΈ Confidence CalibrationRQA uses **post-hoc Temperature Scaling**:- Separate calibration for:- `has_logical_issue`- each error type- Ensures predicted probabilities reflect real confidence- Enables safe thresholding in production---## π Intended Use### β Recommended for:- Reasoning quality evaluation- LLM output auditing- AI safety pipelines- Educational or analytical tooling- Pre-filtering or routing in generation systems### β Not intended for:- Text generation- Explanation or correction of errors- Style or grammar analysis- Factual verification---## π§ͺ Model Behavior- Conservative by design- Optimized for **low false positives**- Explicitly robust to:- topic changes,- writing style,- emotional toneThe model judges **logic**, not rhetoric.---## π¦ Output Example```json{"has_logical_issue": true,"has_issue_probability": 0.87,"errors": [{ "type": "missing_premise", "probability": 0.72 },{ "type": "overgeneralization", "probability": 0.61 }]}```---## π Training Data (High-level)- **Custom-generated dataset**- **Thousands of long-form argumentative texts**- **Multiple domains and reasoning modes**- **Carefully controlled balance of:**- logical texts- explicit errors- hidden problems> The dataset was designed specifically for **judge behavior**, not for text generation.---## β οΈ Limitations- RQA evaluates **reasoning structure**, not factual truth- A logically valid argument may still be **factually incorrect**- Subtle philosophical disagreements are **not always logical errors**- The model may over-detect issues in highly rhetorical or persuasive texts.---## π§© Philosophy> **Good reasoning is not about sounding convincing β> it is about what actually follows from what.**RQA is built to reflect this principle.---## π§ Implementation DetailsThis model uses a custom Hugging Face architecture (`modeling_rqa.py`)and is loaded with:- `trust_remote_code=True`- `safetensors` weights (no `.bin` file)This is expected and fully supported by Hugging Face.---## π Quick Start```pythonfrom transformers import AutoTokenizer, AutoModeltokenizer = AutoTokenizer.from_pretrained("USERNAME/RQA-v1",trust_remote_code=True)model = AutoModel.from_pretrained("USERNAME/RQA-v1",trust_remote_code=True)inputs = tokenizer("Your text here", return_tensors="pt")outputs = model(**inputs)has_issue_logits = outputs["has_issue_logits"]errors_logits = outputs["errors_logits"]```---## π LicenseMIT---
README.md+263-3