Personalized PageRank retrieval

개인화 페이지랭크 검색

Diffuse probability from query seeds through a graph to rank related nodes.

···
html
<div class="v"><header><b>RANDOM WALK RANK</b><span id="state"></span></header><main><div class="mass" id="mass"></div><div class="restart">restart at Q · spread to neighbors</div></main><footer>higher mass → higher relevance rank</footer></div>
css
.v{width:min(92vw,660px);height:min(86vh,310px);box-sizing:border-box;padding:clamp(9px,2.5vmin,18px);border:1px solid var(--line);border-radius:14px;background:var(--surface);display:flex;flex-direction:column;gap:7px;color:var(--fg);font:500 clamp(15px,4.5vmin,19px)/1.25 var(--font-sans, sans-serif)}.v header,.v footer{display:flex;justify-content:space-between;align-items:center;gap:8px;white-space:nowrap}.v header b{color:var(--accent);font-size:.9em}.v header span,.v footer{color:var(--muted);font-size:.82em}.v main{flex:1;min-height:0;position:relative;overflow:hidden}.v .mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.v .active{background:var(--accent)!important;color:var(--bg)!important;border-color:var(--accent)!important}.v .muted{opacity:.45} .mass{height:76%;display:flex;align-items:end;justify-content:center;gap:clamp(6px,2vw,22px)}.mass>div{width:18%;max-width:80px;text-align:center;font:600 .75em ui-monospace,monospace}.mass i{display:block;width:100%;min-height:5px;border-radius:5px 5px 0 0;background:var(--accent);transition:height .4s}.mass b{display:block;margin-top:3px}.restart{text-align:center;color:var(--muted);font-size:.75em}
js
const rounds=[[70,15,10,5],[53,24,17,6],[49,27,18,6],[48,28,18,6]];let step=0;function draw(){document.getElementById("mass").innerHTML=rounds[step].map((v,i)=>"<div><i style='height:"+Math.round(v*(innerHeight<300?.7:1.5))+"px'></i><b>"+["Q","A","B","C"][i]+" "+v+"</b></div>").join("");document.getElementById("state").textContent="iteration "+step;step=(step+1)%rounds.length}draw();setInterval(draw,1000)

Personalized PageRank places restart probability on query seed nodes. Each iteration sends some probability back to those seeds and spreads the rest across graph edges.

Nodes well connected to the seeds gain rank in the resulting distribution. Restart strength and edge quality matter, and rank does not establish factual correctness.

When to use

Use it to prioritize knowledge-graph nodes or source passages related to a query.

Open as page ↗