The FFNN flattens residues and predicts each residue independently after the ESM embedding. It does not model neighboring residue interactions during classification.
Evidence:
src/pepseqpred/core/models/ffnn.py
PepSeqFFNN.forward flattens (B, L, D) into (B * L, D).
- Output is reshaped back to
(B, L).
Why this can hurt:
- Residue-level epitope signals are often regional.
- The ESM embedding contains context, but the classifier cannot enforce local smoothness or peptide-level consistency.
- Weak peptide-expanded labels may need a model/objective that understands windows rather than independent residues.
Planning direction:
- First fix diagnostics, objective, and weighting before changing architecture.
- Then consider light local context heads, such as 1D convolution, CRF-like smoothing, or pooling over peptide windows.
The FFNN flattens residues and predicts each residue independently after the ESM embedding. It does not model neighboring residue interactions during classification.
Evidence:
src/pepseqpred/core/models/ffnn.pyPepSeqFFNN.forwardflattens(B, L, D)into(B * L, D).(B, L).Why this can hurt:
Planning direction: