Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Sofia demo #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/count_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def main():
elif (len(dimensions) == 2 and 1 not in dimensions) or len(dimensions) == 3 and 1 in dimensions:
y = dimensions[1]
sublists = [histogram[i:i+y] for i in xrange(0, len(histogram), y)]
trace = go.Heatmap(z=sublists, colorscale="YlOrRd", zsmooth='best', opacity=0.85, reversescale=True)
trace = go.Heatmap(z=sublists, opacity=0.85)
data = [trace]
# print(sublists)
if len(configuration['attributes']) == 2:
Expand Down
117 changes: 0 additions & 117 deletions web/frontend/histograms_categorical.html

This file was deleted.

118 changes: 73 additions & 45 deletions web/frontend/index.html
Original file line number Diff line number Diff line change
@@ -1,71 +1,99 @@
<!DOCTYPE html>
<html>
<head>
<title>Secure Analytics over Patients Data</title>
<title>Histogram Secure Computations</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.2.2/jquery.form.min.js" integrity="sha384-FzT3vTVGXqf7wRfy8k4BiyzvbNfeYjK+frTVqZeNDFl8woCbF0CYG6g2fMEFFo/i" crossorigin="anonymous"></script>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/css/bootstrap-select.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/js/bootstrap-select.min.js"></script>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="lock.css">
<link rel="stylesheet" type="text/css" href="buttons.css">
<link rel="stylesheet" type="text/css" href="loading.css">
</head>
<body>
<div class="container">
<div class="jumbotron">
<a style="float: right;" href="https://github.com/Athena-MHMD/smpc-analytics" target="_blank"><img src="images/github.png" title="GitHub repository" width="40" height="40"/></a>
<h2>Secure Analytics over Patient Data</h2>
<h2>Secure Histogram Computations</h2>

<p>
A secure computation analytics platform over patient encrypted data.
The patient data are being encrypted before leaving the data providers (hospitals) and imported to the secure multi-party computation (SMPC) platform/servers.
The privacy preserving algorithms have no access to plain-text data, since no plaintext value leaves data owner's premises unencrypted.
Our algorithms have been developed over the <a href="https://sharemind.cyber.ee">Sharemind</a> platform, which employs secure multi-party computation, leveraging additive secret sharing techniques that have homomorphic encryption properties.
Thus, our application servers process data without removing the protection.
Our platform solely decrypts and publishes the final results of the query, which leaks no information.
</p>
<p>Select attributes for histogram creation</p>
</div>

<div>
<div class="center-div">
<div class="lock">
<div class="unlocker"></div>
</div>
</div>

<a class="btn btn-default btn-lg btn-hover-info" style="width:49%; padding: 17px" href="histogram_datasets.html" role="button">Secure Data Aggregation</a>
<a class="btn btn-default btn-lg btn-hover-success" style="width:49%; padding: 17px" href="classification_datasets.html" role="button">Secure Data Classification</a>
<h3>Medical Subject Headings (MeSH)</h3>
MeSH provides a hierarchically-organized terminology for indexing and cataloging of biomedical information such as MEDLINE/PUBmed and other United States National Library of Medicine (NLM) databases.
Created and updated by the NLM, it is used by articles databases and by NLM's catalog of book holdings.
This dataset is based on the MeSH tree structure.
MeSH terms are represented as normalized values; this means that even attributes like <i>Age</i>, are separated into groups (for instance <i>Child</i>, <i>Adult</i>, etc).
This dataset contains semantically annotated patient data.
</br>
</br>
In order to request an aggregation, the attributes must be specified and should be in the form that is defined by MeSH.
For instance, for attribute <i>Age</i>, provide the <i>M01.060</i> MeSH ID, which has the following subcategories: <i> Adolescent [M01.060.057], Adult [M01.060.116], Child [M01.060.406], Infant [M01.060.703]</i>.
</br>
</br>
<a class="btn btn-info" href="https://meshb.nlm.nih.gov/treeView" role="button" target="_blank">MeSH Browser Tree View</a>
</div>
</br>
</br>

<div class="card"><div class="card-body">
<ul class="nav nav-tabs active" id="tabs">
<li class="nav-item active">
<a class="nav-link active" href="#tab1" id="tab1-tab" data-toggle="tab">Histogram 1</a>
</li>
<li class="nav-item">
<a href="#" id="btnAdd"><input type="submit" onclick="addHistogramCategoricalTab()" class="btn btn-info btn-sm" value="+" id="tabButton"></input></a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane fade active in" id="tab1">
<div style="display:none;" id="loading-wrapper_hist_1">
<div id="loading-text">Loading</div>
<div id="loading-content"></div>
</div>

<table style="width:100%">
<col width="45%"/>
<col width="45%"/>
<tr>
<th>
Perform analytics using privacy-preserving data aggregation algorithms for computing and visualizing multi-dimemsional histograms.
</th>

<th>
Generate decision trees from patient data using the privacy-preserving ID3 classifier.
</th>
</tr>
</table>

<br>
<br>
<br>
<div>
<h2>Architecture Overview: An End-To-End Use Case</h2>
<br>
<p style="text-align:center;">
<img src="images/overview.gif" style="width:800px; height:600px;"/>
</p>

<form action="/smpc/count" method="post" id="hist_1">
</br>
<div id="attribute_container_1">
Attributes for Aggregation

</br>
<div class="btn-group">
<input type="text" name="count_attributes" class="form-control" id="usr">
</div>
</div>

</br>
<p>
<input type="button" id="filter_button_1" onclick="addAttributeToFormWithId(this.id, 'count_attributes')" class="btn btn-default" value="Add Attribute">
</p>

<div id="filter_container_1">
</div>
<br>
<p>
<input type="button" id="filter_button_1" onclick="addFilterToFormWithIdCategorical(this.id)" class="btn btn-default" value="Add Filter">
</p>

<p>
<input type="button" id="button_hist_1" onclick="sendFormWithId(this.id, '\/smpc\/count')" class="btn btn-primary" value="Compute Histogram">
</p>
</form>
</div>
</div>
</div></div>

</div>

</div>
</body>

<!-- scripts -->

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src='./logic.js'></script>

</html>

71 changes: 71 additions & 0 deletions web/frontend/index_main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<!DOCTYPE html>
<html>
<head>
<title>Secure Analytics over Patients Data</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.2.2/jquery.form.min.js" integrity="sha384-FzT3vTVGXqf7wRfy8k4BiyzvbNfeYjK+frTVqZeNDFl8woCbF0CYG6g2fMEFFo/i" crossorigin="anonymous"></script>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="lock.css">
<link rel="stylesheet" type="text/css" href="buttons.css">
</head>
<body>
<div class="container">
<div class="jumbotron">
<a style="float: right;" href="https://github.com/Athena-MHMD/smpc-analytics" target="_blank"><img src="images/github.png" title="GitHub repository" width="40" height="40"/></a>
<h2>Secure Analytics over Patient Data</h2>

<p>
A secure computation analytics platform over patient encrypted data.
The patient data are being encrypted before leaving the data providers (hospitals) and imported to the secure multi-party computation (SMPC) platform/servers.
The privacy preserving algorithms have no access to plain-text data, since no plaintext value leaves data owner's premises unencrypted.
Our algorithms have been developed over the <a href="https://sharemind.cyber.ee">Sharemind</a> platform, which employs secure multi-party computation, leveraging additive secret sharing techniques that have homomorphic encryption properties.
Thus, our application servers process data without removing the protection.
Our platform solely decrypts and publishes the final results of the query, which leaks no information.
</p>
</div>

<div>
<div class="center-div">
<div class="lock">
<div class="unlocker"></div>
</div>
</div>

<a class="btn btn-default btn-lg btn-hover-info" style="width:49%; padding: 17px" href="histogram_datasets.html" role="button">Secure Data Aggregation</a>
<a class="btn btn-default btn-lg btn-hover-success" style="width:49%; padding: 17px" href="classification_datasets.html" role="button">Secure Data Classification</a>
</div>

<table style="width:100%">
<col width="45%"/>
<col width="45%"/>
<tr>
<th>
Perform analytics using privacy-preserving data aggregation algorithms for computing and visualizing multi-dimemsional histograms.
</th>

<th>
Generate decision trees from patient data using the privacy-preserving ID3 classifier.
</th>
</tr>
</table>

<br>
<br>
<br>
<div>
<h2>Architecture Overview: An End-To-End Use Case</h2>
<br>
<p style="text-align:center;">
<img src="images/overview.gif" style="width:800px; height:600px;"/>
</p>

</div>

</div>
</body>

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

</html>
15 changes: 1 addition & 14 deletions web/frontend/logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,20 +226,7 @@ function addHistogramCategoricalTab() {
<p>
<input type="button" id="filter_button_`+nextTab+`" onclick="addFilterToFormWithIdCategorical(this.id)" class="btn btn-default" value="Add Filter">
</p>

<p>
<ul class="list-group">
<li class="list-group-item">
<input type="checkbox" name="datasources" value="t1" checked="true"> Dataset 1
</li>
<li class="list-group-item">
<input type="checkbox" name="datasources" value="t2" checked="true"> Dataset 2
</li>
<li class="list-group-item">
<input type="checkbox" name="datasources" value="t3" checked="true"> Dataset 3
</li>
</ul>
</p>

<p>
<input type="button" id="button_hist_` + nextTab + `" onclick="sendFormWithId(this.id, '\/smpc\/count')" class="btn btn-primary" value="Compute Histogram">
</p>
Expand Down