sand2009-2391c 1/20 paratext™ leveraging scalable scientific computing capabilities for...
Post on 12-Jan-2016
215 Views
Preview:
TRANSCRIPT
SAND2009-2391C1/20
ParaText™Leveraging Scalable Scientific Computing Capabilities for Large-Scale Text Analysis
and Visualization
Daniel M. Dunlavy, Timothy M. Shead, Patricia J. CrossnoSandia National Laboratories
SIAM Conference on Computational Science and EngineeringMarch 2, 2009
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company,for the United States Department of Energy’s National Nuclear Security Administration
under contract DE-AC04-94AL85000.
2/20
Motivation
Unstructured text
DatabaseDatabase
Data analyst
Processing and analysis Visualization
Gigabytes to terabytes
Few andoverworked
Scalable: ParaText™ Scalable: VTK / ParaView / Titan
3/20
Text Analysis Pipeline
Ingestion
Pre-processing
Transformation
Analysis
Post-processing
Archiving
File readers (ASCII, UTF-8, XML, PDF, ...)
Tokenization, stemming, part-of-speech taggingnamed entity extraction, sentence boundaries
Data modeling, dimensionality reduction, feature weighting, feature extraction/selection
Information retrieval, clustering, summarization,classification, pattern recognition, statistics
Visualization, filtering, summary statistics
Database, file, web site
4/20
Vector Space Model
• Vector Space Model for Text– Terms (features): – Documents (objects):– Term Document Matrix:– : measure of importance of term in document
• Term Examples
– Sentence: “Danny re-sent $1.”– Words: danny, sent, re [# chars?], $ [sym?], 1 [#?], re-sent [-?]– n-grams (3): dan, ann, nny, ny_, _re, re-, e-s, sen, ent, nt_, …– Named entities (people, orgs, money, etc.): danny, $1
• Document Examples– Documents, paragraphs, sentences, fixed-size chunks
[G. Salton, A. Wong, and C. S. Yang (1975), "A Vector Space Model for Automatic Indexing," Comm. ACM.]
5/20
Latent Semantic Analysis (LSA)
• SVD:
• Boolean query (query as new “doc”):
• Truncated SVD:
• LSA query:
term
s
documentsd1 d2 dn
t2
t1
tm
…d3 d4
.
.
. Truncated SVD
term
s
concepts documents
con
cep
ts
singular values
[Deerwester, S. C., et al. (1990), “Indexing by latent semantic analysis.” J. Am. Soc. Inform. Sci.]
6/20
ParaText™: Scalable Text Analysis
• ParaText™– Scalable client-server system
• Leverages existing capabilities• ParaView, VTK, Trilinos
– Latent semantic analysis• Term-document matrix analysis• Document similarities• Term (concept) similarities
– Algebraic Engine• General object-feature analysis
• General Use– OverView: open source information visualization– Timeline Treemap Browser: temporal information visualization– LSAView: text algorithm analysis– LDRDView: funding portfolio analysis– ParaSpace: simulation data analysis
7/20
Leveraging VTK / ParaView
• Useful capabilities already in VTK / ParaView– Pipeline architecture– Components for reading, processing, and visualizing (scientific) data sets– Distributed-memory parallel processing– Streaming data– ParaView client/server architecture
• Informatics capabilities recently added by Titan– Data structures: tables, trees, graphs– Data storage: delimited text files, common graph formats, SQL databases– Algorithms: graph, statistics, Matlab and R integration– Visualization: informatics-oriented paradigms
• Recent Titan features driven by ParaText™– Dense & sparse N-way arrays for algebraic / tensor analysis– Unicode text storage, manipulation, and rendering– Text ingestion, LSA, creating/storing algebraic models, performing
algebraic analyses
8/20
Leveraging Trilinos
• Useful capabilities already in Trilinos– Sparse matrix distributed data structure (Epetra)
– SVD (Anasazi)
– Incremental SVD (RBGen)
– Load balancing (Isorropia/Zoltan)
• Remaining issues for ParaText™– Data layout: different needs throughout pipeline
– Data storage: Epetra only provides doubles (Tpetra)
– Data storage: compressed row storage
– Target platforms: Linux focus (Autotools → CMake)
9/20
ParaText™ Server (PTS)
Artifact DB
PTS PTS PTS
Reader
P0 P1 Pk
Parser
Matrix
SVD
Reader
Parser
Matrix
SVD
Reader
Parser
Matrix
SVD
Fullyscalable pipeline
Matrices DB
HPC Resource (cluster, multicore server, etc.)
Database Servers
XMLHTTP
Master ParaText™
Server
ParaText™ Client
OverView
10/20
ParaText™ Scaling Examples
• Types of scaling– Strong: fixed data size, increasing # of processors– Weak: increasing data size, increasing # of processors– Fixed resource: increasing data size, fixed # of processors
• Data– Subset of Spock Challenge Data (~10 Gb HTML documents)– 64 Mb, 3318 documents, 281904 unique terms
• Hardware– 16 Dell 1850 Servers, Dual 3.6Ghz EM64T, 6GB RAM
11/20
Strong Scaling
12/20
Weak Scaling
13/20
Weak Scaling by Filter
14/20
Fixed Resource Scaling
15/20
<DOC><DOCNO><s docid="APW19990519.0113" num="1" stype="-1">APW19990519.0113</s></DOCNO><DATE_TIME><P><s docid="APW19990519.0113" num="2" stype="-1"> 1999-05-19 21:11:17</s> </P></DATE_TIME><BODY><CATEGORY><s docid="APW19990519.0113" num="3"stype="-1"> usa</s></CATEGORY><HEADLINE><P><s docid="APW19990519.0113" num="4" stype="0"> Pulses May Ease SchizophrenicVoices</s> </P></HEADLINE><TEXT><P><s docid="APW19990519.0113" num="5" stype="1"> WASHINGTON (AP)Schizophrenia patients whose medication couldn't stop the imaginary voices in theirheads gained some relief after researchers repeatedly sent a magnetic field into asmall area of their brains.</s> </P><P><s docid="APW19990519.0113" num="6"stype="1"> About half of 12 patients studied said their hallucinations becamemuch less severe after the treatment, which feels like ``having a woodpeckerknock on your head'' once a second for up to 16 minutes, said researcherDr.Ralph Hoffman.</s> <s docid="APW19990519.0113" num="7" stype="1">The voices stopped completely in three of these patients.</s> </P><P><sdocid="APW19990519.0113" num="8" stype="1"> The effect lasted for up toa few days for most participants, and one man reported that it lasted seven weeksafterbeing treated daily for four days.</s> </P><P><sdocid="APW19990519.0113" num="9" stype="1"> Hoffman stressed that thestudy is only preliminary and can't prove that the treatment would be useful.</s> <sdocid="APW19990519.0113" num="10" stype="1"> ``We need to do much moreresearch on this,'' he said in an interview.</s> </P><P><sdocid="APW19990519.0113" num="11" stype="1"> Hoffman, deputy medicaldirector of the Yale Psychiatric Institute, is scheduled to present the workThursday at the annual meeting of the American Psychiatric Association.</s> </P><P><s docid="APW19990519.0113" num="12" stype="1"> Not all people withschizophrenia hear voices, and of those who do, Hoffman estimated that maybe 25percent can't control them with medications even when other disease symptomsabate.</s> <s docid="APW19990519.0113" num="13" stype="1"> So the workcould pay off for ``a small but very ill group of patients,'' he said.</s> </P><P><sdocid="APW19990519.0113" num="14" stype="1"> The treatment is calledtranscranial magnetic stimulation, or TMS.</s> <s docid="APW19990519.0113"num="15" stype="1"> While past research indicates it mightbe helpful in lifting depression, it hasn't been studied much in schizophrenia.</s> </P><P><s docid="APW19990519.0113" num="16" stype="1"> In TMS, anelectromagnetic coil is placed on the scalp and current is turned on and off to create apulsing magnetic field that reaches into a small area of the brain.</s> <sdocid="APW19990519.0113" num="17" stype="1"> The goal is to make brain cellsunderneath the coil fire messages to adjoining cells.</s> </P><P><sdocid="APW19990519.0113" num="18" stype="1"> The procedure is muchdifferent from electroconvulsive therapy, called ECT, which applies pulses ofelectricity rather than a magnetic field to the brain.</s> <sdocid="APW19990519.0113"num="19" stype="1"> Unlike TMS, ECT creates a briefseizure and is performed under general anesthesia.</s> <sdocid="APW19990519.0113" num="20" stype="1"> ECT is used most often fortreatingsevere depression.</s> </P><P><s docid="APW19990519.0113" num="21"stype="1"> In TMS, the magnetic pulses are thought to calm the affected partof the brain if they're given as slowly as once per second, Hoffman said.</s> <s docid="APW19990519.0113" num="22" stype="1"> He and colleagues targeted an area involved in understanding speech, above and behind the left ear, on the theory that hallucinated voices come from overactivity there.</s> </P><P><s docid="APW19990519.0113" num="23" stype="1"> The treatment can make scalp muscles muscle contract, leading tothe woodpecker feeling, he said, but patients could tolerate it.</s> <s docid="APW19990519.0113" num="24" stype="1">Headachewas the most common side effect, and there was no sign that the treatment affected the ability to understandspeech, he said.</s> </P><P><s docid="APW19990519.0113" num="25" stype="1"> To make sure the study resultsdidn'treflect just the psychological boost of getting a treatment, researchers gave sham and real treatments to each studyparticipant and studied the difference in how patients responded.</s> <s docid="APW19990519.0113" num="26" starting with
16/20
LSAView: Algorithm Analysis/ Development
• LSAView– Analysis and exploration of
impact of informatics algorithms on end-user visual analysis of data
– Aids in discovery process of optimal algorithm parameters for given data and tasks
• Features – Side-by-side comparison of visualizations for two sets of parameters– Small multiple view for analyzing 2+ parameter sets simultaneously– Linked document, graph, matrix, and tree data views– Interactive, zoomable, hierarchical matrix and matrix-difference views– Statistical inference tests used to highlight novel parameter impact
– Used in developing and understanding ParaText™ algorithms
17/20
LSAView
18/20
20 40 60 800
0.5
1
1.5
2
20 40 60 800
0.5
1
1.5
2
20 40 60 800
0.5
1
1.5
2
20 40 60 800
0.5
1
1.5
2
k
LSAView Impact
• Document similarities:
• Inner product view:
• Scaled inner product view:
What is the best weighting of singular values for document similarity graph generation?
original scaling no scaling inverse sqrt inverse
[Leisure Studies of America Data: 97 documents, 335 terms]
19/20
Summary and Future Work
• ParaText™– Leverages VTK / ParaView / Trilinos (scientific computing)
– Scalable infoviz / text analysis pipeline
– General data object-feature analysis capability
• More work ahead …– Scaling experiments: bigger data, layout constraints, etc.
– Extensions: load balancing, incremental SVD, etc.
– Other applications: clustering, summarization, classification, etc.
– Relevance feedback: automatically incorporating user feedback to improve analysis (e.g, priors, metric learning)
20/20
Thank You
ParaText™: Leveraging Scalable Scientific Computing Capabilities for Large-Scale
Text Analysis and Visualization
Danny Dunlavy
dmdunla@sandia.gov
http://www.cs.sandia.gov/~dmdunla
21/20
Backup Slides
22/20
Feature Weighting
Term Document Matrix Scaling:
23/20
d1 : Hurricane. A hurricane is a catastrophe.
d2 : An example of a catastrophe is a hurricane.
d3 : An earthquake is bad.
d4 : Earthquake. An earthquake is a catastrophe.
d1 : Hurricane. A hurricane is a catastrophe.
d2 : An example of a catastrophe is a hurricane.
d3 : An earthquake is bad.
d4 : Earthquake. An earthquake is a catastrophe.
1011catastrophe
2100earthquake
0012hurricane
d4d3d2d1
0catastrophe
0earthquake
1hurricane
qA
.30.15.60.59catastrophe
.92.96.02-.03earthquake
.11-.11.78.78hurricane
d4d3d2d1
A2
00.71.89qTA .11–.78.78qTA2
Removestopwords
normalization only rank-2 approximation
captures link to doc 4
LSA Example 1
.450.71.45catastrophe
.89100earthquake
00.71.89hurricane
d4d3d2d1
A
24/20
LSA Example 2
∆policy∆planning∆politics∆tomlinson∆1986oSport in Society: policy, Politics and Culture, ed A. Tomlinson (1990) oPolicy and Politics in Sport, PE and Leisure eds S. Fleming, M. Talbot and A. Tomlinson (1995) oPolicy and Planning (II), ed J. Wilkinson (1986) oPolicy and Planning (I), ed J. Wilkinson (1986) oLeisure: Politics, Planning and People, ed A. Tomlinson (1985)
∆parker∆lifestyles∆1989∆partoWork, Leisure and Lifestyles (Part 2), ed S. R. Parker (1989) oWork, Leisure and Lifestyles (Part 1), ed S. R. Parker (1989)
[Leisure Studies of America Data: 97 documents, 335 terms]
25/20
Modeling Text
• Model document meaning as a linear equation– Meaning (document) = j meaning (termj)
– Induces a high dimensional vector space model
• Create term-document (occurrence) matrix– Examples of “terms”:
• Words
• Word stems, lemmas
• Entities (person, organization, location, etc.)
• N-grams (characters or words)
term
s
documentsd1 d2 dn
t2
t1
tm
…d3d4
.
.
.
26/20
Latent Semantic Analysis
• Conceptual searching– rank(k) : more exact data similarities
– rank(k) : more conceptual data similarities
– Compute larger rank, then use smaller rank
terms
k = 6
terms
k = 24
concepts concepts
increasing k
more conceptual more exact
27/20
ParaText™ Operations
• Document parsing, matrix creation and weighting• SVD:• Truncated:• Query scores (query as new “doc”):• LSA Ranking:• Document similarities:• Term Similarities:
term
s
concepts documents
con
cep
ts
singular values
T
DT
28/20
Document Similarity Graphs
• Document similarity matrix
• Document similarity graph– Each document (or term, entity, etc.) is a vertex
– Each row defines an edge
do
cum
ents
concepts documents
con
cep
ts
singular values
threshold
sparse coordinate format
29/20
Graph Similarities
• Statistics on edges– One graph: one-sample t statistic
– Two graphs: two-sample t statistic
Edges from graph 1 Edges from graph 2
top related