Skip to content

Fix biased DP quantiles utility bug introduced from recent quantiles refactor. The old quantiles path introduced jitter to handle elements with high mass (e.g., 40 hours per week on adult dataset). This change adds that back into the histogram-based quantiles codepaht, where the jitter occurs directly in the histogram domain rather than on a per-example level, preserving the nice properties of this implementation while hardening it to duplicate values.#90

Merged
copybara-service[bot] merged 1 commit into
mainfrom
cl/946968611
Jul 13, 2026

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Jul 13, 2026

Copy link
Copy Markdown

Fix biased DP quantiles utility bug introduced from recent quantiles refactor. The old quantiles path introduced jitter to handle elements with high mass (e.g., 40 hours per week on adult dataset). This change adds that back into the histogram-based quantiles codepaht, where the jitter occurs directly in the histogram domain rather than on a per-example level, preserving the nice properties of this implementation while hardening it to duplicate values.

There are two separate ways to jitter depending on whether the attribute is int or float. For int, we expand each histogram bin into 4*m bins by randomly assigning each example to one of the equivalent bins (done in bulk via multinomial). For float, we move each example to one of the nearby bins symmetrically (done in bulk via multinomial).

@copybara-service copybara-service Bot force-pushed the cl/946968611 branch 13 times, most recently from ef21b8e to 23e6df1 Compare July 13, 2026 14:13
@copybara-service copybara-service Bot changed the title Fix biased DP quantiles from histograms by jittering ties. Fix biased DP quantiles utility bug introduced from recent quantiles refactor. The old quantiles path introduced jitter to handle elements with high mass (e.g., 40 hours per week on adult dataset). This change adds that back into the histogram-based quantiles codepaht, where the jitter occurs directly in the histogram domain rather than on a per-example level, preserving the nice properties of this implementation while hardening it to duplicate values. Jul 13, 2026
@copybara-service copybara-service Bot force-pushed the cl/946968611 branch 6 times, most recently from 5686d56 to f5c7289 Compare July 13, 2026 19:49
…refactor. The old quantiles path introduced jitter to handle elements with high mass (e.g., 40 hours per week on adult dataset). This change adds that back into the histogram-based quantiles codepaht, where the jitter occurs directly in the histogram domain rather than on a per-example level, preserving the nice properties of this implementation while hardening it to duplicate values.

There are two separate ways to jitter depending on whether the attribute is int or float.  For int, we expand each histogram bin into 4*m bins by randomly assigning each example to one of the equivalent bins (done in bulk via multinomial).  For float, we move each example to one of the nearby bins symmetrically (done in bulk via multinomial).

PiperOrigin-RevId: 947195276
@copybara-service copybara-service Bot merged commit ce8e6ec into main Jul 13, 2026
@copybara-service copybara-service Bot deleted the cl/946968611 branch July 13, 2026 19:54
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.

0 participants