blob: 916ffa42ec716dc83aadec6e8957e0d1e6bed8d1 [file] [log] [blame]
//
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// This file defines the input/output data format accepted by the differentially
// private algorithms.
syntax = "proto2";
package differential_privacy;
import "proto/confidence-interval.proto";
option java_package = "com.google.privacy.differentialprivacy.proto";
// Defining our own value type to restrict the acceptable data types.
// It would change as per the future extensions.
message ValueType {
oneof value {
int64 int_value = 1;
double float_value = 2;
string string_value = 3;
}
}
// Output data produced by a differentially private algorithm.
message Output {
message Element {
// Diff. priv. result of the operation performed over the input data.
optional ValueType value = 1;
// DEPRECATED: Use Element.noise_confidence_interval instead.
optional ValueType error = 2 [deprecated = true];
// Confidence interval of the noise added to the result
optional ConfidenceInterval noise_confidence_interval = 3;
}
repeated Element elements = 1;
// Contains information about algorithm accuracy.
message ErrorReport {
// DEPRECATED: Use Element.noise_confidence_interval instead.
optional ConfidenceInterval noise_confidence_interval = 1
[deprecated = true];
optional BoundingReport bounding_report = 2;
}
// Error report is attached if either the noise confidence interval or the
// bounding report is available.
optional ErrorReport error_report = 3;
reserved 2;
}
// Accuracy information about results of automatic bounding algorithms.
// When ApproxBounds is called by bounded algorithms, the BoundingReport can
// be used to pass differentially private intermediate results to help users
// understand the accuracy implications of the output.
message BoundingReport {
// Lower and upper bounds produced by the ApproxBounds algorithm.
optional ValueType lower_bound = 1;
optional ValueType upper_bound = 2;
// Noisy number of total inputs to the bounding algorithm.
optional double num_inputs = 3;
// Noisy number of inputs lying outside the bounds.
optional double num_outside = 4;
}