<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
locality-sensitive	B-Algorithm
hashing	I-Algorithm
(	O
LSH	O
)	O
is	O
an	O
algorithmic	O
technique	O
that	O
hashes	B-Error_Name
similar	O
input	O
items	O
into	O
the	O
same	O
"	O
buckets	O
"	O
with	O
high	O
probability	O
.	O
</s>
<s>
Since	O
similar	O
items	O
end	O
up	O
in	O
the	O
same	O
buckets	O
,	O
this	O
technique	O
can	O
be	O
used	O
for	O
data	B-Algorithm
clustering	I-Algorithm
and	O
nearest	B-Algorithm
neighbor	I-Algorithm
search	I-Algorithm
.	O
</s>
<s>
It	O
differs	O
from	O
conventional	B-Error_Name
hashing	I-Error_Name
techniques	I-Error_Name
in	O
that	O
hash	B-Algorithm
collisions	I-Algorithm
are	O
maximized	O
,	O
not	O
minimized	O
.	O
</s>
<s>
Alternatively	O
,	O
the	O
technique	O
can	O
be	O
seen	O
as	O
a	O
way	O
to	O
reduce	B-Algorithm
the	I-Algorithm
dimensionality	I-Algorithm
of	O
high-dimensional	O
data	O
;	O
high-dimensional	O
input	O
items	O
can	O
be	O
reduced	O
to	O
low-dimensional	O
versions	O
while	O
preserving	O
relative	O
distances	O
between	O
items	O
.	O
</s>
<s>
Hashing-based	O
approximate	O
nearest	B-Algorithm
neighbor	I-Algorithm
search	I-Algorithm
algorithms	O
generally	O
use	O
one	O
of	O
two	O
main	O
categories	O
of	O
hashing	O
methods	O
:	O
either	O
data-independent	O
methods	O
,	O
such	O
as	O
locality-sensitive	B-Algorithm
hashing	I-Algorithm
(	O
LSH	O
)	O
;	O
or	O
data-dependent	O
methods	O
,	O
such	O
as	O
locality-preserving	B-Error_Name
hashing	I-Error_Name
(	O
LPH	O
)	O
.	O
</s>
<s>
An	O
LSH	O
family	O
must	O
satisfy	O
the	O
following	O
conditions	O
for	O
any	O
two	O
points	O
and	O
any	O
hash	B-Error_Name
function	I-Error_Name
chosen	O
uniformly	O
at	O
random	O
from	O
:	O
</s>
<s>
An	O
LSH	O
scheme	O
is	O
a	O
family	O
of	O
hash	B-Error_Name
functions	I-Error_Name
coupled	O
with	O
a	O
probability	O
distribution	O
over	O
the	O
functions	O
such	O
that	O
a	O
function	O
chosen	O
according	O
to	O
satisfies	O
the	O
property	O
that	O
for	O
any	O
.	O
</s>
<s>
In	O
other	O
words	O
,	O
these	O
are	O
hash	B-Error_Name
functions	I-Error_Name
where	O
the	O
relative	O
distance	O
between	O
the	O
input	O
values	O
is	O
preserved	O
in	O
the	O
relative	O
distance	O
between	O
the	O
output	O
hash	B-Error_Name
values	I-Error_Name
;	O
input	O
values	O
that	O
are	O
closer	O
to	O
each	O
other	O
will	O
produce	O
output	O
hash	B-Error_Name
values	I-Error_Name
that	O
are	O
closer	O
to	O
each	O
other	O
.	O
</s>
<s>
This	O
is	O
in	O
contrast	O
to	O
cryptographic	O
hash	B-Error_Name
functions	I-Error_Name
and	O
checksums	B-Algorithm
,	O
which	O
are	O
designed	O
to	O
have	O
random	O
output	O
difference	O
between	O
adjacent	O
inputs	O
.	O
</s>
<s>
The	O
first	O
family	O
of	O
locality-preserving	O
hash	B-Error_Name
functions	I-Error_Name
was	O
devised	O
as	O
a	O
way	O
to	O
facilitate	O
data	B-General_Concept
pipelining	I-General_Concept
in	O
implementations	O
of	O
parallel	B-Operating_System
random-access	I-Operating_System
machine	I-Operating_System
(	O
PRAM	O
)	O
algorithms	O
that	O
use	O
universal	B-Algorithm
hashing	I-Algorithm
to	O
reduce	O
memory	O
contention	O
and	O
network	B-Protocol
congestion	I-Protocol
.	O
</s>
<s>
Locality	O
preserving	O
hashes	B-Error_Name
are	O
related	O
to	O
space-filling	B-Algorithm
curves	I-Algorithm
.	O
</s>
<s>
To	O
create	O
an	O
AND-construction	O
,	O
we	O
define	O
a	O
new	O
family	O
of	O
hash	B-Error_Name
functions	I-Error_Name
,	O
where	O
each	O
function	O
is	O
constructed	O
from	O
random	O
functions	O
from	O
.	O
</s>
<s>
We	O
then	O
say	O
that	O
for	O
a	O
hash	B-Error_Name
function	I-Error_Name
,	O
if	O
and	O
only	O
if	O
all	O
for	O
.	O
</s>
<s>
To	O
create	O
an	O
OR-construction	O
,	O
we	O
define	O
a	O
new	O
family	O
of	O
hash	B-Error_Name
functions	I-Error_Name
,	O
where	O
each	O
function	O
is	O
constructed	O
from	O
random	O
functions	O
from	O
.	O
</s>
<s>
We	O
then	O
say	O
that	O
for	O
a	O
hash	B-Error_Name
function	I-Error_Name
,	O
if	O
and	O
only	O
if	O
for	O
one	O
or	O
more	O
values	O
of	O
.	O
</s>
<s>
Here	O
,	O
the	O
family	O
of	O
hash	B-Error_Name
functions	I-Error_Name
is	O
simply	O
the	O
family	O
of	O
all	O
the	O
projections	O
of	O
points	O
on	O
one	O
of	O
the	O
coordinates	O
,	O
i.e.	O
,	O
,	O
where	O
is	O
the	O
th	O
coordinate	O
of	O
.	O
</s>
<s>
Each	O
possible	O
choice	O
of	O
defines	O
a	O
single	O
hash	B-Error_Name
function	I-Error_Name
mapping	O
input	O
sets	O
to	O
elements	O
of	O
.	O
</s>
<s>
Because	O
the	O
symmetric	B-Algorithm
group	I-Algorithm
on	O
elements	O
has	O
size	O
!,	O
choosing	O
a	O
truly	O
random	B-Algorithm
permutation	I-Algorithm
from	O
the	O
full	O
symmetric	B-Algorithm
group	I-Algorithm
is	O
infeasible	O
for	O
even	O
moderately	O
sized	O
.	O
</s>
<s>
Nilsimsa	O
is	O
a	O
locality-sensitive	B-Algorithm
hashing	I-Algorithm
algorithm	O
used	O
in	O
anti-spam	O
efforts	O
.	O
</s>
<s>
The	O
goal	O
of	O
Nilsimsa	O
is	O
to	O
generate	O
a	O
hash	B-Error_Name
digest	O
of	O
an	O
email	O
message	O
such	O
that	O
the	O
digests	O
of	O
two	O
similar	O
messages	O
are	O
similar	O
to	O
each	O
other	O
.	O
</s>
<s>
TLSH	O
is	O
locality-sensitive	B-Algorithm
hashing	I-Algorithm
algorithm	O
designed	O
for	O
a	O
range	O
of	O
security	O
and	O
digital	O
forensic	O
applications	O
.	O
</s>
<s>
The	O
goal	O
of	O
TLSH	O
is	O
to	O
generate	O
hash	B-Error_Name
digests	O
for	O
messages	O
such	O
that	O
low	O
distances	O
between	O
digests	O
indicate	O
that	O
their	O
corresponding	O
messages	O
are	O
likely	O
to	O
be	O
similar	O
.	O
</s>
<s>
Testing	O
performed	O
in	O
the	O
paper	O
on	O
a	O
range	O
of	O
file	O
types	O
identified	O
the	O
Nilsimsa	O
hash	B-Error_Name
as	O
having	O
a	O
significantly	O
higher	O
false	O
positive	O
rate	O
when	O
compared	O
to	O
other	O
similarity	O
digest	O
schemes	O
such	O
as	O
TLSH	O
,	O
Ssdeep	O
and	O
Sdhash	O
.	O
</s>
<s>
An	O
implementation	O
of	O
TLSH	O
is	O
available	O
as	O
open-source	B-Application
software	I-Application
.	O
</s>
<s>
The	O
random	O
projection	O
method	O
of	O
LSH	O
due	O
to	O
Moses	O
Charikar	O
called	O
SimHash	B-Algorithm
(	O
also	O
sometimes	O
called	O
arccos	O
)	O
is	O
designed	O
to	O
approximate	O
the	O
cosine	O
distance	O
between	O
vectors	O
.	O
</s>
<s>
The	O
basic	O
idea	O
of	O
this	O
technique	O
is	O
to	O
choose	O
a	O
random	O
hyperplane	O
(	O
defined	O
by	O
a	O
normal	O
unit	O
vector	O
)	O
at	O
the	O
outset	O
and	O
use	O
the	O
hyperplane	O
to	O
hash	B-Error_Name
input	O
vectors	O
.	O
</s>
<s>
Other	O
construction	O
methods	O
for	O
hash	B-Error_Name
functions	I-Error_Name
have	O
been	O
proposed	O
to	O
better	O
fit	O
the	O
data	O
.	O
</s>
<s>
In	O
particular	O
k-means	O
hash	B-Error_Name
functions	I-Error_Name
are	O
better	O
in	O
practice	O
than	O
projection-based	O
hash	B-Error_Name
functions	I-Error_Name
,	O
but	O
without	O
any	O
theoretical	O
guarantee	O
.	O
</s>
<s>
The	O
hashcodes	B-Error_Name
are	O
found	O
via	O
training	O
of	O
an	O
artificial	B-Architecture
neural	I-Architecture
network	I-Architecture
or	O
graphical	O
model	O
.	O
</s>
<s>
One	O
of	O
the	O
main	O
applications	O
of	O
LSH	O
is	O
to	O
provide	O
a	O
method	O
for	O
efficient	O
approximate	O
nearest	B-Algorithm
neighbor	I-Algorithm
search	I-Algorithm
algorithms	O
.	O
</s>
<s>
The	O
algorithm	O
has	O
two	O
main	O
parameters	O
:	O
the	O
width	O
parameter	O
and	O
the	O
number	O
of	O
hash	B-Error_Name
tables	O
.	O
</s>
<s>
In	O
the	O
first	O
step	O
,	O
we	O
define	O
a	O
new	O
family	O
of	O
hash	B-Error_Name
functions	I-Error_Name
,	O
where	O
each	O
function	O
is	O
obtained	O
by	O
concatenating	O
functions	O
from	O
,	O
i.e.	O
,	O
.	O
</s>
<s>
In	O
other	O
words	O
,	O
a	O
random	O
hash	B-Error_Name
function	I-Error_Name
is	O
obtained	O
by	O
concatenating	O
randomly	O
chosen	O
hash	B-Error_Name
functions	I-Error_Name
from	O
.	O
</s>
<s>
The	O
algorithm	O
then	O
constructs	O
hash	B-Error_Name
tables	O
,	O
each	O
corresponding	O
to	O
a	O
different	O
randomly	O
chosen	O
hash	B-Error_Name
function	I-Error_Name
.	O
</s>
<s>
In	O
the	O
preprocessing	O
step	O
we	O
hash	B-Error_Name
all	O
-dimensional	O
points	O
from	O
the	O
data	O
set	O
into	O
each	O
of	O
the	O
hash	B-Error_Name
tables	O
.	O
</s>
<s>
Given	O
that	O
the	O
resulting	O
hash	B-Error_Name
tables	O
have	O
only	O
non-zero	O
entries	O
,	O
one	O
can	O
reduce	O
the	O
amount	O
of	O
memory	O
used	O
per	O
each	O
hash	B-Error_Name
table	O
to	O
using	O
standard	O
hash	B-Error_Name
functions	I-Error_Name
.	O
</s>
<s>
Given	O
a	O
query	O
point	O
,	O
the	O
algorithm	O
iterates	O
over	O
the	O
hash	B-Error_Name
functions	I-Error_Name
.	O
</s>
