Add Belgium pilot: Axiom rules engine over populace-be entity tables#448
Open
MaxGhenis wants to merge 2 commits into
Open
Add Belgium pilot: Axiom rules engine over populace-be entity tables#448MaxGhenis wants to merge 2 commits into
MaxGhenis wants to merge 2 commits into
Conversation
The first non-policyengine-core country channel: an Axiom-backed TaxBenefitModelVersion outside the certified-release machinery, running the rulespec-be composed worker pipeline (employee SSC and PIT before withholding) over populace-be person/household tables with calibrated weights. Includes a populace-style two-entity dataset class, a population example scored against ONSS/SPF facts, and tests that skip cleanly when the source-only dependencies are absent. Fixes #447 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
10 tasks
The composed pipeline now computes the ONSS work-bonus amounts from law (the a/b supplied inputs are gone; the reference-wage input bridges 0 to worker remuneration), and the ordinary-contribution concept nets the bonus. Update the supplied defaults, exercise the phase-out in the test fixture (wiped at 20k, partial at 30k, statutory 13.07 percent by 60k), and label the example aggregates accordingly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #447
What this is
A pilot Belgium channel for policyengine.py — the first country that runs on the Axiom rules engine instead of a policyengine-core country package:
src/policyengine/tax_benefit_models/be/—AxiomBelgiumPilot, aTaxBenefitModelVersionsubclass (deliberately outside the certified-release machinery: no manifest, no region registry) whoserun()builds a populaceFrame, executes the rulespec-be composed worker pipeline through the populaceAxiomEngineadapter, and returns weighted person/householdMicroDataFrames as the output dataset.PopulaceBelgiumDataset/BEYearData— two-entity (person, household) HDF5 dataset in the populace-be layout, calibrated household weights.examples/belgium_axiom_pilot.py— the end-to-end population run.tests/test_be_axiom_pilot.py— statutory assertions on a four-person fixture around the work-bonus phase-out (contribution wiped at 20k, partial at 30k, statutory 13.07% by 60k); skips cleanly unless populace-frame, axiom-rules-engine, and a rulespec-be checkout are present (source-only, so CI skips).Validation status: machine-checked conformance vs EUROMOD
The encoding this channel executes is conformant against EUROMOD BE_2025 per the axiom-oracles scoreboard: 23/23 in-scope EUROMOD policies covered, 0 unexplained residuals, 0 open Axiom-attributed mismatches. Per-case, the two engines agree to the cent on the worker suites — including
be-worker-disposable-income-list(gross − tax − SSC end to end, 0 mismatches) — and where they deliberately differ (e.g. the couple pipeline scopes out the worker-stage deductions), each residual carries a committed disposition with a statutory citation. Compositions behind every covered suite are now machine-recorded and reproducible (TheAxiomFoundation/axiom-oracles#235). Nothing in the tables below is unexplained.Population results on the calibrated pilot dataset (2026-07-08)
populace-us support records reweighted to Belgian Ledger targets (Statbel demography, SPF fiscal income, ONSS contributions, ONEM recipients — 21/21 within 1.8%), 166,302 persons:
Reading the PIT difference — every euro is attributed, and the buckets point in different directions:
On the SPF Finances comparison in earlier revisions: worker PIT sits at 0.37 of SPF's EUR 62.84B all-PIT total — and moved further from it as the encoding improved (the newly encoded refundable credit reduces worker-slice PIT). That distance is scope by construction, not error: the pipeline models wage earners only (EUR 159.7B of remuneration against EUR 274.7B of fiscal income; no pensions, self-employed, or investment income in the base).
What this is not
Not a certified model and not representative Belgian microdata — the support records are American, worker-slice coverage, individual assessment. Labeled as such throughout. It demonstrates the channel (
Simulation(dataset=..., tax_benefit_model_version=AxiomBelgiumPilot(...)).run()) so the certified pieces (SILC support strata, engine-computed targets, full composed coverage) can land behind a stable surface.Dependency note
populace-frameandaxiom-rules-engineare not on PyPI; nothing is added topyproject.toml. The module docstring and test skip conditions document source installation. Publishing both is the follow-up that makes the example runnable for users (axiom-rules-engine wheel publishing is blocked on a maturin build regression on its main, filed as TheAxiomFoundation/axiom-rules-engine#92).🤖 Generated with Claude Code