Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Loss Function to Improve Model Convergence for AutoEncoder #1460

Merged
merged 11 commits into from
Jan 22, 2024

Conversation

hsin-c
Copy link
Contributor

@hsin-c hsin-c commented Jan 9, 2024

Description

This PR addresses an issue in the dfencoder model related to its convergence behavior. Previously, the model exhibited difficulty in converging when trained exclusively with numerical features.
This PR fixes the way different loss types are combined in the model's loss function to ensure that backpropagation works correctly.

Note: This may alter the exact values resulting from calling fit() on the model. Before, categorical features were weighted much higher than binary or numerical categories (all numerical features shared a combined weight of 1, all binaries features shared a combined weight of 1, and each categorical feature had a weight of 1). Now all features are weighted equally which may impact the trained weights.

Closes #1455

@hsin-c hsin-c requested a review from a team as a code owner January 9, 2024 20:39
Copy link

copy-pr-bot bot commented Jan 9, 2024

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@hsin-c hsin-c added bug Something isn't working non-breaking Non-breaking change labels Jan 9, 2024
@mdemoret-nv
Copy link
Contributor

/ok to test

Copy link
Contributor

@mdemoret-nv mdemoret-nv left a comment

Choose a reason for hiding this comment

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

Reviewed the changes and have made a few commits to improve the readability and remove redundant calculations. The loss now equally weights all types of features. Once CI is passing and @hsin-c is good with the changes, we can merge.

Copy link
Contributor

@mdemoret-nv mdemoret-nv left a comment

Choose a reason for hiding this comment

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

Thanks for including the use of .sum(). Looks good now.

@mdemoret-nv mdemoret-nv changed the title Fix Loss Function to Improve Model Convergence Fix Loss Function to Improve Model Convergence for AutoEncoder Jan 22, 2024
@mdemoret-nv
Copy link
Contributor

/merge

@rapids-bot rapids-bot bot merged commit 04389b8 into nv-morpheus:branch-24.03 Jan 22, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG]: DFencoder Model struggles to converge when it is trained solely with numerical features
2 participants