当前位置: 首页 > news >正文

WizMap

WizMap

https://github.com/fanqingsong/wizmap/tree/main

image

 

 

What is WizMap?

WizMap is a scalable interactive visualization tool to help you easily explore large machine learning embeddings. With a novel multi-resolution embedding summarization method and a familiar map-like interaction design, WizMap allows you to navigate and interpret embedding spaces with ease.

Scalable to millions of embedding point
Multi-resolution embedding summaries
Fast embedding search
Multimodal data (text and image)
Animated embedding evolution
Support computational notebooks (e.g., Jupyter, Colab, VS Code)
Sharable URLs

WizMap Gallery

DiffusionDB Prompts + Images ACL Paper Abstracts IMDB Review Comments
1.8M text + 1.8M images 63k text 25k text
CLIP Embedding all-MiniLM-L6-v2 Embedding all-MiniLM-L6-v2 Embedding

Submit a PR to add your WizMap here! You can share your WizMap using a unique URL.

 

Analysis of WizMap: Scalable Interactive Visualization

https://zhuanlan.zhihu.com/p/1890105679064301606

 

 

 

WizMap Algorithm Principles

https://github.com/fanqingsong/wizmap/blob/main/docs/ALGORITHM-PRINCIPLES.en.md

This document explains the algorithmic principles behind WizMap's pipeline from raw text to a zoomable, interactive map. It does not cover code-level implementation.

In One Sentence

WizMap's goal: turn massive high-dimensional text embeddings into a zoomable, terrain-like map with landmarks.

It achieves this by combining three core algorithms:

  1. UMAP dimensionality reduction — high-dimensional vectors → 2D coordinates
  2. Gaussian Kernel Density Estimation (KDE) — scattered points → continuous density contours (terrain)
  3. Quadtree + term-frequency topic extraction — spatial regions → multi-resolution semantic labels (place names)

All three share the same 2D coordinate system, so "where each point is", "how dense a region is", and "what a region is about" stay consistent on a single map, and granularity switches with zoom level — just like a real map.


1. Text Embedding

Principle

A pre-trained language model maps each piece of text to a high-dimensional vector (typically hundreds to thousands of dimensions), such that semantically similar texts are close together in vector space. This vector is the semantic foundation of the entire map — every subsequent geometric and clustering step relies on the assumption that "vector distance ≈ semantic difference."

Key Points

  • The vector itself is not rendered on the frontend; it only feeds the dimensionality reduction step.
  • The distance metric is usually cosine similarity (direction-focused rather than magnitude), matching the intuition behind semantic comparison.

2. UMAP Dimensionality Reduction (High-D → 2D)

Principle

UMAP (Uniform Manifold Approximation and Projection) is a manifold-learning dimensionality reduction algorithm. Its core assumption is that data is sampled from an underlying low-dimensional manifold, and it tries to reproduce the high-dimensional local topology in a low-dimensional space.

The algorithm has two phases:

Phase 1: Build the high-dimensional topological graph

  • For each point, find its k nearest neighbors (k = n_neighbors).
  • Connect them with weighted edges, where the weight reflects "closeness" (closer = higher weight).
  • This graph encodes the data's local manifold structure.

Phase 2: Low-dimensional layout optimization

  • Initialize positions for all points in 2D space.
  • Optimize an objective function (based on cross-entropy) so that the 2D layout satisfies:
    • Points connected in the high-dimensional graph (neighbors) → attract each other in 2D
    • Points not connected → repel each other in 2D (to avoid collapse)
  • This is essentially a force-directed optimization, like a spring system.

Key Parameters

ParameterMeaningEffect
n_neighbors Number of neighbors k used to build the graph Large → global structure; Small → local detail
min_dist Minimum allowed distance between points in 2D Small → points clump tighter; Large → points spread out

Result

Each point gets an (x, y). Semantically related texts form "archipelagos / continents"; semantically distant ones separate.

But at this stage the 2D output is just a scattered cloud of points — it lacks a sense of terrain and semantic annotation. That is exactly what the next two steps provide.


3. Terrain via Contours (Gaussian KDE)

Motivation

Scatter plots are hard to read — you can't tell at a glance "where are most points?" So we convert the point cloud into a continuous density field, then render it as contours, making dense regions visually appear as "peaks."

Principle: Kernel Density Estimation (KDE)

  • Lay a grid over the 2D plane (e.g., 200×200).
  • Treat each data point as the "source" of a Gaussian bump (a bell-shaped surface).
  • For each grid cell center, sum the contributions of all Gaussian bumps at that location → that cell's density estimate.
  • All grid density values together form a smooth density surface.
Point cloud      Sum of Gaussian bumps      Density grid → contours·   ·                  ╱╲    ╱╲              ────╲────· ·      ──►         ╱  ╲╱╲╱  ╲      ──►     ╲   ╲·   ·                 ╱      ╲╲                ╲___╲
 

Role of Bandwidth

Bandwidth controls how "fat" each Gaussian bump is — the most important parameter of KDE:

  • Too large → over-smoothed, all peaks merge into a blob, detail lost.
  • Too small → noisy, spurious small peaks appear.

Typically set adaptively based on point count (more samples → narrower bandwidth).

Acceleration Strategy

KDE over a large grid × many points is expensive. A random subsample is used to fit the KDE: only a capped number of points (e.g. up to 100k) are randomly drawn to estimate the overall density distribution, approximating the full set.

Output

A grid matrix of log-density values. The frontend uses a marching-squares isoline algorithm to render it as contours, visually producing a "terrain map" that directly answers "where is it dense?"


4. Multi-Resolution Semantic Labels (Quadtree + Term-Frequency Topics)

This is WizMap's most central design — map-style zoom: zoom out far and you see coarse topics of large regions; zoom in close and you see fine topics of small regions. It mimics how a real map reveals finer place names as you zoom in.

(a) Quadtree Spatial Indexing

Recursively quarter the 2D plane:

Level 1:  2×2  = 4    cells     (large region, coarse)
Level 2:  4×4  = 16   cells
Level 3:  8×8  = 64   cells
...
Level l:  2^l × 2^l cells       (small region, fine)
 
  • Each leaf cell owns a rectangular spatial region.
  • All texts within a cell are aggregated into a "bag of documents."
  • Level = resolution: shallow levels → large regions; deep levels → small regions.

The quadtree provides the ability to "aggregate texts by spatial range" quickly — given any region, you can retrieve all its contained points in O(log n).

(b) Per-Cell Topic Extraction

For the texts inside each spatial cell, run a term-frequency topic analysis:

  1. Use a CountVectorizer to tally term frequencies across all texts in the cell (while removing stop words).
  2. Apply a TF-style weighting to select the most representative high-frequency terms for that region.
  3. Concatenate the top terms into a topic name (e.g. research-model-learning).

Each spatial cell thus gets a "semantic label," answering "what is this region about?"

To handle large vocabularies efficiently, term-frequency counting uses a sparse matrix and only keeps each cell's top-n terms, avoiding full-vocabulary overhead.

(c) Automatic Level Selection

The quadtree could theoretically subdivide indefinitely, but we don't need to compute all levels. The algorithm back-computes which levels to extract based on view geometry:

Inputs: canvas size, max zoom scale, ideal tile pixel width (~35px). Principle: at a given zoom scale, compute how many screen pixels each level's tile actually occupies, then pick the level closest to 35px.

At zoom scale s:on-screen length   = s × canvas length# tiles this level = 2^ltile pixel width   = on-screen length / 2^l→ choose l that makes "tile pixel width ≈ 35px"
 

Iterating over all zoom steps yields a [min_level, max_level] range, and topics are extracted only for these levels, skipping pointless full computation. This guarantees:

  • Each label occupies roughly an ideal-sized region on screen — neither crowded nor sparse.
  • Compute is strictly bounded to the levels the view will actually use.

(d) Zoom Switching on the Frontend

Every topic label carries an (x, y, level) triple. On zoom/pan, the frontend only renders labels for the level matching the current zoom scale, switching seamlessly between levels — enabled by pre-computed multi-level topics, not real-time computation.


5. Three Layers Synthesized into One Map

Visual LayerData SourceAlgorithmQuestion Answered
Scatter points each point's (x, y, text) UMAP "where is each datum?"
Contours density grid Gaussian KDE "where is it dense?"
Topic labels per-level quadtree topics term frequency + quadtree "what is this region about?"

All three share the same (x, y) coordinate system, so:

  • Scatter points sit on the contour "peaks" (dense areas).
  • Topic labels are placed at the geometric center of their region.
  • At any zoom level, the three layers stay semantically consistent.

6. Why This Design Scales

The key is separating preprocessing from rendering:

  • All expensive computation — UMAP, KDE, quadtree topics — is done once, offline, during the preprocessing stage.
  • The output is just a few static files: a density grid, hierarchical topic labels, and a list of point coordinates.
  • What the frontend receives is already graded, already smoothed, already topic-aggregated.
  • During zoom/pan, the frontend only performs coordinate transforms + level filtering — no ML computation in the browser.

So even with hundreds of thousands to millions of points, frontend interaction stays smooth — all the heavy lifting was done in the backend pipeline after upload. This is the fundamental source of WizMap's "scalability."


Appendix: Algorithm Pipeline Overview

Raw text││  ① Embedding (pre-trained model)▼
High-dim semantic vectors  ───────► "semantic similarity ⇒ proximity"││  ② UMAP (k-NN graph + force-directed optimization)▼
2D coordinates (x, y)  ───────────► "where each datum sits on the map"│├──────────────────────────────────────┐│                                      ││  ③ Gaussian KDE (sum of bumps)       │  ④ Quadtree (recursive quartering)▼                                      ▼
Density surface / contours             Multi-level spatial cells│                                      │  + term-frequency topic extraction│                                      ▼│                                 Hierarchical topic labels (x,y,level,name)│                                      │└──────────────► share (x,y) ◄─────────┘│▼Zoomable interactive map(scatter + terrain + zoom-switched place names)
 
 

 

 

http://www.jsqmd.com/news/1049708/

相关文章:

  • 鸿蒙全球局势推演:论汉语长期具备取代英语成为全球主流通用文字的底层逻辑,兼析马斯克布局中文的核心动因(三)
  • 2026线下门店收包保障白皮书,鉴定完成即刻全款转账 - 讯息早知道
  • 2026 昆明多克拉裸钻回收安全排行榜,大额交易多重核验门店汇总 - 讯息早知道
  • 2026 年南阳市厨卫阳台屋顶地下室防水维修三家专业测评|吉修匠 99.8 分五星榜首 - 吉修匠
  • ExtCore项目结构最佳实践:构建可维护的模块化应用架构 [特殊字符]
  • 嵌入式GUI开发:emWin颜色转换与内存设备优化实战
  • 2026年6月最新万国中国官方售后服务电话客服网点地址热线 - 亨得利官方服务中心
  • 5分钟部署CentOS漏洞靶场:CISP-PTE渗透测试实战环境搭建指南
  • 搬家寄大件哪个物流便宜划算?2026年省心寄件实测 - 快递物流资讯
  • 2026 年漯河市厨卫屋顶防水修缮三家横向测评:吉修匠 99.8 分稳居榜首 - 吉修匠
  • 昇腾GE SubgraphInput构造函数与析构函数
  • 西安回收黄金门店推荐|2026本地靠谱奢品黄金回收商户测评优选 - 名奢变现站
  • CANN/GE获取模型输入数量接口
  • emWin GUIDRV_FlexColor驱动框架:嵌入式GUI显示适配与配置实战
  • 2026南京大牌包包回收防坑白皮书,当面验包报价,不随意扣损耗 - 讯息早知道
  • 朋友圈九宫格怎么发 一张大图切九宫格详细教程 - 图片处理研究员
  • 2026武汉黄金回收避雷红宝书:只推荐支持先检验后报价的透明门店 - 商业信息快查
  • 2026 AI职业培训新风向:莫瑶教育全域课程升级,覆盖大模型研发与零基础副业双赛道 - 教育信息网
  • 2026年6月最新万国中国官方售后服务热线客服网点地址电话 - 亨得利官方服务中心
  • 2026 年鹤壁市厨卫屋顶防水修缮三家横向测评:吉修匠 99.8 分五星榜首 - 吉修匠
  • 终极指南:如何快速免费解密QQ音乐加密文件,实现音乐跨平台播放自由
  • 2026青岛黄金回收无损检测门店推荐 6 家实测无套路 - 讯息早知道
  • emWin多页与进度条控件API详解与嵌入式GUI开发实战
  • 最新发布:2026年合肥单招落榜别慌!共达职业技术学院复读班,第二年冲大学还来得及! - 小张zc
  • 2026 年洛阳市厨卫屋顶防水修缮三家横向测评:吉修匠 99.8 分稳居榜首 - 吉修匠
  • 如何在微信小程序中快速集成ECharts图表库:完整指南
  • 2026 重庆装修哪家靠谱?本土综合实力前五企业深度解析 - GrowthUME
  • 2026 安庆|中考两三百分意向 3+2 五年制专业,2026 官方简章发布,咨询号码多少 - 我叫小周
  • Visual C++运行库终极解决方案:AIO重新打包工具深度解析与实战指南
  • Unlock Music完整指南:3步解锁加密音乐,让音乐自由流动![特殊字符]