I am currently trying to design a graph-based approach for content tagging. In principle I am trying to two two things:

  1. Use an algorithm such as Latent Dirichlet Allocation (LDA) or some variant of it to discover terms in documents that relate to a certain topic, thereby allowing me to tag a document as relating to that topic. None of the documents are labelled yet, so this step is entirely unsupervised

  2. Allow user feedback on whether the labels are correct. This firstly allows us to sharpen labels on specific documents (i.e. override the output from 1. if incorrect). And secondly, it allows us to use these user-defined labels in a semi-supervised learning algorithm, which might perform better than what is done in step 1 (though this part is out of scope for this question).

Step 1 I could represent with a simple graph as follows:

enter image description here

The LDA algorithm outputs the terms found in the document along with some weighting according to their frequency. In addition, it outputs a set of topics along with the terms that are associated with each topic (again, weighted according to how strongly the term is associated with the topic).

Now for point 2 I need to incorporate user feedback, so I need to link a user to a document to indicate that the user has read it and then link the user to the topic, indicating that the user believes the document is about that topic.

enter image description here

But this doesn't really work. "Document is_read_by User" correctly describes the relationship between the document and the user, but "User believes_document_related_to Topic" is not a valid relationship because it is contingent on a specific book - in this case 1984 by George Orwell.

My question is, how could I build this relationship with a graph? I.e for each user I want to be able to capture the following information.

  • According to User "Karl" the document "1984 by George Orwell" is about the topic "Surveillance"

(Of course, the idea is to allow multiple users to give feedback, thereby strengthening/weakening the relationship between the document and the topic).

  • $\begingroup$ a. I don't understand what you mean by "labels" in step 2. Where did those labels come from? You said you're working in an unsupervised setting, so you aren't given labels. And Step 1 doesn't appear to produce labels; it merely finds topics and a relationship between which words tend to be associated with which topics. $\endgroup$ – D.W. Jul 12 '17 at 21:50
  • $\begingroup$ b. In your picture, where did the "surveillance" description for the topic come from? All that LDA gives you is a topic, but it won't give you an English description like "surveillance". You won't be able to present a picture like that to the user; you can present a similar picture, but without the word "surveillance" in it. So how is the user supposed to give feedback (in step 2) about whether the document belongs to that topic or not? Seems impossible, as LDA doesn't produce anything you can use to define/describe the topic to the user. $\endgroup$ – D.W. Jul 12 '17 at 21:51
  • $\begingroup$ c. What is the difficulty? Rather than drawing an edge from Document -> user and an edge User -> Topic, just draw a single edge Document -> Topic labelled with "Karl". Done. Or, construct a separate graph. Actually, why does it even matter whether it is even represented as a graph or as something else? How will you use the results? I suspect there must be some requirements you haven't mentioned. What approaches have you considered, and why have you rejected them? $\endgroup$ – D.W. Jul 12 '17 at 21:53
  • $\begingroup$ a. & b. After revealing the topics (i.e. grouping of terms associated with an unknown topic) we need some step to map topics to a pre-defined set of labels. How exactly we'll do this isn't clear yet and is another complexity we need to solve - is probably out of scope for this question. But the idea is to do a manual / semi-automated mapping to labels and then to gather user feedback on whether the labels are correct. This could then be fed back into a Semi-Supervised LDA approach, though I have no experience with them and am not sure how well they work $\endgroup$ – Karl Jul 13 '17 at 6:06
  • $\begingroup$ c. We have a graph with information stored on every user and every interaction they've had. Essentially the idea is to connect this graph to the Document-Topic graph. For example, if Karl thinks "1984 by George Orwell" is about "Surveillance" I would want to know how strongly to count that opinion based on what I know about him -> maybe he is a English major, or maybe he has a lot of street cred, StackExchange style. $\endgroup$ – Karl Jul 13 '17 at 6:13

One way to express this as a graph is to draw an edge from the document (1984 by George Orwell) to the topic (Surveillance), labelled with the user who approved that relationship (e.g., the label might be: user_believes_doc_is_related_to: "Karl").

| cite | improve this answer | |
  • $\begingroup$ I guess this could work, but what I don't quite see is this: I have a node called "Karl" which has relationships with many other nodes, thereby allowing me to have rich information about "Karl" -> how would writing "Karl" as a label on the edge help me to connect to the node called "Karl"? I guess nothing prevents me from setting up a query that allows this, but it does feel like this isn't really what a graph should be used for $\endgroup$ – Karl Jul 13 '17 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.