Classify six GoEmotions annotation categories
The updated text example uses 5,272 selected GoEmotions records and six labels: love, anger, joy, sadness, surprise and fear. Its saved report evaluates 1,054 held-out texts.
1. Business decision
Text analysts can organize annotated language and inspect class-specific errors before using model scores for qualitative review. An emotion label describes the dataset annotation, not a person’s mental state or intent.
Updated annotation source
Use the packaged GoEmotions selection.
Class-specific evidence
Inspect the complete held-out confusion table.
Interpretation boundary
Treat labels as annotations, not psychological assessments.
2. Data set
The package contains an adapted GoEmotions subset from Google Research, with its selection and attribution documented in LICENSES/OPENNN-SOURCE.md. The current label order is love, anger, joy, sadness, surprise, fear; it differs from the former DAIR.AI example.
Source: GoEmotions. Dataset license: CC-BY-4.0. The downloadable ZIP includes the adapted data and attribution notices.
| Dataset measure | Saved value |
|---|---|
| Analysis unit | labelled text |
| Records | 5,272 |
| Raw variables | 2 |
| Encoded model inputs | 45 |
| Model outputs | 6 |
| Training roles | 3164 |
| Validation / selection roles | 1054 |
| Testing roles | 1054 |
| Unused roles | 0 |
| Field | Role | Type | Categories |
|---|---|---|---|
| input_sequence | Input | Numeric | |
| target_sequence | Target | Categorical | love, anger, joy, sadness, surprise, fear |
3. Model
The model has 45 encoded inputs and 6 outputs. No architecture-selection experiment is recorded in this project. The diagram shows the topology used by the saved model.
| Layer | Input shape | Output shape | Activation |
|---|---|---|---|
| Embedding | 45 | 45 × 64 | |
| MultiHeadAttention | 45 × 64 | 45 × 64 | |
| Pooling3d | 45 × 64 | 64 | |
| Dense | 64 | 64 | ReLU |
| Dense | 64 | 6 | Softmax |
Output values are uncalibrated model scores. Use the output encodings and decision rule documented with this project; do not assume independent sigmoid scores sum to one.

4. Training strategy
The saved training configuration uses Adam with CrossEntropy.
Adaptive moment estimation results
| Measure | Value |
|---|---|
| Epochs number | 75 |
| Elapsed time | 00:00:08 |
| Stopping criterion | Maximum epochs number |
| Training error | 0.632 |
| Validation error | 1.03 |

5. Model selection
No model selection experiment is recorded for this version. The validation subset guides fitting where a training report is present; it is distinct from the held-out test rows.
6. Testing analysis
The figures and tables below refer to the current project’s saved testing analysis. The subset uses testing role 2; it contains 1054 source records.
The multiclass decision uses the largest output score. The confusion matrix gives class prevalence and per-class errors; binary sensitivity, specificity, precision and a single ROC AUC are not interchangeable with this multiclass accuracy.
Confusion table
| Measure | Predicted love | Predicted anger | Predicted joy | Predicted sadness | Predicted surprise | Predicted fear | Total |
|---|---|---|---|---|---|---|---|
| Actual love | 258 (24.5%) | 11 (1.0%) | 14 (1.3%) | 9 (0.9%) | 3 (0.3%) | 2 (0.2%) | 297 (28.2%) |
| Actual anger | 12 (1.1%) | 131 (12.4%) | 12 (1.1%) | 21 (2.0%) | 16 (1.5%) | 10 (0.9%) | 202 (19.2%) |
| Actual joy | 15 (1.4%) | 19 (1.8%) | 106 (10.1%) | 15 (1.4%) | 12 (1.1%) | 6 (0.6%) | 173 (16.4%) |
| Actual sadness | 12 (1.1%) | 23 (2.2%) | 15 (1.4%) | 94 (8.9%) | 11 (1.0%) | 14 (1.3%) | 169 (16.0%) |
| Actual surprise | 7 (0.7%) | 10 (0.9%) | 9 (0.9%) | 6 (0.6%) | 95 (9.0%) | 6 (0.6%) | 133 (12.6%) |
| Actual fear | 6 (0.6%) | 15 (1.4%) | 6 (0.6%) | 14 (1.3%) | 9 (0.9%) | 30 (2.8%) | 80 (7.6%) |
| Total | 310 (29.4%) | 209 (19.8%) | 162 (15.4%) | 159 (15.1%) | 146 (13.9%) | 68 (6.5%) | 1054 (100.0%) |
| Test measure | Value |
|---|---|
| Testing records | 1054 |
| Accuracy | 67.74% |
| Largest-class baseline | 28.18% |
7. Model deployment
Open the downloaded project in Neural Designer, inspect the dataset roles and preprocessing, then review the saved task report. Use the same input schema and category order when calculating outputs. The ZIP contains the exact current .nd, its source data and the applicable dataset notices.
Workflow: source measurements → schema and availability checks → model output → domain review. Keep model versions, validation evidence and incoming-data monitoring together.
8. Evidence and limitations
Context, irony and mixed emotions can cause errors. The selected subset does not represent the prevalence of emotion in another text collection. Evaluate the same tokenizer, class order and text preprocessing, and review rare-class errors before applying the model to another domain.
References
- GoEmotions. Dorottya Demszky, Dana Movshovitz-Attias, Jeongwoo Ko, Alan Cowen,. 10.18653/v1/2020.acl-main.372
- Dataset terms: Creative Commons Attribution 4.0 International. Full attribution and transformations are included in
LICENSES/DATASET-LICENSE.txt. - Current Neural Designer project and saved task report, snapshot 6 October 2026.