nip.graph_isomorphism.agents

nip.graph_isomorphism.agents#

Graph isomorphism agents components.

Contains classes for building agent bodies and heads for the graph isomorphism task.

The structure of all agent bodies is the same:

  • A GNN module which takes as input the two graphs and the message history and outputs node-level representations for each graph.

  • A global pooling module which takes as input the node-level representations and outputs graph-level representations for each graph.

  • A transformer module which takes as input the graph-level representations and the node-level representations for both graphs together with the most recent message and outputs graph-level and node-level representations.

  • A representation encoder which takes as input the graph-level and node-level representations and outputs the final representations.

Classes

GraphIsomorphismAgent(hyper_params, agent_name)

An agent for the graph isomorphism task.

GraphIsomorphismAgentBody(*args, **kwargs)

Agent body for the graph isomorphism task.

GraphIsomorphismAgentHead(*args, **kwargs)

Base class for all graph isomorphism agent heads.

GraphIsomorphismAgentHooks([gnn_output, ...])

Holder for hooks to run at various points in the agent forward pass.

GraphIsomorphismAgentPart(*args, **kwargs)

Base class for all graph isomorphism agent parts.

GraphIsomorphismAgentPolicyHead(*args, **kwargs)

Agent policy head for the graph isomorphism task.

GraphIsomorphismAgentValueHead(*args, **kwargs)

Value head for the graph isomorphism task.

GraphIsomorphismCombinedBody(*args, **kwargs)

A module which combines the agent bodies for the graph isomorphism task.

GraphIsomorphismCombinedPolicyHead(*args, ...)

A module which combines the agent policy heads for the graph isomorphism task.

GraphIsomorphismCombinedValueHead(*args, ...)

A module which combines the agent value heads for the graph isomorphism task.

GraphIsomorphismConstantAgentValueHead(...)

A constant value head for the graph isomorphism task.

GraphIsomorphismDummyAgentBody(*args, **kwargs)

Dummy agent body for the graph isomorphism task.

GraphIsomorphismDummyAgentPart(*args, **kwargs)

Base class for all graph isomorphism dummy agent parts.

GraphIsomorphismRandomAgentPolicyHead(*args, ...)

Policy head for the graph isomorphism task yielding a uniform distribution.

GraphIsomorphismSoloAgentHead(*args, **kwargs)

Solo agent head for the graph isomorphism task.