torchcell.models.hetero_cell_bipartite_dango_gi.PairwiseGraphAggregation

class PairwiseGraphAggregation(hidden_dim: int, graph_names: list[str], dropout: float = 0.0)[source]

Bases: Module

Pairwise interaction aggregation over multiple graph representations.

forward(graph_outputs: dict[str, Tensor]) → tuple[Tensor | None, Tensor | None][source]

Compute pairwise graph interactions and aggregate them.

Returns:

Aggregated features [num_nodes, hidden_dim] attention_weights: Attention weights for interactions [num_nodes, num_interactions]

Return type:

aggregated