lmcinnes / lmcinnes/umap

spectral_layout gets stuck on eigsh

Open
#76 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.3k
Forks
871
Avg merge
1d 13h
Merged PRs (30d)
5

Description

On some datasets (in this case sentence embeddings, 25d vectors) spectral_layout gets stuck on eigsh.
Dataset size shape in my case: (50000, 25)
metric: cosine
I have been hunting this for a while now and if you do not mind i will try to implement this differently using truncated svd instead of eigsh and make a pull request. In any case eigsh does not seem to raise "ArpackNoConvergence" which it should if optimization gets stuck (i will raise this with scipy community).
As a sidenote: this is not really reproducable for all datasets - some datasets work, some don't. Changing n_neighbors (i.e. altering the graph) solves the issue for some datasets - not for others. Random init works just fine on all datasets i have tried.

In any event i really love UMAP and use it as drop in replacement for t-SNE and as dimensionality reduction kit of clustering, anomaly detection and topological data analysis (i.e. as a lens for the MAPPER algorithm)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the spectral_layout entry point and reproduce the hang with a (50000, 25) sentence-embedding dataset using cosine distance. Trace the eigsh path and compare it with the proposed truncated-SVD approach; done means the affected datasets complete instead of remaining stuck, while preserving the existing random-init behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.