C4 Cognitive Adapters (V10 Gold)
12 lightweight LoRA adapters for multi-dimensional cognitive text classification based on the C4 Cognitive Coordinate System.
Live Demo: c4cognitive.com -- try the classifier in your browser
Overview
These adapters extend microsoft/mdeberta-v3-base with 65 classification heads organized into 12 specialized tiers. Together they classify text across cognitive, epistemic, logical, structural, and psychological dimensions.
The C4 system maps every text to a point in a 27-state cognitive space defined by three axes:
- T (Time): Past / Present / Future
- D (Scale): Concrete / Abstract / Meta
- A (Agency): Self / Other / System
Beyond the core (T, D, A) classification, the adapters provide fine-grained analysis across 11 additional dimensions.
Architecture
Each adapter is a small LoRA module (~800KB PyTorch, ~2-4KB ONNX head-only) that attaches to the frozen mDeBERTa-v3-base encoder. The adapters share the encoder and each outputs logits for its own set of classification heads.
Total parameters per adapter: ~200K trainable (vs 86M frozen encoder)
Adapters
| Adapter | Heads | Total Classes | Focus | Val Accuracy |
|---|---|---|---|---|
| core | 3 | 9 | T (time), D (scale), A (agency) | 85.9% |
| tier_1a_affect | 3 | 15 | valence, arousal, certainty | -- |
| tier_2_epistemic | 6 | 31 | epistemic type, evidence quality, source authority, temporal validity, domain specificity, novelty | -- |
| tier_3_logical | 6 | 32 | argument type, logical validity, premise count, conclusion strength, implicit assumptions, reasoning depth | -- |
| tier_4_paradigmatic | 6 | 35 | paradigm family, ontological stance, disciplinary lens, methodology preference, core assumption, boundary awareness | -- |
| tier_5_generative | 6 | 31 | research gap type, generative potential, controversy level, testability, application horizon, synthesis readiness | -- |
| tier_6_integration | 6 | 30 | complexity level, audience fit, actionability, visualization need, narrative coherence, insight density | 67.2% |
| tier_7a_structural | 6 | 33 | structure type, abstraction level, relation density, symmetry type, invariant core, composability | 69.0% |
| tier_8a_cognitive_filters | 6 | 25 | direction filter, chunk preference, comparison style, certainty display, cognitive flexibility, proactive/reactive | 79.5% |
| tier_10_transform_objects | 6 | 32 | object category, type, tangibility, scope, stability, centrality | -- |
| tier_11_transform_modes | 6 | 30 | mode temporal, source, scale, formality, pattern, reversibility | 70.0% |
| tier_12_psycho | 5 | 22 | motivation direction, TOTE phase, Satir stance, TA ego state, neurological level | 73.4% |
Total: 65 heads, 325 classes across 12 adapters
File Structure
pytorch/ # PyTorch adapter weights (for server-side inference)
core_adapter.pt
tier_1a_affect_adapter.pt
...
*_metrics.json # Training metrics per adapter
gold_training_summary.json
onnx/ # ONNX adapter heads (for browser/edge inference)
core.onnx
tier_1a_affect.onnx
...
metadata.json # Complete schema: heads, offsets, class counts
Usage
PyTorch (Server-side)
import torch
from transformers import AutoTokenizer, AutoModel
# Load shared encoder
tokenizer = AutoTokenizer.from_pretrained("microsoft/mdeberta-v3-base")
encoder = AutoModel.from_pretrained("microsoft/mdeberta-v3-base")
# Load adapter
adapter = torch.load("pytorch/core_adapter.pt", map_location="cpu")
# Classify
inputs = tokenizer("Your text here", return_tensors="pt", max_length=256, truncation=True)
with torch.no_grad():
hidden = encoder(**inputs).last_hidden_state[:, 0, :] # CLS token
# Apply adapter layers to get logits
# See metadata.json for head offsets
ONNX (Browser/Edge)
The ONNX files contain only the adapter head layers (linear projections from encoder hidden states to class logits). They are designed for use with ONNX Runtime Web after obtaining encoder embeddings.
// Browser example with ONNX Runtime Web
import * as ort from 'onnxruntime-web';
const session = await ort.InferenceSession.create('onnx/core.onnx');
// Feed CLS token embedding (768-dim) from encoder
const input = new ort.Tensor('float32', clsEmbedding, [1, 768]);
const results = await session.run({ input: input });
// results.output -> [batch, 9] logits for T(3) + D(3) + A(3)
Training Data
Adapters were trained on ~120K multilingual text samples (English and Russian) with LLM-generated labels refined through multi-model consensus. Training used frozen mDeBERTa-v3-base encoder with LoRA adapters, 10-12 epochs per tier.
Related
- Live Demo: c4cognitive.com -- interactive C4 classification in the browser
- Research Papers: github.com/cognitive-functors/articles -- 17 research papers, formal proofs, MASTm solver
- Base model: microsoft/mdeberta-v3-base
Citation
@misc{c4-cognitive-adapters-2026,
title={C4 Cognitive Adapters: Multi-dimensional Text Classification via LoRA},
author={Selyutin, Ilya and Kovalev, Nikolai},
year={2026},
url={https://huggingface.co/HangJang/c4-cognitive-adapters}
}
License
This work is available under a triple license:
- Apache-2.0-NC -- free for research, education, and personal use
- AGPL-3.0 -- free for open-source projects with copyleft obligation
- Commercial -- paid license for proprietary and SaaS use
See LICENSE for details.
Model tree for HangJang/c4-cognitive-adapters
Base model
microsoft/mdeberta-v3-base