% Based upon conference-talks/conference-ornate-20min.en.tex
\documentclass{beamer}
\mode<presentation>
{
  \usetheme{Warsaw}
  \setbeamercovered{transparent}
}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage{verbatim}
\usepackage[all]{xy}
\title{Hyperstructure Maintenance Costs in Large-scale Wikis}
\author{Philip Boulain}
\institute
{
%  Faculty of Engineering and Applied Science\\
  Department of Electronics and Computer Science\\
  University of Southampton
}
\date{22nd April 2008}
%\AtBeginSection[] % This are all the wins; but makes mucho slides
%{
%  \begin{frame}<beamer>{Outline}
%    \tableofcontents[currentsection]%,currentsubsection]
%  \end{frame}
%}

%\newcommand{\todo}[1]{\alert{(#1)}}

% Patch Beamer to stop it being capable of caption names. (Eww.)
%\renewcommand{\insertcaptionname}{}
\setbeamertemplate{caption} % Don't really want to have to redefine this, but none of the options are 'no name at all'
{
  \insertcaption
}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\begin{frame}{Outline}
  \tableofcontents
\end{frame}

\section{Introduction} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Context}

\begin{frame}{Broader project}
  \begin{itemize}
  \item
    Looking at the potentially beneficial relationships between
    \begin{itemize}
      \item Open Hypermedia
        \begin{itemize} \item Interconnected documents \end{itemize}
      \item Semantic Web
        \begin{itemize} \item Interconnected databases \end{itemize}
      \item Wiki Wiki Web
        \begin{itemize} \item Communal editing systems \end{itemize}
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}{Hypermedia}
  \begin{itemize}
  \item
    Long-standing field of research.
  \item
    How can documents expand beyond limitations of paper?
    \begin{itemize}
      \item Cross-referencing (hyperlinks).
      \item Sharing and re-use (composition and transclusion).
    \end{itemize}
  \item
    ``Essential feature'' is ``the process of tying two items together'' (linking).
  \end{itemize}
  \vspace{1cm}
  \begin{thebibliography}{XX}
    \small
    \beamertemplatearticlebibitems
    \bibitem[XX]{Bush45}
      V. Bush.
      \newblock As We May Think.
      \newblock {\em The Atlantic Monthly}, 176:101--108, Jul 1945.
  \end{thebibliography}
\end{frame}

\begin{frame}{Open Hypermedia}
  \begin{itemize}
  \item
    Many types of links have been developed since.
    \begin{itemize}
      \item First-class: has identity distinct from content linked.
      \item N-ary: more than one source, one target.
      \item Typed: specifies why or how documents related.
      \item Generic: endpoints selected by document criteria.
      \item Functional: endpoints from arbitrary functions.
    \end{itemize}
  \item
    Open Hypermedia focuses on interoperation.
    \begin{itemize}
      \item Sharing hyperstructure with other systems.
      \item Applying hyperstructure to non-hypermedia resources.
      \item Both require non-embedded links.
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}{Semantic Web}
  \begin{itemize}
  \item
    World Wide Web is a distributed set of interlinked documents.
  \item
    The Semantic Web is distributed set of interlinked data.
  \item
    Discover and combine data from disparate sources as one may discover and browse web pages.
  \item
    Core technology is the Resource Description Framework (RDF).
  \item
    RDF describes things using triples: \emph{subject} has \emph{predicate} value \emph{object}.
  \item
    Subjects, predicates, and non-literal objects named using URIs.
  \end{itemize}
\end{frame}

\begin{frame}{Wiki Wiki Web}
  \begin{itemize}
  \item
    ``A collection of Web pages which can be edited by anyone, at any time, from anywhere.''\footnote{\url{http://c2.com/cgi/wiki?WikiGettingStartedFaq}}
  \item
    Users can create pages with much of the structure and styling of HTML web pages.
    \begin{itemize}
      \item But usually in a bespoke ad-hoc markup.
    \end{itemize} 
  \item
    Linking is web-style, like \texttt{<a href=""></a>}.
    \begin{itemize}
      \item But some wikis offer the ability to show backlinks.
      \item They can only do this because they are not distributed.
      \item The wiki system is aware of the entire document space.
    \end{itemize}
  \item
    Massively successful.
    \begin{itemize}
      \item Wikipedia: over 2,000,000 articles.
% Wikia: over n wikis---no stats on this?
      \item Low barrier to entry.
    \end{itemize}
  \end{itemize}
%  \vspace{1cm}
%  \begin{thebibliography}{XX}
%    \small
%    \beamertemplatearticlebibitems
%    \bibitem[XX]{WGSFAQ}
%      Various.
%      \newblock Wiki Getting Started FAQ.
%      \newblock {\footnotesize \url{http://c2.com/cgi/wiki?WikiGettingStartedFaq}, 2008.}
%  \end{thebibliography}
\end{frame}

\subsection{Relationships}
%\begin{frame}{Semantic MediaWiki and Dexter}
%  \begin{itemize}
%  \item
%    Semantic MediaWiki is a semantic wiki.
%    \begin{itemize}
%      \item It defines a mapping from nodes and links to RDF resources and statements.
%    \end{itemize}
%  \item
%    The Dexter Hypertext Reference Model defines an abstract open hypermedia system.
%    \begin{itemize}
%      \item Formally, in Z.
%    \end{itemize}
%  \item
%    We have described the former in terms of the latter.
%    \begin{itemize}
%      \item (Semantic) wikis can be treated as simple hypermedia systems.
%      \item Wiki nodes map to hypermedia documents (and RDF resources).
%      \item Wiki links map to embedded, binary hypermedia links.
%    \end{itemize}
%  \item
%    Highlights the gaps in wiki capabilities.
%    \begin{itemize}
%      \item Anything \alert{but} embedded, binary links!
%    \end{itemize}
%  \end{itemize}
%\end{frame}

\subsection{Suggestions}
\begin{frame}{Suggested benefits}
  \begin{itemize}
  \item
    We have devised a mapping between hypermedia and semantic wikis.
    \begin{itemize}
      \item Semantic wikis can be treated as simple hypermedia systems.
%      \item Wiki nodes map to hypermedia documents (and RDF resources).
%      \item Wiki links map to embedded, binary hypermedia links.
    \end{itemize}
  \item
    Highlights the gaps in wiki capabilities.
    \begin{itemize}
      \item Anything \alert{but} embedded, binary links!
    \end{itemize}
  \item
    Generic links offer well-defined version of WikiWords.
  \item
    First-class links make backlinks easy, even when editing.
  \item
    Transclusion allows content re-use and composition.
    \begin{itemize}
      \item MediaWiki templates are not transcluded at edit time; they are not suitable for this.
    \end{itemize}
  \item
    Adaptive hypermedia allows multiple contents per node, selected by e.g. level of detail.
  \end{itemize}
\end{frame}

\section{Experiment} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Hypothesis}
\begin{frame}{Hypothesis}
  \begin{block}{Hypothesis}
    Manual editing of link structure, of a type which richer hypertext features could automate, is a significant overhead versus changes to the text content.
  \end{block}
\end{frame}

\subsection{Dataset}
\begin{frame}{English Wikipedia}
  \begin{itemize}
  \item
    Large, varied dataset: crosses many domains.
  \item
    Articles are heavily interlinked.
  \item
    Keeps complete history of editing process.
  \item
    Socially significant: widely-used resource with active community.
  \item
    Very, very big.
    \begin{itemize}
      \item 84.6GB compressed; 2TB estimated uncompressed.
    \end{itemize}
  \end{itemize}
\end{frame}

\subsection{Procedure}
\begin{frame}{Overview}
  \begin{itemize}
  \item
    Stream processing essential for this much data.
  \end{itemize}
  \begin{figure}
\centerline{
 \xymatrix@C=4pt {
  \txt{\emph{Dump}} \ar[r]^-*+\txt{\tt bzcat} &
  \txt{Trim articles} \ar[r]^-*+\txt{\tt gzip} &
  \txt{\emph{Trimmed}} \ar[r]^-*+\txt{\tt zcat} &
  \txt{Subset} \ar[r]^-*+\txt{\tt gzip} &
  \txt{\emph{Subset}}
   \ar`d[l]^-*+\txt{\tt zcat}`[dllll]^*+\txt{\scriptsize Nearby revision comparison}[ddllll]
   \ar'[d]`d[l]`[ddlll]_*+\txt{\scriptsize WikiMarkup parsing}[ddlll]
   \ar'[d]`d[l]`[ddll][ddll]
   \ar'[d]`d[l]`[ddl][ddl]
   \ar[dd]
  \\
  & & & &
  \\
  \txt{Abuse?} \ar[d] &
  \txt{Content?}    \ar`d[l]`[dl]   [dl] &
  \txt{Templates?}  \ar`d[l]`[dll]  [dll] &
  \txt{Categories?} \ar`d[l]`[dlll] [dlll] &
  \txt{Links?}      \ar`d[l]`[dllll][dllll]
  \\
  \txt{\emph{Classifications}} \ar[r] &
  \txt{Aggregate} \ar[r] &
  \txt{\emph{Statistics}}
 }
}
%\caption{Data flow of Wikipedia experiment}
%\label{FigWPDataFlow}
  \end{figure}
\end{frame}

%\begin{frame}{Overview II}
%  \begin{itemize}
%  \item
%    Decompress the downloaded dump.
%  \item
%    Trim to just articles and take random sample.
%  \item
%    Intermediate data is lightly compressed.
%  \item
%    Parse and categorise.
%  \item
%    Aggregate categorisations into statistics.
%  \end{itemize}
%\end{frame}

\begin{frame}{Measuring text changes}
  \begin{itemize}
  \item
    Dump contains the page sources in wikimarkup.
  \item
    Need to parse this, at least approximately.
    \begin{itemize}
      \item Parse links to identify hyperstructure changes.
      \item Extract body text to identify content changes.
      \item Best-effort 42-state $LL(k)$ `parser'.
    \end{itemize}
  \item
    Need some metric of `how much this text has changed'.
    \begin{itemize}
      \item Best-effort $\Omega(n)$, $O(n \times m)$ string distance algorithm.
    \end{itemize}
  \item
    Sliding window algorithm ran 0.01\% subset in eight minutes, vs. $2\frac{1}{2}$ hours for Levenshtein.
    \begin{itemize}
      \item 0.04\% subset took 27 hours with sliding window, and was infeasible otherwise.
    \end{itemize}
  \item
    Error could be large in some cases, but not near boundary of major/minor thresholding.
  \end{itemize}
\end{frame}

%\begin{frame}{Sliding window string distance}
%  \begin{itemize}
%  \item
%    \todo{graphical algorithm}
%  \end{itemize}
%\end{frame}

\begin{frame}{Categories}
  \begin{description}
    \item[Revert] Edit which simply undoes a previous edit.
    \item[Content] Major (nontrivial) edit of the page content.
    \item[Minor] Minor (trivial) edit of the page content.
    \item[Category] Edit to the categories of a page.
    \item[List of] Edit to a page which is an index to other pages.
    \item[Indexing] Edit to categories or listings, possibly both.
    \item[Template] Edit to the templates used by a page.
    \item[Page link] Edit to an internal page link.
    \item[URL link] Edit to a WWW URL link; usually external.
    \item[Links] Edit to page or URL links.
    \item[Link only] As `links', but excluding major edits.% which are also major.
    \item[Hyperstruct.] Indexing, linking, or template use changes.
%    \item[Hyperstructure] Any hypermedia change: indexing, linking, or template.
  \end{description}
\end{frame}

%\begin{frame}{Tools}
%  \begin{description}
%    \item[dumptitles] Lists page titles in a MediaWiki XML dump (``MWXML'').
%    \item[discardnonart] Filters non-article namespaced pages out of MWXML.
%    \item[randomsubset] Randomly selects a proportion of MWXML pages.
%    \item[categorise] Categorises MWXML articles into a simple XML format.
%    \item[cataggr] Aggregates category XML into statistical results and graph data.
%  \end{description}
%  \begin{itemize}
%  \item Available under the open source MIT license.
%    %\begin{itemize}
%      \item {\small \url{http://users.ecs.soton.ac.uk/prb/phd/wikipedia/}}
%    %  \item Re-usable for other experiments on large Wikipedia data.
%    %\end{itemize}
%  \end{itemize}
%\end{frame}

%\subsection{Tools}

\section{Results} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Overheads}
\begin{frame}{Index management}
  \begin{columns}[t]
    \begin{column}{0.5\textwidth}
      \begin{table}
        \begin{tabular}{l|r}
   Edit type & Proportion \\ \hline
   Categories & 8.71\% \\
   Lists      & 1.97\% \\
   Overhead   & 10.56\% \\
        \end{tabular}
        \caption{0.01\% subset}
      \end{table}
    \end{column}
    \begin{column}{0.5\textwidth}
      \begin{table}
        \begin{tabular}{l|r}
   Edit type  & Proportion \\ \hline
   Categories & 8.75\% \\
   Lists      & 3.72\% \\
   \alert{Overhead}   & \alert{12.34\%} \\
        \end{tabular}
        \caption{0.04\% subset}
      \end{table}
    \end{column}
  \end{columns}
%  \begin{center} Proportions of edits related to index management. \end{center}
  \begin{itemize}
  \item
    Serious effort spent on organising, not just providing/updating, information.
  \item
    Semantic wiki: lists could be query results.
  \end{itemize}
\end{frame}

\newcommand{\linkmanagementtable}
{
  \begin{columns}[t]
    \scriptsize
    \begin{column}{0.33\textwidth}
      \begin{table}
        \begin{tabular}{l|r}
   Edit type & Proportion \\ \hline
   Links          & 49.60\% \\
   Links only     & 35.53\% \\
   Hyperstruct.   & 61.65\% \\
   Content        & 17.81\% \\
   \hline Edit type & Ratio \\ \hline % over content
   Links          & 2.79 \\
   \alert{Links only}     & \alert{2.00} \\
   Hyperstruct.   & 3.46 \\
        \end{tabular}
        \caption{\scriptsize 0.01\% subset, Levenshtein}
      \end{table}
    \end{column}
    \begin{column}{0.33\textwidth}
      \begin{table}
        \begin{tabular}{l|r}
   Edit type & Proportion \\ \hline
   Links          & 49.60\% \\
   Links only     & 23.36\% \\
   Hyperstruct.   & 61.65\% \\
   Content        & 35.60\% \\
   \hline Edit type & Ratio \\ \hline
   Links          & 1.39 \\
   Links only     & 0.71 \\
   Hyperstruct.   & 1.73 \\
        \end{tabular}
        \caption{\scriptsize 0.01\% subset, Approximated}
      \end{table}
    \end{column}
    \begin{column}{0.33\textwidth}
      \begin{table}
        \begin{tabular}{l|r}
   Edit type & Proportion \\ \hline
   Links          & 49.56\% \\
   Links only     & 25.24\% \\
   Hyperstruct.   & 61.90\% \\
   Content        & 35.99\% \\
   \hline Edit type & Ratio \\ \hline
   Links          & 1.38 \\
   Links only     & 0.70 \\
   Hyperstruct.   & 1.72 \\
        \end{tabular}
        \caption{\scriptsize 0.04\% subset, Approximated}
      \end{table}
    \end{column}
  \end{columns}
}
%  \begin{center} \scriptsize Proportions of edits related to link management \end{center}
\begin{frame}{Link management I}
  \linkmanagementtable
  \begin{itemize}
  \item
    Ratios of hyperstructure edits over content edits.
  \item
    Results consistent between 0.01\% and 0.04\%, so use 0.01\% Lev.
  \end{itemize}
\end{frame}

\begin{frame}{Link management II}
  \linkmanagementtable
  \begin{itemize}
  \item
    Twice as many edits change \alert{just} links as change content.
  \item
    Most of these (81\%) are internal.
  \end{itemize}
\end{frame}

\newcommand{\editcattablepre}{
  Category & Registered & Unregistered & Total \\
  \hline
%  Abuse     &      0 &      0 &      0 \\
  List of   &  1,146 &    453 &  1,599 \\
  \alert{Revert}    &  4,069 &    679 &  \alert{4,748} \\
}
\newcommand{\editcattablepost}{
  Links     & 29,671 & 10,606 & 40,277 \\
  \alert{Hyperstruct.} & 38,358 & 11,701 & \alert{50,059} \\
  \hline
  Total     & 57,463 & 23,733 & 81,196
}
\begin{frame}{Edit category distribution I}
    \begin{table}
      \begin{tabular}{l|r|r|r}
\editcattablepre
  Category  &  6,121 &    954 &  7,075 \\
  URL link  &  5,548 &  2,977 &  8,525 \\
  Indexing  &  7,174 &  1,397 &  8,571 \\
  Template  &  7,992 &  1,330 &  9,322 \\
  Content   & 10,275 &  4,182 & 14,457 \\
  Minor     & 13,776 &  9,961 & 23,737 \\
  Link only & 20,969 &  7,877 & 28,846 \\
  Page link & 27,205 &  8,871 & 36,076 \\
\editcattablepost
      \end{tabular}
    \end{table}
\end{frame}

\begin{frame}{Edit category distribution II}
    \begin{table}
      \begin{tabular}{l|r|r|r}
\editcattablepre
\multicolumn{4}{c}{$\cdots$} \\
\editcattablepost
      \end{tabular}
    \end{table}
  \begin{itemize}
  \item
    Over 5\% reverts: keeping Wikipedia stationary.
  \item
    Over half of edits adjusted the hyperstructure.
  \end{itemize}
\end{frame}

% This was a nice idea, but even if I made it overwrite the .ptex file, it still
% wouldn't have worked: manually hacking the ptexen shows that not all of the
% graph (e.g. axe lines) scales with the value of \unitlength. Alas.
%\newcommand{\gnuplothack}{
%  % Set new scale for these GNUPlot pictures, and then neuter their power to change it
%  \setlength{\unitlength}{0.20pt}
%  \renewcommand{\setlength}[2]{}
%}

\begin{frame}{User edit counts}
  \begin{figure}
    \begin{center}
%      \gnuplothack
      \input{editsusersall-pres.ptex}
      \caption{User distribution over total number of edits made; 0.04\% subset}
    \end{center}
  \end{figure}
\end{frame}

\begin{frame}{User edit categories}
  \begin{figure}
    \begin{center}
      \input{editsuserscats-pres.ptex}
      \caption{\scriptsize User distribution over total number of edits made, by category; 0.04\% subset}
    \end{center}
  \end{figure}
\end{frame}

\begin{frame}{Edit magnitudes}
  \begin{figure}
    \begin{center}
      \input{editsmags-pres.ptex}
      \caption{Edit distribution over magnitude of edit; 0.01\% subset}
    \end{center}
  \end{figure}
\end{frame}

\begin{frame}{Limitations}
  \begin{itemize}
  \item
    Cannot reasonably detect some overheads automatically:
    \begin{itemize}
      \item Template substitution indistinguishable from adding markup.
      \item Same fix applied to multiple pages.
      \item Reverts further back than the immediately preceding version.
    \end{itemize}
  \end{itemize}
\end{frame}

\subsection{Conclusions}

\begin{frame}{Experiment}%{Procedure}
  \begin{block}{Hypothesis}
    Manual editing of link structure, of a type which richer hypertext features could automate, is a significant overhead versus changes to the text content.
  \end{block}
  \begin{itemize}
  \item
    Took random sample from English Wikipedia dataset.
  \item
    Processed edits into non-mutually-exclusive classes.
    \begin{itemize}
      \item Edits to the \alert{information content}.
      \item[] \emph{versus}
      \item Edits to the \alert{navigational structure}.
    \end{itemize}
  \item
    Compared editing effort expended on each class of edit.
  \end{itemize}
\end{frame}

\begin{frame}{Results}
  \begin{block}{Main observations}
    \begin{itemize}
    \item
      Twice as many edits changed links alone than content.
    \item
      10\% of edits maintained manual indexes of pages.
    \end{itemize}
  \end{block}
  \begin{itemize}
  \item
    Richer hypermedia features can automate some of this burden.
    \begin{itemize}
      \item Generic links can automate linking to articles.
%      \item Transclusion allows for better content re-use.
    \end{itemize}
  \item
    Semantic wiki features can also help.
    \begin{itemize}
      \item Lists can be generated by query on metadata.
    \end{itemize}
  \item
    Hyperstructure matters!
    \begin{itemize}
      \item It is a major part of editor activity.
      \item It is worth working on improving it.
    \end{itemize}
  \end{itemize}
\end{frame}

\subsection{Future}

\begin{frame}{Micro-scale experiment}
  \begin{itemize}
  \item
    This has been a macro-scale experiment.
  \item
    We are now finishing an experiment looking at the micro-scale.
    \begin{itemize}
      \item By what processes do editors make changes?
      \item Why do editors make changes?
      \item How can we prioritise improvements to support this?
    \end{itemize}
  \item
    Initial results have been promising. %confirm some `common knowledge'.
    %\begin{itemize}
    %  \item Deliberate creation of `broken' hyperstructure.
    %\end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}{Open Semantic Hyperwiki Model}
  \begin{itemize}
  \item
    Defines a wiki with open hypermedia features.
    \begin{itemize}
      \item First-class links, with edit-time embedding.
      \item Transclusion, including while editing.
      \item Generic and functional links.
      \item Parametric nodes and links.
      \item Full versioning, including links.
    \end{itemize}
  \item
    Defines how this operates as a semantic wiki.
    \begin{itemize}
      \item From hyperlinks to RDF relations.
    \end{itemize}
  \item
    Implementing in Weerkat: a highly flexible and modular wiki system.
    \begin{itemize}
      \item Orthogonal with regards to storage, accounts, markup, policy, rendering...
    \end{itemize}
  \end{itemize}
\end{frame}

%\begin{frame}{Weerkat}
%  \begin{itemize}
%  \item
%    Highly flexible and modular wiki system.
%  \item
%    Orthogonal with regards to:
%    \begin{itemize}
%      \item Storage.
%      \item User authentication and authorisation.
%      \item Markup.
%      \item Conflict resolution.
%      \item Rendering.
%    \end{itemize}
%  \item
%    Implementing the model.
%%  \item
%%    \toxo{architecture image} % Nah.
%  \end{itemize}
%\end{frame}

%\section*{Summary} % Blasted top-TOC thingy doesn't respect *-form
\appendix % This hides it for future frames

\begin{frame}{Summary}
  \begin{itemize}
  \item
    (Semantic) wikis are simple hypermedia systems.
  \item
    Analysis of edit type across large sample of Wikipedia: hyperstructure or content?
  \item
    Link editing alone is two times more common than content editing.
  \item
    We can improve this situation by applying the lessons of decades of hypermedia research to these new hypermedia systems.
  \end{itemize}
\end{frame}

%%\section<presentation>*{\appendixname}
%%\subsection<presentation>*{Bibliography}
%\begin{frame}[allowframebreaks]
%  \frametitle<presentation>{Bibliography}
%  \begin{thebibliography}{10}
%  \beamertemplatebookbibitems
%  % Start with overview books.
%  \bibitem{Author1990}
%    A.~Author.
%    \newblock {\em Handbook of Everything}.
%    \newblock Some Press, 1990.
%  \beamertemplatearticlebibitems
%  % Followed by interesting articles. Keep the list short. 
%  \bibitem{Someone2000}
%    S.~Someone.
%    \newblock On this and that.
%    \newblock {\em Journal of This and That}, 2(1):50--100,
%    2000.
%  \end{thebibliography}
%\end{frame}

\begin{frame}{Thanks for listening}
  Questions?
\end{frame}

%%%%% 'NORMAL' FRAME
\begin{comment}
\begin{frame}{}
  \begin{itemize}
  \item
    
  \end{itemize}
\end{frame}
\end{comment}

\end{document}

