Enhancing HNSW Index for Real-Time Updates: Addressing Unreachable Points and Performance Degradation
Meta info.
- Authors: Wentao Xiao, Yueyang Zhan, Rui Xi, Mengshu Hou, Jianming Liao
- Paper: https://arxiv.org/pdf/2407.07871
- Code: https://github.com/xwt1/ICPADS-MN-RU
TL; DR
unreachable points phenomenon์ ์ํํ๋ HNSW ๊ธฐ๋ฐ์ MN-RU(Mutual Neighbor-Replaced Update) ์๊ณ ๋ฆฌ์ฆ ์ ์




Problem States
HNSW์ด์ฐ์
๋ฑ์์ ANN์ผ๋ก ๊ฐ์ฅ ์์ฝ๊ฒ ์ฌ์ฉ๋๋ ์๊ณ ๋ฆฌ์ฆ์ด๋, ์ค์๊ฐ ์
๋ฐ์ดํธ์ ์ฑ๋ฅ ํฌ๊ฒ ์ ํ๋จ. ์ฃผ์ ์์ธ์ผ๋ก ๊ทธ๋ํ ์ฐ๊ฒฐ์ฑ์ด ๋์ด์ง๋ unreachable points phenomenon (pic1ย )๊ฐ ํด๊ฒฐ ์ ๋จ.
Suggestion
๋จ์ ๋ณด์๋ HNSW ๊ธฐ๋ฐ์ MN-RU(Mutual Neighbor-Replaced Update) ์๊ณ ๋ฆฌ์ฆ ์ ์.
- 2์ค ๊ตฌ์กฐ index ๊ตฌ์ฑ
- main index: index used for regular operations
- backup index: index managing the unreachable points
- query์ ๊ฐ์ฅ ๊ฐ๊น์ด point ์๋ณ์ ์ํด main index์์ K-NN ๊ฒ์ ์ํ
- K-NN์์ ์๋ณ ์๋๋, unreachable points main index์์ ์ ๊ฑฐ
- main index์ ๋ณ๊ฐ๋ก, unreachable point์ ๋ํ ์ HNSW ์ธ๋ฑ์ค ๊ตฌ์ฑ (backup index)
- dual index search: main - backup ๋์ ์์น: main์์ unreachable point๊ฐ ๋ํ๋๋ฉด backup์์ ๋ณด์
- MN-RU ์๊ณ ๋ฆฌ์ฆ
- Mutual Neighbor Selection: main index ์ ๋ฐ์ดํธํ๋ ๋์ ๊ทธ๋ํ ์ฐ๊ฒฐ์ฑ ์ ์ง
- Neighbor Reselection: point๊ฐ ์ญ์ ๋๋ฉด ์ญ์ ๋ ํฌ์ธํธ์ ์ด์๊ณผ 2ํ ์ด์์ด ๋ค์ ์ฐ๊ฒฐ๋๋๋ก ํ์ฌ ๊ทธ๋ํ ์ฐ๊ฒฐ์ฑ ์ ์ง
Effects
- 3๊ฐ์ง ์๋๋ฆฌ์ค์์ ํ์ธ: ์ ๋ฒ์์์ ์์ฐจ์ ์ผ๋ก iteration ๋ ๋๋ง๋ค deletion-insertion ์ํ / iteration๋ง๋ค ๋ฌด์์ point์ ๋ํด deletion-insertion ์ํ / iteration๋ง๋ค ์ point deletion-insertion ์ํ
- long period (๋๋) ์ค์๊ฐ ์ ๋ฐ์ดํธ ๊ฐ์ (์ต๋ 2~4๋ฐฐ)
- deletion-insertion ๋ฐ๋ณต ์ํ์๋
unreachable points์ ์ฆ๊ฐ ์ต์ ๋ก ์ ๋ฐ์ ์ธ ์ฑ๋ฅ ๊ฐ์ - dual index ๊ตฌ์กฐ์ ๋์๊ฒ์์ ์ํํจ์ ์ด์ : ๋์ recall์ ์ ์งํ๊ณ unreachable points ์ต์ํ