Skip to content

Add grobid_custom_hybrid profile with SciELO-preprints reference segmenter - #680

Draft
de-code wants to merge 12 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 12 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 (277 docs across 6 corpora)

grobid 0.9.0-crf (default): 277 docs | sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf): 277 docs | sciencebeam-parser:pr-680-00a07b58-20260805.1014 (grobid_custom_hybrid): 277 docs

Field (method) Type grobid 0.9.0-crf (default) sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf) sciencebeam-parser:pr-680-00a07b58-20260805.1014 (grobid_custom_hybrid) Δ grobid 0.9.0-crf (default) Δ sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf)
title (exact) string 0.564 0.552 0.552 -0.011 +0.000
title (levenshtein) string 0.710 0.713 0.713 +0.003 +0.000
title (edit_sim) string 0.719 0.720 0.720 +0.001 +0.000
abstract (levenshtein) string 0.665 0.665 0.665 +0.000 +0.000
abstract (edit_sim) string 0.697 0.697 0.697 +0.000 +0.000
author_full_names (levenshtein) partial_ulist 0.764 0.755 0.755 -0.008 +0.000
author_full_names (edit_sim) partial_ulist 0.770 0.765 0.765 -0.005 +0.000
affiliation_text (levenshtein) partial_ulist 0.497 0.483 0.483 -0.014 +0.000
affiliation_text (edit_sim) partial_ulist 0.605 0.579 0.579 -0.026 +0.000
keywords (levenshtein) partial_ulist 0.677 0.000 0.000 -0.677 +0.000
keywords (edit_sim) partial_ulist 0.631 0.000 0.000 -0.631 +0.000
body_section_titles (levenshtein) partial_list 0.360 0.357 0.357 -0.002 +0.000
body_section_titles (edit_sim) partial_list 0.350 0.353 0.353 +0.003 +0.000
acknowledgement (levenshtein) string 0.613 0.528 0.528 -0.085 +0.000
acknowledgement (edit_sim) string 0.606 0.528 0.528 -0.077 +0.000
first_reference_text (levenshtein) string 0.523 0.540 0.537 +0.014 -0.002
first_reference_text (edit_sim) string 0.666 0.669 0.670 +0.004 +0.001
reference_title (levenshtein) partial_list 0.494 0.480 0.481 -0.013 +0.001
reference_title (edit_sim) partial_list 0.495 0.492 0.494 -0.001 +0.003
reference_doi (levenshtein) partial_ulist 0.703 0.573 0.575 -0.127 +0.002
reference_doi (edit_sim) partial_ulist 0.649 0.547 0.550 -0.098 +0.004
biorxiv (43 docs)

grobid 0.9.0-crf (default): 43 docs | sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf): 43 docs | sciencebeam-parser:pr-680-00a07b58-20260805.1014 (grobid_custom_hybrid): 43 docs

Field (method) Type grobid 0.9.0-crf (default) sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf) sciencebeam-parser:pr-680-00a07b58-20260805.1014 (grobid_custom_hybrid) Δ grobid 0.9.0-crf (default) Δ sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf)
title (exact) string 0.911 0.883 0.883 -0.028 +0.000
title (levenshtein) string 0.988 0.988 0.988 +0.000 +0.000
title (edit_sim) string 0.976 0.976 0.976 +0.000 +0.000
abstract (levenshtein) string 0.806 0.806 0.806 +0.000 +0.000
abstract (edit_sim) string 0.787 0.795 0.795 +0.008 +0.000
author_full_names (levenshtein) partial_ulist 0.983 0.981 0.981 -0.002 +0.000
author_full_names (edit_sim) partial_ulist 0.966 0.972 0.972 +0.006 +0.000
affiliation_text (levenshtein) partial_ulist 0.886 0.839 0.839 -0.047 +0.000
affiliation_text (edit_sim) partial_ulist 0.888 0.840 0.840 -0.049 +0.000
keywords (levenshtein) partial_ulist 0.880 0.000 0.000 -0.880 +0.000
keywords (edit_sim) partial_ulist 0.874 0.000 0.000 -0.874 +0.000
body_section_titles (levenshtein) partial_list 0.450 0.364 0.364 -0.086 +0.000
body_section_titles (edit_sim) partial_list 0.429 0.365 0.365 -0.064 +0.000
acknowledgement (levenshtein) string 0.746 0.552 0.552 -0.195 +0.000
acknowledgement (edit_sim) string 0.739 0.575 0.575 -0.163 +0.000
first_reference_text (levenshtein) string 0.925 0.925 0.925 +0.000 +0.000
first_reference_text (edit_sim) string 0.885 0.885 0.886 +0.001 +0.001
reference_title (levenshtein) partial_list 0.720 0.756 0.754 +0.034 -0.002
reference_title (edit_sim) partial_list 0.679 0.717 0.714 +0.035 -0.003
reference_doi (levenshtein) partial_ulist 0.845 0.837 0.838 -0.008 +0.001
reference_doi (edit_sim) partial_ulist 0.814 0.810 0.817 +0.003 +0.007
ore (50 docs)

grobid 0.9.0-crf (default): 50 docs | sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf): 50 docs | sciencebeam-parser:pr-680-00a07b58-20260805.1014 (grobid_custom_hybrid): 50 docs

Field (method) Type grobid 0.9.0-crf (default) sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf) sciencebeam-parser:pr-680-00a07b58-20260805.1014 (grobid_custom_hybrid) Δ grobid 0.9.0-crf (default) Δ sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf)
title (exact) string 0.551 0.529 0.529 -0.021 +0.000
title (levenshtein) string 0.611 0.630 0.630 +0.019 +0.000
title (edit_sim) string 0.722 0.737 0.737 +0.015 +0.000
abstract (levenshtein) string 0.667 0.667 0.667 +0.000 +0.000
abstract (edit_sim) string 0.721 0.723 0.723 +0.002 +0.000
author_full_names (levenshtein) partial_ulist 0.807 0.801 0.801 -0.005 +0.000
author_full_names (edit_sim) partial_ulist 0.797 0.798 0.798 +0.001 +0.000
affiliation_text (levenshtein) partial_ulist 0.583 0.525 0.525 -0.058 +0.000
affiliation_text (edit_sim) partial_ulist 0.596 0.532 0.532 -0.064 +0.000
keywords (levenshtein) partial_ulist 0.268 0.000 0.000 -0.268 +0.000
keywords (edit_sim) partial_ulist 0.269 0.000 0.000 -0.269 +0.000
body_section_titles (levenshtein) partial_list 0.202 0.231 0.231 +0.029 +0.000
body_section_titles (edit_sim) partial_list 0.237 0.271 0.271 +0.034 +0.000
acknowledgement (levenshtein) string 0.923 0.889 0.889 -0.034 +0.000
acknowledgement (edit_sim) string 0.937 0.885 0.885 -0.052 +0.000
first_reference_text (levenshtein) string 0.485 0.485 0.485 +0.000 +0.000
first_reference_text (edit_sim) string 0.636 0.622 0.622 -0.014 -0.001
reference_title (levenshtein) partial_list 0.246 0.310 0.311 +0.065 +0.001
reference_title (edit_sim) partial_list 0.278 0.336 0.337 +0.059 +0.002
reference_doi (levenshtein) partial_ulist 0.661 0.032 0.032 -0.629 +0.000
reference_doi (edit_sim) partial_ulist 0.522 0.010 0.010 -0.513 +0.000
pkp (50 docs)

grobid 0.9.0-crf (default): 50 docs | sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf): 50 docs | sciencebeam-parser:pr-680-00a07b58-20260805.1014 (grobid_custom_hybrid): 50 docs

Field (method) Type grobid 0.9.0-crf (default) sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf) sciencebeam-parser:pr-680-00a07b58-20260805.1014 (grobid_custom_hybrid) Δ grobid 0.9.0-crf (default) Δ sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf)
title (exact) string 0.667 0.649 0.649 -0.018 +0.000
title (levenshtein) string 0.780 0.780 0.780 +0.000 +0.000
title (edit_sim) string 0.740 0.740 0.740 +0.000 +0.000
abstract (levenshtein) string 0.880 0.880 0.880 +0.000 +0.000
abstract (edit_sim) string 0.848 0.848 0.848 +0.001 +0.000
author_full_names (levenshtein) partial_ulist 0.842 0.840 0.840 -0.002 +0.000
author_full_names (edit_sim) partial_ulist 0.829 0.828 0.828 -0.002 +0.000
affiliation_text (levenshtein) partial_ulist 0.703 0.675 0.675 -0.029 +0.000
affiliation_text (edit_sim) partial_ulist 0.765 0.705 0.705 -0.059 +0.000
keywords (levenshtein) partial_ulist 0.953 0.000 0.000 -0.953 +0.000
keywords (edit_sim) partial_ulist 0.945 0.000 0.000 -0.945 +0.000
body_section_titles (levenshtein) partial_list 0.598 0.649 0.649 +0.051 +0.000
body_section_titles (edit_sim) partial_list 0.542 0.588 0.588 +0.045 +0.000
acknowledgement (levenshtein) string 0.783 0.600 0.600 -0.183 +0.000
acknowledgement (edit_sim) string 0.737 0.588 0.588 -0.149 +0.000
first_reference_text (levenshtein) string 0.947 0.947 0.958 +0.011 +0.011
first_reference_text (edit_sim) string 0.911 0.911 0.929 +0.019 +0.019
reference_title (levenshtein) partial_list 0.790 0.748 0.765 -0.025 +0.017
reference_title (edit_sim) partial_list 0.772 0.736 0.760 -0.011 +0.024
reference_doi (levenshtein) partial_ulist 0.891 0.889 0.889 -0.002 +0.000
reference_doi (edit_sim) partial_ulist 0.855 0.889 0.887 +0.032 -0.002
scielo_br (50 docs)

grobid 0.9.0-crf (default): 50 docs | sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf): 50 docs | sciencebeam-parser:pr-680-00a07b58-20260805.1014 (grobid_custom_hybrid): 50 docs

Field (method) Type grobid 0.9.0-crf (default) sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf) sciencebeam-parser:pr-680-00a07b58-20260805.1014 (grobid_custom_hybrid) Δ grobid 0.9.0-crf (default) Δ sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf)
title (exact) string 0.551 0.551 0.551 +0.000 +0.000
title (levenshtein) string 0.684 0.684 0.684 +0.000 +0.000
title (edit_sim) string 0.698 0.698 0.698 +0.000 +0.000
abstract (levenshtein) string 0.718 0.718 0.718 +0.000 +0.000
abstract (edit_sim) string 0.699 0.696 0.696 -0.004 +0.000
author_full_names (levenshtein) partial_ulist 0.766 0.736 0.736 -0.030 +0.000
author_full_names (edit_sim) partial_ulist 0.777 0.752 0.752 -0.025 +0.000
affiliation_text (levenshtein) partial_ulist 0.000 0.000 0.000 +0.000 +0.000
affiliation_text (edit_sim) partial_ulist 0.339 0.326 0.326 -0.013 +0.000
keywords (levenshtein) partial_ulist 0.620 0.000 0.000 -0.620 +0.000
keywords (edit_sim) partial_ulist 0.588 0.000 0.000 -0.588 +0.000
body_section_titles (levenshtein) partial_list 0.418 0.411 0.411 -0.006 +0.000
body_section_titles (edit_sim) partial_list 0.424 0.419 0.419 -0.005 +0.000
acknowledgement (levenshtein) string 0.762 0.762 0.762 +0.000 +0.000
acknowledgement (edit_sim) string 0.761 0.761 0.761 +0.000 +0.000
first_reference_text (levenshtein) string 0.000 0.039 0.039 +0.039 +0.000
first_reference_text (edit_sim) string 0.429 0.436 0.445 +0.015 +0.009
reference_title (levenshtein) partial_list 0.572 0.503 0.508 -0.064 +0.005
reference_title (edit_sim) partial_list 0.555 0.510 0.513 -0.042 +0.002
reference_doi (levenshtein) partial_ulist 0.942 0.880 0.887 -0.055 +0.007
reference_doi (edit_sim) partial_ulist 0.926 0.827 0.840 -0.086 +0.013
scielo_mx (34 docs)

grobid 0.9.0-crf (default): 34 docs | sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf): 34 docs | sciencebeam-parser:pr-680-00a07b58-20260805.1014 (grobid_custom_hybrid): 34 docs

Field (method) Type grobid 0.9.0-crf (default) sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf) sciencebeam-parser:pr-680-00a07b58-20260805.1014 (grobid_custom_hybrid) Δ grobid 0.9.0-crf (default) Δ sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf)
title (exact) string 0.162 0.162 0.162 +0.000 +0.000
title (levenshtein) string 0.583 0.583 0.583 +0.000 +0.000
title (edit_sim) string 0.604 0.591 0.591 -0.013 +0.000
abstract (levenshtein) string 0.111 0.111 0.111 +0.000 +0.000
abstract (edit_sim) string 0.474 0.461 0.461 -0.013 +0.000
author_full_names (levenshtein) partial_ulist 0.678 0.682 0.682 +0.004 +0.000
author_full_names (edit_sim) partial_ulist 0.695 0.694 0.694 -0.001 +0.000
affiliation_text (levenshtein) partial_ulist 0.102 0.098 0.098 -0.003 +0.000
affiliation_text (edit_sim) partial_ulist 0.311 0.313 0.313 +0.002 +0.000
keywords (levenshtein) partial_ulist 0.718 0.000 0.000 -0.718 +0.000
keywords (edit_sim) partial_ulist 0.616 0.000 0.000 -0.616 +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.419 0.419 0.419 +0.000 +0.000
first_reference_text (edit_sim) string 0.465 0.452 0.441 -0.023 -0.010
reference_title (levenshtein) partial_list 0.301 0.239 0.233 -0.068 -0.007
reference_title (edit_sim) partial_list 0.326 0.283 0.278 -0.048 -0.005
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-03689765-20260805.0803 (grobid_crf): 50 docs | sciencebeam-parser:pr-680-00a07b58-20260805.1014 (grobid_custom_hybrid): 50 docs

Field (method) Type grobid 0.9.0-crf (default) sciencebeam-parser:main-03689765-20260805.0803 (grobid_crf) sciencebeam-parser:pr-680-00a07b58-20260805.1014 (grobid_custom_hybrid) Δ grobid 0.9.0-crf (default) Δ sciencebeam-parser:main-03689765-20260805.0803 (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.413 +0.026 -0.025
first_reference_text (edit_sim) string 0.635 0.667 0.653 +0.017 -0.014
reference_title (levenshtein) partial_list 0.304 0.283 0.272 -0.032 -0.012
reference_title (edit_sim) partial_list 0.333 0.331 0.325 -0.008 -0.006
reference_doi (levenshtein) partial_ulist 0.671 0.654 0.659 -0.012 +0.005
reference_doi (edit_sim) partial_ulist 0.592 0.606 0.611 +0.019 +0.004

…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.
@de-code
de-code deployed to benchmark August 5, 2026 10:14 — with GitHub Actions Active
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