Skip to content

Reproducing codebook training: complete codebook collapse and missing preprocessing details #1

Description

@jarch100

Reproduction question

Thank you for releasing GS-Quant. I am trying to reproduce the end-to-end pipeline for FB15K-237 and WN18RR, but the RQ-VAE/codebook stage collapses to one (or two) active codes per layer.

I would appreciate guidance on the exact preprocessing/checkpoint setup or release artifacts needed to reproduce the reported entropy curves.

What I used

  • Raw datasets and the required DIFT / KG-Fit-related resources prepared locally.
  • Complete entity_info_llm_hier.json for both datasets.
  • Local text embeddings generated from mixedbread-ai/mxbai-embed-large-v1 (cached revision b33106f585b9ce46904ad7443a3b52b7a63e231c), with entity labels and LLM descriptions encoded separately and concatenated.
  • Graph embedding stage: RotatE, hierarchy type llm, hidden dim 1024, batch size 512, learning rate 1e-4, rho=0.6.
  • Codebook architecture/settings from the paper: embedding dim 512, 4 codebook layers, codebook size 1024, encoder [512, 512, 512], reconstruction layers/heads 2/4, parent recon count 5, dropout 0, LR 1e-4, commitment weight 0.25.
  • Dataset-specific settings: FB15K-237 batch size 14541 / 500 updates; WN18RR batch size 16348 / 1000 updates.

The data checks passed: entity counts, ID ordering, dimensions, and finite values all match the expected shapes.

Observed behavior

Using the released codebook implementation:

  • FB15K-237: full-dataset entropy becomes 0.0000 at the first evaluation, with 1 active code out of 1024 in each layer.
  • WN18RR: same result (0.0000, 1 active code/layer).

I also tested a controlled local variant that:

  1. uses the full entity set for entropy measurement;
  2. keeps LR constant at 1e-4;
  3. makes max_steps mean actual optimizer updates; and
  4. changes the neighbor-loss average from sum(layer_losses) / (len(layer_losses) + 1e6) to an ordinary average, while safely handling entities with no neighbors.

The neighbor term then became non-negligible (~0.72 instead of ~1e-6), but WN18RR still collapsed completely. FB15K-237 reached only 2 active codes/layer (mean entropy ~0.67) and became unstable.

Clarifications / artifacts requested

Could you please share or confirm:

  1. The exact Git commit used for the paper experiments.
  2. The exact PLM/model revision used for textual entity embeddings, including text templates, pooling, normalization, and the fusion coefficient rho.
  3. Whether pretrained entity_init_embeddings.npy, graph-embedding checkpoints, generated descriptions, or codebook checkpoints are available.
  4. The intended codebook initialization, optimizer/scheduler, validation/entropy protocol, and handling of empty neighbor sets/dead codes.
  5. Whether the neighbor-loss denominator in the released code is intentional.
  6. A complete command/config for reproducing Table 3 / Figure 6 entropy trajectories.

I can provide logs and the minimal patch used for the controlled experiment if helpful. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions