Skip to content

Add grobid_custom_hybrid profile with SciELO-preprints reference segmenter#680

Draft
de-code wants to merge 9 commits into
mainfrom
add-reference-segmenter-scielo-preprints-profile
Draft

Add grobid_custom_hybrid profile with SciELO-preprints reference segmenter#680
de-code wants to merge 9 commits into
mainfrom
add-reference-segmenter-scielo-preprints-profile

Conversation

@de-code

@de-code de-code commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

part of https://github.com/eLifePathways/ScienceBeam2.0/issues/113

Introduces a new sequence-model profile that overlays the grobid 0.9.0 CRF/wapiti baseline with our own retrained DELFT models, starting with a CustomBidLSTM_CRF reference segmenter trained on SciELO preprints. Intended to grow as more custom models are retrained and swapped in.

…enter

Introduces a new sequence-model profile that overlays the grobid 0.9.0 CRF/wapiti baseline with our own retrained DELFT models, starting with a CustomBidLSTM_CRF reference segmenter trained on SciELO preprints.
Intended to grow as more custom models are retrained and swapped in.
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

ScienceBeam Parser Evaluation

Overall (280 docs across 6 corpora)

grobid 0.9.0-crf (default): 280 docs | sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf): 280 docs | sciencebeam-parser:pr-680-c09ca2e8-20260703.1147 (grobid_custom_hybrid): 280 docs

Field (method) Type grobid 0.9.0-crf (default) sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf) sciencebeam-parser:pr-680-c09ca2e8-20260703.1147 (grobid_custom_hybrid) Δ grobid 0.9.0-crf (default) Δ sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf)
title (exact) string 0.517 0.513 0.513 -0.004 +0.000
title (levenshtein) string 0.636 0.643 0.643 +0.007 +0.000
title (edit_sim) string 0.631 0.636 0.636 +0.005 +0.000
abstract (levenshtein) string 0.640 0.636 0.636 -0.004 +0.000
abstract (edit_sim) string 0.660 0.660 0.660 +0.000 +0.000
author_full_names (levenshtein) partial_ulist 0.734 0.731 0.731 -0.004 +0.000
author_full_names (edit_sim) partial_ulist 0.740 0.745 0.745 +0.005 +0.000
affiliation_text (levenshtein) partial_ulist 0.443 0.443 0.443 +0.000 +0.000
affiliation_text (edit_sim) partial_ulist 0.558 0.542 0.542 -0.015 +0.000
keywords (levenshtein) partial_ulist 0.479 0.000 0.000 -0.479 +0.000
keywords (edit_sim) partial_ulist 0.444 0.000 0.000 -0.444 +0.000
body_section_titles (levenshtein) partial_list 0.228 0.222 0.222 -0.006 +0.000
body_section_titles (edit_sim) partial_list 0.228 0.227 0.227 -0.001 +0.000
acknowledgement (levenshtein) string 0.454 0.385 0.385 -0.069 +0.000
acknowledgement (edit_sim) string 0.463 0.399 0.399 -0.065 +0.000
first_reference_text (levenshtein) string 0.366 0.372 0.330 -0.036 -0.042
first_reference_text (edit_sim) string 0.504 0.507 0.419 -0.085 -0.088
reference_title (levenshtein) partial_list 0.320 0.319 0.301 -0.019 -0.018
reference_title (edit_sim) partial_list 0.329 0.337 0.316 -0.014 -0.021
reference_doi (levenshtein) partial_ulist 0.544 0.427 0.365 -0.179 -0.062
reference_doi (edit_sim) partial_ulist 0.489 0.398 0.322 -0.168 -0.076
biorxiv (47 docs)

grobid 0.9.0-crf (default): 47 docs | sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf): 47 docs | sciencebeam-parser:pr-680-c09ca2e8-20260703.1147 (grobid_custom_hybrid): 47 docs

Field (method) Type grobid 0.9.0-crf (default) sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf) sciencebeam-parser:pr-680-c09ca2e8-20260703.1147 (grobid_custom_hybrid) Δ grobid 0.9.0-crf (default) Δ sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf)
title (exact) string 0.867 0.840 0.840 -0.028 +0.000
title (levenshtein) string 0.956 0.956 0.956 +0.000 +0.000
title (edit_sim) string 0.942 0.942 0.942 +0.000 +0.000
abstract (levenshtein) string 0.779 0.779 0.779 +0.000 +0.000
abstract (edit_sim) string 0.773 0.780 0.780 +0.007 +0.000
author_full_names (levenshtein) partial_ulist 0.977 0.975 0.975 -0.002 +0.000
author_full_names (edit_sim) partial_ulist 0.946 0.951 0.951 +0.005 +0.000
affiliation_text (levenshtein) partial_ulist 0.877 0.816 0.816 -0.060 +0.000
affiliation_text (edit_sim) partial_ulist 0.877 0.821 0.821 -0.056 +0.000
keywords (levenshtein) partial_ulist 0.835 0.000 0.000 -0.835 +0.000
keywords (edit_sim) partial_ulist 0.834 0.000 0.000 -0.834 +0.000
body_section_titles (levenshtein) partial_list 0.456 0.376 0.376 -0.080 +0.000
body_section_titles (edit_sim) partial_list 0.432 0.373 0.373 -0.060 +0.000
acknowledgement (levenshtein) string 0.732 0.548 0.548 -0.184 +0.000
acknowledgement (edit_sim) string 0.731 0.586 0.586 -0.146 +0.000
first_reference_text (levenshtein) string 0.905 0.905 0.892 -0.013 -0.013
first_reference_text (edit_sim) string 0.869 0.869 0.869 -0.000 -0.000
reference_title (levenshtein) partial_list 0.694 0.730 0.617 -0.078 -0.113
reference_title (edit_sim) partial_list 0.653 0.690 0.583 -0.071 -0.107
reference_doi (levenshtein) partial_ulist 0.865 0.858 0.685 -0.179 -0.172
reference_doi (edit_sim) partial_ulist 0.824 0.821 0.590 -0.233 -0.231
ore (49 docs)

grobid 0.9.0-crf (default): 49 docs | sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf): 49 docs | sciencebeam-parser:pr-680-c09ca2e8-20260703.1147 (grobid_custom_hybrid): 49 docs

Field (method) Type grobid 0.9.0-crf (default) sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf) sciencebeam-parser:pr-680-c09ca2e8-20260703.1147 (grobid_custom_hybrid) Δ grobid 0.9.0-crf (default) Δ sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf)
title (exact) string 0.537 0.515 0.515 -0.022 +0.000
title (levenshtein) string 0.600 0.639 0.639 +0.039 +0.000
title (edit_sim) string 0.717 0.742 0.742 +0.025 +0.000
abstract (levenshtein) string 0.693 0.693 0.693 +0.000 +0.000
abstract (edit_sim) string 0.738 0.740 0.740 +0.002 +0.000
author_full_names (levenshtein) partial_ulist 0.802 0.798 0.798 -0.004 +0.000
author_full_names (edit_sim) partial_ulist 0.792 0.794 0.794 +0.002 +0.000
affiliation_text (levenshtein) partial_ulist 0.564 0.507 0.507 -0.057 +0.000
affiliation_text (edit_sim) partial_ulist 0.577 0.514 0.514 -0.063 +0.000
keywords (levenshtein) partial_ulist 0.297 0.000 0.000 -0.297 +0.000
keywords (edit_sim) partial_ulist 0.292 0.000 0.000 -0.292 +0.000
body_section_titles (levenshtein) partial_list 0.198 0.228 0.228 +0.030 +0.000
body_section_titles (edit_sim) partial_list 0.232 0.271 0.271 +0.038 +0.000
acknowledgement (levenshtein) string 0.921 0.885 0.885 -0.035 +0.000
acknowledgement (edit_sim) string 0.935 0.881 0.881 -0.054 +0.000
first_reference_text (levenshtein) string 0.444 0.469 0.367 -0.078 -0.102
first_reference_text (edit_sim) string 0.620 0.606 0.363 -0.256 -0.242
reference_title (levenshtein) partial_list 0.229 0.283 0.289 +0.061 +0.007
reference_title (edit_sim) partial_list 0.262 0.312 0.309 +0.047 -0.002
reference_doi (levenshtein) partial_ulist 0.641 0.033 0.017 -0.625 -0.016
reference_doi (edit_sim) partial_ulist 0.494 0.010 0.004 -0.490 -0.005
pkp (50 docs)

grobid 0.9.0-crf (default): 50 docs | sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf): 50 docs | sciencebeam-parser:pr-680-c09ca2e8-20260703.1147 (grobid_custom_hybrid): 50 docs

Field (method) Type grobid 0.9.0-crf (default) sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf) sciencebeam-parser:pr-680-c09ca2e8-20260703.1147 (grobid_custom_hybrid) Δ grobid 0.9.0-crf (default) Δ sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf)
title (exact) string 0.592 0.592 0.592 +0.000 +0.000
title (levenshtein) string 0.649 0.649 0.649 +0.000 +0.000
title (edit_sim) string 0.542 0.542 0.542 +0.000 +0.000
abstract (levenshtein) string 0.750 0.750 0.750 +0.000 +0.000
abstract (edit_sim) string 0.722 0.722 0.722 -0.000 +0.000
author_full_names (levenshtein) partial_ulist 0.836 0.847 0.847 +0.010 +0.000
author_full_names (edit_sim) partial_ulist 0.819 0.849 0.849 +0.030 +0.000
affiliation_text (levenshtein) partial_ulist 0.400 0.435 0.435 +0.035 +0.000
affiliation_text (edit_sim) partial_ulist 0.470 0.466 0.466 -0.004 +0.000
keywords (levenshtein) partial_ulist 0.000 0.000 0.000 +0.000 +0.000
keywords (edit_sim) partial_ulist 0.000 0.000 0.000 +0.000 +0.000
body_section_titles (levenshtein) partial_list 0.000 0.000 0.000 +0.000 +0.000
body_section_titles (edit_sim) partial_list 0.000 0.000 0.000 +0.000 +0.000
acknowledgement (levenshtein) string 0.000 0.000 0.000 +0.000 +0.000
acknowledgement (edit_sim) string 0.000 0.000 0.000 +0.000 +0.000
first_reference_text (levenshtein) string 0.000 0.000 0.000 +0.000 +0.000
first_reference_text (edit_sim) string 0.000 0.000 0.000 +0.000 +0.000
reference_title (levenshtein) partial_list 0.000 0.000 0.000 +0.000 +0.000
reference_title (edit_sim) partial_list 0.000 0.000 0.000 +0.000 +0.000
reference_doi (levenshtein) partial_ulist 0.000 0.000 0.000 +0.000 +0.000
reference_doi (edit_sim) partial_ulist 0.000 0.000 0.000 +0.000 +0.000
scielo_br (50 docs)

grobid 0.9.0-crf (default): 50 docs | sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf): 50 docs | sciencebeam-parser:pr-680-c09ca2e8-20260703.1147 (grobid_custom_hybrid): 50 docs

Field (method) Type grobid 0.9.0-crf (default) sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf) sciencebeam-parser:pr-680-c09ca2e8-20260703.1147 (grobid_custom_hybrid) Δ grobid 0.9.0-crf (default) Δ sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf)
title (exact) string 0.462 0.485 0.485 +0.023 +0.000
title (levenshtein) string 0.485 0.485 0.485 +0.000 +0.000
title (edit_sim) string 0.512 0.512 0.512 +0.000 +0.000
abstract (levenshtein) string 0.697 0.677 0.677 -0.020 +0.000
abstract (edit_sim) string 0.666 0.652 0.652 -0.013 +0.000
author_full_names (levenshtein) partial_ulist 0.607 0.592 0.592 -0.015 +0.000
author_full_names (edit_sim) partial_ulist 0.658 0.653 0.653 -0.005 +0.000
affiliation_text (levenshtein) partial_ulist 0.000 0.000 0.000 +0.000 +0.000
affiliation_text (edit_sim) partial_ulist 0.298 0.295 0.295 -0.003 +0.000
keywords (levenshtein) partial_ulist 0.538 0.000 0.000 -0.538 +0.000
keywords (edit_sim) partial_ulist 0.515 0.000 0.000 -0.515 +0.000
body_section_titles (levenshtein) partial_list 0.265 0.291 0.291 +0.026 +0.000
body_section_titles (edit_sim) partial_list 0.275 0.295 0.295 +0.020 +0.000
acknowledgement (levenshtein) string 0.667 0.571 0.571 -0.095 +0.000
acknowledgement (edit_sim) string 0.704 0.618 0.618 -0.086 +0.000
first_reference_text (levenshtein) string 0.083 0.043 0.000 -0.083 -0.043
first_reference_text (edit_sim) string 0.399 0.394 0.287 -0.111 -0.107
reference_title (levenshtein) partial_list 0.388 0.318 0.278 -0.110 -0.040
reference_title (edit_sim) partial_list 0.407 0.365 0.315 -0.092 -0.050
reference_doi (levenshtein) partial_ulist 0.934 0.897 0.866 -0.069 -0.031
reference_doi (edit_sim) partial_ulist 0.890 0.842 0.823 -0.067 -0.019
scielo_mx (34 docs)

grobid 0.9.0-crf (default): 34 docs | sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf): 34 docs | sciencebeam-parser:pr-680-c09ca2e8-20260703.1147 (grobid_custom_hybrid): 34 docs

Field (method) Type grobid 0.9.0-crf (default) sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf) sciencebeam-parser:pr-680-c09ca2e8-20260703.1147 (grobid_custom_hybrid) Δ grobid 0.9.0-crf (default) Δ sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf)
title (exact) string 0.057 0.057 0.057 +0.000 +0.000
title (levenshtein) string 0.489 0.489 0.489 +0.000 +0.000
title (edit_sim) string 0.474 0.474 0.474 +0.000 +0.000
abstract (levenshtein) string 0.111 0.111 0.111 +0.000 +0.000
abstract (edit_sim) string 0.385 0.386 0.386 +0.001 +0.000
author_full_names (levenshtein) partial_ulist 0.670 0.670 0.670 +0.000 +0.000
author_full_names (edit_sim) partial_ulist 0.654 0.654 0.654 +0.000 +0.000
affiliation_text (levenshtein) partial_ulist 0.099 0.143 0.143 +0.044 +0.000
affiliation_text (edit_sim) partial_ulist 0.423 0.424 0.424 +0.001 +0.000
keywords (levenshtein) partial_ulist 0.598 0.000 0.000 -0.598 +0.000
keywords (edit_sim) partial_ulist 0.556 0.000 0.000 -0.556 +0.000
body_section_titles (levenshtein) partial_list 0.000 0.000 0.000 +0.000 +0.000
body_section_titles (edit_sim) partial_list 0.000 0.000 0.000 +0.000 +0.000
acknowledgement (levenshtein) string 0.000 0.000 0.000 +0.000 +0.000
acknowledgement (edit_sim) string 0.000 0.000 0.000 +0.000 +0.000
first_reference_text (levenshtein) string 0.432 0.432 0.389 -0.044 -0.044
first_reference_text (edit_sim) string 0.538 0.540 0.475 -0.063 -0.065
reference_title (levenshtein) partial_list 0.327 0.326 0.222 -0.105 -0.104
reference_title (edit_sim) partial_list 0.342 0.345 0.271 -0.072 -0.075
reference_doi (levenshtein) partial_ulist 0.000 0.000 0.000 +0.000 +0.000
reference_doi (edit_sim) partial_ulist 0.000 0.000 0.000 +0.000 +0.000
scielo_preprints-jats (50 docs)

grobid 0.9.0-crf (default): 50 docs | sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf): 50 docs | sciencebeam-parser:pr-680-c09ca2e8-20260703.1147 (grobid_custom_hybrid): 50 docs

Field (method) Type grobid 0.9.0-crf (default) sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf) sciencebeam-parser:pr-680-c09ca2e8-20260703.1147 (grobid_custom_hybrid) Δ grobid 0.9.0-crf (default) Δ sciencebeam-parser:main-0baf0824-20260701.1904 (grobid_crf)
title (exact) string 0.462 0.462 0.462 +0.000 +0.000
title (levenshtein) string 0.611 0.611 0.611 +0.000 +0.000
title (edit_sim) string 0.571 0.572 0.572 +0.001 +0.000
abstract (levenshtein) string 0.649 0.649 0.649 +0.000 +0.000
abstract (edit_sim) string 0.595 0.600 0.600 +0.004 +0.000
author_full_names (levenshtein) partial_ulist 0.509 0.499 0.499 -0.010 +0.000
author_full_names (edit_sim) partial_ulist 0.557 0.553 0.553 -0.004 +0.000
affiliation_text (levenshtein) partial_ulist 0.636 0.686 0.686 +0.051 +0.000
affiliation_text (edit_sim) partial_ulist 0.677 0.712 0.712 +0.035 +0.000
keywords (levenshtein) partial_ulist 0.662 0.000 0.000 -0.662 +0.000
keywords (edit_sim) partial_ulist 0.522 0.000 0.000 -0.522 +0.000
body_section_titles (levenshtein) partial_list 0.388 0.375 0.375 -0.013 +0.000
body_section_titles (edit_sim) partial_list 0.367 0.361 0.361 -0.006 +0.000
acknowledgement (levenshtein) string 0.286 0.200 0.200 -0.086 +0.000
acknowledgement (edit_sim) string 0.286 0.200 0.200 -0.086 +0.000
first_reference_text (levenshtein) string 0.387 0.438 0.387 +0.000 -0.050
first_reference_text (edit_sim) string 0.635 0.667 0.564 -0.071 -0.102
reference_title (levenshtein) partial_list 0.304 0.283 0.394 +0.091 +0.111
reference_title (edit_sim) partial_list 0.333 0.331 0.418 +0.085 +0.087
reference_doi (levenshtein) partial_ulist 0.671 0.654 0.518 -0.153 -0.136
reference_doi (edit_sim) partial_ulist 0.592 0.606 0.420 -0.171 -0.186

…enter

  Introduces a new sequence-model profile that overlays the grobid 0.9.0
  CRF/wapiti baseline with our own retrained DELFT models, starting with
  a CustomBidLSTM_CRF reference segmenter trained on SciELO preprints.
  Intended to grow as more custom models are retrained and swapped in.
  Also wires up the profile:grobid_custom_hybrid PR label in the
  benchmark workflow so it selects this profile.
de-code added 2 commits July 1, 2026 18:14
Replaces the hardcoded per-profile contains() checks with a step that
extracts any profile:<name> label directly, validated against a safe
character set, so new profiles no longer require a benchmark.yml edit.
Authenticate CI to GCP via Workload Identity Federation so the
grobid_custom_hybrid profile can pull the reference-segmenter model
from gs://sciencebeam-v2-models while the trained model's release is
not yet public.
de-code added 2 commits July 2, 2026 09:03
TensorFlow's built-in gs:// filesystem support only recognizes plain
service-account JSON keys, not the Workload Identity Federation
external_account credential files google-github-actions/auth
produces - those reference a credential source that can't be resolved
from inside the sciencebeam-parser container, causing anonymous
(unauthenticated) requests. Decode a service account key from the
GCS_MODEL_READER_SA_KEY_B64 secret instead and mount it into the
container.
Points the citation model at the new CustomBidLSTM_CRF model in the
private sciencebeam-v2-models GCS bucket, replacing the grobid 0.9.0
wapiti model, while its release is not yet public.
@de-code

de-code commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

This doesn't look that good unfortunately

de-code added 2 commits July 3, 2026 12:23
Custom hybrid profiles are expected to grow beyond this one, so  inherit from a base profile via a code-resolved `extends` key rather  than a YAML anchor - it deep-merges instead of replacing whole model  entries, gives clear errors for unknown/circular references, and  keeps working if profiles ever get split across files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant