# Эксперимент: Connectivity-Preserving Wedge Token Pooling (#1403) { "worked": true, "confidence": 8, "verdict": "Built deterministic greedy Connectivity-Preserving Wedge Token Pooling with exact restricted BFS distances, mean tokens, SSE-gain selection, connectivity validation, region sizes, split history, assignments, and pooled adjacency. The math checks passed: mean optimality had an absolute identity error of 1.4e-14, and 19,470 valid wedge splits across random connected graphs produced no disconnected children. On the toy graph, wedge pooling strongly beat random pooling in reconstruction SSE and preserved connectivity, but k-means was better at 4 and 8 tokens and wedge construction was substantially slower; therefore this is a promising graph-aware pooling MVP, not an established overall speed or accuracy win.", "metrics": { "baseline": "Random pooling SSE: 23.985 (M=2), 23.078 (M=4), 21.679 (M=8); k-means SSE: 0.611, 0.356, 0.185. Random pooling time: 0.00021, 0.00029, 0.00044 s/call.", "idea": "Wedge pooling SSE: 0.611 (M=2), 0.479 (M=4), 0.320 (M=8); construction time: 0.0665, 0.1254, 0.2241 s/call. Attention quadratic proxy was reduced to (M/24)^2: 0.00694, 0.0278, 0.1111. Connectivity checks passed for all tested target sizes." }, "how_to_run": "/home/maxwelhelp/main/bin/python3 verify_math.py && /home/maxwelhelp/main/bin/python3 run_experiment.py", "files": [ "wedge_pool.py", "verify_math.py", "run_experiment.py" ], "limitations": "No graph-transformer training, real benchmark dataset, GPU implementation, weighted-graph Dijkstra, backward-gradient test, or direct attention memory/runtime measurement was performed. The toy graph is deliberately favorable to graph-aware partitioning, and the implementation recomputes candidate BFS distances rather than using incremental or sampled approximations." }