Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some problems about topology loss #17

Closed
linxcan opened this issue Apr 7, 2023 · 10 comments
Closed

Some problems about topology loss #17

linxcan opened this issue Apr 7, 2023 · 10 comments

Comments

@linxcan
Copy link

linxcan commented Apr 7, 2023

image
Hello, when we looked at the baseline model, we found that the model will use 1-gt, and 0 as positive when calculating the topology loss. Why do you do this, shouldn’t 1 be positive?

@faikit
Copy link
Collaborator

faikit commented Apr 7, 2023

Hi, in the adjacency matrix, 1 represents the positive edge. But for calculating the loss, the prediction loss regards 0 as positive.

@linxcan
Copy link
Author

linxcan commented Apr 7, 2023

Thank you for your reply, but if the network uses 0 as the positive class to calculate the loss, shouldn’t the topological network predict that 0 is the positive edge? Isn’t this the opposite of GT?

@faikit
Copy link
Collaborator

faikit commented Apr 7, 2023

In (1 - GT), the 0 means that the 0-th channel of the predicted adjacency matrix is positive, and we just have one channel on the predicted result. You can think about a multiclass classification problem that the number means that the instance belongs to the n-th class.

@linxcan
Copy link
Author

linxcan commented Apr 7, 2023

Can I understand it this way, in the results predicted by the topology network, does 0 mean that there is a connection?

@faikit
Copy link
Collaborator

faikit commented Apr 7, 2023

No. In the predicted results, we got one channel, which's value is 0.8 for example, meaning the predicted edge is positive. Just take it another way, for a classification problem with 3 classes, the predicted confidence of an instance is [0.8, 0.1, 0.1], which means the instance is predicted as the 0-th, and the corresponding GT for calculating the loss is 0 (assuming the GT is 0-th class).

@linxcan
Copy link
Author

linxcan commented Apr 7, 2023

But when calculating the loss, the value predicted by the network is compared with 0th. Doesn’t the 0 predicted by the network correspond to the 0th of GT? Doesn’t the value of 0 predicted by the network correspond to the connection of GT?

@faikit
Copy link
Collaborator

faikit commented Apr 7, 2023

I think 0 is not a value but a class in the (1 - GT). It is a loss for classification instead of regression.

@linxcan
Copy link
Author

linxcan commented Apr 8, 2023

Thanks for your reply, I still have some questions. In (1-GT), class 0 is meaningful, which represents connected edges. Doesn’t the class 0 predicted by the topology network correspond to the class 0 of (1-GT)?

@faikit
Copy link
Collaborator

faikit commented Apr 8, 2023

For a positive edge in GT, the network should predict it as class 0, that's correct. And predicting the 0-th class means that the 0-th channel of the adjacency matrix should have greater values, then we use a threshold of > 0.5 to determine a predicted positive edge.

@linxcan
Copy link
Author

linxcan commented Apr 10, 2023

Thank you! Your patience and clear explanation were incredibly helpful.

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

No branches or pull requests

2 participants