Skip to content

[detection/asvspoof5/v11_ssl_gmlp] add folder#66

Open
zlin0 wants to merge 1 commit into
mainfrom
detection/asvspoof5/v11_ssl_gmlp
Open

[detection/asvspoof5/v11_ssl_gmlp] add folder#66
zlin0 wants to merge 1 commit into
mainfrom
detection/asvspoof5/v11_ssl_gmlp

Conversation

@zlin0

@zlin0 zlin0 commented Jul 13, 2025

Copy link
Copy Markdown
Owner

This is a draft PR. The performance on ASVspoof 5 is not good and requires further exploration of suitable parameters.

@zlin0 zlin0 requested a review from Copilot July 13, 2025 19:53

This comment was marked as outdated.

@zlin0 zlin0 marked this pull request as ready for review July 18, 2025 23:02
@zlin0 zlin0 requested a review from Copilot July 18, 2025 23:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new experimental configuration folder for ASVspoof5 detection using SSL (Self-Supervised Learning) with gMLP (gated Multi-Layer Perceptron) models. The implementation explores different SSL model variants (WavLM, wav2vec2, XLS-R) with frozen and fine-tuned configurations for audio spoofing detection.

  • Adds complete training pipeline with data preparation, model training, evaluation, and performance measurement stages
  • Implements 6 different SSL model configurations combining various pre-trained models with frozen/fine-tuned settings
  • Provides SLURM-based distributed training setup for HPC environments

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
wedefense Symbolic link to wedefense framework
tools Symbolic link to shared tools directory
slurm_train.sh SLURM job script for distributed training with model configuration array
run.sh Main training pipeline script with 7 stages from data prep to evaluation
path.sh Environment setup script for Python paths
local Symbolic link to shared local utilities
conf/*.yaml 6 SSL model configurations for different wav2vec2/WavLM/XLS-R variants

cd ${data}
ln -s flac_T train
ln -s flac_D dev
ln -s flac_E_eval /eval

Copilot AI Jul 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The symbolic link target '/eval' is an absolute path which will create a link in the root directory instead of the intended relative path. This should be 'eval' without the leading slash.

Suggested change
ln -s flac_E_eval /eval
ln -s flac_E_eval eval

Copilot uses AI. Check for mistakes.
# filename cm-label
echo "filename cm-label" > ${data}/${dset}/cm_key_file.txt
cat ${data}/${dset}/utt2cls >> ${data}/${dset}/cm_key_file.txt
sed -i "s/ /\t/g" ${data}/${dset}/cm_key_file.txt

Copilot AI Jul 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using sed to replace spaces with tabs is fragile and could break if filenames contain spaces. Consider using awk or a more robust text processing approach to format the cm_key_file.txt properly.

Suggested change
sed -i "s/ /\t/g" ${data}/${dset}/cm_key_file.txt
awk '{$1=$1; gsub(" ", "\t"); print}' ${data}/${dset}/cm_key_file.txt > ${data}/${dset}/cm_key_file.tmp && mv ${data}/${dset}/cm_key_file.tmp ${data}/${dset}/cm_key_file.txt

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +13
#SBATCH --mail-user="lzhan268@jh.edu" #email for reporting
#SBATCH --mail-type=END,FAIL #report types
#SBATCH --output=./logs/slurm-%A_%a.out
#SBATCH --array=4-4

Copilot AI Jul 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The email address is hardcoded, which exposes personal information and makes the script non-portable. Consider parameterizing this or removing it from the committed code.

Suggested change
#SBATCH --mail-user="lzhan268@jh.edu" #email for reporting
#SBATCH --mail-type=END,FAIL #report types
#SBATCH --output=./logs/slurm-%A_%a.out
#SBATCH --array=4-4
#SBATCH --mail-user="${SLURM_MAIL_USER}" #email for reporting
#SBATCH --mail-type=END,FAIL #report types
#SBATCH --output=./logs/slurm-%A_%a.out
#SBATCH --array=4-4
if [ -z "${SLURM_MAIL_USER}" ]; then
echo "Error: SLURM_MAIL_USER environment variable is not set. Please set it to your email address."
exit 1
fi

Copilot uses AI. Check for mistakes.
stage=3
stop_stage=3

ASVspoof5_dir=/export/fs05/lzhan268/workspace/PUBLIC/PartialSpoof/database

Copilot AI Jul 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded absolute path contains a username 'lzhan268' making it non-portable across different users and systems. This should be parameterized or use a relative path.

Suggested change
ASVspoof5_dir=/export/fs05/lzhan268/workspace/PUBLIC/PartialSpoof/database
: "${ASVspoof5_dir:?Environment variable ASVspoof5_dir must be set to the ASVspoof5 database directory.}"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants