<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>longform journalism</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Recommending Interesting Writing using a Controllable, Explanation-Aware Visual Interface</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Data Collection</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
          <xref ref-type="aff" rid="aff4">4</xref>
          <xref ref-type="aff" rid="aff5">5</xref>
          <xref ref-type="aff" rid="aff6">6</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Visual Interface</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
          <xref ref-type="aff" rid="aff4">4</xref>
          <xref ref-type="aff" rid="aff5">5</xref>
          <xref ref-type="aff" rid="aff6">6</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Human Evaluation</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
          <xref ref-type="aff" rid="aff4">4</xref>
          <xref ref-type="aff" rid="aff5">5</xref>
          <xref ref-type="aff" rid="aff6">6</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Author Keywords content-based recommendation</institution>
          ,
          <addr-line>open source, visual interface</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Gabriel Reder Stanford University</institution>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Jaan Altosaar Princeton University</institution>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>Jordan Olmstead The Browser</institution>
        </aff>
        <aff id="aff4">
          <label>4</label>
          <institution>Robert Cottrell The Browser</institution>
        </aff>
        <aff id="aff5">
          <label>5</label>
          <institution>Rohan Bansal The Browser</institution>
        </aff>
        <aff id="aff6">
          <label>6</label>
          <institution>Uri Bram The Browser</institution>
        </aff>
      </contrib-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>RankFromSets</p>
      <p>
        In building a recommender system to help editors sift through
many documents, it is motivating to highlight the trade-off in
user privacy intrinsic to recommender systems. A machine
learning model must exploit information about a user.
However, the incentive structures of operating a recommender
system within a business can influence decisions around privacy
and transparency [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. For example, business models that rely
      </p>
    </sec>
    <sec id="sec-2">
      <title>1https://the-browser.github.io/</title>
      <p>
        recommending-interesting-writing/
2https://github.com/the-browser/
recommending-interesting-writing
on online advertising may engender recommender systems
that upweight attention-grabbing content and hence time spent
looking at ads. Such content might maximize a user’s time
spent with a service over time at the expense of long-term
user experience or consent. In comparison, privacy-preserving
and open source tools such as the Signal encrypted messaging
service3 may provide improved user experience in terms of
privacy-preserving, transparent, and explainable algorithms
and visual interfaces [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. But the incentive structures for
releasing recommender systems and visual interfaces that exploit
private information about users are poor. There are few
examples of end-to-end, open source, free-to-deploy pipelines for
recommending content to users using a visual interface. This
motivates building and deploying a recommendation model
and corresponding explanation-aware visual interface to give
users control, and inform them about how data is being used
to make recommendations.
      </p>
      <p>
        We build an end-to-end recommender system visual
interface to address two aims: (1) to aid editors at The
Browser in their decision-making task, and give them
control through an explanation-aware interface, and (2) to release
a lightweight, performant, open-source visual interface
framework for explanation-aware recommender systems for
document recommendation. In an offline evaluation, we show that
the recommendation model we use for the visual interface
outperforms BERT, a competitive document classification model.
In a qualitative study, the control and explanations provided
by the visual interface help editors in their decision-making
and help find bugs in the recommendation model.
RECOMMENDATION MODEL
RANKFROMSETS (RFS) is the recommendation model that
powers the visual interface; the main part of the pipeline
illustrated in Figure 1. RFS scales to large numbers of articles, and
can maximize the evaluation metric of recall [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ]. Recall, or
the fraction of true positives returned by a recommendation
model, is an appropriate evaluation metric for recommending
interesting writing to editors at The Browser. A
recommendation model such as RFS can be readily backtested with recall
as an evaluation metric, as historical data contains positive
examples (articles selected by the editors) but rarely contains
      </p>
    </sec>
    <sec id="sec-3">
      <title>3https://signal.org/</title>
      <p>negative examples (articles seen but not selected by the
editors). Further, as our goal is to build an explanation-aware
visual interface that can also serve to control
recommendations, and RFS is fast, interpretable, and simple to integrate
into a user interface as we describe later.</p>
      <p>RFS is a recommendation model defined by a binary classifier.
For a user u and item m with attributes xm (the set of unique
words in an article), RFS is described by the probability of
yum = 1 (user u consuming item m):</p>
      <p>
        p(yum = 1 j u; m) = s ( f (u; xm)) ;
where s is the sigmoid function. To parameterize the binary
classifier in RFS, we use an inner product architecture:
In this architecture, the user embedding qu includes a
dimension that is fixed to unity. Word embeddings b j (including a
bias dimension for every word) and the publication
embedding are fit with maximum likelihood estimation, and negative
examples are sampled uniformly at random to balance positive
examples [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>VISUAL INTERFACE
The visual interface is designed with RFS as the backend
recommendation model. We describe how the inner product
architecture for RFS enables a visual interface that is interpretable
to provide explanations for why an item is recommended, and
enables control so users can filter recommendations to help
with decision-making.</p>
      <p>Explanation-aware recommendation The user embedding
qu and word embeddings b j in Equation (1) can be used to
interpret a recommendation. The logit for a given document
with a set of words xm is the sum of per-word logits, which
are computed as the inner product of the user embedding and
word embedding. The per-word contribution of a word in a
document to the logit that determines the document’s ranking
in a list of recommendations is
wu j = qu&gt;b j :
(2)
This weight wu j helps explain why a document was
recommended, using information about both the user u and the word
j. In the visual interface, words in a document are first sorted
by their contributions to a document’s logit wu j, and the top
words are displayed. Similarly, words that lower a document’s
ranking are also displayed, to inform a user of which words
detract from the recommendation of a document.</p>
      <p>
        Interface for controlling recommendations In a
decisionmaking task, a user such as an editor for The Browser may
wish to filter recommendations according to topics such as
crime, technology, or business. The recommendations output
by RFS can be controlled, by altering the per-word
contributions in Equation (2) according to whether a word is topical.
This is accomplished by first calculating words related to a
topic word using pre-trained word embeddings from BERT [
        <xref ref-type="bibr" rid="ref4 ref7">4,
7</xref>
        ]. Words related to a topic are defined by a heuristic: the
cosine similarity between all words and a topic word such
RANKFROMSETS
BERT
53.1
46.6
as ‘business’ are computed, and the top 15 words closest in
cosine distance are stored as topical words. Then, a slider in a
visual interface is used to increase or decrease the per-word
contributions of topical words to a document’s logit. Let the
user-input slider value be a, and the set of topical word
indices be T . Then the user-controlled version of Equation (1)
becomes
(3)
The sign function sgn( ) is applied to the per-word
contribution to a document’s logit. This is included since a word might
contribute negatively to a document’s logit, yet a user may
wish to increase the weight of a related topical word.
EVALUATION
We conduct an offline empirical study of the performance of
RANKFROMSETS to assess its performance as a
recommendation model. Then we qualitatively evaluate the visual interface
to study whether the explanation-aware, controllable interface
enabled by RFS can help make editors at The Browser make
better decisions.
      </p>
      <p>
        Data collection and preprocessing For positive examples,
we use the historical set of articles curated by editors at The
Browser. We augment the training data with articles selected
by the editors of other curation services, and treat all
positivelylabeled examples curated by editors as data from a single user
due to a paucity of data. We use articles from news websites as
examples with negative labels, and collect additional articles
with negative labels from websites most-featured by the editors
to mimic the editorial process of reading a large swath of
articles in a feed and distilling an article list to a select few.
For preprocessing the data we use the tokenizer released by
Devlin et al. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and discard words not recognized by the
tokenizer. This procedure results in a dictionary with 30k
words, and 646k datapoints with 27k positive labels.
Metrics Performance of the recommendation models is
assessed with recall, and 15% of the datapoints are held out for
the validation and test sets respectively.
      </p>
      <p>
        Experimental setup: RankFromSets We cross-validate
using the RMSProp optimizer [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] with a momentum of 0:9 and
grid search over learning rates of f10 2; 10 3; 10 4; 10 5g,
whether or not to initialize from pre-trained BERT
embeddings [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], and embedding sizes of f10; 25; 50; 100; 500; 1000g.
This model is trained on an NVIDIA Tesla P100 GPU.
Experimental setup: BERT To fine-tune BERT, we use the
AdamW optimizer with a linear learning rate scheduler and
The best-performing model of RFS is selected for deployment,
and recall is evaluated on the test set, after using early stopping
according to validation recall. The results are shown in Table 1,
and RFS outperforms BERT by 14%. Further, RFS achieves
better performance ten times faster than BERT, as shown in
Figure 3. In a test to measure the speed of recommending 104
held-out articles, RFS ranked all articles in 120 ms on a CPU,
while BERT took 4 m 54 s to rank the articles on an NVIDIA
Tesla V100 GPU. This represents a 2000-fold improvement in
speed, which is beneficial for the controllable visual interface
that requires Equation (3) to be quickly computed in response
to user input.
      </p>
      <p>Qualitative evaluation In a user study, editors at The
Browser provided feedback that they used the visual interface
to choose articles, and found this to be an improved workflow.
The control over recommendations, and explanation-aware
visual interface provided by RFS helped elicit bugs in data
collection (such as foreign language sources, or fiction writing)
and provides an enjoyable user experience.</p>
      <p>DEPLOYMENT
The visual interface is deployed on Github Pages, with the
backend, RFS, deployed as a microservice on Amazon Web
Services Lambda. Equation (3) is cheap to compute, so the
lambda function is a short python script that requires numpy
as a dependency, compared to BERT which would require a
hosted GPU solution. RFS recommends recent articles from
the editors’ reading list of feeds. As a proof of concept, we
include a tab for coronavirus-related articles that users can
search through using the sliders and Equation (3).
DISCUSSION
We built a visual interface for a recommender system powered
by RFS, a flexible recommendation model. Empirically, we
demonstrated that RFS outperforms BERT in an offline
evaluation, while being orders of magnitude faster during training
and recommendation. By deploying RFS to AWS Lambda and
hosting the visual interface on Github Pages, we demonstrated
a fully open-source pipeline for creating an explanation-aware,
controllable visual interface for document recommendation
for editorial decision-making. Future work includes studying
whether the transparency and control provided by open-source
recommendation systems can improve user experience and
inform users as to how recommendation models influence
attention online.</p>
      <p>Acknowledgments
The authors are grateful to Christian Bjartli for help with data
collection.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Jaan</given-names>
            <surname>Altosaar</surname>
          </string-name>
          . “
          <article-title>Probabilistic Modeling of Structure in Science: Statistical Physics to Recommender Systems”</article-title>
          .
          <source>PhD thesis</source>
          . Princeton University,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Jaan</given-names>
            <surname>Altosaar</surname>
          </string-name>
          , Wesley Tansey, and Rajesh Ranganath. “
          <article-title>RankFromSets: Scalable Set Recommendation with Optimal Recall”</article-title>
          .
          <source>In: American Statistical Association Symposium on Data Science &amp; Statistics (</source>
          <year>2020</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>K.</given-names>
            <surname>Cohn-Gordon</surname>
          </string-name>
          et al. “
          <article-title>A Formal Security Analysis of the Signal Messaging Protocol”</article-title>
          .
          <source>In: 2017 IEEE European Symposium on Security and Privacy (EuroS P)</source>
          .
          <year>2017</year>
          , pp.
          <fpage>451</fpage>
          -
          <lpage>466</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Jacob</given-names>
            <surname>Devlin</surname>
          </string-name>
          et al. “
          <article-title>BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding”</article-title>
          . In:
          <article-title>Association for Computational Linguistics</article-title>
          . Minneapolis, Minnesota: Association for Computational Linguistics,
          <year>June 2019</year>
          , pp.
          <fpage>4171</fpage>
          -
          <lpage>4186</lpage>
          . DOI:
          <volume>10</volume>
          .18653/v1/
          <fpage>N19</fpage>
          -1423. URL: https://www.aclweb.org/anthology/N19-1423.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Nicholas</given-names>
            <surname>Diakopoulos</surname>
          </string-name>
          .
          <article-title>“Oxford Handbook of Ethics and AI”</article-title>
          . In: ed. by Markus Dubber, Frank Pasquale, and
          <string-name>
            <surname>Sunit Das</surname>
          </string-name>
          . Oxford University Press,
          <year>2020</year>
          . Chap. Accountability, Transparency, and Algorithms.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Tijmen</given-names>
            <surname>Tieleman</surname>
          </string-name>
          and
          <string-name>
            <given-names>Geoffrey</given-names>
            <surname>Hinton</surname>
          </string-name>
          .
          <source>“Lecture 6</source>
          .5
          <article-title>- rmsprop: Divide the gradient by a running average of its recent magnitude.” In: COURSERA: Neural Networks for Machine Learning (</article-title>
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Thomas</given-names>
            <surname>Wolf</surname>
          </string-name>
          et al. “
          <article-title>HuggingFace's Transformers: Stateof-the-art Natural Language Processing”</article-title>
          . In: ArXiv abs/
          <year>1910</year>
          .03771 (
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>