Downloads · 30 days
14
11% of all-time downloads
akagabi/enemBERT
enemBERT is a token classification model from akagabi. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as apache-2.0.
Projeto independente, não afiliado ao INEP/MEC. / Independent project, not affiliated with INEP/MEC (the Brazilian bodies that administer the ENEM exam).
Downloads · 30 days
14
11% of all-time downloads
All-time downloads
128
Public
Parameters
108M
542 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors433 MB · 80%
From the Hugging Face model README
Projeto independente, não afiliado ao INEP/MEC. / Independent project, not affiliated with INEP/MEC (the Brazilian bodies that administer the ENEM exam).
A BERTimbau (neuralmind/bert-base-portuguese-cased) fine-tune that finds the five rhetorical elements of the ENEM proposta de intervenção — Competência 5 — inside an essay conclusion: AGENTE, AÇÃO, MEIO, EFEITO, DETALHAMENTO.
Faz: recebe um parágrafo (tipicamente a conclusão de uma redação do ENEM) e marca, como trechos do próprio texto, quais dos cinco elementos da proposta de intervenção estão presentes: quem deve agir (agente), o que deve ser feito (ação), como (meio), para quê (efeito) e um detalhamento adicional de algum desses elementos.
Não faz: não dá nota. O modelo nunca produz uma pontuação, nota de Competência 5 ou qualquer estimativa de nota. Ele aponta presença/ausência de elementos apontando as palavras exatas — nada além disso. Também não corrige erros gramaticais, não reescreve texto e não avalia as outras quatro competências do ENEM.
Isto é supervisão fraca (weak supervision). Os rótulos de treino e de avaliação foram gerados por um LLM (DeepSeek) aplicando o roteiro da Cartilha do Participante (INEP), com os trechos resolvidos para offsets de caracteres por casamento exato de citação. Nenhum rótulo passou por revisão ou correção humana. Isso é dito aqui de forma direta porque importa: o modelo aprendeu a imitar o rotulador, não uma verdade validada por um especialista. Veja "Avaliação" abaixo para o que isso implica na hora de ler os números.
Esquema BIO plano sobre 5 tipos de elemento (11 rótulos, ids 0–10):
O, B-AGENTE, I-AGENTE, B-ACAO, I-ACAO, B-MEIO, I-MEIO, B-EFEITO, I-EFEITO, B-DETALHAMENTO, I-DETALHAMENTO
| Elemento | Definição (parafraseada da Cartilha do Participante, INEP) |
|---|---|
| AGENTE | Quem deve executar a ação — instituição, órgão ou grupo social nomeado explicitamente. |
| AÇÃO | A medida concreta proposta para enfrentar o problema discutido na redação. |
| MEIO | Como a ação será colocada em prática — o instrumento ou modo utilizado. |
| EFEITO | Para quê a ação serve — a finalidade ou o resultado esperado. |
| DETALHAMENTO | Uma explicação a mais sobre outro elemento da proposta — detalha, exemplifica ou justifica. |
Sem gold humano, não há como medir "acerto" no sentido usual. O que existe são duas verificações, e ambas são reportadas com essa ressalva:
1. Concordância com o rotulador (não é "correção"). F1 por elemento do modelo contra os rótulos do LLM, no conjunto de teste retido e disjunto por prompt (255 redações, prompt-disjoint das 788 usadas em treino). "Overlap" conta um acerto quando a sobreposição entre trecho previsto e trecho rotulado passa de 50% (Jaccard ≥ 0.5); "exact" exige limites idênticos.
| Elemento | F1 overlap (modelo) | F1 overlap (baseline regex) | F1 exact (modelo) |
|---|---|---|---|
| AGENTE | 0.66 | 0.24 | 0.53 |
| AÇÃO | 0.50 | 0.18 | 0.34 |
| MEIO | 0.63 | 0.48 | 0.53 |
| EFEITO | 0.58 | 0.38 | 0.52 |
| DETALHAMENTO | 0.48 | 0.00 | 0.40 |
| micro | 0.58 | 0.27 | 0.45 |
O modelo supera o baseline (um marcador regex sobre conectivos como "por meio de", "a fim de") nos cinco elementos. Isso mostra que ele aprendeu algo além de casar palavras-gatilho, não que ele está "certo" num sentido absoluto — o baseline e o modelo estão sendo comparados contra o mesmo rótulo ruidoso.
2. Correlação com a nota real (a validação externa). Para cada redação do conjunto de teste, contamos quantos elementos distintos o modelo encontra e comparamos com a nota real de Competência 5 do ENEM daquela redação — uma nota atribuída por corretores humanos de verdade, nunca usada como sinal de treino. Correlação de Spearman ρ = 0.58 (n=255). Redações onde o modelo encontra os 5 elementos têm nota C5 média de 197.2 pontos (n=43); redações onde encontra ≤1 elemento têm média de 72.3 (n=57). Esse número é ancorado em avaliação humana real — mas só vale dentro deste corpus: num benchmark externo de 30 redações publicadas, a mesma correlação cai para ρ = 0.336 e deixa de ser monotônica (3 elementos → C5 médio 150; 4 elementos → C5 médio 100). Não use a contagem de elementos como nota. Ver o relatório do resultado negativo.
Python:
from transformers import pipeline
tagger = pipeline("token-classification", model="akagabi/enemBERT", aggregation_strategy="simple")
resultado = tagger(paragrafo_da_conclusao)
JavaScript (navegador, via transformers.js) — a redação nunca sai da máquina do usuário:
import { pipeline } from '@huggingface/transformers';
const tagger = await pipeline('token-classification', 'akagabi/enemBERT', { dtype: 'q8' });
const resultado = await tagger(paragrafo, { aggregation_strategy: 'simple' });
Treinado sobre kamel-usp/aes_enem_dataset (apache-2.0), 3.792 redações únicas ao todo. 800 redações foram rotuladas pelo LLM para o pool de treino (788 utilizáveis, 12 falharam na rotulagem), gerando 3.035 trechos rotulados: AGENTE 963, AÇÃO 1043, MEIO 353, EFEITO 547, DETALHAMENTO 129. O conjunto de teste retido (255 redações, 44 prompts, disjunto por prompt do treino) foi rotulado à parte, apenas para comparação com o baseline — a nota C5 real de cada redação já vinha no corpus original.
sourceB, ~85% do total de redações) chegou como um único bloco de texto sem quebras de parágrafo, por dano de OCR/crawl upstream. Essas redações são mais difíceis tanto para o rotulador quanto para o modelo.O demo chegou a mostrar uma estimativa de nota exata de Competência 5. Ela foi removida — não por cautela, mas porque a medimos direito e ela não funciona. No lugar dela ficou uma faixa grosseira de dois grupos, que é o que a evidência sustenta.
O que o demo mostra hoje: um único corte grosseiro em 3+ dos cinco elementos. Redações com 3+ elementos tiveram mediana de C5 real 150 (metade central 100–200, n=16); com 0–2 elementos, mediana 100 (metade central 50–140, n=14); Mann-Whitney p = 0.035. A direção se repete de forma independente no conjunto interno (medianas 80 → 200, n=255) — é por isso que ela é exibida. O painel declara na própria tela que as faixas se sobrepõem, que a amostra é de 30 redações e que a diferença não sobrevive à correção de Bonferroni para os 6 cortes testados. Cortes mais finos foram rejeitados por evidência: em 4+ elementos, p = 0.38, e as medianas por contagem exata não são monotônicas (3 elementos supera 4).
Relatório completo, com tabelas e método: resultado negativo da estimativa de nota.
Consequência para a contagem de elementos: o mesmo benchmark externo mostrou que a correlação entre número de elementos encontrados e nota real de C5 cai de ρ = 0.58 (dentro do corpus) para ρ = 0.336 fora dele, e não é monotônica — redações com 3 elementos encontrados têm média de C5 150, mas as com 4 têm média 100. Não use a contagem de elementos como medida de qualidade.
kamel-usp/aes_enem_dataset (apache-2.0).neuralmind/bert-base-portuguese-cased (BERTimbau).Pesos: Apache-2.0. Código do pipeline (treino, avaliação, demo): MIT, no repositório GitHub.
Does: takes a paragraph (typically an ENEM essay's conclusion) and marks, as spans of the original text, which of the five proposta de intervenção elements are present: who should act (agente), what should be done (ação), how (meio), to what end (efeito), and an additional elaboration of one of those elements (detalhamento).
Does not: never predicts a grade. No output, score, or Competência 5 estimate. It points at presence/absence of elements by pointing at the literal words, nothing more. It does not correct grammar, does not rewrite text, and does not evaluate any of the other four ENEM competencies.
This is weak supervision. Training and test labels were produced by an LLM (DeepSeek) applying the INEP Cartilha do Participante rubric, resolved to character offsets by exact quote matching. No label was human-reviewed or human-corrected. Stated plainly because it matters: the model learned to imitate the labeler, not a truth validated by an expert. See "Evaluation" below for what that means when reading the numbers.
Flat BIO scheme over 5 element types (11 labels, ids 0-10):
O, B-AGENTE, I-AGENTE, B-ACAO, I-ACAO, B-MEIO, I-MEIO, B-EFEITO, I-EFEITO, B-DETALHAMENTO, I-DETALHAMENTO
| Element | Definition (paraphrased from the Cartilha do Participante, INEP) |
|---|---|
| AGENTE | Who should carry out the action — an institution, agency, or social group named explicitly. |
| ACAO | The concrete measure proposed to address the essay's problem. |
| MEIO | How the action will be carried out — the instrument or method used. |
| EFEITO | What the action is for — its purpose or expected result. |
| DETALHAMENTO | An additional elaboration of another element — detailing, exemplifying, or justifying it. |
Without human gold, "correctness" in the usual sense is not measurable. What exists instead are two checks, both reported with that caveat attached:
1. Agreement with the labeler (not "correctness"). Per-element F1 of the model against the LLM labels, on the held-out, prompt-disjoint gold set (255 essays, prompt-disjoint from the 788 used in training). "Overlap" counts a match when predicted and labeled spans overlap by at least 50% (Jaccard >= 0.5); "exact" requires identical boundaries.
| Element | F1 overlap (model) | F1 overlap (regex baseline) | F1 exact (model) |
|---|---|---|---|
| AGENTE | 0.66 | 0.24 | 0.53 |
| ACAO | 0.50 | 0.18 | 0.34 |
| MEIO | 0.63 | 0.48 | 0.53 |
| EFEITO | 0.58 | 0.38 | 0.52 |
| DETALHAMENTO | 0.48 | 0.00 | 0.40 |
| micro | 0.58 | 0.27 | 0.45 |
The model beats the baseline (a regex tagger over discourse markers like "por meio de", "a fim de") on all five elements. That shows it learned something beyond trigger-word matching, not that it is "right" in an absolute sense — both model and baseline are being scored against the same noisy label.
2. Correlation with the real grade (the external check). For each held-out essay, we count how many distinct elements the model finds and compare against that essay's real ENEM Competência 5 grade — assigned by actual human graders, never used as a training signal. Spearman ρ = 0.58 (n=255). Essays where the model finds all 5 elements average a C5 grade of 197.2 (n=43); essays where it finds <=1 element average 72.3 (n=57). This number is anchored to real human judgment — but it only holds inside this corpus: on an external benchmark of 30 published essays the same correlation drops to ρ = 0.336 and stops being monotonic (3 elements → mean C5 150; 4 elements → mean C5 100). Do not use the element count as a grade. See the negative-result report.
Python:
from transformers import pipeline
tagger = pipeline("token-classification", model="akagabi/enemBERT", aggregation_strategy="simple")
result = tagger(conclusion_paragraph)
JavaScript (browser, via transformers.js) — the essay never leaves the user's machine:
import { pipeline } from '@huggingface/transformers';
const tagger = await pipeline('token-classification', 'akagabi/enemBERT', { dtype: 'q8' });
const result = await tagger(paragraph, { aggregation_strategy: 'simple' });
Trained on kamel-usp/aes_enem_dataset (apache-2.0), 3,792 unique essays overall. 800 essays were LLM-labeled for the training pool (788 usable, 12 failed labeling), yielding 3,035 labeled spans: AGENTE 963, ACAO 1043, MEIO 353, EFEITO 547, DETALHAMENTO 129. The held-out gold set (255 essays, 44 prompts, prompt-disjoint from training) was labeled separately for the baseline comparison — its real C5 grades came from the original corpus.
sourceB, roughly 85% of all essays) arrived as a single unbroken block of text with no paragraph breaks, due to upstream OCR/crawl damage. Those essays are harder for both the labeler and the model.The demo used to show an estimated exact Competência 5 grade. It has been removed — not out of caution, but because we measured it properly and it does not work. What replaced it is a coarse two-bucket band, which is what the evidence supports.
What the demo shows today: a single coarse cut at 3+ of the five elements. Essays with 3+ elements had a median real C5 of 150 (middle half 100–200, n=16); essays with 0–2 had a median of 100 (middle half 50–140, n=14); Mann-Whitney p = 0.035. The direction replicates independently on the in-corpus gold set (medians 80 → 200, n=255), which is why it is shown at all. The panel states on its own face that the ranges overlap, that the sample is 30 essays, and that the difference does not survive Bonferroni correction for the 6 cuts tried. Finer cuts were rejected on evidence: at 4+ elements p = 0.38, and per-exact-count medians are non-monotonic (3 elements outscores 4).
Full report with tables and method: score-estimate negative result.
Consequence for the element count: the same external benchmark showed the correlation between number of elements found and real C5 grade drops from ρ = 0.58 (in-corpus) to ρ = 0.336 externally, and is not monotonic — essays where 3 elements are found average a real C5 of 150, while those with 4 average 100. Do not use the element count as a quality score.
kamel-usp/aes_enem_dataset (apache-2.0).neuralmind/bert-base-portuguese-cased (BERTimbau).Weights: Apache-2.0. Pipeline code (training, evaluation, demo): MIT, in the GitHub repository.