Diffusion on Language Model Encodings for Protein Sequence Generation
ELVIA analysis
Independent review pending
This review checks the published latent-diffusion method, its computational evaluation, and a pinned released implementation. The supported assessment is Major, scoped to the release’s default ESM2/transformer decoder-training route under nonidentity normalization: training and noiseless validation apply the inverse normalization twice, while generation applies it once. This invalidates the shared latent-to-token interface on which the trained decoder’s use in generation depends. Three further Minor findings concern inconsistent reported metric values, repeated-sequence weighting in pLDDT, and an optional compressed-length mask. Independent algebra, finite examples, source inspection, and source-page images establish the discrepancies. Historical experiment-to-source bindings and quantitative benchmark effects remain unresolved; no replacement scores are asserted. Exact-sampling, biological-function, and matched-resource interpretations are bounded explicitly below. Scientific adjudication remains pending.
Problem 1. Decoder training denormalizes twice
MajorEvidence and reasoning
Problem statement
The decoder is a core DiMA component; advertised token reconstruction fine-tunes it for decoding generated normalized embeddings through the same inverse-normalization interface.
Default ESM2/transformer decoder configuration and documented Stage training route with normalizer enabled. Stored mean mu and positive std for nonidentity statistics D() differs generically from Finite interface counterexample is admissible algebra, not actual ESM embeddings, a measured learned decoder, or a recovered historical experiment.
Proof
The method’s coordinate normalization and token reconstruction are described on pp. 3–4. The release’s documented decoder-training route calls `src/preprocessing/train_decoder.py`. In its `loss_step`, line denormalizes the latent, then line calls `batch_get_logits`. The ESM2 implementation, `src/encoders/esm2.py`, lines – denormalizes again. In contrast, `batch_decode`, lines – used by generation, denormalizes once. The training entry point enables the normalizer.
Core dependency. Figure 1, p. 2, identifies the decoder as one of the method’s three core components; the token-reconstruction paragraph, p. 3, describes its finetuning, and Table 5, p. 26, includes the finetuning ablation. The release’s `src/configs/config.yaml`, lines – selects ESM2 with the transformer decoder. `src/configs/decoder/transformer.yaml`, line configures three new layers. `src/encoders/esm2.py`, lines – constructs this decoder and loads its checkpoint when present; `src/encoders/transformer_decoder.py`, lines – constructs the transformer and output projection from configuration. The documented Stage command in `README.md`, lines – trains that decoder through the affected route. Finally, `src/diffusion/base_trainer.py`, lines – sends generated normalized latents through `pred_logits` and `batch_decode`, using the single inverse map. The discrepancy therefore crosses the default learned decoder’s training, validation, and deployment boundary.
Complete check. For one nondegenerate coordinate let the stored mean and standard deviation be and with so the small-variance guard is inactive. Put Training therefore presents to the decoder; generation presents Their difference at the same normalized input is Equality for every requires The discrepancy also occurs in the noiseless decoder-validation branch, which bypasses corruption but not either denormalization.
For a valid finite interface example, take equally frequent raw encodings and Their population mean is variance and normalized encodings are The decoder’s training inputs are whereas the generation inputs are A two-class decoder with logits correctly classifies targets at the training inputs but assigns both generation inputs to class Scaling both logits’ difference makes the training classification arbitrarily confident without repairing the inference mismatch. This establishes that fitting the double-transformed training inputs need not make the single-transformed inference path correct. It is an illustrative interface counterexample, not a claim that ESM2 produces these embeddings or that the released optimizer learns this classifier.
Counterevidence, repair, and impact. The discrepancy vanishes for identity statistics, at particular fixed points, or for a decoder insensitive to the transformed directions. The README also permits skipping decoder training with the pretrained `lm_head` (line ); that alternative does not establish correctness of the default newly trained transformer path. Other encoders or historically different code are outside this finding’s demonstrated dependency. Actual normalization tensors and trained decoder weights are absent, so the example cannot estimate historical accuracy loss. A model might tolerate some mismatch. These possibilities bound the affected configurations and numerical impact; they do not make the default training and deployment interfaces equal.
Removing the outer denormalization from `loss_step`, while retaining the existing denormalization inside `batch_get_logits`, restores the single map algebraically for every admitted This is an interface repair only: it does not validate old checkpoints or prove the paper’s reported finetuning improvement without retraining/evaluation. The supported assessment is Major for the pinned release’s default ESM2/transformer decoder-training route under nonidentity statistics. A core learned component is optimized and validated on a different latent-to-token interface from the one used in generation; the finite example proves that successful fitting and noiseless validation need not transfer through that interface. Quantitative historical effects and the paper’s reported finetuning gain remain Needs Evidence. The scope is this demonstrated core training/deployment inconsistency, without a claim that every encoder, checkpoint, or published protein-generation result fails.
Possible revision
Remove outer denormalization in loss_step, retain batch_get_logits inverse once. This restores a common single-map input contract but does not validate checkpoints or benchmark performance.
Problem 2. Cluster-density definitions and reported values disagree
MinorEvidence and reasoning
Problem statement
PCD/NCD count disjoint positive/negative co-clusters divided by a common total sequence count; repeated tables represent the same encoder comparison.
Every counted cluster contains a generated sequence and clusters are disjoint. The written denominator is common total generated or generated-plus-reference sequences. Three-decimal table rounding bounded by per entry.
Proof
Appendix B.2, p. 17, defines positive clusters as co-clusters containing both generated and dataset sequences and negative clusters as co-clusters containing only generated sequences. It defines PCD and NCD as their respective counts divided by the total number of sequences. Tables 5 and 6, pp. 26–27, report a reference row with and Table 5 reports and for flow matching.
Complete check. Let be the number of generated sequence instances and let count the two kinds of clusters in the same clustering. Each counted cluster contains at least one generated instance, and clusters are disjoint. Thus If the common denominator is the number of generated instances, or the number of all generated-plus-reference instances, then and This argument does not require any monotonicity property of the clustering algorithm or an assumption that two thresholded clusterings are nested. The printed sums are and Even allowing independent rounding errors of in both entries, the sums are at least and They cannot represent the stated common-denominator quantities. ◻
Counterevidence and bounded impact. Separately normalized conditional densities, a transposed row, or an unstated denominator could explain the numbers, but each would require a corrected definition or table. The available repository lacks the co-clustering evaluation driver and underlying cluster counts, so the review does not choose replacement numbers. The contradiction prevents literal quantitative interpretation of these particular reference/ablation entries; it does not establish that the headline pLDDT or FD comparisons are wrong.
There is a separate, direct cross-table conflict in the ESMc-300M result: Table 3 and its discussion on p. 6 report while Table 7 on p. 29 reports for the corresponding AFDBv4-90 comparison. The difference is not rounding. Both values remain below ESM2-650M’s so the direction of that local comparison survives. The record must identify which value and run are authoritative. Likewise, the RFDiffusion unique success rate is described as on pp. 8 and 36 but appears as with an external-analysis footnote, in Table 13; either is below DiMA’s reported These are Minor reporting defects, with exact corrections unverified. Source-image anchors are listed in Appendix (#app:evidence).
Possible revision
Recover authoritative cluster denominators/counts and run-specific values; no invented replacement.
Problem 3. pLDDT averaging drops within-rank sequence multiplicity
MinorEvidence and reasoning
Problem statement
pLDDT evaluated over generated samples; released helper calculates each prediction then returns sequence-keyed dictionary.
Duplicate strings occur within a rank and not all unique sequence scores are equal. Counterexample uses deterministic admissible scores90 and no actual folding-model values are asserted.
Proof
The inspected release’s `src/metrics/plddt.py`, lines – stores a predicted score under the protein-sequence string: The active caller in `src/metrics/metric.py`, lines – averages that dictionary’s values. Repeated occurrences on one rank overwrite their earlier entries.
Complete check. Assume a deterministic quality score for each distinct sequence and let be its multiplicity among generated draws. The ordinary mean over draws is The code computes the second quantity within each rank. Take four valid score-bearing draws with hypothetical scores Then the generated-draw mean is while the one-rank dictionary mean is This example uses admissible score values, assumes no score stochasticity, and executes no folding model. If split into equally sized rank lists and the equal average of rank-local unique means is Thus even with equal shard lengths, the implemented result can depend on the partition. The independently authored finite calculation reproduces these values.
Counterevidence and impact. Quality of distinct outputs is a legitimate estimand when explicitly defined, especially alongside a diversity measure. It is not the same as average quality per generated attempt. A dictionary may also serve as a computation cache, but the final average must then restore each key’s multiplicity if the target is the draw mean. When all predictions are distinct, the present implementation agrees with the draw mean on equal-sized shards. The paper explicitly discusses duplicate generation in some baselines, so this distinction is relevant to comparative evaluation; it does not prove that this release evaluated those historical baselines, or establish the direction of any historical ranking change.
This is a Minor released-evaluator defect in its correspondence to the stated sample evaluation. Its effect on published core comparisons is Needs Evidence. A precise local repair is to retain a score per sample index, or cache by sequence while averaging with occurrence counts, and reduce sums/counts across ranks. Algebra verifies that this restores the intended finite-sample mean. No corrected protein score is claimed.
The same file averages PDB atom B-factors, whereas p. 16 describes residue averaging. These agree if residue weights are equal or appropriate aggregation is used; otherwise atom counts weight residues differently. The exact dependency/PDB convention was not independently run here, so that additional correspondence remains unresolved. A separate unequal-shard indexing issue exists when sample count is not divisible by world size, but the default counts are divisible by the usual configured multi-GPU counts; it is not used to infer damage to reported runs.
Possible revision
Retain sample-index scores or cache by sequence then use occurrence-weighted sums/counts across ranks.
Problem 4. CHEAP shorten-two mask reduces requested length twice
MinorEvidence and reasoning
Problem statement
Shorten-two latent representation compresses sequence length by two and generation samples requested raw lengths.
Optional shorten_factor2 branch; valid lens[],max_sequence_len254. Length sampler returns raw sequence length; output slice is governed by *mask.sum.
Proof
The CHEAP shorten-two component is evaluated in Sections 3.4.2 and E.6. In the pinned release, `src/encoders/cheap.py`, lines – first compresses the batch maximum length by two, then clips each uncompressed sequence length to that already compressed maximum before halving it again.
Complete check. Take the valid interface inputs and The allocated latent width is but the per-sequence mask receives only active positions, rather than The decoding path at lines – explicitly truncates the sequence to twice the mask sum, so the output has at most residues, not the requested The length sampler returns raw sequence lengths and supplies no prior factor-two conversion. This calculation depends only on the explicit mask and output-slice arithmetic, not on the external CHEAP decoder’s behavior.
Counterevidence and impact. The supplied default and supported pretrained configuration use shorten-one, where this particular branch is inactive. No historical shorten-two configuration or generated-length records bind this code to the corresponding paper results. The supported judgment is therefore Minor for the optional released path, with historical impact unresolved. A precise repair is to clamp each raw length to the raw maximum before applying the single compression: bounded by the allocated compressed width. For odd lengths the decoder must also retain the requested raw length if exact truncation is intended. This restores the mask count; it does not validate external decoder integration or old experiments.
Possible revision
Clamp each raw length to raw maximum then compress once, = bounded by latentwidth; retain original rawlength for exact odd-length output trimming.
Supporting record & provenance
Work status
Current version
Version 1
Minhao Liu · Initial report · Version 1
Independent review pending
Original claim and review scope
Source location
PDF p17 B.2 PDF pp26-27 Tables5-6 PDF p6 Table3 vs p29 Table7 PDF pp8,36 vs p37 Table13 src/metrics/plddt.py:31-40 src/metrics/metric.py:24-27,40-43 PDF p4 and p16 PDF p2 Figure1, p3 Token Reconstruction, p26 Table5 src/preprocessing/train_decoder.py:15-30,112-124 src/encoders/esm2.py:37-47,74-96 src/encoders/enc_normalizer.py:30-35 src/configs/config.yaml:3-4 src/configs/decoder/transformer.yaml:13-15 src/encoders/transformer_decoder.py:16-17 README.md:128-142 src/diffusion/base_trainer.py:492-532 PDF pp6-7 and33-34 src/encoders/cheap.py:70-86 src/diffusion/length_sampler.py:5-19 src/configs/encoder/cheap.yaml
Actual review scope
The recorded inspection concerns these source locations: PDF p. 17 B.2 PDF pp. 26-27 Tables5-6 PDF p. 6 Table 3 vs p. 29 Table 7 PDF pp. 8,36 vs p. 37 Table 13; src/metrics/plddt.py:31-40 src/metrics/metric.py:24-27,40-43 PDF p. 4 and p. 16; PDF p. 2 Figure 1, p. 3 Token Reconstruction, p. 26 Table 5 src/preprocessing/train_decoder.py:15-30,112-124 src/encoders/esm2.py:37-47,74-96 src/encoders/enc_normalizer.py:30-35 src/configs/config.yaml:3-4 src/configs/decoder/transformer.yaml:13-15 src/encoders/transformer_decoder.py:16-17 README.md:128-142 src/diffusion/base_trainer.py:492-532; PDF pp. 6-7 and33-34 src/encoders/cheap.py:70-86 src/diffusion/length_sampler.py:5-19 src/configs/encoder/cheap.yaml.