blob: e0ca0b03ffa31ede34c5608b30ec97b2b31438a8 [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.differentialprivacy";
// 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;
// Approximated error in the result.
optional ValueType error = 2;
}
repeated Element elements = 1;
// Contains information about algorithm accuracy.
message ErrorReport {
optional ConfidenceInterval noise_confidence_interval = 1;
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;
}