torchcell.models.hetero_cell_bipartite_dango_gi_lazy.PairwiseGraphAggregation
- class PairwiseGraphAggregation(hidden_dim: int, graph_names: list[str], dropout: float = 0.0, activation: str = 'relu', num_layers: int = 2, bottleneck_dim: int | None = None, norm: str | None = None)[source]
Bases:
ModulePairwise interaction mechanism for aggregating multiple graph representations.
- forward(graph_outputs: dict[str, Tensor]) tuple[Tensor | None, Tensor | None][source]
Compute pairwise graph interactions and aggregate them.
Includes identity option (mean of individual graphs) alongside pairwise combinations.
- Returns:
Aggregated features [num_nodes, hidden_dim] pair_weights: Learned importance weights for pairwise interactions + identity [num_nodes, num_interactions+1]
- Return type:
aggregated