Skip to content

Compare my work to original repo#1

Open
sunjin-k wants to merge 181 commits into
start_of_projectfrom
main
Open

Compare my work to original repo#1
sunjin-k wants to merge 181 commits into
start_of_projectfrom
main

Conversation

@sunjin-k

Copy link
Copy Markdown
Owner

No description provided.

Sun Jin Kim added 30 commits July 12, 2022 21:08
for the learnable parameter count to be just under zinc-sparse for fair comparison
- add include_down_adj argument to ZincDataset
- add include_down_adj to exp.parser
- similar changes in data_loading and run_exp

plus

- aesthetic change to CochainMessagePassing's docstring
Edit existing tests to account for its new interface

- The interface for calling CochainMessagePassing.propagate has changed: one extra argument and one extra output
- I still need to write tests for co-boundary support for CochainMessagePassing
Comment thread data/complex.py
if dim > 0 and self.cochains[dim - 1].x is not None:
boundary_features = self.cochains[dim - 1].x

# Add coboundary features

@sunjin-k sunjin-k Apr 17, 2025

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add coboundary features to the CochainMessagePassingParams that Cochain.get_cochain_params returns.

Explanation: A Cochain represents a subset of the graph (i.e. Complex, which is the main data object in this repository). CochainMessagePassingParams is a collection of current feature vectors prepared by Cochain each timestep, so it can be passed into the timestep's neural network layer.

Comment thread data/utils.py
boundary_index[0].append(boundary)
boundary_index = torch.LongTensor(boundary_index)


@sunjin-k sunjin-k Apr 17, 2025

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add coboundary processing capability to graph data pre-processing code.

Further explanation: A normal graph dataset (with node and edge information) can be passed into convert_graph_dataset_with_gudhi to be turned into a cw-complex dataset (with node, edge, ring, boundary and coboundary information). I added a simple extension to support coboundary information. See also extension to convert_graph_dataset_with_rings.

Comment thread mp/cell_mp.py
return scatter(inputs, agg_boundary_index, dim=self.node_dim, dim_size=boundary_dim_size,
reduce=self.aggr_boundary)

def aggregate_coboundary(self, inputs: Tensor, agg_coboundary_index: Tensor,

@sunjin-k sunjin-k Apr 17, 2025

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add aggregate_coboundary method to CochainMessagePassing class.

Analagous to pytorch-geometric's MessagePassing.aggregate.

Also see #1 (comment)

Comment thread mp/cell_mp.py
"""
return boundary_x_j

def message_coboundary(self, coboundary_x_j: Tensor):

@sunjin-k sunjin-k Apr 17, 2025

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add message_coboundary method to CochainMessagePassing class.

Analagous to pytorch-geometric's MessagePassing.message.

Also see #1 (comment)

Comment thread mp/molec_models.py
return self.__class__.__name__


class EmbedDenseCIN(torch.nn.Module):

@sunjin-k sunjin-k Apr 17, 2025

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified the EmbedSparseCIN graph neural network to support coboundary information, resulting in EmbedDenseCIN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant