The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationCastError
Exception: DatasetGenerationCastError
Message: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 6 new columns ({'cas', 'k', 'case', 'lead_time_months', 'action_date', 'first_flagged_cutoff'}) and 10 missing columns ({'precision_at_50', 'ap_ci_hi', 'model', 'precision_at_20', 'average_precision', 'population', 'positives', 'cutoff', 'precision_at_10', 'ap_ci_lo'}).
This happened while the csv dataset builder was generating data using
hf://datasets/MartinBlomqvist/hewb/data/lead_times.csv (at revision ad181a411a00956198b5e1535c39d642200e6523), ['hf://datasets/MartinBlomqvist/hewb@ad181a411a00956198b5e1535c39d642200e6523/data/aggregate.csv', 'hf://datasets/MartinBlomqvist/hewb@ad181a411a00956198b5e1535c39d642200e6523/data/lead_times.csv', 'hf://datasets/MartinBlomqvist/hewb@ad181a411a00956198b5e1535c39d642200e6523/data/rank_trajectories.csv', 'hf://datasets/MartinBlomqvist/hewb@ad181a411a00956198b5e1535c39d642200e6523/data/robustness_cutoff_sweep_aggregate.csv', 'hf://datasets/MartinBlomqvist/hewb@ad181a411a00956198b5e1535c39d642200e6523/data/robustness_cutoff_sweep_ranks.csv', 'hf://datasets/MartinBlomqvist/hewb@ad181a411a00956198b5e1535c39d642200e6523/data/robustness_label_shuffle_placebo.csv', 'hf://datasets/MartinBlomqvist/hewb@ad181a411a00956198b5e1535c39d642200e6523/data/robustness_negative_controls.csv', 'hf://datasets/MartinBlomqvist/hewb@ad181a411a00956198b5e1535c39d642200e6523/data/robustness_shap_funnel.csv']
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1837, in _prepare_split_single
writer.write_table(table)
~~~~~~~~~~~~~~~~~~^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 765, in write_table
self._write_table(pa_table, writer_batch_size=writer_batch_size)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 773, in _write_table
pa_table = table_cast(pa_table, self._schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
variant: string
case: string
cas: string
action_date: string
k: int64
first_flagged_cutoff: string
lead_time_months: double
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 1100
to
{'variant': Value('string'), 'cutoff': Value('string'), 'model': Value('string'), 'population': Value('int64'), 'positives': Value('int64'), 'average_precision': Value('float64'), 'ap_ci_lo': Value('float64'), 'ap_ci_hi': Value('float64'), 'precision_at_10': Value('float64'), 'precision_at_20': Value('float64'), 'precision_at_50': Value('float64')}
because column names don't match
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
~~~~~~~~~~~~~~~~~~~~~~~~~^
builder, max_dataset_size_bytes=max_dataset_size_bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1683, in _prepare_split
for job_id, done, content in self._prepare_split_single(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1839, in _prepare_split_single
raise DatasetGenerationCastError.from_cast_error(
...<4 lines>...
)
datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 6 new columns ({'cas', 'k', 'case', 'lead_time_months', 'action_date', 'first_flagged_cutoff'}) and 10 missing columns ({'precision_at_50', 'ap_ci_hi', 'model', 'precision_at_20', 'average_precision', 'population', 'positives', 'cutoff', 'precision_at_10', 'ap_ci_lo'}).
This happened while the csv dataset builder was generating data using
hf://datasets/MartinBlomqvist/hewb/data/lead_times.csv (at revision ad181a411a00956198b5e1535c39d642200e6523), ['hf://datasets/MartinBlomqvist/hewb@ad181a411a00956198b5e1535c39d642200e6523/data/aggregate.csv', 'hf://datasets/MartinBlomqvist/hewb@ad181a411a00956198b5e1535c39d642200e6523/data/lead_times.csv', 'hf://datasets/MartinBlomqvist/hewb@ad181a411a00956198b5e1535c39d642200e6523/data/rank_trajectories.csv', 'hf://datasets/MartinBlomqvist/hewb@ad181a411a00956198b5e1535c39d642200e6523/data/robustness_cutoff_sweep_aggregate.csv', 'hf://datasets/MartinBlomqvist/hewb@ad181a411a00956198b5e1535c39d642200e6523/data/robustness_cutoff_sweep_ranks.csv', 'hf://datasets/MartinBlomqvist/hewb@ad181a411a00956198b5e1535c39d642200e6523/data/robustness_label_shuffle_placebo.csv', 'hf://datasets/MartinBlomqvist/hewb@ad181a411a00956198b5e1535c39d642200e6523/data/robustness_negative_controls.csv', 'hf://datasets/MartinBlomqvist/hewb@ad181a411a00956198b5e1535c39d642200e6523/data/robustness_shap_funnel.csv']
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
variant string | cutoff string | model string | population int64 | positives int64 | average_precision float64 | ap_ci_lo float64 | ap_ci_hi float64 | precision_at_10 float64 | precision_at_20 float64 | precision_at_50 float64 |
|---|---|---|---|---|---|---|---|---|---|---|
headline | 2009-01-01 | severe_hazard_count | 2,618 | 69 | 0.026356 | 0.021008 | 0.030615 | 0.3 | 0.25 | 0.26 |
headline | 2009-01-01 | latest_sales_tonnage | 2,618 | 69 | 0.026356 | 0.021008 | 0.030615 | 0.3 | 0.25 | 0.26 |
headline | 2009-01-01 | efsa_assessment_count | 2,618 | 69 | 0.020794 | 0.016811 | 0.026147 | 0 | 0.05 | 0.02 |
headline | 2009-01-01 | approval_age | 2,618 | 69 | 0.613994 | 0.511765 | 0.717882 | 0.9 | 0.85 | 0.84 |
headline | 2009-01-01 | xgboost | 2,618 | 69 | 0.634333 | 0.533623 | 0.741144 | 0.7 | 0.75 | 0.78 |
headline | 2010-01-01 | severe_hazard_count | 3,221 | 82 | 0.025458 | 0.021111 | 0.029804 | 0.3 | 0.25 | 0.26 |
headline | 2010-01-01 | latest_sales_tonnage | 3,221 | 82 | 0.025458 | 0.021111 | 0.029804 | 0.3 | 0.25 | 0.26 |
headline | 2010-01-01 | efsa_assessment_count | 3,221 | 82 | 0.019395 | 0.016388 | 0.022799 | 0 | 0 | 0.02 |
headline | 2010-01-01 | approval_age | 3,221 | 82 | 0.622781 | 0.534582 | 0.708035 | 0.9 | 0.85 | 0.84 |
headline | 2010-01-01 | xgboost | 3,221 | 82 | 0.655604 | 0.56556 | 0.740792 | 1 | 0.85 | 0.7 |
headline | 2011-01-01 | severe_hazard_count | 3,846 | 99 | 0.097612 | 0.073039 | 0.125042 | 0.2 | 0.1 | 0.08 |
headline | 2011-01-01 | latest_sales_tonnage | 3,846 | 99 | 0.025741 | 0.021581 | 0.029641 | 0.2 | 0.15 | 0.1 |
headline | 2011-01-01 | efsa_assessment_count | 3,846 | 99 | 0.020234 | 0.017111 | 0.023464 | 0 | 0 | 0 |
headline | 2011-01-01 | approval_age | 3,846 | 99 | 0.538408 | 0.453305 | 0.635991 | 0.9 | 0.85 | 0.84 |
headline | 2011-01-01 | xgboost | 3,846 | 99 | 0.586487 | 0.509906 | 0.679717 | 0.8 | 0.7 | 0.72 |
headline | 2012-01-01 | severe_hazard_count | 4,121 | 100 | 0.096156 | 0.068882 | 0.122978 | 0.2 | 0.1 | 0.08 |
headline | 2012-01-01 | latest_sales_tonnage | 4,121 | 100 | 0.024266 | 0.021111 | 0.028391 | 0.2 | 0.15 | 0.1 |
headline | 2012-01-01 | efsa_assessment_count | 4,121 | 100 | 0.019145 | 0.016744 | 0.022269 | 0 | 0 | 0 |
headline | 2012-01-01 | approval_age | 4,121 | 100 | 0.606423 | 0.526073 | 0.688074 | 0.9 | 0.85 | 0.84 |
headline | 2012-01-01 | xgboost | 4,121 | 100 | 0.600137 | 0.526035 | 0.685962 | 0.5 | 0.7 | 0.7 |
headline | 2013-01-01 | severe_hazard_count | 4,451 | 103 | 0.093483 | 0.070226 | 0.118754 | 0.2 | 0.1 | 0.08 |
headline | 2013-01-01 | latest_sales_tonnage | 4,451 | 103 | 0.023141 | 0.01931 | 0.026736 | 0.2 | 0.15 | 0.1 |
headline | 2013-01-01 | efsa_assessment_count | 4,451 | 103 | 0.018871 | 0.015852 | 0.022329 | 0 | 0 | 0 |
headline | 2013-01-01 | approval_age | 4,451 | 103 | 0.609853 | 0.540494 | 0.685389 | 0.9 | 0.85 | 0.84 |
headline | 2013-01-01 | xgboost | 4,451 | 103 | 0.595042 | 0.528251 | 0.69331 | 0.4 | 0.7 | 0.76 |
headline | 2014-01-01 | severe_hazard_count | 4,740 | 107 | 0.090039 | 0.068028 | 0.120366 | 0.2 | 0.1 | 0.08 |
headline | 2014-01-01 | latest_sales_tonnage | 4,740 | 107 | 0.022574 | 0.018987 | 0.026181 | 0.2 | 0.15 | 0.1 |
headline | 2014-01-01 | efsa_assessment_count | 4,740 | 107 | 0.018584 | 0.015999 | 0.021791 | 0 | 0 | 0.02 |
headline | 2014-01-01 | approval_age | 4,740 | 107 | 0.595309 | 0.524938 | 0.673381 | 0.9 | 0.85 | 0.84 |
headline | 2014-01-01 | xgboost | 4,740 | 107 | 0.561381 | 0.488045 | 0.659015 | 0.5 | 0.75 | 0.66 |
headline | 2015-01-01 | severe_hazard_count | 4,928 | 105 | 0.082485 | 0.061123 | 0.107347 | 0.1 | 0.05 | 0.06 |
headline | 2015-01-01 | latest_sales_tonnage | 4,928 | 105 | 0.021307 | 0.018253 | 0.024756 | 0.1 | 0.1 | 0.08 |
headline | 2015-01-01 | efsa_assessment_count | 4,928 | 105 | 0.017702 | 0.015139 | 0.020823 | 0 | 0 | 0.02 |
headline | 2015-01-01 | approval_age | 4,928 | 105 | 0.594308 | 0.531645 | 0.673871 | 0.9 | 0.85 | 0.8 |
headline | 2015-01-01 | xgboost | 4,928 | 105 | 0.55426 | 0.474643 | 0.641352 | 0.6 | 0.75 | 0.68 |
headline | 2016-01-01 | severe_hazard_count | 5,051 | 105 | 0.084139 | 0.062856 | 0.112105 | 0.1 | 0.05 | 0.06 |
headline | 2016-01-01 | latest_sales_tonnage | 5,051 | 105 | 0.020788 | 0.017818 | 0.024164 | 0.1 | 0.1 | 0.08 |
headline | 2016-01-01 | efsa_assessment_count | 5,051 | 105 | 0.017498 | 0.015276 | 0.020798 | 0 | 0 | 0.04 |
headline | 2016-01-01 | approval_age | 5,051 | 105 | 0.602333 | 0.526738 | 0.686868 | 0.9 | 0.85 | 0.8 |
headline | 2016-01-01 | xgboost | 5,051 | 105 | 0.583527 | 0.504672 | 0.671013 | 0.7 | 0.7 | 0.58 |
headline | 2017-01-01 | severe_hazard_count | 5,268 | 102 | 0.08006 | 0.059498 | 0.106451 | 0.1 | 0.05 | 0.06 |
headline | 2017-01-01 | latest_sales_tonnage | 5,268 | 102 | 0.019362 | 0.016885 | 0.022029 | 0.1 | 0.1 | 0.08 |
headline | 2017-01-01 | efsa_assessment_count | 5,268 | 102 | 0.017154 | 0.014704 | 0.021189 | 0 | 0 | 0.04 |
headline | 2017-01-01 | approval_age | 5,268 | 102 | 0.577362 | 0.504065 | 0.656779 | 0.8 | 0.8 | 0.76 |
headline | 2017-01-01 | xgboost | 5,268 | 102 | 0.567286 | 0.493425 | 0.655308 | 0.8 | 0.7 | 0.58 |
headline | 2018-01-01 | severe_hazard_count | 5,424 | 95 | 0.076887 | 0.056872 | 0.105217 | 0 | 0 | 0.02 |
headline | 2018-01-01 | latest_sales_tonnage | 5,424 | 95 | 0.017515 | 0.01474 | 0.020833 | 0.1 | 0.1 | 0.08 |
headline | 2018-01-01 | efsa_assessment_count | 5,424 | 95 | 0.016492 | 0.013769 | 0.020786 | 0 | 0 | 0.04 |
headline | 2018-01-01 | approval_age | 5,424 | 95 | 0.534849 | 0.462115 | 0.610491 | 0.8 | 0.7 | 0.66 |
headline | 2018-01-01 | xgboost | 5,424 | 95 | 0.474087 | 0.38568 | 0.563321 | 0.7 | 0.6 | 0.48 |
headline | 2019-01-01 | severe_hazard_count | 5,641 | 84 | 0.073015 | 0.053939 | 0.093441 | 0.1 | 0.05 | 0.02 |
headline | 2019-01-01 | latest_sales_tonnage | 5,641 | 84 | 0.014891 | 0.012214 | 0.017373 | 0.1 | 0.05 | 0.04 |
headline | 2019-01-01 | efsa_assessment_count | 5,641 | 84 | 0.014994 | 0.012284 | 0.019823 | 0 | 0.05 | 0.04 |
headline | 2019-01-01 | approval_age | 5,641 | 84 | 0.453247 | 0.376643 | 0.545291 | 0.5 | 0.65 | 0.56 |
headline | 2019-01-01 | xgboost | 5,641 | 84 | 0.449374 | 0.371125 | 0.541398 | 0.7 | 0.55 | 0.48 |
headline | 2020-01-01 | severe_hazard_count | 5,720 | 66 | 0.056527 | 0.035886 | 0.087 | 0.1 | 0.05 | 0.02 |
headline | 2020-01-01 | latest_sales_tonnage | 5,720 | 66 | 0.011538 | 0.009432 | 0.013811 | 0 | 0 | 0.02 |
headline | 2020-01-01 | efsa_assessment_count | 5,720 | 66 | 0.011903 | 0.008944 | 0.017986 | 0 | 0.05 | 0.04 |
headline | 2020-01-01 | approval_age | 5,720 | 66 | 0.396033 | 0.313615 | 0.495716 | 0.4 | 0.65 | 0.44 |
headline | 2020-01-01 | xgboost | 5,720 | 66 | 0.384059 | 0.315997 | 0.497722 | 0.6 | 0.35 | 0.42 |
headline | 2021-01-01 | severe_hazard_count | 5,808 | 49 | 0.034909 | 0.021476 | 0.051219 | 0 | 0.05 | 0.02 |
headline | 2021-01-01 | latest_sales_tonnage | 5,808 | 49 | 0.008437 | 0.006543 | 0.010348 | 0 | 0 | 0.02 |
headline | 2021-01-01 | efsa_assessment_count | 5,808 | 49 | 0.007985 | 0.006094 | 0.010942 | 0 | 0 | 0.02 |
headline | 2021-01-01 | approval_age | 5,808 | 49 | 0.289985 | 0.217651 | 0.399143 | 0.4 | 0.5 | 0.28 |
headline | 2021-01-01 | xgboost | 5,808 | 49 | 0.242588 | 0.196792 | 0.317145 | 0 | 0.15 | 0.26 |
headline | 2022-01-01 | severe_hazard_count | 5,875 | 27 | 0.014985 | 0.006796 | 0.03101 | 0 | 0.05 | 0.02 |
headline | 2022-01-01 | latest_sales_tonnage | 5,875 | 27 | 0.01301 | 0.005929 | 0.034818 | 0 | 0 | 0.02 |
headline | 2022-01-01 | efsa_assessment_count | 5,875 | 27 | 0.005023 | 0.003262 | 0.009552 | 0 | 0 | 0.02 |
headline | 2022-01-01 | approval_age | 5,875 | 27 | 0.210098 | 0.142258 | 0.347351 | 0.3 | 0.4 | 0.22 |
headline | 2022-01-01 | xgboost | 5,875 | 27 | 0.185796 | 0.119178 | 0.296862 | 0 | 0.1 | 0.26 |
headline | 2023-01-01 | severe_hazard_count | 5,933 | 25 | 0.01611 | 0.007483 | 0.027654 | 0 | 0 | 0 |
headline | 2023-01-01 | latest_sales_tonnage | 5,933 | 25 | 0.01 | 0.005244 | 0.024892 | 0 | 0 | 0.02 |
headline | 2023-01-01 | efsa_assessment_count | 5,933 | 25 | 0.004372 | 0.002537 | 0.009123 | 0 | 0 | 0.02 |
headline | 2023-01-01 | approval_age | 5,933 | 25 | 0.20066 | 0.11136 | 0.343118 | 0.3 | 0.4 | 0.2 |
headline | 2023-01-01 | xgboost | 5,933 | 25 | 0.25419 | 0.143772 | 0.40967 | 0.3 | 0.25 | 0.22 |
headline | 2024-01-01 | severe_hazard_count | 5,974 | 19 | 0.018406 | 0.008621 | 0.033572 | 0 | 0 | 0.02 |
headline | 2024-01-01 | latest_sales_tonnage | 5,974 | 19 | 0.017408 | 0.006363 | 0.042563 | 0 | 0 | 0.02 |
headline | 2024-01-01 | efsa_assessment_count | 5,974 | 19 | 0.003655 | 0.002246 | 0.00953 | 0 | 0 | 0.02 |
headline | 2024-01-01 | approval_age | 5,974 | 19 | 0.14094 | 0.079628 | 0.277109 | 0.3 | 0.25 | 0.12 |
headline | 2024-01-01 | xgboost | 5,974 | 19 | 0.187526 | 0.120276 | 0.304502 | 0.2 | 0.25 | 0.22 |
early_warning | 2009-01-01 | severe_hazard_count | 2,618 | 71 | 0.02712 | 0.022135 | 0.032105 | 0.4 | 0.3 | 0.28 |
early_warning | 2009-01-01 | latest_sales_tonnage | 2,618 | 71 | 0.02712 | 0.022135 | 0.032105 | 0.4 | 0.3 | 0.28 |
early_warning | 2009-01-01 | efsa_assessment_count | 2,618 | 71 | 0.02137 | 0.017489 | 0.026686 | 0 | 0.05 | 0.02 |
early_warning | 2009-01-01 | approval_age | 2,618 | 71 | 0.597645 | 0.498342 | 0.705159 | 0.9 | 0.85 | 0.84 |
early_warning | 2009-01-01 | xgboost | 2,618 | 71 | 0.639594 | 0.531144 | 0.754658 | 0.9 | 0.75 | 0.76 |
early_warning | 2010-01-01 | severe_hazard_count | 3,221 | 85 | 0.026389 | 0.022043 | 0.030736 | 0.4 | 0.3 | 0.28 |
early_warning | 2010-01-01 | latest_sales_tonnage | 3,221 | 85 | 0.026389 | 0.022043 | 0.030736 | 0.4 | 0.3 | 0.28 |
early_warning | 2010-01-01 | efsa_assessment_count | 3,221 | 85 | 0.020092 | 0.01701 | 0.023497 | 0 | 0 | 0.02 |
early_warning | 2010-01-01 | approval_age | 3,221 | 85 | 0.616821 | 0.526147 | 0.702389 | 0.9 | 0.85 | 0.84 |
early_warning | 2010-01-01 | xgboost | 3,221 | 85 | 0.640854 | 0.544936 | 0.715987 | 0.9 | 0.85 | 0.76 |
early_warning | 2011-01-01 | severe_hazard_count | 3,846 | 103 | 0.098354 | 0.073421 | 0.124352 | 0.2 | 0.15 | 0.1 |
early_warning | 2011-01-01 | latest_sales_tonnage | 3,846 | 103 | 0.026781 | 0.022621 | 0.030434 | 0.3 | 0.25 | 0.14 |
early_warning | 2011-01-01 | efsa_assessment_count | 3,846 | 103 | 0.02118 | 0.017969 | 0.024479 | 0 | 0 | 0 |
early_warning | 2011-01-01 | approval_age | 3,846 | 103 | 0.536417 | 0.453661 | 0.629762 | 0.9 | 0.85 | 0.84 |
early_warning | 2011-01-01 | xgboost | 3,846 | 103 | 0.570951 | 0.494118 | 0.65927 | 0.8 | 0.75 | 0.7 |
early_warning | 2012-01-01 | severe_hazard_count | 4,121 | 104 | 0.096879 | 0.070074 | 0.123066 | 0.2 | 0.15 | 0.1 |
early_warning | 2012-01-01 | latest_sales_tonnage | 4,121 | 104 | 0.025237 | 0.021827 | 0.029362 | 0.3 | 0.25 | 0.14 |
early_warning | 2012-01-01 | efsa_assessment_count | 4,121 | 104 | 0.020049 | 0.017494 | 0.023409 | 0 | 0 | 0 |
early_warning | 2012-01-01 | approval_age | 4,121 | 104 | 0.609318 | 0.527673 | 0.690805 | 0.9 | 0.85 | 0.84 |
early_warning | 2012-01-01 | xgboost | 4,121 | 104 | 0.583138 | 0.503917 | 0.674984 | 0.7 | 0.65 | 0.72 |
- The question, stated as a rule
- Two label variants, reported side by side
- The landmark set
- Headline result (v1.4)
- The approval-age baseline beats the model
- Robustness (v1.4 capstone)
- Where the method fits, and where it does not
- Files
- Reproduce
- Recent cutoffs are censored, not weak
- Limitations
- Citation
HEWB: the Hazium Early Warning Benchmark (v1.4)
HEWB measures one thing, precisely: using only evidence that was public before a given date, how many months ahead of a real EU pesticide regulatory action would a model have flagged the substance?
It is a retrodetection benchmark over a fixed set of individually-verified historical EU actions, evaluated under strict temporal discipline, with a lead-time metric rather than a single accuracy score. It exists to make an early-warning claim falsifiable instead of anecdotal.
This dataset is the frozen v1.4 release: the benchmark definition, the result tables, and the robustness evidence. It is the measuring stick behind the Hazium project.
The question, stated as a rule
A model at cutoff T sees only facts dated strictly before T. Every fact and
every graph edge carries a known_at date, so a cutoff view is a real
reconstruction of what was knowable at the time, not the present dataset with a
filter applied. Lead time for a landmark is the number of months from the
earliest annual cutoff that ranks it inside the top-k to the date of its real
EU action. A flag at or after the action is not early, and is not counted.
- Cutoffs: annual, 2009-01-01 through 2024-01-01.
- Thresholds:
kin {10, 20, 50}, reported together, never tuned per case. - Population: every substance with at least one dated pre-cutoff fact (roughly 2,600 substances at the 2009 cutoff, growing to about 5,900 by 2023), with any substance already actioned before the cutoff censored out.
Two label variants, reported side by side
| Variant | Positive label | Note |
|---|---|---|
headline |
EU non-renewal only | A completed regulatory withdrawal. The strict result. |
early_warning |
non-renewal + started Swedish national reevaluation | An earlier, weaker signal. The only variant under which the anchor case, fluazinam, is a positive. |
Both are always reported. The broadened variant is not a replacement for the headline. Its extra positives currently trace to a single Swedish reevaluation announcement, which is a real but narrow evidence source, and it is labelled as such.
The landmark set
Eleven verified historical cases. Each CAS is checked against the graph before
every run, so a lead-time is never computed for the wrong substance. Fluazinam is
the anchor: a negative under the headline label (it has no EU non-renewal) and a
positive only under early_warning. It is kept precisely because that honesty is
the point of the benchmark.
The full set, with per-variant action dates, is in manifest.json.
Headline result (v1.4)
Under the strict headline label, at k=50, 9 of 10 landmarks flag before
their real EU action, with lead times up to 133 months (about 11 years):
| Landmark | EU action | Lead at k=50 |
|---|---|---|
| Chlorpyrifos | 2020-01 | 132 months |
| Thiacloprid | 2020-02 | 133 months |
| Chlorpyrifos-methyl | 2020-01 | 120 months |
| Clothianidin | 2019-01 | 120 months |
| Dimethoate | 2019-06 | 125 months |
| Mancozeb | 2021-01 | 132 months |
| Thiamethoxam | 2019-04 | 123 months |
| Propikonazol | 2018-12 | 119 months |
| Imidacloprid | 2020-12 | 95 months |
| Epoxiconazole | 2020-04 | not flagged (the one miss) |
At the 2023-01-01 cutoff the learned model reaches average precision 0.254
on the identical population and split. Read alongside the approval-age
result below, which is the number that matters. Full per-cutoff numbers are in
data/aggregate.csv; per-landmark trajectories in data/rank_trajectories.csv.
A note on counting, because two honest numbers appear in this project. HEWB measures "flagged within top-50 before the action" (9 of 10). The public site uses a stricter frame, "flagged ahead of the EU's own first action" (7 of 10), which measures against the EU's first move rather than the final ban. Both are reported, and they are not in tension: they answer slightly different questions.
The approval-age baseline beats the model
The trivial baselines in this release were severe-hazard count, sales tonnage and assessment count. All three are weak, and the learned model beat them by roughly an order of magnitude, which is how the headline was long reported. Approval age was never tested as a baseline, because it sat inside the model as a feature.
Ranking on approval age alone reaches 98% of the model's mean average precision across the sixteen cutoffs, wins outright at 11 of 16, and reproduces the headline lead times exactly: chlorpyrifos at 132 months, thiacloprid at 133, clothianidin at 120, propikonazol at 119. On chlorpyrifos-methyl and mancozeb it beats the model. Dropping the two approval-age features leaves the model at 37% of its performance.
| XGBoost | approval age (1 feature) | |
|---|---|---|
| landmarks flagged, k=50 | 9 of 10 | 8 of 10 |
| mean AP across 16 cutoffs | 0.467 | 0.459 |
| cutoffs won | 5 of 16 | 11 of 16 |
The mechanism is structural. A substance can only be non-renewed when its approval comes up for renewal, and approval age proxies proximity to that decision, so the ranking substantially answers whose turn it is rather than who fails. Approval date is knowable at every cutoff, so this is not leakage, but it is a different question from the one this benchmark was built to ask.
The six evidence groups are therefore worth, over a date subtraction, one extra
landmark out of ten and 0.008 average precision. approval_age is reported as a
trivial baseline from this point on, and by the project's own baseline rule it is
the published result until a learned model beats it.
Note that the label-shuffle placebo below is unaffected and still passes. It asks whether the signal is real rather than noise, and approval age is a real signal. It never asked whether the signal was interesting, which is why the existing robustness suite could not have caught this.
Robustness (v1.4 capstone)
Four tests, so the headline survives a skeptical reader. All raw outputs are in
data/robustness_*.csv.
Label-shuffle placebo (the kill-criterion). Permute the labels, keep the class balance, refit. Real average precision must tower over the shuffled null or the result is an artifact and must be retracted. It does: real 0.230 (headline) and 0.191 (early-warning) against a shuffled null whose maximum over 50 permutations is 0.013 and 0.016. Permutation p = 0.020, the floor for 50 permutations. The signal is real.
Cutoff sensitivity. The learned model beats the hazard, sales and assessment baselines at every cutoff 2020-2024, so the result is not a single-cutoff accident. It does not beat approval age: see the section above. The anchor case, fluazinam, ranks between 111th and 250th of about 5,900 substances (top 2 to 4 percent) at every cutoff under the
early_warninglabel. The 2023 number is representative, not selected.Negative controls (specificity). Substances that went through EU review and stayed approved should not crowd the top of the ranking. The true positives sit at a median 1.0 percentile, and approved-and-surviving substances sit deeper at 2.6 percentile. Substances that carry a severe hazard classification yet were never actioned put zero substances in the top 10. The model is not simply flagging whatever looks hazardous.
Feature attribution, inside vs outside the funnel. Signals split into inside-funnel (reading the regulator's own pipeline: EFSA activity, ECHA intentions) and outside-funnel (independent scientific literature). The attribution is honest about what carries the model. An approval-age prior dominates at about 52 percent of total attribution. Among the substantive evidence signals, the outside-funnel literature feature (the second most important single feature overall) is on par with the inside-funnel regulatory-concern signals, 14 percent against 16 percent. The independent literature signal carries real weight; it does not merely echo the paperwork.
Where the method fits, and where it does not
The most transferable finding in this project is a mapped boundary. The method works where three conditions hold together:
- a bounded population (a registry of a few thousand substances, not an open universe),
- dated outcome labels from an approval-review-withdrawal pipeline (a regulatory decision, not a hazard definition), and
- rich, CAS-joinable per-substance evidence.
EU pesticides satisfy all three, which is why HEWB works. Four other EU regimes were tested against the same conditions before any modelling code was written for them. All four fail, and each fails differently.
| Regime | Fails on | Measured |
|---|---|---|
| PFAS | Population shape, circular labels | Effectively unbounded population; SVHC listing is hazard-defined, so predicting hazard from hazard is circular |
| Biocides (BPR) | Independence, positive-class size | 101 of 239 review-programme actives (42%) are also EU pesticide actives, concentrated in the most informative ones; 286 unique CAS in total because many actives are generated in situ; 15 strict non-approval positives on the independent subset, at a 13% base rate |
| Food additives | Positive-class size, task shape | ~4 clean safety withdrawals from 244 re-evaluated additives; review is calendar-driven (Reg. 257/2010), so entry into the funnel carries no signal; EFSA is both the labeller and the main evidence source |
| Feed additives | Label validity | 309 of 1,958 register records are "not authorised", but 189 (61%) are flavourings withdrawn because no holder reapplied, so the label measures commercial abandonment rather than risk |
The feed-additive case is the most instructive. It is the only one of the four with a large positive class, and a model trained on it would likely have scored well while measuring the wrong thing. "Which legacy additive did nobody reapply for" is learnable almost entirely from approval age, which is already the single largest feature in this model. A large label set measuring the wrong construct is more dangerous than a small one measuring the right construct, because only the first is persuasive.
What survives the four negatives is a sharper statement of scope than a second domain would have provided. The method needs a risk-triggered regulatory funnel, over a bounded population, large enough to generate a meaningful number of safety-driven decisions, with per-substance evidence that is independent of the funnel itself. Of the regimes examined, EU pesticides is the only one satisfying all of it at once. Naming where a method breaks, and measuring it before committing to the build, is part of the result.
Files
manifest.json frozen benchmark definition
data/aggregate.csv AP and P@k vs baselines, per cutoff and variant
data/lead_times.csv per-landmark lead time, per k
data/rank_trajectories.csv per-landmark rank at every cutoff
data/robustness_label_shuffle_placebo.csv the kill-criterion
data/robustness_cutoff_sweep_aggregate.csv AP across 2020-2024
data/robustness_cutoff_sweep_ranks.csv landmark ranks across 2020-2024
data/robustness_negative_controls.csv specificity test
data/robustness_shap_funnel.csv inside vs outside funnel attribution
Reproduce
The numbers here are copied verbatim from the pipeline outputs; nothing is re-scored at packaging time. From the project repository:
python pipeline/12_run_hewb.py # the benchmark
python pipeline/20_run_robustness.py # the capstone
python pipeline/21_export_hewb_release.py # assemble this release
Recent cutoffs are censored, not weak
Precision falls steadily across the cutoff schedule: precision@50 runs
0.58 to 0.78 for cutoffs from 2009 to 2017, then 0.18 to 0.26 for 2021 to 2024.
Read as a time series that looks like a model getting worse. It is not.
A cutoff can only be graded against outcomes that have already happened. The 2009 cutoff has had seventeen years for its predictions to resolve; the 2024 cutoff has had two. A substance flagged in 2024 and withdrawn in 2031 counts today as a false positive, and will count as a true positive later, without anything about the model changing.
The relationship is almost perfectly linear. Across the sixteen cutoffs,
precision@50 correlates with the number of years of future available at
r = 0.957, and with the number of positives that have materialised at
r = 0.832. Degradation would not produce that; right-censoring does.
Two consequences for anyone reading these tables:
- The mature cutoffs carry the honest estimate of the method. Around 0.7 precision at k=50, not the 0.22 the most recent row shows.
- A forward watchlist cannot be graded early. Scored two years out it will
look poor whatever its quality, which is why
pipeline/26_track_resolution.pyscores only entries whose approval expiry has actually forced a decision, and reports no precision at all while nothing has settled.
Precision is also flat across k on the mature cutoffs, holding a plateau from k=10 to about k=50 (0.68 to 0.78) before declining: 0.57 to 0.62 at k=100, 0.41 to 0.45 at k=200, 0.18 to 0.20 at k=500. So k=50 is not an arbitrary round number, it sits at the end of the plateau. Top-50 captures 32 to 38 percent of all positives, which is the recall that precision buys.
Limitations
- The
early_warninglabel's extra positives trace to a single Swedish reevaluation announcement. It is a real signal, but a narrow one. - "Non-renewal" records that a withdrawal happened and when, not why. Commercial and administrative withdrawals are real and are not distinguished here from safety-driven ones.
- The result is demonstrated on exactly one regulatory pipeline. The generalisation claim is scoped accordingly: four candidate regimes (PFAS, biocides, food additives, feed additives) were each measured against the three conditions and each failed for a different reason, so no second domain is claimed and the boundary is reported instead. See "Where the method fits, and where it does not".
- KEMI Swedish sales data begins in 2013, so pre-2013 cutoffs rest entirely on EU-wide hazard, approval, and graph features, with no national sales signal.
- The population is built from the EU Pesticides Database bulk export. This was audited against the register's own API: the export matches the register's public search exactly, as a set and not merely in count (1,482 substances). Scanning the details endpoint by id reaches 100 further records, of which 87 are flagged by the register as not for publication and 13 are superseded or split entries whose canonical replacements are already in the population (for example an older "Ammonium acetate" record replaced by "Ammonium Acetate", and an umbrella pheromone entry since split into three). None of the reachable extras contributes a dated non-renewal that the population lacks, so the positive class is unaffected.
Citation
Blomqvist, M. (2026). HEWB: the Hazium Early Warning Benchmark (v1.4).
https://github.com/MartinBlomqvistDev/hazium
- Downloads last month
- 43