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

Embed ara scaling factor in payload #1188

Open
k-o-ta opened this issue Mar 11, 2024 · 2 comments
Open

Embed ara scaling factor in payload #1188

k-o-ta opened this issue Mar 11, 2024 · 2 comments
Labels
developer-input Question/feedback raised by a developer and posted here on their behalf for public discussion

Comments

@k-o-ta
Copy link
Contributor

k-o-ta commented Mar 11, 2024

When the price of a purchase is dynamic, we may want to dynamically determine the scaling factor as well.
However, if the scaling factor is dynamically determined when triggering, it is difficult to scale down using the same factor after aggregation.

This is a proposal to embed the scaling factor in the aggregatable value when registering the Attribution trigger. For example like this.

"aggregatable_values": {
  "purchase": {
    "value": 3200, // this is the value after scaling up
    "scalingFactor": 100 // default is 1
  }
}

The scalingFactor is also embedded in the aggregation_service_payloads.payload of the Aggregatable reports.
The aggregation service uses the scalingFactor to scale down when generating summary reports.

Since the scalingFactor is encrypted, it will not increase the amount of information for tracking.

@csharrison
Copy link
Collaborator

Hey @k-o-ta , can you explain how you would propose the agg service:

  1. Scales different contributions with different values of scalingFactor?
  2. Applies noise when different contributions have different values of scalingFactor?

I am concerned this will be challenging to do privately. One of the properties of the existing system is that you can do rescaling after applying noise (and therefore is just post-processing private aggregates). It seems with your proposal you might need to do scaling before applying noise.

@apasel422 apasel422 added the developer-input Question/feedback raised by a developer and posted here on their behalf for public discussion label Mar 20, 2024
@k-o-ta
Copy link
Contributor Author

k-o-ta commented Mar 22, 2024

I apologize for the delay in my response. I understand your concerns.

  1. Scales different contributions with different values of scalingFactor?
    Yes
  2. Applies noise when different contributions have different values of scalingFactor?
    Yes

As you stated, we would lose the characteristic of being able to rescale after applying noise.

I was considering rescaling after applying noise to aggregatable reports with the same scaling factor.
For example,

  • three aggregatable reports with a scaling factor of 100. The values are 600, 500, and 400.
    • In this case, the aggregation service calculates 100*(600+500+400)+Noise1, then rescales to get 600+500+400+Noise1/100.
  • two aggregatable reports with a scaling factor of 200. The values are 300 and 200.
    • In this case, the aggregation service calculates 200*(300+200)+Noise2, then rescales to get 300+200+Noise2/200.

What the user ultimately gets is 600+500+400+Noise1/100+ 300+200+Noise2/200.

If we had initially set the scaling factor to 100, we would have gotten 600+500+400+300+200+Noise/100.
To summarize about Noise:

  • Noise1/100 + Noise2/200 == (Noise1/100 + 0.5Noise2/100)
  • Noise/100

In other words, we would compare Noise1 + 0.5Noise2 and Noise. If the distributions of Noise1, Noise2, and Noise are the same, this proposal might lead to a decrease in the accuracy of the summary report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer-input Question/feedback raised by a developer and posted here on their behalf for public discussion
Projects
None yet
Development

No branches or pull requests

3 participants