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

[BUG] Accuracy of lanczos solver. #313

Open
trivialfis opened this issue Aug 12, 2021 · 10 comments
Open

[BUG] Accuracy of lanczos solver. #313

trivialfis opened this issue Aug 12, 2021 · 10 comments
Labels
bug Something isn't working

Comments

@trivialfis
Copy link
Member

This is a tracking issue for the accuracy of Lanczos solver. During the development of the spectral embedding interface for cuml, I compared the eigen solver between raft and scipy eigsh with a normalized Laplacian matrix as input. The result from raft solver is off for some cases. At the end, I have pasted a 16x16 example COO matrix extracted out from spectral embedding.

Related: rapidsai/cuml#3864 rapidsai/cuml#263

  std::vector<int32_t> rows{
    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,
    1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  2,  2,  2,  3,  3,  3,  3,  3,
    3,  3,  3,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  5,  5,  5,  5,  5,  5,
    5,  5,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  7,  7,  7,  7,  7,  7,
    7,  7,  7,  7,  7,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
    8,  9,  9,  9,  9,  9,  9,  9,  9,  10, 10, 10, 10, 10, 10, 10, 10, 11, 11,
    11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
    13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
    14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15};
  std::vector<int32_t> cols{
    13, 11, 10, 9,  5, 3,  2,  1,  14, 15, 6,  12, 4,  7,  8,  0,  3,  9,  7,
    14, 8,  0,  11, 2, 1,  12, 0,  1,  8,  3,  9,  11, 2,  1,  0,  12, 8,  2,
    11, 9,  3,  7,  5, 14, 8,  13, 0,  15, 12, 6,  4,  4,  7,  0,  6,  10, 15,
    14, 5,  10, 7,  5, 8,  13, 0,  12, 14, 4,  15, 6,  10, 5,  1,  12, 4,  8,
    6,  14, 15, 0,  7, 13, 11, 10, 9,  3,  2,  1,  15, 7,  14, 6,  4,  12, 0,
    8,  1,  0,  12, 8, 2,  11, 3,  9,  8,  0,  7,  6,  15, 14, 5,  10, 1,  0,
    12, 8,  9,  3,  2, 11, 11, 9,  7,  3,  2,  14, 15, 6,  8,  13, 0,  4,  12,
    14, 15, 8,  0,  6, 12, 4,  13, 13, 12, 10, 1,  8,  7,  4,  0,  5,  6,  15,
    14, 13, 12, 10, 5, 8,  7,  0,  4,  14, 6,  15};
  std::vector<float> vals{-0.067419983446598053, -0.064282432198524475, -0.07537783682346344, -0.064282432198524475, -0.067419983446598053, -0.067419983446598053, -0.064282432198524475, -0.064282432198524475, -0.10050377994775772, -0.10341754555702209, -0.10341754555702209, -0.10341754555702209, -0.10660035908222198, -0.11396057903766632, -0.093048423528671265,    1, -0.095346257090568542, -0.18181817233562469, -0.080582298338413239, -0.071066908538341522, -0.065795168280601501, -0.064282432198524475, -0.18181817233562469, -0.18181817233562469,    1, -0.073127247393131256, -0.064282432198524475, -0.18181817233562469, -0.065795168280601501, -0.19069251418113708, -0.18181817233562469, -0.18181817233562469,    1, -0.095346257090568542, -0.067419983446598053, -0.076696500182151794, -0.069006554782390594, -0.19069251418113708, -0.19069251418113708, -0.19069251418113708,    1, -0.066815309226512909, -0.079056940972805023, -0.1178511306643486, -0.10910894721746445, -0.15811388194561005, -0.10660035163164139, -0.12126781791448593, -0.12126781791448593, -0.12126781791448593,    1, -0.079056940972805023, -0.08451543003320694, -0.067419983446598053, -0.076696500182151794, -0.22360679507255554, -0.15339300036430359, -0.14907120168209076,    1, -0.085749298334121704, -0.064820379018783569, -0.076696500182151794, -0.10585123300552368, -0.15339300036430359, -0.10341754555702209, -0.11764707416296005, -0.1143324002623558, -0.12126782536506653, -0.11764707416296005,    1, -0.094491124153137207, -0.08451543003320694, -0.080582298338413239, -0.064820379018783569, -0.066815316677093506, -0.11664237827062607, -0.064820379018783569, -0.12598817050457001, -0.12964075803756714, -0.11396057903766632,    1, -0.069006554782390594, -0.065795168280601501, -0.077151678502559662, -0.065795168280601501, -0.069006554782390594, -0.065795168280601501, -0.065795168280601501, -0.10585123300552368, -0.11664237827062607, -0.10286890715360641, -0.10585123300552368, -0.10910895466804504, -0.10585123300552368, -0.093048423528671265,    1, -0.18181817233562469, -0.064282432198524475, -0.073127247393131256, -0.065795168280601501, -0.18181817233562469, -0.18181817233562469, -0.19069251418113708,    1, -0.077151678502559662, -0.07537783682346344, -0.094491124153137207, -0.085749298334121704, -0.085749298334121704, -0.083333335816860199, -0.22360679507255554,    1, -0.18181817233562469, -0.064282432198524475, -0.073127247393131256, -0.065795168280601501, -0.18181817233562469, -0.19069251418113708, -0.18181817233562469,    1, -0.073127247393131256, -0.073127247393131256, -0.064820379018783569, -0.076696500182151794, -0.073127247393131256, -0.057166200131177902, -0.058823537081480026, -0.11764707416296005, -0.10585123300552368, -0.15339300036430359, -0.10341754555702209, -0.12126782536506653,    1, -0.07453560084104538, -0.076696500182151794, -0.069006554782390594, -0.067419983446598053, -0.15339300036430359, -0.15339300036430359, -0.15811388194561005,    1, -0.07453560084104538, -0.057166200131177902, -0.083333335816860199, -0.071066908538341522, -0.10286890715360641, -0.12598817050457001, -0.1178511381149292, -0.10050377994775772, -0.14907120168209076, -0.1143324002623558, -0.1143324002623558,    1, -0.076696500182151794, -0.058823537081480026, -0.085749298334121704, -0.15339300036430359, -0.10585123300552368, -0.12964075803756714, -0.10341754555702209, -0.12126782536506653, -0.1143324002623558, -0.11764707416296005,    1};
@trivialfis trivialfis added the bug Something isn't working label Aug 12, 2021
@trivialfis
Copy link
Member Author

cc @dantegd @cjnolet

@github-actions
Copy link

This issue has been labeled inactive-90d due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.

@github-actions
Copy link

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

@trivialfis
Copy link
Member Author

I'm working on it.

@github-actions
Copy link

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

@cjnolet
Copy link
Member

cjnolet commented Feb 2, 2022

Linking #379

@github-actions
Copy link

github-actions bot commented Mar 4, 2022

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

@github-actions
Copy link

github-actions bot commented Jun 2, 2022

This issue has been labeled inactive-90d due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.

@cjnolet
Copy link
Member

cjnolet commented Jun 2, 2022

@trivialfis is this something we might be able to prioritize for 22.08? There is also a plan to start integrating lbfgs into cupy so it might make for a good theme to do some improvements to our solvers in 22.08/2.10 timeframe.

@github-actions
Copy link

github-actions bot commented Jul 2, 2022

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants