Skip to content

Core Engine

src/fed_maxfuse/models/federated/model.py

MaxFuseFederatedModelNode

The node-side algorithm. One instance per participating node; each holds exactly one modality and never accesses the other's data. Its methods walk the federated protocol in order; see Architecture.

Methods by pipeline stage

Stage Methods
Graphs & meta-cells construct_graphs, _construct_nn_graphs, _construct_centroid_shrinkage_graphs, _cluster_graphs
Initial matching initial_correlation, set_initial_matching
Refinement setup prepare_data_for_refinement_loop, get_refined_active_data_shape
Federated CCA init_cca, start_cca_component_fit, singular_vectors_power_method_step, finish_cca_component_fit, finish_cca
Loop matching calculate_cca_embedding_correlation, set_new_matching, set_refined_pivot_matching
Filtering get_filtered_indexes, construct_init_cca_on_filtered_pivots
Meta-cell bookkeeping get_existing_refined_meta_indices, override_existing_refined_meta_indices, get_meta_cell_matching_lengths, construct_meta_cell_idx_to_indices_dict
Propagation propagate, get_remaining_propagation_indices, filtered_matching_data_correlation
Output get_embedding, get_active_data
Dimensionality _fit_svd_on_full_data, cca_transform_filtered_data

Correspondence to the paper

Method Algorithm step
construct_graphs Phases 2–3 — meta-cells, k-NN graphs
initial_correlation Phase 4 — node side of initialisation
init_ccafinish_cca Federated CCA + SVPM
get_filtered_indexes Pivot filtering (α)
construct_init_cca_on_filtered_pivots FitEmbeddingsCCA on pivots
propagate Phase 6 propagation
get_embedding GetEmbeddingsCCA — final embeddings
_fit_svd_on_full_data Truncated SVD on full data

Other model variants

Module Purpose
models/regular/model.py Centralized re-implementation
models/distributed/model.py Distributed, non-privacy-preserving
models/original/ Wrapper around upstream MaxFuse
models/common/ Shared parameter dataclasses

Each variant provides model.py, parameters.py, train.py.

Parameter objects

models/common/ defines typed configuration:

Module Configures
global_settings_params.py Top-level run settings
batch_splitting_params.py Batching
leiden_algorithm_params.py Clustering
filtering_params.py α and β
preprocessing_params.py Preprocessing
data_settings_params.py Dataset paths and IDs
eval_metric_vars_params.py Metric selection
randomness_seeds_params.py leiden_seed, nn_graph_seed