SAGDABase(in_dim, hid_dim, num_classes, num_layers=3, dropout=0.1, act=F.relu, beta=0.5, alpha=0.5, ppmi=True, adv_dim=40, **kwargs)
Bases: Module
Base class for SAGDA.
| Parameters: |
|
|---|
encode(data, cache_name, mask=None)
Multi-view encoding combining GCN and optional PPMI features.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
- GCN encoding
- Optional PPMI encoding
- Attention-based feature fusion if PPMI enabled
gcn_encode(data, cache_name, mask=None)
Encode data using standard GCN encoder.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
Standard GCN encoding with caching support
ppmi_encode(data, cache_name, mask=None)
Encode data using PPMI-based GNN encoder.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
PPMI-based encoding capturing higher-order structure
src_encode(x, edge_index, mask=None)
Encode source domain data using structure-aware GNN.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
Uses SrcGNN with structure awareness and feature attention
SAGNN(in_features, out_features, alpha, beta, weight=None, bias=None)
Bases: Module
Structure Aware Graph Neural Network layer.
| Parameters: |
|
|---|
Notes
Combines feature attention and structure learning:
- Uses FAConv for feature-attention convolution
- Learnable transformation matrix
- Optional bias term
forward(x, edge_index)
Forward pass of SAGNN layer.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
- Feature-attention convolution
- Linear transformation
- Optional bias addition
SrcGNN(in_dim, hid_dim, alpha=0.5, beta=0.5, num_layers=3, act=F.relu, base_model=None)
Bases: Module
Source domain GNN with structure awareness.
| Parameters: |
|
|---|
Notes
- Multiple SAGNN layers
- Dropout regularization
- Weight sharing option with base model
- Configurable depth and activation
forward(x, edge_index)
Forward pass through source GNN.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
Sequential processing through SAGNN layers
TgtGNN(in_dim, hid_dim, gnn_type='gcn', num_layers=3, base_model=None, act=F.relu, **kwargs)
Bases: Module
Target domain GNN with flexible architecture.
| Parameters: |
|
|---|
Notes
- Choice of GNN type (GCN or PPMI)
- Multiple layers with dropout
- Weight sharing capability
- Cached computation support
forward(x, edge_index, cache_name)
Forward pass through target GNN.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
- Layer-wise propagation
- Intermediate activation
- Dropout regularization
- Cache-aware computation