feat: implement reproducible PROTEAN baseline pipeline

This commit is contained in:
willtanoe committed 2026-09-24 17:39:00 +00:00
1 parent 2cc6a9859e
commit 0aa8e2ba79
93 files changed
+8173 -658

No files matched your search

+33 -22
View File
@@ -1,6 +1,8 @@
# Frozen experiment protocol for the beta-weighted prototype aggregation study.
# Values below are the required research settings. Seed set is provisional until
# the verified baseline convention is reproduced (see docs/baseline/).
#
# ALL values below are now FROZEN for the baseline reproduction (2026-09-24 session).
# They must remain identical across every aggregation variant, beta candidate and
# seed so that comparisons are paired. See docs/research/EXPERIMENT_PROTOCOL.md.
datasets:
- xiiotid
@@ -8,35 +10,38 @@ datasets:
non_iid:
partition: dirichlet
# Frozen Dirichlet algorithm: for each class, draw proportions ~ Dirichlet(alpha)
# over clients, then multinomial-allocate that class's train samples. See
# docs/research/EXPERIMENT_PROTOCOL.md section 2.
algorithm: per_class_dirichlet_multinomial
alphas: [0.75, 0.50, 0.25] # required by the research specification
num_clients: 10 # matches PROTEAN paper cross-silo setting
aggregation:
# beta candidates under test (one beta is applied to all classes and clients)
betas: [0.00, 0.25, 0.50, 0.75, 1.00]
# Modes:
# original_protean : verified baseline semantics (NOT YET VERIFIED)
# support_weighted : w_ij = N_ij ** beta, normalized over S_j (proposed)
# equal_available : equal weights over S_j (methodological control,
# introduced only if the baseline participant rule differs)
primary_mode: support_weighted
# Baseline checkpoint: only the reproduced original-PROTEAN aggregation is
# implemented. Support-weighted beta candidates and the equal_available control
# are DEFERRED to the later beta/controls phase (see docs/research/EXPERIMENT_PROTOCOL.md).
baseline_mode: original_protean
control_mode: equal_available
training:
rounds: 10
local_epochs: 3
# mu is stated in the paper; lambda is NOT stated in the paper text (UNRESOLVED).
mu: 0.1
lambda: null
batch_size: null # to be fixed after baseline reproduction
learning_rate: null # to be fixed after baseline reproduction
mu: 0.1 # model-alignment coefficient (paper, frozen)
lambda: 1.0 # prototype-alignment coefficient (PROJECT DECISION; paper gives no value)
batch_size: 256 # PROJECT DECISION; paper gives no value
learning_rate: 0.001 # PROJECT DECISION; paper gives no value
optimizer: adam # PROJECT DECISION; paper gives no value
model_aggregation: equal_1_over_m # paper Eq. (2)/(5.5)
prototype_computation: end_of_round_mean_embedding
prototype_alignment_form: per_sample_embedding_to_global_prototype # FedProto-style reading of Eq. (3)
evaluation:
# The paper uses 80/20 train/test and has no validation split.
# This study ADDS a validation split used only for beta selection.
test_fraction: 0.20
validation_fraction: null # finalize after baseline reproduction
test_fraction: 0.20 # paper
validation_fraction: 0.10 # PROJECT DECISION (fraction of the full cleaned dataset)
train_fraction: 0.70 # remainder
split_strategy: stratified_by_class
selection_metric: rare_class_macro_f1
rare_class_rule: two_smallest_positive_attack_support
report_metrics:
@@ -45,12 +50,18 @@ evaluation:
- overall_macro_f1
- accuracy
- per_client_metrics
- per_class_precision_recall_f1
- unseen_class_report
seeds:
# Paper averaged over three random seeds. Exact seed values are UNRESOLVED;
# they must be fixed before any beta comparison and shared across all modes.
provisional: [0, 1, 2]
status: provisional
# The paper averages over three random seeds but names none, so the seed values
# are NOT source-confirmed. {0, 1, 2} is an explicit PROJECT DECISION chosen as
# the minimal three-seed set, and is identical across every baseline condition.
# Each seed deterministically controls the split, Dirichlet partition, model
# initialisation and batch order (see src/protean_research/utils/seeding.py).
frozen: [0, 1, 2]
rationale: minimal_three_seed_set_paper_reports_three_unnamed_runs
source_status: project_decision_not_source_confirmed
artifacts:
partition_manifest_dir: artifacts/partitions