Skip to content

Commit

Permalink
Merge to M100 beta: [Snooping protection] Decreased detection threshold.
Browse files Browse the repository at this point in the history
Merge bug: b/224847948. This is a direct cherry-pick.

Our snooping model has been observed to make many more false negative
inferences than false positives. This CL reduces the threshold for
positive results to offset the effect.

(cherry picked from commit 017d428)

Bug: b:221167585
Change-Id: I32bad0eebdee6ecd3eecef1bfe02e33e329ea917
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3499530
Reviewed-by: Guoxing Zhao <charleszhao@chromium.org>
Commit-Queue: Michael Martis <martis@chromium.org>
Auto-Submit: Michael Martis <martis@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#977403}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3532444
Reviewed-by: Thanh Nguyen <thanhdng@chromium.org>
Commit-Queue: Thanh Nguyen <thanhdng@chromium.org>
Cr-Commit-Position: refs/branch-heads/4896@{#660}
Cr-Branched-From: 1f63ff4-refs/heads/main@{#972766}
  • Loading branch information
martis-chromium authored and Chromium LUCI CQ committed Mar 18, 2022
1 parent f0667fb commit c431c43
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 20 deletions.
12 changes: 7 additions & 5 deletions ash/system/hps/hps_configuration.cc
Expand Up @@ -54,11 +54,13 @@ absl::optional<int> GetIntParam(const base::FieldTrialParams& params,
hps::FeatureConfig GetDefaultHpsNotifyFeatureConfig() {
hps::FeatureConfig config;

auto& filter_config = *config.mutable_average_filter_config();
filter_config.set_average_window_size(3);
filter_config.set_positive_score_threshold(-30);
filter_config.set_negative_score_threshold(-30);
filter_config.set_default_uncertain_score(-128);
// Just apply a threshold to the last-seen inference.
auto& filter_config = *config.mutable_consecutive_results_filter_config();
filter_config.set_positive_count_threshold(1);
filter_config.set_negative_count_threshold(1);
filter_config.set_uncertain_count_threshold(1);
filter_config.set_positive_score_threshold(-50);
filter_config.set_negative_score_threshold(-50);

return config;
}
Expand Down
2 changes: 1 addition & 1 deletion ash/system/hps/hps_configuration_unittest.cc
Expand Up @@ -30,7 +30,7 @@ TEST(HpsFeatureConfigTest, EmptyParamsValid) {
EXPECT_EQ(GetEnableHpsSenseConfig()->filter_config_case(),
hps::FeatureConfig::kConsecutiveResultsFilterConfig);
EXPECT_EQ(GetEnableHpsNotifyConfig()->filter_config_case(),
hps::FeatureConfig::kAverageFilterConfig);
hps::FeatureConfig::kConsecutiveResultsFilterConfig);
}

TEST(HpsFeatureConfigTest, ReturnNullIfTypeIsNotRecognizableHpsSense) {
Expand Down
31 changes: 17 additions & 14 deletions chrome/browser/about_flags.cc
Expand Up @@ -2692,25 +2692,28 @@ const FeatureEntry::Choice kDocumentTransitionSlowdownFactorChoices[] = {
// sample.

const FeatureEntry::FeatureParam kSnoopingProtectionPrecision[] = {
{"SnoopingProtection_filter_config_case", "3"},
{"SnoopingProtection_average_window_size", "3"},
{"SnoopingProtection_positive_score_threshold", "-30"},
{"SnoopingProtection_negative_score_threshold", "-30"},
{"SnoopingProtection_default_uncertain_score", "-128"}};
{"SnoopingProtection_filter_config_case", "2"},
{"SnoopingProtection_positive_count_threshold", "1"},
{"SnoopingProtection_negative_count_threshold", "1"},
{"SnoopingProtection_uncertain_count_threshold", "1"},
{"SnoopingProtection_positive_score_threshold", "-50"},
{"SnoopingProtection_negative_score_threshold", "-50"}};

const FeatureEntry::FeatureParam kSnoopingProtectionConfidence[] = {
{"SnoopingProtection_filter_config_case", "3"},
{"SnoopingProtection_average_window_size", "5"},
{"SnoopingProtection_positive_score_threshold", "-30"},
{"SnoopingProtection_negative_score_threshold", "-30"},
{"SnoopingProtection_default_uncertain_score", "-128"}};
{"SnoopingProtection_filter_config_case", "2"},
{"SnoopingProtection_positive_count_threshold", "2"},
{"SnoopingProtection_negative_count_threshold", "2"},
{"SnoopingProtection_uncertain_count_threshold", "2"},
{"SnoopingProtection_positive_score_threshold", "-50"},
{"SnoopingProtection_negative_score_threshold", "-50"}};

const FeatureEntry::FeatureParam kSnoopingProtectionRecall[] = {
{"SnoopingProtection_filter_config_case", "3"},
{"SnoopingProtection_average_window_size", "3"},
{"SnoopingProtection_filter_config_case", "2"},
{"SnoopingProtection_positive_count_threshold", "1"},
{"SnoopingProtection_negative_count_threshold", "1"},
{"SnoopingProtection_uncertain_count_threshold", "1"},
{"SnoopingProtection_positive_score_threshold", "-70"},
{"SnoopingProtection_negative_score_threshold", "-70"},
{"SnoopingProtection_default_uncertain_score", "-128"}};
{"SnoopingProtection_negative_score_threshold", "-70"}};

const FeatureEntry::FeatureVariation kSnoopingProtectionVariations[] = {
{"Precise", kSnoopingProtectionPrecision,
Expand Down

0 comments on commit c431c43

Please sign in to comment.