计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
graph_structure_attention【效率与协作】Build graph-derived sparse attention masks for Graphically Structured Diffusion Model style recovery experiments and checks.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a task gives a graphical model or factor graph and you need the GSDM-style attention contract: one token per variable, self-attention on every token, symmetrized variable dependencies, and optional factor-clique attention.
Do not use this skill to learn graph structure from data. The paper assumes a supplied graphical-model sketch and uses it to constrain a diffusion denoiser.
nodes: ordered variable ids.edges: directed or undirected pairs of variable ids.factors: optional lists of node ids that share an undirected factor.m, n, and k for the paper's matrix-factorization graph.mask.attendable_indices and valid_indices_mask.scripts/graph_attention.py for deterministic construction and validation.python scripts/graph_attention.py --bcmf 2 2 2 --output /tmp/gsdm_graph.json
python -m pytest tests
The tests verify BCMF node counts, expected local dependencies, absence of unrelated edges, and round-trip reconstruction from packed sparse indices.
The skill validates the structural mask only. It does not implement transformer layers or train a diffusion model.