Elamur Research

Methods for Computing Legal Document Similarity: A Comparative Study

Paper · 2020 · Paheli Bhattacharya, Kripabandhu Ghosh, Arindam Pal et al.

Summary

Finding useful precedents begins with a difficult question. Two judgments may examine similar facts and reach different decisions, or they may reach similar conclusions by relying on different authorities. A search based on the words of a judgment and a search based on its citations can therefore suggest different cases. The authors compare these approaches on the same set of 47 pairs of Supreme Court of India judgments. Legal experts assigned each pair a similarity score on a scale of 0-10. The authors use Pearson correlation to measure how closely the scores from each method vary with those human judgments.

The citation methods range from counting shared precedents to learning a numerical representation of each case from its position in the citation network. The latter approach, using Node2Vec, gives the strongest result among the citation methods tested on a graph with 53,210 nodes and 208,921 edges. On the text side, the strongest standalone approach uses Doc2Vec to represent each judgment in full. A second approach divides the judgments by rhetorical role, compares like with like, and takes the highest of the resulting scores. Its performance is close to that of the whole-judgment approach. Among the reported role-level comparisons, the reasoning behind the decision has the highest correlation with expert scores, at 0.45, followed by discussion of precedents at 0.42 and facts at 0.37.

Combining the two sources of evidence improves agreement with the experts in the study. For full judgments, the strongest combination takes the larger of the whole-text score and a score based on the precedents both cases cite. When the text is compared by rhetorical role, the strongest combination averages the thematic score and the Node2Vec score. The choice of aggregation matters because a maximum lets one source carry a pair, while an average gives both sources influence over its score. The findings suggest that text and citations capture different aspects of legal similarity. They establish agreement on the annotated pairs under the study’s evaluation measure. The question of how well that agreement carries over to a practitioner’s search through a collection of cases remains open.

Deep dive: Methods for Computing Legal Document Similarity: A Comparative Study

The study compares how well citation networks, judgment text and a combination of both reproduce expert judgments of legal case similarity. · about 37 minutes to read

The problem and its context

Similar in what respect?

A lawyer looking for a relevant judgment needs to decide what kind of resemblance matters for the case at hand. The paper situates this problem in common-law systems, where established laws and earlier decisions both inform legal reasoning. When a practitioner consults an earlier decision, the aim may be to see how a court treated comparable circumstances or to understand the reasoning that could apply to the present dispute. A legal researcher may search for related cases to learn how an area of law has been treated. In either setting, the growing body of material available on the web makes it harder to decide what deserves a close reading. That is the practical problem behind the paper’s investigation of information retrieval and search.

The paper studies a narrower task than searching a whole collection. Given a pair of legal judgments, a method assigns a score intended to reflect how similar the pair is. Such a score could help decide which candidates to show in a search. By itself, it says little about what the searcher should do with them. For example, a judgment can be worth consulting precisely because it treats a familiar issue differently. The comparison may be useful even if the two cases have different outcomes. This makes the pair score an important quantity to study in its own right. It also places a limit on what success at predicting that score can establish about an actual search.

Several parts of a judgment can support a judgment of resemblance. The facts describe what brought the matter before a court. The arguments record positions advanced in the dispute. The ratio, or reasoning on which the decision rests, gives grounds for the court’s conclusion. Statutes and earlier decisions supply legal material for that reasoning. A ruling states what the court decided. A pair could agree closely in one of these respects while differing substantially in others. Imagine two opinions discussing comparable events but addressing different arguments. Similarity of facts would be a reason to compare the opinions, while similarity of arguments would offer little support. A single number supplied by an expert can reflect a judgment about the relative significance of these dimensions.

The authors consequently use the opinions of legal experts to define the target for the experiment. This gives the comparison an observable standard. Every method can be asked to score the same pair, and its scores can be assessed against the same human ratings. The standard still depends on how the experts interpreted the task. A score records the strength of the resemblance they saw. It does not record, for example, whether they put particular weight on a shared principle, a critical fact, or an authority cited in both opinions. The distinction between reproducing an expert’s score and explaining its grounds runs through the study’s treatment of semantic similarity.

The evidence earlier methods used

Earlier work described in the paper approached case similarity from the citation network or from the text. The citation approach starts with an observable relation between decisions. When the text of one judgment cites another, the network records a link from the citing case to the cited case. A pair that draws on common authorities may have something in common even if the opinions use very different language. The relationship can also be examined from the other direction. If other judgments cite both members of a pair, the two may be used in related contexts. Outgoing and incoming links give different accounts of where the resemblance might come from.

The earlier citation methods attributed significance to different parts of that network. Bibliographic coupling pays attention to cases that both members cite. Co-citation pays attention to cases that cite both members. A method called dispersion was adapted to examine the relationship among cases in the relevant citation neighborhoods. Each choice implies a different reading of the same graph. Following outgoing links emphasizes the authorities used in the two judgments. Following incoming links emphasizes how the judgments are used by other opinions. Looking at the neighbors’ relationships introduces a further question about how those authorities are situated in the network.

Textual approaches start from the language of the documents. The paper cites work on matching contract clauses with legal commentary in tenancy law as an example of how the textual approach had been used in legal documents. For case judgments, earlier work also compared passages. It built links between paragraphs whose text was sufficiently similar and used their pattern of links to derive a score at the level of entire documents. This is a graph computation in its final steps, but the links come from the words of paragraphs. The authors therefore treat it as a method based on text. A precedent citation graph and a paragraph graph can have similar mathematical forms while representing different events.

The authors’ earlier experiments on case judgments also considered what material should stand for a case. Possibilities included the entire judgment, a shorter account, and text concerned with why an earlier judgment was cited. They compared approaches that weight terms or use representations of topics, words, or documents. This history matters because a comparison between citation and text can turn on which text is selected. Using the full opinion preserves the different kinds of material that appear in it. Restricting attention to a passage can bring a particular aspect into focus. Which choice will help depends on how closely the selected material matches what an expert thinks makes the cases alike.

Those strands of work left a comparison problem. As the paper describes it, earlier studies often selected their own collections or evaluation examples. A method that looks good on one collection may be confronted with different legal issues, patterns of citation, or standards of relevance when evaluated elsewhere. Reported performance from those studies could therefore reflect the choice of cases and judgments about them as well as the merits of the scoring procedure. Repeating earlier approaches on a common set of rated pairs allows scores to be interpreted against a shared standard. That is the central design choice in the paper’s use of evaluation and benchmarks.

What the study adds to the comparison

The study broadens the question within each family of methods. On the citation side, the authors ask what can be learned from the arrangement of a case’s neighborhood, beyond a count of shared links. Two opinions may cite distinct cases situated in nearby parts of the network. A representation learned from the graph can give those opinions similar numerical descriptions even when a rule that requires the same cited case would detect no overlap. The graph still supplies the evidence. The change lies in what the scoring method can use from it.

On the text side, the authors ask whether retaining the different functions of a judgment helps explain its resemblance to another. The judgments in their study lack systematic section headings that would reliably identify those functions. Their solution uses an earlier automatic segmentation procedure to supply the distinctions. A facts comparison can then use factual material from each opinion, while a comparison of reasoning can use the corresponding reasoning from each. The resulting scores allow the authors to ask whether the strongest resemblance anywhere in the opinion is more informative than the typical resemblance across roles.

Finally, the authors examine how text and citation evidence could contribute to a common score. The two sources are connected. A judgment’s citations are drawn from its text, and a whole-text representation can include passages discussing cited cases. They are also processed differently. In one branch the relationship becomes an edge to another judgment, while in the other it remains part of the written opinion. A combination can benefit from those different representations even though they originate in the same documents. The question is whether the combined scores agree more closely with expert ratings than the scores from either source used separately.

The method, step by step

From judgments to comparable scores

From Westlaw India, the authors draw on the complete, publicly available texts of judgments issued by India’s Supreme Court. They state that proprietary material was removed before the experiments. The judgment texts support both sides of the study. For the citation methods, the texts supply the evidence that one case cites another. For the textual methods, they supply the material compared as paragraphs, full documents, or passages with a particular function. Expert ratings come from a separate evaluation resource introduced in earlier work and reused in a previous study by the authors.

The unit of prediction is a pair of judgments. The citation branch represents each judgment by its links or by a numerical vector learned from the graph. The text branch represents what the judgment says at an appropriate level of detail. Each branch produces a score for the pair. The authors also create scores that combine evidence across branches. Once the scores are available for all the evaluation pairs, they compare each set of scores to the experts’ ratings. The flow covers the shared study design. Its alternatives are ways to produce scores for the same pairs.

How judgments become similarity scores

The steps in order.

How judgments become similarity scoresStep 1: Collect public judgment texts1. Collect public judgment textsStep 2: Build the directed case citation graph2. Build the directed case citation graphStep 3: Prepare paragraph, whole-text, and thematic comparisons3. Prepare paragraph, whole-text, and thematic comparisonsStep 4: Score the same expert-rated judgment pairs4. Score the same expert-rated judgment pairsStep 5: Combine selected citation and text scores5. Combine selected citation and text scoresStep 6: Correlate each method’s scores with expert ratings6. Correlate each method’s scores with expert ratings

The distinction between the collection and the rated pairs matters at this stage. A graph representation can use structure involving cases beyond the pair under consideration. A document representation can be learned from judgments beyond the rated ones. The expert ratings then supply a common basis for assessment. In the full-text procedure, the authors expressly exclude evaluation judgments from Doc2Vec training and infer their vectors afterwards. The citation procedure is described as learning from the constructed network. The paper does not describe an equivalent graph holdout for the evaluation judgments.

Recording who cites whom

To build the citation graph, the authors make each judgment a node, meaning a point in the network. An edge is a link between nodes. The edge is directed because citing another judgment and being cited by it are different events. If case A cites case E, the edge points from A to E. From A’s perspective it is outgoing. From E’s perspective it is incoming. The graph therefore makes it possible to ask separately which authorities a judgment uses and which other judgments refer to it.

The direction has substantive consequences for interpreting a score. Suppose the comparison concerns cases A and B. An outgoing neighbor shared by A and B is a judgment cited in both opinions. An incoming neighbor shared by A and B is a judgment that cites both opinions. The former suggests that the opinions draw on the same legal material. The latter suggests that other judgments bring them into some common context. Neither relationship, on its own, explains the reason for the citation. A citation provides a connection in the graph, while its purpose remains a question about the surrounding text.

The methods also differ in how directly they depend on individual edges. Bibliographic coupling and co-citation can be worked out from the relevant neighbor sets of the two judgments. Dispersion takes relations among neighbors into account. Node2Vec derives numerical representations in the wider graph and compares those representations. This separates methods that need literal overlap to register a connection from methods that can reflect a broader resemblance in network position.

Counting common authorities

Bibliographic coupling starts by listing the authorities cited in each of the two judgments. Each list is treated as a set, so the comparison concerns distinct cases. Find the intersection, meaning the elements the sets have in common. Its size is the raw coupling count. The paper then normalizes by the union, meaning the distinct cases that appear in either set. This makes a shared authority’s contribution depend on the size of the combined citation set. The same raw count can represent close correspondence between short lists or limited overlap between longer ones.

sim(A, B) = |Aₒᵤₜ ∩ Bₒᵤₜ|

Here, A and B are the judgments being compared. The function sim assigns their raw similarity score, and the equals sign identifies that score with the expression on the right. Aₒᵤₜ and Bₒᵤₜ are the sets of judgments cited by A and B. The intersection sign ∩ selects judgments appearing in both sets. The vertical bars count the elements of the resulting set.

normalized coupling(A, B) = |Aₒᵤₜ ∩ Bₒᵤₜ| / |Aₒᵤₜ ∪ Bₒᵤₜ|

The function normalized coupling gives the reported kind of outgoing-overlap score after scaling. A and B are again the judgments being scored, and the equals sign gives the calculation. Aₒᵤₜ and Bₒᵤₜ are their outgoing citation sets. The numerator uses ∩ to select their shared citations. The denominator uses ∪ to collect all distinct citations in either set. The bars count the members of each set, and the slash divides the shared count by the combined count.

The authors illustrate this with A citing C, D and E, and B citing C, D and F. C and D occur in both sets, producing a raw count of 2. Across the two sets, the distinct cited judgments are C, D, E and F, so the denominator is 4. This example shows how the normalization uses both the common material and the breadth of the lists. E and F matter because they increase the combined set, even though neither increases the intersection. The evidence for a high score is strongest when common authorities account for much of what the opinions cite.

There is a further distinction between sharing a citation and citing it for the same reason. The formula gives C and D the same treatment as shared elements. It has no place to record which passages discuss them or what the opinions say about them. If both judgments mention C, the method treats that as a shared citation even when the opinions use C differently. This is an implication of the input and the calculation. It explains why the score is readily traced to individual authorities and why a reader deciding how to use those authorities still needs the text.

Looking in the other direction

Co-citation uses the same set operations with incoming links. For A, collect the judgments that cite A. For B, collect the judgments that cite B. A case contributes to the intersection when it refers to both. Normalizing the count by the union answers how much the two groups of citing cases overlap. Here the evidence belongs to the other judgments that brought A and B into their citation lists.

sim(A, B) = |Aᵢₙ ∩ Bᵢₙ|

A and B are the judgments under comparison. The function sim refers here to their raw co-citation score, with the equals sign specifying how to obtain it. Aᵢₙ contains the cases citing A, and Bᵢₙ contains the cases citing B. The intersection operator ∩ retains cases that cite both. The bars give the number of cases retained.

normalized co-citation(A, B) = |Aᵢₙ ∩ Bᵢₙ| / |Aᵢₙ ∪ Bᵢₙ|

The function normalized co-citation gives the scaled incoming-overlap score for A and B, the two target judgments. The equals sign assigns the arithmetic expression to that score. Aᵢₙ and Bᵢₙ are their sets of incoming neighbors. The sign ∩ identifies the shared citing cases, and ∪ identifies all distinct cases that cite either judgment. The bars give the sizes of those sets. The slash divides the shared count by the total distinct count.

In the running example, C and D cite A, and C and F cite B. C alone cites both, so the raw count is 1. The union consists of C, D and F, making 3 the normalization denominator. The contrast with outgoing overlap can be read directly from the example. C and D are shared authorities in the outgoing comparison, while only C brings the two target judgments together in the incoming comparison. Changing the edge direction changes the event that qualifies as evidence, even though the procedure for counting overlap stays the same.

Using the wider citation neighborhood

Dispersion incorporates information about how the cases in the citation neighborhood relate to one another. The paper traces the measure to work on identifying relationships in a social network and describes its adaptation to legal citations in terms of neighboring cases belonging to a common community or cluster. In this context the neighbors of interest are cases reached by outgoing citations. The authors use the NetworkX implementation. Their account gives the intuition and identifies the implementation, leaving the calculation itself to that implementation.

Node2Vec offers a different way to make use of the network. An embedding is a numerical representation that places an item in a space of vectors. A vector can be thought of as a list of coordinates. In this branch, the items are judgments and the relationships used to learn their coordinates are citation links. The graph is homogeneous in the sense that its nodes all represent the same kind of item. Node2Vec aims to place cases with similar network neighborhoods in similar positions in the representation space.

Once the cases have vectors, the authors use cosine similarity. The computation compares the vectors’ directions. The dot product measures alignment with magnitude still included. Dividing by the product of the two vector lengths removes that magnitude from the comparison. This makes the score reflect the direction of the representations learned for the two judgments.

sim(A, B) = (A⃗ · B⃗) / (‖A⃗‖ ‖B⃗‖)

A and B are the judgments being compared, and sim is their similarity score. The equals sign identifies the score with the ratio on its right. A⃗ and B⃗ are their vector representations, with the arrow over each letter indicating a vector. The centered dot is the dot product. Each pair of double bars gives the length, or norm, of the enclosed vector. Putting the two lengths next to each other in the denominator indicates multiplication. The slash divides the dot product by that product.

This procedure gives a different kind of answer from the overlap counts. It can assign similar representations to cases with similar neighborhoods even when a comparison of the two immediate citation lists does not provide strong evidence of a match. Its result is also less directly attributable to a particular case. A reader can inspect a bibliographic coupling score and list the authorities it counted. A cosine score reflects the relationship between learned vectors. The normalizing calculation explains how the vectors were compared, while the significance of their coordinates comes from the way the graph representation was learned.

Paragraph Links begins with the wording of the judgments and builds a graph from that wording. Each node is a paragraph. The comparison uses term frequency and inverse document frequency, a weighting scheme that gives a term influence according to its frequency in the material being represented and its distribution across the collection. When the resulting comparison of two paragraphs passes a threshold, the method connects them. The threshold determines which text comparisons become edges in the graph. The paper calls the weighting scheme TF-IDF.

After building the paragraph graph, the method uses bibliographic coupling on that graph to obtain a similarity for two documents. The underlying notion is overlap in paragraph links. A link here means that the text comparison met a condition. In the citation graph, a link meant that a judgment referred to another judgment. The same broad idea of counting shared connections can therefore work with either textual or citation evidence, depending on how those connections are constructed.

The shift to paragraphs changes what can contribute to the score. A corresponding passage can be identified within a long opinion even if other passages concern different matters. The threshold also gives this approach a distinct dependence on local comparisons. A pair of paragraphs just below the threshold supplies no link, while a comparison that passes it can enter the graph. Any effect of that decision on judgment similarity travels through the later coupling step. The paper describes the threshold rule without specifying a threshold value in its account of the method.

Representing the judgment in full

FullText Similarity treats the whole judgment as the unit represented by a vector. Doc2Vec supplies the representation, which is intended to place documents with similar content near one another in the vector space. This allows the comparison to use similarities captured by the learned representations in addition to explicitly matching words. The authors chose it on the basis of their earlier comparison of ways to represent a judgment and ways to score the resulting representations. The method draws on Distributed Representations of Sentences and Documents.

The procedure separates learning from inference for the evaluation judgments. First, Doc2Vec is trained on a collection of Supreme Court of India opinions with the documents in the rated pairs excluded. Then the learned procedure is used to infer a vector for each evaluation judgment from its text. Finally, the authors compare the vectors for each pair using the same cosine operation as in the citation embedding approach. In the citation branch the coordinates are learned from relationships among cases. In the full-text branch they represent the content of the judgments.

There is an inconsistency in the description of the corpus size. The dataset section reports 53,210 collected judgments. The full-text method refers to 53,201 documents when describing the collection from which the evaluation judgments are excluded. Neither figure establishes an exact post-exclusion training count. The point the authors state clearly is which judgments are withheld in the full-text procedure. Their discussion of the results also says that the Doc2Vec training material differs from that in their previous study on the same evaluation pairs.

A whole-judgment vector gives the rest of the comparison a common input size and a common unit of meaning. It also asks one representation to accommodate several kinds of material. Consider a pair that presents closely related legal reasoning in opinions with different factual histories. The whole-text similarity reflects the opinions together with those different histories. How much weight the overlap in reasoning has within the score depends on the learned representations. The thematic method makes that single aspect available for a separate comparison.

Comparing the same rhetorical roles

Thematic Similarity starts by identifying what portions of a judgment are doing. The paper uses an earlier automatic method developed for Indian Supreme Court judgments. The authors describe its previous evaluation as covering 7 roles and 5 legal domains. The roles include facts and arguments, the ratio of the decision, material about statutes and precedents, and the rulings of the lower and present courts. The earlier segmentation implementation is publicly available. In this study it supplies the divisions needed for computing the similarity scores.

The roles separate legal function from subject matter. A passage reporting the ruling below and a passage recording the present court’s decision could discuss the same dispute in similar language. Their functions remain different. A facts passage describes circumstances, while a passage of reasoning can explain why a circumstance matters legally. Dividing the opinion by function gives the comparison a way to line up material that plays the same part in both judgments. The paper relies on automatic segmentation because the opinions lack systematic headings that would make this alignment straightforward.

After labeling the segments, the authors compare matching roles across the pair. Facts are compared with facts, arguments with arguments, and the ratio of one decision with the ratio of the other. Each corresponding-role comparison contributes a similarity value. The paper explains the matching rule and the aggregation choices. It gives much less detail about the scoring operation within a role than it gives about the cosine calculation for whole texts. The account consequently establishes the design of the thematic comparison more clearly than the details needed to reconstruct each role score.

The authors use a maximum and an average to turn the role scores into an overall similarity. A maximum retains the strongest match. An average reflects the similarities across the roles that go into the aggregation. For example, a pair with close factual circumstances and different arguments could receive substantial support from facts under the maximum. Under the average, differences in arguments and other compared roles would also influence the overall result. This is a meaningful choice even if both computations begin with the same segmentation and the same role-level similarities.

The identity of the strongest role can also change with the pair. A maximum can be driven by facts for one pair and by the ratio for another. The method itself picks the highest score separately for the judgments being compared. That differs from choosing a role in advance for all comparisons. A role-level correlation measures whether that particular role gives useful scores across the set of pairs. The maximum uses any role that supplies the strongest score on a particular comparison. The study’s role-level analysis and its aggregate analysis therefore address different questions.

Combining evidence from text and citations

The authors combine selected textual and citation scores after each method has already assigned a similarity to the pair. The text score comes from the full judgment or from thematic comparisons. The other score comes from a method applied to the citation graph. The maximum and the average now combine sources of evidence. They operate at a different stage from the aggregation across roles inside Thematic Similarity.

max(s₁, s₂)

Here, s₁ is the similarity assigned by a citation method and s₂ is the similarity assigned by a textual method for the same pair. The subscripts distinguish the two inputs. The name max denotes the operation that selects the larger input, with the comma separating the arguments and the parentheses enclosing them. When the scores are equal, the common value is also their maximum.

(1/2)(s₁ + s₂)

The symbols s₁ and s₂ again denote the citation and text scores of the pair. The subscripts identify their sources. The plus sign adds them, and the enclosing parentheses group the sum. The fraction 1/2 is the multiplier that gives both inputs equal numerical weight. Writing the multiplier next to the grouped sum indicates multiplication.

A maximum is responsive to a high value from either source. An average incorporates a lower value from one source even when the other is high. These descriptions refer to the actual numerical inputs. A score that tends to take larger values can have more influence under a maximum, and different spreads can affect how much two sources influence an average. The paper defines these as direct score combinations and evaluates the outputs empirically. It does not describe an additional calibration step before the two values are combined.

Experiments and results

What is evaluated

The collection described in the dataset section contains 53,210 Supreme Court of India judgments. Its citation graph has 53,210 nodes and 208,921 directed edges. Those are the sizes of the available graph, rather than counts of examples with expert ratings. The evaluation uses 47 document pairs. For each pair, legal experts supply a score on the 0-10 scale. A score of 0 denotes a pair judged dissimilar, while 10 is the top of the similarity scale. Every reported comparison uses those same pairs and their expert scores.

This setup makes the basic unit of assessment clear. The experiment does not compare a prediction about a single case with an expert’s opinion of that case. It compares how a method and the experts score a collection of pairs. One judgment could be similar to one counterpart and dissimilar to another. The score has meaning as a property of the pairing. The amount of material available to learn a representation and the amount of human evidence available to assess it are consequently very different aspects of the design.

The primary measure is Pearson correlation between the list of scores from a method and the list of expert ratings. Pearson correlation measures linear association. If a method tends to give relatively high scores to pairs the experts also rate highly, and relatively low scores to pairs the experts rate lower, that tendency can produce a positive coefficient. The measure can be used even when the outputs of the methods have different numerical units from the human ratings. Citation overlap, cosine similarity and expert ratings each enter the evaluation as a list of values for the same pairs.

The coefficient should be read as a result for the set of pairs. It is not an estimate of the fraction of cases handled correctly, and it does not say how far an individual score is from a rating on the experts’ scale. One method could produce values that are consistently shifted or rescaled relative to the ratings and still show strong linear agreement. The paper illustrates its evaluation with a sample in which scores from individual methods are placed beside expert scores. The aggregate comparison, however, is based on correlation across all the pairs. Closeness on an individual example and association across the set answer different questions.

Standalone citation and text comparisons

The established citation baselines are bibliographic coupling, co-citation and dispersion. They allow the authors to compare the new use of Node2Vec with methods that rely on explicit neighbor sets or relations among neighbors. For text, Paragraph Links and the Doc2Vec full-text procedure provide earlier points of comparison for the new thematic approach. Because they are evaluated against the same ratings, differences in their performance cannot be explained by the methods having received different sets of evaluation pairs.

Node2Vec has the highest Pearson correlation among the citation methods. The authors describe co-citation and dispersion as performing poorly in the sparse network. Their explanation draws attention to the few citations available for each judgment. When a score depends on shared links, useful evidence can be scarce even though the network as a whole contains many cases. A method that represents a case from its neighborhood can use relationships beyond the common entries in a pair of lists. The reported ordering is consistent with that explanation. The experiment examines the methods on the graph as assembled.

Doc2Vec applied to the entire judgment gives the highest correlation among the standalone textual methods. The authors note that its Pearson coefficient differs slightly from the result of their earlier study using the same evaluation set. They attribute the difference to the change in Doc2Vec training data. Thus the name of the representation method and the identity of the evaluation pairs are insufficient to fix the expected result. The collection used to learn the representations is part of the experimental setting.

Thematic Similarity with maximum aggregation is close to the full-text result. This makes the thematic approach competitive when the best match among roles is allowed to determine the overall score. It also shows that a useful text score can be produced by aligning just the material that serves a given function and then looking across those comparisons. The result for the full judgment still leads the standalone text comparison. The two approaches obtain their evidence from the same general kind of material and organize it at different levels of detail.

What the role scores say

The paper gives numerical results for the ratio, precedent and fact comparisons. On the 47 rated pairs, similarity in the ratio, the reasoning supporting the decision, has a Pearson correlation of 0.45 with expert ratings. The precedent role has a correlation of 0.42, and the fact role has 0.37. These are coefficients for role-level similarities compared directly with the overall human score. They are different from the coefficient for maximum thematic aggregation, where any compared role can determine the score for a pair.

Pearson correlation by thematic role on the expert-rated Supreme Court of India pairs

The ratio comparison aligns most closely with expert ratings among the roles with reported coefficients.

Pearson correlation by thematic role on the expert-rated Supreme Court of India pairsRatio (this paper): 0.45Ratio (this paper)0.45Precedent: 0.42Precedent0.42Fact: 0.37Fact0.37
The numbers
System or settingPearson correlation
Ratio (this paper)0.45
Precedent0.42
Fact0.37

The distinction between the precedent role and a citation-network score is important here. In the role comparison, the inputs are parts of the judgments concerned with earlier cases. The graph, in contrast, represents a reference as a link to a case. Two discussions of precedents can be textually similar even if their citation sets differ. A pair can also have shared cited cases while the discussions of those cases differ. The coefficient for the precedent role measures the first kind of evidence as processed by the thematic method. It should be interpreted separately from the graph results.

Similarly, the fact score does not measure the accuracy of the system’s identification of factual passages. It measures the association between similarity scores from the identified material and the experts’ judgments of overall similarity. A lower correlation for one role could have several explanations compatible with that result. The role might carry less information about the experts’ overall rating, the passages might have been harder to identify, or the representation might capture their similarities less effectively. The reported coefficients establish the ordering among the named roles under the study’s procedure. The paper leaves a detailed account of the role results for reasons of space.

What combining the scores changes

The authors test full-text and thematic scores in combination with the citation methods. For combinations involving FullText Similarity, taking the maximum generally works well in the reported comparison. The strongest result in that group takes the maximum of FullText Similarity and bibliographic coupling. Bibliographic coupling supplies direct evidence from shared outgoing citations, while FullText Similarity supplies evidence from the opinion as a whole. Under the maximum, either can determine a particular pair’s final value.

For the combinations using Thematic Similarity, the strongest reported result comes from averaging the thematic score with Node2Vec. The thematic component comes from comparing corresponding material in the opinions. Node2Vec contributes information from the structure of their citation neighborhoods. In this combination both scores influence the resulting value for every pair. The aggregation rule used inside the thematic procedure is a separate issue from this average across the text and graph scores.

The authors report that combining the evidence improves correlation over using a single family of methods. The discussion identifies the leading standalone methods and the leading combinations by their relative performance. The exact coefficients stated in the discussion are the role-level ones shown above. As a result, the established comparison for the leading combinations is directional. A gain in correlation is reported, with a different pairing and aggregation rule leading for each kind of textual score. Its numerical size cannot be inferred from the coefficients of ratio, precedent and fact.

Bibliographic coupling’s place in the strongest full-text combination is especially informative when read alongside Node2Vec’s lead among standalone citation methods. A useful partner for a whole-text score need not be the strongest graph score when evaluated by itself. The pair-level judgments on which it supplies strong evidence matter to the combined result. The final correlation depends on where the combined scores fall across all the pairs. A method’s own correlation summarizes its overall relationship to the ratings and does not describe how its strengths line up with those of another method.

What the ablations show

Changing the citation representation

The paper presents controlled comparisons of scoring methods and aggregation rules. It does not report a component-removal ablation inside a single learned representation. One useful comparison keeps the citation graph and expert-rated pairs fixed while changing how the graph is used. Outgoing overlaps, incoming overlaps, relations among neighbors and learned graphical representations assess different properties of the same network. Node2Vec’s lead within that comparison shows that a representation learned from the network gave better agreement with the ratings than the other tested citation treatments.

The authors relate the result to citation sparsity. An overlap count has limited ability to distinguish between pairs if their citation lists rarely contain common cases. In the same situation a broader view of the neighborhood can still offer information about where the cases sit in the graph. This is an explanation consistent with the result and with the way the methods use edges. The comparison does not manipulate sparsity. It cannot by itself separate the effect of sparsity from other differences between the methods, such as the type of information available in a learned representation. A result on the assembled graph supports a preference within that experiment.

Co-citation and bibliographic coupling also clarify what a change of edge direction means. Reversing the viewpoint shifts attention from authorities used by the two cases to later use of the two cases in other judgments. Even if both methods normalize overlap in the same way, they may emphasize different pairs. The best tested full-text combination uses bibliographic coupling. That singles out shared outgoing authorities as useful in that particular combination. It leaves open whether another collection or evaluation centered on the subsequent use of judgments would give the same relative advantage.

Changing what the text comparison retains

FullText Similarity and Thematic Similarity differ in the parts of the material that can contribute directly to their scores. A whole judgment is represented together. A thematic comparison treats corresponding roles separately and aggregates the results. Their relative performance shows that the partition can retain much of the usefulness of a full-text comparison when its strongest role match is used. Because the methods differ in multiple parts of their scoring pipelines, the comparison cannot quantify a separate causal effect of adding accurate role labels. It establishes how the tested procedures perform as a whole.

The maximum and average within Thematic Similarity make a narrower comparison. The same set of role scores can contribute in two different ways. With the maximum, a pronounced resemblance can dominate. With the average, weak resemblance elsewhere influences the result. The paper highlights the competitive performance of the maximum. This supports the authors’ interpretation that close resemblance in a certain part of an opinion can matter even when the documents are less alike in other parts. It does not identify which role actually led the comparison for every pair.

The role-level analysis then asks how individual kinds of material track the overall expert ratings. The ratio gives a stronger association than the other roles for which the paper states coefficients. This makes the reasoning passages a plausible place to find signals relevant to the experts’ judgments. It would take an explanation from an expert to establish why a specific pair received its rating. The role coefficient aggregates across pairs, while expert reasoning can vary with the cases and the question under consideration.

The maximum and the individual role scores should therefore be read together with care. A comparatively strong role-wide coefficient need not mean that the role provides the highest score on most pairs. The coefficient depends on the pattern of values across the evaluation set. Which role wins under the maximum depends on the values relative to one another within a pair. A role with a useful association across pairs could be outscored for many individual comparisons by another role whose values run higher. The published role correlations do not report the distribution of those choices.

Changing the rule for combining sources

The combinations test whether the strongest score should carry a pair or whether both sources should contribute equally to the arithmetic result. The strongest full-text combination and the strongest thematic combination use different rules. This suggests that the way evidence is combined depends on the text representation and the citation score being paired with it. The maximum can preserve a close full-text match when citation overlap is low, and it can preserve strong overlap where the full text looks less similar. The thematic and Node2Vec average retains some influence from each input whenever the scores differ.

These are explanations of the behavior of the functions. The paper’s aggregate results do not establish which of these circumstances accounted for the improvement on particular pairs. A maximum might benefit from the extra source furnishing complementary evidence. It can also depend on where the input scores lie numerically. An average might benefit from the lower score moderating an overly high score, or from both sources reinforcing a pattern across examples. Determining which happened would require pair-level analysis of the combined scores. What is demonstrated is better agreement with the expert ratings for the tested combinations.

Limitations

Limits and open questions identified by the authors

The authors frame case similarity as dependent on the perspective used to judge it. Their examples allow the facts to be alike while the arguments or decisions differ. This defines a limitation of treating the output as a single all-purpose value. A method can be well aligned with one view of what matters and relatively insensitive to another. Even a combination retains only a number at the end, while the reader concerned with a particular legal question may need to know which kinds of resemblance produced it.

The authors also identify as future work the need to agree more closely with expert assessments. They propose looking closely at pairs the experts regard as highly similar. This could reveal factors that the measures miss or treat too weakly. The proposal builds on a limitation of learning from ratings alone. The ratings can show that a pair received a high score and that a method assigned it a less favorable position. A close reading could illuminate which passages or relationships explain the discrepancy.

Explainability is part of the future direction the authors state. They propose asking experts to explain how they assess the similarity of a pair and developing automatic approaches informed by those explanations. The experiment uses scores as its standard of comparison. It does not use expert explanations as an additional standard. A thematic output could give a prospective explanation in terms of a matched role, and a coupling score can be traced to shared authorities. Whether those reasons match the experts’ own grounds would require the extra evidence the authors propose collecting.

The paper also notes that detailed thematic findings are omitted for space. The ratio, precedent and fact coefficients are available, while the discussion gives a shorter account of the other role comparisons. This restricts what can be inferred about the performance of individual roles or why a role appears helpful. The authors’ broader interpretation concerns the existence of different facets of resemblance. The numerical account supports a more specific claim about the reported roles on the evaluated pairs.

Limits of the evaluation design

The experimental results come from 47 pairs in one court’s judgment collection. The graph itself is large, but enlarging the graph does not provide more expert assessments of the scores. The conclusions are bounded by the choice of evaluation pairs and the ratings supplied for them. The paper does not report results separated by legal domain, so the earlier segmentation method’s coverage of 5 domains should be read as background about that method. It does not establish that similarity performance was measured separately in those domains or that it is equally strong across them.

The ratings are treated as given. The paper specifies their endpoints and identifies the raters as legal experts. Its evaluation account does not describe the degree of agreement among the experts or how differences of opinion were resolved. That matters for interpreting what it would mean to improve correlation further. Some discrepancies could reflect weakness in a method. Others could reflect different reasonable readings of case similarity. The study can measure agreement with the scores it uses. It cannot determine from those scores how much consensus there was behind any particular number.

There is also a distinction between assessing known pairs and evaluating a search. In a search, the method would be used to compare one case with candidates drawn from a collection. Its success would depend partly on which candidates it places near the top and whether the useful ones appear where the searcher will see them. Pearson correlation across preselected pairs gives a different kind of evidence. A method could achieve a favorable coefficient while making an important mistake near the top of a candidate list. The paper reports agreement on rated pairs and supplies no retrieval evaluation that would show the practical effect of such mistakes.

The evidence for choosing a combination has a similar boundary. The authors compare alternative inputs and aggregation rules against the same set of expert ratings. They identify which combinations perform best there. The experiment does not report a further test on an independent set to see whether that ordering survives selection of the strongest setting. Nor does the discussion report uncertainty around the correlations. The relative results are valuable for understanding the tested setup, while the stability of the ordering and the size of the likely gain on future pairs remain open.

A further concern is that symmetric scores express resemblance regardless of which judgment plays the role of query. Both overlap and cosine return the same value when the pair is reversed, and the aggregations preserve that property when their inputs are symmetric. A practitioner looking for prior authority may care which opinions were available at the relevant time. A judgment’s incoming citation neighborhood, in particular, describes other documents’ use of it in the assembled network. The study does not present a time-restricted scenario in which only the texts and citations available at the time of a particular query are used. Its results apply to the reported graph comparison.

Limits of the method descriptions

The procedures have different relationships to the evaluation documents. FullText Similarity learns its representation with evaluation judgments left out and then infers their vectors. Node2Vec uses the citation graph built from the collection. There is no reported experiment in which previously unseen judgments are inserted after learning the graph representation. This leaves an engineering question for prospective retrieval. A procedure that can compare cases already represented in a graph still needs an account of how to handle a new judgment whose citation neighborhood is only partially known or whose vector has yet to be learned.

A similar qualification applies to comparisons with sparse or missing evidence. Set normalization needs a denominator, and the description illustrates it with cases whose combined sets contain citations. It gives no rule for a pair whose relevant union is empty. Thematic aggregation needs a set of role similarities. The study explains comparisons between matching roles but does not specify the behavior when a role is absent from one judgment. Such decisions are important when carrying a procedure from an evaluation set to a wider collection. Their effects cannot be deduced from the reported rankings.

Automatic role assignment introduces its own dependency. If material is placed into a different rhetorical category in each opinion, the corresponding-role comparison may miss useful evidence. If similar wording is placed into the same category despite serving different functions, the resulting score may be misleading. The paper relies on an earlier assessment of the segmentation procedure and does not report a comparison against expert-labeled roles for the evaluation pairs. This limits attribution. It is possible to judge the resulting thematic similarity pipeline against the ratings without knowing how much of its performance depends on the quality of segmentation.

Finally, the combined results establish predictive benefit on the evaluated pairs, with some ambiguity about the source of that benefit. Maximum and average are sensitive to the scales and distributions of their inputs. The paper reports the aggregation rules and their relative results without a calibration analysis that would measure the effect of aligning the scales beforehand. A higher Pearson correlation supports the claim that the tested combination better tracks the ratings. It leaves room for different accounts of how much of the gain came from complementary legal evidence and how much depended on the properties of the numerical scores.

What came after

The paper sets out future work on the grounds for similarity judgments. A completed follow-up is not documented here. The proposed direction is to examine cases with high expert similarity ratings and ask what the experts saw in them. That changes the kind of evidence available to evaluate a method. With ratings alone, a researcher can compare outputs to a standard and locate disagreements. Explanations could identify the relationship that matters in a particular pair, whether it lies in the facts, the reasoning, shared legal authorities, or some other feature of the judgments.

This direction follows from the difference between a useful score and an account of why it is useful. A method may correlate with the expert ratings because it often gives high values to similar cases, while its reasons for giving any particular value remain unclear. Even cases with the same approximate level of resemblance may call for different explanations. In one comparison, an overlapping precedent could account for much of the likeness. In another, corresponding reasoning could be important in spite of different citation lists. Investigating highly rated pairs could tell researchers where the existing measures already capture an expert’s grounds and where new evidence is needed.

The paper’s thematic and citation comparisons supply starting points for that investigation. A thematic comparison can identify the role responsible for a strong score under the maximum. An outgoing overlap can identify the common authorities behind a coupling score. These observations can be set beside an expert’s explanation to see whether the same features matter. The authors propose using such explanations to develop future methods. Their study establishes that combining textual and citation information improves agreement on the evaluated judgments and leaves the reasons for that agreement at the level of particular pairs open for investigation.

Cite

Cite as Paheli Bhattacharya, Kripabandhu Ghosh, Arindam Pal and Saptarshi Ghosh. 2020. Methods for Computing Legal Document Similarity: A Comparative Study. arXiv:2004.12307.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2004.12307 · arXiv 2004.12307

@misc{bhattacharya2020methods,
  title = {{Methods for Computing Legal Document Similarity: A Comparative Study}},
  author = {Paheli Bhattacharya, Kripabandhu Ghosh, Arindam Pal and Saptarshi Ghosh},
  year = {2020},
  doi = {10.48550/arxiv.2004.12307},
  eprint = {2004.12307},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2004.12307}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/bhattacharya-2020-methods-computing-legal-document-similarity/

References

8 references, from the paper's own bibliography.

  1. S. Kumar, P. K. Reddy, V. B. Reddy, and A. Singh, “Similarity analysis of legal judgments,” in Proc. Annual ACM India COMPUTE Conference, pp. 17:1–17:4, ACM, 2011. OpenAlex ↗ · Scholar ↗
  2. J. Landthaler, E. Scepankova, I. Glaser, H. Lecker, and F. Matthes, “Semantic Text Matching of Contract Clauses and Legal Comments in Tenancy Law,” in IRIS: Internationales Rechtsinformatik Symposium, 2018. OpenAlex ↗ · Scholar ↗
  3. A. Mandal, R. Chaki, S. Saha, K. Ghosh, A. Pal, and S. Ghosh, “Measuring similarity among legal court case documents,” in Proc. Annual ACM India COMPUTE Conference, pp. 1–9, 2017. OpenAlex ↗ · Scholar ↗
  4. S. Kumar, P. K. Reddy, V. B. Reddy, and M. Suri, “Similar legal judgements under common law system,” in International Workshop on Databases in Networked Information Systems, 2013. OpenAlex ↗ · Scholar ↗
  5. A. Grover and J. Leskovec, “Node2vec: Scalable feature learning for networks,” in Proc. ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 855–864, 2016. OpenAlex ↗ · Scholar ↗
  6. A. Minocha, N. Singh, and A. Srivastava, “Finding relevant indian judgments using dispersion of citation network,” in Proc. International Conference on World Wide Web, pp. 1085–1088, 2015. OpenAlex ↗ · Scholar ↗
  7. Q. Le and T. Mikolov, “Distributed Representations of Sentences and Documents,” in Proc. International Conference on Machine Learning, 2014. our card
  8. P. Bhattacharya, S. Paul, K. Ghosh, S. Ghosh, and A. Wyner, “Identification of rhetorical roles of sentences in indian legal judgments,” in Proc. International Conference on Legal Knowledge and Information Systems (JURIX), 2019. OpenAlex ↗ · Scholar ↗