Showing posts with label ID3. Show all posts
Showing posts with label ID3. Show all posts

Sunday, February 28, 2010

Participatory Democracy for Taxes, Possible Approaches

Possible Mechanisms for Participatory Democracy for Taxes

I proposed and our group at Western Illinois University are implementing techniques for people to vote on the laws that constitute the tax code. The tax code could be represented as a decision tree which in the end leads to the amount of tax or a simple formula such as a linear function of income that gives one tax. A decision tree is a set of divisions, each of which will have other divisions. For example, we might vote to divide people on the basis of the number of children. Thus, we would look separately at those having zero children, one child, two children, three or four children, five to eight children, etc. This has been referred to in the literature (Reference One) as Recursive Partitioning.

Then, we might look at the ratio of earned (wages) to unearned income (bank interest, dividends, bond coupons). Thus, the tree might have a division for those having no children and eighty to one hundred percent wage income. Another branch for those having no children and sixty to eighty percent wage income, etc.

Then for each of these divisions, we would have a formula or graph relating income to division.

At each stage in the process, individuals would vote on what divisions to make and eventually the ratio of income.

Another student is working on applying genetic algorithms to determing a tax code.

But do we need rules? Do we need a tax code?

One could envision a taxing system that simply said: each individual and each entity would go before a jury. They would determine the tax they pay. How can we make it less arbitrary?
  1. Tax rates would not vary by more than ten percent year to year without a supermajority. To transition to that system, we would start with whatever tax the entity paid under our complicated tax code. Thus, if a firm paid four millions in taxes the previous year, their tax this year would be between 3.6 million and 4.4 million. However, sixty percent of the jury could vote to change it by twenty percent, in the example from 3.2 million to 4.8 million. Seventy percent could vote to change it by fourty percent, etc.
  2. Several entities could be grouped together for comparison. One possibility is to group them randomly. Thus, a jury would see a disparate group of entities, say
    1. a middle-class individual
    2. a working-class individual
    3. a financial institution
    4. a factory
    The jury would vote on a tax rate for each entity. It doesn't follow that the corporations would pay a higher rate than the individuals. The jury might find that the corporation truly is a public-spirited organization committed to sustainability. And it might find that the individual is a fuel hog in taking unnecessary trips, and not taking care of self. (See my blog entry on the badness tax.)
  3. The above scenario assumes no attempt to group elements. One certainly could group members. This can done by rules. That is, we could vote as discussed at the beginning for classifications. We could vote on dividing by corporation, partnership or individual. We could vote to divide by their net income, gross income or number of employees.. Thus, one would not be comparing small businesses with large businesses. But we wouldn't vote on a tax rate for the category, simply a number of sets to be collected from each group.

    A sample of let's say twenty individuals or entities or corporations would go before the tax jury. The tax jury would know that they have to collect a specific amount revenue from each set. (The computer would divide the total to be collected in each category by the amount of revenue).

    Example, we vote that we want to group all those married individuals earning between sixty-thousand dollars and eighty-thousand dollars and having two children in one group. We would look at the total income earned and decide that gather all such people should pay twenty billion in revenue. Assume this group was two-million families. Thus, on average each family would pay ten-thousand in taxes. And thus, each group of twenty would pay $200,000 in taxes. The jury would tnen adjust the $10,000 that each should pay based upon all kinds of other factors: how much have they given in charity, which have high medical bills or suffered other disasters this year, etc. etc.

    Each family would be given a chance to explain their financial situation and any reason why they should be given special consideration.

  4. The alternative to rules for categorization is clustering. This would introduce a second type of jury. This jury would be given pairs of individuals. They would get financial information for the two individuals in the pair. These jurors would indicate how similar they are; not how much taxes they should pay.

    There are many algorithms available that cluster items into similar groups including Self-organizing maps. In two or three spatial dimensions, this would be groups of points that are very close, forming a clump on a scattergraph. This could be extended to a tax situation in that the software would treat numbers such as number of children, incomes, as spatial dimension and place each taxpayer as a point in the "n-dimensional space." The clustering algorithm would find groups of tax payers that are similar in input characteristics. The taxpayers would go before groups of the first juror types to explain those special tax considerations that would be lower than individuals that are similar.

  5. There are many algorithms to take sets of example data and create a function out of them. (See the discussion below and references one and two for a good summary.) Thus, the jurors could rate several tax payers as to how much tax they should pay. This, of course, assumes that the characteristics that determine how much tax an individual or entity should pay are all quantitative or captured by the collected parameters (income, medical expenses, etc.) Are we better off allowing people to present these issues and construct the rules interactively and collaboratively, or merely say what the tax should be for various tax payers and construct the rules mechanically.
Computer scientists and statisticians have developed many different ways that one could learn functions from example data. These relate from such standby's as multiple regression to the new methods such as neural networks, and machine learning techniques. Thus, assume that we have juror ratings of one thousand tax payers. We can apply these techniques to generate a function between the parameters and the tax assigned. Obviously, one could replace the jurors by the formula. Alternatively, people could use such capabilities to estimate how much tax they would have to pay. This would be how "tax planning" would be done.

This is similar to the various services that report jury verdicts in tort litigation to help trial lawywers decide when and for how much to settle their cases.

Classification Procedures and Tax

James E. Parker and Kenneth F. Abromowicz tried both statistical methods and recursive participation to see if they could discover tax law from examples. They tried it on decision rules of a straightforward tax law provisions for whetehr somebody should be considered a dependent. They also compared the ID3 results with those of a common statistical techniques such as regression. The ID3 based approach did slightly better than other techniques.

They then looked at one hundred decisoins regarding "tax home." Taxpayers can deduct traveling expenses when away from home. But where is one's home? If I claim my home near Western Illinois University where I am an Associate Professor, I cannot deduct the cost to go to and from. But if I am temporarily in Pennsylvania during my sabbatical, can I take my carfare off my taxes? It depends on what is considered my home. The Researchers looked at such factors as where the person filed state tax, have income producing property and where one's children resided. The ID3 algorithm correctly correctly classified twenty-seven out of thirty tax cases while the statistical techniques did only 26 to 30.

The tax law considers a scholarship or fellowship not income. If a profit-making corporation pays one's tuition in exchange for working for them latger, that is income. But what about the assistantships that Ph.D. students often get. There are some duties, but it is more awarded to support promising students Garrison and Michelsen looked at one hundred cases and then presented a holdout sample. The ID3 correctly classified all twelve cases as compared to one two or three from statistical approaches.

The Internal Revenue Service has been looking into using machine learning techniques to identify tax returns that are potentially fraudelent. See94ARD 030-1, Statement of Margaret Milner Richardson on February 10, 1994. NCR Terradata division and States has been using such techniques to help catch those who don't file their State Income Tax or don't pay it problperly. And in 2006, the National Taxpayer Advocate reported on using machine learning to identify abusive tax returns.)

Proposed Work

We can simulate the ID3 algorithm and use Lindahl Equilibrium as a figure of merit. That is, I will hypothesize individuals with various incomes and characteristics. I will also hypothesize a distribution for their preference for public goods (defense, public libraries, public education, national and state parks). We will assume some percentage of them behave strategically and some percentage simply vote their true preferences. Dr. Wally Smith did some excellent simulations for multiple-candidate elections, which will be another Thoughtful Thursday.

As an empirical work, we will solicit stories from taxpayers where they will provide their tax return, other information that the jurors would consider relevant to how much tax they should pay and possibly have them give a video clip explaining how much tax they feel they should pay and why.

We will try two different sets of jurors. One set will simply vote on the taxes to be paid by each taxpayer. They will have a training set of half the sample tax data. Other groups will develop a classification scheme by ID3 or Genetic Algorithms.

Then, we will generate a tax code using the examples from the first set of jurors, and classify the holdout set, the other half. We will ask the first set of jurors how they liked the results for the second half. The second group will have the holdout set classified by the rules on which they just voted. We will see how they like the result.

We may have to make up some hypotheticals for the very rich as we probably could not get them to give us their data. Although some politicians are wealthy and do make their taxes public.

References

  1. Parker, James E. "Predictive Abilities of Three Modeling Procedures" The Journal of the American Taxation Association, 37 to 53, Volume 11 Number One Fall 1989.
  2. Garrison, Larry R. and Robert H. Michaelsen, "Symbolic Concept Acquisition: A New Approach to Determining Underlying Tax Constructs" Journal of the American Taxation Association, 77 to 91, Volume 11 Number One Fall 1989.

Thursday, January 28, 2010

Thoughtful Thursday: The ID3 Machine Learing Algorithm

ID3 is an algorithm to generate a decision tree from a set of examples. It is used in machine learning.

Many legal codes are some sort of function of several parameters and are of a nature that can be defined as a decision tree. For example, one is making the gun control law. Some of the parameters might be the type of gun. (Is this a BB-gun, an antique gun, a non-functional gun, an assault gun, a pistol, etc?) Is the weopon concealed? And there are the characteristics of the owner of the possessor. Are they mentally ill, convicted of a crime, have an order of protection against them, etc. Was the person's life threatened? Does the person job need it, e. g. security guard. And lastly, what is the place: a school, bar, a place where beer is sold such as some supermarkets.

The answer could be a simple boolean, "permitted" or "not permitted" Or we could get a classification such that the possession might be a misdemeanor or a felony. Many states have categories for felonies. For example, in the State of New York, a class A felonly, the term is life imprisonment, for class B, the term for a class B felony does not exceed twenty-five years, etc. (There are other special rules for dispositions, such as those who have prior convictions or are youthful offendors.) Then the bulk of the penal code defines offenses to be a class D felony, a class B felony, etc.

A possible decision tree

Gun TypeLocationAgePersonal StatusPenalty, if any
antique No Offense
BB Gun N Offense
Pistol15-20A Class Misdemeanour
Pistol20-30B Class Felony
Pistol30-50Felony
Pistol50-70A Class Misdemeanour
RifleBarClass B Felony
RifleScholClass C Felony
RiflePlace where Beer is SoldClass A Misdemeanour
RifleotherNo Offensse
AssualtClass B felony
RifleOthermentally illClass D Felonly
RifleOtherConvicted of a FelonyClass C Felony
RifleOtherOtherClass B Misdemeanor

An ID3 algorithm would take a series of examples such as the one in the table above. It would create a decision tree that would give the same answers as the examples. It needs to pick which parameter to use for the root node--in the above tree, it was Gun Type. It picks one that divides a lot of examples between thee categories. Often the formula from information theory is used. In the above example, the tree was precisely determined from the input data. That is not always true. In a diagnosis application, there would likely be lines that contradict each other. Or there would might be several lines with very similar attributes. All might have the same classification or penalty, except one. Is that due to a real difference, or just a random error?

ABCDResult
12344ii
12444ii
12544ii
12345ii
12445ii
12545ii
12346ii
12446ii
12546iii
There is a danger of overfitting when there are lots of examples. Thus, a pruning process removes those divisions that don't have much information gain.

Mr. Yeluri set up an example to illustrate these ideas. Since it is long, I put it at the end in an appendix.

In participatory democracy, we do it a little bit differently. For each node in the tree, the users vote on what the next parameter should be. Thus, at the start the individuals would vote on which of the above questions regarding place, type of gun and person should be asked first. Then, the group for each resulting category would be classified again. The individuals can vote to decide for any node when it comes up to classify it once and for all. E. G., if the category of assault weopon shows up, individuals might vote to always ban it and for the category of BB-gun, they may vote not to consider any other factors and always permit it. This is a leaf node and the people will then vote on the classification from the possibilities available.

We established the following terminology, for the input to our experiment:

title
a thing on which one chooses, like gun type
attribute
one of the possibilities for a title thus gun type could be antique, bb, assualt, rifle, assault or shot gun
node
this corresponds to series of pairs of parameter and type.

for example, the voting might bring us to making a decision on what to do with those caught with an antique guns, a history of mental illness, and who are sixteen to twenty years old. This is a list of title (nature of gun) and type, antique, mental illness status, and type of history of mental ilness and age, which is divided into types or ranges. this is defined as

of root node
age top of the tree which coresponds to no titles and parameters selected so far.
The voters first vote on which title to choose as the root parameter. Then, they vote for each attribute of that title, how next to classify it. as ech of thse achieve quorum, each of these nodes becomes accessible, that is, the voters might vote on what title to use for gun-type= antique, choosing from the remaining titles of personal status, age range, location. then, they vote on what title to use for gun-type="bb" gun-type="pistol" gun-type="rifle" gun-hattype="assault." Each creates a new node which is marked accessible; and individuals vote for each in turn. One of Masters students, Mr. Chaitanya Yeluri, just implemented this. More details are in his masters project.

After the root node, the users can assign a penalty. Observe in the figure that we immidetely assign "no offense" to those possessing antique guns. on the other hand, there arthree levels until we get to gun type ="rifle",m location="other" and "mental health status" = "felony conviction." at each node, the users have the option to "vote now" and if that gets more votes than any title, the users vote on a penalty for same.

How would we apply this to tax law? The ID3 algorithm is not designed to deal with cases that produce a continuous function, like the amount of tax that the taxpayer should payer. (Note, ID3 is used when there are input parameters that are numeric. The algorithm sorts the examples in numeric order of the parameter. It then finds the decision pont that gives the greatest information theory gain.)

Thus, for a tax system by ID3, at each leaf node, there would per be a formula. The titles in a tax problem might be various income ranghe atues, the number of children, marital status. And then the users might vote for those unmarried head-of-household with three children and in the range $20,000 to $40,000 to make the tax = $500.00 + 0.10*(Income - $20,000). That is $500.00 on the first $20,000 plus ten percent of the remaining income. They might put other components of the formulae in for the amount of state tax they paid, the mortgage interest, etc.

Reference

, Quinlan Ross, Programs for Machine Learning, Morgan Kaufman, San Mateo CA 1993

Appendix, The Information Theory Formula

We have three titles, A, B and C. The possible choices, or parameters for each of these are:
A F, G, H
B I, J, K
C M, N, P
Assume the input examples are:
ABCClassification
Yes /No
FIMN
FINY
FIPN
GIMN
GIPY
GIMN
GIPY
GINY
GJMY
GJPY
FJMN
FJNY
FJPY
HINN
HINN
HJNN
HIPY
HJMY
HJNN
HJPY
HKMN
HKNY
HKPY
FKMN
FKNY
FKPY
The information content of the entire sest is 0.3149. We try classifying it on the basis of A, and we get an information content 1.3328. And it happens by coincidence that if we tried B for the root node, we also get 1.3228. (The three nodes for a would have been:
ABCClassification
Yes /No
FIMN
FINY
FIPN
FJMN
FJNY
FJPY
FKMN
FKNY
FKPY
giving an information content of 4/9 log 2 4/9 + 5/9 log 2 5/9.
ABCClassification
Yes /No
GIMN
GIPY
GINY
GJMY
GIMN
GIPY
GJPY
giving an information content of 5/7 log 2 5/7 + 2/7 log 2 2/7.
ABCClassification
Yes /No
HIMN
HINN
HJNN
HIPY
HJMY
HJNN
HJPY
HKMN
HKNY
HKPY
giving on an information content of: 5/10 log 2 (5/10) + 5/10 log 2 (5/10) .

By comparison, the sample sets for classifying by C are:

C="M"

ABCClassification
Yes /No
FIMN
GIMN
GJMY
FJMN
HIMN
HINN
HJMY
HKMN
FKMN
GIMN
And, if we tried to split this by A, we would have:
ABCClassification
Yes /No
FIMN
FJMN
FKMN
ABCClassification
Yes /No
GIMN
GJMY
GIMN
ABCClassification
Yes /No
HJMY
HKMN
giving a total information content of 0.6438. If we split C="N" by B
ABCClassification
Yes /No
FINY
GINY
FJNY
HINN
HJNN
HKNY
FKNY
Then, there are two possibilities breaking it down by A
ABCClassification
Yes /No
FINY
FJNY
FKNY
ABCClassification
Yes /No
GINY
ABCClassification
Yes /No
HINN
HJNN
HKNY
This gives us an information value of 1.5579.

Or we can split it by B, giving us:

ABCClassification
Yes /No
FINY
GINY
GIMN
HINN
ABCClassification
Yes /No
FJNY
GJPY
HJNN
ABCClassification
Yes /No
HKNY
FKNY
This gives us an information value of 1.6253.

The resulting tree chosen would be given by the below: