ASN(in_dim, hid_dim, hid_dim_vae, num_classes, num_layers=3, step=3, dropout=0.0, act=F.relu, lambda_r=1.0, lambda_d=0.1, lambda_f=0.001, adv_dim=10, weight_decay=0.0005, lr=0.03, epoch=200, device='cuda:0', batch_size=0, num_neigh=-1, verbose=2, **kwargs)
Bases: BaseGDA
Adversarial Separation Network for Cross-Network Node Classification (CIKM-21).
| Parameters: |
|
|---|
agg_tran_prob_mat(g, step)
Compute aggregated K-step transition probability matrix.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
Aggregates transition probabilities up to K steps to capture higher-order proximity information.
compute_ppmi(a)
Compute Positive Pointwise Mutual Information (PPMI) matrix.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
PPMI captures the statistical significance of node co-occurrences in random walks, useful for preserving high-order proximity.
fit(source_data, target_data)
Train the ASN model.
| Parameters: |
|
|---|
Notes
Training process includes:
- Computing PPMI matrices for both domains
- Training private and shared encoders
- Optimizing multiple objectives:
- Reconstruction loss
- Classification loss
- Domain adversarial loss
- Feature separation loss
- Entropy minimization
forward_model(source_data, target_data)
Forward pass of the model.
| Parameters: |
|
|---|
init_model(**kwargs)
Initialize the ASN model.
| Parameters: |
|
|---|
| Returns: |
|
|---|
my_scale_sim_mat(w)
Compute L1 row normalization of a matrix.
| Parameters: |
|
|---|
| Returns: |
|
|---|
predict(data)
Make predictions on given data.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
Uses both local and global graph structure through shared encoders and attention mechanism for final prediction.
process_graph(data)
Process the input graph data to compute PPMI matrix.
| Parameters: |
|
|---|
| Returns: |
|
|---|
sparse_mx_to_torch_sparse_tensor(sparse_mx)
Convert a scipy sparse matrix to a torch sparse tensor.
| Parameters: |
|
|---|
| Returns: |
|
|---|