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

Out-of-bounds in pairwise variant #522

Merged
merged 1 commit into from
Nov 3, 2024
Merged

Conversation

sebastiendesignolle
Copy link
Collaborator

Dominik identified the following problem in pairwise:

using FrankWolfe
using LinearAlgebra
using StableRNGs

rng = StableRNG(09382173)
n = 100

xpi = reshape(rand(rng, n*n), n, n)

function f(x)
    return norm(x .- xpi)^2 / n^2
end

function grad!(storage, x)
    return @. storage = (2 * (x - xpi)) / n^2
end

lmo = FrankWolfe.BirkhoffPolytopeLMO()
x0 = compute_extreme_point(lmo, reshape(rand(rng, n*n), n, n))
act_set = FrankWolfe.ActiveSet([(BigFloat(1.0), x0)])
FrankWolfe.pairwise_frank_wolfe(f, grad!, lmo, copy(act_set); verbose=true)

This tries to access an undefined reference as the first away update deletes an atom with small weight, but then tries to access it in the fw update.
This was most likely a typo as the comment above the first update explicitly states that renormalisation only concerns the fw update.

@matbesancon
Copy link
Member

ah perfect good catch both!

@dkuzi
Copy link

dkuzi commented Oct 30, 2024

This change introduced the problem with pairwise on spectrahedron. Will take a look at it

@matbesancon matbesancon merged commit 9ab7500 into master Nov 3, 2024
12 checks passed
@matbesancon matbesancon deleted the pairwise-out-of-bounds branch November 3, 2024 07:45
dhendryc pushed a commit that referenced this pull request Jan 17, 2025
dhendryc pushed a commit that referenced this pull request Jan 24, 2025
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

Successfully merging this pull request may close these issues.

3 participants